@blaxel/core 0.3.20-preview.286 → 0.3.20-preview.288

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.
@@ -0,0 +1,39 @@
1
+ import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
2
+ import { tmpdir } from "node:os";
3
+ import { join } from "node:path";
4
+ import toml from "toml";
5
+ import { afterEach, describe, expect, it, vi } from "vitest";
6
+ const originalCwd = process.cwd();
7
+ let currentTempDir;
8
+ const importEnvFromTempConfig = async (config) => {
9
+ currentTempDir = mkdtempSync(join(tmpdir(), "blaxel-env-"));
10
+ writeFileSync(join(currentTempDir, "blaxel.toml"), config);
11
+ process.chdir(currentTempDir);
12
+ vi.resetModules();
13
+ return import("./env.js");
14
+ };
15
+ afterEach(() => {
16
+ process.chdir(originalCwd);
17
+ vi.resetModules();
18
+ if (currentTempDir) {
19
+ rmSync(currentTempDir, { force: true, recursive: true });
20
+ currentTempDir = undefined;
21
+ }
22
+ });
23
+ describe("env TOML configuration", () => {
24
+ it("loads blaxel.toml env values through the SDK env proxy", async () => {
25
+ const { env } = await importEnvFromTempConfig(`
26
+ [env]
27
+ BL_WORKSPACE = "test-workspace"
28
+ BL_API_URL = "https://api.example.test"
29
+ `);
30
+ expect(env.BL_WORKSPACE).toBe("test-workspace");
31
+ expect(env.BL_API_URL).toBe("https://api.example.test");
32
+ });
33
+ it("uses the bounded TOML parser introduced in toml 4.2.0", () => {
34
+ const nestedArray = `value = ${"[".repeat(10)}0${"]".repeat(10)}`;
35
+ expect(() => {
36
+ toml.parse(nestedArray, { maxDepth: 5 });
37
+ }).toThrow(/Maximum nesting depth of 5 exceeded/);
38
+ });
39
+ });
@@ -24,8 +24,8 @@ function missingCredentialsMessage() {
24
24
  return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
25
25
  }
26
26
  // Build info - these placeholders are replaced at build time by build:replace-imports
27
- const BUILD_VERSION = "0.3.20-preview.286";
28
- const BUILD_COMMIT = "6ebbd206e01759209b37771835096c6500d9fbb9";
27
+ const BUILD_VERSION = "0.3.20-preview.288";
28
+ const BUILD_COMMIT = "7691d8c5e7547a821cdf3837fa455b5ba081cc80";
29
29
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
30
30
  const BLAXEL_API_VERSION = "2026-04-28";
31
31
  // Bun < 1.3.11 never sends connection-level WINDOW_UPDATE: the pooled h2