@daytonaio/sdk 0.0.0-dev
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/README.md +146 -0
- package/package.json +39 -0
- package/src/Daytona.d.ts +331 -0
- package/src/Daytona.js +400 -0
- package/src/Daytona.js.map +1 -0
- package/src/FileSystem.d.ts +270 -0
- package/src/FileSystem.js +302 -0
- package/src/FileSystem.js.map +1 -0
- package/src/Git.d.ts +211 -0
- package/src/Git.js +275 -0
- package/src/Git.js.map +1 -0
- package/src/Image.d.ts +264 -0
- package/src/Image.js +565 -0
- package/src/Image.js.map +1 -0
- package/src/LspServer.d.ts +173 -0
- package/src/LspServer.js +209 -0
- package/src/LspServer.js.map +1 -0
- package/src/ObjectStorage.d.ts +85 -0
- package/src/ObjectStorage.js +231 -0
- package/src/ObjectStorage.js.map +1 -0
- package/src/Process.d.ts +246 -0
- package/src/Process.js +290 -0
- package/src/Process.js.map +1 -0
- package/src/Sandbox.d.ts +266 -0
- package/src/Sandbox.js +389 -0
- package/src/Sandbox.js.map +1 -0
- package/src/Snapshot.d.ts +116 -0
- package/src/Snapshot.js +187 -0
- package/src/Snapshot.js.map +1 -0
- package/src/Volume.d.ts +79 -0
- package/src/Volume.js +97 -0
- package/src/Volume.js.map +1 -0
- package/src/code-toolbox/SandboxPythonCodeToolbox.d.ts +11 -0
- package/src/code-toolbox/SandboxPythonCodeToolbox.js +358 -0
- package/src/code-toolbox/SandboxPythonCodeToolbox.js.map +1 -0
- package/src/code-toolbox/SandboxTsCodeToolbox.d.ts +5 -0
- package/src/code-toolbox/SandboxTsCodeToolbox.js +17 -0
- package/src/code-toolbox/SandboxTsCodeToolbox.js.map +1 -0
- package/src/errors/DaytonaError.d.ts +10 -0
- package/src/errors/DaytonaError.js +20 -0
- package/src/errors/DaytonaError.js.map +1 -0
- package/src/index.d.ts +15 -0
- package/src/index.js +32 -0
- package/src/index.js.map +1 -0
- package/src/types/Charts.d.ts +151 -0
- package/src/types/Charts.js +46 -0
- package/src/types/Charts.js.map +1 -0
- package/src/types/ExecuteResponse.d.ts +26 -0
- package/src/types/ExecuteResponse.js +7 -0
- package/src/types/ExecuteResponse.js.map +1 -0
- package/src/utils/ArtifactParser.d.ts +13 -0
- package/src/utils/ArtifactParser.js +55 -0
- package/src/utils/ArtifactParser.js.map +1 -0
- package/src/utils/Path.d.ts +1 -0
- package/src/utils/Path.js +61 -0
- package/src/utils/Path.js.map +1 -0
- package/src/utils/Stream.d.ts +13 -0
- package/src/utils/Stream.js +82 -0
- package/src/utils/Stream.js.map +1 -0
package/src/Daytona.js
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Daytona Platforms Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.Daytona = exports.CodeLanguage = void 0;
|
|
41
|
+
const api_client_1 = require("@daytonaio/api-client");
|
|
42
|
+
const axios_1 = __importStar(require("axios"));
|
|
43
|
+
const dotenv = __importStar(require("dotenv"));
|
|
44
|
+
const SandboxPythonCodeToolbox_1 = require("./code-toolbox/SandboxPythonCodeToolbox");
|
|
45
|
+
const SandboxTsCodeToolbox_1 = require("./code-toolbox/SandboxTsCodeToolbox");
|
|
46
|
+
const DaytonaError_1 = require("./errors/DaytonaError");
|
|
47
|
+
const Image_1 = require("./Image");
|
|
48
|
+
const Sandbox_1 = require("./Sandbox");
|
|
49
|
+
const Snapshot_1 = require("./Snapshot");
|
|
50
|
+
const Volume_1 = require("./Volume");
|
|
51
|
+
const packageJson = __importStar(require("../package.json"));
|
|
52
|
+
const Stream_1 = require("./utils/Stream");
|
|
53
|
+
/**
|
|
54
|
+
* Supported programming languages for code execution
|
|
55
|
+
*/
|
|
56
|
+
var CodeLanguage;
|
|
57
|
+
(function (CodeLanguage) {
|
|
58
|
+
CodeLanguage["PYTHON"] = "python";
|
|
59
|
+
CodeLanguage["TYPESCRIPT"] = "typescript";
|
|
60
|
+
CodeLanguage["JAVASCRIPT"] = "javascript";
|
|
61
|
+
})(CodeLanguage || (exports.CodeLanguage = CodeLanguage = {}));
|
|
62
|
+
/**
|
|
63
|
+
* Main class for interacting with the Daytona API.
|
|
64
|
+
* Provides methods for creating, managing, and interacting with Daytona Sandboxes.
|
|
65
|
+
* Can be initialized either with explicit configuration or using environment variables.
|
|
66
|
+
*
|
|
67
|
+
* @property {VolumeService} volume - Service for managing Daytona Volumes
|
|
68
|
+
* @property {SnapshotService} snapshot - Service for managing Daytona Snapshots
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* // Using environment variables
|
|
72
|
+
* // Uses DAYTONA_API_KEY, DAYTONA_API_URL, DAYTONA_TARGET
|
|
73
|
+
* const daytona = new Daytona();
|
|
74
|
+
* const sandbox = await daytona.create();
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // Using explicit configuration
|
|
78
|
+
* const config: DaytonaConfig = {
|
|
79
|
+
* apiKey: "your-api-key",
|
|
80
|
+
* apiUrl: "https://your-api.com",
|
|
81
|
+
* target: "us"
|
|
82
|
+
* };
|
|
83
|
+
* const daytona = new Daytona(config);
|
|
84
|
+
*
|
|
85
|
+
* @class
|
|
86
|
+
*/
|
|
87
|
+
class Daytona {
|
|
88
|
+
sandboxApi;
|
|
89
|
+
toolboxApi;
|
|
90
|
+
objectStorageApi;
|
|
91
|
+
target;
|
|
92
|
+
apiKey;
|
|
93
|
+
jwtToken;
|
|
94
|
+
organizationId;
|
|
95
|
+
apiUrl;
|
|
96
|
+
volume;
|
|
97
|
+
snapshot;
|
|
98
|
+
/**
|
|
99
|
+
* Creates a new Daytona client instance.
|
|
100
|
+
*
|
|
101
|
+
* @param {DaytonaConfig} [config] - Configuration options
|
|
102
|
+
* @throws {DaytonaError} - `DaytonaError` - When API key is missing
|
|
103
|
+
*/
|
|
104
|
+
constructor(config) {
|
|
105
|
+
dotenv.config();
|
|
106
|
+
dotenv.config({ path: '.env.local', override: true });
|
|
107
|
+
const apiKey = !config?.apiKey && config?.jwtToken ? undefined : config?.apiKey || process?.env['DAYTONA_API_KEY'];
|
|
108
|
+
const jwtToken = config?.jwtToken || process?.env['DAYTONA_JWT_TOKEN'];
|
|
109
|
+
const organizationId = config?.organizationId || process?.env['DAYTONA_ORGANIZATION_ID'];
|
|
110
|
+
if (!apiKey && !jwtToken) {
|
|
111
|
+
throw new DaytonaError_1.DaytonaError('API key or JWT token is required');
|
|
112
|
+
}
|
|
113
|
+
const apiUrl = config?.apiUrl ||
|
|
114
|
+
config?.serverUrl ||
|
|
115
|
+
process?.env['DAYTONA_API_URL'] ||
|
|
116
|
+
process?.env['DAYTONA_SERVER_URL'] ||
|
|
117
|
+
'https://app.daytona.io/api';
|
|
118
|
+
const envTarget = process?.env['DAYTONA_TARGET'];
|
|
119
|
+
const target = config?.target || envTarget;
|
|
120
|
+
if (process?.env['DAYTONA_SERVER_URL'] && !process?.env['DAYTONA_API_URL']) {
|
|
121
|
+
console.warn('[Deprecation Warning] Environment variable `DAYTONA_SERVER_URL` is deprecated and will be removed in future versions. Use `DAYTONA_API_URL` instead.');
|
|
122
|
+
}
|
|
123
|
+
this.apiKey = apiKey;
|
|
124
|
+
this.jwtToken = jwtToken;
|
|
125
|
+
this.organizationId = organizationId;
|
|
126
|
+
this.apiUrl = apiUrl;
|
|
127
|
+
this.target = target;
|
|
128
|
+
const orgHeader = {};
|
|
129
|
+
if (!this.apiKey) {
|
|
130
|
+
if (!this.organizationId) {
|
|
131
|
+
throw new DaytonaError_1.DaytonaError('Organization ID is required when using JWT token');
|
|
132
|
+
}
|
|
133
|
+
orgHeader['X-Daytona-Organization-ID'] = this.organizationId;
|
|
134
|
+
}
|
|
135
|
+
const configuration = new api_client_1.Configuration({
|
|
136
|
+
basePath: this.apiUrl,
|
|
137
|
+
baseOptions: {
|
|
138
|
+
headers: {
|
|
139
|
+
Authorization: `Bearer ${this.apiKey || this.jwtToken}`,
|
|
140
|
+
'X-Daytona-Source': 'typescript-sdk',
|
|
141
|
+
'X-Daytona-SDK-Version': packageJson.version,
|
|
142
|
+
...orgHeader,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
const axiosInstance = axios_1.default.create({
|
|
147
|
+
timeout: 24 * 60 * 60 * 1000, // 24 hours
|
|
148
|
+
});
|
|
149
|
+
axiosInstance.interceptors.response.use((response) => {
|
|
150
|
+
return response;
|
|
151
|
+
}, (error) => {
|
|
152
|
+
let errorMessage;
|
|
153
|
+
if (error instanceof axios_1.AxiosError && error.message.includes('timeout of')) {
|
|
154
|
+
errorMessage = 'Operation timed out';
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
errorMessage = error.response?.data?.message || error.response?.data || error.message || String(error);
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
errorMessage = JSON.stringify(errorMessage);
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
errorMessage = String(errorMessage);
|
|
164
|
+
}
|
|
165
|
+
switch (error.response?.data?.statusCode) {
|
|
166
|
+
case 404:
|
|
167
|
+
throw new DaytonaError_1.DaytonaNotFoundError(errorMessage);
|
|
168
|
+
default:
|
|
169
|
+
throw new DaytonaError_1.DaytonaError(errorMessage);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
this.sandboxApi = new api_client_1.SandboxApi(configuration, '', axiosInstance);
|
|
173
|
+
this.toolboxApi = new api_client_1.ToolboxApi(configuration, '', axiosInstance);
|
|
174
|
+
this.objectStorageApi = new api_client_1.ObjectStorageApi(configuration, '', axiosInstance);
|
|
175
|
+
this.volume = new Volume_1.VolumeService(new api_client_1.VolumesApi(configuration, '', axiosInstance));
|
|
176
|
+
this.snapshot = new Snapshot_1.SnapshotService(new api_client_1.SnapshotsApi(configuration, '', axiosInstance), this.objectStorageApi);
|
|
177
|
+
}
|
|
178
|
+
async create(params, options = { timeout: 60 }) {
|
|
179
|
+
const startTime = Date.now();
|
|
180
|
+
options = typeof options === 'number' ? { timeout: options } : { ...options };
|
|
181
|
+
if (options.timeout == undefined || options.timeout == null) {
|
|
182
|
+
options.timeout = 60;
|
|
183
|
+
}
|
|
184
|
+
if (params == null) {
|
|
185
|
+
params = { language: 'python' };
|
|
186
|
+
}
|
|
187
|
+
const labels = params.labels || {};
|
|
188
|
+
if (params.language) {
|
|
189
|
+
labels['code-toolbox-language'] = params.language;
|
|
190
|
+
}
|
|
191
|
+
if (options.timeout < 0) {
|
|
192
|
+
throw new DaytonaError_1.DaytonaError('Timeout must be a non-negative number');
|
|
193
|
+
}
|
|
194
|
+
if (params.autoStopInterval !== undefined &&
|
|
195
|
+
(!Number.isInteger(params.autoStopInterval) || params.autoStopInterval < 0)) {
|
|
196
|
+
throw new DaytonaError_1.DaytonaError('autoStopInterval must be a non-negative integer');
|
|
197
|
+
}
|
|
198
|
+
if (params.autoArchiveInterval !== undefined &&
|
|
199
|
+
(!Number.isInteger(params.autoArchiveInterval) || params.autoArchiveInterval < 0)) {
|
|
200
|
+
throw new DaytonaError_1.DaytonaError('autoArchiveInterval must be a non-negative integer');
|
|
201
|
+
}
|
|
202
|
+
const codeToolbox = this.getCodeToolbox(params.language);
|
|
203
|
+
try {
|
|
204
|
+
let buildInfo;
|
|
205
|
+
let snapshot;
|
|
206
|
+
let resources;
|
|
207
|
+
if ('snapshot' in params) {
|
|
208
|
+
snapshot = params.snapshot;
|
|
209
|
+
}
|
|
210
|
+
if ('image' in params) {
|
|
211
|
+
if (typeof params.image === 'string') {
|
|
212
|
+
buildInfo = {
|
|
213
|
+
dockerfileContent: Image_1.Image.base(params.image).dockerfile,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
else if (params.image instanceof Image_1.Image) {
|
|
217
|
+
const contextHashes = await Snapshot_1.SnapshotService.processImageContext(this.objectStorageApi, params.image);
|
|
218
|
+
buildInfo = {
|
|
219
|
+
contextHashes,
|
|
220
|
+
dockerfileContent: params.image.dockerfile,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if ('resources' in params) {
|
|
225
|
+
resources = params.resources;
|
|
226
|
+
}
|
|
227
|
+
const response = await this.sandboxApi.createSandbox({
|
|
228
|
+
snapshot: snapshot,
|
|
229
|
+
buildInfo,
|
|
230
|
+
user: params.user,
|
|
231
|
+
env: params.envVars || {},
|
|
232
|
+
labels: params.labels,
|
|
233
|
+
public: params.public,
|
|
234
|
+
target: this.target,
|
|
235
|
+
cpu: resources?.cpu,
|
|
236
|
+
gpu: resources?.gpu,
|
|
237
|
+
memory: resources?.memory,
|
|
238
|
+
disk: resources?.disk,
|
|
239
|
+
autoStopInterval: params.autoStopInterval,
|
|
240
|
+
autoArchiveInterval: params.autoArchiveInterval,
|
|
241
|
+
volumes: params.volumes,
|
|
242
|
+
}, undefined, {
|
|
243
|
+
timeout: options.timeout * 1000,
|
|
244
|
+
});
|
|
245
|
+
let sandboxInstance = response.data;
|
|
246
|
+
if (sandboxInstance.state === api_client_1.SandboxState.PENDING_BUILD && options.onSnapshotCreateLogs) {
|
|
247
|
+
const terminalStates = [
|
|
248
|
+
api_client_1.SandboxState.STARTED,
|
|
249
|
+
api_client_1.SandboxState.STARTING,
|
|
250
|
+
api_client_1.SandboxState.ERROR,
|
|
251
|
+
api_client_1.SandboxState.BUILD_FAILED,
|
|
252
|
+
];
|
|
253
|
+
while (sandboxInstance.state === api_client_1.SandboxState.PENDING_BUILD) {
|
|
254
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
255
|
+
sandboxInstance = (await this.sandboxApi.getSandbox(sandboxInstance.id)).data;
|
|
256
|
+
}
|
|
257
|
+
await (0, Stream_1.processStreamingResponse)(() => this.sandboxApi.getBuildLogs(sandboxInstance.id, undefined, true, { responseType: 'stream' }), (chunk) => options.onSnapshotCreateLogs?.(chunk.trimEnd()), async () => {
|
|
258
|
+
sandboxInstance = (await this.sandboxApi.getSandbox(sandboxInstance.id)).data;
|
|
259
|
+
return sandboxInstance.state !== undefined && terminalStates.includes(sandboxInstance.state);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
const sandbox = new Sandbox_1.Sandbox(sandboxInstance, this.sandboxApi, this.toolboxApi, codeToolbox);
|
|
263
|
+
if (sandbox.state !== 'started') {
|
|
264
|
+
const timeElapsed = Date.now() - startTime;
|
|
265
|
+
await sandbox.waitUntilStarted(options.timeout ? options.timeout - timeElapsed / 1000 : 0);
|
|
266
|
+
}
|
|
267
|
+
return sandbox;
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
if (error instanceof DaytonaError_1.DaytonaError && error.message.includes('Operation timed out')) {
|
|
271
|
+
const errMsg = `Failed to create and start sandbox within ${options.timeout} seconds. Operation timed out.`;
|
|
272
|
+
throw new DaytonaError_1.DaytonaError(errMsg);
|
|
273
|
+
}
|
|
274
|
+
throw error;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Gets a Sandbox by its ID.
|
|
279
|
+
*
|
|
280
|
+
* @param {string} sandboxId - The ID of the Sandbox to retrieve
|
|
281
|
+
* @returns {Promise<Sandbox>} The Sandbox
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* const sandbox = await daytona.get('my-sandbox-id');
|
|
285
|
+
* console.log(`Sandbox state: ${sandbox.state}`);
|
|
286
|
+
*/
|
|
287
|
+
async get(sandboxId) {
|
|
288
|
+
const response = await this.sandboxApi.getSandbox(sandboxId);
|
|
289
|
+
const sandboxInstance = response.data;
|
|
290
|
+
const language = sandboxInstance.labels && sandboxInstance.labels['code-toolbox-language'];
|
|
291
|
+
const codeToolbox = this.getCodeToolbox(language);
|
|
292
|
+
return new Sandbox_1.Sandbox(sandboxInstance, this.sandboxApi, this.toolboxApi, codeToolbox);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Finds a Sandbox by its ID or labels.
|
|
296
|
+
*
|
|
297
|
+
* @param {SandboxFilter} filter - Filter for Sandboxes
|
|
298
|
+
* @returns {Promise<Sandbox>} First Sandbox that matches the ID or labels.
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* const sandbox = await daytona.findOne({ labels: { 'my-label': 'my-value' } });
|
|
302
|
+
* console.log(`Sandbox ID: ${sandbox.id}, State: ${sandbox.state}`);
|
|
303
|
+
*/
|
|
304
|
+
async findOne(filter) {
|
|
305
|
+
if (filter.id) {
|
|
306
|
+
return this.get(filter.id);
|
|
307
|
+
}
|
|
308
|
+
const sandboxes = await this.list(filter.labels);
|
|
309
|
+
if (sandboxes.length === 0) {
|
|
310
|
+
const errMsg = `No sandbox found with labels ${JSON.stringify(filter.labels)}`;
|
|
311
|
+
throw new DaytonaError_1.DaytonaError(errMsg);
|
|
312
|
+
}
|
|
313
|
+
return sandboxes[0];
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Lists all Sandboxes filtered by labels.
|
|
317
|
+
*
|
|
318
|
+
* @param {Record<string, string>} [labels] - Labels to filter Sandboxes
|
|
319
|
+
* @returns {Promise<Sandbox[]>} Array of Sandboxes that match the labels.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* const sandboxes = await daytona.list({ 'my-label': 'my-value' });
|
|
323
|
+
* for (const sandbox of sandboxes) {
|
|
324
|
+
* console.log(`${sandbox.id}: ${sandbox.state}`);
|
|
325
|
+
* }
|
|
326
|
+
*/
|
|
327
|
+
async list(labels) {
|
|
328
|
+
const response = await this.sandboxApi.listSandboxes(undefined, undefined, labels ? JSON.stringify(labels) : undefined);
|
|
329
|
+
return response.data.map((sandbox) => {
|
|
330
|
+
const language = sandbox.labels?.['code-toolbox-language'];
|
|
331
|
+
return new Sandbox_1.Sandbox(sandbox, this.sandboxApi, this.toolboxApi, this.getCodeToolbox(language));
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Starts a Sandbox and waits for it to be ready.
|
|
336
|
+
*
|
|
337
|
+
* @param {Sandbox} sandbox - The Sandbox to start
|
|
338
|
+
* @param {number} [timeout] - Optional timeout in seconds (0 means no timeout)
|
|
339
|
+
* @returns {Promise<void>}
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* const sandbox = await daytona.get('my-sandbox-id');
|
|
343
|
+
* // Wait up to 60 seconds for the sandbox to start
|
|
344
|
+
* await daytona.start(sandbox, 60);
|
|
345
|
+
*/
|
|
346
|
+
async start(sandbox, timeout) {
|
|
347
|
+
await sandbox.start(timeout);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Stops a Sandbox.
|
|
351
|
+
*
|
|
352
|
+
* @param {Sandbox} sandbox - The Sandbox to stop
|
|
353
|
+
* @returns {Promise<void>}
|
|
354
|
+
*
|
|
355
|
+
* @example
|
|
356
|
+
* const sandbox = await daytona.get('my-sandbox-id');
|
|
357
|
+
* await daytona.stop(sandbox);
|
|
358
|
+
*/
|
|
359
|
+
async stop(sandbox) {
|
|
360
|
+
await sandbox.stop();
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Deletes a Sandbox.
|
|
364
|
+
*
|
|
365
|
+
* @param {Sandbox} sandbox - The Sandbox to delete
|
|
366
|
+
* @param {number} timeout - Timeout in seconds (0 means no timeout, default is 60)
|
|
367
|
+
* @returns {Promise<void>}
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* const sandbox = await daytona.get('my-sandbox-id');
|
|
371
|
+
* await daytona.delete(sandbox);
|
|
372
|
+
*/
|
|
373
|
+
async delete(sandbox, timeout = 60) {
|
|
374
|
+
await sandbox.delete(timeout);
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Gets the appropriate code toolbox based on language.
|
|
378
|
+
*
|
|
379
|
+
* @private
|
|
380
|
+
* @param {CodeLanguage} [language] - Programming language for the toolbox
|
|
381
|
+
* @returns {SandboxCodeToolbox} The appropriate code toolbox instance
|
|
382
|
+
* @throws {DaytonaError} - `DaytonaError` - When an unsupported language is specified
|
|
383
|
+
*/
|
|
384
|
+
getCodeToolbox(language) {
|
|
385
|
+
switch (language) {
|
|
386
|
+
case CodeLanguage.JAVASCRIPT:
|
|
387
|
+
case CodeLanguage.TYPESCRIPT:
|
|
388
|
+
return new SandboxTsCodeToolbox_1.SandboxTsCodeToolbox();
|
|
389
|
+
case CodeLanguage.PYTHON:
|
|
390
|
+
case undefined:
|
|
391
|
+
return new SandboxPythonCodeToolbox_1.SandboxPythonCodeToolbox();
|
|
392
|
+
default: {
|
|
393
|
+
const errMsg = `Unsupported language: ${language}, supported languages: ${Object.values(CodeLanguage).join(', ')}`;
|
|
394
|
+
throw new DaytonaError_1.DaytonaError(errMsg);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
exports.Daytona = Daytona;
|
|
400
|
+
//# sourceMappingURL=Daytona.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Daytona.js","sourceRoot":"","sources":["../../../../libs/sdk-typescript/src/Daytona.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAU8B;AAC9B,+CAAyC;AACzC,+CAAgC;AAChC,sFAAkF;AAClF,8EAA0E;AAC1E,wDAA0E;AAC1E,mCAA+B;AAC/B,uCAAmC;AACnC,yCAA4C;AAC5C,qCAAwC;AACxC,6DAA8C;AAC9C,2CAAyD;AAsDzD;;GAEG;AACH,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;AAC3B,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAwFD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAa,OAAO;IACD,UAAU,CAAY;IACtB,UAAU,CAAY;IACtB,gBAAgB,CAAkB;IAClC,MAAM,CAAS;IACf,MAAM,CAAS;IACf,QAAQ,CAAS;IACjB,cAAc,CAAS;IACvB,MAAM,CAAQ;IACf,MAAM,CAAe;IACrB,QAAQ,CAAiB;IAEzC;;;;;OAKG;IACH,YAAY,MAAsB;QAChC,MAAM,CAAC,MAAM,EAAE,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