/** * The update notice, in the shape npm's update-notifier, gh, and vercel use: * read the registry's dist-tag at most once a day, cache it beside the config, * never block or fail the command on it, and print one notice on stderr. */ export declare const PACKAGE_NAME = "relaymessenger"; export declare const CHECK_INTERVAL_MS: number; export declare const CHECK_TIMEOUT_MS = 1500; export interface UpdateCheck { /** The installed version. */ version: string; /** The dist-tag compared against: `staging` for a staging build, else `latest`. */ tag: "latest" | "staging"; /** The newest version from a fresh cache, known before any network call. */ cached: string | undefined; /** The newest version, from the cache or the registry; undefined when unknown. */ latest: Promise; } export interface UpdateCheckOptions { version: string; cacheFile: string; env?: NodeJS.ProcessEnv; fetch?: typeof globalThis.fetch; now?: () => number; timeoutMs?: number; } export declare const distTagFor: (version: string) => "latest" | "staging"; /** True when `installed` is older than `latest`; false when either is unreadable. */ export declare const isOutdated: (installed: string, latest: string) => boolean; export declare const startUpdateCheck: (options: UpdateCheckOptions) => UpdateCheck; /** How a person was running this copy: from npx's cache, or an install of their own. */ export declare const ranFromNpx: (script?: string | undefined) => boolean; /** The lines that tell a person this copy is old and exactly what to run instead. */ export declare const updateNotice: (check: Pick, latest: string, argv: readonly string[], fromNpx?: boolean) => string; /** A refusal that says the route this copy called is gone: 404 or 410. */ export declare const staleRouteStatus: (error: unknown) => boolean; //# sourceMappingURL=update-check.d.ts.map