@volter/browser-substrate 0.1.112 → 0.1.114

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.
@@ -4325,4 +4325,4 @@ function serveStore(scope3, port, loadEngine) {
4325
4325
  }
4326
4326
 
4327
4327
  // <stdin>
4328
- startExecutionFront(self, () => import("/assets/node-execution-worker-5e417bedc3429b5c.js"));
4328
+ startExecutionFront(self, () => import("/assets/node-execution-worker-961b76ab350a1c3c.js"));
@@ -1 +1 @@
1
- {"format":1,"pyodide":"314.0.6","engine":"sha256-OgoA3+qjSKwg+e8JkEIz0y0z9kQzlmLUrzaPiiAQ83o=","preparation":"77987879a2949714bdec4de6bae2d0431adbc3549686414e4e13e051cf23bfae","integrity":"sha256-yhoUGYL6ch3XNK8pOipMrm4aCnC0u+ze36VXV+/H5uQ=","bytes":6195931}
1
+ {"format":1,"pyodide":"314.0.6","engine":"sha256-OgoA3+qjSKwg+e8JkEIz0y0z9kQzlmLUrzaPiiAQ83o=","preparation":"77987879a2949714bdec4de6bae2d0431adbc3549686414e4e13e051cf23bfae","integrity":"sha256-SdAO9ZieFjxDcQv7Q2h/ru07IVmFilyx38Q1Tk6pif4=","bytes":6199460}
@@ -24849,11 +24849,25 @@ function nodeLibBinding(name) {
24849
24849
  }
24850
24850
 
24851
24851
  // ../../node_modules/@volter/tabnode/src/shims/dns.ts
