@blaxel/core 0.2.86-preview.161 → 0.2.86-preview.164

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,8 +5,8 @@ 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.86-preview.161";
9
- const BUILD_COMMIT = "a5bdac720290868983bb67563ff7068c1cf8c67f";
8
+ const BUILD_VERSION = "0.2.86-preview.164";
9
+ const BUILD_COMMIT = "d9d635adf523ed2bcc4fb6edf77c00eeff759ea0";
10
10
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
11
11
  const BLAXEL_API_VERSION = "2026-04-16";
12
12
  // Cache for config.yaml tracking value
@@ -273,6 +273,17 @@ export class SandboxInstance {
273
273
  const instance = new SandboxInstance(data);
274
274
  return SandboxInstance.attachH2Session(instance);
275
275
  }
276
+ static async updateNetwork(sandboxName, network) {
277
+ const sandbox = await SandboxInstance.get(sandboxName);
278
+ const body = { ...sandbox.sandbox, spec: { ...sandbox.spec, network: network.network } };
279
+ const { data } = await updateSandbox({
280
+ path: { sandboxName },
281
+ body,
282
+ throwOnError: true,
283
+ });
284
+ const instance = new SandboxInstance(data);
285
+ return SandboxInstance.attachH2Session(instance);
286
+ }
276
287
  static async createIfNotExists(sandbox) {
277
288
  const ATTEMPTS = 3;
278
289
  for (let i = 0; i < ATTEMPTS; ++i) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.86-preview.161",
3
+ "version": "0.2.86-preview.164",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",