@blaxel/core 0.2.29 → 0.2.30
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.
|
@@ -1414,6 +1414,10 @@ export type PreviewSpec = {
|
|
|
1414
1414
|
* Custom domain bound to this preview
|
|
1415
1415
|
*/
|
|
1416
1416
|
customDomain?: string;
|
|
1417
|
+
/**
|
|
1418
|
+
* The expiration date for the preview in ISO 8601 format - 2024-12-31T23:59:59Z
|
|
1419
|
+
*/
|
|
1420
|
+
expires?: string;
|
|
1417
1421
|
/**
|
|
1418
1422
|
* Port of the preview
|
|
1419
1423
|
*/
|
|
@@ -1438,6 +1442,10 @@ export type PreviewSpec = {
|
|
|
1438
1442
|
responseHeaders?: {
|
|
1439
1443
|
[key: string]: string;
|
|
1440
1444
|
};
|
|
1445
|
+
/**
|
|
1446
|
+
* Time to live for the preview (e.g., "1h", "24h", "7d"). After this duration, the preview will be automatically deleted.
|
|
1447
|
+
*/
|
|
1448
|
+
ttl?: string;
|
|
1441
1449
|
/**
|
|
1442
1450
|
* URL of the preview
|
|
1443
1451
|
*/
|
|
@@ -2502,6 +2510,10 @@ export type Workspace = TimeFields & OwnerFields & {
|
|
|
2502
2510
|
* Workspace display name
|
|
2503
2511
|
*/
|
|
2504
2512
|
displayName?: string;
|
|
2513
|
+
/**
|
|
2514
|
+
* Autogenerated unique workspace id
|
|
2515
|
+
*/
|
|
2516
|
+
id?: string;
|
|
2505
2517
|
/**
|
|
2506
2518
|
* Workspace labels
|
|
2507
2519
|
*/
|
package/dist/sandbox/sandbox.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.SandboxInstance = void 0;
|
|
|
4
4
|
const uuid_1 = require("uuid");
|
|
5
5
|
const index_js_1 = require("../client/index.js");
|
|
6
6
|
const logger_js_1 = require("../common/logger.js");
|
|
7
|
+
const settings_js_1 = require("../common/settings.js");
|
|
7
8
|
const index_js_2 = require("./filesystem/index.js");
|
|
8
9
|
const index_js_3 = require("./network/index.js");
|
|
9
10
|
const preview_js_1 = require("./preview.js");
|
|
@@ -43,8 +44,9 @@ class SandboxInstance {
|
|
|
43
44
|
return this;
|
|
44
45
|
}
|
|
45
46
|
static async create(sandbox, { safe = true } = {}) {
|
|
47
|
+
const env = settings_js_1.settings.env;
|
|
46
48
|
const defaultName = `sandbox-${(0, uuid_1.v4)().replace(/-/g, '').substring(0, 8)}`;
|
|
47
|
-
const defaultImage =
|
|
49
|
+
const defaultImage = `blaxel/${env}-base:latest`;
|
|
48
50
|
const defaultMemory = 4096;
|
|
49
51
|
// Handle SandboxCreateConfiguration or simple dict with name/image/memory/ports/envs keys
|
|
50
52
|
if (!sandbox || 'name' in sandbox || 'image' in sandbox || 'memory' in sandbox || 'ports' in sandbox || 'envs' in sandbox) {
|
package/dist/sandbox/session.js
CHANGED