Skip to content

Commit 8cb481b

Browse files
authored
Merge branch 'main' into database-management
2 parents 5c9d59d + 783000a commit 8cb481b

4 files changed

Lines changed: 29 additions & 28 deletions

File tree

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"imports": {
1818
"@cfa/gitignore-parser": "jsr:@cfa/gitignore-parser@^0.1.4",
1919
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.8",
20-
"@deno/sandbox": "jsr:@deno/sandbox@^0.9.0",
20+
"@deno/sandbox": "jsr:@deno/sandbox@^0.10.0",
2121
"@std/assert": "jsr:@std/assert@^1.0.16",
2222
"@std/async": "jsr:@std/async@^1.1.0",
2323
"@std/cli": "jsr:@std/cli@1.0.26",

deno.lock

Lines changed: 22 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/mod.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export const sandboxCreateCommand = new Command<SandboxContext>()
4343
.option("--expose-http <port:number>", "Expose the specified port")
4444
.option("--memory <value:string>", "Memory limit for the sandbox")
4545
.option("--region <string>", "The region of the sandbox")
46+
.option(
47+
"--root <volumeOrSnapshot:string>",
48+
"A volume or snapshot to use as the root filesystem of the sandbox",
49+
)
4650
.option(
4751
"--volume <volume:string>",
4852
"Mount a volume to the sandbox. Needs to be in format <idOrSlug>:<path>",
@@ -94,6 +98,7 @@ export const sandboxCreateCommand = new Command<SandboxContext>()
9498
memory,
9599
volumes: options.volume,
96100
region: options.region as Region,
101+
root: options.root,
97102
});
98103
if (options.timeout === "session" || options.ssh) {
99104
console.log(`Created sandbox with id '${sandbox.id}'`);

sandbox/snapshot.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export const snapshotsListCommand = new Command<SandboxContext>()
3939

4040
const list = await client.snapshots.list({
4141
limit: 100,
42-
// @ts-ignore typings mismatch. remove comment once new version is released.
4342
search,
4443
});
4544

@@ -56,7 +55,7 @@ export const snapshotsListCommand = new Command<SandboxContext>()
5655
formatSize(snapshot.allocatedSize),
5756
formatSize(snapshot.flattenedSize),
5857
snapshot.isBootable.toString().toUpperCase(),
59-
snapshot.baseSnapshot?.slug ?? "",
58+
snapshot.volume.slug,
6059
];
6160
},
6261
);
@@ -75,7 +74,6 @@ export const snapshotsDeleteCommand = new Command<SandboxContext>()
7574
org,
7675
});
7776

78-
// @ts-ignore typings mismatch. remove comment once new version is released.
7977
await client.snapshots.delete(idOrSlug);
8078
await saveConfig();
8179
});

0 commit comments

Comments
 (0)