import { PadroneSchema } from "../types/schema.mjs"; import { StandardSchemaV1 } from "@standard-schema/spec"; //#region src/feature/wrap.d.ts /** * Configuration for wrapping an external CLI tool. */ type WrapConfig = { /** * The command to execute (e.g., 'git', 'docker', 'npm'). */ command: string; /** * Optional fixed arguments that always precede the arguments (e.g., ['commit'] for 'git commit'). */ args?: string[]; /** * Positional argument configuration for the external command. * If not provided, defaults to the wrapping command's positional configuration. */ positional?: string[]; /** * Whether to inherit stdio streams (stdin, stdout, stderr) from the parent process. * Default: true */ inheritStdio?: boolean; /** * Optional schema that transforms command arguments to external CLI arguments. * The schema's input type should match the command arguments, and its output type defines * the arguments expected by the external command. * If not provided, command arguments are passed through as-is. */ schema?: TWrapArgs | ((commandArguments: TCommandArgs) => TWrapArgs); }; /** * Result from executing a wrapped CLI tool. */ type WrapResult = { /** * The exit code of the process. */ exitCode: number; /** * Standard output from the process (only if inheritStdio is false). */ stdout?: string; /** * Standard error from the process (only if inheritStdio is false). */ stderr?: string; /** * Whether the process exited successfully (exit code 0). */ success: boolean; }; //#endregion export { WrapConfig, WrapResult }; //# sourceMappingURL=wrap.d.mts.map