isol8 0.4.0 → 0.4.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/cli.js +15 -12
- package/dist/cli.js.map +4 -4
- package/dist/index.js +7 -3
- package/dist/index.js.map +3 -3
- package/dist/src/engine/docker.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/sshcrypto-0209sx47.node +0 -0
package/dist/cli.js
CHANGED
|
@@ -6929,11 +6929,6 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
6929
6929
|
};
|
|
6930
6930
|
});
|
|
6931
6931
|
|
|
6932
|
-
// node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node
|
|
6933
|
-
var require_sshcrypto = __commonJS((exports, module) => {
|
|
6934
|
-
module.exports = __require("./sshcrypto-0209sx47.node");
|
|
6935
|
-
});
|
|
6936
|
-
|
|
6937
6932
|
// node_modules/ssh2/lib/protocol/crypto/poly1305.js
|
|
6938
6933
|
var require_poly1305 = __commonJS((exports, module) => {
|
|
6939
6934
|
var __dirname = "/home/runner/work/isol8/isol8/node_modules/ssh2/lib/protocol/crypto", __filename = "/home/runner/work/isol8/isol8/node_modules/ssh2/lib/protocol/crypto/poly1305.js";
|
|
@@ -7420,7 +7415,7 @@ var require_crypto = __commonJS((exports, module) => {
|
|
|
7420
7415
|
var ChaChaPolyDecipher;
|
|
7421
7416
|
var GenericDecipher;
|
|
7422
7417
|
try {
|
|
7423
|
-
binding =
|
|
7418
|
+
binding = (()=>{throw new Error("Cannot require module "+"./crypto/build/Release/sshcrypto.node");})();
|
|
7424
7419
|
({
|
|
7425
7420
|
AESGCMCipher,
|
|
7426
7421
|
ChaChaPolyCipher,
|
|
@@ -55293,7 +55288,7 @@ function getInstallCommand(runtime, packages) {
|
|
|
55293
55288
|
case "python":
|
|
55294
55289
|
return ["pip", "install", "--user", "--no-cache-dir", "--break-system-packages", ...packages];
|
|
55295
55290
|
case "node":
|
|
55296
|
-
return ["npm", "install", "
|
|
55291
|
+
return ["npm", "install", "--prefix", "/sandbox", ...packages];
|
|
55297
55292
|
case "bun":
|
|
55298
55293
|
return ["bun", "install", "-g", "--global-dir=/sandbox/.bun-global", ...packages];
|
|
55299
55294
|
case "deno":
|
|
@@ -55316,6 +55311,10 @@ async function installPackages(container, runtime, packages) {
|
|
|
55316
55311
|
env2.push("NPM_CONFIG_PREFIX=/sandbox/.npm-global");
|
|
55317
55312
|
env2.push("NPM_CONFIG_CACHE=/sandbox/.npm-cache");
|
|
55318
55313
|
env2.push("npm_config_cache=/sandbox/.npm-cache");
|
|
55314
|
+
} else if (runtime === "bun") {
|
|
55315
|
+
env2.push("BUN_INSTALL_GLOBAL_DIR=/sandbox/.bun-global");
|
|
55316
|
+
env2.push("BUN_INSTALL_CACHE_DIR=/sandbox/.bun-cache");
|
|
55317
|
+
env2.push("BUN_INSTALL_BIN=/sandbox/.bun-global/bin");
|
|
55319
55318
|
} else if (runtime === "deno") {
|
|
55320
55319
|
env2.push("DENO_DIR=/sandbox/.deno");
|
|
55321
55320
|
}
|
|
@@ -61230,6 +61229,7 @@ program2.command("run").description("Execute code in isol8").argument("[file]",
|
|
|
61230
61229
|
process.on("SIGINT", cleanup);
|
|
61231
61230
|
process.on("SIGTERM", cleanup);
|
|
61232
61231
|
const spinner = ora("Starting execution...").start();
|
|
61232
|
+
let exitCode = 0;
|
|
61233
61233
|
try {
|
|
61234
61234
|
await engine.start();
|
|
61235
61235
|
spinner.text = "Running code...";
|
|
@@ -61250,11 +61250,11 @@ program2.command("run").description("Execute code in isol8").argument("[file]",
|
|
|
61250
61250
|
process.stderr.write(event.data);
|
|
61251
61251
|
} else if (event.type === "exit") {
|
|
61252
61252
|
if (event.data !== "0") {
|
|
61253
|
-
|
|
61253
|
+
exitCode = Number.parseInt(event.data, 10);
|
|
61254
61254
|
}
|
|
61255
61255
|
} else if (event.type === "error") {
|
|
61256
61256
|
console.error(`[ERR] ${event.data}`);
|
|
61257
|
-
|
|
61257
|
+
exitCode = 1;
|
|
61258
61258
|
}
|
|
61259
61259
|
}
|
|
61260
61260
|
} else {
|
|
@@ -61274,16 +61274,19 @@ program2.command("run").description("Execute code in isol8").argument("[file]",
|
|
|
61274
61274
|
console.error(`[INFO] Output written to ${opts.out}`);
|
|
61275
61275
|
}
|
|
61276
61276
|
if (result.exitCode !== 0) {
|
|
61277
|
-
|
|
61277
|
+
exitCode = result.exitCode;
|
|
61278
61278
|
}
|
|
61279
61279
|
}
|
|
61280
61280
|
} catch (err) {
|
|
61281
61281
|
spinner.stop();
|
|
61282
61282
|
throw err;
|
|
61283
61283
|
} finally {
|
|
61284
|
-
|
|
61284
|
+
const cleanupPromise = engine.stop();
|
|
61285
|
+
const timeoutPromise = new Promise((resolve3) => setTimeout(resolve3, 5000));
|
|
61286
|
+
await Promise.race([cleanupPromise, timeoutPromise]);
|
|
61285
61287
|
process.off("SIGINT", cleanup);
|
|
61286
61288
|
process.off("SIGTERM", cleanup);
|
|
61289
|
+
process.exit(exitCode);
|
|
61287
61290
|
}
|
|
61288
61291
|
});
|
|
61289
61292
|
program2.command("serve").description("Start the isol8 remote server").option("-p, --port <port>", "Port to listen on", "3000").option("-k, --key <key>", "API key for authentication").action(async (opts) => {
|
|
@@ -61513,4 +61516,4 @@ if (!process.argv.slice(2).length) {
|
|
|
61513
61516
|
}
|
|
61514
61517
|
program2.parse();
|
|
61515
61518
|
|
|
61516
|
-
//# debugId=
|
|
61519
|
+
//# debugId=56782BF23191267E64756E2164756E21
|