@ai-ecoverse/slicc-jsh 0.3.6 → 0.3.7

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.
@@ -10,7 +10,7 @@ import vm from "node:vm";
10
10
  // package.json
11
11
  var package_default = {
12
12
  name: "@ai-ecoverse/slicc-jsh",
13
- version: "0.3.6",
13
+ version: "0.3.7",
14
14
  description: "Node.js-compatible runtime for slicc-kernel: the node and jsh commands (abi: js)",
15
15
  type: "module",
16
16
  license: "Apache-2.0",
package/dist/jsh.mjs CHANGED
@@ -1539,7 +1539,7 @@ ${e3}`;
1539
1539
  // package.json
1540
1540
  var package_default = {
1541
1541
  name: "@ai-ecoverse/slicc-jsh",
1542
- version: "0.3.6",
1542
+ version: "0.3.7",
1543
1543
  description: "Node.js-compatible runtime for slicc-kernel: the node and jsh commands (abi: js)",
1544
1544
  type: "module",
1545
1545
  license: "Apache-2.0",
@@ -3144,10 +3144,10 @@ function createBuffer() {
3144
3144
  e.code = "ERR_INVALID_ARG_TYPE";
3145
3145
  throw e;
3146
3146
  }
3147
- if (value instanceof ArrayBuffer) {
3147
+ if (value instanceof ArrayBuffer || typeof SharedArrayBuffer === "function" && value instanceof SharedArrayBuffer) {
3148
3148
  const offset2 = encodingOrOffset ?? 0;
3149
3149
  const len = length ?? value.byteLength - offset2;
3150
- return Buffer2.fromBytes(new Uint8Array(value, offset2, len));
3150
+ return new Buffer2(value, offset2, len);
3151
3151
  }
3152
3152
  if (value instanceof Uint8Array || Array.isArray(value) || ArrayBuffer.isView(value)) {
3153
3153
  return Buffer2.fromBytes(asUint8(value));
@@ -3291,12 +3291,13 @@ function createBuffer() {
3291
3291
  if (!isBufView(target)) throwBufferArgType("target", target);
3292
3292
  return Buffer2.compare(this, target);
3293
3293
  }
3294
+ // Node: both are views on the same memory (slice is subarray's old name).
3294
3295
  slice(start, end) {
3295
- return Buffer2.fromBytes(Uint8Array.prototype.slice.call(this, start, end));
3296
+ return this.subarray(start, end);
3296
3297
  }
3297
3298
  subarray(start, end) {
3298
3299
  const view = Uint8Array.prototype.subarray.call(this, start, end);
3299
- return Buffer2.fromBytes(view);
3300
+ return new Buffer2(view.buffer, view.byteOffset, view.length);
3300
3301
  }
3301
3302
  fill(value, offset2 = 0, end = this.length, encoding = "utf8") {
3302
3303
  if (typeof offset2 === "string") {
@@ -14729,6 +14730,94 @@ function notSupported3(id) {
14729
14730
  err.code = "ERR_NOT_SUPPORTED";
14730
14731
  throw err;
14731
14732
  }
14733
+ function describeReceived(value) {
14734
+ if (value === null) return "null";
14735
+ if (value === void 0) return "undefined";
14736
+ if (typeof value === "string") return `type string ('${value}')`;
14737
+ if (typeof value === "function") return `function ${value.name || "<anonymous>"}`;
14738
+ if (typeof value === "object") return `an instance of ${value.constructor?.name || "Object"}`;
14739
+ return `type ${typeof value} (${String(value)})`;
14740
+ }
14741
+ function invalidArgType(name, expected, value) {
14742
+ const err = new TypeError(
14743
+ `The "${name}" argument must be ${expected}. Received ${describeReceived(value)}`
14744
+ );
14745
+ err.code = "ERR_INVALID_ARG_TYPE";
14746
+ return err;
14747
+ }
14748
+ var TRANSCODE_ENCODINGS = {
14749
+ ascii: "ascii",
14750
+ latin1: "latin1",
14751
+ binary: "latin1",
14752
+ ucs2: "utf16le",
14753
+ "ucs-2": "utf16le",
14754
+ utf16le: "utf16le",
14755
+ "utf-16le": "utf16le",
14756
+ utf8: "utf8",
14757
+ "utf-8": "utf8"
14758
+ };
14759
+ function bufferModule(Buffer2) {
14760
+ const MAX_LENGTH = 2 ** 53 - 1;
14761
+ const MAX_STRING_LENGTH = 536870888;
14762
+ const fatal = new TextDecoder("utf-8", { fatal: true });
14763
+ const bytesOf = (input) => {
14764
+ if (input instanceof ArrayBuffer) return new Uint8Array(input);
14765
+ if (typeof SharedArrayBuffer === "function" && input instanceof SharedArrayBuffer) {
14766
+ return new Uint8Array(input);
14767
+ }
14768
+ if (ArrayBuffer.isView(input)) return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
14769
+ throw invalidArgType("input", "an instance of ArrayBuffer, Buffer, or TypedArray", input);
14770
+ };
14771
+ function SlowBuffer(size) {
14772
+ return Buffer2.allocUnsafeSlow(size);
14773
+ }
14774
+ return {
14775
+ Buffer: Buffer2,
14776
+ SlowBuffer,
14777
+ /**
14778
+ * Node's transcode (ICU): text a target cannot hold becomes '?', as ICU's
14779
+ * substitution does; invalid UTF-8 decodes to U+FFFD first.
14780
+ */
14781
+ transcode(source, fromEnc, toEnc) {
14782
+ if (!(source instanceof Uint8Array)) {
14783
+ throw invalidArgType("source", "an instance of Buffer or Uint8Array", source);
14784
+ }
14785
+ const from = TRANSCODE_ENCODINGS[String(fromEnc).toLowerCase()];
14786
+ const to = TRANSCODE_ENCODINGS[String(toEnc).toLowerCase()];
14787
+ if (!from || !to) {
14788
+ const err = new Error("Unable to transcode Buffer [U_ILLEGAL_ARGUMENT_ERROR]");
14789
+ err.code = "U_ILLEGAL_ARGUMENT_ERROR";
14790
+ err.errno = 1;
14791
+ throw err;
14792
+ }
14793
+ let text = Buffer2.from(source).toString(from);
14794
+ if (to === "latin1") text = text.replace(/[^\u0000-\u00ff]/gu, "?");
14795
+ else if (to === "ascii") text = text.replace(/[^\u0000-\u007f]/gu, "?");
14796
+ return Buffer2.from(text, to);
14797
+ },
14798
+ isUtf8(input) {
14799
+ const bytes = bytesOf(input);
14800
+ try {
14801
+ fatal.decode(bytes);
14802
+ return true;
14803
+ } catch {
14804
+ return false;
14805
+ }
14806
+ },
14807
+ isAscii(input) {
14808
+ return bytesOf(input).every((b) => b < 128);
14809
+ },
14810
+ kMaxLength: MAX_LENGTH,
14811
+ kStringMaxLength: MAX_STRING_LENGTH,
14812
+ btoa: globalThis.btoa,
14813
+ atob: globalThis.atob,
14814
+ constants: { MAX_LENGTH, MAX_STRING_LENGTH },
14815
+ INSPECT_MAX_BYTES: 50,
14816
+ Blob: globalThis.Blob,
14817
+ File: globalThis.File,
14818
+ resolveObjectURL: () => void 0
14819
+ };
14820
+ }
14732
14821
  function createBuiltins({ ctx, process: process2, Buffer: Buffer2, console: console2, path, handles, timers }) {
14733
14822
  const util2 = createUtil();
14734
14823
  const events = createEvents();
@@ -14777,10 +14866,11 @@ function createBuiltins({ ctx, process: process2, Buffer: Buffer2, console: cons
14777
14866
  }
14778
14867
  return childProcess;
14779
14868
  };
14869
+ let bufferExports;
14780
14870
  let ModuleExport = null;
14781
14871
  const implemented = {
14782
14872
  process: () => process2,
14783
- buffer: () => ({ Buffer: Buffer2, kMaxLength: 2147483647, INSPECT_MAX_BYTES: 50 }),
14873
+ buffer: () => bufferExports ??= bufferModule(Buffer2),
14784
14874
  console: () => console2,
14785
14875
  path: () => path,
14786
14876
  "path/posix": () => path,
@@ -16527,7 +16617,7 @@ function numericExitCode(value) {
16527
16617
  const n = Number(value);
16528
16618
  return Number.isFinite(n) ? n & 255 : 0;
16529
16619
  }
16530
- function describeReceived(value) {
16620
+ function describeReceived2(value) {
16531
16621
  if (typeof value === "string") return `type string ('${value}')`;
16532
16622
  if (typeof value === "boolean") return `type boolean (${value})`;
16533
16623
  if (typeof value === "bigint") return `type bigint (${value}n)`;
@@ -16541,7 +16631,7 @@ function assignProcessExitCode(value) {
16541
16631
  const n = Number(value);
16542
16632
  if (value !== "" && Number.isInteger(n)) return n === 0 ? 0 : n;
16543
16633
  const err2 = new TypeError(
16544
- `The "code" argument must be of type number. Received ${describeReceived(value)}`
16634
+ `The "code" argument must be of type number. Received ${describeReceived2(value)}`
16545
16635
  );
16546
16636
  err2.code = "ERR_INVALID_ARG_TYPE";
16547
16637
  throw err2;
@@ -16555,7 +16645,7 @@ function assignProcessExitCode(value) {
16555
16645
  throw err2;
16556
16646
  }
16557
16647
  const err = new TypeError(
16558
- `The "code" argument must be of type number. Received ${describeReceived(value)}`
16648
+ `The "code" argument must be of type number. Received ${describeReceived2(value)}`
16559
16649
  );
16560
16650
  err.code = "ERR_INVALID_ARG_TYPE";
16561
16651
  throw err;
@@ -16642,6 +16732,32 @@ function toBytes2(value) {
16642
16732
  if (value == null) return "";
16643
16733
  return String(value);
16644
16734
  }
16735
+ function createEnv(initial) {
16736
+ const target = { ...initial };
16737
+ const coerce = (value) => {
16738
+ if (typeof value === "symbol") {
16739
+ throw new TypeError("Cannot convert a Symbol value to a string");
16740
+ }
16741
+ return String(value);
16742
+ };
16743
+ return new Proxy(target, {
16744
+ set(t, key, value) {
16745
+ if (typeof key === "symbol") {
16746
+ t[key] = value;
16747
+ return true;
16748
+ }
16749
+ t[key] = coerce(value);
16750
+ return true;
16751
+ },
16752
+ defineProperty(t, key, desc) {
16753
+ if (typeof key !== "symbol" && "value" in desc) {
16754
+ t[key] = coerce(desc.value);
16755
+ return true;
16756
+ }
16757
+ return Reflect.defineProperty(t, key, desc);
16758
+ }
16759
+ });
16760
+ }
16645
16761
  function writableStream(fd, writeSync, isTTY) {
16646
16762
  const ee = new EventEmitter();
16647
16763
  return {
@@ -16922,7 +17038,7 @@ var Process = class extends EventEmitter {
16922
17038
  this._onExit = onExit;
16923
17039
  this.argv = argv.slice();
16924
17040
  this.argv0 = argv[0] ?? "node";
16925
- this.env = { ...ctx.env };
17041
+ this.env = createEnv(ctx.env);
16926
17042
  this.versions = { node: NODE_SHIM_VERSION };
16927
17043
  this.version = `v${NODE_SHIM_VERSION}`;
16928
17044
  this.platform = "linux";
@@ -1 +1 @@
1
- {"inputs":{"package.json":{"bytes":2579,"imports":[],"format":"esm","with":{"type":"json"}},"src/jsh/parse-flags.mjs":{"bytes":1829,"imports":[],"format":"esm"},"src/jsh/sliccy/exec.mjs":{"bytes":4790,"imports":[],"format":"esm"},"src/jsh/sliccy/http.mjs":{"bytes":5865,"imports":[],"format":"esm"},"src/jsh/sliccy/pure.mjs":{"bytes":7087,"imports":[],"format":"esm"},"src/jsh/sliccy/index.mjs":{"bytes":2910,"imports":[{"path":"src/jsh/sliccy/exec.mjs","kind":"import-statement","original":"./exec.mjs"},{"path":"src/jsh/sliccy/http.mjs","kind":"import-statement","original":"./http.mjs"},{"path":"src/jsh/sliccy/pure.mjs","kind":"import-statement","original":"./pure.mjs"}],"format":"esm"},"src/jsh/run.mjs":{"bytes":5011,"imports":[{"path":"package.json","kind":"import-statement","original":"../../package.json","with":{"type":"json"}},{"path":"src/jsh/parse-flags.mjs","kind":"import-statement","original":"./parse-flags.mjs"},{"path":"src/jsh/sliccy/index.mjs","kind":"import-statement","original":"./sliccy/index.mjs"}],"format":"esm"},"src/jsh/kernel.mjs":{"bytes":5988,"imports":[{"path":"src/jsh/run.mjs","kind":"import-statement","original":"./run.mjs"}],"format":"esm"},"src/runtime/async-handles.mjs":{"bytes":3529,"imports":[],"format":"esm"},"src/runtime/buffer.mjs":{"bytes":37245,"imports":[],"format":"esm"},"node_modules/node-inspect-extracted/dist/inspect.js":{"bytes":51340,"imports":[],"format":"cjs"},"node_modules/node-inspect-extracted/index.mjs":{"bytes":380,"imports":[{"path":"node_modules/node-inspect-extracted/dist/inspect.js","kind":"import-statement","original":"./dist/inspect.js"}],"format":"esm"},"src/runtime/builtins/util.mjs":{"bytes":4208,"imports":[{"path":"node_modules/node-inspect-extracted/index.mjs","kind":"import-statement","original":"node-inspect-extracted"}],"format":"esm"},"node_modules/acorn/dist/acorn.mjs":{"bytes":234658,"imports":[],"format":"esm"},"src/runtime/esm/transform.mjs":{"bytes":25854,"imports":[{"path":"node_modules/acorn/dist/acorn.mjs","kind":"import-statement","original":"acorn"}],"format":"esm"},"src/runtime/path.mjs":{"bytes":4249,"imports":[],"format":"esm"},"src/runtime/builtins/assert.mjs":{"bytes":20298,"imports":[{"path":"node_modules/node-inspect-extracted/index.mjs","kind":"import-statement","original":"node-inspect-extracted"}],"format":"esm"},"src/runtime/builtins/events.mjs":{"bytes":2406,"imports":[],"format":"esm"},"src/runtime/builtins/child-process.mjs":{"bytes":17552,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/fs.mjs":{"bytes":49973,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"}],"format":"esm"},"src/runtime/builtins/http.mjs":{"bytes":30054,"imports":[{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/https.mjs":{"bytes":8217,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/net.mjs":{"bytes":17353,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/os.mjs":{"bytes":719,"imports":[],"format":"esm"},"src/runtime/builtins/querystring.mjs":{"bytes":1235,"imports":[],"format":"esm"},"src/runtime/vendor-embedded.mjs":{"bytes":242925,"imports":[],"format":"esm"},"src/runtime/vendor-load.mjs":{"bytes":3872,"imports":[{"path":"src/runtime/vendor-embedded.mjs","kind":"import-statement","original":"./vendor-embedded.mjs"}],"format":"esm"},"src/runtime/builtins/stream.mjs":{"bytes":1276,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/vendor-load.mjs","kind":"import-statement","original":"../vendor-load.mjs"}],"format":"esm"},"src/runtime/builtins/string-decoder.mjs":{"bytes":3902,"imports":[{"path":"src/runtime/vendor-load.mjs","kind":"import-statement","original":"../vendor-load.mjs"}],"format":"esm"},"src/runtime/builtins/timers-module.mjs":{"bytes":1138,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"}],"format":"esm"},"src/runtime/builtins/url.mjs":{"bytes":1774,"imports":[],"format":"esm"},"src/runtime/cjs/builtins.mjs":{"bytes":4969,"imports":[{"path":"src/runtime/builtins/assert.mjs","kind":"import-statement","original":"../builtins/assert.mjs"},{"path":"src/runtime/builtins/child-process.mjs","kind":"import-statement","original":"../builtins/child-process.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"../builtins/events.mjs"},{"path":"src/runtime/builtins/fs.mjs","kind":"import-statement","original":"../builtins/fs.mjs"},{"path":"src/runtime/builtins/http.mjs","kind":"import-statement","original":"../builtins/http.mjs"},{"path":"src/runtime/builtins/https.mjs","kind":"import-statement","original":"../builtins/https.mjs"},{"path":"src/runtime/builtins/net.mjs","kind":"import-statement","original":"../builtins/net.mjs"},{"path":"src/runtime/builtins/os.mjs","kind":"import-statement","original":"../builtins/os.mjs"},{"path":"src/runtime/builtins/querystring.mjs","kind":"import-statement","original":"../builtins/querystring.mjs"},{"path":"src/runtime/builtins/stream.mjs","kind":"import-statement","original":"../builtins/stream.mjs"},{"path":"src/runtime/builtins/string-decoder.mjs","kind":"import-statement","original":"../builtins/string-decoder.mjs"},{"path":"src/runtime/builtins/timers-module.mjs","kind":"import-statement","original":"../builtins/timers-module.mjs"},{"path":"src/runtime/builtins/url.mjs","kind":"import-statement","original":"../builtins/url.mjs"},{"path":"src/runtime/builtins/util.mjs","kind":"import-statement","original":"../builtins/util.mjs"}],"format":"esm"},"src/runtime/cjs/errors.mjs":{"bytes":882,"imports":[],"format":"esm"},"src/runtime/cjs/resolve.mjs":{"bytes":9966,"imports":[{"path":"src/runtime/cjs/errors.mjs","kind":"import-statement","original":"./errors.mjs"}],"format":"esm"},"src/runtime/cjs/loader.mjs":{"bytes":13441,"imports":[{"path":"src/runtime/esm/transform.mjs","kind":"import-statement","original":"../esm/transform.mjs"},{"path":"src/runtime/path.mjs","kind":"import-statement","original":"../path.mjs"},{"path":"src/runtime/cjs/builtins.mjs","kind":"import-statement","original":"./builtins.mjs"},{"path":"src/runtime/cjs/resolve.mjs","kind":"import-statement","original":"./resolve.mjs"}],"format":"esm"},"src/runtime/cli.mjs":{"bytes":2291,"imports":[],"format":"esm"},"src/runtime/console.mjs":{"bytes":4413,"imports":[],"format":"esm"},"src/runtime/esm/loader.mjs":{"bytes":13211,"imports":[{"path":"src/runtime/path.mjs","kind":"import-statement","original":"../path.mjs"},{"path":"src/runtime/cjs/resolve.mjs","kind":"import-statement","original":"../cjs/resolve.mjs"},{"path":"src/runtime/esm/transform.mjs","kind":"import-statement","original":"./transform.mjs"}],"format":"esm"},"src/runtime/stack.mjs":{"bytes":8404,"imports":[],"format":"esm"},"src/runtime/errors-format.mjs":{"bytes":12309,"imports":[{"path":"src/runtime/stack.mjs","kind":"import-statement","original":"./stack.mjs"}],"format":"esm"},"src/runtime/exit.mjs":{"bytes":2862,"imports":[],"format":"esm"},"src/runtime/handles.mjs":{"bytes":800,"imports":[],"format":"esm"},"src/runtime/next-tick.mjs":{"bytes":1440,"imports":[],"format":"esm"},"src/runtime/process.mjs":{"bytes":16587,"imports":[{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./builtins/events.mjs"},{"path":"src/runtime/exit.mjs","kind":"import-statement","original":"./exit.mjs"}],"format":"esm"},"src/runtime/timers.mjs":{"bytes":4489,"imports":[],"format":"esm"},"src/runtime/web/fetch.mjs":{"bytes":2349,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"}],"format":"esm"},"src/runtime/web/websocket.mjs":{"bytes":9771,"imports":[{"path":"src/runtime/exit.mjs","kind":"import-statement","original":"../exit.mjs"}],"format":"esm"},"src/runtime/run.mjs":{"bytes":20550,"imports":[{"path":"src/jsh/kernel.mjs","kind":"import-statement","original":"../jsh/kernel.mjs"},{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"./async-handles.mjs"},{"path":"src/runtime/buffer.mjs","kind":"import-statement","original":"./buffer.mjs"},{"path":"src/runtime/builtins/util.mjs","kind":"import-statement","original":"./builtins/util.mjs"},{"path":"src/runtime/cjs/loader.mjs","kind":"import-statement","original":"./cjs/loader.mjs"},{"path":"src/runtime/cli.mjs","kind":"import-statement","original":"./cli.mjs"},{"path":"src/runtime/console.mjs","kind":"import-statement","original":"./console.mjs"},{"path":"src/runtime/esm/loader.mjs","kind":"import-statement","original":"./esm/loader.mjs"},{"path":"src/runtime/esm/transform.mjs","kind":"import-statement","original":"./esm/transform.mjs"},{"path":"src/runtime/errors-format.mjs","kind":"import-statement","original":"./errors-format.mjs"},{"path":"src/runtime/exit.mjs","kind":"import-statement","original":"./exit.mjs"},{"path":"src/runtime/handles.mjs","kind":"import-statement","original":"./handles.mjs"},{"path":"src/runtime/next-tick.mjs","kind":"import-statement","original":"./next-tick.mjs"},{"path":"src/runtime/process.mjs","kind":"import-statement","original":"./process.mjs"},{"path":"src/runtime/stack.mjs","kind":"import-statement","original":"./stack.mjs"},{"path":"src/runtime/timers.mjs","kind":"import-statement","original":"./timers.mjs"},{"path":"src/runtime/web/fetch.mjs","kind":"import-statement","original":"./web/fetch.mjs"},{"path":"src/runtime/web/websocket.mjs","kind":"import-statement","original":"./web/websocket.mjs"}],"format":"esm"},"src/node.mjs":{"bytes":233,"imports":[{"path":"src/runtime/run.mjs","kind":"import-statement","original":"./runtime/run.mjs"}],"format":"esm"},"src/jsh.mjs":{"bytes":1273,"imports":[{"path":"src/jsh/kernel.mjs","kind":"import-statement","original":"./jsh/kernel.mjs"},{"path":"src/jsh/run.mjs","kind":"import-statement","original":"./jsh/run.mjs"},{"path":"src/runtime/run.mjs","kind":"import-statement","original":"./runtime/run.mjs"}],"format":"esm"}},"outputs":{"dist/node.mjs":{"imports":[],"exports":["default"],"entryPoint":"src/node.mjs","inputs":{"node_modules/node-inspect-extracted/dist/inspect.js":{"bytesInOutput":86401},"package.json":{"bytesInOutput":2504},"src/jsh/parse-flags.mjs":{"bytesInOutput":1558},"src/jsh/sliccy/exec.mjs":{"bytesInOutput":4077},"src/jsh/sliccy/http.mjs":{"bytesInOutput":5497},"src/jsh/sliccy/pure.mjs":{"bytesInOutput":6246},"src/jsh/sliccy/index.mjs":{"bytesInOutput":2229},"src/jsh/run.mjs":{"bytesInOutput":2830},"src/jsh/kernel.mjs":{"bytesInOutput":4661},"src/runtime/async-handles.mjs":{"bytesInOutput":1692},"src/runtime/buffer.mjs":{"bytesInOutput":36834},"node_modules/node-inspect-extracted/index.mjs":{"bytesInOutput":387},"src/runtime/builtins/util.mjs":{"bytesInOutput":3726},"node_modules/acorn/dist/acorn.mjs":{"bytesInOutput":203908},"src/runtime/esm/transform.mjs":{"bytesInOutput":20720},"src/runtime/path.mjs":{"bytesInOutput":4196},"src/runtime/builtins/assert.mjs":{"bytesInOutput":19383},"src/runtime/builtins/events.mjs":{"bytesInOutput":2336},"src/runtime/builtins/child-process.mjs":{"bytesInOutput":15697},"src/runtime/builtins/fs.mjs":{"bytesInOutput":47310},"src/runtime/builtins/http.mjs":{"bytesInOutput":27190},"src/runtime/builtins/https.mjs":{"bytesInOutput":7341},"src/runtime/builtins/net.mjs":{"bytesInOutput":14529},"src/runtime/builtins/os.mjs":{"bytesInOutput":648},"src/runtime/builtins/querystring.mjs":{"bytesInOutput":1197},"src/runtime/vendor-embedded.mjs":{"bytesInOutput":241089},"src/runtime/vendor-load.mjs":{"bytesInOutput":2914},"src/runtime/builtins/stream.mjs":{"bytesInOutput":1139},"src/runtime/builtins/string-decoder.mjs":{"bytesInOutput":3222},"src/runtime/builtins/timers-module.mjs":{"bytesInOutput":969},"src/runtime/builtins/url.mjs":{"bytesInOutput":1697},"src/runtime/cjs/builtins.mjs":{"bytesInOutput":4158},"src/runtime/cjs/errors.mjs":{"bytesInOutput":574},"src/runtime/cjs/resolve.mjs":{"bytesInOutput":8866},"src/runtime/cjs/loader.mjs":{"bytesInOutput":11203},"src/runtime/cli.mjs":{"bytesInOutput":2165},"src/runtime/console.mjs":{"bytesInOutput":4414},"src/runtime/esm/loader.mjs":{"bytesInOutput":11095},"src/runtime/stack.mjs":{"bytesInOutput":6887},"src/runtime/errors-format.mjs":{"bytesInOutput":10162},"src/runtime/exit.mjs":{"bytesInOutput":2237},"src/runtime/handles.mjs":{"bytesInOutput":688},"src/runtime/next-tick.mjs":{"bytesInOutput":1072},"src/runtime/process.mjs":{"bytesInOutput":15385},"src/runtime/timers.mjs":{"bytesInOutput":3949},"src/runtime/web/fetch.mjs":{"bytesInOutput":1982},"src/runtime/web/websocket.mjs":{"bytesInOutput":8204},"src/runtime/run.mjs":{"bytesInOutput":15619},"src/node.mjs":{"bytesInOutput":52}},"bytes":885799},"dist/jsh.mjs":{"imports":[],"exports":["default"],"entryPoint":"src/jsh.mjs","inputs":{"node_modules/node-inspect-extracted/dist/inspect.js":{"bytesInOutput":86401},"package.json":{"bytesInOutput":2504},"src/jsh/parse-flags.mjs":{"bytesInOutput":1558},"src/jsh/sliccy/exec.mjs":{"bytesInOutput":4077},"src/jsh/sliccy/http.mjs":{"bytesInOutput":5497},"src/jsh/sliccy/pure.mjs":{"bytesInOutput":6246},"src/jsh/sliccy/index.mjs":{"bytesInOutput":2229},"src/jsh/run.mjs":{"bytesInOutput":2830},"src/jsh/kernel.mjs":{"bytesInOutput":4661},"src/runtime/async-handles.mjs":{"bytesInOutput":1692},"src/runtime/buffer.mjs":{"bytesInOutput":36834},"node_modules/node-inspect-extracted/index.mjs":{"bytesInOutput":387},"src/runtime/builtins/util.mjs":{"bytesInOutput":3726},"node_modules/acorn/dist/acorn.mjs":{"bytesInOutput":203908},"src/runtime/esm/transform.mjs":{"bytesInOutput":20720},"src/runtime/path.mjs":{"bytesInOutput":4196},"src/runtime/builtins/assert.mjs":{"bytesInOutput":19383},"src/runtime/builtins/events.mjs":{"bytesInOutput":2336},"src/runtime/builtins/child-process.mjs":{"bytesInOutput":15697},"src/runtime/builtins/fs.mjs":{"bytesInOutput":47310},"src/runtime/builtins/http.mjs":{"bytesInOutput":27190},"src/runtime/builtins/https.mjs":{"bytesInOutput":7341},"src/runtime/builtins/net.mjs":{"bytesInOutput":14529},"src/runtime/builtins/os.mjs":{"bytesInOutput":648},"src/runtime/builtins/querystring.mjs":{"bytesInOutput":1197},"src/runtime/vendor-embedded.mjs":{"bytesInOutput":241089},"src/runtime/vendor-load.mjs":{"bytesInOutput":2914},"src/runtime/builtins/stream.mjs":{"bytesInOutput":1139},"src/runtime/builtins/string-decoder.mjs":{"bytesInOutput":3222},"src/runtime/builtins/timers-module.mjs":{"bytesInOutput":969},"src/runtime/builtins/url.mjs":{"bytesInOutput":1697},"src/runtime/cjs/builtins.mjs":{"bytesInOutput":4158},"src/runtime/cjs/errors.mjs":{"bytesInOutput":574},"src/runtime/cjs/resolve.mjs":{"bytesInOutput":8866},"src/runtime/cjs/loader.mjs":{"bytesInOutput":11203},"src/runtime/cli.mjs":{"bytesInOutput":2165},"src/runtime/console.mjs":{"bytesInOutput":4414},"src/runtime/esm/loader.mjs":{"bytesInOutput":11095},"src/runtime/stack.mjs":{"bytesInOutput":6887},"src/runtime/errors-format.mjs":{"bytesInOutput":10162},"src/runtime/exit.mjs":{"bytesInOutput":2237},"src/runtime/handles.mjs":{"bytesInOutput":688},"src/runtime/next-tick.mjs":{"bytesInOutput":1072},"src/runtime/process.mjs":{"bytesInOutput":15385},"src/runtime/timers.mjs":{"bytesInOutput":3949},"src/runtime/web/fetch.mjs":{"bytesInOutput":1982},"src/runtime/web/websocket.mjs":{"bytesInOutput":8204},"src/runtime/run.mjs":{"bytesInOutput":15619},"src/jsh.mjs":{"bytesInOutput":761}},"bytes":886507}}}
1
+ {"inputs":{"package.json":{"bytes":2579,"imports":[],"format":"esm","with":{"type":"json"}},"src/jsh/parse-flags.mjs":{"bytes":1829,"imports":[],"format":"esm"},"src/jsh/sliccy/exec.mjs":{"bytes":4790,"imports":[],"format":"esm"},"src/jsh/sliccy/http.mjs":{"bytes":5865,"imports":[],"format":"esm"},"src/jsh/sliccy/pure.mjs":{"bytes":7087,"imports":[],"format":"esm"},"src/jsh/sliccy/index.mjs":{"bytes":2910,"imports":[{"path":"src/jsh/sliccy/exec.mjs","kind":"import-statement","original":"./exec.mjs"},{"path":"src/jsh/sliccy/http.mjs","kind":"import-statement","original":"./http.mjs"},{"path":"src/jsh/sliccy/pure.mjs","kind":"import-statement","original":"./pure.mjs"}],"format":"esm"},"src/jsh/run.mjs":{"bytes":5011,"imports":[{"path":"package.json","kind":"import-statement","original":"../../package.json","with":{"type":"json"}},{"path":"src/jsh/parse-flags.mjs","kind":"import-statement","original":"./parse-flags.mjs"},{"path":"src/jsh/sliccy/index.mjs","kind":"import-statement","original":"./sliccy/index.mjs"}],"format":"esm"},"src/jsh/kernel.mjs":{"bytes":5988,"imports":[{"path":"src/jsh/run.mjs","kind":"import-statement","original":"./run.mjs"}],"format":"esm"},"src/runtime/async-handles.mjs":{"bytes":3529,"imports":[],"format":"esm"},"src/runtime/buffer.mjs":{"bytes":37454,"imports":[],"format":"esm"},"node_modules/node-inspect-extracted/dist/inspect.js":{"bytes":51340,"imports":[],"format":"cjs"},"node_modules/node-inspect-extracted/index.mjs":{"bytes":380,"imports":[{"path":"node_modules/node-inspect-extracted/dist/inspect.js","kind":"import-statement","original":"./dist/inspect.js"}],"format":"esm"},"src/runtime/builtins/util.mjs":{"bytes":4208,"imports":[{"path":"node_modules/node-inspect-extracted/index.mjs","kind":"import-statement","original":"node-inspect-extracted"}],"format":"esm"},"node_modules/acorn/dist/acorn.mjs":{"bytes":234658,"imports":[],"format":"esm"},"src/runtime/esm/transform.mjs":{"bytes":25854,"imports":[{"path":"node_modules/acorn/dist/acorn.mjs","kind":"import-statement","original":"acorn"}],"format":"esm"},"src/runtime/path.mjs":{"bytes":4249,"imports":[],"format":"esm"},"src/runtime/builtins/assert.mjs":{"bytes":20298,"imports":[{"path":"node_modules/node-inspect-extracted/index.mjs","kind":"import-statement","original":"node-inspect-extracted"}],"format":"esm"},"src/runtime/builtins/events.mjs":{"bytes":2406,"imports":[],"format":"esm"},"src/runtime/builtins/child-process.mjs":{"bytes":17552,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/fs.mjs":{"bytes":49973,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"}],"format":"esm"},"src/runtime/builtins/http.mjs":{"bytes":30054,"imports":[{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/https.mjs":{"bytes":8217,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/net.mjs":{"bytes":17353,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./events.mjs"}],"format":"esm"},"src/runtime/builtins/os.mjs":{"bytes":719,"imports":[],"format":"esm"},"src/runtime/builtins/querystring.mjs":{"bytes":1235,"imports":[],"format":"esm"},"src/runtime/vendor-embedded.mjs":{"bytes":242925,"imports":[],"format":"esm"},"src/runtime/vendor-load.mjs":{"bytes":3872,"imports":[{"path":"src/runtime/vendor-embedded.mjs","kind":"import-statement","original":"./vendor-embedded.mjs"}],"format":"esm"},"src/runtime/builtins/stream.mjs":{"bytes":1276,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"},{"path":"src/runtime/vendor-load.mjs","kind":"import-statement","original":"../vendor-load.mjs"}],"format":"esm"},"src/runtime/builtins/string-decoder.mjs":{"bytes":3902,"imports":[{"path":"src/runtime/vendor-load.mjs","kind":"import-statement","original":"../vendor-load.mjs"}],"format":"esm"},"src/runtime/builtins/timers-module.mjs":{"bytes":1138,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"}],"format":"esm"},"src/runtime/builtins/url.mjs":{"bytes":1774,"imports":[],"format":"esm"},"src/runtime/cjs/builtins.mjs":{"bytes":8174,"imports":[{"path":"src/runtime/builtins/assert.mjs","kind":"import-statement","original":"../builtins/assert.mjs"},{"path":"src/runtime/builtins/child-process.mjs","kind":"import-statement","original":"../builtins/child-process.mjs"},{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"../builtins/events.mjs"},{"path":"src/runtime/builtins/fs.mjs","kind":"import-statement","original":"../builtins/fs.mjs"},{"path":"src/runtime/builtins/http.mjs","kind":"import-statement","original":"../builtins/http.mjs"},{"path":"src/runtime/builtins/https.mjs","kind":"import-statement","original":"../builtins/https.mjs"},{"path":"src/runtime/builtins/net.mjs","kind":"import-statement","original":"../builtins/net.mjs"},{"path":"src/runtime/builtins/os.mjs","kind":"import-statement","original":"../builtins/os.mjs"},{"path":"src/runtime/builtins/querystring.mjs","kind":"import-statement","original":"../builtins/querystring.mjs"},{"path":"src/runtime/builtins/stream.mjs","kind":"import-statement","original":"../builtins/stream.mjs"},{"path":"src/runtime/builtins/string-decoder.mjs","kind":"import-statement","original":"../builtins/string-decoder.mjs"},{"path":"src/runtime/builtins/timers-module.mjs","kind":"import-statement","original":"../builtins/timers-module.mjs"},{"path":"src/runtime/builtins/url.mjs","kind":"import-statement","original":"../builtins/url.mjs"},{"path":"src/runtime/builtins/util.mjs","kind":"import-statement","original":"../builtins/util.mjs"}],"format":"esm"},"src/runtime/cjs/errors.mjs":{"bytes":882,"imports":[],"format":"esm"},"src/runtime/cjs/resolve.mjs":{"bytes":9966,"imports":[{"path":"src/runtime/cjs/errors.mjs","kind":"import-statement","original":"./errors.mjs"}],"format":"esm"},"src/runtime/cjs/loader.mjs":{"bytes":13441,"imports":[{"path":"src/runtime/esm/transform.mjs","kind":"import-statement","original":"../esm/transform.mjs"},{"path":"src/runtime/path.mjs","kind":"import-statement","original":"../path.mjs"},{"path":"src/runtime/cjs/builtins.mjs","kind":"import-statement","original":"./builtins.mjs"},{"path":"src/runtime/cjs/resolve.mjs","kind":"import-statement","original":"./resolve.mjs"}],"format":"esm"},"src/runtime/cli.mjs":{"bytes":2291,"imports":[],"format":"esm"},"src/runtime/console.mjs":{"bytes":4413,"imports":[],"format":"esm"},"src/runtime/esm/loader.mjs":{"bytes":13211,"imports":[{"path":"src/runtime/path.mjs","kind":"import-statement","original":"../path.mjs"},{"path":"src/runtime/cjs/resolve.mjs","kind":"import-statement","original":"../cjs/resolve.mjs"},{"path":"src/runtime/esm/transform.mjs","kind":"import-statement","original":"./transform.mjs"}],"format":"esm"},"src/runtime/stack.mjs":{"bytes":8404,"imports":[],"format":"esm"},"src/runtime/errors-format.mjs":{"bytes":12309,"imports":[{"path":"src/runtime/stack.mjs","kind":"import-statement","original":"./stack.mjs"}],"format":"esm"},"src/runtime/exit.mjs":{"bytes":2862,"imports":[],"format":"esm"},"src/runtime/handles.mjs":{"bytes":800,"imports":[],"format":"esm"},"src/runtime/next-tick.mjs":{"bytes":1440,"imports":[],"format":"esm"},"src/runtime/process.mjs":{"bytes":17412,"imports":[{"path":"src/runtime/builtins/events.mjs","kind":"import-statement","original":"./builtins/events.mjs"},{"path":"src/runtime/exit.mjs","kind":"import-statement","original":"./exit.mjs"}],"format":"esm"},"src/runtime/timers.mjs":{"bytes":4489,"imports":[],"format":"esm"},"src/runtime/web/fetch.mjs":{"bytes":2349,"imports":[{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"../async-handles.mjs"}],"format":"esm"},"src/runtime/web/websocket.mjs":{"bytes":9771,"imports":[{"path":"src/runtime/exit.mjs","kind":"import-statement","original":"../exit.mjs"}],"format":"esm"},"src/runtime/run.mjs":{"bytes":20550,"imports":[{"path":"src/jsh/kernel.mjs","kind":"import-statement","original":"../jsh/kernel.mjs"},{"path":"src/runtime/async-handles.mjs","kind":"import-statement","original":"./async-handles.mjs"},{"path":"src/runtime/buffer.mjs","kind":"import-statement","original":"./buffer.mjs"},{"path":"src/runtime/builtins/util.mjs","kind":"import-statement","original":"./builtins/util.mjs"},{"path":"src/runtime/cjs/loader.mjs","kind":"import-statement","original":"./cjs/loader.mjs"},{"path":"src/runtime/cli.mjs","kind":"import-statement","original":"./cli.mjs"},{"path":"src/runtime/console.mjs","kind":"import-statement","original":"./console.mjs"},{"path":"src/runtime/esm/loader.mjs","kind":"import-statement","original":"./esm/loader.mjs"},{"path":"src/runtime/esm/transform.mjs","kind":"import-statement","original":"./esm/transform.mjs"},{"path":"src/runtime/errors-format.mjs","kind":"import-statement","original":"./errors-format.mjs"},{"path":"src/runtime/exit.mjs","kind":"import-statement","original":"./exit.mjs"},{"path":"src/runtime/handles.mjs","kind":"import-statement","original":"./handles.mjs"},{"path":"src/runtime/next-tick.mjs","kind":"import-statement","original":"./next-tick.mjs"},{"path":"src/runtime/process.mjs","kind":"import-statement","original":"./process.mjs"},{"path":"src/runtime/stack.mjs","kind":"import-statement","original":"./stack.mjs"},{"path":"src/runtime/timers.mjs","kind":"import-statement","original":"./timers.mjs"},{"path":"src/runtime/web/fetch.mjs","kind":"import-statement","original":"./web/fetch.mjs"},{"path":"src/runtime/web/websocket.mjs","kind":"import-statement","original":"./web/websocket.mjs"}],"format":"esm"},"src/node.mjs":{"bytes":233,"imports":[{"path":"src/runtime/run.mjs","kind":"import-statement","original":"./runtime/run.mjs"}],"format":"esm"},"src/jsh.mjs":{"bytes":1273,"imports":[{"path":"src/jsh/kernel.mjs","kind":"import-statement","original":"./jsh/kernel.mjs"},{"path":"src/jsh/run.mjs","kind":"import-statement","original":"./jsh/run.mjs"},{"path":"src/runtime/run.mjs","kind":"import-statement","original":"./runtime/run.mjs"}],"format":"esm"}},"outputs":{"dist/node.mjs":{"imports":[],"exports":["default"],"entryPoint":"src/node.mjs","inputs":{"node_modules/node-inspect-extracted/dist/inspect.js":{"bytesInOutput":86401},"package.json":{"bytesInOutput":2504},"src/jsh/parse-flags.mjs":{"bytesInOutput":1558},"src/jsh/sliccy/exec.mjs":{"bytesInOutput":4077},"src/jsh/sliccy/http.mjs":{"bytesInOutput":5497},"src/jsh/sliccy/pure.mjs":{"bytesInOutput":6246},"src/jsh/sliccy/index.mjs":{"bytesInOutput":2229},"src/jsh/run.mjs":{"bytesInOutput":2830},"src/jsh/kernel.mjs":{"bytesInOutput":4661},"src/runtime/async-handles.mjs":{"bytesInOutput":1692},"src/runtime/buffer.mjs":{"bytesInOutput":36960},"node_modules/node-inspect-extracted/index.mjs":{"bytesInOutput":387},"src/runtime/builtins/util.mjs":{"bytesInOutput":3726},"node_modules/acorn/dist/acorn.mjs":{"bytesInOutput":203908},"src/runtime/esm/transform.mjs":{"bytesInOutput":20720},"src/runtime/path.mjs":{"bytesInOutput":4196},"src/runtime/builtins/assert.mjs":{"bytesInOutput":19383},"src/runtime/builtins/events.mjs":{"bytesInOutput":2336},"src/runtime/builtins/child-process.mjs":{"bytesInOutput":15697},"src/runtime/builtins/fs.mjs":{"bytesInOutput":47310},"src/runtime/builtins/http.mjs":{"bytesInOutput":27190},"src/runtime/builtins/https.mjs":{"bytesInOutput":7341},"src/runtime/builtins/net.mjs":{"bytesInOutput":14529},"src/runtime/builtins/os.mjs":{"bytesInOutput":648},"src/runtime/builtins/querystring.mjs":{"bytesInOutput":1197},"src/runtime/vendor-embedded.mjs":{"bytesInOutput":241089},"src/runtime/vendor-load.mjs":{"bytesInOutput":2914},"src/runtime/builtins/stream.mjs":{"bytesInOutput":1139},"src/runtime/builtins/string-decoder.mjs":{"bytesInOutput":3222},"src/runtime/builtins/timers-module.mjs":{"bytesInOutput":969},"src/runtime/builtins/url.mjs":{"bytesInOutput":1697},"src/runtime/cjs/builtins.mjs":{"bytesInOutput":7217},"src/runtime/cjs/errors.mjs":{"bytesInOutput":574},"src/runtime/cjs/resolve.mjs":{"bytesInOutput":8866},"src/runtime/cjs/loader.mjs":{"bytesInOutput":11203},"src/runtime/cli.mjs":{"bytesInOutput":2165},"src/runtime/console.mjs":{"bytesInOutput":4414},"src/runtime/esm/loader.mjs":{"bytesInOutput":11095},"src/runtime/stack.mjs":{"bytesInOutput":6887},"src/runtime/errors-format.mjs":{"bytesInOutput":10162},"src/runtime/exit.mjs":{"bytesInOutput":2240},"src/runtime/handles.mjs":{"bytesInOutput":688},"src/runtime/next-tick.mjs":{"bytesInOutput":1072},"src/runtime/process.mjs":{"bytesInOutput":16050},"src/runtime/timers.mjs":{"bytesInOutput":3949},"src/runtime/web/fetch.mjs":{"bytesInOutput":1982},"src/runtime/web/websocket.mjs":{"bytesInOutput":8204},"src/runtime/run.mjs":{"bytesInOutput":15619},"src/node.mjs":{"bytesInOutput":52}},"bytes":889652},"dist/jsh.mjs":{"imports":[],"exports":["default"],"entryPoint":"src/jsh.mjs","inputs":{"node_modules/node-inspect-extracted/dist/inspect.js":{"bytesInOutput":86401},"package.json":{"bytesInOutput":2504},"src/jsh/parse-flags.mjs":{"bytesInOutput":1558},"src/jsh/sliccy/exec.mjs":{"bytesInOutput":4077},"src/jsh/sliccy/http.mjs":{"bytesInOutput":5497},"src/jsh/sliccy/pure.mjs":{"bytesInOutput":6246},"src/jsh/sliccy/index.mjs":{"bytesInOutput":2229},"src/jsh/run.mjs":{"bytesInOutput":2830},"src/jsh/kernel.mjs":{"bytesInOutput":4661},"src/runtime/async-handles.mjs":{"bytesInOutput":1692},"src/runtime/buffer.mjs":{"bytesInOutput":36960},"node_modules/node-inspect-extracted/index.mjs":{"bytesInOutput":387},"src/runtime/builtins/util.mjs":{"bytesInOutput":3726},"node_modules/acorn/dist/acorn.mjs":{"bytesInOutput":203908},"src/runtime/esm/transform.mjs":{"bytesInOutput":20720},"src/runtime/path.mjs":{"bytesInOutput":4196},"src/runtime/builtins/assert.mjs":{"bytesInOutput":19383},"src/runtime/builtins/events.mjs":{"bytesInOutput":2336},"src/runtime/builtins/child-process.mjs":{"bytesInOutput":15697},"src/runtime/builtins/fs.mjs":{"bytesInOutput":47310},"src/runtime/builtins/http.mjs":{"bytesInOutput":27190},"src/runtime/builtins/https.mjs":{"bytesInOutput":7341},"src/runtime/builtins/net.mjs":{"bytesInOutput":14529},"src/runtime/builtins/os.mjs":{"bytesInOutput":648},"src/runtime/builtins/querystring.mjs":{"bytesInOutput":1197},"src/runtime/vendor-embedded.mjs":{"bytesInOutput":241089},"src/runtime/vendor-load.mjs":{"bytesInOutput":2914},"src/runtime/builtins/stream.mjs":{"bytesInOutput":1139},"src/runtime/builtins/string-decoder.mjs":{"bytesInOutput":3222},"src/runtime/builtins/timers-module.mjs":{"bytesInOutput":969},"src/runtime/builtins/url.mjs":{"bytesInOutput":1697},"src/runtime/cjs/builtins.mjs":{"bytesInOutput":7217},"src/runtime/cjs/errors.mjs":{"bytesInOutput":574},"src/runtime/cjs/resolve.mjs":{"bytesInOutput":8866},"src/runtime/cjs/loader.mjs":{"bytesInOutput":11203},"src/runtime/cli.mjs":{"bytesInOutput":2165},"src/runtime/console.mjs":{"bytesInOutput":4414},"src/runtime/esm/loader.mjs":{"bytesInOutput":11095},"src/runtime/stack.mjs":{"bytesInOutput":6887},"src/runtime/errors-format.mjs":{"bytesInOutput":10162},"src/runtime/exit.mjs":{"bytesInOutput":2240},"src/runtime/handles.mjs":{"bytesInOutput":688},"src/runtime/next-tick.mjs":{"bytesInOutput":1072},"src/runtime/process.mjs":{"bytesInOutput":16050},"src/runtime/timers.mjs":{"bytesInOutput":3949},"src/runtime/web/fetch.mjs":{"bytesInOutput":1982},"src/runtime/web/websocket.mjs":{"bytesInOutput":8204},"src/runtime/run.mjs":{"bytesInOutput":15619},"src/jsh.mjs":{"bytesInOutput":761}},"bytes":890360}}}
package/dist/node.mjs CHANGED
@@ -1539,7 +1539,7 @@ ${e3}`;
1539
1539
  // package.json
1540
1540
  var package_default = {
1541
1541
  name: "@ai-ecoverse/slicc-jsh",
1542
- version: "0.3.6",
1542
+ version: "0.3.7",
1543
1543
  description: "Node.js-compatible runtime for slicc-kernel: the node and jsh commands (abi: js)",
1544
1544
  type: "module",
1545
1545
  license: "Apache-2.0",
@@ -3144,10 +3144,10 @@ function createBuffer() {
3144
3144
  e.code = "ERR_INVALID_ARG_TYPE";
3145
3145
  throw e;
3146
3146
  }
3147
- if (value instanceof ArrayBuffer) {
3147
+ if (value instanceof ArrayBuffer || typeof SharedArrayBuffer === "function" && value instanceof SharedArrayBuffer) {
3148
3148
  const offset2 = encodingOrOffset ?? 0;
3149
3149
  const len = length ?? value.byteLength - offset2;
3150
- return Buffer2.fromBytes(new Uint8Array(value, offset2, len));
3150
+ return new Buffer2(value, offset2, len);
3151
3151
  }
3152
3152
  if (value instanceof Uint8Array || Array.isArray(value) || ArrayBuffer.isView(value)) {
3153
3153
  return Buffer2.fromBytes(asUint8(value));
@@ -3291,12 +3291,13 @@ function createBuffer() {
3291
3291
  if (!isBufView(target)) throwBufferArgType("target", target);
3292
3292
  return Buffer2.compare(this, target);
3293
3293
  }
3294
+ // Node: both are views on the same memory (slice is subarray's old name).
3294
3295
  slice(start, end) {
3295
- return Buffer2.fromBytes(Uint8Array.prototype.slice.call(this, start, end));
3296
+ return this.subarray(start, end);
3296
3297
  }
3297
3298
  subarray(start, end) {
3298
3299
  const view = Uint8Array.prototype.subarray.call(this, start, end);
3299
- return Buffer2.fromBytes(view);
3300
+ return new Buffer2(view.buffer, view.byteOffset, view.length);
3300
3301
  }
3301
3302
  fill(value, offset2 = 0, end = this.length, encoding = "utf8") {
3302
3303
  if (typeof offset2 === "string") {
@@ -14729,6 +14730,94 @@ function notSupported3(id) {
14729
14730
  err.code = "ERR_NOT_SUPPORTED";
14730
14731
  throw err;
14731
14732
  }
14733
+ function describeReceived(value) {
14734
+ if (value === null) return "null";
14735
+ if (value === void 0) return "undefined";
14736
+ if (typeof value === "string") return `type string ('${value}')`;
14737
+ if (typeof value === "function") return `function ${value.name || "<anonymous>"}`;
14738
+ if (typeof value === "object") return `an instance of ${value.constructor?.name || "Object"}`;
14739
+ return `type ${typeof value} (${String(value)})`;
14740
+ }
14741
+ function invalidArgType(name, expected, value) {
14742
+ const err = new TypeError(
14743
+ `The "${name}" argument must be ${expected}. Received ${describeReceived(value)}`
14744
+ );
14745
+ err.code = "ERR_INVALID_ARG_TYPE";
14746
+ return err;
14747
+ }
14748
+ var TRANSCODE_ENCODINGS = {
14749
+ ascii: "ascii",
14750
+ latin1: "latin1",
14751
+ binary: "latin1",
14752
+ ucs2: "utf16le",
14753
+ "ucs-2": "utf16le",
14754
+ utf16le: "utf16le",
14755
+ "utf-16le": "utf16le",
14756
+ utf8: "utf8",
14757
+ "utf-8": "utf8"
14758
+ };
14759
+ function bufferModule(Buffer2) {
14760
+ const MAX_LENGTH = 2 ** 53 - 1;
14761
+ const MAX_STRING_LENGTH = 536870888;
14762
+ const fatal = new TextDecoder("utf-8", { fatal: true });
14763
+ const bytesOf = (input) => {
14764
+ if (input instanceof ArrayBuffer) return new Uint8Array(input);
14765
+ if (typeof SharedArrayBuffer === "function" && input instanceof SharedArrayBuffer) {
14766
+ return new Uint8Array(input);
14767
+ }
14768
+ if (ArrayBuffer.isView(input)) return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
14769
+ throw invalidArgType("input", "an instance of ArrayBuffer, Buffer, or TypedArray", input);
14770
+ };
14771
+ function SlowBuffer(size) {
14772
+ return Buffer2.allocUnsafeSlow(size);
14773
+ }
14774
+ return {
14775
+ Buffer: Buffer2,
14776
+ SlowBuffer,
14777
+ /**
14778
+ * Node's transcode (ICU): text a target cannot hold becomes '?', as ICU's
14779
+ * substitution does; invalid UTF-8 decodes to U+FFFD first.
14780
+ */
14781
+ transcode(source, fromEnc, toEnc) {
14782
+ if (!(source instanceof Uint8Array)) {
14783
+ throw invalidArgType("source", "an instance of Buffer or Uint8Array", source);
14784
+ }
14785
+ const from = TRANSCODE_ENCODINGS[String(fromEnc).toLowerCase()];
14786
+ const to = TRANSCODE_ENCODINGS[String(toEnc).toLowerCase()];
14787
+ if (!from || !to) {
14788
+ const err = new Error("Unable to transcode Buffer [U_ILLEGAL_ARGUMENT_ERROR]");
14789
+ err.code = "U_ILLEGAL_ARGUMENT_ERROR";
14790
+ err.errno = 1;
14791
+ throw err;
14792
+ }
14793
+ let text = Buffer2.from(source).toString(from);
14794
+ if (to === "latin1") text = text.replace(/[^\u0000-\u00ff]/gu, "?");
14795
+ else if (to === "ascii") text = text.replace(/[^\u0000-\u007f]/gu, "?");
14796
+ return Buffer2.from(text, to);
14797
+ },
14798
+ isUtf8(input) {
14799
+ const bytes = bytesOf(input);
14800
+ try {
14801
+ fatal.decode(bytes);
14802
+ return true;
14803
+ } catch {
14804
+ return false;
14805
+ }
14806
+ },
14807
+ isAscii(input) {
14808
+ return bytesOf(input).every((b) => b < 128);
14809
+ },
14810
+ kMaxLength: MAX_LENGTH,
14811
+ kStringMaxLength: MAX_STRING_LENGTH,
14812
+ btoa: globalThis.btoa,
14813
+ atob: globalThis.atob,
14814
+ constants: { MAX_LENGTH, MAX_STRING_LENGTH },
14815
+ INSPECT_MAX_BYTES: 50,
14816
+ Blob: globalThis.Blob,
14817
+ File: globalThis.File,
14818
+ resolveObjectURL: () => void 0
14819
+ };
14820
+ }
14732
14821
  function createBuiltins({ ctx, process: process2, Buffer: Buffer2, console: console2, path, handles, timers }) {
14733
14822
  const util2 = createUtil();
14734
14823
  const events = createEvents();
@@ -14777,10 +14866,11 @@ function createBuiltins({ ctx, process: process2, Buffer: Buffer2, console: cons
14777
14866
  }
14778
14867
  return childProcess;
14779
14868
  };
14869
+ let bufferExports;
14780
14870
  let ModuleExport = null;
14781
14871
  const implemented = {
14782
14872
  process: () => process2,
14783
- buffer: () => ({ Buffer: Buffer2, kMaxLength: 2147483647, INSPECT_MAX_BYTES: 50 }),
14873
+ buffer: () => bufferExports ??= bufferModule(Buffer2),
14784
14874
  console: () => console2,
14785
14875
  path: () => path,
14786
14876
  "path/posix": () => path,
@@ -16527,7 +16617,7 @@ function numericExitCode(value) {
16527
16617
  const n = Number(value);
16528
16618
  return Number.isFinite(n) ? n & 255 : 0;
16529
16619
  }
16530
- function describeReceived(value) {
16620
+ function describeReceived2(value) {
16531
16621
  if (typeof value === "string") return `type string ('${value}')`;
16532
16622
  if (typeof value === "boolean") return `type boolean (${value})`;
16533
16623
  if (typeof value === "bigint") return `type bigint (${value}n)`;
@@ -16541,7 +16631,7 @@ function assignProcessExitCode(value) {
16541
16631
  const n = Number(value);
16542
16632
  if (value !== "" && Number.isInteger(n)) return n === 0 ? 0 : n;
16543
16633
  const err2 = new TypeError(
16544
- `The "code" argument must be of type number. Received ${describeReceived(value)}`
16634
+ `The "code" argument must be of type number. Received ${describeReceived2(value)}`
16545
16635
  );
16546
16636
  err2.code = "ERR_INVALID_ARG_TYPE";
16547
16637
  throw err2;
@@ -16555,7 +16645,7 @@ function assignProcessExitCode(value) {
16555
16645
  throw err2;
16556
16646
  }
16557
16647
  const err = new TypeError(
16558
- `The "code" argument must be of type number. Received ${describeReceived(value)}`
16648
+ `The "code" argument must be of type number. Received ${describeReceived2(value)}`
16559
16649
  );
16560
16650
  err.code = "ERR_INVALID_ARG_TYPE";
16561
16651
  throw err;
@@ -16642,6 +16732,32 @@ function toBytes2(value) {
16642
16732
  if (value == null) return "";
16643
16733
  return String(value);
16644
16734
  }
16735
+ function createEnv(initial) {
16736
+ const target = { ...initial };
16737
+ const coerce = (value) => {
16738
+ if (typeof value === "symbol") {
16739
+ throw new TypeError("Cannot convert a Symbol value to a string");
16740
+ }
16741
+ return String(value);
16742
+ };
16743
+ return new Proxy(target, {
16744
+ set(t, key, value) {
16745
+ if (typeof key === "symbol") {
16746
+ t[key] = value;
16747
+ return true;
16748
+ }
16749
+ t[key] = coerce(value);
16750
+ return true;
16751
+ },
16752
+ defineProperty(t, key, desc) {
16753
+ if (typeof key !== "symbol" && "value" in desc) {
16754
+ t[key] = coerce(desc.value);
16755
+ return true;
16756
+ }
16757
+ return Reflect.defineProperty(t, key, desc);
16758
+ }
16759
+ });
16760
+ }
16645
16761
  function writableStream(fd, writeSync, isTTY) {
16646
16762
  const ee = new EventEmitter();
16647
16763
  return {
@@ -16922,7 +17038,7 @@ var Process = class extends EventEmitter {
16922
17038
  this._onExit = onExit;
16923
17039
  this.argv = argv.slice();
16924
17040
  this.argv0 = argv[0] ?? "node";
16925
- this.env = { ...ctx.env };
17041
+ this.env = createEnv(ctx.env);
16926
17042
  this.versions = { node: NODE_SHIM_VERSION };
16927
17043
  this.version = `v${NODE_SHIM_VERSION}`;
16928
17044
  this.platform = "linux";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-jsh",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Node.js-compatible runtime for slicc-kernel: the node and jsh commands (abi: js)",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",