@wix/himalaya-cli 0.2011.0 → 0.2013.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +77 -31
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -9495,6 +9495,7 @@ __export(splash_exports, {
9495
9495
  DEFAULT_BACKGROUND_TOKEN: () => DEFAULT_BACKGROUND_TOKEN,
9496
9496
  IOS_COLORSET_NAME: () => IOS_COLORSET_NAME,
9497
9497
  IOS_LAUNCH_ICON_NAME: () => IOS_LAUNCH_ICON_NAME,
9498
+ IOS_SPLASH_COLORSET_ONLY: () => IOS_SPLASH_COLORSET_ONLY,
9498
9499
  LABEL_IOS_SPLASH: () => LABEL_IOS_SPLASH,
9499
9500
  LOGO_WIDTH_DEFAULT: () => LOGO_WIDTH_DEFAULT,
9500
9501
  ROUNDED_SQUARE_CORNER_FRACTION: () => ROUNDED_SQUARE_CORNER_FRACTION,
@@ -9814,9 +9815,10 @@ function assertNoStoryboard(app2, projectYml) {
9814
9815
  function androidOptedIn(manifestPath) {
9815
9816
  return existsSync4(manifestPath) && readFileSync4(manifestPath, "utf8").includes(`@style/${ANDROID_STYLE_NAME}`);
9816
9817
  }
9817
- function splashPlan(app2, configTs, manifestPath, hasIosMarkers) {
9818
+ function splashPlan(app2, configTs, manifestPath, hasIosMarkers, iosColorsetOnly = false) {
9818
9819
  const androidIn = androidOptedIn(manifestPath);
9819
- if (!hasIosMarkers && !androidIn) return { artifacts: [] };
9820
+ const iosColorset = hasIosMarkers || iosColorsetOnly;
9821
+ if (!iosColorset && !androidIn) return { artifacts: [] };
9820
9822
  if (hasIosMarkers) {
9821
9823
  const ymlPath = iosProjectYml(app2);
9822
9824
  if (existsSync4(ymlPath)) assertNoStoryboard(app2, readFileSync4(ymlPath, "utf8"));
@@ -9825,13 +9827,13 @@ function splashPlan(app2, configTs, manifestPath, hasIosMarkers) {
9825
9827
  return {
9826
9828
  colors,
9827
9829
  artifacts: [
9828
- ...hasIosMarkers ? iosSplashArtifacts(app2, colors) : [],
9830
+ ...iosColorset ? iosSplashArtifacts(app2, colors) : [],
9829
9831
  ...androidIn ? androidSplashArtifacts(app2, colors, manifestPath) : [],
9830
9832
  ...macosSplashArtifacts()
9831
9833
  ]
9832
9834
  };
9833
9835
  }
9834
- var LABEL_IOS_SPLASH, IOS_COLORSET_NAME, ANDROID_COLOR_RES, ANDROID_STYLE_NAME, ANDROID_SPLASH_FILE, ANDROID_SPLASH_PARENT, DEFAULT_BACKGROUND_TOKEN, IOS_LAUNCH_ICON_NAME, ANDROID_LAUNCH_ICON_ART, LOGO_WIDTH_DEFAULT, ANDROID_SPLASH_ICON_CANVAS_DP, ANDROID_SPLASH_ICON_MASK_DP, ROUNDED_SQUARE_CORNER_FRACTION, ANDROID_SPLASH_ROUNDED_SQUARE_MAX_DP, GENERATED_XML_NOTE;
9836
+ var LABEL_IOS_SPLASH, IOS_SPLASH_COLORSET_ONLY, IOS_COLORSET_NAME, ANDROID_COLOR_RES, ANDROID_STYLE_NAME, ANDROID_SPLASH_FILE, ANDROID_SPLASH_PARENT, DEFAULT_BACKGROUND_TOKEN, IOS_LAUNCH_ICON_NAME, ANDROID_LAUNCH_ICON_ART, LOGO_WIDTH_DEFAULT, ANDROID_SPLASH_ICON_CANVAS_DP, ANDROID_SPLASH_ICON_MASK_DP, ROUNDED_SQUARE_CORNER_FRACTION, ANDROID_SPLASH_ROUNDED_SQUARE_MAX_DP, GENERATED_XML_NOTE;
9835
9837
  var init_splash = __esm({
9836
9838
  "../native-config/splash.ts"() {
9837
9839
  init_define_HHP_CATALOG();
@@ -9839,6 +9841,7 @@ var init_splash = __esm({
9839
9841
  init_config_ast();
9840
9842
  init_schema3();
9841
9843
  LABEL_IOS_SPLASH = "himalaya:splash:info";
9844
+ IOS_SPLASH_COLORSET_ONLY = "himalaya:splash:colorset-only";
9842
9845
  IOS_COLORSET_NAME = "HimalayaLaunchBackground";
9843
9846
  ANDROID_COLOR_RES = "himalaya_splash_background";
9844
9847
  ANDROID_STYLE_NAME = "Theme.Himalaya.Splash";
@@ -45465,7 +45468,6 @@ function resolveIdiom(tokens2, ctx = {}) {
45465
45468
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
45466
45469
  var init_idiom = __esm({
45467
45470
  "../../core/ts/src/idiom.ts"() {
45468
- "use strict";
45469
45471
  init_define_HHP_CATALOG();
45470
45472
  IDIOM_CONTEXTS = {
45471
45473
  ios: { native: ["ios"] },
@@ -47235,6 +47237,7 @@ function shouldRevealError(args) {
47235
47237
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
47236
47238
  var init_validation = __esm({
47237
47239
  "../../core/ts/src/validation.ts"() {
47240
+ "use strict";
47238
47241
  init_define_HHP_CATALOG();
47239
47242
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
47240
47243
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -183606,7 +183609,7 @@ function isTemplatePlaceholder(text32) {
183606
183609
  }
183607
183610
  function cleanText(raw, cap2) {
183608
183611
  const s5 = String(raw ?? "").replace(/[\u0000-\u001F\u007F]/g, " ").replace(/\s+/g, " ").trim();
183609
- return s5.length > cap2 ? `${s5.slice(0, cap2 - 1).trimEnd()}\u2026` : s5;
183612
+ return s5.length > cap2 ? `${s5.slice(0, cap2 - 1).replace(/[\uD800-\uDBFF]$/, "").trimEnd()}\u2026` : s5;
183610
183613
  }
183611
183614
  function stripPii(text32) {
183612
183615
  return text32.replace(EMAIL_RE2, "").replace(PHONE_SHAPE_RE, (m2) => {
@@ -200561,7 +200564,8 @@ function genNativeConfig(app2, opts = {}) {
200561
200564
  }
200562
200565
  const iosSplashManaged = existsSync82(iosYml) && hasMarkers(readFileSync91(iosYml, "utf8"), "yaml", LABEL_IOS_SPLASH);
200563
200566
  const manifest2 = androidManifestPath2(app2);
200564
- const splash = splashPlan(app2, configTs, manifest2, iosSplashManaged);
200567
+ const iosColorsetOnly = existsSync82(iosYml) && readFileSync91(iosYml, "utf8").includes(IOS_SPLASH_COLORSET_ONLY);
200568
+ const splash = splashPlan(app2, configTs, manifest2, iosSplashManaged, iosColorsetOnly);
200565
200569
  for (const artifact of splash.artifacts) files.push(applyWholeFile(artifact.path, artifact.content, check));
200566
200570
  for (const artifact of iconPlan(app2, configTs)) files.push(applyWholeFile(artifact.path, artifact.content, check));
200567
200571
  files.push(
@@ -212909,13 +212913,21 @@ function sourceRatio(value2) {
212909
212913
  return typeof value2 === "number" && Number.isFinite(value2) && value2 > 0 ? value2 : void 0;
212910
212914
  }
212911
212915
  function unsizedImageUrls(raw) {
212912
- const found = /* @__PURE__ */ new Set();
212916
+ const images = /* @__PURE__ */ new Set(), banners = /* @__PURE__ */ new Set();
212917
+ const add = (into, url) => {
212918
+ if (typeof url === "string" && /^https:\/\//i.test(url)) into.add(url);
212919
+ };
212913
212920
  for (const section3 of Object.values(record3(record3(raw).sections))) {
212914
- if (record3(section3).sectionDefinitionId !== "platform_elements_image_section") continue;
212915
- const data = record3(record3(record3(section3).settings).data);
212916
- if (typeof data.url === "string" && /^https:\/\//i.test(data.url) && sourceRatio(data.aspectRatio) === void 0) found.add(data.url);
212921
+ const type2 = record3(section3).sectionDefinitionId;
212922
+ const settings = record3(record3(section3).settings);
212923
+ if (type2 === "platform_elements_image_section") {
212924
+ const data = record3(settings.data);
212925
+ if (sourceRatio(data.aspectRatio) === void 0) add(images, data.url);
212926
+ } else if (type2 === "platform_elements_interactive_banner_section") {
212927
+ if (sourceRatio(settings.aspectRatio) === void 0 && sourceRatio(settings.originalAspectRatio) === void 0) add(banners, settings.imageUri);
212928
+ }
212917
212929
  }
212918
- return [...found];
212930
+ return [.../* @__PURE__ */ new Set([...images, ...banners])];
212919
212931
  }
212920
212932
  async function imageAspectRatios(urls2, fetchAsset, limits = PROBE_LIMITS) {
212921
212933
  return probeEach(urls2, limits, async (url, signal) => {
@@ -213100,14 +213112,16 @@ function bannerTextStyle(item2) {
213100
213112
  return item2.type === "title" ? "title3" : "body";
213101
213113
  }
213102
213114
  function bannerTextColor(color) {
213103
- const match = /^#?([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(str16(color).trim());
213104
- if (!match || /^[0-9a-f]{6}00$/i.test(match[1])) return "";
213105
- const hex2 = match[1].length === 3 ? match[1].split("").map((c2) => c2 + c2).join("") : match[1].slice(0, 6);
213106
- return `#${hex2.toLowerCase()}`;
213115
+ const match = BANNER_HEX.exec(str16(color).trim());
213116
+ if (!match) return "";
213117
+ const digits2 = match[1] ?? match[2];
213118
+ const full = digits2.length <= 4 ? digits2.split("").map((c2) => c2 + c2).join("") : digits2;
213119
+ if (/^[0-9a-f]{6}00$/i.test(full)) return "";
213120
+ return `#${full.slice(0, 6).toLowerCase()}`;
213107
213121
  }
213108
213122
  function bannerText(id, value2, style, align, color) {
213109
213123
  const words = text10(id, value2, style, { textAlign: align, color: "textOnAccent" }, { fillMaxWidth: true });
213110
- return color ? vstack(`${id}.scope`, [words], 0, { fillMaxWidth: true, theme: { colors: { textOnAccent: color } } }, align) : words;
213124
+ return vstack(`${id}.scope`, [words], 0, { fillMaxWidth: true, theme: { colors: { textOnAccent: color || BANNER_TEXT_DEFAULT } } }, align);
213111
213125
  }
213112
213126
  function weekFirstDayOf(locale) {
213113
213127
  return locale ? String(firstWeekdayOf(locale)) : void 0;
@@ -214151,7 +214165,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
214151
214165
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
214152
214166
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
214153
214167
  }
214154
- var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, PLAN_SELECT_LABEL, PLAN_DETAILS_LABEL, PLAN_BENEFITS_LABEL, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
214168
+ var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, PLAN_SELECT_LABEL, PLAN_DETAILS_LABEL, PLAN_BENEFITS_LABEL, BANNER_HEX, BANNER_TEXT_DEFAULT, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
214155
214169
  var init_generate = __esm({
214156
214170
  "src/one-app/generate.ts"() {
214157
214171
  init_define_HHP_CATALOG();
@@ -214439,6 +214453,8 @@ var init_generate = __esm({
214439
214453
  PLAN_SELECT_LABEL = "Select";
214440
214454
  PLAN_DETAILS_LABEL = "See Details";
214441
214455
  PLAN_BENEFITS_LABEL = "Show Benefits";
214456
+ BANNER_HEX = /^(?:#([0-9a-f]{3,4})|#?([0-9a-f]{6}|[0-9a-f]{8}))$/i;
214457
+ BANNER_TEXT_DEFAULT = "#ffffff";
214442
214458
  MEMBERS_RAIL = 10;
214443
214459
  PROGRAMS_DEFAULT_LIMIT = 2;
214444
214460
  PROGRAMS_INLINE_MAX = 20;
@@ -214637,36 +214653,50 @@ var init_generate = __esm({
214637
214653
  },
214638
214654
  // The source lays its texts and its button straight on the picture, where it places them (`verticalAlign`, `horizontalAlign`), in
214639
214655
  // the colors and type sizes it authored, over the picture in its own crop (`aspectRatio`, `cornerRadius`). They sit there here too,
214640
- // with no panel behind them: the source draws none. With no picture the texts and the button simply stack.
214656
+ // with no panel behind them: the source draws none. With no picture the texts and the button simply stack. A layout other than
214657
+ // "stacked" (split, diagonal) does not put the texts on the picture: they follow it below, in the theme's colors, and that is reported.
214641
214658
  platform_elements_interactive_banner_section: (id, _s2, st2, _i2, ctx, elementId) => {
214659
+ const type2 = "platform_elements_interactive_banner_section";
214642
214660
  const url = str16(st2.imageUri);
214643
- const tap = controlTap(ctx, obj20(st2.action), elementId, "platform_elements_interactive_banner_section", "the banner");
214644
- const align = st2.horizontalAlign === "center" ? "center" : st2.horizontalAlign === "right" ? "trailing" : "leading";
214661
+ const tap = controlTap(ctx, obj20(st2.action), elementId, type2, "the banner");
214662
+ const horizontal = str16(st2.horizontalAlign).trim().toLowerCase(), verticalAlign = str16(st2.verticalAlign).trim().toLowerCase();
214663
+ const align = horizontal === "center" ? "center" : horizontal === "right" ? "trailing" : "leading";
214664
+ let ratio = url ? sourceRatio(st2.aspectRatio) ?? sourceRatio(st2.originalAspectRatio) ?? sourceRatio(ctx.imageRatio(url)) : void 0;
214665
+ if (url && ratio === void 0) {
214666
+ ratio = UNREAD_IMAGE_RATIO;
214667
+ ctx.gap(elementId, type2, "the banner picture's proportions are unknown (no authored ratio, its file header was not read); it is shown in a 4:3 box");
214668
+ }
214645
214669
  const picture = url ? node3(`${id}.img`, "Image", {
214646
214670
  url: ctx.imageUrl(url),
214647
214671
  fillWidth: true,
214648
- ...typeof st2.aspectRatio === "number" ? { aspectRatio: st2.aspectRatio } : {},
214672
+ aspectRatio: ratio,
214649
214673
  contentMode: "fill",
214650
214674
  contentDescription: ctx.page.label
214651
214675
  }, typeof st2.cornerRadius === "number" ? { cornerRadius: st2.cornerRadius } : void 0) : null;
214676
+ const layout2 = str16(st2.layoutType).trim();
214677
+ const onPicture = !!picture && (!layout2 || layout2.toLowerCase() === "stacked");
214678
+ if (picture && !onPicture) ctx.gap(elementId, type2, `the source lays the banner out as "${layout2}"; the texts and the button follow the picture below it`);
214652
214679
  const texts = [];
214653
214680
  const buttons = [];
214654
214681
  arr4(st2.items).map(obj20).forEach((item2, i2) => {
214655
214682
  if (item2.isHidden === true || !str16(item2.text).trim()) return;
214656
214683
  if (item2.type === "button") {
214657
214684
  if (tap) buttons.push(node3(`${id}.b${i2}`, "Button", { title: str16(item2.text).trim(), style: "primary", size: "md", fullWidth: false, action: tap }));
214658
- else ctx.gap(elementId, "platform_elements_interactive_banner_section", `the banner button "${str16(item2.text).trim()}" is left out: it has no action the app can run`);
214659
- } else if (picture) texts.push(bannerText(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), align, bannerTextColor(item2.color)));
214660
- else texts.push(text10(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), { textAlign: align }, { fillMaxWidth: true }));
214685
+ else ctx.gap(elementId, type2, `the banner button "${str16(item2.text).trim()}" is left out: it has no action the app can run`);
214686
+ } else if (onPicture) {
214687
+ const color = bannerTextColor(item2.color), authored2 = str16(item2.color).trim();
214688
+ if (authored2 && !BANNER_HEX.test(authored2)) ctx.gap(elementId, type2, `the banner text "${str16(item2.text).trim()}" has a color the app cannot read (${JSON.stringify(authored2)}); it is drawn white on the picture`);
214689
+ texts.push(bannerText(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), align, color));
214690
+ } else texts.push(text10(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), { textAlign: align }, { fillMaxWidth: true }));
214661
214691
  });
214662
214692
  const tapped = tap ? { onTap: tap } : {};
214663
- if (!picture) {
214664
- const parts = [...texts, ...buttons];
214665
- return parts.length ? vstack(`${id}.box`, parts, 8, { ...inset(8, 8), ...tapped }, align === "center" ? "center" : "leading") : null;
214693
+ if (!onPicture) {
214694
+ const parts = [...picture ? [picture] : [], ...texts, ...buttons];
214695
+ return parts.length ? vstack(`${id}.box`, parts, 8, { ...inset(8, 8), ...tapped }, align) : null;
214666
214696
  }
214667
214697
  const words = texts.length ? [vstack(`${id}.texts`, texts, 4, { fillMaxWidth: true }, align)] : [];
214668
214698
  const over = vstack(`${id}.over`, [...words, ...buttons], 12, { fillMaxWidth: true, padding: { leading: 16, trailing: 16, top: 16, bottom: 16 } }, align);
214669
- const vertical = st2.verticalAlign === "top" || st2.verticalAlign === "bottom" ? { verticalAlignment: st2.verticalAlign } : {};
214699
+ const vertical = verticalAlign === "top" || verticalAlign === "bottom" ? { verticalAlignment: verticalAlign } : {};
214670
214700
  return vstack(`${id}.box`, [node3(`${id}.stack`, "ZStack", { alignment: align, ...vertical, children: [picture, over] }, { fillMaxWidth: true })], 0, { ...inset(8, 8), ...tapped });
214671
214701
  },
214672
214702
  // A web page inside the screen. The source sizes it to its content; a fixed height is the nearest fixed equivalent.
@@ -308536,6 +308566,11 @@ var init_site_properties = __esm({
308536
308566
  });
308537
308567
 
308538
308568
  // src/site-analyze/derive.ts
308569
+ function aboutFromCrawl(about, crawlComplete) {
308570
+ const text32 = bounded(oneLine2(about), ABOUT_MAX_LENGTH);
308571
+ if (!text32 && !crawlComplete) return void 0;
308572
+ return text32;
308573
+ }
308539
308574
  function deriveAppName(ctx, override) {
308540
308575
  return clean3(override) || clean3(ctx.identity.businessName) || clean3(ctx.identity.siteDisplayName) || "My Business";
308541
308576
  }
@@ -308641,6 +308676,10 @@ function deriveTailoring(ctx, overrides = {}, revision = "site-derived") {
308641
308676
  appName: appName2,
308642
308677
  businessName: clean3(ctx.identity.businessName) || appName2,
308643
308678
  tagline: clean3(overrides.tagline) || clean3(ctx.identity.description),
308679
+ // Present even when empty: an absent key would inherit the shell's About text. `analyzeSite`
308680
+ // fills it from the crawl's About section (`aboutFromCrawl`), or drops the key when the crawl
308681
+ // could not tell. The description already shows as the tagline.
308682
+ about: "",
308644
308683
  // "" means UNKNOWN here, with `missing` above as the signal — the published overlay's
308645
308684
  // documented shape. Keeping an unknown url out of a MERGE is `apply.ts`'s job, at the
308646
308685
  // seam where an empty string would otherwise beat the shell's committed value.
@@ -308653,7 +308692,7 @@ function deriveTailoring(ctx, overrides = {}, revision = "site-derived") {
308653
308692
  }
308654
308693
  function bounded(s5, max) {
308655
308694
  if (s5.length <= max) return s5;
308656
- const cut2 = s5.slice(0, max - 1);
308695
+ const cut2 = s5.slice(0, max - 1).replace(/[\uD800-\uDBFF]$/, "");
308657
308696
  const space = cut2.lastIndexOf(" ");
308658
308697
  return `${(space > max * 0.6 ? cut2.slice(0, space) : cut2).trimEnd()}\u2026`;
308659
308698
  }
@@ -308702,12 +308741,13 @@ function deriveStaticGalleries(pages2) {
308702
308741
  }
308703
308742
  return galleries;
308704
308743
  }
308705
- var clean3, ID_MAX, NAME_MAX, TYPE_MAX, CONTROL_CHARS2, HAS_CONTROL_CHAR, plain4, shown2, STATIC_FAQ_LIMITS, oneLine2, STATIC_GALLERY_LIMITS;
308744
+ var clean3, ABOUT_MAX_LENGTH, ID_MAX, NAME_MAX, TYPE_MAX, CONTROL_CHARS2, HAS_CONTROL_CHAR, plain4, shown2, STATIC_FAQ_LIMITS, oneLine2, STATIC_GALLERY_LIMITS;
308706
308745
  var init_derive = __esm({
308707
308746
  "src/site-analyze/derive.ts"() {
308708
308747
  init_define_HHP_CATALOG();
308709
308748
  init_types2();
308710
308749
  clean3 = (s5) => (s5 ?? "").trim();
308750
+ ABOUT_MAX_LENGTH = 1e3;
308711
308751
  ID_MAX = 256;
308712
308752
  NAME_MAX = 120;
308713
308753
  TYPE_MAX = 80;
@@ -309739,6 +309779,9 @@ async function analyzeSite(input, ports) {
309739
309779
  if (Object.keys(book.copy.suggestedCopyKeys).length) {
309740
309780
  plan.provisioning.copy = { ...book.copy.suggestedCopyKeys };
309741
309781
  }
309782
+ const about = aboutFromCrawl(book.copy.about, book.look.complete === true);
309783
+ if (about === void 0) delete plan.provisioning.identity.about;
309784
+ else plan.provisioning.identity.about = about;
309742
309785
  plan.provisioning.cmsCollections = adoptedCms.collections;
309743
309786
  const screenshots = [];
309744
309787
  const warnings = identity.source === "crawl" ? [guessedNameWarning(plan.provisioning.identity.appName, crawledTitle, ownerLookupError)] : [];
@@ -310315,8 +310358,10 @@ function mergeCustomerOwned(committed, overlay, opts = {}) {
310315
310358
  function carryFromLastApply(previous, overlay) {
310316
310359
  if (!plainObject(previous) || !sameKnownSite(previous, overlay)) return overlay;
310317
310360
  const photoFunction = plainObject(previous.wix) ? previous.wix.memberPhotoUploadFunction : void 0;
310361
+ const about = plainObject(previous.identity) ? previous.identity.about : void 0;
310318
310362
  return {
310319
310363
  ...overlay,
310364
+ ...plainObject(overlay.identity) && overlay.identity.about === void 0 && typeof about === "string" ? { identity: { ...overlay.identity, about } } : {},
310320
310365
  ...overlay.businessContact === void 0 ? { businessContact: previous.businessContact } : {},
310321
310366
  ...overlay.loyalty === void 0 ? { loyalty: previous.loyalty } : {},
310322
310367
  ...overlay.businessTimeZone === void 0 ? { businessTimeZone: previous.businessTimeZone } : {},
@@ -310606,6 +310651,7 @@ async function applyOverlays(input) {
310606
310651
  else if (!sameKnownSite(cur, overlay)) delete merged.loyalty;
310607
310652
  if (overlay.businessTimeZone !== void 0) merged.businessTimeZone = overlay.businessTimeZone;
310608
310653
  else if (!sameKnownSite(cur, overlay)) delete merged.businessTimeZone;
310654
+ if (overlay.identity?.about === void 0 && plainObject(merged.identity) && !sameKnownSite(cur, overlay)) delete merged.identity.about;
310609
310655
  packageFaq = merged.faq;
310610
310656
  packageGalleries = merged.galleries;
310611
310657
  if (recordSite) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.2011.0",
3
+ "version": "0.2013.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": "3170709b25bc3d4b6c9542b2065dfe4f7d3929504624f701497af812"
85
+ "falconPackageHash": "58299a258b361c5785db3e984704e0864010a6fc9e7f9a2f76bbaefc"
86
86
  }