import { spawnSync } from "node:child_process";
const COMMAND_OUTPUT_MAX_BUFFER = 50 * 1024 * 1024;
export const defaultCommandRunner = (command, args, options = {}) => {
    const result = spawnSync(command, args, {
        cwd: options.cwd,
        input: options.input,
        encoding: "utf-8",
        maxBuffer: COMMAND_OUTPUT_MAX_BUFFER
    });
    return {
        code: result.status ?? 1,
        stdout: result.stdout ?? "",
        stderr: result.stderr ?? ""
    };
};
