Commands
Module for starting and interacting with commands in the sandbox.Constructors
Parameters
Returns
Commands
Methods
connect()
Parameters
Returns
Promise<CommandHandle>
CommandHandle handle to interact with the running command.
kill()
SIGKILL signal to kill the command.
Parameters
Returns
Promise<boolean>
true if the command was killed, false if the command was not found.
list()
Parameters
Returns
Promise<ProcessInfo[]>
list of running commands and PTY sessions.
run()
run(cmd, opts)
Parameters
Returns
Promise<CommandResult>
CommandResult result of the command execution.
run(cmd, opts)
Parameters
Returns
Promise<CommandHandle>
CommandHandle handle to interact with the running command.
run(cmd, opts)
Parameters
Returns
Promise<CommandResult | CommandHandle>
Either a CommandHandle or a CommandResult (depending on opts.background).
sendStdin()
Parameters
Returns
Promise<void>
Pty
Module for interacting with PTYs (pseudo-terminals) in the sandbox.Constructors
Parameters
Returns
Pty
Methods
create()
Parameters
Returns
Promise<CommandHandle>
handle to interact with the PTY.
kill()
SIGKILL signal to kill the PTY.
Parameters
Returns
Promise<boolean>
true if the PTY was killed, false if the PTY was not found.
resize()
Parameters
Returns
Promise<void>
sendInput()
Parameters
Returns
Promise<void>
Interfaces
CommandRequestOpts
Options for sending a command request.Extended by
CommandStartOpts
Properties
requestTimeoutMs?
Default
CommandStartOpts
Options for starting a new command.Properties
background?
cwd?
Default
envs?
Sandbox constructor.
Default
{}
onStderr()?
Parameters
Returns
void | Promise<void>
onStdout()?
Parameters
Returns
void | Promise<void>
requestTimeoutMs?
Default
stdin?
Default
timeoutMs?
Default
user?
Default
default Sandbox user (as specified in the template)