@volter/browser-substrate 0.1.113 → 0.1.115

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.
@@ -25060,10 +25060,15 @@ ${body}
25060
25060
  createSecretKey: createSecretKey2,
25061
25061
  createPublicKey: createPublicKey2,
25062
25062
  createPrivateKey: createPrivateKey2,
25063
- generateKeyPair: generateKeyPair2
25063
+ generateKeyPair: generateKeyPair2,
25064
+ // Node's Web Crypto: the same object globalThis.crypto is in Node, and its SubtleCrypto
25065
+ webcrypto: crypto,
25066
+ subtle: crypto.subtle
25064
25067
  };
25065
25068
  }
25066
25069
  const cryptoModule = createCryptoModule();
25070
+ const webcrypto = cryptoModule.webcrypto;
25071
+ const subtle = cryptoModule.subtle;
25067
25072
  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;
25068
25073
  var cryptoShim = /* @__PURE__ */ Object.freeze({
25069
25074
  __proto__: null,
@@ -25095,9 +25100,11 @@ var cryptoShim = /* @__PURE__ */ Object.freeze({
25095
25100
  randomInt,
25096
25101
  randomUUID,
25097
25102
  sign,
25103
+ subtle,
25098
25104
  timingSafeEqual,
25099
25105
  unsupported,
25100
- verify
25106
+ verify,
25107
+ webcrypto
25101
25108
  });
25102
25109
  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];
25103
25110
  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];
@@ -75513,6 +75520,39 @@ Object.defineProperty = function(target, key, descriptor) {
75513
75520
  }
75514
75521
  return _realDefineProperty.call(Object, target, key, descriptor);
75515
75522
  };
75523
+ const NODE_VALUE_OPTIONS = /* @__PURE__ */ new Set([
75524
+ "-r",
75525
+ "--require",
75526
+ "--import",
75527
+ "--loader",
75528
+ "--experimental-loader",
75529
+ "-C",
75530
+ "--conditions",
75531
+ "--input-type",
75532
+ "--title",
75533
+ "--inspect-port",
75534
+ "--debug-port",
75535
+ "--env-file",
75536
+ "--env-file-if-exists",
75537
+ "--redirect-warnings",
75538
+ "--diagnostic-dir",
75539
+ "--report-dir",
75540
+ "--report-directory",
75541
+ "--cpu-prof-dir",
75542
+ "--heap-prof-dir",
75543
+ "--experimental-default-type",
75544
+ "--watch-path",
75545
+ "--disable-warning",
75546
+ "--secure-heap",
75547
+ "--secure-heap-min",
75548
+ "--icu-data-dir",
75549
+ "--openssl-config",
75550
+ "--tls-cipher-list",
75551
+ "--unhandled-rejections",
75552
+ "--dns-result-order",
75553
+ "--trace-event-categories",
75554
+ "--trace-event-file-pattern"
75555
+ ]);
75516
75556
  const _runStreams = /* @__PURE__ */ new Map();
75517
75557
  async function runHostedNode(host, launch) {
75518
75558
  var _a3;
@@ -75688,6 +75728,11 @@ function initChildProcess(vfs2) {
75688
75728
  first += 2;
75689
75729
  break;
75690
75730
  }
75731
+ if (NODE_VALUE_OPTIONS.has(option) && first + 1 < args.length) {
75732
+ execArgv.push(option, args[first + 1]);
75733
+ first += 2;
75734
+ continue;
75735
+ }
75691
75736
  execArgv.push(option);
75692
75737
  first += 1;
75693
75738
  }
@@ -75699,17 +75744,8 @@ function initChildProcess(vfs2) {
75699
75744
  if (found !== null && tree2.existsSync(found)) return found;
75700
75745
  return tree2.existsSync(requested) ? requested : null;
75701
75746
  };
75702
- let script = first;
75703
- let resolvedPath = null;
75704
- for (let index2 = first; evaluated === null && index2 < args.length; index2 += 1) {
75705
- const found = fileNamed(args[index2]);
75706
- if (found !== null) {
75707
- script = index2;
75708
- resolvedPath = found;
75709
- break;
75710
- }
75711
- }
75712
- if (evaluated === null) for (let index2 = first; index2 < script; index2 += 1) execArgv.push(args[index2]);
75747
+ const script = first;
75748
+ const resolvedPath = evaluated === null && args[script] ? fileNamed(args[script]) : null;
75713
75749
  if (evaluated === null && !args[script]) {
75714
75750
  return { stdout: "", stderr: "Usage: node <script.js> [args...]\n", exitCode: 1 };
75715
75751
  }
