@blaxel/core 0.2.60 → 0.2.61-preview.52
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/sandbox.js +22 -0
- package/dist/cjs/types/sandbox/sandbox.d.ts +3 -1
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/sandbox.js +22 -0
- package/dist/cjs-browser/types/sandbox/sandbox.d.ts +3 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/sandbox.js +22 -0
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/sandbox.js +22 -0
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import { authentication } from "../authentication/index.js";
|
|
|
3
3
|
import { env } from "../common/env.js";
|
|
4
4
|
import { fs, os, path } from "../common/node.js";
|
|
5
5
|
// Build info - these placeholders are replaced at build time by build:replace-imports
|
|
6
|
-
const BUILD_VERSION = "0.2.
|
|
7
|
-
const BUILD_COMMIT = "
|
|
6
|
+
const BUILD_VERSION = "0.2.61-preview.52";
|
|
7
|
+
const BUILD_COMMIT = "1b7ead8676a6fb9ef62cc059e829f394b2e3ecda";
|
|
8
8
|
const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
|
|
9
9
|
// Cache for config.yaml tracking value
|
|
10
10
|
let configTrackingValue = null;
|
|
@@ -158,6 +158,28 @@ export class SandboxInstance {
|
|
|
158
158
|
const instance = new SandboxInstance(data);
|
|
159
159
|
return instance;
|
|
160
160
|
}
|
|
161
|
+
static async updateTTL(sandboxName, ttl) {
|
|
162
|
+
const sandbox = await SandboxInstance.get(sandboxName);
|
|
163
|
+
const body = { ...sandbox.sandbox, spec: { ...sandbox.spec, runtime: { ...sandbox.spec.runtime, ttl } } };
|
|
164
|
+
const { data } = await updateSandbox({
|
|
165
|
+
path: { sandboxName },
|
|
166
|
+
body,
|
|
167
|
+
throwOnError: true,
|
|
168
|
+
});
|
|
169
|
+
const instance = new SandboxInstance(data);
|
|
170
|
+
return instance;
|
|
171
|
+
}
|
|
172
|
+
static async updateLifecycle(sandboxName, lifecycle) {
|
|
173
|
+
const sandbox = await SandboxInstance.get(sandboxName);
|
|
174
|
+
const body = { ...sandbox.sandbox, spec: { ...sandbox.spec, lifecycle } };
|
|
175
|
+
const { data } = await updateSandbox({
|
|
176
|
+
path: { sandboxName },
|
|
177
|
+
body,
|
|
178
|
+
throwOnError: true,
|
|
179
|
+
});
|
|
180
|
+
const instance = new SandboxInstance(data);
|
|
181
|
+
return instance;
|
|
182
|
+
}
|
|
161
183
|
static async createIfNotExists(sandbox) {
|
|
162
184
|
try {
|
|
163
185
|
return await SandboxInstance.create(sandbox);
|