@blaxel/core 0.2.92 → 0.2.93
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 +14 -3
- package/dist/cjs/types/sandbox/sandbox.d.ts +4 -1
- package/dist/cjs/types/sandbox/types.d.ts +2 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/sandbox.js +14 -3
- package/dist/cjs-browser/types/sandbox/sandbox.d.ts +4 -1
- package/dist/cjs-browser/types/sandbox/types.d.ts +2 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/sandbox.js +15 -4
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/sandbox.js +15 -4
- package/package.json +1 -1
|
@@ -22,8 +22,8 @@ function missingCredentialsMessage() {
|
|
|
22
22
|
return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
|
|
23
23
|
}
|
|
24
24
|
// Build info - these placeholders are replaced at build time by build:replace-imports
|
|
25
|
-
const BUILD_VERSION = "0.2.
|
|
26
|
-
const BUILD_COMMIT = "
|
|
25
|
+
const BUILD_VERSION = "0.2.93";
|
|
26
|
+
const BUILD_COMMIT = "4533be458ecf975dd86214dda3bf9a64b34ed64f";
|
|
27
27
|
const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
|
|
28
28
|
const BLAXEL_API_VERSION = "2026-04-16";
|
|
29
29
|
// Cache for config.yaml tracking value
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from "uuid";
|
|
2
|
-
import { createSandbox, deleteSandbox, getSandbox, listSandboxes, updateSandbox } from "../client/index.js";
|
|
2
|
+
import { createSandbox, deleteSandbox, getSandbox, getSandboxByExternalId, listSandboxes, updateSandbox } from "../client/index.js";
|
|
3
3
|
import { logger } from "../common/logger.js";
|
|
4
4
|
import { settings } from "../common/settings.js";
|
|
5
5
|
import { SandboxCodegen } from "./codegen/index.js";
|
|
@@ -160,7 +160,7 @@ export class SandboxInstance {
|
|
|
160
160
|
const snapshotEnabled = sandbox.snapshotEnabled;
|
|
161
161
|
const extraArgs = sandbox.extraArgs;
|
|
162
162
|
sandbox = {
|
|
163
|
-
metadata: { name: sandbox.name, labels: sandbox.labels },
|
|
163
|
+
metadata: { name: sandbox.name, labels: sandbox.labels, externalId: sandbox.externalId },
|
|
164
164
|
spec: {
|
|
165
165
|
region: region,
|
|
166
166
|
runtime: {
|
|
@@ -236,8 +236,19 @@ export class SandboxInstance {
|
|
|
236
236
|
const instance = new SandboxInstance(data);
|
|
237
237
|
return SandboxInstance.attachH2Session(instance);
|
|
238
238
|
}
|
|
239
|
-
static async
|
|
240
|
-
const { data
|
|
239
|
+
static async getByExternalId(externalId) {
|
|
240
|
+
const { data } = await getSandboxByExternalId({
|
|
241
|
+
path: { externalId },
|
|
242
|
+
throwOnError: true,
|
|
243
|
+
});
|
|
244
|
+
const instance = new SandboxInstance(data);
|
|
245
|
+
return SandboxInstance.attachH2Session(instance);
|
|
246
|
+
}
|
|
247
|
+
static async list({ externalId } = {}) {
|
|
248
|
+
const { data: raw } = await listSandboxes({
|
|
249
|
+
query: externalId ? { externalId } : undefined,
|
|
250
|
+
throwOnError: true,
|
|
251
|
+
});
|
|
241
252
|
const items = (Array.isArray(raw) ? raw : (raw?.data ?? []));
|
|
242
253
|
const instances = items.map((sb) => new SandboxInstance(sb));
|
|
243
254
|
if (!settings.disableH2) {
|