import { type Command } from './plan.js'; import { type FetchLike } from './release.js'; export type FolderState = 'missing' | 'empty' | 'not-empty' | 'not-a-folder'; /** What a child process did. `code` is null when it could not start (the tool is not installed). */ export interface RunResult { code: number | null; } export interface DownloadedFile { path: string; content: string; } /** Everything the starter does to the outside world, so tests can replace it. */ export interface StarterDeps { fetch: FetchLike; /** Runs a child process. `inherit` shows its output; `quiet` hides it (tool checks). */ run(command: Command, output: 'inherit' | 'quiet'): Promise; /** Asks one question and returns the answer; an empty string when there is none. */ ask(question: string): Promise; /** True when a person can answer questions. */ interactive: boolean; /** True when the output is a terminal (the wizard container then gets -t). */ tty: boolean; /** `uid:gid` of the current user for `docker run --user`; null where there are no user ids. */ hostUser: string | null; /** `process.versions.node`. */ nodeVersion: string; /** The version of this starter. */ version: string; cwd(): string; inspectFolder(path: string): FolderState; /** Writes the files under the folder, creating folders as needed. */ writeFiles(folder: string, files: readonly DownloadedFile[]): void; fileExists(path: string): boolean; log(line: string): void; error(line: string): void; } /** Runs the starter. Returns the exit code of the program. */ export declare function runStarter(argv: readonly string[], deps: StarterDeps): Promise;