sandboxedjs 0.1.39 → 0.1.40
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 +44 -0
- package/dist/agent.d.cts +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/{container-BsPKqY9R.d.cts → container-Bg_BuaAv.d.cts} +7 -0
- package/dist/{container-BsPKqY9R.d.ts → container-Bg_BuaAv.d.ts} +7 -0
- package/dist/index.cjs +40 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +40 -10
- package/dist/index.js.map +1 -1
- package/dist/worker-entry.js +7 -1
- package/dist/worker-entry.js.map +1 -1
- package/package.json +1 -1
package/dist/worker-entry.js
CHANGED
|
@@ -28779,13 +28779,19 @@ function createChildProcessModule(spawnChild, defaultCwd, syncSpawn, defaultEnv
|
|
|
28779
28779
|
const shell = typeof options.shell === "string" ? options.shell : "/bin/sh";
|
|
28780
28780
|
return { file: shell, args: ["-c", command] };
|
|
28781
28781
|
};
|
|
28782
|
+
const stdinIgnored = (options) => {
|
|
28783
|
+
const stdio = options.stdio;
|
|
28784
|
+
if (stdio === "ignore") return true;
|
|
28785
|
+
return Array.isArray(stdio) && stdio[0] === "ignore";
|
|
28786
|
+
};
|
|
28782
28787
|
const start = (file, args, options) => {
|
|
28783
28788
|
const resolved = options.shell ? throughShell([file, ...args].join(" "), options) : { file, args };
|
|
28784
28789
|
const handle = spawnChild({
|
|
28785
28790
|
command: resolved.file,
|
|
28786
28791
|
args: resolved.args,
|
|
28787
28792
|
cwd: options.cwd ?? defaultCwd(),
|
|
28788
|
-
env: environmentFor(options)
|
|
28793
|
+
env: environmentFor(options),
|
|
28794
|
+
...stdinIgnored(options) ? { stdinIgnored: true } : {}
|
|
28789
28795
|
});
|
|
28790
28796
|
return new ChildProcess(handle, resolved.file, resolved.args);
|
|
28791
28797
|
};
|