@daytonaio/sdk 0.11.1 → 0.11.2

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/Daytona.js CHANGED
@@ -79,6 +79,9 @@ var __importStar = (this && this.__importStar) || (function () {
79
79
  return result;
80
80
  };
81
81
  })();
82
+ var __importDefault = (this && this.__importDefault) || function (mod) {
83
+ return (mod && mod.__esModule) ? mod : { "default": mod };
84
+ };
82
85
  Object.defineProperty(exports, "__esModule", { value: true });
83
86
  exports.Daytona = exports.CodeLanguage = void 0;
84
87
  const SandboxPythonCodeToolbox_1 = require("./code-toolbox/SandboxPythonCodeToolbox");
@@ -87,6 +90,7 @@ const api_client_1 = require("@daytonaio/api-client");
87
90
  const SandboxTsCodeToolbox_1 = require("./code-toolbox/SandboxTsCodeToolbox");
88
91
  const axios_1 = __importStar(require("axios"));
89
92
  const DaytonaError_1 = require("./errors/DaytonaError");
93
+ const dotenv_1 = __importDefault(require("dotenv"));
90
94
  /**
91
95
  * Supported programming languages for code execution
92
96
  */
@@ -128,6 +132,8 @@ class Daytona {
128
132
  * @throws {DaytonaError} - `DaytonaError` - When API key or server URL is missing
129
133
  */
130
134
  constructor(config) {
135
+ dotenv_1.default.config();
136
+ dotenv_1.default.config({ path: '.env.local', override: true });
131
137
  const apiKey = (config === null || config === void 0 ? void 0 : config.apiKey) || process.env.DAYTONA_API_KEY;
132
138
  if (!apiKey) {
133
139
  throw new DaytonaError_1.DaytonaError('API key is required');
@@ -168,7 +168,7 @@ class FileSystem {
168
168
  * });
169
169
  */
170
170
  async listFiles(path) {
171
- const response = await this.toolboxApi.listFiles(this.instance.id, path);
171
+ const response = await this.toolboxApi.listFiles(this.instance.id, undefined, path);
172
172
  return response.data;
173
173
  }
174
174
  /**
@@ -243,7 +243,7 @@ class FileSystem {
243
243
  * });
244
244
  */
245
245
  async setFilePermissions(path, permissions) {
246
- const response = await this.toolboxApi.setFilePermissions(this.instance.id, path, permissions.owner, permissions.group, permissions.mode);
246
+ const response = await this.toolboxApi.setFilePermissions(this.instance.id, path, undefined, permissions.owner, permissions.group, permissions.mode);
247
247
  return response.data;
248
248
  }
249
249
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daytonaio/sdk",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Daytona client library for AI Agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,6 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@daytonaio/api-client": "^0.15.0",
41
- "uuid": "^11.0.3"
41
+ "uuid": "^11.0.3",
42
+ "@dotenvx/dotenvx": "^1.25.1"
42
43
  }
43
44
  }