@daytonaio/sdk 0.10.2 → 0.10.3

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.
Files changed (2) hide show
  1. package/dist/Daytona.js +6 -8
  2. package/package.json +1 -1
package/dist/Daytona.js CHANGED
@@ -71,7 +71,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
71
71
  };
72
72
  Object.defineProperty(exports, "__esModule", { value: true });
73
73
  exports.Daytona = exports.CodeLanguage = void 0;
74
- const uuid_1 = require("uuid");
75
74
  const WorkspacePythonCodeToolbox_1 = require("./code-toolbox/WorkspacePythonCodeToolbox");
76
75
  const Workspace_1 = require("./Workspace");
77
76
  const api_client_1 = require("@daytonaio/api-client");
@@ -191,8 +190,8 @@ class Daytona {
191
190
  * const workspace = await daytona.create(params, 40);
192
191
  */
193
192
  async create(params, timeout = 60) {
193
+ // const startTime = Date.now();
194
194
  var _a, _b, _c, _d;
195
- const startTime = Date.now();
196
195
  if (params == null) {
197
196
  params = { language: 'python' };
198
197
  }
@@ -200,7 +199,6 @@ class Daytona {
200
199
  if (params.language) {
201
200
  labels[`code-toolbox-language`] = params.language;
202
201
  }
203
- params.id = params.id || `sandbox-${(0, uuid_1.v4)().slice(0, 8)}`;
204
202
  // remove this when params.timeout is removed
205
203
  const effectiveTimeout = params.timeout || timeout;
206
204
  if (effectiveTimeout < 0) {
@@ -231,11 +229,11 @@ class Daytona {
231
229
  const workspaceInstance = response.data;
232
230
  const workspaceInfo = Workspace_1.Workspace.toWorkspaceInfo(workspaceInstance);
233
231
  workspaceInstance.info = workspaceInfo;
234
- const workspace = new Workspace_1.Workspace(params.id, workspaceInstance, this.workspaceApi, this.toolboxApi, codeToolbox);
235
- if (!params.async) {
236
- const timeElapsed = Date.now() - startTime;
237
- await workspace.waitUntilStarted(effectiveTimeout ? effectiveTimeout - (timeElapsed / 1000) : 0);
238
- }
232
+ const workspace = new Workspace_1.Workspace(workspaceInstance.id, workspaceInstance, this.workspaceApi, this.toolboxApi, codeToolbox);
233
+ // if (!params.async) {
234
+ // const timeElapsed = Date.now() - startTime;
235
+ // await workspace.waitUntilStarted(effectiveTimeout ? effectiveTimeout - (timeElapsed / 1000) : 0);
236
+ // }
239
237
  return workspace;
240
238
  }
241
239
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daytonaio/sdk",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Daytona client library for AI Agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",