@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.
@@ -9,8 +9,8 @@ const index_js_1 = require("../authentication/index.js");
9
9
  const env_js_1 = require("../common/env.js");
10
10
  const node_js_1 = require("../common/node.js");
11
11
  // Build info - these placeholders are replaced at build time by build:replace-imports
12
- const BUILD_VERSION = "0.2.58-preview.36";
13
- const BUILD_COMMIT = "0cf9ba6b18ba78fccfe4d63c43c0a236b6579b2e";
12
+ const BUILD_VERSION = "0.2.58-preview.38";
13
+ const BUILD_COMMIT = "93a29943462a643799e23188c87d89e2c2cc133f";
14
14
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
15
15
  // Cache for config.yaml tracking value
16
16
  let configTrackingValue = null;
@@ -148,6 +148,9 @@ class SandboxInstance {
148
148
  });
149
149
  return data;
150
150
  }
151
+ async delete() {
152
+ return await SandboxInstance.delete(this.metadata?.name);
153
+ }
151
154
  static async updateMetadata(sandboxName, metadata) {
152
155
  const sandbox = await SandboxInstance.get(sandboxName);
153
156
  const body = { ...sandbox.sandbox, metadata: { ...sandbox.metadata, ...metadata } };
@@ -29,6 +29,7 @@ export declare class SandboxInstance {
29
29
  static get(sandboxName: string): Promise<SandboxInstance>;
30
30
  static list(): Promise<SandboxInstance[]>;
31
31
  static delete(sandboxName: string): Promise<SandboxModel>;
32
+ delete(): Promise<SandboxModel>;
32
33
  static updateMetadata(sandboxName: string, metadata: SandboxUpdateMetadata): Promise<SandboxInstance>;
33
34
  static createIfNotExists(sandbox: SandboxModel | SandboxCreateConfiguration): Promise<SandboxInstance>;
34
35
  static fromSession(session: SessionWithToken): Promise<SandboxInstance>;
@@ -2,6 +2,7 @@ import { Volume } from "../client/index.js";
2
2
  export interface VolumeCreateConfiguration {
3
3
  name?: string;
4
4
  displayName?: string;
5
+ labels?: Record<string, string>;
5
6
  size?: number;
6
7
  region?: string;
7
8
  template?: string;
@@ -20,5 +21,6 @@ export declare class VolumeInstance {
20
21
  static get(volumeName: string): Promise<VolumeInstance>;
21
22
  static list(): Promise<VolumeInstance[]>;
22
23
  static delete(volumeName: string): Promise<Volume>;
24
+ delete(): Promise<Volume>;
23
25
  static createIfNotExists(config: VolumeCreateConfiguration | Volume): Promise<VolumeInstance>;
24
26
  }
@@ -44,7 +44,8 @@ class VolumeInstance {
44
44
  volume = {
45
45
  metadata: {
46
46
  name: volumeConfig.name || defaultName,
47
- displayName: volumeConfig.displayName || volumeConfig.name || defaultName
47
+ displayName: volumeConfig.displayName || volumeConfig.name || defaultName,
48
+ labels: volumeConfig.labels
48
49
  },
49
50
  spec: {
50
51
  size: volumeConfig.size || defaultSize,
@@ -94,6 +95,9 @@ class VolumeInstance {
94
95
  });
95
96
  return data;
96
97
  }
98
+ async delete() {
99
+ return await VolumeInstance.delete(this.metadata?.name ?? "");
100
+ }
97
101
  static async createIfNotExists(config) {
98
102
  try {
99
103
  return await VolumeInstance.create(config);