@blaxel/core 0.2.66 → 0.2.67-preview.85
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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/client/sdk.gen.js +39 -1
- package/dist/cjs/sandbox/sandbox.js +3 -0
- package/dist/cjs/types/sandbox/client/sdk.gen.d.ts +11 -1
- package/dist/cjs/types/sandbox/client/types.gen.d.ts +61 -0
- package/dist/cjs/types/sandbox/types.d.ts +2 -1
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/client/sdk.gen.js +39 -1
- package/dist/cjs-browser/sandbox/sandbox.js +3 -0
- package/dist/cjs-browser/types/sandbox/client/sdk.gen.d.ts +11 -1
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +61 -0
- package/dist/cjs-browser/types/sandbox/types.d.ts +2 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/client/sdk.gen.js +36 -0
- package/dist/esm/sandbox/sandbox.js +3 -0
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/client/sdk.gen.js +36 -0
- package/dist/esm-browser/sandbox/sandbox.js +3 -0
- package/package.json +1 -1
|
@@ -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.
|
|
7
|
-
const BUILD_COMMIT = "
|
|
6
|
+
const BUILD_VERSION = "0.2.67-preview.85";
|
|
7
|
+
const BUILD_COMMIT = "da3d8e8ab535c2b332cf34cb6c05e4bd226f1d40";
|
|
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;
|
|
@@ -398,6 +398,42 @@ export const getNetworkProcessByPidPorts = (options) => {
|
|
|
398
398
|
...options
|
|
399
399
|
});
|
|
400
400
|
};
|
|
401
|
+
/**
|
|
402
|
+
* Disconnect tunnel
|
|
403
|
+
* Stop the network tunnel and restore the original network configuration. WARNING: After disconnecting, the sandbox will lose all outbound internet connectivity (no egress). Inbound connections to the sandbox will still work. Use PUT /network/tunnel/config to re-establish the tunnel.
|
|
404
|
+
*/
|
|
405
|
+
export const deleteNetworkTunnel = (options) => {
|
|
406
|
+
return (options?.client ?? _heyApiClient).delete({
|
|
407
|
+
security: [
|
|
408
|
+
{
|
|
409
|
+
scheme: 'bearer',
|
|
410
|
+
type: 'http'
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
url: '/network/tunnel',
|
|
414
|
+
...options
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Update tunnel configuration
|
|
419
|
+
* Apply a new tunnel configuration on the fly. The existing tunnel is torn down and a new one is established. This endpoint is write-only; there is no corresponding GET to read the config back.
|
|
420
|
+
*/
|
|
421
|
+
export const putNetworkTunnelConfig = (options) => {
|
|
422
|
+
return (options.client ?? _heyApiClient).put({
|
|
423
|
+
security: [
|
|
424
|
+
{
|
|
425
|
+
scheme: 'bearer',
|
|
426
|
+
type: 'http'
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
url: '/network/tunnel/config',
|
|
430
|
+
...options,
|
|
431
|
+
headers: {
|
|
432
|
+
'Content-Type': 'application/json',
|
|
433
|
+
...options?.headers
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
};
|
|
401
437
|
/**
|
|
402
438
|
* List all processes
|
|
403
439
|
* Get a list of all running and completed processes
|
|
@@ -65,6 +65,7 @@ export class SandboxInstance {
|
|
|
65
65
|
'envs' in sandbox ||
|
|
66
66
|
'volumes' in sandbox ||
|
|
67
67
|
'lifecycle' in sandbox ||
|
|
68
|
+
'network' in sandbox ||
|
|
68
69
|
'snapshotEnabled' in sandbox ||
|
|
69
70
|
'labels' in sandbox) {
|
|
70
71
|
if (!sandbox)
|
|
@@ -86,6 +87,7 @@ export class SandboxInstance {
|
|
|
86
87
|
"Please specify a region (e.g. 'us-pdx-1', 'eu-lon-1', 'us-was-1') in the sandbox configuration or set the BL_REGION environment variable.");
|
|
87
88
|
}
|
|
88
89
|
const lifecycle = sandbox.lifecycle;
|
|
90
|
+
const network = sandbox.network;
|
|
89
91
|
const snapshotEnabled = sandbox.snapshotEnabled;
|
|
90
92
|
sandbox = {
|
|
91
93
|
metadata: { name: sandbox.name, labels: sandbox.labels },
|
|
@@ -101,6 +103,7 @@ export class SandboxInstance {
|
|
|
101
103
|
},
|
|
102
104
|
volumes: volumes,
|
|
103
105
|
lifecycle: lifecycle,
|
|
106
|
+
network: network,
|
|
104
107
|
}
|
|
105
108
|
};
|
|
106
109
|
if (ttl) {
|