@blaxel/core 0.3.4 → 0.3.5
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 +3 -7
- package/dist/cjs/common/settings.test.js +18 -0
- package/dist/cjs/types/common/settings.d.ts +4 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +3 -7
- package/dist/cjs-browser/common/settings.test.js +18 -0
- package/dist/cjs-browser/types/common/settings.d.ts +4 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +3 -7
- package/dist/esm/common/settings.test.js +18 -0
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +3 -7
- package/dist/esm-browser/common/settings.test.js +18 -0
- 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.3.
|
|
32
|
-
const BUILD_COMMIT = "
|
|
31
|
+
const BUILD_VERSION = "0.3.5";
|
|
32
|
+
const BUILD_COMMIT = "2d81ed89ffd7cfef222c23b636999cee8cc91160";
|
|
33
33
|
const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
|
|
34
34
|
const BLAXEL_API_VERSION = "2026-04-28";
|
|
35
35
|
// Cache for config.yaml tracking value
|
|
@@ -89,10 +89,6 @@ function getOsArch() {
|
|
|
89
89
|
}
|
|
90
90
|
return "browser/unknown";
|
|
91
91
|
}
|
|
92
|
-
function isDenoRuntime() {
|
|
93
|
-
const runtime = globalThis;
|
|
94
|
-
return typeof runtime.Deno !== "undefined";
|
|
95
|
-
}
|
|
96
92
|
class Settings {
|
|
97
93
|
_credentials;
|
|
98
94
|
config;
|
|
@@ -248,7 +244,7 @@ class Settings {
|
|
|
248
244
|
if (value) {
|
|
249
245
|
return ["1", "true", "yes", "on"].includes(value.toLowerCase());
|
|
250
246
|
}
|
|
251
|
-
return
|
|
247
|
+
return true;
|
|
252
248
|
}
|
|
253
249
|
// Control-plane-only escape hatch: disables the control-plane H2 wrapper
|
|
254
250
|
// without affecting data-plane (edge) H2. `disableH2` is the global override
|
|
@@ -62,3 +62,21 @@ const env_js_1 = require("./env.js");
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
+
(0, vitest_1.describe)('Settings.disableH2', () => {
|
|
66
|
+
(0, vitest_1.afterEach)(async () => {
|
|
67
|
+
delete env_js_1.env.BL_DISABLE_H2;
|
|
68
|
+
const { settings } = await Promise.resolve().then(() => __importStar(require('./settings.js')));
|
|
69
|
+
delete settings.config.disableH2;
|
|
70
|
+
});
|
|
71
|
+
(0, vitest_1.it)('disables H2 by default', async () => {
|
|
72
|
+
delete env_js_1.env.BL_DISABLE_H2;
|
|
73
|
+
const { settings } = await Promise.resolve().then(() => __importStar(require('./settings.js')));
|
|
74
|
+
delete settings.config.disableH2;
|
|
75
|
+
(0, vitest_1.expect)(settings.disableH2).toBe(true);
|
|
76
|
+
});
|
|
77
|
+
(0, vitest_1.it)('allows H2 to be explicitly enabled', async () => {
|
|
78
|
+
const { settings } = await Promise.resolve().then(() => __importStar(require('./settings.js')));
|
|
79
|
+
settings.config.disableH2 = false;
|
|
80
|
+
(0, vitest_1.expect)(settings.disableH2).toBe(false);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
@@ -11,6 +11,10 @@ export type Config = {
|
|
|
11
11
|
proxy?: string;
|
|
12
12
|
apikey?: string;
|
|
13
13
|
workspace?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Disables the SDK-managed HTTP/2 transport. Defaults to `true`; set this to
|
|
16
|
+
* `false` (or `BL_DISABLE_H2=0`) to opt back into H2.
|
|
17
|
+
*/
|
|
14
18
|
disableH2?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* Disables only the control-plane HTTP/2 wrapper, leaving data-plane (edge)
|