@ai-ecoverse/slicc-kernel 1.69.0 → 1.70.0
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 +1 -1
- package/dist/kernel-worker.js +37 -7
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +5 -1
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +37 -7
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +5 -1
- package/dist/process-worker.js.map +2 -2
- package/package.json +1 -1
package/dist/process-worker.js
CHANGED
|
@@ -12116,9 +12116,13 @@ var init_js_net = __esm({
|
|
|
12116
12116
|
// src/process/js/js-run.ts
|
|
12117
12117
|
function stdioOf(how) {
|
|
12118
12118
|
if (how === void 0) return "pipe";
|
|
12119
|
+
if (typeof how === "number" && Number.isInteger(how) && how >= 0) return how;
|
|
12119
12120
|
if (!STDIO4.has(how)) throw new JsCallError("EINVAL", "run");
|
|
12120
12121
|
return how;
|
|
12121
12122
|
}
|
|
12123
|
+
function stderrOf(how) {
|
|
12124
|
+
return how === "stdout" ? how : stdioOf(how);
|
|
12125
|
+
}
|
|
12122
12126
|
function limit(value2) {
|
|
12123
12127
|
if (value2 === void 0 || value2 === Number.POSITIVE_INFINITY) return value2;
|
|
12124
12128
|
if (!(value2 >= 0)) throw new JsCallError("EINVAL", "run");
|
|
@@ -12143,7 +12147,7 @@ function runSync(kernel, d, o) {
|
|
|
12143
12147
|
const [file] = o.argv;
|
|
12144
12148
|
if (file === void 0) throw new JsCallError("EINVAL", "run");
|
|
12145
12149
|
const stdout = stdioOf(o.stdout);
|
|
12146
|
-
const stderr =
|
|
12150
|
+
const stderr = stderrOf(o.stderr);
|
|
12147
12151
|
const input = typeof o.input === "string" ? encoder2.encode(o.input) : o.input;
|
|
12148
12152
|
const maxBuffer = limit(o.maxBuffer);
|
|
12149
12153
|
const timeout = limit(o.timeout);
|