@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.
@@ -4325,4 +4325,4 @@ function serveStore(scope3, port, loadEngine) {
4325
4325
  }
4326
4326
 
4327
4327
  // <stdin>
4328
- startExecutionFront(self, () => import("/assets/node-execution-worker-910d4c0de0f26c97.js"));
4328
+ startExecutionFront(self, () => import("/assets/node-execution-worker-714dbca4282e90ae.js"));
@@ -1 +1 @@
1
- {"format":1,"pyodide":"314.0.6","engine":"sha256-OgoA3+qjSKwg+e8JkEIz0y0z9kQzlmLUrzaPiiAQ83o=","preparation":"77987879a2949714bdec4de6bae2d0431adbc3549686414e4e13e051cf23bfae","integrity":"sha256-l94dm1Kc6rIwUaerwA0d5m0/kpsZyZBq8oBBhk9VFDU=","bytes":6221393}
1
+ {"format":1,"pyodide":"314.0.6","engine":"sha256-OgoA3+qjSKwg+e8JkEIz0y0z9kQzlmLUrzaPiiAQ83o=","preparation":"77987879a2949714bdec4de6bae2d0431adbc3549686414e4e13e051cf23bfae","integrity":"sha256-NFJLwpq7xXWMBmAqqZnmyvkxn1RyYfRdE3bKM6CEGFI=","bytes":6203572}
@@ -26088,9 +26088,11 @@ __export(crypto_exports, {
26088
26088
  randomInt: () => randomInt,
26089
26089
  randomUUID: () => randomUUID,
26090
26090
  sign: () => sign,
26091
+ subtle: () => subtle,
26091
26092
  timingSafeEqual: () => timingSafeEqual,
26092
26093
  unsupported: () => unsupported,
26093
- verify: () => verify
26094
+ verify: () => verify,
26095
+ webcrypto: () => webcrypto
26094
26096
  });
26095
26097
  var import_sha = __toESM(require_sha2(), 1);
26096
26098
 
@@ -28076,10 +28078,15 @@ ${body}
28076
28078
  createSecretKey: createSecretKey3,
28077
28079
  createPublicKey: createPublicKey3,
28078
28080
  createPrivateKey: createPrivateKey3,
28079
- 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
28080
28085
  };
28081
28086
  }
28082
28087
  var cryptoModule = createCryptoModule();
28088
+ var webcrypto = cryptoModule.webcrypto;
28089
+ var subtle = cryptoModule.subtle;
28083
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;
28084
28091
  var crypto_default = cryptoModule;
28085
28092
 
@@ -99810,10 +99817,15 @@ ${body}
99810
99817
  createSecretKey: createSecretKey22,
99811
99818
  createPublicKey: createPublicKey22,
99812
99819
  createPrivateKey: createPrivateKey22,
99813
- generateKeyPair: generateKeyPair22
99820
+ generateKeyPair: generateKeyPair22,
99821
+ // Node's Web Crypto: the same object globalThis.crypto is in Node, and its SubtleCrypto
99822
+ webcrypto: crypto,
99823
+ subtle: crypto.subtle
99814
99824
  };
99815
99825
  }
99816
99826
  var cryptoModule2 = createCryptoModule2();
99827
+ var webcrypto2 = cryptoModule2.webcrypto;
99828
+ var subtle2 = cryptoModule2.subtle;
99817
99829
  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;
99818
99830
  var cryptoShim = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99819
99831
  __proto__: null,
@@ -99845,9 +99857,11 @@ var cryptoShim = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
99845
99857
  randomInt: randomInt2,
99846
99858
  randomUUID: randomUUID2,
99847
99859
  sign: sign3,
99860
+ subtle: subtle2,
99848
99861
  timingSafeEqual: timingSafeEqual2,
99849
99862
  unsupported: unsupported$1,
99850
- verify: verify2
99863
+ verify: verify2,
99864
+ webcrypto: webcrypto2
99851
99865
  }, Symbol.toStringTag, { value: "Module" }));
99852
99866
  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];
99853
99867
  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];
@@ -109745,6 +109759,39 @@ Object.defineProperty = function(target, key, descriptor) {
109745
109759
  }
109746
109760
  return _realDefineProperty.call(Object, target, key, descriptor);
109747
109761
  };
109762
+ var NODE_VALUE_OPTIONS = /* @__PURE__ */ new Set([
109763
+ "-r",
109764
+ "--require",
109765
+ "--import",
109766
+ "--loader",
109767
+ "--experimental-loader",
109768
+ "-C",
109769
+ "--conditions",
109770
+ "--input-type",
109771
+ "--title",
109772
+ "--inspect-port",
109773
+ "--debug-port",
109774
+ "--env-file",
109775
+ "--env-file-if-exists",
109776
+ "--redirect-warnings",
109777
+ "--diagnostic-dir",
109778
+ "--report-dir",
109779
+ "--report-directory",
109780
+ "--cpu-prof-dir",
109781
+ "--heap-prof-dir",
109782
+ "--experimental-default-type",
109783
+ "--watch-path",
109784
+ "--disable-warning",
109785
+ "--secure-heap",
109786
+ "--secure-heap-min",
109787
+ "--icu-data-dir",
109788
+ "--openssl-config",
109789
+ "--tls-cipher-list",
109790
+ "--unhandled-rejections",
109791
+ "--dns-result-order",
109792
+ "--trace-event-categories",
109793
+ "--trace-event-file-pattern"
109794
+ ]);
109748
109795
  var _runStreams = /* @__PURE__ */ new Map();
