import type { FetchLike } from "../handlers/HandlerRegistration.js"; /** The files a command touches, behind a seam so a test hands in a directory of its own. */ export interface CliFiles { exists(path: string): boolean; /** The text, or null when there is no such file. */ read(path: string): string | null; /** The names in a directory, sorted, or null when the path is not one. */ list(path: string): readonly string[] | null; write(path: string, text: string, mode?: number): void; mkdir(path: string): void; remove(path: string): void; } /** The process around a command: where input comes from, where output goes, how it ends. */ export interface CliProcess { readonly env: Readonly>; readonly cwd: string; readonly home: string; readonly isTTY: boolean; readonly color: boolean; readonly stdout: (text: string) => void; readonly stderr: (text: string) => void; readonly exit: (code: number) => void; readonly onSignal: (signal: "SIGTERM" | "SIGINT" | "SIGHUP", handler: () => void) => void; readonly files: CliFiles; /** One line from standard input, or a prompt's answer on a terminal. */ readonly readLine: (prompt: string, secret: boolean) => Promise; readonly fetch: FetchLike; } export declare function nodeFiles(): CliFiles; export declare function nodeCliProcess(): CliProcess; //# sourceMappingURL=CliProcess.d.ts.map