#!/usr/bin/env node /** * Retry-safe npm publication with monotonic shared dist-tags. * * npm trusted publishing (OIDC) authorizes only `npm publish`; `npm dist-tag` * needs a registry token. Promotion therefore happens atomically inside * `npm publish --tag `, and stale candidates are parked under a * per-version tag so a shared channel never moves backward. */ export interface NpmRegistry { versions(packageName: string): string[]; distTags(packageName: string): Record; publish(tag: string): void; } export interface PublishResult { immutableCreated: boolean; channel: "latest" | "dev"; promotion: "initialized" | "promoted" | "current" | "stale"; } export interface NpmCommandResult { status: number; stdout: string; stderr: string; } export type NpmCommandRunner = (args: readonly string[], inherit?: boolean) => NpmCommandResult; export declare const defaultNpmRunner: NpmCommandRunner; export declare class CliNpmRegistry implements NpmRegistry { private readonly runner; constructor(runner?: NpmCommandRunner); versions(packageName: string): string[]; distTags(packageName: string): Record; publish(tag: string): void; } export declare function parkingDistTag(version: string): string; export declare function publishRelease(registry: NpmRegistry, packageName: string, version: string, packageVersion: string): PublishResult; export declare function main(args?: string[]): number; //# sourceMappingURL=npm-publish.d.ts.map