n8n-nodes-daytona-tool 0.1.7 → 0.1.8
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.
|
@@ -66,15 +66,14 @@ const getSandboxByName = async (client, name) => {
|
|
|
66
66
|
};
|
|
67
67
|
exports.getSandboxByName = getSandboxByName;
|
|
68
68
|
const runNodeCode = async (sandbox, code, timeoutMs) => {
|
|
69
|
-
var _a
|
|
69
|
+
var _a;
|
|
70
70
|
const processApi = (_a = sandbox === null || sandbox === void 0 ? void 0 : sandbox.process) !== null && _a !== void 0 ? _a : sandbox;
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
throw new Error('Daytona SDK:
|
|
71
|
+
const codeRunFn = processApi === null || processApi === void 0 ? void 0 : processApi.codeRun;
|
|
72
|
+
if (!codeRunFn) {
|
|
73
|
+
throw new Error('Daytona SDK: codeRun method not found.');
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
return executeFn.call(processApi, command, options);
|
|
75
|
+
const timeoutSeconds = timeoutMs ? Math.ceil(timeoutMs / 1000) : undefined;
|
|
76
|
+
return codeRunFn.call(processApi, code, undefined, timeoutSeconds);
|
|
78
77
|
};
|
|
79
78
|
exports.runNodeCode = runNodeCode;
|
|
80
79
|
const disposeSandbox = async (sandbox) => {
|