@wix/himalaya-cli 0.1773.0 → 0.1774.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
@@ -41920,6 +41920,7 @@ function shouldRevealError(args) {
41920
41920
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
41921
41921
  var init_validation = __esm({
41922
41922
  "../../core/ts/src/validation.ts"() {
41923
+ "use strict";
41923
41924
  init_define_HHP_CATALOG();
41924
41925
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
41925
41926
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -270099,7 +270100,8 @@ function generateScreens(input) {
270099
270100
  const hidden = obj11(obj11(layoutItems[layoutItemId ?? ""]).settings).hideFromNavigation === true;
270100
270101
  return layoutItemId && !hidden ? [{ layoutItemId, label: str16(tab.title).trim(), icon: str16(tab.icon) }] : [];
270101
270102
  }) : [];
270102
- addNavigation(out2, ownTabs.length ? { target: { tabs: ownTabs, overflow: ownTabs.length > BOTTOM_TABS_BEFORE_MORE + 1 } } : planned2, taken2);
270103
+ const pageIconOf = (layoutItemId) => arr(obj11(layoutItems[layoutItemId]).elements).map(obj11).map((element) => PAGE_TYPE_ICONS[str16(obj11(sections2[str16(element.elementId)]).sectionDefinitionId)]).find(Boolean);
270104
+ addNavigation(out2, ownTabs.length ? { target: { tabs: ownTabs, overflow: ownTabs.length > BOTTOM_TABS_BEFORE_MORE + 1 } } : planned2, taken2, pageIconOf);
270103
270105
  resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen, forumOnly);
270104
270106
  const navTitle = /* @__PURE__ */ new Map();
270105
270107
  for (const tab of ownTabs) if (!navTitle.has(tab.layoutItemId)) navTitle.set(tab.layoutItemId, tab.label);
@@ -270216,7 +270218,7 @@ function tabsFile(result, navigation) {
270216
270218
  pages: result.pages
270217
270219
  };
270218
270220
  }
270219
- function addNavigation(out2, plan, taken2) {
270221
+ function addNavigation(out2, plan, taken2, pageIconOf) {
270220
270222
  const plannedTabs = arr(obj11(plan.target).tabs).map(obj11);
270221
270223
  if (!plannedTabs.length) return;
270222
270224
  const routeOf = new Map(out2.routes.map((r3) => [r3.layoutItemId, r3]));
@@ -270236,10 +270238,11 @@ function addNavigation(out2, plan, taken2) {
270236
270238
  }
270237
270239
  const overflow = obj11(plan.target).overflow === true && tabs.length > BOTTOM_TABS_BEFORE_MORE + 1;
270238
270240
  const bottom = overflow ? tabs.slice(0, BOTTOM_TABS_BEFORE_MORE) : tabs;
270239
- for (const tab of bottom) {
270241
+ for (const [position, tab] of bottom.entries()) {
270240
270242
  const route = routeOf.get(str16(tab.layoutItemId));
270241
270243
  if (route?.screenId) {
270242
- out2.tabs.push({ layoutItemId: str16(tab.layoutItemId), label: str16(tab.label), ...str16(tab.icon) ? { icon: str16(tab.icon) } : {}, screenId: route.screenId });
270244
+ const pageIcon = position === 0 ? HOME_TAB_ICON : pageIconOf(str16(tab.layoutItemId));
270245
+ out2.tabs.push({ layoutItemId: str16(tab.layoutItemId), label: str16(tab.label), ...str16(tab.icon) ? { icon: str16(tab.icon) } : {}, ...pageIcon ? { pageIcon } : {}, screenId: route.screenId });
270243
270246
  if (route.openOnly) out2.gaps.push({ page: str16(tab.label), sectionId: "", sectionDefinitionId: "(navigation)", reason: `this tab opens the shared ${route.screenId} screen, that another page also opens, so ${JSON.stringify(route.params)} cannot be set from a tab (a More row passes it with its tap)` });
270244
270247
  } else out2.unmapped.push({ page: str16(tab.label), sectionId: "", sectionDefinitionId: "(navigation)", reason: "this tab's page has no screen to open" });
270245
270248
  }
@@ -270272,7 +270275,7 @@ function addNavigation(out2, plan, taken2) {
270272
270275
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
270273
270276
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
270274
270277
  }
270275
- var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, TEMPLATE_FALLBACKS, MODULES, obj11, arr, str16, node, text28, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, SUBSCRIPTIONS_MAX, selectedPlanIds, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, GALLERIES_INLINE_MAX, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, SOCIAL_NETWORKS, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
270278
+ var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj11, arr, str16, node, text28, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, SUBSCRIPTIONS_MAX, selectedPlanIds, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, GALLERIES_INLINE_MAX, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, SOCIAL_NETWORKS, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
270276
270279
  var init_generate2 = __esm({
270277
270280
  "src/one-app/generate.ts"() {
270278
270281
  init_define_HHP_CATALOG();
@@ -270397,6 +270400,58 @@ var init_generate2 = __esm({
270397
270400
  vod_list_section: "himi_videos",
270398
270401
  bookings_agenda_section: "himi_agenda"
270399
270402
  };
270403
+ PAGE_TYPE_ICONS = {
270404
+ forum: "appEditor.outline.forum",
270405
+ groups_feed_section: "appEditor.outline.group",
270406
+ groups_list_section: "appEditor.outline.group",
270407
+ groups_cards_section: "appEditor.outline.group",
270408
+ events_carousel_section: "appEditor.outline.calendar",
270409
+ events_list_section: "appEditor.outline.calendar",
270410
+ events_schedule_section: "appEditor.outline.calendar",
270411
+ events_discussion_section: "appEditor.outline.calendar",
270412
+ events_guests_section: "appEditor.outline.calendar",
270413
+ newBlog_compact_post_list_vertical_section: "appEditor.outline.forum",
270414
+ newBlog_postlist_vertical_section: "appEditor.outline.forum",
270415
+ newBlog_postlist_carousel_full_section: "appEditor.outline.forum",
270416
+ newBlog_postlist_carousel_section: "appEditor.outline.forum",
270417
+ newBlog_category_list_vertical_section: "appEditor.outline.forum",
270418
+ newBlog_search_section: "appEditor.outline.forum",
270419
+ member_horizontal_list_section: "appEditor.outline.group",
270420
+ platform_general_members_section: "appEditor.outline.group",
270421
+ member_list_section: "appEditor.outline.group",
270422
+ memberships_plan_cards_carousel: "appEditor.outline.subscriptions",
270423
+ platform_paid_plans_section: "appEditor.outline.subscriptions",
270424
+ memberships_packages_section: "appEditor.outline.subscriptions",
270425
+ upcoming_bookings_section: "appEditor.outline.dates",
270426
+ bookings_agenda_section: "appEditor.outline.dates",
270427
+ bookings_services_list_section: "appEditor.outline.dates",
270428
+ platform_general_upcoming_section: "appEditor.outline.dates",
270429
+ performance_tracker_section: "appEditor.outline.lightning",
270430
+ stores_products_grid_section: "appEditor.outline.bag",
270431
+ stores_products_carousel_section: "appEditor.outline.bag",
270432
+ photoAlbums_list_section: "appEditor.outline.image",
270433
+ photoAlbums_carousel_section: "appEditor.outline.image",
270434
+ proGallery_gallery_list_section: "appEditor.outline.image",
270435
+ progallery_carousel_section: "appEditor.outline.image",
270436
+ achievements_list_section: "appEditor.outline.onlinePrograms",
270437
+ achievements_carousel_section: "appEditor.outline.onlinePrograms",
270438
+ achievements_participant_carousel_section: "appEditor.outline.onlinePrograms",
270439
+ woa_member_restaurants_order: "appEditor.outline.brochure",
270440
+ woa_member_restaurants_reservation: "appEditor.outline.reservations",
270441
+ reservations_section: "appEditor.outline.reservations",
270442
+ loyalty_status_section: "appEditor.outline.loyalty",
270443
+ loyalty_offering_section: "appEditor.outline.loyalty",
270444
+ vod_list_section: "appEditor.outline.video",
270445
+ vod_carousel_section: "appEditor.outline.video",
270446
+ platform_general_announcement_section: "appEditor.outline.home",
270447
+ podcasts_widget_section: "appEditor.outline.recording",
270448
+ forms_full_form_by_short_id: "appEditor.outline.forum",
270449
+ selections: "appEditor.outline.image",
270450
+ faq_list_section: "appEditor.outline.info",
270451
+ // Not in the One App's table (it would pick a random icon): a page of one group's feed is a groups page.
270452
+ single_group_feed_section: "appEditor.outline.group"
270453
+ };
270454
+ HOME_TAB_ICON = "appEditor.outline.home";
270400
270455
  TEMPLATE_FALLBACKS = { himi_groups_feed: "himi_groups" };
270401
270456
  MODULES = {
270402
270457
  programs: { file: "programs-section", register: "registerProgramsSection", capabilities: ["wix_api", "iap", "app_info"] },
@@ -271794,12 +271849,15 @@ function pagesWithoutScreen(plan, planned2) {
271794
271849
  for (const page of planned2) if (!have.get(page.layoutItemId)?.screenId && !omitted(page.layoutItemId)) missing4.set(page.layoutItemId, page.label);
271795
271850
  return [...missing4].map(([layoutItemId, page]) => ({ page, layoutItemId }));
271796
271851
  }
271797
- function tabIcon(source2) {
271852
+ function catalogIcon(source2) {
271798
271853
  const last = (source2 ?? "").split(".").pop() ?? "";
271799
271854
  const normalized2 = last.toLowerCase().replace(/[_.\s-]/g, "");
271800
271855
  const indexed2 = ICON_NORMALIZED_INDEX[normalized2];
271801
- const found = (indexed2 !== ICON_FALLBACK ? indexed2 : void 0) ?? SOURCE_ICON_ALIASES[normalized2];
271802
- const icon = found ?? FALLBACK_ICON;
271856
+ return (indexed2 !== ICON_FALLBACK ? indexed2 : void 0) ?? SOURCE_ICON_ALIASES[normalized2];
271857
+ }
271858
+ function tabIcon(source2, pageIcon) {
271859
+ const found = catalogIcon(source2);
271860
+ const icon = found ?? catalogIcon(pageIcon) ?? FALLBACK_ICON;
271803
271861
  const filled2 = `${icon}_fill`;
271804
271862
  return { icon, ...ICON_NAMES.includes(filled2) ? { selectedIcon: filled2 } : {}, resolved: !!found };
271805
271863
  }
@@ -271828,7 +271886,7 @@ function applyNavigationToConfig(source2, plan, fileName = "config.ts") {
271828
271886
  const tabs = plan.tabs.map((tab) => ({ tab, id: tabIdFor(tab, taken2) }));
271829
271887
  const moreId = tabs.find(({ tab }) => tab.layoutItemId === "(more)")?.id;
271830
271888
  const written = tabs.map(({ tab, id }) => {
271831
- const icon = tabIcon(tab.icon);
271889
+ const icon = tabIcon(tab.icon, tab.pageIcon);
271832
271890
  return { id, screenId: tab.screenId, label: tab.label.trim(), icon: icon.icon, ...icon.selectedIcon ? { selectedIcon: icon.selectedIcon } : {} };
271833
271891
  });
271834
271892
  const splices = [{ at: items.getStart(file2), end: items.end, text: indentedJson(written, file2, items) }];
@@ -271963,7 +272021,7 @@ async function runOneAppApplyNavigation(args, io2) {
271963
272021
  const edit = applyNavigationToConfig(readFileSync178(configPath, "utf8"), plan);
271964
272022
  if (edit.status === "kept") return report6(io2, false, { code: "config_unwritable", error: edit.reason, tabs: plan.tabs });
271965
272023
  if (edit.status === "set" && !options2.dryRun) writeFileAtomic(configPath, edit.source);
271966
- const icons = plan.tabs.filter((tab) => tab.layoutItemId !== "(more)").map((tab) => ({ tab: tab.label, source: tab.icon ?? null, ...tabIcon(tab.icon) }));
272024
+ const icons = plan.tabs.filter((tab) => tab.layoutItemId !== "(more)").map((tab) => ({ tab: tab.label, source: tab.icon ?? null, ...tabIcon(tab.icon, tab.pageIcon) }));
271967
272025
  const homeGap = screens.has(TEMPLATE_HOME_SCREEN) && plan.tabs[0] && plan.tabs[0].screenId !== TEMPLATE_HOME_SCREEN ? [`the first tab opens ${plan.tabs[0].screenId}, not ${TEMPLATE_HOME_SCREEN}: the Android app, the drawer's Home row and "Not available \u2192 Home" still open the template's Home (sample content)`] : [];
271968
272026
  return report6(io2, true, {
271969
272027
  navigation: edit.status,
@@ -272010,7 +272068,20 @@ var init_apply_navigation = __esm({
272010
272068
  stores: "bag",
272011
272069
  products: "bag",
272012
272070
  gallery: "photo",
272013
- gifts: "gift"
272071
+ gifts: "gift",
272072
+ // The rest of the One App's own tab icons (catalyst-server DefaultIcons.scala) and the glyphs it picks at random for a tab with
272073
+ // nothing to decide it: the nearest of ours, since a source app stores whichever it drew.
272074
+ subscriptions: "ticket",
272075
+ loyalty: "gift",
272076
+ video: "play_circle",
272077
+ recording: "mic",
272078
+ reservations: "clock",
272079
+ brochure: "doc",
272080
+ lightning: "star",
272081
+ lightbulb: "info",
272082
+ rocket: "paper_plane",
272083
+ contentcard: "doc",
272084
+ megaphone: "bell"
272014
272085
  };
272015
272086
  FALLBACK_ICON = "list";
272016
272087
  objectOf = (node3) => {
@@ -288249,6 +288320,17 @@ function distJobOutcome(record5, readAfterBuildEnded = true) {
288249
288320
  function distStatusExitCode(readOk, record5) {
288250
288321
  return readOk && distJobOutcome(record5, false) !== "failed" ? 0 : 1;
288251
288322
  }
288323
+ function distInstallPageUrl(origin, jobs) {
288324
+ const job = jobs.find((j2) => j2.status === "SUCCESS" && typeof j2.jobId === "string" && j2.jobId);
288325
+ if (!job) return void 0;
288326
+ try {
288327
+ const host = new URL(origin).hostname.toLowerCase().replace(/^\[|\]$/g, "");
288328
+ if (["localhost", "127.0.0.1", "::1", "bo.wix.com", "wix-bo.com"].includes(host)) return void 0;
288329
+ } catch {
288330
+ return void 0;
288331
+ }
288332
+ return `${origin.replace(/\/+$/, "")}/v1/dist/${encodeURIComponent(String(job.jobId))}/page`;
288333
+ }
288252
288334
  async function distCommand(ctx) {
288253
288335
  const { io: io2, pos, flags, print, targetName: targetName2, client: client4, serveBase } = ctx;
288254
288336
  const sub = pos[1];
@@ -288353,6 +288435,10 @@ ${label4}`);
288353
288435
  for (const job of jobsToPrint) {
288354
288436
  if (job.status === "SUCCESS") await printDistQrForJob(job, app2);
288355
288437
  }
288438
+ const pageUrl = distInstallPageUrl(serveBase(), jobsToPrint);
288439
+ if (pageUrl) io2.log(`
288440
+ Install page (iOS + Android, share this one)
288441
+ ${pageUrl}`);
288356
288442
  };
288357
288443
  const distTarget = targetName2();
288358
288444
  const distUnreachable = (e2) => {
@@ -1550,8 +1550,32 @@ written: a bar that silently lacks a source page is not the source's navigation.
1550
1550
  `unmapped` and run it again. No placeholder screen is added for them.
1551
1551
 
1552
1552
  A tab for a screen the app does not define is refused with `screen_missing` and nothing is written: write the generated
1553
- screens first, and keep any template screen a tab opens when you trim. A source icon with no catalog match is reported
1554
- under `gaps` and gets a neutral icon; choose a better one in `config.ts`. The drawer is not touched.
1553
+ screens first, and keep any template screen a tab opens when you trim. The One App's own tab icon names
1554
+ resolve to the catalog (`subscriptions` is a ticket, `loyalty` a gift, `video` a play button, `recording` a microphone, `dates` a
1555
+ calendar ...). A tab whose source icon is missing or has no catalog match gets the One App's default for its page: the first tab is
1556
+ home, otherwise the first section on the page that has an entry below decides, and a page with none gets the neutral `list` icon.
1557
+ Each tab that did not keep its source icon is reported under `gaps` (`no catalog icon for <source>, using <icon>`); change one in
1558
+ `config.ts` when the source meant another.
1559
+
1560
+ | Icon | First section that decides |
1561
+ | --- | --- |
1562
+ | `calendar` | events (carousel, list, schedule, discussion, guests); bookings agenda, services list and upcoming bookings; the general upcoming section |
1563
+ | `ticket` | paid plans, plan cards, memberships and packages |
1564
+ | `people` | groups (list, cards, feed, a single group's feed), members (list, horizontal list, general) |
1565
+ | `chat` | blog (every list, carousel, category and search section), forms, forum |
1566
+ | `bag` | stores products grid and carousel |
1567
+ | `image` | photo albums, Pro Gallery lists and carousels, selections |
1568
+ | `book` | programs (list, carousel, participant carousel) |
1569
+ | `doc` | restaurant online ordering |
1570
+ | `clock` | restaurant reservations and the reservations section |
1571
+ | `gift` | loyalty status and offering |
1572
+ | `play_circle` | Wix Video lists and carousels |
1573
+ | `mic` | podcasts |
1574
+ | `info` | FAQ |
1575
+ | `home` | the announcement section (and every first tab) |
1576
+ | `star` | the performance tracker |
1577
+
1578
+ The drawer is not touched.
1555
1579
 
1556
1580
  Check `homeScreenId` and any `himi.open` target that still names a template screen (`"home"`, `"profile"`):
1557
1581
  it must be a screen your `SCREENS` map defines, and the first tab's screen is the one the app should open on. With the
@@ -363,6 +363,16 @@ immediately plus a Buildkite URL for the live log. Waiting is the right shape fo
363
363
  `--no-wait` is what makes fan-out cheap — the pool parallelises, so 31 templates dispatched together finished in about
364
364
  the same wall-clock as one (measured: ~11 min for 31, median 4.1 min each).
365
365
 
366
+ **One install page per run.** After the per-platform QR codes, an interactive `himi dist` also
367
+ prints a shareable **install page**, `<serve origin>/v1/dist/<jobId>/page`. Any job id from the run
368
+ opens it, and it shows the run's iOS and Android builds side by side: a one-tap install button, a QR
369
+ code, release, build time, size and link expiry for each, and a plain explanation instead of a button
370
+ when a platform is still building, failed, expired, is an App Store or Play-bundle build, or was not
371
+ part of the run. On a phone the reader's own platform comes first. The route is public, like the
372
+ `/v1/dist/<jobId>/install` redirect the terminal QR codes encode (the job id is the bearer link), and
373
+ it links only to the presigned URLs the JSON routes already return. It is not printed with `--json`,
374
+ or when the serve origin is local or BO, which a phone cannot reach.
375
+
366
376
  **Typical durations**, dispatch → installable artifact, measured 2026-08-22 on a warm pool:
367
377
  iOS **~4 min** (median 4.1 over 31 builds), Android **~3.6 min**. A cold checkout adds a few
368
378
  minutes. If an iOS leg dies in well under 4 minutes it never reached the archive — see the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1773.0",
3
+ "version": "0.1774.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": "867ce5320d279afbf966bd34b84f4f4fd7eb94a71bf3acf71d8720fe"
85
+ "falconPackageHash": "5af2413e0e3de9fc421f9f546de0c7a55aa511713c79b318727b94a8"
86
86
  }