@wix/himalaya-cli 0.1831.0 → 0.1832.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
@@ -4411,6 +4411,7 @@ var init_himi_package = __esm({
4411
4411
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
4412
4412
  var init_icon_catalog_generated = __esm({
4413
4413
  "../../core/ts/src/icon-catalog.generated.ts"() {
4414
+ "use strict";
4414
4415
  init_define_HHP_CATALOG();
4415
4416
  ICON_VIEW_BOX = 24;
4416
4417
  ICON_STROKE_WIDTH = 2;
@@ -146986,7 +146987,7 @@ function platformFrameElement(spec, ctx, content, text32, plainText3 = (v2) => S
146986
146987
  ] });
146987
146988
  } else if (shape === "small") {
146988
146989
  const literalTitle = typeof spec.title === "string" && spec.title.trim() !== "" && (!spec.title.trim().startsWith("$") || spec.title.trim().startsWith("$t:"));
146989
- const smallTitle = literalTitle && !spec.hasStickyHeader && !spec.leadingNone && !spec.immersive && !spec.searchable ? text32(spec.title) : null;
146990
+ const smallTitle = literalTitle && !spec.hasStickyHeader && !spec.leadingNone && !spec.titleHiddenAtRest && !spec.searchable ? text32(spec.title) : null;
146990
146991
  if (smallTitle != null || leading || trailing) {
146991
146992
  navBar = /* @__PURE__ */ jsxs13("div", { "data-testid": "platform-nav-bar", "data-title": smallTitle != null ? "small" : "none", style: { fontFamily: font, height: 48, padding: "0 4px", display: "flex", alignItems: "center" }, children: [
146992
146993
  leading,
@@ -147811,6 +147812,9 @@ function platformFrameFor(screenId, descriptor, navigation, homeScreenId, platfo
147811
147812
  ...cancel && leading === "cancel" ? { cancelLabel: cancel.label ?? cancel.id } : {},
147812
147813
  leadingNone: bar.leading === "none",
147813
147814
  immersive: bar.style === "immersive" || bar.style === "transparent",
147815
+ // RFC 0066 S-TRANS / S-SOLID: the Android title comes in with the fill, so at rest a transparent bar, or a cover
147816
+ // with `solid_after`, shows none; a plain cover keeps its title (C3).
147817
+ titleHiddenAtRest: bar.style === "transparent" || bar.style === "immersive" && bar.solidAfter != null,
147814
147818
  searchable: bar.searchable != null,
147815
147819
  barHidden: (boundVisibility === "visible" || boundVisibility === "hidden" ? boundVisibility : bar.visibility) === "hidden",
147816
147820
  pushed,
@@ -154972,6 +154976,7 @@ var init_crawl_relations = __esm({
154972
154976
  var screen_crawl_exports = {};
154973
154977
  __export(screen_crawl_exports, {
154974
154978
  MEMBER_IDENTITY_ACTION: () => MEMBER_IDENTITY_ACTION,
154979
+ REPEATED_CALL_LIMIT: () => REPEATED_CALL_LIMIT,
154975
154980
  UNTRACKED_ITEMS: () => UNTRACKED_ITEMS,
154976
154981
  actionSites: () => actionSites,
154977
154982
  actionSitesForDescriptor: () => actionSitesForDescriptor,
@@ -154989,6 +154994,7 @@ __export(screen_crawl_exports, {
154989
154994
  deepStateSignature: () => deepStateSignature,
154990
154995
  emptiedArrays: () => emptiedArrays,
154991
154996
  findingKey: () => findingKey,
154997
+ guardRepeatedCalls: () => guardRepeatedCalls,
154992
154998
  hostDispatch: () => hostDispatch,
154993
154999
  isUnservedRequest: () => isUnservedRequest,
154994
155000
  layeredTransport: () => layeredTransport,
@@ -155838,6 +155844,21 @@ function hasOwnError(state) {
155838
155844
  }
155839
155845
  return false;
155840
155846
  }
155847
+ function guardRepeatedCalls(call, onLoop, limit = REPEATED_CALL_LIMIT) {
155848
+ let last;
155849
+ let run4 = 0;
155850
+ return async (method, path2, body, headers2) => {
155851
+ const key4 = JSON.stringify([String(method).toUpperCase(), String(path2), body, headers2]);
155852
+ run4 = key4 === last ? run4 + 1 : 1;
155853
+ last = key4;
155854
+ if (run4 <= limit) return call(method, path2, body, headers2);
155855
+ if (run4 > limit + 1) return new Promise(() => {
155856
+ });
155857
+ const message5 = `the worker sent the same request ${limit + 1} times in a row (${String(method).toUpperCase()} ${String(path2).split("?")[0]}) \u2014 a loop, stopped. A paging loop must end on an empty page, whatever the response's total says`;
155858
+ onLoop(message5);
155859
+ throw new Error(message5);
155860
+ };
155861
+ }
155841
155862
  function snapshot3(w2) {
155842
155863
  const state = {};
155843
155864
  const defects = {};
@@ -155868,8 +155889,14 @@ async function bootScreenWorker(opts) {
155868
155889
  opts.base44Data,
155869
155890
  opts.storageSession
155870
155891
  );
155892
+ const loops = [];
155893
+ let bootErrors;
155894
+ const wixCall = guardRepeatedCalls(opts.wixCall, (message5) => {
155895
+ if (bootErrors) bootErrors.push({ service: "(boot)", message: message5 });
155896
+ else loops.push(message5);
155897
+ });
155871
155898
  const w2 = await bootBundleWorker(opts.bundleJs, {
155872
- wixCall: opts.wixCall,
155899
+ wixCall,
155873
155900
  input,
155874
155901
  budgetMs: opts.budgetMs ?? 2e3,
155875
155902
  // THE SAME CLOCK THE WORKER IS PINNED TO, one line below. `?? 0` gave the fixtures epoch 1970
@@ -155899,6 +155926,8 @@ async function bootScreenWorker(opts) {
155899
155926
  ...opts.evaluator ? { evaluator: opts.evaluator } : {},
155900
155927
  ...opts.webview ? { webview: opts.webview } : {}
155901
155928
  });
155929
+ bootErrors = w2.errors;
155930
+ for (const message5 of loops) w2.errors.push({ service: "(boot)", message: message5 });
155902
155931
  let deadLifecycle;
155903
155932
  if (appear) {
155904
155933
  const parsed = parseWorkerAction(appear.actionId);
@@ -157553,7 +157582,7 @@ async function crawlScreenRelations(opts) {
157553
157582
  return { findings: dedupe(findings), checked, byKind };
157554
157583
  });
157555
157584
  }
157556
- var ACTION_KEYS, UNTRACKED_ITEMS, NESTED_ITEMS_SEP, REJECT_ALL_MESSAGE, WIX_DATA_QUERY, WIX_DATA_ANY, CAPABILITY_ACTION, detached, CRAWL_PRINCIPAL, CRAWL_CLOCK, MEMBER_IDENTITY_ACTION, BLANK_WHEN_BOUND, CONTROL_ROLES, NAME_KEYS, A11Y_ROWS_PER_LIST, A11Y_LIST_DEPTH, ITEM_PATH_RE, UNOBSERVED_COPY_KEYS, LABEL_NEEDS_HANDLER, REPEATER_TEMPLATE_KEYS, STALE_SNAPSHOT_HINT, UNBINDABLE_ROW;
157585
+ var ACTION_KEYS, UNTRACKED_ITEMS, NESTED_ITEMS_SEP, REJECT_ALL_MESSAGE, WIX_DATA_QUERY, WIX_DATA_ANY, CAPABILITY_ACTION, detached, CRAWL_PRINCIPAL, CRAWL_CLOCK, MEMBER_IDENTITY_ACTION, BLANK_WHEN_BOUND, CONTROL_ROLES, NAME_KEYS, A11Y_ROWS_PER_LIST, A11Y_LIST_DEPTH, ITEM_PATH_RE, UNOBSERVED_COPY_KEYS, LABEL_NEEDS_HANDLER, REPEATER_TEMPLATE_KEYS, STALE_SNAPSHOT_HINT, REPEATED_CALL_LIMIT, UNBINDABLE_ROW;
157557
157586
  var init_screen_crawl = __esm({
157558
157587
  "../../core/dev-server/src/screen-crawl.ts"() {
157559
157588
  init_define_HHP_CATALOG();
@@ -157637,6 +157666,7 @@ var init_screen_crawl = __esm({
157637
157666
  };
157638
157667
  REPEATER_TEMPLATE_KEYS = /* @__PURE__ */ new Set(["items", "pages"]);
157639
157668
  STALE_SNAPSHOT_HINT = 'if every path already does, look for a stale-snapshot write-back: `return s` (or `{ ...s }`) after an await or from an early-return guard writes back the state as it was BEFORE the await, loading flag included \u2014 to change nothing, return `undefined` instead (not `null` or `{}`); see `himi docs tier-5-add-a-screen`, "Should this result be committed at all?"';
157669
+ REPEATED_CALL_LIMIT = 50;
157640
157670
  UNBINDABLE_ROW = Symbol("unbindable-row");
157641
157671
  }
157642
157672
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1831.0",
3
+ "version": "0.1832.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": "3a999aa656f046af9927c9e90fad9ea641f5776f956c7d818a7d6834"
85
+ "falconPackageHash": "d6080e18d84079538742fa163908311e3044bc5a7ac9c229e9c00fcb"
86
86
  }
@@ -188,6 +188,9 @@ export function registerBlogList(serviceName: string, options: BlogListOptions)
188
188
  while (rows.length < want) {
189
189
  const size = Math.min(want - rows.length, limited ? MAX_PAGE : PAGE);
190
190
  const batch = await read(at, size);
191
+ // An empty page cannot advance `at`, so the same query would repeat forever. The total can disagree with the posts a reader may
192
+ // see (hidden or deleted posts, a count that lags), so an empty page ends the list whatever the total says.
193
+ if (!batch.posts.length) { total = batch.total; more = false; break; }
191
194
  const now = Date.now();
192
195
  rows.push(...batch.posts.map((post) => rowOf(post, now)));
193
196
  at += batch.posts.length;