/** * Cross-platform subprocess helpers for the ported hula workflow scripts. * * The original `.sh` scripts shell out to `git`, `gh` and the `hula` CLI. These * helpers reproduce that with Node's `child_process.spawn` and **no shell**, so * argument quoting is not a cross-platform hazard (no cmd/PowerShell/bash * escaping differences) — a core goal of the Windows-support port. * * `git` and `gh` are native executables found on PATH on every platform. * `hula`, however, is an npm bin that resolves to `hula.cmd` on Windows, which * `spawn` cannot launch without a shell. We sidestep that entirely by invoking * the CLI through `process.execPath` (the current Node binary) + the CLI entry * file ({@link cliEntry}), which is exactly the module already running. */ export interface ExecResult { stdout: string; stderr: string; /** Process exit code (0 on success). 127 when the binary could not spawn. */ code: number; } export interface ExecOptions { cwd?: string; /** Optional string written to the child's stdin, then closed. */ input?: string; } /** * Spawn `file` with `args` (no shell) and capture stdout/stderr/exit code. * Never rejects: a spawn error resolves to `code: 127` so callers branch on the * exit code exactly as the bash scripts did with `|| die`. */ export declare function execCapture(file: string, args: string[], options?: ExecOptions): Promise; /** Run `git` with the given args. */ export declare function runGit(args: string[], options?: ExecOptions): Promise; /** Run the GitHub CLI (`gh`) with the given args. */ export declare function runGh(args: string[], options?: ExecOptions): Promise; /** * Resolve the path to the running hula CLI entry (`dist/index.js`). This is the * second element of `process.argv` when invoked via the `hula` bin. Falls back * to an empty string only in the pathological case where argv[1] is missing. */ export declare function cliEntry(): string; /** * Invoke a hula CLI subcommand (`hula `) cross-platform by running the * current Node binary against the CLI entry file, avoiding the Windows * `hula.cmd` spawn problem. Captures stdout/stderr/exit code. */ export declare function runHula(args: string[], options?: ExecOptions): Promise; //# sourceMappingURL=exec.d.ts.map