@@ -79855,11 +79891,15 @@ function __substrateGuestGlobal(process2) {
79855
79891
  })
79856
79892
  }
79857
79893
  });
79858
- const isLocalGlobal = (key) => key === "Promise" || key === "navigator" || key === "Navigator";
79894
+ Object.defineProperties(localGlobals, {
79895
+ Worker: { value: void 0, writable: true, configurable: true, enumerable: true },
79896
+ self: { value: void 0, writable: true, configurable: true, enumerable: true }
79897
+ });
79898
+ const isLocalGlobal = (key) => ["Promise", "navigator", "Navigator", "Worker", "self"].includes(key);
79859
79899
  guest = new Proxy(localGlobals, {
79860
79900
  get(target, key) {
79861
79901
  var _a3, _b3, _c3;
79862
- if (["document", "window", "location", "self"].includes(key)) return void 0;
79902
+ if (["document", "window", "location"].includes(key)) return void 0;
79863
79903
  if (key === "fetch") return fetch2;
79864
79904
  if (key === "Buffer") return buffer2 ?? loadNodeLibFor(process2, "buffer").Buffer;
79865
79905
  if (key === "process") return process2;
@@ -81243,7 +81283,7 @@ function createRequire(vfs2, fsShim, process2, currentDir, moduleCache, options,
81243
81283
  const importMetaUrl = resolvedPath.startsWith("data:") ? resolvedPath : "file://" + resolvedPath;
81244
81284
  const strictBody = code2.startsWith(__substrateModuleMarker);
81245
81285
  if (!scoped) code2 = __substrateScopeGlobalCalls(code2);
81246
- const wrappedCode = `(function($exports, $require, $module, $filename, $dirname, $process, $console, $importMeta, $dynamicImport, __substrateGuestGlobal, __substrateGuestConstructor) { var exports = $exports; var require = $require; var module = $module; var __filename = $filename; var __dirname = $dirname; var process = $process; var console = $console; var import_meta = $importMeta; var __dynamicImport = $dynamicImport; var document = void 0, window = void 0, location = void 0, self = void 0; var globalThis = __substrateGuestGlobal($process); var global = globalThis; var Buffer = globalThis.Buffer; var queueMicrotask = globalThis.queueMicrotask, atob = globalThis.atob, btoa = globalThis.btoa, structuredClone = globalThis.structuredClone, setTimeout = globalThis.setTimeout, clearTimeout = globalThis.clearTimeout, setInterval = globalThis.setInterval, clearInterval = globalThis.clearInterval; globalThis.process = $process; global.process = $process; with ({ __proto__: null, get navigator() { return globalThis.navigator; }, set navigator(value) { globalThis.navigator = value; }, get Navigator() { return globalThis.Navigator; }, set Navigator(value) { globalThis.Navigator = value; }, get Promise() { return globalThis.Promise; }, set Promise(value) { globalThis.Promise = value; }, get fetch() { return globalThis.fetch; }, set fetch(value) { globalThis.fetch = value; } }) { return (function() {${code2}
81286
+ const wrappedCode = `(function($exports, $require, $module, $filename, $dirname, $process, $console, $importMeta, $dynamicImport, __substrateGuestGlobal, __substrateGuestConstructor) { var exports = $exports; var require = $require; var module = $module; var __filename = $filename; var __dirname = $dirname; var process = $process; var console = $console; var import_meta = $importMeta; var __dynamicImport = $dynamicImport; var document = void 0, window = void 0, location = void 0; var globalThis = __substrateGuestGlobal($process); var global = globalThis; var Buffer = globalThis.Buffer; var queueMicrotask = globalThis.queueMicrotask, atob = globalThis.atob, btoa = globalThis.btoa, structuredClone = globalThis.structuredClone, setTimeout = globalThis.setTimeout, clearTimeout = globalThis.clearTimeout, setInterval = globalThis.setInterval, clearInterval = globalThis.clearInterval; globalThis.process = $process; global.process = $process; with ({ __proto__: null, get Worker() { return globalThis.Worker; }, set Worker(value) { globalThis.Worker = value; }, get self() { return globalThis.self; }, set self(value) { globalThis.self = value; }, get navigator() { return globalThis.navigator; }, set navigator(value) { globalThis.navigator = value; }, get Navigator() { return globalThis.Navigator; }, set Navigator(value) { globalThis.Navigator = value; }, get Promise() { return globalThis.Promise; }, set Promise(value) { globalThis.Promise = value; }, get fetch() { return globalThis.fetch; }, set fetch(value) { globalThis.fetch = value; } }) { return (function() {${code2}
81247
81287
  }).call(${strictBody ? "void 0" : "$module.exports"}); }
81248
81288
  })${__substrateSourceURL(resolvedPath)}`;
81249
81289
  let bodyKind = code2.includes(__substrateTopLevelAwaitMarker) ? "async" : code2.includes(__substrateAwaitMarker) ? "generator" : "sync";
@@ -81621,7 +81661,7 @@ class Runtime {
81621
81661
  const importMetaUrl = "file://" + filename;
81622
81662
  const strictBody = code2.startsWith(__substrateModuleMarker);
81623
81663
  code2 = __substrateScopeGlobalCalls(code2);
81624
- const wrappedCode = `(function($exports, $require, $module, $filename, $dirname, $process, $console, $importMeta, $dynamicImport, __substrateGuestGlobal, __substrateGuestConstructor) { var exports = $exports; var require = $require; var module = $module; var __filename = $filename; var __dirname = $dirname; var process = $process; var console = $console; var import_meta = $importMeta; var __dynamicImport = $dynamicImport; var document = void 0, window = void 0, location = void 0, self = void 0; var globalThis = __substrateGuestGlobal($process); var global = globalThis; var Buffer = globalThis.Buffer; var queueMicrotask = globalThis.queueMicrotask, atob = globalThis.atob, btoa = globalThis.btoa, structuredClone = globalThis.structuredClone, setTimeout = globalThis.setTimeout, clearTimeout = globalThis.clearTimeout, setInterval = globalThis.setInterval, clearInterval = globalThis.clearInterval; globalThis.process = $process; global.process = $process; with ({ __proto__: null, get navigator() { return globalThis.navigator; }, set navigator(value) { globalThis.navigator = value; }, get Navigator() { return globalThis.Navigator; }, set Navigator(value) { globalThis.Navigator = value; }, get Promise() { return globalThis.Promise; }, set Promise(value) { globalThis.Promise = value; }, get fetch() { return globalThis.fetch; }, set fetch(value) { globalThis.fetch = value; } }) { return (function() {${code2}
81664
+ const wrappedCode = `(function($exports, $require, $module, $filename, $dirname, $process, $console, $importMeta, $dynamicImport, __substrateGuestGlobal, __substrateGuestConstructor) { var exports = $exports; var require = $require; var module = $module; var __filename = $filename; var __dirname = $dirname; var process = $process; var console = $console; var import_meta = $importMeta; var __dynamicImport = $dynamicImport; var document = void 0, window = void 0, location = void 0; var globalThis = __substrateGuestGlobal($process); var global = globalThis; var Buffer = globalThis.Buffer; var queueMicrotask = globalThis.queueMicrotask, atob = globalThis.atob, btoa = globalThis.btoa, structuredClone = globalThis.structuredClone, setTimeout = globalThis.setTimeout, clearTimeout = globalThis.clearTimeout, setInterval = globalThis.setInterval, clearInterval = globalThis.clearInterval; globalThis.process = $process; global.process = $process; with ({ __proto__: null, get Worker() { return globalThis.Worker; }, set Worker(value) { globalThis.Worker = value; }, get self() { return globalThis.self; }, set self(value) { globalThis.self = value; }, get navigator() { return globalThis.navigator; }, set navigator(value) { globalThis.navigator = value; }, get Navigator() { return globalThis.Navigator; }, set Navigator(value) { globalThis.Navigator = value; }, get Promise() { return globalThis.Promise; }, set Promise(value) { globalThis.Promise = value; }, get fetch() { return globalThis.fetch; }, set fetch(value) { globalThis.fetch = value; } }) { return (function() {${code2}
81625
81665
  }).call(${strictBody ? "void 0" : "$module.exports"}); }
81626
81666
  })${__substrateSourceURL(filename)}`;
81627
81667
  const dynamicImport = createDynamicImport(require2, this.process, filename.startsWith("data:") ? filename : `file://${filename}`);