@wix/himalaya-cli 0.1816.0 → 0.1818.0

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.
package/dist/cli.mjs CHANGED
@@ -16436,6 +16436,195 @@ var init_quickjs_intl = __esm({
16436
16436
  }
16437
16437
  });
16438
16438
 
16439
+ // ../../core/ts/src/worker-globals-shim.ts
16440
+ var WORKER_GLOBALS_SHIM_SOURCE;
16441
+ var init_worker_globals_shim = __esm({
16442
+ "../../core/ts/src/worker-globals-shim.ts"() {
16443
+ init_define_HHP_CATALOG();
16444
+ WORKER_GLOBALS_SHIM_SOURCE = `// ------------------------------------------------------------ worker globals (#6272)
16445
+ (function () {
16446
+ "use strict";
16447
+ var g = globalThis;
16448
+ function define(name, value) {
16449
+ try { Object.defineProperty(g, name, { value: value, writable: true, configurable: true, enumerable: false }); } catch (e) {}
16450
+ }
16451
+ function named(name, message) {
16452
+ var e = new Error(message);
16453
+ try { Object.defineProperty(e, "name", { value: name, configurable: true, writable: true }); } catch (x) {}
16454
+ return e;
16455
+ }
16456
+ var REPLACEMENT = String.fromCharCode(65533);
16457
+ if (typeof g.crypto === "undefined" && typeof __himalaya_native_random === "function") {
16458
+ var native = __himalaya_native_random;
16459
+ var INTEGER_ARRAYS = ["Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "BigInt64Array", "BigUint64Array"];
16460
+ var getRandomValues = function getRandomValues(view) {
16461
+ var tag = Object.prototype.toString.call(view).slice(8, -1);
16462
+ if (INTEGER_ARRAYS.indexOf(tag) < 0) throw new TypeError("crypto.getRandomValues: the argument must be an integer TypedArray");
16463
+ var n = view.byteLength;
16464
+ if (n > 65536) throw named("QuotaExceededError", "crypto.getRandomValues: " + n + " bytes requested, the limit is 65536");
16465
+ if (n === 0) return view;
16466
+ var bytes = native(n);
16467
+ if (!bytes || bytes.length !== n) throw new Error("crypto.getRandomValues: the host returned no random bytes");
16468
+ var out = new Uint8Array(view.buffer, view.byteOffset, n);
16469
+ for (var i = 0; i < n; i++) out[i] = bytes[i] & 255;
16470
+ return view;
16471
+ };
16472
+ var crypto = {};
16473
+ Object.defineProperty(crypto, "getRandomValues", { value: getRandomValues, enumerable: true });
16474
+ define("crypto", Object.freeze(crypto));
16475
+ }
16476
+ if (typeof g.TextEncoder === "undefined") {
16477
+ var TextEncoder = function TextEncoder() {
16478
+ if (!(this instanceof TextEncoder)) throw new TypeError("TextEncoder must be called with new");
16479
+ };
16480
+ Object.defineProperty(TextEncoder.prototype, "encoding", { get: function () { return "utf-8"; } });
16481
+ var encodeTo = function (s, sink) {
16482
+ for (var i = 0; i < s.length; i++) {
16483
+ var c = s.charCodeAt(i);
16484
+ if (c >= 55296 && c <= 56319 && i + 1 < s.length) {
16485
+ var d = s.charCodeAt(i + 1);
16486
+ if (d >= 56320 && d <= 57343) { c = 65536 + ((c - 55296) * 1024) + (d - 56320); i++; }
16487
+ }
16488
+ if (c >= 55296 && c <= 57343) c = 65533;
16489
+ if (c < 128) sink(c);
16490
+ else if (c < 2048) { sink(192 | (c >> 6)); sink(128 | (c & 63)); }
16491
+ else if (c < 65536) { sink(224 | (c >> 12)); sink(128 | ((c >> 6) & 63)); sink(128 | (c & 63)); }
16492
+ else { sink(240 | (c >> 18)); sink(128 | ((c >> 12) & 63)); sink(128 | ((c >> 6) & 63)); sink(128 | (c & 63)); }
16493
+ }
16494
+ };
16495
+ TextEncoder.prototype.encode = function encode(input) {
16496
+ var s = input === undefined ? "" : String(input), bytes = [];
16497
+ encodeTo(s, function (b) { bytes.push(b); });
16498
+ return new Uint8Array(bytes);
16499
+ };
16500
+ TextEncoder.prototype.encodeInto = function encodeInto(input, dest) {
16501
+ if (!(dest instanceof Uint8Array)) throw new TypeError("TextEncoder.encodeInto: the destination must be a Uint8Array");
16502
+ var s = String(input), read = 0, written = 0;
16503
+ for (var i = 0; i < s.length; i++) {
16504
+ var c = s.charCodeAt(i), units = 1;
16505
+ if (c >= 55296 && c <= 56319 && i + 1 < s.length) {
16506
+ var d = s.charCodeAt(i + 1);
16507
+ if (d >= 56320 && d <= 57343) units = 2;
16508
+ }
16509
+ var chunk = [];
16510
+ encodeTo(s.substr(i, units), function (b) { chunk.push(b); });
16511
+ if (written + chunk.length > dest.length) break;
16512
+ for (var k = 0; k < chunk.length; k++) dest[written++] = chunk[k];
16513
+ read += units;
16514
+ i += units - 1;
16515
+ }
16516
+ return { read: read, written: written };
16517
+ };
16518
+ define("TextEncoder", TextEncoder);
16519
+ }
16520
+ if (typeof g.TextDecoder === "undefined") {
16521
+ var LABELS = ["utf-8", "utf8", "unicode-1-1-utf-8", "unicode11utf8", "unicode20utf8", "x-unicode20utf8"];
16522
+ var TextDecoder = function TextDecoder(label, options) {
16523
+ if (!(this instanceof TextDecoder)) throw new TypeError("TextDecoder must be called with new");
16524
+ var l = label === undefined ? "utf-8" : String(label).trim().toLowerCase();
16525
+ if (LABELS.indexOf(l) < 0) throw new RangeError("TextDecoder: the encoding '" + label + "' is not supported (UTF-8 only)");
16526
+ this._fatal = !!(options && options.fatal);
16527
+ this._ignoreBOM = !!(options && options.ignoreBOM);
16528
+ this._pending = [];
16529
+ this._bomSeen = false;
16530
+ };
16531
+ Object.defineProperty(TextDecoder.prototype, "encoding", { get: function () { return "utf-8"; } });
16532
+ Object.defineProperty(TextDecoder.prototype, "fatal", { get: function () { return this._fatal; } });
16533
+ Object.defineProperty(TextDecoder.prototype, "ignoreBOM", { get: function () { return this._ignoreBOM; } });
16534
+ var bytesOf = function (input) {
16535
+ if (input === undefined) return new Uint8Array(0);
16536
+ if (input instanceof ArrayBuffer) return new Uint8Array(input);
16537
+ if (ArrayBuffer.isView(input)) return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
16538
+ throw new TypeError("TextDecoder.decode: the argument must be an ArrayBuffer or a view of one");
16539
+ };
16540
+ TextDecoder.prototype.decode = function decode(input, options) {
16541
+ var stream = !!(options && options.stream);
16542
+ var fresh = bytesOf(input), b = this._pending.concat(Array.prototype.slice.call(fresh));
16543
+ var out = "", i = 0, self = this;
16544
+ var bad = function () {
16545
+ if (self._fatal) { self._pending = []; self._bomSeen = false; throw new TypeError("TextDecoder.decode: the input is not valid UTF-8"); }
16546
+ out += REPLACEMENT;
16547
+ };
16548
+ while (i < b.length) {
16549
+ var c = b[i], need = 0, cp = 0, lower = 128, upper = 191;
16550
+ if (c < 128) { out += String.fromCharCode(c); i++; continue; }
16551
+ if (c >= 194 && c <= 223) { need = 1; cp = c & 31; }
16552
+ else if (c >= 224 && c <= 239) { need = 2; cp = c & 15; if (c === 224) lower = 160; if (c === 237) upper = 159; }
16553
+ else if (c >= 240 && c <= 244) { need = 3; cp = c & 7; if (c === 240) lower = 144; if (c === 244) upper = 143; }
16554
+ else { bad(); i++; continue; }
16555
+ var j = 1, ok = true;
16556
+ for (; j <= need; j++) {
16557
+ if (i + j >= b.length) break;
16558
+ var t = b[i + j];
16559
+ if (t < lower || t > upper) { ok = false; break; }
16560
+ lower = 128; upper = 191;
16561
+ cp = (cp << 6) | (t & 63);
16562
+ }
16563
+ if (ok && j <= need) {
16564
+ if (stream) break;
16565
+ bad(); i = b.length; continue;
16566
+ }
16567
+ if (!ok) { bad(); i += j; continue; }
16568
+ if (cp >= 65536) { cp -= 65536; out += String.fromCharCode(55296 + (cp >> 10), 56320 + (cp & 1023)); }
16569
+ else out += String.fromCharCode(cp);
16570
+ i += need + 1;
16571
+ }
16572
+ this._pending = stream ? b.slice(i) : [];
16573
+ if (!this._ignoreBOM && !this._bomSeen && out.length > 0) {
16574
+ if (out.charCodeAt(0) === 65279) out = out.slice(1);
16575
+ this._bomSeen = true;
16576
+ }
16577
+ if (!stream) this._bomSeen = false;
16578
+ return out;
16579
+ };
16580
+ define("TextDecoder", TextDecoder);
16581
+ }
16582
+ var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16583
+ if (typeof g.btoa === "undefined") {
16584
+ define("btoa", function btoa(data) {
16585
+ var s = String(data), out = "";
16586
+ for (var k = 0; k < s.length; k++) {
16587
+ if (s.charCodeAt(k) > 255) throw named("InvalidCharacterError", "btoa: the string contains a character outside the Latin1 range");
16588
+ }
16589
+ for (var i = 0; i < s.length; i += 3) {
16590
+ var a = s.charCodeAt(i), b = i + 1 < s.length ? s.charCodeAt(i + 1) : 0, c = i + 2 < s.length ? s.charCodeAt(i + 2) : 0;
16591
+ var n = (a << 16) | (b << 8) | c;
16592
+ out += ALPHABET.charAt((n >> 18) & 63) + ALPHABET.charAt((n >> 12) & 63);
16593
+ out += i + 1 < s.length ? ALPHABET.charAt((n >> 6) & 63) : "=";
16594
+ out += i + 2 < s.length ? ALPHABET.charAt(n & 63) : "=";
16595
+ }
16596
+ return out;
16597
+ });
16598
+ }
16599
+ if (typeof g.atob === "undefined") {
16600
+ define("atob", function atob(data) {
16601
+ var s = String(data), clean = "";
16602
+ for (var k = 0; k < s.length; k++) {
16603
+ var w = s.charCodeAt(k);
16604
+ if (w === 9 || w === 10 || w === 12 || w === 13 || w === 32) continue;
16605
+ clean += s.charAt(k);
16606
+ }
16607
+ if (clean.length % 4 === 0) {
16608
+ if (clean.slice(-2) === "==") clean = clean.slice(0, -2);
16609
+ else if (clean.slice(-1) === "=") clean = clean.slice(0, -1);
16610
+ }
16611
+ if (clean.length % 4 === 1) throw named("InvalidCharacterError", "atob: the string is not correctly encoded");
16612
+ var out = "", buffer = 0, bits = 0;
16613
+ for (var i = 0; i < clean.length; i++) {
16614
+ var v = ALPHABET.indexOf(clean.charAt(i));
16615
+ if (v < 0) throw named("InvalidCharacterError", "atob: the string is not correctly encoded");
16616
+ buffer = (buffer << 6) | v;
16617
+ bits += 6;
16618
+ if (bits >= 8) { bits -= 8; out += String.fromCharCode((buffer >> bits) & 255); }
16619
+ }
16620
+ return out;
16621
+ });
16622
+ }
16623
+ })();
16624
+ `;
16625
+ }
16626
+ });
16627
+
16439
16628
  // ../../core/dev-server/src/quickjs-state-codec.ts
