@ai-ecoverse/slicc-kernel 1.69.0 → 1.71.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.
@@ -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 = stdioOf(o.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);