@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
|
@@ -28,8 +28,8 @@ function missingCredentialsMessage() {
|
|
|
28
28
|
return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
|
|
29
29
|
}
|
|
30
30
|
// Build info - these placeholders are replaced at build time by build:replace-imports
|
|
31
|
-
const BUILD_VERSION = "0.2.
|
|
32
|
-
const BUILD_COMMIT = "
|
|
31
|
+
const BUILD_VERSION = "0.2.93";
|
|
32
|
+
const BUILD_COMMIT = "4533be458ecf975dd86214dda3bf9a64b34ed64f";
|
|
33
33
|
const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
|
|
34
34
|
const BLAXEL_API_VERSION = "2026-04-16";
|
|
35
35
|
// Cache for config.yaml tracking value
|
|
@@ -196,7 +196,7 @@ class SandboxInstance {
|
|
|
196
196
|
const snapshotEnabled = sandbox.snapshotEnabled;
|
|
197
197
|
const extraArgs = sandbox.extraArgs;
|
|
198
198
|
sandbox = {
|
|
199
|
-
metadata: { name: sandbox.name, labels: sandbox.labels },
|
|
199
|
+
metadata: { name: sandbox.name, labels: sandbox.labels, externalId: sandbox.externalId },
|
|
200
200
|
spec: {
|
|
201
201
|
region: region,
|
|
202
202
|
runtime: {
|
|
@@ -272,8 +272,19 @@ class SandboxInstance {
|
|
|
272
272
|
const instance = new SandboxInstance(data);
|
|
273
273
|
return SandboxInstance.attachH2Session(instance);
|
|
274
274
|
}
|
|
275
|
-
static async
|
|
276
|
-
const { data
|
|
275
|
+
static async getByExternalId(externalId) {
|
|
276
|
+
const { data } = await (0, index_js_1.getSandboxByExternalId)({
|
|
277
|
+
path: { externalId },
|
|
278
|
+
throwOnError: true,
|
|
279
|
+
});
|
|
280
|
+
const instance = new SandboxInstance(data);
|
|
281
|
+
return SandboxInstance.attachH2Session(instance);
|
|
282
|
+
}
|
|
283
|
+
static async list({ externalId } = {}) {
|
|
284
|
+
const { data: raw } = await (0, index_js_1.listSandboxes)({
|
|
285
|
+
query: externalId ? { externalId } : undefined,
|
|
286
|
+
throwOnError: true,
|
|
287
|
+
});
|
|
277
288
|
const items = (Array.isArray(raw) ? raw : (raw?.data ?? []));
|
|
278
289
|
const instances = items.map((sb) => new SandboxInstance(sb));
|
|
279
290
|
if (!settings_js_1.settings.disableH2) {
|
|
@@ -51,7 +51,10 @@ export declare class SandboxInstance {
|
|
|
51
51
|
createIfNotExist?: boolean;
|
|
52
52
|
}): Promise<SandboxInstance>;
|
|
53
53
|
static get(sandboxName: string): Promise<SandboxInstance>;
|
|
54
|
-
static
|
|
54
|
+
static getByExternalId(externalId: string): Promise<SandboxInstance>;
|
|
55
|
+
static list({ externalId }?: {
|
|
56
|
+
externalId?: string;
|
|
57
|
+
}): Promise<SandboxInstance[]>;
|
|
55
58
|
static delete(sandboxName: string): Promise<SandboxModel>;
|
|
56
59
|
delete(): Promise<SandboxModel>;
|
|
57
60
|
static updateMetadata(sandboxName: string, metadata: SandboxUpdateMetadata): Promise<SandboxInstance>;
|
|
@@ -31,6 +31,7 @@ export type SandboxConfiguration = {
|
|
|
31
31
|
export type SandboxUpdateMetadata = {
|
|
32
32
|
labels?: Record<string, string>;
|
|
33
33
|
displayName?: string;
|
|
34
|
+
externalId?: string;
|
|
34
35
|
};
|
|
35
36
|
export type SandboxUpdateNetwork = {
|
|
36
37
|
network?: SandboxNetwork;
|
|
@@ -50,6 +51,7 @@ export type SandboxCreateConfiguration = {
|
|
|
50
51
|
snapshotEnabled?: boolean;
|
|
51
52
|
labels?: Record<string, string>;
|
|
52
53
|
extraArgs?: Record<string, string>;
|
|
54
|
+
externalId?: string;
|
|
53
55
|
};
|
|
54
56
|
export declare function normalizePorts(ports?: (Port | Record<string, any>)[]): Port[] | undefined;
|
|
55
57
|
export declare function normalizeEnvs(envs?: EnvVar[]): EnvVar[] | undefined;
|