gbox-sdk
    Preparing search index...

    Interface BoxRunCodeParams

    interface BoxRunCodeParams {
        argv?: string[];
        code: string;
        envs?: unknown;
        language?: "bash" | "python" | "typescript";
        timeout?: string;
        workingDir?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    argv?: string[]

    The arguments to run the code. For example, if you want to run "python index.py --help", you should pass ["--help"] as arguments.

    code: string

    The code to run

    envs?: unknown

    The environment variables to run the code

    language?: "bash" | "python" | "typescript"

    The language of the code.

    timeout?: string

    The timeout of the code execution. If the code execution times out, the exit code will be 124.

    Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: "500ms", "30s", "5m", "1h" Default: 30s

    workingDir?: string

    The working directory of the code. It not provided, the code will be run in the box.config.workingDir directory.