/** * publish-package, idempotent npm publish + post-publish propagation poll. * * One implementation of the publish concern with a single set of constants. * Idempotency: if the exact name@version is already on the registry, skip * (re-runs are safe). Propagation poll: after publish, wait until the registry * actually serves the new version before downstream jobs depend on it. */ import type { Exec, Logger, Sleep } from './effects.js'; /** Query the published version of name@version; null when absent (or on error). */ export declare function getPublishedVersion(exec: Exec, name: string, version: string, registry: string): string | null; export interface PublishOptions { readonly cwd: string; readonly name: string; readonly version: string; readonly registry?: string; readonly dryRun?: boolean; /** * When set, publish this prebuilt tarball (`npm publish `) * instead of packing and publishing `cwd`. Used by repos whose npm bytes are * produced by a separate pack job (e.g. the agent bundles a runtime before * `bun pm pack`), so the publish must ship the staged .tgz rather than a bare * checkout. The path must exist and be a readable `.tgz`. */ readonly tarballPath?: string; readonly exec?: Exec; /** File-existence seam (defaults to node `existsSync`) so tarball validation is testable. */ readonly fileExists?: (path: string) => boolean; readonly logger?: Logger; } export interface PublishResult { readonly ok: boolean; readonly skipped: boolean; readonly detail: string; } /** Publish the package in `cwd`, skipping if already published. */ export declare function runPublishPackage(options: PublishOptions): PublishResult; export interface PropagationOptions { readonly name: string; readonly version: string; readonly registry?: string; readonly attempts?: number; readonly delayMs?: number; readonly exec?: Exec; readonly sleep?: Sleep; readonly logger?: Logger; } export interface PropagationResult { readonly ok: boolean; readonly attempts: number; readonly detail: string; } /** Poll the registry until name@version resolves, or attempts are exhausted. */ export declare function pollPropagation(options: PropagationOptions): Promise; //# sourceMappingURL=publish-package.d.ts.map