@blaxel/core 0.2.81 → 0.2.82-preview.146

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.
@@ -5,9 +5,10 @@ import { authentication } from "../authentication/index.js";
5
5
  import { env } from "../common/env.js";
6
6
  import { fs, os, path } from "../common/node.js";
7
7
  // Build info - these placeholders are replaced at build time by build:replace-imports
8
- const BUILD_VERSION = "0.2.81";
9
- const BUILD_COMMIT = "e2dfc37c711becd7d0262c6cb7b566301dc35d71";
8
+ const BUILD_VERSION = "0.2.82-preview.146";
9
+ const BUILD_COMMIT = "bd1f2f080c52d701b0dcbcccd73d139be5740ef2";
10
10
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
11
+ const BLAXEL_API_VERSION = "2026-04-16";
11
12
  // Cache for config.yaml tracking value
12
13
  let configTrackingValue = null;
13
14
  let configTrackingLoaded = false;
@@ -158,11 +159,15 @@ class Settings {
158
159
  get sentryDsn() {
159
160
  return BUILD_SENTRY_DSN || "";
160
161
  }
162
+ get apiVersion() {
163
+ return env.BL_API_VERSION || BLAXEL_API_VERSION;
164
+ }
161
165
  get headers() {
162
166
  const osArch = getOsArch();
163
167
  return {
164
168
  "x-blaxel-authorization": this.authorization,
165
169
  "x-blaxel-workspace": this.workspace || "",
170
+ "Blaxel-Version": this.apiVersion,
166
171
  "User-Agent": `blaxel/sdk/typescript/${this.version} (${osArch}) blaxel/${this.commit}`,
167
172
  };
168
173
  }
@@ -0,0 +1,20 @@
1
+ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
2
+ import { env } from './env.js';
3
+ describe('Settings.apiVersion', () => {
4
+ beforeEach(() => {
5
+ // Reset the module-level settings singleton between tests if needed
6
+ });
7
+ afterEach(() => {
8
+ delete env.BL_API_VERSION;
9
+ });
10
+ it('defaults to 2026-04-16 when BL_API_VERSION is not set', async () => {
11
+ delete env.BL_API_VERSION;
12
+ const { settings } = await import('./settings.js');
13
+ expect(settings.apiVersion).toBe('2026-04-16');
14
+ });
15
+ it('headers include Blaxel-Version set to the default', async () => {
16
+ delete env.BL_API_VERSION;
17
+ const { settings } = await import('./settings.js');
18
+ expect(settings.headers['Blaxel-Version']).toBe('2026-04-16');
19
+ });
20
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.81",
3
+ "version": "0.2.82-preview.146",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",