import { execFile } from "node:child_process"; export declare const execFileAsync: typeof execFile.__promisify__; export interface Parsed { flags: Record; positionals: string[]; } export declare function parseFlags(argv: string[]): Parsed; export declare function list(v: string | boolean | undefined): string[] | undefined; export declare function str(v: string | boolean | undefined): string | undefined; export declare function num(v: string | boolean | undefined): number | undefined; export declare function printJson(value: unknown): void; /** Fixed-width two-column line for human output. */ export declare function row(label: string, value: string, width?: number): string; export declare function sha256(buf: Buffer | Uint8Array): string; export declare function shortHash(buf: Buffer | Uint8Array): string; /** * How long a lock file stays believable before it is treated as abandoned. * * A lock here is a file whose mtime says when its holder last claimed it. * There is no way to ask whether the process that wrote it is still alive, and * a lock that outlives a crash would wedge the verb it guards forever, so age * is the only answer available: past this, whoever is asking may take it. */ export declare const LOCK_STALE_MS: number; /** Is somebody holding this lock right now? Missing means no. */ export declare function lockHeld(path: string, now?: number): boolean; export declare function nowIso(): string; export declare function runId(kind: string): string; export declare function sleep(ms: number): Promise; /** Walk from `start` upward looking for `rel`; return the absolute path or null. */ export declare function findUp(rel: string, start: string): string | null; /** True when a URL points at this machine. */ export declare function isLocalUrl(url: string): boolean; /** * Fetch with a timeout; the status, and what the server says about the age of * what it served. Nulls when unreachable. The default timeout is generous * because dev servers compile routes on first hit (a cold Next.js page can * take several seconds before its first byte). * * `servedAt` is `Last-Modified` as epoch milliseconds. Hot-reload dev servers * send no such header and report null; a static server in front of a built * directory sends the built file's own timestamp, which is what lets * freshness.ts notice a build older than the source. */ export declare function probeMeta(url: string, timeoutMs?: number): Promise<{ status: number | null; servedAt: number | null; }>; /** Fetch with a timeout; the status alone, or null when unreachable. */ export declare function probe(url: string, timeoutMs?: number): Promise; /** Is a binary actually on PATH? */ export declare function have(bin: string): Promise;