@blaxel/core 0.2.90-preview.183 → 0.2.91-preview.185
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 +28 -2
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/sandbox.js +28 -2
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/sandbox.js +28 -2
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/sandbox.js +28 -2
- 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.91-preview.185";
|
|
32
|
+
const BUILD_COMMIT = "cdff025b5376324a557208ede9a2794aeeeff785";
|
|
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
|
|
@@ -274,8 +274,34 @@ class SandboxInstance {
|
|
|
274
274
|
}
|
|
275
275
|
static async list() {
|
|
276
276
|
const { data } = await (0, index_js_1.listSandboxes)({ throwOnError: true });
|
|
277
|
-
const instances = data.map((
|
|
278
|
-
|
|
277
|
+
const instances = data.map((sb) => new SandboxInstance(sb));
|
|
278
|
+
if (!settings_js_1.settings.disableH2) {
|
|
279
|
+
const { h2Pool } = await Promise.resolve().then(() => __importStar(require("../common/h2pool.js")));
|
|
280
|
+
const uniqueDomains = [
|
|
281
|
+
...new Set(instances
|
|
282
|
+
.map((i) => SandboxInstance.edgeDomainForRegion(i.spec?.region))
|
|
283
|
+
.filter((d) => d !== null)),
|
|
284
|
+
];
|
|
285
|
+
const sessionByDomain = new Map();
|
|
286
|
+
await Promise.all(uniqueDomains.map(async (domain) => {
|
|
287
|
+
try {
|
|
288
|
+
sessionByDomain.set(domain, await h2Pool.get(domain));
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
sessionByDomain.set(domain, null);
|
|
292
|
+
}
|
|
293
|
+
}));
|
|
294
|
+
for (const instance of instances) {
|
|
295
|
+
const domain = SandboxInstance.edgeDomainForRegion(instance.spec?.region);
|
|
296
|
+
if (domain) {
|
|
297
|
+
const session = sessionByDomain.get(domain) ?? null;
|
|
298
|
+
instance.h2Session = session;
|
|
299
|
+
instance.sandbox.h2Session = session;
|
|
300
|
+
instance.sandbox.h2Domain = domain;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return instances;
|
|
279
305
|
}
|
|
280
306
|
static async delete(sandboxName) {
|
|
281
307
|
const { data } = await (0, index_js_1.deleteSandbox)({
|