@basetenlabs/sandbox - v0.3.0
    Preparing search index...

    Interface SandboxProcessExecRequest

    Request for SandboxProcess.exec.

    interface SandboxProcessExecRequest {
        callOptions?: CallOptions;
        command: string;
        env?: Record<string, string>;
        keepAlive?: boolean;
        maxRestarts?: number;
        name?: string;
        restartOnFailure?: boolean;
        stdin?: boolean;
        timeoutMs?: number;
        waitForCompletion?: boolean;
        waitForPorts?: number[];
        workingDir?: string;
    }

    Hierarchy (View Summary)

    Index
    callOptions?: CallOptions
    command: string

    Shell command to run.

    env?: Record<string, string>

    Environment variables for the process, on top of the sandbox's own.

    keepAlive?: boolean

    Disable scale-to-zero while the process runs.

    maxRestarts?: number

    Maximum number of restarts on failure. A negative value, such as -1, means unlimited.

    name?: string

    Name to refer to the process by, instead of its pid.

    restartOnFailure?: boolean

    Whether to restart the process when it fails.

    stdin?: boolean

    Open a writable stdin pipe, fed by SandboxProcess.writeStdin and closed by SandboxProcess.closeStdin. The pipe does not survive a restart of the sandbox's execution API: the process then reads end of file.

    timeoutMs?: number

    Milliseconds after which the process is killed, rounded up to whole seconds. 0 means never. When keepAlive is true, defaults to 600s.

    waitForCompletion?: boolean

    Whether to return only once the process has exited. Defaults to false.

    waitForPorts?: number[]

    Ports the process must be listening on before the call returns.

    workingDir?: string

    Directory to run the command in.