import type { Result } from "@fjall/generator"; import type { CdkOptions, CdkOutput } from "./CdkService.js"; /** * Interface for CDK process management, enabling constructor injection. * * The concrete CdkProcessManager uses `import.meta.url` to resolve the * `aws-cdk` binary from the calling package's node_modules. By programming * against this interface, callers (CLI, webapp worker) can provide their * own implementation with the correct binary resolution context. */ export interface ICdkProcessManager { /** Run a CDK command and capture stdout/stderr output. */ runCdkCommand(workingDir: string, args: string[], options?: CdkOptions & { ignoreExitCode?: boolean; skipProjectCheck?: boolean; extraEnv?: Record; combineOutput?: boolean; }): Promise>; /** Run a CDK command with stdio passed through to the terminal. */ runCdkCommandPassthrough(workingDir: string, args: string[], options?: CdkOptions & { ignoreExitCode?: boolean; }): Promise>; /** Kill all tracked child processes and clean up resources. */ cleanup(): void; /** Clean up resources and deregister process signal handlers. */ dispose(): void; }