24852
+ function literalFamily(hostname3) {
24853
+ const bare = hostname3.startsWith("[") && hostname3.endsWith("]") ? hostname3.slice(1, -1) : hostname3;
24854
+ if (/^(25[0-5]|2[0-4]\d|1?\d?\d)(\.(25[0-5]|2[0-4]\d|1?\d?\d)){3}$/.test(bare)) return 4;
24855
+ const host2 = bare.split("%")[0];
24856
+ if (host2.includes(":") && /^[0-9a-fA-F:.]+$/.test(host2)) return 6;
24857
+ return 0;
24858
+ }
24852
24859
  function lookup(hostname3, optionsOrCallback, callback) {
24853
24860
  const cb2 = typeof optionsOrCallback === "function" ? optionsOrCallback : callback;
24854
24861
  const options = typeof optionsOrCallback === "object" ? optionsOrCallback : {};
24855
24862
  setImmediate(() => {
24856
- if (hostname3 === "localhost" || hostname3 === "127.0.0.1") {
24863
+ const family = literalFamily(hostname3);
24864
+ if (family) {
24865
+ const address = hostname3.startsWith("[") && hostname3.endsWith("]") ? hostname3.slice(1, -1) : hostname3;
24866
+ if (options.all) cb2(null, [{ address, family }]);
24867
+ else cb2(null, address, family);
24868
+ return;
24869
+ }
24870
+ if (hostname3 === "localhost") {
24857
24871
  if (options.all) {
24858
24872
  cb2(null, [{ address: "127.0.0.1", family: 4 }]);
24859
24873
  } else {
@@ -26074,9 +26088,11 @@ __export(crypto_exports, {
26074
26088
  randomInt: () => randomInt,
26075
26089
  randomUUID: () => randomUUID,
26076
26090
  sign: () => sign,
26091
+ subtle: () => subtle,
26077
26092
  timingSafeEqual: () => timingSafeEqual,
26078
26093
  unsupported: () => unsupported,
26079
- verify: () => verify
26094
+ verify: () => verify,
26095
+ webcrypto: () => webcrypto
26080
26096
  });
26081
26097
  var import_sha = __toESM(require_sha2(), 1);
26082
26098
 
@@ -28062,10 +28078,15 @@ ${body}
28062
28078
  createSecretKey: createSecretKey3,
28063
28079
  createPublicKey: createPublicKey3,
28064
28080
  createPrivateKey: createPrivateKey3,
28065
- generateKeyPair: generateKeyPair3
28081
+ generateKeyPair: generateKeyPair3,
28082
+ // Node's Web Crypto: the same object globalThis.crypto is in Node, and its SubtleCrypto
28083
+ webcrypto: crypto,
28084
+ subtle: crypto.subtle
28066
28085
  };
28067
28086
  }
28068
28087
  var cryptoModule = createCryptoModule();
28088
+ var webcrypto = cryptoModule.webcrypto;
28089
+ var subtle = cryptoModule.subtle;
28069
28090
  var { Cipheriv, Decipheriv, createCipheriv, createDecipheriv, randomBytes, randomFillSync, randomFill, randomUUID, randomInt, getRandomValues, unsupported, createHash, createHmac, hash, pbkdf2Sync, pbkdf2, sign, verify, createSign, createVerify, KeyObject, createSecretKey, createPublicKey, createPrivateKey, generateKeyPair, timingSafeEqual, getCiphers: getCiphers2, getHashes } = cryptoModule;
28070
28091
  var crypto_default = cryptoModule;
28071
28092
 
@@ -92750,11 +92771,25 @@ function nodeLibBinding2(name) {
92750
92771
  });
92751
92772
  return __table$1[name];
92752
92773
  }
92774
+ function literalFamily2(hostname22) {
92775
+ const bare = hostname22.startsWith("[") && hostname22.endsWith("]") ? hostname22.slice(1, -1) : hostname22;
92776
+ if (/^(25[0-5]|2[0-4]\d|1?\d?\d)(\.(25[0-5]|2[0-4]\d|1?\d?\d)){3}$/.test(bare)) return 4;
92777
+ const host2 = bare.split("%")[0];
92778
+ if (host2.includes(":") && /^[0-9a-fA-F:.]+$/.test(host2)) return 6;
92779
+ return 0;
92780
+ }
92753
92781
  function lookup2(hostname22, optionsOrCallback, callback) {
92754
92782
  const cb2 = typeof optionsOrCallback === "function" ? optionsOrCallback : callback;
92755
92783
  const options = typeof optionsOrCallback === "object" ? optionsOrCallback : {};
92756
92784
  setImmediate(() => {
92757
- if (hostname22 === "localhost" || hostname22 === "127.0.0.1") {
92785
+ const family = literalFamily2(hostname22);
92786
+ if (family) {
92787
+ const address = hostname22.startsWith("[") && hostname22.endsWith("]") ? hostname22.slice(1, -1) : hostname22;
92788
+ if (options.all) cb2(null, [{ address, family }]);
92789
+ else cb2(null, address, family);
92790
+ return;
92791
+ }
92792
+ if (hostname22 === "localhost") {
92758
92793
  if (options.all) {
92759
92794
  cb2(null, [{ address: "127.0.0.1", family: 4 }]);
92760
92795
  } else {
@@ -95952,17 +95987,10 @@ var implementation$1 = function bind2(that) {
95952
95987
  var implementation = implementation$1;
95953
95988
  var functionBind = Function.prototype.bind || implementation;
95954
95989
  var functionCall = Function.prototype.call;
95955
- var functionApply;
95956
- var hasRequiredFunctionApply;
95957
- function requireFunctionApply() {
95958
- if (hasRequiredFunctionApply) return functionApply;
95959
- hasRequiredFunctionApply = 1;
95960
- functionApply = Function.prototype.apply;
95961
- return functionApply;
95962
- }
95990
+ var functionApply = Function.prototype.apply;
95963
95991
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
95964
95992
  var bind$2 = functionBind;
95965
- var $apply$1 = requireFunctionApply();
95993
+ var $apply$1 = functionApply;
95966
95994
  var $call$2 = functionCall;
95967
95995
  var $reflectApply = reflectApply;
95968
95996
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
@@ -96082,7 +96110,7 @@ var hasSymbols = requireHasSymbols()();
96082
96110
  var getProto = requireGetProto();
96083
96111
  var $ObjectGPO = requireObject_getPrototypeOf();
96084
96112
  var $ReflectGPO = requireReflect_getPrototypeOf();
96085
- var $apply = requireFunctionApply();
96113
+ var $apply = functionApply;
96086
96114
  var $call = functionCall;
96087
96115
  var needsEval = {};
96088
96116
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
@@ -96724,7 +96752,7 @@ function requireApplyBind() {
96724
96752
  if (hasRequiredApplyBind) return applyBind;
96725
96753
  hasRequiredApplyBind = 1;
96726
96754
  var bind3 = functionBind;
96727
- var $apply2 = requireFunctionApply();
96755
+ var $apply2 = functionApply;
96728
96756
  var actualApply$1 = actualApply;
96729
96757
  applyBind = function applyBind2() {
96730
96758
  return actualApply$1(bind3, $apply2, arguments);
@@ -99782,10 +99810,15 @@ ${body}
99782
99810
  createSecretKey: createSecretKey22,
99783
99811
  createPublicKey: createPublicKey22,
99784
99812
  createPrivateKey: createPrivateKey22,
99785
- generateKeyPair: generateKeyPair22
99813
+ generateKeyPair: generateKeyPair22,
99814
+ // Node's Web Crypto: the same object globalThis.crypto is in Node, and its SubtleCrypto
99815
+ webcrypto: crypto,
99816
+ subtle: crypto.subtle
99786
99817
  };
99787
99818
  }
99788
99819
  var cryptoModule2 = createCryptoModule2();
99820
+ var webcrypto2 = cryptoModule2.webcrypto;
99821
+ var subtle2 = cryptoModule2.subtle;
99789
99822
  var { Cipheriv: Cipheriv2, Decipheriv: Decipheriv2, createCipheriv: createCipheriv2, createDecipheriv: createDecipheriv2, randomBytes: randomBytes2, randomFillSync: randomFillSync2, randomFill: randomFill2, randomUUID: randomUUID2, randomInt: randomInt2, getRandomValues: getRandomValues2, unsupported: unsupported$1, createHash: createHash2, createHmac: createHmac2, hash: hash2, pbkdf2Sync: pbkdf2Sync2, pbkdf2: pbkdf22, sign: sign3, verify: verify2, createSign: createSign2, createVerify: createVerify2, KeyObject: KeyObject2, createSecretKey: createSecretKey2, createPublicKey: createPublicKey2, createPrivateKey: createPrivateKey2, generateKeyPair: generateKeyPair2, timingSafeEqual: timingSafeEqual2, getCiphers: getCiphers3, getHashes: getHashes2 } = cryptoModule2;
99790
99823
  var cryptoShim = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99791
99824
  __proto__: null,
@@ -99817,9 +99850,11 @@ var cryptoShim = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
99817
99850
  randomInt: randomInt2,
99818
99851
  randomUUID: randomUUID2,
99819
99852
  sign: sign3,
99853
+ subtle: subtle2,
99820
99854
  timingSafeEqual: timingSafeEqual2,
99821
99855
  unsupported: unsupported$1,
99822
- verify: verify2
99856
+ verify: verify2,
99857
+ webcrypto: webcrypto2
99823
99858
  }, Symbol.toStringTag, { value: "Module" }));
99824
99859
  var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
99825
99860
  var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
@@ -109717,6 +109752,39 @@ Object.defineProperty = function(target, key, descriptor) {
109717
109752
  }
109718
109753
  return _realDefineProperty.call(Object, target, key, descriptor);
109719
109754
  };
109755
+ var NODE_VALUE_OPTIONS = /* @__PURE__ */ new Set([
109756
+ "-r",
109757
+ "--require",
109758
+ "--import",
109759
+ "--loader",
109760
+ "--experimental-loader",
109761
+ "-C",
109762
+ "--conditions",
109763
+ "--input-type",
109764
+ "--title",
109765
+ "--inspect-port",
109766
+ "--debug-port",
109767
+ "--env-file",
109768
+ "--env-file-if-exists",
109769
+ "--redirect-warnings",
109770
+ "--diagnostic-dir",
109771
+ "--report-dir",
109772
+ "--report-directory",
109773
+ "--cpu-prof-dir",
109774
+ "--heap-prof-dir",
109775
+ "--experimental-default-type",
109776
+ "--watch-path",
109777
+ "--disable-warning",
109778
+ "--secure-heap",
109779
+ "--secure-heap-min",
109780
+ "--icu-data-dir",
109781
+ "--openssl-config",
109782
+ "--tls-cipher-list",
109783
+ "--unhandled-rejections",
109784
+ "--dns-result-order",
109785
+ "--trace-event-categories",
109786
+ "--trace-event-file-pattern"
109787
+ ]);
109720
109788
  var _runStreams = /* @__PURE__ */ new Map();
109721
109789
  async function runHostedNode(host2, launch) {
109722
109790
  var _a22;
@@ -109915,6 +109983,11 @@ function initChildProcess(vfs22) {
109915
109983
  first += 2;
109916
109984
  break;
109917
109985
  }
109986
+ if (NODE_VALUE_OPTIONS.has(option) && first + 1 < args2.length) {
109987
+ execArgv.push(option, args2[first + 1]);
109988
+ first += 2;
109989
+ continue;
109990
+ }
109918
109991
  execArgv.push(option);
109919
109992
  first += 1;
109920
109993
  }
@@ -109926,17 +109999,8 @@ function initChildProcess(vfs22) {
109926
109999
  if (found !== null && tree22.existsSync(found)) return found;
109927
110000
  return tree22.existsSync(requested) ? requested : null;
109928
110001
  };
109929
- let script = first;
109930
- let resolvedPath = null;
109931
- for (let index2 = first; evaluated === null && index2 < args2.length; index2 += 1) {
109932
- const found = fileNamed(args2[index2]);
109933
- if (found !== null) {
109934
- script = index2;
109935
- resolvedPath = found;
109936
- break;
109937
- }
109938
- }
109939
- if (evaluated === null) for (let index2 = first; index2 < script; index2 += 1) execArgv.push(args2[index2]);
110002
+ const script = first;
110003
+ const resolvedPath = evaluated === null && args2[script] ? fileNamed(args2[script]) : null;
109940
110004
  if (evaluated === null && !args2[script]) {
109941
110005
  return { stdout: "", stderr: "Usage: node <script.js> [args...]\n", exitCode: 1 };
109942
110006
  }
@@ -116373,7 +116437,7 @@ var WorkerRuntime = class {
116373
116437
  this.worker = new Worker(
116374
116438
  new URL(
116375
116439
  /* @vite-ignore */
116376
- "/assets/runtime-worker-CTPA-1k9.js",
116440
+ "/assets/runtime-worker-DiqY2fQ4.js",
116377
116441
  import.meta.url
116378
116442
  ),
116379
116443
  { type: "module" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/browser-substrate",
3
- "version": "0.1.112",
3
+ "version": "0.1.114",
4
4
  "description": "Run a folder in a browser tab: one command, a Dockerfile as the config, static files out",
5
5
  "license": "MIT",
6
6
  "repository": {