import notifier from "update-notifier"; type UpdateNotifierInstance = ReturnType; export interface RunUpdateCheckOptions { /** The CLI's own package.json (used by update-notifier to query npm). */ readonly pkg: { readonly name: string; readonly version: string; }; /** Override for tests — defaults to update-notifier from node_modules. */ readonly notifierFactory?: typeof notifier; /** Bypass the check entirely. */ readonly disabled?: boolean; /** Check interval in ms. Default: 24h. */ readonly updateCheckInterval?: number; } /** * Kick off the background update check. Non-blocking — returns the * UpdateNotifier instance immediately; the fetch happens out-of-band. * * Caller invokes {@link maybeRenderUpdateBanner} at exit time to display * the banner if (a) a newer version landed and (b) the TTY/format gates * pass. If disabled, returns null and the banner is skipped. */ export declare function runUpdateCheck(opts: RunUpdateCheckOptions): UpdateNotifierInstance | null; export interface MaybeRenderBannerOptions { readonly useAnsi: boolean; /** Output format from the scan; we skip the banner for machine formats. */ readonly format?: string; /** Stream override (defaults to process.stderr). */ readonly stream?: { write: (s: string) => boolean | void; isTTY?: boolean; }; } /** * Render the update banner if {@link runUpdateCheck}'s notifier surfaced * a newer version. Honors: * - notifier is null (check disabled) → no banner * - notifier.update is undefined (check still pending, no result) → no banner * - current === latest (no upgrade available) → no banner * - --format json|sarif (machine-consumed) → no banner * - non-TTY stderr (piped / captured) → no banner * * Returns true if a banner was printed (caller can use for testing). */ export declare function maybeRenderUpdateBanner(instance: UpdateNotifierInstance | null, opts: MaybeRenderBannerOptions): boolean; export {}; //# sourceMappingURL=update-check.d.ts.map