@blaxel/core 0.2.58-preview.36 → 0.2.58-preview.38

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.
@@ -3,8 +3,8 @@ import { authentication } from "../authentication/index.js";
3
3
  import { env } from "../common/env.js";
4
4
  import { fs, os, path } from "../common/node.js";
5
5
  // Build info - these placeholders are replaced at build time by build:replace-imports
6
- const BUILD_VERSION = "0.2.58-preview.36";
7
- const BUILD_COMMIT = "0cf9ba6b18ba78fccfe4d63c43c0a236b6579b2e";
6
+ const BUILD_VERSION = "0.2.58-preview.38";
7
+ const BUILD_COMMIT = "93a29943462a643799e23188c87d89e2c2cc133f";
8
8
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
9
9
  // Cache for config.yaml tracking value
10
10
  let configTrackingValue = null;
@@ -145,6 +145,9 @@ export class SandboxInstance {
145
145
  });
146
146
  return data;
147
147
  }
148
+ async delete() {
149
+ return await SandboxInstance.delete(this.metadata?.name);
150
+ }
148
151
  static async updateMetadata(sandboxName, metadata) {
149
152
  const sandbox = await SandboxInstance.get(sandboxName);
150
153
  const body = { ...sandbox.sandbox, metadata: { ...sandbox.metadata, ...metadata } };
@@ -41,7 +41,8 @@ export class VolumeInstance {
41
41
  volume = {
42
42
  metadata: {
43
43
  name: volumeConfig.name || defaultName,
44
- displayName: volumeConfig.displayName || volumeConfig.name || defaultName
44
+ displayName: volumeConfig.displayName || volumeConfig.name || defaultName,
45
+ labels: volumeConfig.labels
45
46
  },
46
47
  spec: {
47
48
  size: volumeConfig.size || defaultSize,
@@ -91,6 +92,9 @@ export class VolumeInstance {
91
92
  });
92
93
  return data;
93
94
  }
95
+ async delete() {
96
+ return await VolumeInstance.delete(this.metadata?.name ?? "");
97
+ }
94
98
  static async createIfNotExists(config) {
95
99
  try {
96
100
  return await VolumeInstance.create(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.58-preview.36",
3
+ "version": "0.2.58-preview.38",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",