Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"exports": "./main.ts",
"imports": {
"@cfa/gitignore-parser": "jsr:@cfa/gitignore-parser@^0.1.4",
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.8",
"@cliffy/command": "jsr:@cliffy/command@^1.0.0",
"@deno/sandbox": "jsr:@deno/sandbox@^0.10.0",
"@std/assert": "jsr:@std/assert@^1.0.16",
"@std/async": "jsr:@std/async@^1.1.0",
Expand Down
56 changes: 30 additions & 26 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions sandbox/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ export const sandboxListCommand = new Command<SandboxContext>()

export const sandboxKillCommand = new Command<SandboxContext>()
.description("Kill a running sandbox")
.arguments("<sandbox-id:string>")
.argument("<sandbox-id:string>", "The id of the sandbox", {
default: Deno.env.get("SANDBOX_ID"),
})
.action(actionHandler(async (config, options, sandboxId) => {
config.noCreate();
const org = await getOrg(options, config, options.org);
Expand All @@ -257,7 +259,9 @@ export const sandboxKillCommand = new Command<SandboxContext>()

export const sandboxSshCommand = new Command<SandboxContext>()
.description("SSH into a running sandbox")
.arguments("<sandbox-id:string>")
.argument("<sandbox-id:string>", "The id of the sandbox", {
default: Deno.env.get("SANDBOX_ID"),
})
.action(actionHandler(async (config, options, sandboxId) => {
config.noCreate();
await using sandbox = await connectToSandbox(options, config, sandboxId);
Expand Down Expand Up @@ -433,7 +437,10 @@ export const sandboxExecCommand = new Command<SandboxContext>()
)
.option("-q, --quiet", "Don't pipe the command to the console")
.option("--cwd <path:string>", "Working directory of the command")
.arguments("<sandbox-id:string> <command...:string>")
.argument("<sandbox-id:string>", "The id of the sandbox", {
default: Deno.env.get("SANDBOX_ID"),
})
.arguments("<command...:string>")
.action(
actionHandler(async function (config, options, sandboxId, ...command) {
config.noCreate();
Expand Down Expand Up @@ -461,7 +468,10 @@ export const sandboxExecCommand = new Command<SandboxContext>()

export const sandboxExtendCommand = new Command<SandboxContext>()
.description("Extend the timeout of a running sandbox")
.arguments("<sandbox-id:string> <timeout:string>")
.argument("<sandbox-id:string>", "The id of the sandbox", {
default: Deno.env.get("SANDBOX_ID"),
})
.argument("<timeout:string>", "The amount to extend the timeout by")
.action(actionHandler(async (config, options, sandboxId, timeout) => {
config.noCreate();
await using sandbox = await connectToSandbox(options, config, sandboxId);
Expand All @@ -479,7 +489,10 @@ export const sandboxDeployCommand = new Command<SandboxContext>()
"--args <args...:string>",
"Arguments to pass to the entrypoint script",
)
.arguments("<sandbox-id:string> <app:string>")
.argument("<sandbox-id:string>", "The id of the sandbox", {
default: Deno.env.get("SANDBOX_ID"),
})
.argument("<app:string>", "The app to deploy to")
.action(actionHandler(async (config, options, sandboxId, app) => {
config.noCreate();
await using sandbox = await connectToSandbox(options, config, sandboxId);
Expand Down