109749
109796
  async function runHostedNode(host2, launch) {
109750
109797
  var _a22;
@@ -109943,6 +109990,11 @@ function initChildProcess(vfs22) {
109943
109990
  first += 2;
109944
109991
  break;
109945
109992
  }
109993
+ if (NODE_VALUE_OPTIONS.has(option) && first + 1 < args2.length) {
109994
+ execArgv.push(option, args2[first + 1]);
109995
+ first += 2;
109996
+ continue;
109997
+ }
109946
109998
  execArgv.push(option);
109947
109999
  first += 1;
109948
110000
  }
@@ -109954,17 +110006,8 @@ function initChildProcess(vfs22) {
109954
110006
  if (found !== null && tree22.existsSync(found)) return found;
109955
110007
  return tree22.existsSync(requested) ? requested : null;
109956
110008
  };
109957
- let script = first;
109958
- let resolvedPath = null;
109959
- for (let index2 = first; evaluated === null && index2 < args2.length; index2 += 1) {
109960
- const found = fileNamed(args2[index2]);
109961
- if (found !== null) {
109962
- script = index2;
109963
- resolvedPath = found;
109964
- break;
109965
- }
109966
- }
109967
- if (evaluated === null) for (let index2 = first; index2 < script; index2 += 1) execArgv.push(args2[index2]);
110009
+ const script = first;
110010
+ const resolvedPath = evaluated === null && args2[script] ? fileNamed(args2[script]) : null;
109968
110011
  if (evaluated === null && !args2[script]) {
109969
110012
  return { stdout: "", stderr: "Usage: node <script.js> [args...]\n", exitCode: 1 };
109970
110013
  }
@@ -114135,11 +114178,15 @@ function __substrateGuestGlobal(process22) {
114135
114178
  })
114136
114179
  }
114137
114180
  });
114138
- const isLocalGlobal = (key) => key === "Promise" || key === "navigator" || key === "Navigator";
114181
+ Object.defineProperties(localGlobals, {
114182
+ Worker: { value: void 0, writable: true, configurable: true, enumerable: true },
114183
+ self: { value: void 0, writable: true, configurable: true, enumerable: true }
114184
+ });
114185
+ const isLocalGlobal = (key) => ["Promise", "navigator", "Navigator", "Worker", "self"].includes(key);
114139
114186
  guest = new Proxy(localGlobals, {
114140
114187
  get(target, key) {
114141
114188
  var _a22, _b22, _c22;
114142
- if (["document", "window", "location", "self"].includes(key)) return void 0;
114189
+ if (["document", "window", "location"].includes(key)) return void 0;
114143
114190
  if (key === "fetch") return fetch2;
114144
114191
  if (key === "Buffer") return buffer2 ?? loadNodeLibFor(process22, "buffer").Buffer;
114145
114192
  if (key === "process") return process22;
@@ -115526,7 +115573,7 @@ function createRequire(vfs22, fsShim, process22, currentDir, moduleCache, option
115526
115573
  const importMetaUrl = resolvedPath.startsWith("data:") ? resolvedPath : "file://" + resolvedPath;
115527
115574
  const strictBody = code22.startsWith(__substrateModuleMarker);
115528
115575
  if (!scoped) code22 = __substrateScopeGlobalCalls(code22);
115529
- 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() {${code22}
115576
+ 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() {${code22}
115530
115577
  }).call(${strictBody ? "void 0" : "$module.exports"}); }
115531
115578
  })${__substrateSourceURL(resolvedPath)}`;
115532
115579
  let bodyKind = code22.includes(__substrateTopLevelAwaitMarker) ? "async" : code22.includes(__substrateAwaitMarker) ? "generator" : "sync";
@@ -115896,7 +115943,7 @@ var Runtime = class {
115896
115943
  const importMetaUrl = "file://" + filename;
115897
115944
  const strictBody = code22.startsWith(__substrateModuleMarker);
115898
115945
  code22 = __substrateScopeGlobalCalls(code22);
115899
- 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() {${code22}
115946
+ 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() {${code22}
115900
115947
  }).call(${strictBody ? "void 0" : "$module.exports"}); }
115901
115948
  })${__substrateSourceURL(filename)}`;
115902
115949
  const dynamicImport = createDynamicImport(require2, this.process, filename.startsWith("data:") ? filename : `file://${filename}`);
@@ -116401,7 +116448,7 @@ var WorkerRuntime = class {
116401
116448
  this.worker = new Worker(
116402
116449
  new URL(
116403
116450
  /* @vite-ignore */
116404
- "/assets/runtime-worker-DJbG60eD.js",
116451
+ "/assets/runtime-worker-DH_89R1c.js",
116405
116452
  import.meta.url
116406
116453
  ),
116407
116454
  { type: "module" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/browser-substrate",
3
- "version": "0.1.113",
3
+ "version": "0.1.115",
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": {