mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-16 17:11:44 +00:00
* feat(tooling): add tsgo typecheck lane for scripts/** * fix(scripts): burn down scripts type debt surfaced by the new lane Typing-only except bugs the lane surfaced: gh-read timeout race, Discord Headers spread dropping entries, undefined allowedHeadBranches match, plugin-boundary matchAll crash. Deletes retired config keys from fixtures/benches (prompt snapshots regenerated, config dump only) and the orphaned non-runnable sync-moonshot-docs script. Adds full-surface .d.mts declarations for existing .mjs boundaries.
56 lines
1.9 KiB
TypeScript
56 lines
1.9 KiB
TypeScript
export type ParsedReleaseVersion = {
|
|
version: string;
|
|
baseVersion: string;
|
|
channel: "stable" | "alpha" | "beta";
|
|
year: number;
|
|
month: number;
|
|
patch: number;
|
|
alphaNumber?: number;
|
|
betaNumber?: number;
|
|
correctionNumber?: number;
|
|
};
|
|
export type NpmPublishPlan = {
|
|
channel: "stable" | "alpha" | "beta";
|
|
publishTag: "latest" | "alpha" | "beta" | "extended-stable";
|
|
mirrorDistTags: Array<"latest" | "alpha" | "beta">;
|
|
};
|
|
export type PublishedNpmVersionRoute = "npm-readback" | "npm-mirror" | "npm-tag-repair";
|
|
export type NpmRegistryPackumentResult = {
|
|
status: number;
|
|
ok: boolean;
|
|
packument: unknown;
|
|
};
|
|
export function fetchNpmRegistryPackumentWithRetry(params: {
|
|
packageName: string;
|
|
packageUrl: string;
|
|
attempts?: number;
|
|
timeoutMs?: number;
|
|
fetchImpl?: (input: string, init: RequestInit) => Promise<Response>;
|
|
sleep?: (delayMs: number) => Promise<void>;
|
|
createSignal?: (timeoutMs: number) => AbortSignal;
|
|
}): Promise<NpmRegistryPackumentResult>;
|
|
export function parseReleaseVersion(version: string): ParsedReleaseVersion | null;
|
|
export function collectReleaseVersionFloorErrors(
|
|
version: string | ParsedReleaseVersion | null,
|
|
): string[];
|
|
export function compareReleaseVersions(left: string, right: string): number | null;
|
|
export function resolveNpmPublishPlan(
|
|
version: string,
|
|
currentBetaVersion?: string | null,
|
|
publishTagOverride?: string | null,
|
|
): NpmPublishPlan;
|
|
export function resolvePublishedNpmVersionRoute(params: {
|
|
packageVersion: string;
|
|
publishPlan: NpmPublishPlan;
|
|
distTags: Record<string, unknown>;
|
|
}): PublishedNpmVersionRoute;
|
|
export function resolveNpmDistTagMirrorAuth(params?: {
|
|
nodeAuthToken?: string | null;
|
|
npmToken?: string | null;
|
|
}): { hasAuth: boolean; source: "node-auth-token" | "npm-token" | "none" };
|
|
export function shouldRequireNpmDistTagMirrorAuth(params: {
|
|
mode: "--dry-run" | "--publish";
|
|
mirrorDistTags: readonly string[];
|
|
hasAuth: boolean;
|
|
}): boolean;
|