tensorlake 0.5.3 → 0.5.4
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
package/dist/sandbox-image.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as CreateSandboxImageOptions, E as DockerfileBuildPlan, F as DockerfileInstruction, V as SandboxImageSource, Z as createSandboxImage, $ as defaultRegisteredName, a0 as loadDockerfilePlan, a1 as loadImagePlan, a2 as logicalDockerfileLines, a3 as runCreateSandboxImageCli } from './sandbox-image-BmhjX2bC.cjs';
|
package/dist/sandbox-image.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as CreateSandboxImageOptions, E as DockerfileBuildPlan, F as DockerfileInstruction, V as SandboxImageSource, Z as createSandboxImage, $ as defaultRegisteredName, a0 as loadDockerfilePlan, a1 as loadImagePlan, a2 as logicalDockerfileLines, a3 as runCreateSandboxImageCli } from './sandbox-image-BmhjX2bC.js';
|
package/dist/sandbox-image.js
CHANGED
|
@@ -3279,13 +3279,13 @@ var init_sandbox = __esm({
|
|
|
3279
3279
|
async checkpoint(options) {
|
|
3280
3280
|
const client = this.requireLifecycleClient("checkpoint");
|
|
3281
3281
|
if (options?.wait === false) {
|
|
3282
|
-
await client.snapshot(this.lifecycleIdentifier, {
|
|
3282
|
+
await client.snapshot(this.lifecycleIdentifier, { snapshotType: options.checkpointType });
|
|
3283
3283
|
return void 0;
|
|
3284
3284
|
}
|
|
3285
3285
|
return client.snapshotAndWait(this.lifecycleIdentifier, {
|
|
3286
3286
|
timeout: options?.timeout,
|
|
3287
3287
|
pollInterval: options?.pollInterval,
|
|
3288
|
-
|
|
3288
|
+
snapshotType: options?.checkpointType
|
|
3289
3289
|
});
|
|
3290
3290
|
}
|
|
3291
3291
|
/**
|
|
@@ -3944,11 +3944,11 @@ var init_client = __esm({
|
|
|
3944
3944
|
* status — the snapshot is created asynchronously. Poll `getSnapshot()` until
|
|
3945
3945
|
* `completed` or `failed`, or use `snapshotAndWait()` to block automatically.
|
|
3946
3946
|
*
|
|
3947
|
-
* @param options.
|
|
3948
|
-
* Omit to use the server default (
|
|
3947
|
+
* @param options.snapshotType - `"filesystem"` for cold-boot snapshots (e.g. image builds).
|
|
3948
|
+
* Omit to use the server default (`filesystem`).
|
|
3949
3949
|
*/
|
|
3950
3950
|
async snapshot(sandboxId, options) {
|
|
3951
|
-
const requestOptions = options?.
|
|
3951
|
+
const requestOptions = options?.snapshotType != null ? { body: { snapshot_type: options.snapshotType } } : void 0;
|
|
3952
3952
|
const raw = await this.http.requestJson(
|
|
3953
3953
|
"POST",
|
|
3954
3954
|
this.path(`sandboxes/${sandboxId}/snapshot`),
|
|
@@ -3992,14 +3992,14 @@ var init_client = __esm({
|
|
|
3992
3992
|
* @param sandboxId - ID of the running sandbox to snapshot.
|
|
3993
3993
|
* @param options.timeout - Max seconds to wait (default 300).
|
|
3994
3994
|
* @param options.pollInterval - Seconds between status polls (default 1).
|
|
3995
|
-
* @param options.
|
|
3995
|
+
* @param options.snapshotType - Snapshot type passed through to `snapshot()`.
|
|
3996
3996
|
* @throws {SandboxError} If the snapshot fails or `timeout` elapses.
|
|
3997
3997
|
*/
|
|
3998
3998
|
async snapshotAndWait(sandboxId, options) {
|
|
3999
3999
|
const timeout = options?.timeout ?? 300;
|
|
4000
4000
|
const pollInterval = options?.pollInterval ?? 1;
|
|
4001
4001
|
const result = await this.snapshot(sandboxId, {
|
|
4002
|
-
|
|
4002
|
+
snapshotType: options?.snapshotType
|
|
4003
4003
|
});
|
|
4004
4004
|
const deadline = Date.now() + timeout * 1e3;
|
|
4005
4005
|
while (Date.now() < deadline) {
|
|
@@ -4891,7 +4891,7 @@ async function createSandboxImage(source, options = {}, deps = {}) {
|
|
|
4891
4891
|
await executeDockerfilePlan(sandbox, plan, emit, sleep3);
|
|
4892
4892
|
emit({ type: "status", message: "Creating snapshot..." });
|
|
4893
4893
|
const snapshot = await client.snapshotAndWait(sandbox.sandboxId, {
|
|
4894
|
-
|
|
4894
|
+
snapshotType: "filesystem"
|
|
4895
4895
|
});
|
|
4896
4896
|
emit({
|
|
4897
4897
|
type: "snapshot_created",
|