tensorlake 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/darwin-arm64/tensorlake +0 -0
- package/dist/bin/darwin-arm64/tl +0 -0
- package/dist/bin/linux-x64/tensorlake +0 -0
- package/dist/bin/linux-x64/tl +0 -0
- package/dist/bin/win32-x64/tensorlake.exe +0 -0
- package/dist/bin/win32-x64/tl.exe +0 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-B0WMhyoM.d.cts → sandbox-image-BmhjX2bC.d.cts} +22 -12
- package/dist/{sandbox-image-B0WMhyoM.d.ts → sandbox-image-BmhjX2bC.d.ts} +22 -12
- package/dist/sandbox-image.cjs +8 -8
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.d.cts +1 -1
- package/dist/sandbox-image.d.ts +1 -1
- package/dist/sandbox-image.js +8 -8
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +1 -1
|
Binary file
|
package/dist/bin/darwin-arm64/tl
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/bin/linux-x64/tl
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -3358,13 +3358,13 @@ var init_sandbox = __esm({
|
|
|
3358
3358
|
async checkpoint(options) {
|
|
3359
3359
|
const client = this.requireLifecycleClient("checkpoint");
|
|
3360
3360
|
if (options?.wait === false) {
|
|
3361
|
-
await client.snapshot(this.lifecycleIdentifier, {
|
|
3361
|
+
await client.snapshot(this.lifecycleIdentifier, { snapshotType: options.checkpointType });
|
|
3362
3362
|
return void 0;
|
|
3363
3363
|
}
|
|
3364
3364
|
return client.snapshotAndWait(this.lifecycleIdentifier, {
|
|
3365
3365
|
timeout: options?.timeout,
|
|
3366
3366
|
pollInterval: options?.pollInterval,
|
|
3367
|
-
|
|
3367
|
+
snapshotType: options?.checkpointType
|
|
3368
3368
|
});
|
|
3369
3369
|
}
|
|
3370
3370
|
/**
|
|
@@ -4023,11 +4023,11 @@ var init_client = __esm({
|
|
|
4023
4023
|
* status — the snapshot is created asynchronously. Poll `getSnapshot()` until
|
|
4024
4024
|
* `completed` or `failed`, or use `snapshotAndWait()` to block automatically.
|
|
4025
4025
|
*
|
|
4026
|
-
* @param options.
|
|
4027
|
-
* Omit to use the server default (
|
|
4026
|
+
* @param options.snapshotType - `"filesystem"` for cold-boot snapshots (e.g. image builds).
|
|
4027
|
+
* Omit to use the server default (`filesystem`).
|
|
4028
4028
|
*/
|
|
4029
4029
|
async snapshot(sandboxId, options) {
|
|
4030
|
-
const requestOptions = options?.
|
|
4030
|
+
const requestOptions = options?.snapshotType != null ? { body: { snapshot_type: options.snapshotType } } : void 0;
|
|
4031
4031
|
const raw = await this.http.requestJson(
|
|
4032
4032
|
"POST",
|
|
4033
4033
|
this.path(`sandboxes/${sandboxId}/snapshot`),
|
|
@@ -4071,14 +4071,14 @@ var init_client = __esm({
|
|
|
4071
4071
|
* @param sandboxId - ID of the running sandbox to snapshot.
|
|
4072
4072
|
* @param options.timeout - Max seconds to wait (default 300).
|
|
4073
4073
|
* @param options.pollInterval - Seconds between status polls (default 1).
|
|
4074
|
-
* @param options.
|
|
4074
|
+
* @param options.snapshotType - Snapshot type passed through to `snapshot()`.
|
|
4075
4075
|
* @throws {SandboxError} If the snapshot fails or `timeout` elapses.
|
|
4076
4076
|
*/
|
|
4077
4077
|
async snapshotAndWait(sandboxId, options) {
|
|
4078
4078
|
const timeout = options?.timeout ?? 300;
|
|
4079
4079
|
const pollInterval = options?.pollInterval ?? 1;
|
|
4080
4080
|
const result = await this.snapshot(sandboxId, {
|
|
4081
|
-
|
|
4081
|
+
snapshotType: options?.snapshotType
|
|
4082
4082
|
});
|
|
4083
4083
|
const deadline = Date.now() + timeout * 1e3;
|
|
4084
4084
|
while (Date.now() < deadline) {
|
|
@@ -5070,7 +5070,7 @@ async function createSandboxImage(source, options = {}, deps = {}) {
|
|
|
5070
5070
|
await executeDockerfilePlan(sandbox, plan, emit, sleep3);
|
|
5071
5071
|
emit({ type: "status", message: "Creating snapshot..." });
|
|
5072
5072
|
const snapshot = await client.snapshotAndWait(sandbox.sandboxId, {
|
|
5073
|
-
|
|
5073
|
+
snapshotType: "filesystem"
|
|
5074
5074
|
});
|
|
5075
5075
|
emit({
|
|
5076
5076
|
type: "snapshot_created",
|