16440
16629
  function parseWithNonFinite(text32) {
16441
16630
  const parsed = JSON.parse(
@@ -17089,7 +17278,16 @@ var init_allowlist = __esm({
17089
17278
  "Proxy"
17090
17279
  ];
17091
17280
  IMPLICIT_BINDINGS = ["arguments"];
17092
- WORKER_SURFACE = ["himalaya", "console"];
17281
+ WORKER_SURFACE = [
17282
+ "himalaya",
17283
+ "console",
17284
+ // #6272 — the worker-globals block of every bootstrap (core/ts/src/worker-globals-shim.ts).
17285
+ "crypto",
17286
+ "TextEncoder",
17287
+ "TextDecoder",
17288
+ "atob",
17289
+ "btoa"
17290
+ ];
17093
17291
  WORKER_ALLOWLIST = /* @__PURE__ */ new Set([
17094
17292
  ...ES2020_GLOBALS,
17095
17293
  ...IMPLICIT_BINDINGS,
@@ -22116,6 +22314,27 @@ function pinnedNow(clock) {
22116
22314
  function hostStorage(store) {
22117
22315
  return { get: (k3) => store.getItem(k3) ?? "", set: (k3, v2) => store.setItem(k3, v2), getItem: (k3) => store.getItem(k3), setItem: (k3, v2) => store.setItem(k3, v2) };
22118
22316
  }
22317
+ function subtleFacade(subtle) {
22318
+ const facade = /* @__PURE__ */ Object.create(null);
22319
+ for (const name of SUBTLE_METHODS) {
22320
+ const fn2 = subtle[name];
22321
+ if (typeof fn2 === "function") facade[name] = (...args) => fn2.apply(subtle, args);
22322
+ }
22323
+ return Object.freeze(facade);
22324
+ }
22325
+ function deviceCrypto() {
22326
+ const getRandomValues = (a3) => hostGetRandomValues(a3);
22327
+ return Object.freeze({ getRandomValues });
22328
+ }
22329
+ function webCrypto() {
22330
+ const getRandomValues = (a3) => hostGetRandomValues(a3);
22331
+ const uuid = hostRandomUUID;
22332
+ return Object.freeze({
22333
+ getRandomValues,
22334
+ ...uuid ? { randomUUID: () => uuid() } : {},
22335
+ ...HOST_CRYPTO.subtle ? { subtle: subtleFacade(HOST_CRYPTO.subtle) } : {}
22336
+ });
22337
+ }
22119
22338
  function runBundleSandbox(bundleJs, opts) {
22120
22339
  const services2 = {};
22121
22340
  const actions = {};
@@ -22209,7 +22428,12 @@ function runBundleSandbox(bundleJs, opts) {
22209
22428
  URLSearchParams,
22210
22429
  TextEncoder,
22211
22430
  TextDecoder,
22212
- AbortController
22431
+ AbortController,
22432
+ // #6272 — allow-listed worker globals now, so a module-scope `atob(...)` or an id seeded from
22433
+ // `crypto.getRandomValues` must not break extraction either.
22434
+ atob: hostAtob,
22435
+ btoa: hostBtoa,
22436
+ crypto: webCrypto()
22213
22437
  // NO `Date` / `Math` here, pinned or not: a pinned pair built on this side would be the host's
22214
22438
  // intrinsics wearing a sandbox name. The realm builds them from its own (`pinnedIntrinsicsSource`).
22215
22439
  };
@@ -22569,7 +22793,7 @@ async function bootBundleWorker(bundleJs, opts) {
22569
22793
  // HOST globals, not ECMAScript built-ins: a bare vm context has Object/Array/Date/Intl/JSON
22570
22794
  // but NOT these. Injecting them unconditionally — INCLUDING under deviceParity — rested on
22571
22795
  // "every real worker runtime (JSC, Hermes, the web-host Worker) does" have them. **A bare
22572
- // JSContext does not**: the engine-parity runners (#1367) answer `undefined` to all five on
22796
+ // JSContext does not**: the engine-parity runners (#1367) answer `undefined` to all of them on
22573
22797
  // iOS/macOS, and so does the wrist's QuickJS-ng. Only Android's WebView has them.
22574
22798
  //
22575
22799
  // Both arms of the split are load-bearing, so keep both:
@@ -22587,10 +22811,19 @@ async function bootBundleWorker(bundleJs, opts) {
22587
22811
  ...opts.deviceParity ? {} : {
22588
22812
  URL,
22589
22813
  URLSearchParams,
22590
- TextEncoder,
22591
- TextDecoder,
22592
22814
  AbortController
22593
- }
22815
+ },
22816
+ // #6272 — these five are NOT in that split any more: every device realm has them, because the
22817
+ // runtime install gap-fills them (core/ts/src/worker-globals-shim.ts — crypto on the host's
22818
+ // CSPRNG). So the dry run offers them in both arms, as every device now does. `crypto` differs
22819
+ // by arm: under deviceParity it is the shim's surface, `getRandomValues` only, so an aliased
22820
+ // `c.randomUUID()` or `c.subtle` throws here as it does on iOS and the wrist; otherwise it is
22821
+ // the full surface the web host and Android have. Never the host's own object (see HOST_CRYPTO).
22822
+ TextEncoder,
22823
+ TextDecoder,
22824
+ atob: hostAtob,
22825
+ btoa: hostBtoa,
22826
+ crypto: opts.deviceParity ? deviceCrypto() : webCrypto()
22594
22827
  };
22595
22828
  sandbox.globalThis = sandbox;
22596
22829
  const l10nGranted = grants(opts.capabilities ?? [], "l10n");
@@ -25287,7 +25520,7 @@ function validateAppWebViewInstances(screens, opts) {
25287
25520
  ];
25288
25521
  return webViewEmbeddedIssues(findings).map((issue3, i2) => ({ ...issue3, screenId: findings[i2].screenId }));
25289
25522
  }
25290
- var CRAWL_BLOCKING_PASSES, BOOT_EVAL_TIMEOUT_MS, BUNDLE_FILENAME, DRIFT_PROBES, DEVICE_NETWORK_WITHHELD, DEVICE_STRIPPED_HOST_GLOBALS, DEVICE_WITHHELD, DEVICE_PARITY_CANDIDATES, DEVICE_PARITY_WITHHELD, defaultEvaluator, bootEvaluator, actionEvaluator, NATIVE_PROP_ENUMS, KNOWN_PROPS, IN_ARRAY_BINDING_PROPS, SERVICE_SIGIL, INTEGER_PROPS, NESTED_COMPONENT_SLOTS, NESTED_SLOT_DECODE_KILL, NATIVE_REQUIRED_PROPS, bareNestedClass, NATIVE_NESTED_CLASSES, NATIVE_MODIFIERS_CLASS, NATIVE_NESTED_SCALARS, NATIVE_DESCRIPTOR_CLASS, NATIVE_DESCRIPTOR_NESTED, NATIVE_NESTED_PROPS, LENIENT_TOP_BAR_BLOCKS, MODIFIER_KEYS, INTEGER_MODIFIERS, MODIFIER_KINDS, SCHEMA_SCORED_NODES, CORE_PACKAGES, LEGACY_UNSCORED_KEYS, DYNAMIC_PLACEHOLDER, LITERAL_ONLY_PROPS, SERVICE_ONLY_BINDING_PROPS, WHOLE_VALUE_BINDING, EMBEDDED_BINDING, OPTIONS_BINDING_PROPS, EDITOR_SERVICE_NAME, SHEET_PLACEMENTS, UNSAFE_TO_RECURSE_DEPTH, TOP_BAR_TRAILING_LIMIT, TOP_BAR_NON_TRAILING, TOP_BAR_TITLE_ALIGN_VALUES, TOP_BAR_TITLE_DISPLAY_VALUES, TOP_BAR_COVER_TONE_VALUES, TOP_BAR_SCROLL_STYLES, TOP_BAR_SEARCH_BINDINGS, TOP_BAR_SEARCH_GATE, PRESS_PROPS, PRESS_OWNING_SLOTS, TAB_BAR_KINDS_WITHOUT_BOTTOM_TABS, ORIENTATION_NAMES, DEFAULT_ENVELOPE, BUTTON_STYLES, PROP_VALUE_ENUMS, PROP_VALUE_DEFAULTS, EMPTY_STATE_ACTION_STYLES, EMPTY_STATE_ACTION_SIZES;
25523
+ var CRAWL_BLOCKING_PASSES, BOOT_EVAL_TIMEOUT_MS, BUNDLE_FILENAME, HOST_CRYPTO, hostGetRandomValues, hostRandomUUID, hostAtob, hostBtoa, SUBTLE_METHODS, DRIFT_PROBES, DEVICE_NETWORK_WITHHELD, DEVICE_STRIPPED_HOST_GLOBALS, DEVICE_WITHHELD, DEVICE_PARITY_CANDIDATES, DEVICE_PARITY_WITHHELD, defaultEvaluator, bootEvaluator, actionEvaluator, NATIVE_PROP_ENUMS, KNOWN_PROPS, IN_ARRAY_BINDING_PROPS, SERVICE_SIGIL, INTEGER_PROPS, NESTED_COMPONENT_SLOTS, NESTED_SLOT_DECODE_KILL, NATIVE_REQUIRED_PROPS, bareNestedClass, NATIVE_NESTED_CLASSES, NATIVE_MODIFIERS_CLASS, NATIVE_NESTED_SCALARS, NATIVE_DESCRIPTOR_CLASS, NATIVE_DESCRIPTOR_NESTED, NATIVE_NESTED_PROPS, LENIENT_TOP_BAR_BLOCKS, MODIFIER_KEYS, INTEGER_MODIFIERS, MODIFIER_KINDS, SCHEMA_SCORED_NODES, CORE_PACKAGES, LEGACY_UNSCORED_KEYS, DYNAMIC_PLACEHOLDER, LITERAL_ONLY_PROPS, SERVICE_ONLY_BINDING_PROPS, WHOLE_VALUE_BINDING, EMBEDDED_BINDING, OPTIONS_BINDING_PROPS, EDITOR_SERVICE_NAME, SHEET_PLACEMENTS, UNSAFE_TO_RECURSE_DEPTH, TOP_BAR_TRAILING_LIMIT, TOP_BAR_NON_TRAILING, TOP_BAR_TITLE_ALIGN_VALUES, TOP_BAR_TITLE_DISPLAY_VALUES, TOP_BAR_COVER_TONE_VALUES, TOP_BAR_SCROLL_STYLES, TOP_BAR_SEARCH_BINDINGS, TOP_BAR_SEARCH_GATE, PRESS_PROPS, PRESS_OWNING_SLOTS, TAB_BAR_KINDS_WITHOUT_BOTTOM_TABS, ORIENTATION_NAMES, DEFAULT_ENVELOPE, BUTTON_STYLES, PROP_VALUE_ENUMS, PROP_VALUE_DEFAULTS, EMPTY_STATE_ACTION_STYLES, EMPTY_STATE_ACTION_SIZES;
25291
25524
  var init_validate_descriptor_core = __esm({
25292
25525
  "../../core/dev-server/src/validate-descriptor.core.ts"() {
25293
25526
  init_define_HHP_CATALOG();
@@ -25336,6 +25569,25 @@ var init_validate_descriptor_core = __esm({
25336
25569
  ]);
25337
25570
  BOOT_EVAL_TIMEOUT_MS = 2e3;
25338
25571
  BUNDLE_FILENAME = "himi-bundle.js";
25572
+ HOST_CRYPTO = globalThis.crypto;
25573
+ hostGetRandomValues = HOST_CRYPTO.getRandomValues.bind(HOST_CRYPTO);
25574
+ hostRandomUUID = typeof HOST_CRYPTO.randomUUID === "function" ? HOST_CRYPTO.randomUUID.bind(HOST_CRYPTO) : void 0;
25575
+ hostAtob = (data) => atob(data);
25576
+ hostBtoa = (data) => btoa(data);
25577
+ SUBTLE_METHODS = [
25578
+ "encrypt",
25579
+ "decrypt",
25580
+ "sign",
25581
+ "verify",
25582
+ "digest",
25583
+ "generateKey",
25584
+ "deriveKey",
25585
+ "deriveBits",
25586
+ "importKey",
25587
+ "exportKey",
25588
+ "wrapKey",
25589
+ "unwrapKey"
25590
+ ];
25339
25591
  DRIFT_PROBES = [
25340
25592
  { clock: Date.UTC(2020, 0, 1, 12, 0, 0, 0), seed: 1 },
25341
25593
  // a Wednesday, the 1st/2nd, everywhere in -11h…+14h
@@ -25367,8 +25619,6 @@ var init_validate_descriptor_core = __esm({
25367
25619
  "clearInterval",
25368
25620
  "URL",
25369
25621
  "URLSearchParams",
25370
- "TextEncoder",
25371
- "TextDecoder",
25372
25622
  "AbortController",
25373
25623
  "webkitURL"
25374
25624
  ];
@@ -27022,6 +27272,12 @@ ${opts.liveTransport ? ` var handle = { getState: function () { return def
27022
27272
  var noop = function () {};
27023
27273
  globalThis.console = ${JSON.stringify(WORKER_CONSOLE_METHODS)}.reduce(function (c, m) { c[m] = noop; return c; }, {});`}
27024
27274
 
27275
+ // #6272 \u2014 the worker globals every device realm has now (crypto.getRandomValues on the host's
27276
+ // CSPRNG, TextEncoder/TextDecoder, atob/btoa), from the same source the bootstraps carry. Built on
27277
+ // the \`__himalaya_native_random\` bridge the host set before this prelude, then deleted.
27278
+ ${WORKER_GLOBALS_SHIM_SOURCE}
27279
+ delete globalThis.__himalaya_native_random;
27280
+
27025
27281
  globalThis.fetch = function () {
27026
27282
  throw new Error("\`fetch\` is not available in the author-time sandbox \u2014 workers load data via the sanctioned Wix transport (\`@himalaya/wix-*\` or \`globalThis.himalaya.wixApi.call\`), not raw \`fetch\`.");
27027
27283
  };
@@ -27202,6 +27458,19 @@ async function createQuickJsEvaluator(options2 = {}) {
27202
27458
  ctx.setProp(ctx.global, "__himiDispatch", bridge);
27203
27459
  bridge.dispose();
27204
27460
  }
27461
+ const random = ctx.newFunction("__himalaya_native_random", (nHandle) => {
27462
+ const n2 = Math.max(0, Math.min(65536, Math.trunc(ctx.getNumber(nHandle)) || 0));
27463
+ const bytes2 = hostGetRandomValues2(new Uint8Array(n2));
27464
+ const arr3 = ctx.newArray();
27465
+ for (let i2 = 0; i2 < n2; i2++) {
27466
+ const b3 = ctx.newNumber(bytes2[i2]);
27467
+ ctx.setProp(arr3, i2, b3);
27468
+ b3.dispose();
27469
+ }
27470
+ return arr3;
27471
+ });
27472
+ ctx.setProp(ctx.global, "__himalaya_native_random", random);
27473
+ random.dispose();
27205
27474
  const pre = ctx.evalCode(
27206
27475
  // A per-run clock/seed (#3049's drift probe) wins over the realm-wide pinned clock. Built
27207
27476
  // in the guest from the guest's own intrinsics, like every realm's (`pinnedIntrinsicsSource`).
@@ -27323,12 +27592,13 @@ function copyBack(ctx, sandbox, readback) {
27323
27592
  for (const line of lines2) consoleObj?.[line.level]?.(line.message);
27324
27593
  }
27325
27594
  }
27326
- var BUNDLE_FILENAME2, RECYCLE_AFTER_BLOWUPS, DEFAULT_MEMORY_LIMIT_BYTES, ReadbackFailure, RecyclingModulePool, pool, variantPools, modulesCreated, installPromise;
27595
+ var BUNDLE_FILENAME2, RECYCLE_AFTER_BLOWUPS, DEFAULT_MEMORY_LIMIT_BYTES, ReadbackFailure, RecyclingModulePool, pool, variantPools, modulesCreated, installPromise, hostGetRandomValues2;
27327
27596
  var init_quickjs_evaluator = __esm({
27328
27597
  "../../core/dev-server/src/quickjs-evaluator.ts"() {
27329
27598
  init_define_HHP_CATALOG();
27330
27599
  init_quickjs_intl();
27331
27600
  init_worker_console();
27601
+ init_worker_globals_shim();
27332
27602
  init_quickjs_state_codec();
27333
27603
  init_quickjs_web_globals();
27334
27604
  init_realm_parity();
@@ -27477,6 +27747,7 @@ var init_quickjs_evaluator = __esm({
27477
27747
  variantPools = /* @__PURE__ */ new WeakMap();
27478
27748
  modulesCreated = 0;
27479
27749
  installPromise = null;
27750
+ hostGetRandomValues2 = globalThis.crypto.getRandomValues.bind(globalThis.crypto);
27480
27751
  }
27481
27752
  });
27482
27753
 
@@ -40582,6 +40853,7 @@ function resolveIdiom(tokens2, ctx = {}) {
40582
40853
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
40583
40854
  var init_idiom = __esm({
40584
40855
  "../../core/ts/src/idiom.ts"() {
40856
+ "use strict";
40585
40857
  init_define_HHP_CATALOG();
40586
40858
  IDIOM_CONTEXTS = {
40587
40859
  ios: { native: ["ios"] },
@@ -42317,7 +42589,6 @@ function shouldRevealError(args) {
42317
42589
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
42318
42590
  var init_validation = __esm({
42319
42591
  "../../core/ts/src/validation.ts"() {
42320
- "use strict";
42321
42592
  init_define_HHP_CATALOG();
42322
42593
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
42323
42594
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -252663,52 +252934,52 @@ var init_preview_assets_generated = __esm({
252663
252934
  init_define_HHP_CATALOG();
252664
252935
  init_preview_assets_format();
252665
252936
  PREVIEW_ASSET_MANIFEST = [
252666
- { key: "assets/DashboardHost-BTuxidUs.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "0609e12596a679945ac827246fe7066a018f9b5f5efd1ca242cbb1346ef1ef82" },
252667
- { key: "assets/DevDrawer-BYork7D7.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "6cb51fec21877078c3e829afcc4b51cb334fdb0e1a3a4539f48bf42e33809f10" },
252668
- { key: "assets/IdiomCompare-CJTqirki.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "2ee7606f089027c39149473aed1f88aba8f788026bf3ddddc076cb3d166b630c" },
252669
- { key: "assets/LightboxViewer-BtGlQvVn.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "c0fd11c539f233095e6cd18bca66a25dfbd120b56bd63494c791359e4251dfe8" },
252670
- { key: "assets/OfflineReadingBar-DsTSKkNB.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "1f9534fbfb50e03c042b2e4ed0ce13e9cd6b0f89a66e420a8fd6fbaff19de8cd" },
252671
- { key: "assets/PhonePreviewControl-DAykTQyN.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "c6b8156190c8e2c28dda6e255299317495031e5895427953af3e3aa340a625e1" },
252672
- { key: "assets/SchemeCompare-BhxAlMkT.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "e9760c460c87179f53ef8702b6533774b9caaa266d7dcbfd7c57552e0dfcb29b" },
252673
- { key: "assets/WixFrogTelemetrySink-CBDK6t3t.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "f1fba34ca7fa3ce315c4e166b1ac1dd4ebffd9d624d8613007ce46fbd56f8248" },
252937
+ { key: "assets/DashboardHost-BkgrUNcf.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "4c444cc26eb0d6872ffc49bd4e22d9d65c1c49f15cf4e516ca0fd09ef3a0afe0" },
252938
+ { key: "assets/DevDrawer-0_bRi8d-.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "a524d2e635d0b329ec0a1ac523d2096c7f9d10d44728f418a37ef76e7a70ad63" },
252939
+ { key: "assets/IdiomCompare-D7O33XgJ.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "26e3e9f109c774bc40a79b3c15e39d1b3ea56ea6591c8639634519eb7f3dfd8b" },
252940
+ { key: "assets/LightboxViewer-BA7S1BUN.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "49cb070b2bac66b44a5b663694c73ec75171d462c35b2918204c4fb5f2f8a1c1" },
252941
+ { key: "assets/OfflineReadingBar-D0jkzqaf.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "c03ef51bbc68682a2c76e08dc41711db1a01282a0f26d21e919b8dc4faf5a77e" },
252942
+ { key: "assets/PhonePreviewControl-V0_rSxTh.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "eeb1eac2389aa6805f50f12e5426f02911bdc33d5d1edad9478a7513f1149c0f" },
252943
+ { key: "assets/SchemeCompare-CzEKl0MP.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "ba91213afe52bcf4a338f5854054163fc8f0271b4649d5093862b6c50285608d" },
252944
+ { key: "assets/WixFrogTelemetrySink-DCAT7ixx.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "ef2ac1e84ad8af224ea15e59227e1a86e67bd2060dae6c5cb1d069795df2e068" },
252674
252945
  { key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
252675
252946
  { key: "assets/catalog-B4UJpy5D.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 35626, sha256: "90111ffcf2d13eff399836acafd1f2b387859440a29dcd4a0afd8370915992cb" },
252676
- { key: "assets/catalogFontFaces-ClufIOZz.js", contentType: "application/javascript; charset=utf-8", offset: 121772, length: 1111, sha256: "955c7a159e117dff175d47148d1e680f747527f40296f1ae101079eb32805864" },
252947
+ { key: "assets/catalogFontFaces-EIY7Lk30.js", contentType: "application/javascript; charset=utf-8", offset: 121772, length: 1111, sha256: "d3270a56594d4022b73c961caa1cf0e078846257b5dbd3768d8e27ba71ed4ee4" },
252677
252948
  { key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 122883, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
252678
- { key: "assets/files-transfer-BKq34gdo.js", contentType: "application/javascript; charset=utf-8", offset: 125450, length: 6446, sha256: "082f93fab59deb398c5706edbcceb943bf119ec62b770c18af433a27d717f809" },
252949
+ { key: "assets/files-transfer-NSrjTed7.js", contentType: "application/javascript; charset=utf-8", offset: 125450, length: 6446, sha256: "2854a4f26f5dff3d60eea6615d2f28cfc0833c118277e3e822df36d6d5ad3c6d" },
252679
252950
  { key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 131896, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
252680
- { key: "assets/frogApiRules-D49qZOFJ.js", contentType: "application/javascript; charset=utf-8", offset: 133068, length: 2207, sha256: "2adc1477ed6b13c3a92049d5d0e8f597e9e58b6a6dda1f4729b18c6b9416d413" },
252951
+ { key: "assets/frogApiRules-BGjt22iK.js", contentType: "application/javascript; charset=utf-8", offset: 133068, length: 2207, sha256: "9fa074e6601a1bfb6c9ec867afa2b25d536df05ebf476372b18816026e75b7fe" },
252681
252952
  { key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 135275, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
252682
252953
  { key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 136342, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
252683
252954
  { key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 142920, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
252684
- { key: "assets/index-B3Umiitd.js", contentType: "application/javascript; charset=utf-8", offset: 145624, length: 1609815, sha256: "f848c849705f99e533cc6520de90c1f64296d8d5d3074bbf974d0271aa3e9f76" },
252685
- { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1755439, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
252686
- { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1763190, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
252687
- { key: "assets/pdf-DJ2HpPVo.js", contentType: "application/javascript; charset=utf-8", offset: 1773721, length: 488215, sha256: "6a6533b17d5be5f57674406c5399ebd5b4474e0db8ef92bc117ce36d9cf38c5e" },
252688
- { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2261936, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
252689
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2262026, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
252690
- { key: "assets/pdfDocument-Bu_w7BfF.js", contentType: "application/javascript; charset=utf-8", offset: 3579060, length: 3470, sha256: "6bc05e35d64bd4474a9981ea2cd43efd74d85ca0ecccc56925be65031595b4a6" },
252691
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3582530, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
252692
- { key: "assets/scrollLinkedRuntime-CJUtSbja.js", contentType: "application/javascript; charset=utf-8", offset: 3584796, length: 2278, sha256: "d9ba5bf78d6b5e9ccbdd87de46f686dadd56ed1e49a501cacfab102e756519ab" },
252693
- { key: "assets/webviewBridgeHost-B6bMich3.js", contentType: "application/javascript; charset=utf-8", offset: 3587074, length: 9889, sha256: "2fc7fba364acb60002a7ac66d1a8ae89f25e2766a3c2198d2dfce2e5b1d13956" },
252694
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3596963, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
252695
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3601573, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
252696
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4090157, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
252697
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4181081, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
252698
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4272065, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
252699
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4363045, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
252700
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4453917, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
252701
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4544897, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
252702
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4653533, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
252703
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4762617, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
252704
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4871665, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
252705
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4979365, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
252706
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5067473, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
252707
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5074291, length: 4924, sha256: "74c98d9f6b2f194fbe0aed2ce9ced28c4750267ffb2de81708b0cbe5943087f1" },
252708
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5079215, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
252709
- { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5090672, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
252710
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5091843, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
252711
- { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5116146, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
252955
+ { key: "assets/index-CIXK4jus.js", contentType: "application/javascript; charset=utf-8", offset: 145624, length: 1617496, sha256: "676d362b58f890c873fbfd127689f53023ed016d8a7a66b68c0ff659bccd0b45" },
252956
+ { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1763120, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
252957
+ { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1770871, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
252958
+ { key: "assets/pdf-BgvkxM5D.js", contentType: "application/javascript; charset=utf-8", offset: 1781402, length: 488215, sha256: "07b2e5e38ef6723989a20a92ad6fb8739a065fb1c1efda5414180c4d819f93a0" },
252959
+ { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2269617, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
252960
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2269707, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
252961
+ { key: "assets/pdfDocument-CZHUDmoC.js", contentType: "application/javascript; charset=utf-8", offset: 3586741, length: 3470, sha256: "68d2aaa1db1dc56c99ff5fbcf0506e26587332ce5409177e69891318d7738e76" },
252962
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3590211, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
252963
+ { key: "assets/scrollLinkedRuntime-CZfSYm3v.js", contentType: "application/javascript; charset=utf-8", offset: 3592477, length: 2278, sha256: "c9c6aa33dde82380d2b2e708aa845f0e0a5be7f91dbe287dd7fc1a9199afaec1" },
252964
+ { key: "assets/webviewBridgeHost-Bt1_kXhC.js", contentType: "application/javascript; charset=utf-8", offset: 3594755, length: 9889, sha256: "595d79f0d0c53caf1eb6285f4733dc2ca8d300a1ae7d4f6875ebdeca85d7d23d" },
252965
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3604644, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
252966
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3609254, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
252967
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4097838, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
252968
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4188762, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
252969
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4279746, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
252970
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4370726, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
252971
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4461598, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
252972
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4552578, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
252973
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4661214, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
252974
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4770298, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
252975
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4879346, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
252976
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4987046, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
252977
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5075154, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
252978
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5081972, length: 4924, sha256: "dd0e1056b5e1f92d4331742a2ae8d8a6715108bfe3e58d52986b9a3901f7e295" },
252979
+ { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5086896, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
252980
+ { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5098353, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
252981
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5099524, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
252982
+ { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5123827, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
252712
252983
  ];
252713
252984
  }
252714
252985
  });
@@ -291261,7 +291532,7 @@ MODES \u2014 pick by who is at the keyboard
291261
291532
  but the sign-in still posts back to THIS machine, so the browser must run here
291262
291533
  (otherwise use --device).
291263
291534
  --provider <id> sign in WITHOUT a Wix account where the plane offers it
291264
- (base44, \u2026): the browser goes straight to that sign-in. Such a login is
291535
+ (base44, github): the browser goes straight to that sign-in. Such a login is
291265
291536
  stored with a refresh token and renews itself when it expires.
291266
291537
  --wix HEADLESS \u2014 the mode a server, a CI job or an agent container can satisfy. It
291267
291538
  presents, in order: the owner's Wix token piped on stdin (--wix-token-stdin),
@@ -291279,10 +291550,10 @@ MODES \u2014 pick by who is at the keyboard
291279
291550
  waits (up to 10 minutes) and stores the same token --browser does. Show the
291280
291551
  owner the URL and the code, and check they see the same code.
291281
291552
  NO WIX ACCOUNT? Where the plane offers it, the page also lets the person sign
291282
- in another way (Base44, later GitHub); the token then names them as
291553
+ in another way (GitHub); the token then names them as
291283
291554
  <provider>:<id> and the JSON says "credential": "federated". Such an account
291284
291555
  can push releases and read, not run \`himi dist\` or promote yet.
291285
- --provider <id> put the sign-in choice in the link (wix, base44, \u2026) so the
291556
+ --provider <id> put the sign-in choice in the link (wix, github) so the
291286
291557
  person is not asked; \`--provider wix\` skips the choice today.
291287
291558
  --site <msid> also asks to connect that site's live data: the owner picks or
291288
291559
  confirms the site on the approve page, and the plane finds or creates the
@@ -291724,7 +291995,7 @@ async function loginCommand(ctx) {
291724
291995
  return 2;
291725
291996
  }
291726
291997
  if (flags.provider !== void 0 && !(providerFlag && LOGIN_PROVIDER_RE.test(providerFlag))) {
291727
- io2.error(JSON.stringify({ error: `--provider needs a sign-in id such as wix or base44, got ${JSON.stringify(flags.provider)}` }));
291998
+ io2.error(JSON.stringify({ error: `--provider needs a sign-in id such as wix, github or base44, got ${JSON.stringify(flags.provider)}` }));
291728
291999
  return 2;
291729
292000
  }
291730
292001
  if (providerFlag && providerFlag !== "wix" && flags.site !== void 0) {
Binary file
@@ -1,6 +1,7 @@
1
1
  // ../../core/dev-server/src/quickjs-worker-entry.ts
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
  import { pathToFileURL } from "node:url";
4
+ import { randomFillSync } from "node:crypto";
4
5
  var CTL_READY = 0;
5
6
  var CTL_LEN = 1;
6
7
  var CTL_SEQ = 2;
@@ -107,6 +108,19 @@ async function boot(msg) {
107
108
  });
108
109
  ctx.setProp(ctx.global, "__himiDispatch", dispatchHost);
109
110
  dispatchHost.dispose();
111
+ const random = ctx.newFunction("__himalaya_native_random", (nHandle) => {
112
+ const n = Math.max(0, Math.min(65536, Math.trunc(ctx.getNumber(nHandle)) || 0));
113
+ const bytes = randomFillSync(new Uint8Array(n));
114
+ const arr = ctx.newArray();
115
+ for (let i = 0; i < n; i++) {
116
+ const b = ctx.newNumber(bytes[i]);
117
+ ctx.setProp(arr, i, b);
118
+ b.dispose();
119
+ }
120
+ return arr;
121
+ });
122
+ ctx.setProp(ctx.global, "__himalaya_native_random", random);
123
+ random.dispose();
110
124
  const pre = ctx.evalCode(msg.prelude, "himi-sandbox.js");
111
125
  if (pre.error) {
112
126
  const detail = ctx.dump(pre.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1816.0",
3
+ "version": "0.1818.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "c7f34109aa1220f43a6769ceb4e2f574f8f2d0596ad017a82c5fa0a7"
85
+ "falconPackageHash": "e411481c991b98895fe74498fef1ead055b65b32f008528c9770950e"
86
86
  }