import type { FileSystem } from "../utils/file-system.js"; import type { CommandRunner, CommandRunnerResult } from "../utils/command-checks.js"; import type { ScopedLogger } from "./logger.js"; export interface CommandContextOptions { dryRun: boolean; logger: ScopedLogger; runner: CommandRunner; } export interface CommandContextComplete { success: string; dry: string; } export interface CommandContext { dryRun?: boolean; fs: FileSystem; runCommand: CommandRunner; runCommandWithEnv(command: string, args: string[], options?: { cwd?: string; env?: Record; }): Promise; flushDryRun(options?: { emitIfEmpty?: boolean; }): void; complete(messages: CommandContextComplete): void; finalize(): void; } export interface CommandContextFactoryInit { fs: FileSystem; } export interface CommandContextFactory { create(options: CommandContextOptions): CommandContext; } export declare function createCommandContextFactory(init: CommandContextFactoryInit): CommandContextFactory; export declare function createLoggingCommandRunner(runner: CommandRunner, logger: ScopedLogger): CommandRunner;