import { type ChildProcess, type SpawnOptions } from 'node:child_process'; import type { Command } from './plan.js'; import type { DownloadedFile, FolderState, RunResult, StarterDeps } from './run.js'; export type SpawnFn = (command: string, args: string[], options: SpawnOptions) => ChildProcess; export interface RunOptions { platform?: NodeJS.Platform; spawnFn?: SpawnFn; env?: NodeJS.ProcessEnv; } /** Runs one child process and resolves with its exit code (null when it could not start). */ export declare function runProcess(command: Command, output: 'inherit' | 'quiet', options?: RunOptions): Promise; /** Asks one question on the terminal. Resolves with an empty string when the input ends. */ export declare function askQuestion(question: string): Promise; export declare function inspectFolder(path: string): FolderState; export declare function writeFiles(folder: string, files: readonly DownloadedFile[]): void; /** The version in this package's package.json (one folder above the built files). */ export declare function readOwnVersion(read?: (url: URL) => string): string; /** `uid:gid` of the current user, or null on Windows where Node has no `getuid`. */ export declare function hostUserOption(ids?: { getuid?: () => number; getgid?: () => number; }): string | null; export declare function createNodeDeps(): StarterDeps;