@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
|
@@ -5040,9 +5040,13 @@ var init_js_net = __esm({
|
|
|
5040
5040
|
// src/process/js/js-run.ts
|
|
5041
5041
|
function stdioOf(how) {
|
|
5042
5042
|
if (how === void 0) return "pipe";
|
|
5043
|
+
if (typeof how === "number" && Number.isInteger(how) && how >= 0) return how;
|
|
5043
5044
|
if (!STDIO4.has(how)) throw new JsCallError("EINVAL", "run");
|
|
5044
5045
|
return how;
|
|
5045
5046
|
}
|
|
5047
|
+
function stderrOf(how) {
|
|
5048
|
+
return how === "stdout" ? how : stdioOf(how);
|
|
5049
|
+
}
|
|
5046
5050
|
function limit(value2) {
|
|
5047
5051
|
if (value2 === void 0 || value2 === Number.POSITIVE_INFINITY) return value2;
|
|
5048
5052
|
if (!(value2 >= 0)) throw new JsCallError("EINVAL", "run");
|
|
@@ -5067,7 +5071,7 @@ function runSync(kernel, d, o) {
|
|
|
5067
5071
|
const [file] = o.argv;
|
|
5068
5072
|
if (file === void 0) throw new JsCallError("EINVAL", "run");
|
|
5069
5073
|
const stdout = stdioOf(o.stdout);
|
|
5070
|
-
const stderr =
|
|
5074
|
+
const stderr = stderrOf(o.stderr);
|
|
5071
5075
|
const input = typeof o.input === "string" ? encoder2.encode(o.input) : o.input;
|
|
5072
5076
|
const maxBuffer = limit(o.maxBuffer);
|
|
5073
5077
|
const timeout = limit(o.timeout);
|