@wix/himalaya-cli 0.1731.0 → 0.1732.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
@@ -18651,6 +18651,20 @@ function responseBytes(value2) {
18651
18651
  return 0;
18652
18652
  }
18653
18653
  }
18654
+ function directiveJson(poll) {
18655
+ try {
18656
+ return JSON.stringify(poll);
18657
+ } catch {
18658
+ return void 0;
18659
+ }
18660
+ }
18661
+ function withoutKeys(state, keys2) {
18662
+ const rest = {};
18663
+ for (const [k3, v2] of Object.entries(state)) {
18664
+ if (!keys2.includes(k3)) Object.defineProperty(rest, k3, { value: v2, enumerable: true, configurable: true, writable: true });
18665
+ }
18666
+ return rest;
18667
+ }
18654
18668
  function restoredState(def2, snapshot4) {
18655
18669
  const declared = def2?.state ?? {};
18656
18670
  if (!snapshot4 || typeof snapshot4 !== "object" || Array.isArray(snapshot4)) return declared;
@@ -18669,6 +18683,29 @@ async function bootBundleWorker(bundleJs, opts) {
18669
18683
  const authoredActions = /* @__PURE__ */ new Set();
18670
18684
  const navDirectives = [];
18671
18685
  const pollDirectives = [];
18686
+ const recordPoll = (poll, bootImmediate = false) => {
18687
+ const p2 = poll && typeof poll === "object" ? poll : {};
18688
+ const record4 = {
18689
+ id: typeof p2.id === "string" ? p2.id : "",
18690
+ action: typeof p2.action === "string" ? p2.action : "",
18691
+ intervalMs: typeof p2.intervalMs === "number" ? p2.intervalMs : null,
18692
+ immediate: p2.immediate === void 0 ? bootImmediate : p2.immediate === true,
18693
+ stop: p2.stop === true
18694
+ };
18695
+ pollDirectives.push(record4);
18696
+ return record4;
18697
+ };
18698
+ const bootPolls = /* @__PURE__ */ new Map();
18699
+ const hasOwnPoll = (state) => !!state && typeof state === "object" && !Array.isArray(state) && Object.hasOwn(state, "_poll");
18700
+ const withoutPoll = (state) => withoutKeys(state, ["_poll"]);
18701
+ const takeBootPoll = (def2) => {
18702
+ const state = def2.state;
18703
+ if (!hasOwnPoll(state)) return;
18704
+ const poll = state._poll;
18705
+ def2.state = withoutPoll(state);
18706
+ if (!poll) return;
18707
+ bootPolls.set(def2, { record: recordPoll(poll, true), json: directiveJson(poll) });
18708
+ };
18672
18709
  const oversizeWixResponses = [];
18673
18710
  const seenOversize = /* @__PURE__ */ new Set();
18674
18711
  const diagnose = (message2) => {
@@ -18731,6 +18768,7 @@ async function bootBundleWorker(bundleJs, opts) {
18731
18768
  state: restoredState(def2, opts.persistedState?.[String(name)]),
18732
18769
  actions: def2?.actions ?? {}
18733
18770
  };
18771
+ takeBootPoll(entry);
18734
18772
  captured.push({ name: String(name), def: entry });
18735
18773
  const handle = { getState: () => entry.state };
18736
18774
  for (const k3 of Object.keys(entry.actions)) {
@@ -18896,16 +18934,9 @@ async function bootBundleWorker(bundleJs, opts) {
18896
18934
  if (!next || typeof next !== "object" || Array.isArray(next)) return;
18897
18935
  const rec = next;
18898
18936
  const poll = rec._poll;
18899
- if (poll) {
18900
- const p2 = poll;
18901
- pollDirectives.push({
18902
- id: typeof p2.id === "string" ? p2.id : "",
18903
- action: typeof p2.action === "string" ? p2.action : "",
18904
- intervalMs: typeof p2.intervalMs === "number" ? p2.intervalMs : null,
18905
- immediate: p2.immediate === true,
18906
- stop: p2.stop === true
18907
- });
18908
- }
18937
+ const bootJson = bootPolls.get(def2)?.json;
18938
+ const leakedBootPoll = poll !== void 0 && bootJson !== void 0 && bootJson === directiveJson(poll);
18939
+ if (poll && !leakedBootPoll) recordPoll(poll);
18909
18940
  const nav = rec._nav;
18910
18941
  if (nav && typeof nav === "object" && typeof nav.screenId === "string") {
18911
18942
  const args = {};
@@ -18923,16 +18954,7 @@ async function bootBundleWorker(bundleJs, opts) {
18923
18954
  });
18924
18955
  }
18925
18956
  if ("_nav" in rec || "_stream" in rec || "_poll" in rec || "_error" in rec) {
18926
- const stripped = {};
18927
- for (const [k3, v2] of Object.entries(rec)) {
18928
- if (k3 === "_nav" || k3 === "_stream" || k3 === "_poll" || k3 === "_error") continue;
18929
- Object.defineProperty(stripped, k3, {
18930
- value: v2,
18931
- enumerable: true,
18932
- configurable: true,
18933
- writable: true
18934
- });
18935
- }
18957
+ const stripped = withoutKeys(rec, ["_nav", "_stream", "_poll", "_error"]);
18936
18958
  def2.state = clearRuntimeError({ ...def2.state, ...stripped });
18937
18959
  published(def2);
18938
18960
  return;
@@ -19003,6 +19025,7 @@ async function bootBundleWorker(bundleJs, opts) {
19003
19025
  const { def: def2 } = capturedEntry;
19004
19026
  if (entry.state !== void 0 && entry.state !== null && typeof entry.state === "object") {
19005
19027
  def2.state = entry.state;
19028
+ if (bootPolls.has(def2) && hasOwnPoll(def2.state)) def2.state = withoutPoll(def2.state);
19006
19029
  }
19007
19030
  if (entry.error !== void 0) {
19008
19031
  entry.error = explainWithheldError(entry.error, opts.deviceParity === true);
@@ -19083,6 +19106,22 @@ async function bootBundleWorker(bundleJs, opts) {
19083
19106
  }
19084
19107
  };
19085
19108
  }
19109
+ if (!opts.skipLoad) {
19110
+ for (const { record: record4, json: json9 } of bootPolls.values()) {
19111
+ const coherent = record4.id !== "" && record4.intervalMs !== null && Number.isFinite(record4.intervalMs) && record4.intervalMs > 0;
19112
+ if (json9 === void 0 || record4.stop || !record4.immediate || !coherent) continue;
19113
+ const dot = record4.action.indexOf(".");
19114
+ const service = record4.action.slice(0, dot);
19115
+ const action = record4.action.slice(dot + 1);
19116
+ if (dot <= 0 || !Object.hasOwn(handles, service) || !handles[service].actionNames().includes(action)) continue;
19117
+ try {
19118
+ await handles[service].dispatch(action);
19119
+ } catch (err) {
19120
+ errors.push({ service, message: err?.message ?? String(err) });
19121
+ }
19122
+ }
19123
+ for (const { name, def: def2 } of captured) services2[name] = clone(def2.state);
19124
+ }
19086
19125
  return { services: services2, calls, errors, oversizeWixResponses, handles, navDirectives, pollDirectives, dispose: () => {
19087
19126
  for (const t2 of timers) clearTimeout(t2);
19088
19127
  timers.clear();
@@ -40481,6 +40520,7 @@ function shouldRevealError(args) {
40481
40520
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
40482
40521
  var init_validation = __esm({
40483
40522
  "../../core/ts/src/validation.ts"() {
40523
+ "use strict";
40484
40524
  init_define_HHP_CATALOG();
40485
40525
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
40486
40526
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -238738,52 +238778,52 @@ var init_preview_assets_generated = __esm({
238738
238778
  init_define_HHP_CATALOG();
238739
238779
  init_preview_assets_format();
238740
238780
  PREVIEW_ASSET_MANIFEST = [
238741
- { key: "assets/DashboardHost-D9FSUyax.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "02a28e91495907eb07f8c7d24f6aca9763cec96f52e7174d73416ec8796d80ee" },
238742
- { key: "assets/DevDrawer-BJ-zlz1S.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "da23703eab304a3117f9f762c7bd8f35bc345bf8afa5c146a5f174d6465d79dd" },
238743
- { key: "assets/IdiomCompare-Dpfcnp68.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "5fcbdb46266d5ccf8d3f0cbba6373737fdb45f6c0c80263ce9fd37b7ee8f7c4c" },
238744
- { key: "assets/LightboxViewer-CPZWnfeh.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "ab537bd6d364477ba422c49151a6bcb2f0515987a2d6224f0a5994e89f7afe41" },
238745
- { key: "assets/OfflineReadingBar-5gUYL9br.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "f53e8a471d620cc08db5017a0e41958fac6edb372b00fda3a0735b36e7c6f6f8" },
238746
- { key: "assets/PhonePreviewControl-C7ye3RGL.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "cb50123b51204ddf4dfd830ae5281d9b634b36014a7fd78ec4600042212eab32" },
238747
- { key: "assets/SchemeCompare-D6wYwnbU.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "00d6736cb845a1486c4db35b1f6a4e33a2965f65f522fc1b86ae43bc08bdd738" },
238748
- { key: "assets/WixFrogTelemetrySink-Cqm-sKvr.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "66c1f00771e00d7a6f9abc8cf180aa07c6f5f985df9a68c6ba9b685c4686c2ee" },
238781
+ { key: "assets/DashboardHost-_bUu4rzw.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "12a9a00647f822c3a79eddcdc738791612f609abd85b727f10741ce9672de4e5" },
238782
+ { key: "assets/DevDrawer-CesMsu-N.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "370a5b2d4e5338097e652214067402ce923de5b4824cf82ddbb39cdb5b0bea5e" },
238783
+ { key: "assets/IdiomCompare-B-1vJwQV.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "06a48352ba10d66111d798b8929f0fffbd6284dde36434f71af45906a6ae80de" },
238784
+ { key: "assets/LightboxViewer-CEl8kTZ5.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "063f0b1ece0545b9dd406805f24a041cef9790c1e294483f6134984e89ed74c8" },
238785
+ { key: "assets/OfflineReadingBar-Cim8oVod.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "5a729023861d10ce0292dfb263103ded559cfc50af1cdd7c4c893543ee8d41b8" },
238786
+ { key: "assets/PhonePreviewControl-B-JBu9To.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "246fbcfc110e9d480034db763285e8b40119b1ee800adddc5b23fa5a331b71e1" },
238787
+ { key: "assets/SchemeCompare-DwLM3Q2g.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "90df87531dd4ef34fd2674f4398545d63dbfd05fb725bf80a17fbb0803498b52" },
238788
+ { key: "assets/WixFrogTelemetrySink-CiKiJ3cx.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "ac9b83d8f84200b33a787dd93f0875b0c06bbf296750634c3b791ac5882b0556" },
238749
238789
  { key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
238750
238790
  { key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
238751
- { key: "assets/catalogFontFaces-oNeBOEsr.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "53273c99da892f51a292ec980cfda40a1c1d05b5b381d7a7c82b4bbcb74ab182" },
238791
+ { key: "assets/catalogFontFaces-DbC8wK9i.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "fe7f240c3412eb5056731ee96df05b0e7a23afd17384202de9d469c69eed5814" },
238752
238792
  { key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
238753
- { key: "assets/files-transfer-DKsBO_oG.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "140ac693c18bad28b946f1337bc12fec96324ad7f47a05c28f9ce28407eea90f" },
238793
+ { key: "assets/files-transfer-BoatCtG7.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "c6abf900ad5e306ba93a01e521e3eeaed89a3a17acdd9c89b214956682ed06a3" },
238754
238794
  { key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
238755
- { key: "assets/frogApiRules-DTjmDRWh.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "b94f9881dadd95ce77fd1d45cfb5bd35fb88adbad2d35be51b3d3291e1a5e146" },
238795
+ { key: "assets/frogApiRules-BS8TxKbk.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "c570912110396270707386f6a9175dde99de1044b115e2c1db7fcdf80fd4d178" },
238756
238796
  { key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
238757
238797
  { key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
238758
238798
  { key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133340, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
238759
- { key: "assets/index-Bad8mT39.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1578673, sha256: "3234f7f719d9a2bea709f2d9e1ea9bd3d564714ad24414e5e63c1da8474cf70e" },
238760
- { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1714717, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
238761
- { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1722468, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
238762
- { key: "assets/pdf-CfHYR48U.js", contentType: "application/javascript; charset=utf-8", offset: 1732999, length: 488215, sha256: "9c4b4a8e0772f247f08e61b35d51b0bd2574408381cab23ec88cad1c7df68177" },
238763
- { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2221214, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
238764
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2221304, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
238765
- { key: "assets/pdfDocument-QdPwvQUS.js", contentType: "application/javascript; charset=utf-8", offset: 3538338, length: 3470, sha256: "0efe5a23c4e58d2f805b4a0fc38f38146c52365f4c5c127f25f270a80aff831c" },
238766
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3541808, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
238767
- { key: "assets/scrollLinkedRuntime-CfHEpgqb.js", contentType: "application/javascript; charset=utf-8", offset: 3544074, length: 2278, sha256: "fe08da962fdde0b76ee7b8d0e7ae61c2f55c25841bfb991f2cc9052dec8654f4" },
238768
- { key: "assets/webviewBridgeHost-Y6DYLRJy.js", contentType: "application/javascript; charset=utf-8", offset: 3546352, length: 9889, sha256: "808f38f19cbc910f8bb2e2d2b7fd6df81704b64926713ac1abeb8b05c14c5dd4" },
238769
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3556241, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
238770
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3560851, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
238771
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4049435, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
238772
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4140359, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
238773
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4231343, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
238774
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4322323, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
238775
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4413195, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
238776
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4504175, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
238777
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4612811, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
238778
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4721895, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
238779
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4830943, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
238780
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4938643, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
238781
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5026751, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
238782
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5033569, length: 4924, sha256: "04f4fefad7f706cf9cfff0b1f2edb135f845a493642be9bb82f905f1953d859b" },
238783
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5038493, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
238784
- { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5049950, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
238785
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5051121, length: 24239, sha256: "42bd04b28606706389a6b3ab79b74f37259ab43bf66580d2d9c69be5980a53fe" },
238786
- { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5075360, length: 24256, sha256: "c14ee20bf56b80e2622177d34824b18f368c66faaffd7ea3aa9b07b60582411c" }
238799
+ { key: "assets/index-DXdlE0BN.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1582250, sha256: "3cceda5408ce0a61c7639335e6a8fc74d9a07b465ee5e4395d487fbef18ec786" },
238800
+ { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1718294, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
238801
+ { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1726045, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
238802
+ { key: "assets/pdf-sB1lTpkq.js", contentType: "application/javascript; charset=utf-8", offset: 1736576, length: 488215, sha256: "4235535ddd6e62ae867fd4d3588054909040428cffec9bea2807693a68e297d9" },
238803
+ { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2224791, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
238804
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2224881, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
238805
+ { key: "assets/pdfDocument-DNpw6jPI.js", contentType: "application/javascript; charset=utf-8", offset: 3541915, length: 3470, sha256: "e5187048a056cdb09cb2ab09a3a3a1257dfe5092a1af29450eadcbe2e9d2d326" },
238806
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3545385, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
238807
+ { key: "assets/scrollLinkedRuntime-CD-iBuJf.js", contentType: "application/javascript; charset=utf-8", offset: 3547651, length: 2278, sha256: "36a015da2953e6e33059901ef7674702237ace8733e51fe59c8a7c72b16bffd8" },
238808
+ { key: "assets/webviewBridgeHost-DwGkjc4C.js", contentType: "application/javascript; charset=utf-8", offset: 3549929, length: 9889, sha256: "232e8b0a238a7aff4cf05a967cbf33cc4b4ab1160026db834042f4fc537f3241" },
238809
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3559818, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
238810
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3564428, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
238811
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4053012, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
238812
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4143936, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
238813
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4234920, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
238814
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4325900, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
238815
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4416772, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
238816
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4507752, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
238817
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4616388, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
238818
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4725472, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
238819
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4834520, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
238820
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4942220, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
238821
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5030328, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
238822
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5037146, length: 4924, sha256: "51032ca2443b41889450d025ba3b7cbd0631fabc4cad948ac18ecaf4db205da7" },
238823
+ { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5042070, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
238824
+ { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5053527, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
238825
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5054698, length: 24239, sha256: "42bd04b28606706389a6b3ab79b74f37259ab43bf66580d2d9c69be5980a53fe" },
238826
+ { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5078937, length: 24256, sha256: "c14ee20bf56b80e2622177d34824b18f368c66faaffd7ea3aa9b07b60582411c" }
238787
238827
  ];
238788
238828
  }
238789
238829
  });
Binary file
@@ -653,7 +653,7 @@ What the host guarantees, on every surface:
653
653
  screen reappears, then resumes cadence. The poll ends only when the worker itself is
654
654
  torn down: evicted from the pool, or the pool reset.
655
655
 
656
- Two things to know before you reach for it:
656
+ Before you reach for it:
657
657
 
658
658
  - **Stop it when the work is done.** Return `_poll: { id, stop: true }` to cancel the poll
659
659
  `id` — typically from the polled action itself, on the tick that sees the job finish:
@@ -676,6 +676,16 @@ Two things to know before you reach for it:
676
676
  - **Emit it from the action that runs on every entry**, not only from a first-open path.
677
677
  Restored worker state re-paints data but arms no timer, so a poll armed only by `open`
678
678
  restores into a screen that *looks* live and never refreshes.
679
+ - **A `_poll` in the declared `state` arms at boot.** Every host strips it and starts it
680
+ when the worker boots, firing at once unless it says `immediate: false`. Prefer an
681
+ appear or `load()` action for the first load all the same: it reads as a load, and the
682
+ poll is then only the refresh.
683
+ - **A poll must never overwrite state the user controls.** The polled action merges what
684
+ the server says into the data and leaves the user's own state alone: the search query,
685
+ the selected filter or tab, a draft, an open sheet, a scroll target. A tick that resets
686
+ `query: ""` and `filter: "all"` undoes the user's search every interval while the text
687
+ stays in the field. Keep refreshed data and user-controlled state in separate
688
+ keys, and spread the current state rather than rebuilding it from defaults.
679
689
 
680
690
  `himi test --content` resolves the `action` you name against the actions your bundle
681
691
  really declares and fails on a miss (`poll-action-missing`) — a typo there is otherwise
@@ -1493,8 +1503,11 @@ When adding a new T5 screen, you should end up with:
1493
1503
  type/action/budget policy plus a usable fallback, and tests accepted,
1494
1504
  unresolved, and rejected trees
1495
1505
  - [ ] Any `_poll` directive names a real `"<service>.<action>"`, drives an
1496
- **idempotent** (merge-by-id) reducer, and is emitted from the action that runs
1497
- on every entry — verified with `himi test --content` (`poll-action-missing`)
1506
+ **idempotent** (merge-by-id) reducer, and is either declared in the service's
1507
+ initial `state` (armed at boot) or emitted from the action that runs on every
1508
+ entry — verified with `himi test --content` (`poll-action-missing`)
1509
+ - [ ] A polled action never resets user-controlled state (query, filter, selection,
1510
+ draft, open sheet); it only merges refreshed data
1498
1511
 
1499
1512
  If the screen also needs new native verbs, that's a binary release — file an RFC.
1500
1513
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1731.0",
3
+ "version": "0.1732.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": "ef59f858d3970d540cd79bc01a0fe024f4f025d6169544a0f32ad4fc"
85
+ "falconPackageHash": "b2a768f503a97e600fdef5042b12ce5c53c8d81f092b5b0f57c6b9ac"
86
86
  }