@blaxel/core 0.2.25-preview.58 → 0.2.25
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/sandbox/sandbox.js
CHANGED
|
@@ -58,6 +58,8 @@ class SandboxInstance {
|
|
|
58
58
|
sandbox.memory = defaultMemory;
|
|
59
59
|
const ports = (0, types_js_1.normalizePorts)(sandbox.ports);
|
|
60
60
|
const envs = (0, types_js_1.normalizeEnvs)(sandbox.envs);
|
|
61
|
+
const ttl = sandbox.ttl;
|
|
62
|
+
const expires = sandbox.expires;
|
|
61
63
|
sandbox = {
|
|
62
64
|
metadata: { name: sandbox.name },
|
|
63
65
|
spec: {
|
|
@@ -66,10 +68,16 @@ class SandboxInstance {
|
|
|
66
68
|
memory: sandbox.memory,
|
|
67
69
|
ports: ports,
|
|
68
70
|
envs: envs,
|
|
69
|
-
generation: "mk3"
|
|
71
|
+
generation: "mk3",
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
};
|
|
75
|
+
if (ttl) {
|
|
76
|
+
sandbox.spec.runtime.ttl = ttl;
|
|
77
|
+
}
|
|
78
|
+
if (expires) {
|
|
79
|
+
sandbox.spec.runtime.expires = expires.toISOString();
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
sandbox = sandbox;
|
|
75
83
|
if (!sandbox.metadata) {
|
package/dist/sandbox/types.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export type SandboxCreateConfiguration = {
|
|
|
26
26
|
memory?: number;
|
|
27
27
|
ports?: (Port | Record<string, any>)[];
|
|
28
28
|
envs?: EnvVar[];
|
|
29
|
+
ttl?: string;
|
|
30
|
+
expires?: Date;
|
|
29
31
|
};
|
|
30
32
|
export declare function normalizePorts(ports?: (Port | Record<string, any>)[]): Port[] | undefined;
|
|
31
33
|
export declare function normalizeEnvs(envs?: EnvVar[]): EnvVar[] | undefined;
|