@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.
@@ -18016,11 +18016,25 @@ function nodeLibBinding(name) {
18016
18016
  });
18017
18017
  return __table$1[name];
18018
18018
  }
18019
+ function literalFamily(hostname2) {
18020
+ const bare = hostname2.startsWith("[") && hostname2.endsWith("]") ? hostname2.slice(1, -1) : hostname2;
18021
+ 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;
18022
+ const host = bare.split("%")[0];
18023
+ if (host.includes(":") && /^[0-9a-fA-F:.]+$/.test(host)) return 6;
18024
+ return 0;
18025
+ }
18019
18026
  function lookup(hostname2, optionsOrCallback, callback) {
18020
18027
  const cb2 = typeof optionsOrCallback === "function" ? optionsOrCallback : callback;
18021
18028
  const options = typeof optionsOrCallback === "object" ? optionsOrCallback : {};
18022
18029
  setImmediate(() => {
18023
- if (hostname2 === "localhost" || hostname2 === "127.0.0.1") {
18030
+ const family = literalFamily(hostname2);
18031
+ if (family) {
18032
+ const address = hostname2.startsWith("[") && hostname2.endsWith("]") ? hostname2.slice(1, -1) : hostname2;
18033
+ if (options.all) cb2(null, [{ address, family }]);
18034
+ else cb2(null, address, family);
18035
+ return;
18036
+ }
18037
+ if (hostname2 === "localhost") {
18024
18038
  if (options.all) {
18025
18039
  cb2(null, [{ address: "127.0.0.1", family: 4 }]);
18026
18040
  } else {
@@ -21206,17 +21220,10 @@ var implementation$1 = function bind2(that) {
21206
21220
  var implementation = implementation$1;
21207
21221
  var functionBind = Function.prototype.bind || implementation;
21208
21222
  var functionCall = Function.prototype.call;
21209
- var functionApply;
21210
- var hasRequiredFunctionApply;
21211
- function requireFunctionApply() {
21212
- if (hasRequiredFunctionApply) return functionApply;
21213
- hasRequiredFunctionApply = 1;
21214
- functionApply = Function.prototype.apply;
21215
- return functionApply;
21216
- }
21223
+ var functionApply = Function.prototype.apply;
21217
21224
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
21218
21225
  var bind$2 = functionBind;
21219
- var $apply$1 = requireFunctionApply();
21226
+ var $apply$1 = functionApply;
21220
21227
  var $call$2 = functionCall;
21221
21228
  var $reflectApply = reflectApply;
21222
21229
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
@@ -21336,7 +21343,7 @@ var hasSymbols = requireHasSymbols()();
21336
21343
  var getProto = requireGetProto();
21337
21344
  var $ObjectGPO = requireObject_getPrototypeOf();
21338
21345
  var $ReflectGPO = requireReflect_getPrototypeOf();
21339
- var $apply = requireFunctionApply();
21346
+ var $apply = functionApply;
21340
21347
  var $call = functionCall;
21341
21348
  var needsEval = {};
21342
21349
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
@@ -21977,7 +21984,7 @@ function requireApplyBind() {
21977
21984
  if (hasRequiredApplyBind) return applyBind;
21978
21985
  hasRequiredApplyBind = 1;
21979
21986
  var bind3 = functionBind;
21980
- var $apply2 = requireFunctionApply();
21987
+ var $apply2 = functionApply;
21981
21988
  var actualApply$1 = actualApply;
21982
21989
  applyBind = function applyBind2() {
21983
21990
  return actualApply$1(bind3, $apply2, arguments);
@@ -25046,10 +25053,15 @@ ${body}
25046
25053
  createSecretKey: createSecretKey2,
25047
25054
  createPublicKey: createPublicKey2,
25048
25055
  createPrivateKey: createPrivateKey2,
25049
- generateKeyPair: generateKeyPair2
25056
+ generateKeyPair: generateKeyPair2,
25057
+ // Node's Web Crypto: the same object globalThis.crypto is in Node, and its SubtleCrypto
25058
+ webcrypto: crypto,
25059
+ subtle: crypto.subtle
25050
25060
  };
25051
25061
  }
25052
25062
  const cryptoModule = createCryptoModule();
25063
+ const webcrypto = cryptoModule.webcrypto;
25064
+ const subtle = cryptoModule.subtle;
25053
25065
  const { 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, getHashes } = cryptoModule;
25054
25066
  var cryptoShim = /* @__PURE__ */ Object.freeze({
25055
25067
  __proto__: null,
@@ -25081,9 +25093,11 @@ var cryptoShim = /* @__PURE__ */ Object.freeze({
25081
25093
  randomInt,
25082
25094
  randomUUID,
25083
25095
  sign,
25096
+ subtle,
25084
25097
  timingSafeEqual,
25085
25098
  unsupported,
25086
- verify
25099
+ verify,
25100
+ webcrypto
25087
25101
  });
25088
25102
  var astralIdentifierCodes = [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];
25089
25103
  var astralIdentifierStartCodes = [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];
@@ -75499,6 +75513,39 @@ Object.defineProperty = function(target, key, descriptor) {
75499
75513
  }
75500
75514
  return _realDefineProperty.call(Object, target, key, descriptor);
75501
75515
  };
75516
+ const NODE_VALUE_OPTIONS = /* @__PURE__ */ new Set([
75517
+ "-r",
75518
+ "--require",
75519
+ "--import",
75520
+ "--loader",
75521
+ "--experimental-loader",
75522
+ "-C",
75523
+ "--conditions",
75524
+ "--input-type",
75525
+ "--title",
75526
+ "--inspect-port",
75527
+ "--debug-port",
75528
+ "--env-file",
75529
+ "--env-file-if-exists",
75530
+ "--redirect-warnings",
75531
+ "--diagnostic-dir",
75532
+ "--report-dir",
75533
+ "--report-directory",
75534
+ "--cpu-prof-dir",
75535
+ "--heap-prof-dir",
75536
+ "--experimental-default-type",
75537
+ "--watch-path",
75538
+ "--disable-warning",
75539
+ "--secure-heap",
75540
+ "--secure-heap-min",
75541
+ "--icu-data-dir",
75542
+ "--openssl-config",
75543
+ "--tls-cipher-list",
75544
+ "--unhandled-rejections",
75545
+ "--dns-result-order",
75546
+ "--trace-event-categories",
75547
+ "--trace-event-file-pattern"
75548
+ ]);
75502
75549
  const _runStreams = /* @__PURE__ */ new Map();
75503
75550
  async function runHostedNode(host, launch) {
75504
75551
  var _a3;
@@ -75674,6 +75721,11 @@ function initChildProcess(vfs2) {
75674
75721
  first += 2;
75675
75722
  break;
75676
75723
  }
75724
+ if (NODE_VALUE_OPTIONS.has(option) && first + 1 < args.length) {
75725
+ execArgv.push(option, args[first + 1]);
75726
+ first += 2;
75727
+ continue;
75728
+ }
75677
75729
  execArgv.push(option);
75678
75730
  first += 1;
75679
75731
  }
@@ -75685,17 +75737,8 @@ function initChildProcess(vfs2) {
75685
75737
  if (found !== null && tree2.existsSync(found)) return found;
75686
75738
  return tree2.existsSync(requested) ? requested : null;
75687
75739
  };
75688
- let script = first;
75689
- let resolvedPath = null;
75690
- for (let index2 = first; evaluated === null && index2 < args.length; index2 += 1) {
75691
- const found = fileNamed(args[index2]);
75692
- if (found !== null) {
75693
- script = index2;
75694
- resolvedPath = found;
75695
- break;
75696
- }
75697
- }
75698
- if (evaluated === null) for (let index2 = first; index2 < script; index2 += 1) execArgv.push(args[index2]);
75740
+ const script = first;
75741
+ const resolvedPath = evaluated === null && args[script] ? fileNamed(args[script]) : null;
75699
75742
  if (evaluated === null && !args[script]) {
75700
75743
  return { stdout: "", stderr: "Usage: node <script.js> [args...]\n", exitCode: 1 };
75701
75744
  }