@blaxel/core 0.3.12-preview.256 → 0.3.12-preview.257
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/process/process.js +1 -1
- package/dist/cjs/sandbox/process/process.test.js +18 -0
- package/dist/cjs/types/sandbox/process/process.test.d.ts +1 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/process/process.js +1 -1
- package/dist/cjs-browser/sandbox/process/process.test.js +18 -0
- package/dist/cjs-browser/types/sandbox/process/process.test.d.ts +1 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/process/process.js +1 -1
- package/dist/esm/sandbox/process/process.test.js +16 -0
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/process/process.js +1 -1
- package/dist/esm-browser/sandbox/process/process.test.js +16 -0
- package/package.json +1 -1
|
@@ -30,8 +30,8 @@ function missingCredentialsMessage() {
|
|
|
30
30
|
return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
|
|
31
31
|
}
|
|
32
32
|
// Build info - these placeholders are replaced at build time by build:replace-imports
|
|
33
|
-
const BUILD_VERSION = "0.3.12-preview.
|
|
34
|
-
const BUILD_COMMIT = "
|
|
33
|
+
const BUILD_VERSION = "0.3.12-preview.257";
|
|
34
|
+
const BUILD_COMMIT = "f392945b2dc2c235fb84ddcd636910e4e3604d33";
|
|
35
35
|
const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
|
|
36
36
|
const BLAXEL_API_VERSION = "2026-04-28";
|
|
37
37
|
// Bun < 1.3.11 never sends connection-level WINDOW_UPDATE: the pooled h2
|
|
@@ -285,8 +285,8 @@ class SandboxProcess extends action_js_1.SandboxAction {
|
|
|
285
285
|
}
|
|
286
286
|
async wait(identifier, { maxWait = 60000, interval = 1000 } = {}) {
|
|
287
287
|
const startTime = Date.now();
|
|
288
|
-
let status = "running";
|
|
289
288
|
let data = await this.get(identifier);
|
|
289
|
+
let status = data.status ?? "running";
|
|
290
290
|
while (status === "running") {
|
|
291
291
|
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
292
292
|
try {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const process_js_1 = require("./process.js");
|
|
5
|
+
(0, vitest_1.describe)("SandboxProcess.wait", () => {
|
|
6
|
+
(0, vitest_1.afterEach)(() => {
|
|
7
|
+
vitest_1.vi.useRealTimers();
|
|
8
|
+
});
|
|
9
|
+
(0, vitest_1.it)("returns immediately when the initial status is terminal", async () => {
|
|
10
|
+
vitest_1.vi.useFakeTimers();
|
|
11
|
+
const process = Object.create(process_js_1.SandboxProcess.prototype);
|
|
12
|
+
const completed = { status: "completed" };
|
|
13
|
+
const get = vitest_1.vi.spyOn(process, "get").mockResolvedValue(completed);
|
|
14
|
+
await (0, vitest_1.expect)(process.wait("process-id", { interval: 5000 })).resolves.toBe(completed);
|
|
15
|
+
(0, vitest_1.expect)(get).toHaveBeenCalledTimes(1);
|
|
16
|
+
(0, vitest_1.expect)(vitest_1.vi.getTimerCount()).toBe(0);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|