mirror of
https://github.com/morluto/rea.git
synced 2026-10-19 04:19:54 -05:00
28 lines
824 B
TypeScript
28 lines
824 B
TypeScript
export type NpmReleaseState =
|
|
| { status: "absent" }
|
|
| {
|
|
status: "published";
|
|
integrity: string;
|
|
tag: "latest" | "next";
|
|
taggedVersion: string | null;
|
|
stableVersion: string | null;
|
|
};
|
|
export function readNpmRelease(
|
|
version: string,
|
|
request?: (url: string, init: RequestInit) => Promise<Response>,
|
|
): Promise<NpmReleaseState>;
|
|
export function requireMatchingNpmRelease(
|
|
tarball: string,
|
|
version: string,
|
|
published: NpmReleaseState,
|
|
): Promise<void>;
|
|
export function stableUpdateVersion(
|
|
version: string,
|
|
published: NpmReleaseState,
|
|
): string;
|
|
export function waitForNpmRelease(
|
|
version: string,
|
|
lookup?: (version: string) => Promise<NpmReleaseState>,
|
|
pause?: (milliseconds: number) => Promise<unknown>,
|
|
): Promise<Extract<NpmReleaseState, { status: "published" }>>;
|