@wix/himalaya-cli 0.2048.0 → 0.2050.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 +301 -200
- package/guides/one-app-to-himi-app.md +6 -1
- package/package.json +2 -2
- package/templates/beauty-salon/l10n/ar.json +6 -0
- package/templates/beauty-salon/l10n/cs.json +6 -0
- package/templates/beauty-salon/l10n/da.json +6 -0
- package/templates/beauty-salon/l10n/de.json +6 -0
- package/templates/beauty-salon/l10n/el.json +6 -0
- package/templates/beauty-salon/l10n/en.json +6 -0
- package/templates/beauty-salon/l10n/es.json +6 -0
- package/templates/beauty-salon/l10n/fi.json +6 -0
- package/templates/beauty-salon/l10n/fr.json +6 -0
- package/templates/beauty-salon/l10n/he.json +5 -0
- package/templates/beauty-salon/l10n/hu.json +6 -0
- package/templates/beauty-salon/l10n/id.json +6 -0
- package/templates/beauty-salon/l10n/it.json +6 -0
- package/templates/beauty-salon/l10n/ja.json +6 -0
- package/templates/beauty-salon/l10n/ko.json +6 -0
- package/templates/beauty-salon/l10n/lt.json +6 -0
- package/templates/beauty-salon/l10n/nl.json +6 -0
- package/templates/beauty-salon/l10n/no.json +6 -0
- package/templates/beauty-salon/l10n/pl.json +6 -0
- package/templates/beauty-salon/l10n/pt.json +6 -0
- package/templates/beauty-salon/l10n/ru.json +6 -0
- package/templates/beauty-salon/l10n/sv.json +6 -0
- package/templates/beauty-salon/l10n/th.json +6 -0
- package/templates/beauty-salon/l10n/tr.json +6 -0
- package/templates/beauty-salon/l10n/uk.json +6 -0
- package/templates/beauty-salon/l10n/vi.json +6 -0
- package/templates/beauty-salon/l10n/zh.json +6 -0
- package/templates/beauty-salon/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/branded-lite/recipes/announcement-card.json +85 -34
- package/templates/branded-lite/tier5-src/_shared/announcement-section.ts +52 -10
- package/templates/branded-lite/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/community-club/l10n/ar.json +6 -0
- package/templates/community-club/l10n/cs.json +6 -0
- package/templates/community-club/l10n/da.json +6 -0
- package/templates/community-club/l10n/de.json +6 -0
- package/templates/community-club/l10n/el.json +6 -0
- package/templates/community-club/l10n/en.json +6 -0
- package/templates/community-club/l10n/es.json +6 -0
- package/templates/community-club/l10n/fi.json +6 -0
- package/templates/community-club/l10n/fr.json +6 -0
- package/templates/community-club/l10n/he.json +5 -0
- package/templates/community-club/l10n/hu.json +6 -0
- package/templates/community-club/l10n/id.json +6 -0
- package/templates/community-club/l10n/it.json +6 -0
- package/templates/community-club/l10n/ja.json +6 -0
- package/templates/community-club/l10n/ko.json +6 -0
- package/templates/community-club/l10n/lt.json +6 -0
- package/templates/community-club/l10n/nl.json +6 -0
- package/templates/community-club/l10n/no.json +6 -0
- package/templates/community-club/l10n/pl.json +6 -0
- package/templates/community-club/l10n/pt.json +6 -0
- package/templates/community-club/l10n/ru.json +6 -0
- package/templates/community-club/l10n/sv.json +6 -0
- package/templates/community-club/l10n/th.json +6 -0
- package/templates/community-club/l10n/tr.json +6 -0
- package/templates/community-club/l10n/uk.json +6 -0
- package/templates/community-club/l10n/vi.json +6 -0
- package/templates/community-club/l10n/zh.json +6 -0
- package/templates/community-club/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/events-meetups/l10n/ar.json +6 -0
- package/templates/events-meetups/l10n/cs.json +6 -0
- package/templates/events-meetups/l10n/da.json +6 -0
- package/templates/events-meetups/l10n/de.json +6 -0
- package/templates/events-meetups/l10n/el.json +6 -0
- package/templates/events-meetups/l10n/en.json +6 -0
- package/templates/events-meetups/l10n/es.json +6 -0
- package/templates/events-meetups/l10n/fi.json +6 -0
- package/templates/events-meetups/l10n/fr.json +6 -0
- package/templates/events-meetups/l10n/he.json +5 -0
- package/templates/events-meetups/l10n/hu.json +6 -0
- package/templates/events-meetups/l10n/id.json +6 -0
- package/templates/events-meetups/l10n/it.json +6 -0
- package/templates/events-meetups/l10n/ja.json +6 -0
- package/templates/events-meetups/l10n/ko.json +6 -0
- package/templates/events-meetups/l10n/lt.json +6 -0
- package/templates/events-meetups/l10n/nl.json +6 -0
- package/templates/events-meetups/l10n/no.json +6 -0
- package/templates/events-meetups/l10n/pl.json +6 -0
- package/templates/events-meetups/l10n/pt.json +6 -0
- package/templates/events-meetups/l10n/ru.json +6 -0
- package/templates/events-meetups/l10n/sv.json +6 -0
- package/templates/events-meetups/l10n/th.json +6 -0
- package/templates/events-meetups/l10n/tr.json +6 -0
- package/templates/events-meetups/l10n/uk.json +6 -0
- package/templates/events-meetups/l10n/vi.json +6 -0
- package/templates/events-meetups/l10n/zh.json +6 -0
- package/templates/events-meetups/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/gym-fitness/l10n/ar.json +6 -0
- package/templates/gym-fitness/l10n/cs.json +6 -0
- package/templates/gym-fitness/l10n/da.json +6 -0
- package/templates/gym-fitness/l10n/de.json +6 -0
- package/templates/gym-fitness/l10n/el.json +6 -0
- package/templates/gym-fitness/l10n/en.json +6 -0
- package/templates/gym-fitness/l10n/es.json +6 -0
- package/templates/gym-fitness/l10n/fi.json +6 -0
- package/templates/gym-fitness/l10n/fr.json +6 -0
- package/templates/gym-fitness/l10n/he.json +5 -0
- package/templates/gym-fitness/l10n/hu.json +6 -0
- package/templates/gym-fitness/l10n/id.json +6 -0
- package/templates/gym-fitness/l10n/it.json +6 -0
- package/templates/gym-fitness/l10n/ja.json +6 -0
- package/templates/gym-fitness/l10n/ko.json +6 -0
- package/templates/gym-fitness/l10n/lt.json +6 -0
- package/templates/gym-fitness/l10n/nl.json +6 -0
- package/templates/gym-fitness/l10n/no.json +6 -0
- package/templates/gym-fitness/l10n/pl.json +6 -0
- package/templates/gym-fitness/l10n/pt.json +6 -0
- package/templates/gym-fitness/l10n/ru.json +6 -0
- package/templates/gym-fitness/l10n/sv.json +6 -0
- package/templates/gym-fitness/l10n/th.json +6 -0
- package/templates/gym-fitness/l10n/tr.json +6 -0
- package/templates/gym-fitness/l10n/uk.json +6 -0
- package/templates/gym-fitness/l10n/vi.json +6 -0
- package/templates/gym-fitness/l10n/zh.json +6 -0
- package/templates/gym-fitness/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/nonprofit-cause/l10n/ar.json +6 -0
- package/templates/nonprofit-cause/l10n/cs.json +6 -0
- package/templates/nonprofit-cause/l10n/da.json +6 -0
- package/templates/nonprofit-cause/l10n/de.json +6 -0
- package/templates/nonprofit-cause/l10n/el.json +6 -0
- package/templates/nonprofit-cause/l10n/en.json +6 -0
- package/templates/nonprofit-cause/l10n/es.json +6 -0
- package/templates/nonprofit-cause/l10n/fi.json +6 -0
- package/templates/nonprofit-cause/l10n/fr.json +6 -0
- package/templates/nonprofit-cause/l10n/he.json +5 -0
- package/templates/nonprofit-cause/l10n/hu.json +6 -0
- package/templates/nonprofit-cause/l10n/id.json +6 -0
- package/templates/nonprofit-cause/l10n/it.json +6 -0
- package/templates/nonprofit-cause/l10n/ja.json +6 -0
- package/templates/nonprofit-cause/l10n/ko.json +6 -0
- package/templates/nonprofit-cause/l10n/lt.json +6 -0
- package/templates/nonprofit-cause/l10n/nl.json +6 -0
- package/templates/nonprofit-cause/l10n/no.json +6 -0
- package/templates/nonprofit-cause/l10n/pl.json +6 -0
- package/templates/nonprofit-cause/l10n/pt.json +6 -0
- package/templates/nonprofit-cause/l10n/ru.json +6 -0
- package/templates/nonprofit-cause/l10n/sv.json +6 -0
- package/templates/nonprofit-cause/l10n/th.json +6 -0
- package/templates/nonprofit-cause/l10n/tr.json +6 -0
- package/templates/nonprofit-cause/l10n/uk.json +6 -0
- package/templates/nonprofit-cause/l10n/vi.json +6 -0
- package/templates/nonprofit-cause/l10n/zh.json +6 -0
- package/templates/nonprofit-cause/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/podcast-creator/l10n/ar.json +6 -0
- package/templates/podcast-creator/l10n/cs.json +6 -0
- package/templates/podcast-creator/l10n/da.json +6 -0
- package/templates/podcast-creator/l10n/de.json +6 -0
- package/templates/podcast-creator/l10n/el.json +6 -0
- package/templates/podcast-creator/l10n/en.json +6 -0
- package/templates/podcast-creator/l10n/es.json +6 -0
- package/templates/podcast-creator/l10n/fi.json +6 -0
- package/templates/podcast-creator/l10n/fr.json +6 -0
- package/templates/podcast-creator/l10n/he.json +5 -0
- package/templates/podcast-creator/l10n/hu.json +6 -0
- package/templates/podcast-creator/l10n/id.json +6 -0
- package/templates/podcast-creator/l10n/it.json +6 -0
- package/templates/podcast-creator/l10n/ja.json +6 -0
- package/templates/podcast-creator/l10n/ko.json +6 -0
- package/templates/podcast-creator/l10n/lt.json +6 -0
- package/templates/podcast-creator/l10n/nl.json +6 -0
- package/templates/podcast-creator/l10n/no.json +6 -0
- package/templates/podcast-creator/l10n/pl.json +6 -0
- package/templates/podcast-creator/l10n/pt.json +6 -0
- package/templates/podcast-creator/l10n/ru.json +6 -0
- package/templates/podcast-creator/l10n/sv.json +6 -0
- package/templates/podcast-creator/l10n/th.json +6 -0
- package/templates/podcast-creator/l10n/tr.json +6 -0
- package/templates/podcast-creator/l10n/uk.json +6 -0
- package/templates/podcast-creator/l10n/vi.json +6 -0
- package/templates/podcast-creator/l10n/zh.json +6 -0
- package/templates/podcast-creator/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/portfolio-creative/l10n/ar.json +6 -0
- package/templates/portfolio-creative/l10n/cs.json +6 -0
- package/templates/portfolio-creative/l10n/da.json +6 -0
- package/templates/portfolio-creative/l10n/de.json +6 -0
- package/templates/portfolio-creative/l10n/el.json +6 -0
- package/templates/portfolio-creative/l10n/en.json +6 -0
- package/templates/portfolio-creative/l10n/es.json +6 -0
- package/templates/portfolio-creative/l10n/fi.json +6 -0
- package/templates/portfolio-creative/l10n/fr.json +6 -0
- package/templates/portfolio-creative/l10n/he.json +5 -0
- package/templates/portfolio-creative/l10n/hu.json +6 -0
- package/templates/portfolio-creative/l10n/id.json +6 -0
- package/templates/portfolio-creative/l10n/it.json +6 -0
- package/templates/portfolio-creative/l10n/ja.json +6 -0
- package/templates/portfolio-creative/l10n/ko.json +6 -0
- package/templates/portfolio-creative/l10n/lt.json +6 -0
- package/templates/portfolio-creative/l10n/nl.json +6 -0
- package/templates/portfolio-creative/l10n/no.json +6 -0
- package/templates/portfolio-creative/l10n/pl.json +6 -0
- package/templates/portfolio-creative/l10n/pt.json +6 -0
- package/templates/portfolio-creative/l10n/ru.json +6 -0
- package/templates/portfolio-creative/l10n/sv.json +6 -0
- package/templates/portfolio-creative/l10n/th.json +6 -0
- package/templates/portfolio-creative/l10n/tr.json +6 -0
- package/templates/portfolio-creative/l10n/uk.json +6 -0
- package/templates/portfolio-creative/l10n/vi.json +6 -0
- package/templates/portfolio-creative/l10n/zh.json +6 -0
- package/templates/portfolio-creative/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/professional-services/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/restaurant/l10n/ar.json +6 -0
- package/templates/restaurant/l10n/cs.json +6 -0
- package/templates/restaurant/l10n/da.json +6 -0
- package/templates/restaurant/l10n/de.json +6 -0
- package/templates/restaurant/l10n/el.json +6 -0
- package/templates/restaurant/l10n/en.json +6 -0
- package/templates/restaurant/l10n/es.json +6 -0
- package/templates/restaurant/l10n/fi.json +6 -0
- package/templates/restaurant/l10n/fr.json +6 -0
- package/templates/restaurant/l10n/he.json +5 -0
- package/templates/restaurant/l10n/hu.json +6 -0
- package/templates/restaurant/l10n/id.json +6 -0
- package/templates/restaurant/l10n/it.json +6 -0
- package/templates/restaurant/l10n/ja.json +6 -0
- package/templates/restaurant/l10n/ko.json +6 -0
- package/templates/restaurant/l10n/lt.json +6 -0
- package/templates/restaurant/l10n/nl.json +6 -0
- package/templates/restaurant/l10n/no.json +6 -0
- package/templates/restaurant/l10n/pl.json +6 -0
- package/templates/restaurant/l10n/pt.json +6 -0
- package/templates/restaurant/l10n/ru.json +6 -0
- package/templates/restaurant/l10n/sv.json +6 -0
- package/templates/restaurant/l10n/th.json +6 -0
- package/templates/restaurant/l10n/tr.json +6 -0
- package/templates/restaurant/l10n/uk.json +6 -0
- package/templates/restaurant/l10n/vi.json +6 -0
- package/templates/restaurant/l10n/zh.json +6 -0
- package/templates/restaurant/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/retail-store/l10n/ar.json +6 -0
- package/templates/retail-store/l10n/cs.json +6 -0
- package/templates/retail-store/l10n/da.json +6 -0
- package/templates/retail-store/l10n/de.json +6 -0
- package/templates/retail-store/l10n/el.json +6 -0
- package/templates/retail-store/l10n/en.json +6 -0
- package/templates/retail-store/l10n/es.json +6 -0
- package/templates/retail-store/l10n/fi.json +6 -0
- package/templates/retail-store/l10n/fr.json +6 -0
- package/templates/retail-store/l10n/he.json +5 -0
- package/templates/retail-store/l10n/hu.json +6 -0
- package/templates/retail-store/l10n/id.json +6 -0
- package/templates/retail-store/l10n/it.json +6 -0
- package/templates/retail-store/l10n/ja.json +6 -0
- package/templates/retail-store/l10n/ko.json +6 -0
- package/templates/retail-store/l10n/lt.json +6 -0
- package/templates/retail-store/l10n/nl.json +6 -0
- package/templates/retail-store/l10n/no.json +6 -0
- package/templates/retail-store/l10n/pl.json +6 -0
- package/templates/retail-store/l10n/pt.json +6 -0
- package/templates/retail-store/l10n/ru.json +6 -0
- package/templates/retail-store/l10n/sv.json +6 -0
- package/templates/retail-store/l10n/th.json +6 -0
- package/templates/retail-store/l10n/tr.json +6 -0
- package/templates/retail-store/l10n/uk.json +6 -0
- package/templates/retail-store/l10n/vi.json +6 -0
- package/templates/retail-store/l10n/zh.json +6 -0
- package/templates/retail-store/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/yoga-studio/l10n/ar.json +6 -0
- package/templates/yoga-studio/l10n/cs.json +6 -0
- package/templates/yoga-studio/l10n/da.json +6 -0
- package/templates/yoga-studio/l10n/de.json +6 -0
- package/templates/yoga-studio/l10n/el.json +6 -0
- package/templates/yoga-studio/l10n/en.json +6 -0
- package/templates/yoga-studio/l10n/es.json +6 -0
- package/templates/yoga-studio/l10n/fi.json +6 -0
- package/templates/yoga-studio/l10n/fr.json +6 -0
- package/templates/yoga-studio/l10n/he.json +5 -0
- package/templates/yoga-studio/l10n/hu.json +6 -0
- package/templates/yoga-studio/l10n/id.json +6 -0
- package/templates/yoga-studio/l10n/it.json +6 -0
- package/templates/yoga-studio/l10n/ja.json +6 -0
- package/templates/yoga-studio/l10n/ko.json +6 -0
- package/templates/yoga-studio/l10n/lt.json +6 -0
- package/templates/yoga-studio/l10n/nl.json +6 -0
- package/templates/yoga-studio/l10n/no.json +6 -0
- package/templates/yoga-studio/l10n/pl.json +6 -0
- package/templates/yoga-studio/l10n/pt.json +6 -0
- package/templates/yoga-studio/l10n/ru.json +6 -0
- package/templates/yoga-studio/l10n/sv.json +6 -0
- package/templates/yoga-studio/l10n/th.json +6 -0
- package/templates/yoga-studio/l10n/tr.json +6 -0
- package/templates/yoga-studio/l10n/uk.json +6 -0
- package/templates/yoga-studio/l10n/vi.json +6 -0
- package/templates/yoga-studio/l10n/zh.json +6 -0
- package/templates/yoga-studio/tier5-src/_shared/relative-time.ts +35 -2
package/dist/cli.mjs
CHANGED
|
@@ -3970,6 +3970,7 @@ var init_himi_package = __esm({
|
|
|
3970
3970
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
3971
3971
|
var init_icon_catalog_generated = __esm({
|
|
3972
3972
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3973
|
+
"use strict";
|
|
3973
3974
|
init_define_HHP_CATALOG();
|
|
3974
3975
|
ICON_VIEW_BOX = 24;
|
|
3975
3976
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -48383,6 +48384,7 @@ function shouldRevealError(args) {
|
|
|
48383
48384
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
48384
48385
|
var init_validation = __esm({
|
|
48385
48386
|
"../../core/ts/src/validation.ts"() {
|
|
48387
|
+
"use strict";
|
|
48386
48388
|
init_define_HHP_CATALOG();
|
|
48387
48389
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
48388
48390
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -216637,7 +216639,8 @@ var init_generate = __esm({
|
|
|
216637
216639
|
platform_general_announcement_section: (id, s5, _st, index, ctx) => {
|
|
216638
216640
|
const svc = ctx.uses("announcements", `announcement${index}`, {});
|
|
216639
216641
|
const heading = s5.showTitle === true ? str16(s5.title).trim() : "";
|
|
216640
|
-
|
|
216642
|
+
const params = ctx.workerCopy(MODULES.announcements.file);
|
|
216643
|
+
return vstack(`${id}.box`, [ctx.recipe("announcement-card", { svc, id, heading })], 0, { onAppear: { actionId: `tier5.${svc}.load`, params } });
|
|
216641
216644
|
},
|
|
216642
216645
|
// The data of these sections is shown by a template screen; the page keeps the source's title and a link to it.
|
|
216643
216646
|
// A Wix Video channel's first videos as a rail of cards (cover, length, title) that open the template's video screen, which plays the
|
|
@@ -217494,6 +217497,58 @@ function provisionAppName(dir, displayName3, dryRun = false) {
|
|
|
217494
217497
|
if (!dryRun) writeFileSync48(configPath, correction.fixed, "utf8");
|
|
217495
217498
|
return { status: "set", from: correction.current, to: displayName3.trim() };
|
|
217496
217499
|
}
|
|
217500
|
+
function aboutBlock(paragraphs) {
|
|
217501
|
+
return {
|
|
217502
|
+
id: ABOUT_ID,
|
|
217503
|
+
body: { package: "himalaya", type: "VStack", props: { spacing: 16, alignment: "leading", children: paragraphs.map((text32) => ({ id: "", body: { package: "himalaya", type: "Text", props: { text: text32, style: "body", color: "textSecondary" } } })) } },
|
|
217504
|
+
modifiers: { fillMaxWidth: true, padding: { top: 20 } }
|
|
217505
|
+
};
|
|
217506
|
+
}
|
|
217507
|
+
function appInfoChildren(descriptor) {
|
|
217508
|
+
const children2 = obj21(obj21(obj21(descriptor?.payload).body).props).children;
|
|
217509
|
+
return Array.isArray(children2) && children2.some((c2) => obj21(c2).id === LINKS_ID) ? children2 : void 0;
|
|
217510
|
+
}
|
|
217511
|
+
function aboutTexts(children2) {
|
|
217512
|
+
const block = children2.find((c2) => obj21(c2).id === ABOUT_ID);
|
|
217513
|
+
if (!block) return void 0;
|
|
217514
|
+
const texts = obj21(obj21(obj21(block).body).props).children;
|
|
217515
|
+
return Array.isArray(texts) ? texts.map((t2) => String(obj21(obj21(obj21(t2).body).props).text ?? "")) : [];
|
|
217516
|
+
}
|
|
217517
|
+
function templateAboutTexts() {
|
|
217518
|
+
try {
|
|
217519
|
+
const children2 = appInfoChildren(readEntry(templateSourceDir("branded-lite"), APP_INFO_SCREEN));
|
|
217520
|
+
return children2 ? aboutTexts(children2) : void 0;
|
|
217521
|
+
} catch {
|
|
217522
|
+
return void 0;
|
|
217523
|
+
}
|
|
217524
|
+
}
|
|
217525
|
+
function provisionAppInfoAbout(dir, about, dryRun = false) {
|
|
217526
|
+
if (about === void 0) return { status: "unverified", reason: "the collection did not read the site description; the About screen is left as it is" };
|
|
217527
|
+
const descriptor = readEntry(dir, APP_INFO_SCREEN);
|
|
217528
|
+
const children2 = appInfoChildren(descriptor);
|
|
217529
|
+
if (!descriptor || !children2) {
|
|
217530
|
+
return { status: "absent", reason: `the scaffold has no ${APP_INFO_SCREEN} in the template's shape; its About text is left as it is` };
|
|
217531
|
+
}
|
|
217532
|
+
const props2 = obj21(obj21(obj21(descriptor.payload).body).props);
|
|
217533
|
+
const paragraphs = about.split(/\n\s*\n/).map((p2) => p2.trim()).filter(Boolean);
|
|
217534
|
+
const current = aboutTexts(children2);
|
|
217535
|
+
const same7 = (a3, b3) => JSON.stringify(a3) === JSON.stringify(b3);
|
|
217536
|
+
if (current && !same7(current, paragraphs) && !same7(current, templateAboutTexts() ?? [])) {
|
|
217537
|
+
return { status: "kept", reason: "the About text is not the template's demo text, so it is someone's own copy and is left as written" };
|
|
217538
|
+
}
|
|
217539
|
+
const next = children2.filter((c2) => obj21(c2).id !== ABOUT_ID);
|
|
217540
|
+
const at2 = next.findIndex((c2) => obj21(c2).id === LINKS_ID);
|
|
217541
|
+
const links = obj21(next[at2]);
|
|
217542
|
+
const modifiers = obj21(links.modifiers);
|
|
217543
|
+
next[at2] = { ...links, modifiers: { ...modifiers, padding: { ...obj21(modifiers.padding), top: paragraphs.length ? 24 : 20 } } };
|
|
217544
|
+
if (paragraphs.length) next.splice(at2, 0, aboutBlock(paragraphs));
|
|
217545
|
+
if (JSON.stringify(next) === JSON.stringify(children2)) return { status: "unchanged" };
|
|
217546
|
+
if (!dryRun) {
|
|
217547
|
+
props2.children = next;
|
|
217548
|
+
replaceScreen(dir, APP_INFO_SCREEN, screenEntry(APP_INFO_SCREEN, descriptor));
|
|
217549
|
+
}
|
|
217550
|
+
return paragraphs.length ? { status: "set" } : { status: "removed", reason: "the site has no description; the template's demo text is taken out, and no text is invented" };
|
|
217551
|
+
}
|
|
217497
217552
|
function readEntry(dir, screenId) {
|
|
217498
217553
|
const { dev, config } = readAppEntrySources(dir);
|
|
217499
217554
|
const span = screenSpans(dev, config).get(screenId);
|
|
@@ -217590,6 +217645,7 @@ function provisionScreens(dir, facts, dryRun = false) {
|
|
|
217590
217645
|
}
|
|
217591
217646
|
out2.appName = provisionAppName(dir, facts.displayName, dryRun);
|
|
217592
217647
|
out2.renamed = provisionScreenNames(dir, facts.displayName, dryRun);
|
|
217648
|
+
out2.about = provisionAppInfoAbout(dir, facts.about, dryRun);
|
|
217593
217649
|
out2.tabBar = provisionTabBar(dir, dryRun);
|
|
217594
217650
|
out2.chat = provisionChatTarget(dir, facts.memberChat, dryRun);
|
|
217595
217651
|
const home2 = readEntry(dir, TEMPLATE_HOME_SCREEN);
|
|
@@ -217649,6 +217705,8 @@ async function runOneAppProvision(args, io2) {
|
|
|
217649
217705
|
...typeof context.paymentCurrency === "string" && /^[A-Z]{3}$/.test(context.paymentCurrency) ? { paymentCurrency: context.paymentCurrency } : {},
|
|
217650
217706
|
...typeof context.timeZone === "string" && context.timeZone ? { timeZone: context.timeZone } : {},
|
|
217651
217707
|
...typeof context.displayName === "string" && context.displayName.trim() ? { displayName: context.displayName } : {},
|
|
217708
|
+
// "" is the collection's "the site has none"; an absent field is "not read".
|
|
217709
|
+
...typeof context.about === "string" ? { about: context.about } : {},
|
|
217652
217710
|
// Recorded by the collection from the source's own Inbox setting: only an explicit true counts.
|
|
217653
217711
|
...manifest2.memberChat === true ? { memberChat: true } : {},
|
|
217654
217712
|
// The source site the migration collected from: what the same-site binding is written from.
|
|
@@ -217666,12 +217724,13 @@ async function runOneAppProvision(args, io2) {
|
|
|
217666
217724
|
return report3(io2, false, { code: "content_invalid", error: error instanceof Error ? error.message : String(error) });
|
|
217667
217725
|
}
|
|
217668
217726
|
}
|
|
217669
|
-
var obj21, PROVISION_USAGE, PROVISIONED_PARAMS, propName9, propOf, GUID2, BUSINESS_CHAT_SCREEN2, INBOX_DOOR_SCREENS, NAME_SLOTS, spansByText, spanParses;
|
|
217727
|
+
var obj21, PROVISION_USAGE, PROVISIONED_PARAMS, propName9, propOf, GUID2, BUSINESS_CHAT_SCREEN2, INBOX_DOOR_SCREENS, NAME_SLOTS, APP_INFO_SCREEN, ABOUT_ID, LINKS_ID, spansByText, spanParses;
|
|
217670
217728
|
var init_provision = __esm({
|
|
217671
217729
|
"src/one-app/provision.ts"() {
|
|
217672
217730
|
init_define_HHP_CATALOG();
|
|
217673
217731
|
init_template_adopt();
|
|
217674
217732
|
init_content_manifest();
|
|
217733
|
+
init_scaffold();
|
|
217675
217734
|
init_template_trim();
|
|
217676
217735
|
init_coverage();
|
|
217677
217736
|
init_validate_topbar();
|
|
@@ -217701,6 +217760,9 @@ var init_provision = __esm({
|
|
|
217701
217760
|
BUSINESS_CHAT_SCREEN2 = "himi_business_chat";
|
|
217702
217761
|
INBOX_DOOR_SCREENS = ["himi_account", "himi_chat_thread"];
|
|
217703
217762
|
NAME_SLOTS = /* @__PURE__ */ new Set([...DISPLAY_KEYS, "title", "text", "displayName"]);
|
|
217763
|
+
APP_INFO_SCREEN = "himi_app_info";
|
|
217764
|
+
ABOUT_ID = "himi_app_info.about";
|
|
217765
|
+
LINKS_ID = "himi_app_info.links";
|
|
217704
217766
|
spansByText = /* @__PURE__ */ new Map();
|
|
217705
217767
|
spanParses = 0;
|
|
217706
217768
|
}
|
|
@@ -308913,6 +308975,202 @@ var init_business_address = __esm({
|
|
|
308913
308975
|
}
|
|
308914
308976
|
});
|
|
308915
308977
|
|
|
308978
|
+
// src/site-analyze/derive.ts
|
|
308979
|
+
function aboutFromCrawl(about, crawlComplete) {
|
|
308980
|
+
const text32 = bounded(oneLine2(about), ABOUT_MAX_LENGTH);
|
|
308981
|
+
if (!text32 && !crawlComplete) return void 0;
|
|
308982
|
+
return text32;
|
|
308983
|
+
}
|
|
308984
|
+
function deriveAppName(ctx, override) {
|
|
308985
|
+
return clean3(override) || clean3(ctx.identity.businessName) || clean3(ctx.identity.siteDisplayName) || "My Business";
|
|
308986
|
+
}
|
|
308987
|
+
function deriveIconSource(ctx) {
|
|
308988
|
+
return clean3(ctx.brand.logo) || null;
|
|
308989
|
+
}
|
|
308990
|
+
function deriveVerticals(ctx) {
|
|
308991
|
+
const requested = new Set(ctx.content.installedVerticals);
|
|
308992
|
+
return KNOWN_VERTICALS.filter((v2) => requested.has(v2));
|
|
308993
|
+
}
|
|
308994
|
+
function unusableIdentifier(value2, max) {
|
|
308995
|
+
if (typeof value2 !== "string" || value2 === "") return "missing";
|
|
308996
|
+
if (value2 !== value2.trim()) {
|
|
308997
|
+
return "is surrounded by whitespace, which the manifest parser strips \u2014 the app would query a different id";
|
|
308998
|
+
}
|
|
308999
|
+
if (HAS_CONTROL_CHAR.test(value2)) {
|
|
309000
|
+
return "contains control characters, and removing them would name a different collection";
|
|
309001
|
+
}
|
|
309002
|
+
if (value2.length > max) return `is longer than ${max} characters`;
|
|
309003
|
+
return null;
|
|
309004
|
+
}
|
|
309005
|
+
function deriveAdoptedCmsCollections(cms) {
|
|
309006
|
+
const collections2 = [];
|
|
309007
|
+
const dropped = [];
|
|
309008
|
+
const seen = /* @__PURE__ */ new Set();
|
|
309009
|
+
for (const collection of cms) {
|
|
309010
|
+
const label4 = typeof collection.id === "string" ? collection.id.trim().slice(0, 60) : "";
|
|
309011
|
+
if (!label4) continue;
|
|
309012
|
+
if (collection.ownerAppId) {
|
|
309013
|
+
dropped.push({ id: label4, reason: "owned by a Wix app \u2014 its own vertical covers it" });
|
|
309014
|
+
continue;
|
|
309015
|
+
}
|
|
309016
|
+
const readRole = collection.readRole;
|
|
309017
|
+
if (readRole !== "ANYONE") {
|
|
309018
|
+
dropped.push({
|
|
309019
|
+
id: label4,
|
|
309020
|
+
reason: readRole === "SITE_MEMBER" || readRole === "SITE_MEMBER_AUTHOR" ? `read permission "${readRole}" \u2014 member-only rows would be cached unencrypted on the device and served to a later visitor` : `read permission ${readRole ? `"${readRole}"` : "unknown"} \u2014 a shipped app can only read ANYONE`
|
|
309021
|
+
});
|
|
309022
|
+
continue;
|
|
309023
|
+
}
|
|
309024
|
+
const idProblem = unusableIdentifier(collection.id, ID_MAX);
|
|
309025
|
+
if (idProblem) {
|
|
309026
|
+
dropped.push({ id: shown2(collection.id), reason: `id ${idProblem}` });
|
|
309027
|
+
continue;
|
|
309028
|
+
}
|
|
309029
|
+
const id = collection.id;
|
|
309030
|
+
if (seen.has(id)) {
|
|
309031
|
+
dropped.push({ id: label4, reason: "duplicate id" });
|
|
309032
|
+
continue;
|
|
309033
|
+
}
|
|
309034
|
+
const fields2 = collection.fields.flatMap((field) => {
|
|
309035
|
+
if (field.systemField || field.encrypted) return [];
|
|
309036
|
+
if (unusableIdentifier(field.key, ID_MAX)) return [];
|
|
309037
|
+
const key4 = field.key;
|
|
309038
|
+
return [{
|
|
309039
|
+
key: key4,
|
|
309040
|
+
// `key.slice(NAME_MAX)`, not bare `key`: a field key may be up to `ID_MAX`, and the
|
|
309041
|
+
// manifest caps a display NAME at `NAME_MAX`. Falling back to the whole key would
|
|
309042
|
+
// emit a name the shell's parser refuses, which fails open to the shell's own
|
|
309043
|
+
// collections — the silent restoration this whole function exists to prevent.
|
|
309044
|
+
displayName: plain4(field.displayName, NAME_MAX) || key4.slice(0, NAME_MAX),
|
|
309045
|
+
type: (plain4(field.type, TYPE_MAX) || "TEXT").toUpperCase()
|
|
309046
|
+
}];
|
|
309047
|
+
});
|
|
309048
|
+
const requested = collection.displayField;
|
|
309049
|
+
const displayField = fields2.some((field) => field.key === requested) ? requested : fields2[0]?.key;
|
|
309050
|
+
if (!displayField) {
|
|
309051
|
+
dropped.push({ id: label4, reason: "no readable field to show as a row title" });
|
|
309052
|
+
continue;
|
|
309053
|
+
}
|
|
309054
|
+
seen.add(id);
|
|
309055
|
+
collections2.push({
|
|
309056
|
+
id,
|
|
309057
|
+
displayName: plain4(collection.displayName, NAME_MAX) || id.slice(0, NAME_MAX),
|
|
309058
|
+
displayField,
|
|
309059
|
+
readRole,
|
|
309060
|
+
fields: fields2
|
|
309061
|
+
});
|
|
309062
|
+
}
|
|
309063
|
+
return { collections: collections2, dropped };
|
|
309064
|
+
}
|
|
309065
|
+
function deriveTailoring(ctx, overrides = {}, revision = "site-derived") {
|
|
309066
|
+
const appName2 = deriveAppName(ctx, overrides.appName);
|
|
309067
|
+
const supportUrl = clean3(overrides.supportUrl) || clean3(ctx.url.primary);
|
|
309068
|
+
const privacyUrl = clean3(overrides.privacyUrl);
|
|
309069
|
+
const termsUrl = clean3(overrides.termsUrl);
|
|
309070
|
+
const missing4 = [];
|
|
309071
|
+
if (!supportUrl) missing4.push("supportUrl");
|
|
309072
|
+
if (!privacyUrl) missing4.push("privacyUrl");
|
|
309073
|
+
if (!termsUrl) missing4.push("termsUrl");
|
|
309074
|
+
const provisioning = {
|
|
309075
|
+
version: 1,
|
|
309076
|
+
siteId: ctx.siteId,
|
|
309077
|
+
revision,
|
|
309078
|
+
installedVerticals: deriveVerticals(ctx),
|
|
309079
|
+
// PRESENT AND EMPTY, never absent. `WixSiteContext` carries no CMS chapter, so this base
|
|
309080
|
+
// overlay knows of no readable collection — and an ABSENT key is not that statement, it
|
|
309081
|
+
// is "inherit whatever the shell has", which pointed a customer's app at the shell's demo
|
|
309082
|
+
// collection (#2341). `runSiteAnalyze` replaces this with the site's own, also possibly
|
|
309083
|
+
// empty; either way the key exists and the shell's list never survives the merge.
|
|
309084
|
+
cmsCollections: [],
|
|
309085
|
+
identity: {
|
|
309086
|
+
appName: appName2,
|
|
309087
|
+
businessName: clean3(ctx.identity.businessName) || appName2,
|
|
309088
|
+
tagline: clean3(overrides.tagline) || clean3(ctx.identity.description),
|
|
309089
|
+
// Present even when empty: an absent key would inherit the shell's About text. `analyzeSite`
|
|
309090
|
+
// fills it from the crawl's About section (`aboutFromCrawl`), or drops the key when the crawl
|
|
309091
|
+
// could not tell. The description already shows as the tagline.
|
|
309092
|
+
about: "",
|
|
309093
|
+
// "" means UNKNOWN here, with `missing` above as the signal — the published overlay's
|
|
309094
|
+
// documented shape. Keeping an unknown url out of a MERGE is `apply.ts`'s job, at the
|
|
309095
|
+
// seam where an empty string would otherwise beat the shell's committed value.
|
|
309096
|
+
supportUrl,
|
|
309097
|
+
privacyUrl,
|
|
309098
|
+
termsUrl
|
|
309099
|
+
}
|
|
309100
|
+
};
|
|
309101
|
+
return { appName: appName2, iconSource: deriveIconSource(ctx), provisioning, missing: missing4 };
|
|
309102
|
+
}
|
|
309103
|
+
function bounded(s5, max) {
|
|
309104
|
+
if (s5.length <= max) return s5;
|
|
309105
|
+
const cut2 = s5.slice(0, max - 1).replace(/[\uD800-\uDBFF]$/, "");
|
|
309106
|
+
const space = cut2.lastIndexOf(" ");
|
|
309107
|
+
return `${(space > max * 0.6 ? cut2.slice(0, space) : cut2).trimEnd()}\u2026`;
|
|
309108
|
+
}
|
|
309109
|
+
function deriveStaticFaq(faq) {
|
|
309110
|
+
if (!Array.isArray(faq)) return [];
|
|
309111
|
+
const out2 = [];
|
|
309112
|
+
const seen = /* @__PURE__ */ new Set();
|
|
309113
|
+
for (const raw of faq) {
|
|
309114
|
+
if (out2.length >= STATIC_FAQ_LIMITS.pairs) break;
|
|
309115
|
+
const pair = raw && typeof raw === "object" ? raw : {};
|
|
309116
|
+
const q4 = bounded(oneLine2(pair.q), STATIC_FAQ_LIMITS.question);
|
|
309117
|
+
const a3 = bounded(oneLine2(pair.a), STATIC_FAQ_LIMITS.answer);
|
|
309118
|
+
if (!q4 || !a3 || seen.has(q4.toLowerCase())) continue;
|
|
309119
|
+
seen.add(q4.toLowerCase());
|
|
309120
|
+
out2.push({ q: q4, a: a3 });
|
|
309121
|
+
}
|
|
309122
|
+
return out2;
|
|
309123
|
+
}
|
|
309124
|
+
function deriveStaticGalleries(pages2) {
|
|
309125
|
+
if (!Array.isArray(pages2)) return [];
|
|
309126
|
+
const galleries = [];
|
|
309127
|
+
const seenPhotoSets = /* @__PURE__ */ new Set();
|
|
309128
|
+
let totalPhotos = 0;
|
|
309129
|
+
for (const raw of pages2) {
|
|
309130
|
+
if (galleries.length >= STATIC_GALLERY_LIMITS.galleries || totalPhotos >= STATIC_GALLERY_LIMITS.totalPhotos) break;
|
|
309131
|
+
const page = raw && typeof raw === "object" ? raw : {};
|
|
309132
|
+
if (!Array.isArray(page.galleryImageUrls)) continue;
|
|
309133
|
+
const photos = [];
|
|
309134
|
+
for (const image of page.galleryImageUrls) {
|
|
309135
|
+
if (photos.length >= STATIC_GALLERY_LIMITS.photos || totalPhotos + photos.length >= STATIC_GALLERY_LIMITS.totalPhotos) break;
|
|
309136
|
+
if (typeof image !== "string") continue;
|
|
309137
|
+
const match = /^https:\/\/static\.wixstatic\.com\/media\/([A-Za-z0-9_~.-]+)(?:\/.*)?$/.exec(image);
|
|
309138
|
+
if (!match) continue;
|
|
309139
|
+
const url = `https://static.wixstatic.com/media/${match[1]}`;
|
|
309140
|
+
if (!photos.includes(url)) photos.push(url);
|
|
309141
|
+
}
|
|
309142
|
+
if (!photos.length) continue;
|
|
309143
|
+
const photoSet = photos.join("\n");
|
|
309144
|
+
if (seenPhotoSets.has(photoSet)) continue;
|
|
309145
|
+
seenPhotoSets.add(photoSet);
|
|
309146
|
+
totalPhotos += photos.length;
|
|
309147
|
+
const heading = Array.isArray(page.headings) ? page.headings.find((h2) => typeof h2 === "string" && !!h2.trim()) : void 0;
|
|
309148
|
+
const pageTitle = typeof page.title === "string" ? page.title.split(/\s+[|–—]\s+/)[0] : "";
|
|
309149
|
+
const title = bounded(oneLine2(page.role === "gallery" ? pageTitle || heading || "Gallery" : "Gallery"), STATIC_GALLERY_LIMITS.title);
|
|
309150
|
+
galleries.push({ id: `site-gallery-${galleries.length + 1}`, title, photos });
|
|
309151
|
+
}
|
|
309152
|
+
return galleries;
|
|
309153
|
+
}
|
|
309154
|
+
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;
|
|
309155
|
+
var init_derive = __esm({
|
|
309156
|
+
"src/site-analyze/derive.ts"() {
|
|
309157
|
+
init_define_HHP_CATALOG();
|
|
309158
|
+
init_types2();
|
|
309159
|
+
clean3 = (s5) => (s5 ?? "").trim();
|
|
309160
|
+
ABOUT_MAX_LENGTH = 1e3;
|
|
309161
|
+
ID_MAX = 256;
|
|
309162
|
+
NAME_MAX = 120;
|
|
309163
|
+
TYPE_MAX = 80;
|
|
309164
|
+
CONTROL_CHARS2 = /[\u0000-\u001F\u007F]/g;
|
|
309165
|
+
HAS_CONTROL_CHAR = /[\u0000-\u001F\u007F]/;
|
|
309166
|
+
plain4 = (value2, max) => (value2 ?? "").replace(CONTROL_CHARS2, "").trim().slice(0, max);
|
|
309167
|
+
shown2 = (value2) => (typeof value2 === "string" ? JSON.stringify(value2) : String(value2)).slice(0, 64);
|
|
309168
|
+
STATIC_FAQ_LIMITS = { pairs: 20, question: 200, answer: 1500 };
|
|
309169
|
+
oneLine2 = (s5) => typeof s5 === "string" ? s5.replace(/[\u0000-\u001F\u007F\s]+/g, " ").trim() : "";
|
|
309170
|
+
STATIC_GALLERY_LIMITS = { galleries: 10, photos: 50, totalPhotos: 50, title: 120 };
|
|
309171
|
+
}
|
|
309172
|
+
});
|
|
309173
|
+
|
|
308916
309174
|
// ../../stdlib/wix-sdk/rich-content/src/display.ts
|
|
308917
309175
|
function trimAscii(s5) {
|
|
308918
309176
|
return s5.replace(/^[\t\n\v\f\r ]+|[\t\n\v\f\r ]+$/g, "");
|
|
@@ -309440,9 +309698,15 @@ __export(collect_exports, {
|
|
|
309440
309698
|
collectOneApp: () => collectOneApp,
|
|
309441
309699
|
inboxFromMobileConfig: () => inboxFromMobileConfig,
|
|
309442
309700
|
resolveSourceLocale: () => resolveSourceLocale,
|
|
309701
|
+
siteAbout: () => siteAbout,
|
|
309443
309702
|
sourceMemberChat: () => sourceMemberChat
|
|
309444
309703
|
});
|
|
309445
309704
|
import { createHash as createHash104 } from "node:crypto";
|
|
309705
|
+
function siteAbout(value2) {
|
|
309706
|
+
if (typeof value2 !== "string") return "";
|
|
309707
|
+
const text32 = value2.replace(/\r\n?/g, "\n").replace(/[\u0000-\u0009\u000B-\u001F\u007F]/g, " ").split("\n").map((line) => line.replace(/ {2,}/g, " ").trim()).join("\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
309708
|
+
return bounded(text32, ABOUT_MAX_LENGTH);
|
|
309709
|
+
}
|
|
309446
309710
|
function isObject3(value2) {
|
|
309447
309711
|
return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
309448
309712
|
}
|
|
@@ -309767,6 +310031,8 @@ async function collectOneApp(input, deps = {}) {
|
|
|
309767
310031
|
const wantsContact = definitions2.some((id) => CONTACT_SECTIONS.has(id));
|
|
309768
310032
|
const wantsLoyalty = definitions2.some((id) => LOYALTY_SECTIONS.has(id));
|
|
309769
310033
|
const wantsTimeZone = definitions2.some((id) => SERVICES_SECTIONS.has(id));
|
|
310034
|
+
const wantsAbout = deps.about !== false;
|
|
310035
|
+
let aboutSettled = !wantsAbout;
|
|
309770
310036
|
if (wantsContact || wantsLoyalty || wantsTimeZone) {
|
|
309771
310037
|
const optionalOnly = !wantsContact && !wantsLoyalty;
|
|
309772
310038
|
const requiredVisitor = internalBusinessRead && !optionalOnly ? await visitorAuthorization("enrichment_session") : void 0;
|
|
@@ -309777,6 +310043,10 @@ async function collectOneApp(input, deps = {}) {
|
|
|
309777
310043
|
if (properties.metaSiteId.toLowerCase() !== input.metaSiteId.toLowerCase()) {
|
|
309778
310044
|
throw new OneAppError("source_site_mismatch", "The returned properties do not match the requested site.", { stage: "business_contact" });
|
|
309779
310045
|
}
|
|
310046
|
+
if (wantsAbout) {
|
|
310047
|
+
aboutSettled = true;
|
|
310048
|
+
businessContext.about = redact(siteAbout(properties.properties.description));
|
|
310049
|
+
}
|
|
309780
310050
|
if (wantsContact) businessContext.contact = redact(contactProjection(properties, input.metaSiteId));
|
|
309781
310051
|
if (wantsLoyalty) {
|
|
309782
310052
|
const currency = properties.properties.paymentCurrency;
|
|
@@ -309807,6 +310077,8 @@ async function collectOneApp(input, deps = {}) {
|
|
|
309807
310077
|
message: "Payment currency is unavailable. Keep currency-based Loyalty earning details unresolved."
|
|
309808
310078
|
});
|
|
309809
310079
|
if (wantsTimeZone) contextWarnings.push({ code: "business_time_zone_unavailable", failureCode: error.code, message: TIME_ZONE_UNAVAILABLE });
|
|
310080
|
+
if (!aboutSettled) contextWarnings.push({ code: "business_about_unavailable", failureCode: error.code, message: ABOUT_UNAVAILABLE });
|
|
310081
|
+
aboutSettled = true;
|
|
309810
310082
|
}
|
|
309811
310083
|
}
|
|
309812
310084
|
if (Object.values(buildSourceGraph(rawStructure).sections).some((section3) => {
|
|
@@ -309945,6 +310217,29 @@ async function collectOneApp(input, deps = {}) {
|
|
|
309945
310217
|
message: "A free One App has no branded mobile config, so its Inbox setting (inbox.chatType) is not collected. Keep the app business-only (no member chat) unless the owner confirms otherwise."
|
|
309946
310218
|
});
|
|
309947
310219
|
}
|
|
310220
|
+
if (!aboutSettled) {
|
|
310221
|
+
let about;
|
|
310222
|
+
try {
|
|
310223
|
+
const properties = await request2(
|
|
310224
|
+
PUBLIC_CONTACT,
|
|
310225
|
+
"business_about",
|
|
310226
|
+
void 0,
|
|
310227
|
+
{ authorization: await visitorAuthorization("business_about_session"), siteScoped: false }
|
|
310228
|
+
);
|
|
310229
|
+
if (!isObject3(properties) || typeof properties.metaSiteId !== "string" || !isObject3(properties.properties)) throw invalidResponse("business_about");
|
|
310230
|
+
if (properties.metaSiteId.toLowerCase() !== input.metaSiteId.toLowerCase()) {
|
|
310231
|
+
throw new OneAppError("source_site_mismatch", "The returned properties do not match the requested site.", { stage: "business_about" });
|
|
310232
|
+
}
|
|
310233
|
+
about = siteAbout(properties.properties.description);
|
|
310234
|
+
} catch (error) {
|
|
310235
|
+
if (!(error instanceof OneAppError)) throw error;
|
|
310236
|
+
contextWarnings.push({ code: "business_about_unavailable", failureCode: error.code, message: ABOUT_UNAVAILABLE });
|
|
310237
|
+
}
|
|
310238
|
+
if (about !== void 0) {
|
|
310239
|
+
businessContext.about = redact(about);
|
|
310240
|
+
await progress("business-context", businessContext);
|
|
310241
|
+
}
|
|
310242
|
+
}
|
|
309948
310243
|
return {
|
|
309949
310244
|
schemaVersion: 1,
|
|
309950
310245
|
source: {
|
|
@@ -309973,7 +310268,7 @@ async function collectOneApp(input, deps = {}) {
|
|
|
309973
310268
|
]
|
|
309974
310269
|
};
|
|
309975
310270
|
}
|
|
309976
|
-
var MIDDLEWARE, BUSINESS, TOKEN_INFO, IS_PERMITTED, INTERNAL_PERMISSION, VISITOR_SESSION, PUBLIC_CONTACT, MOBILE_CONFIG, PUBLIC_MEMBERS, MEMBER_WIDGETS, LOYALTY_SECTIONS, CONTACT_SECTIONS, SERVICES_SECTIONS, TIME_ZONE_UNAVAILABLE, MAX_RESPONSE_BYTES, TIMEOUT_MS5, UUID, LIFECYCLE_FIELDS, MEMBER_TO_BUSINESS, DEFAULT_CHAT_TYPE, CHAT_TYPE;
|
|
310271
|
+
var MIDDLEWARE, BUSINESS, TOKEN_INFO, IS_PERMITTED, INTERNAL_PERMISSION, VISITOR_SESSION, PUBLIC_CONTACT, MOBILE_CONFIG, PUBLIC_MEMBERS, MEMBER_WIDGETS, LOYALTY_SECTIONS, CONTACT_SECTIONS, SERVICES_SECTIONS, TIME_ZONE_UNAVAILABLE, ABOUT_UNAVAILABLE, MAX_RESPONSE_BYTES, TIMEOUT_MS5, UUID, LIFECYCLE_FIELDS, MEMBER_TO_BUSINESS, DEFAULT_CHAT_TYPE, CHAT_TYPE;
|
|
309977
310272
|
var init_collect = __esm({
|
|
309978
310273
|
"src/one-app/collect.ts"() {
|
|
309979
310274
|
init_define_HHP_CATALOG();
|
|
@@ -309981,6 +310276,7 @@ var init_collect = __esm({
|
|
|
309981
310276
|
init_business_address();
|
|
309982
310277
|
init_app_locale();
|
|
309983
310278
|
init_errors4();
|
|
310279
|
+
init_derive();
|
|
309984
310280
|
init_graph();
|
|
309985
310281
|
init_pages();
|
|
309986
310282
|
MIDDLEWARE = "https://manage.wix.com/_serverless/mobile-apps-editor-middleware";
|
|
@@ -309997,6 +310293,7 @@ var init_collect = __esm({
|
|
|
309997
310293
|
CONTACT_SECTIONS = /* @__PURE__ */ new Set(["platform_general_contact_section", "platform_general_contact_section_bp"]);
|
|
309998
310294
|
SERVICES_SECTIONS = /* @__PURE__ */ new Set(["bookings_services_list_section"]);
|
|
309999
310295
|
TIME_ZONE_UNAVAILABLE = "Business time zone is unverified. Leave `businessTimeZone` out of provisioning: a course whose session times carry no offset then shows no Ended label, and no zone is guessed.";
|
|
310296
|
+
ABOUT_UNAVAILABLE = "The site description is unavailable. `himi one-app provision` leaves the About screen as the template ships it; never fill it with invented copy.";
|
|
310000
310297
|
MAX_RESPONSE_BYTES = 8e6;
|
|
310001
310298
|
TIMEOUT_MS5 = 3e4;
|
|
310002
310299
|
UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -313275,202 +313572,6 @@ var init_site_properties = __esm({
|
|
|
313275
313572
|
}
|
|
313276
313573
|
});
|
|
313277
313574
|
|
|
313278
|
-
// src/site-analyze/derive.ts
|
|
313279
|
-
function aboutFromCrawl(about, crawlComplete) {
|
|
313280
|
-
const text32 = bounded(oneLine2(about), ABOUT_MAX_LENGTH);
|
|
313281
|
-
if (!text32 && !crawlComplete) return void 0;
|
|
313282
|
-
return text32;
|
|
313283
|
-
}
|
|
313284
|
-
function deriveAppName(ctx, override) {
|
|
313285
|
-
return clean3(override) || clean3(ctx.identity.businessName) || clean3(ctx.identity.siteDisplayName) || "My Business";
|
|
313286
|
-
}
|
|
313287
|
-
function deriveIconSource(ctx) {
|
|
313288
|
-
return clean3(ctx.brand.logo) || null;
|
|
313289
|
-
}
|
|
313290
|
-
function deriveVerticals(ctx) {
|
|
313291
|
-
const requested = new Set(ctx.content.installedVerticals);
|
|
313292
|
-
return KNOWN_VERTICALS.filter((v2) => requested.has(v2));
|
|
313293
|
-
}
|
|
313294
|
-
function unusableIdentifier(value2, max) {
|
|
313295
|
-
if (typeof value2 !== "string" || value2 === "") return "missing";
|
|
313296
|
-
if (value2 !== value2.trim()) {
|
|
313297
|
-
return "is surrounded by whitespace, which the manifest parser strips \u2014 the app would query a different id";
|
|
313298
|
-
}
|
|
313299
|
-
if (HAS_CONTROL_CHAR.test(value2)) {
|
|
313300
|
-
return "contains control characters, and removing them would name a different collection";
|
|
313301
|
-
}
|
|
313302
|
-
if (value2.length > max) return `is longer than ${max} characters`;
|
|
313303
|
-
return null;
|
|
313304
|
-
}
|
|
313305
|
-
function deriveAdoptedCmsCollections(cms) {
|
|
313306
|
-
const collections2 = [];
|
|
313307
|
-
const dropped = [];
|
|
313308
|
-
const seen = /* @__PURE__ */ new Set();
|
|
313309
|
-
for (const collection of cms) {
|
|
313310
|
-
const label4 = typeof collection.id === "string" ? collection.id.trim().slice(0, 60) : "";
|
|
313311
|
-
if (!label4) continue;
|
|
313312
|
-
if (collection.ownerAppId) {
|
|
313313
|
-
dropped.push({ id: label4, reason: "owned by a Wix app \u2014 its own vertical covers it" });
|
|
313314
|
-
continue;
|
|
313315
|
-
}
|
|
313316
|
-
const readRole = collection.readRole;
|
|
313317
|
-
if (readRole !== "ANYONE") {
|
|
313318
|
-
dropped.push({
|
|
313319
|
-
id: label4,
|
|
313320
|
-
reason: readRole === "SITE_MEMBER" || readRole === "SITE_MEMBER_AUTHOR" ? `read permission "${readRole}" \u2014 member-only rows would be cached unencrypted on the device and served to a later visitor` : `read permission ${readRole ? `"${readRole}"` : "unknown"} \u2014 a shipped app can only read ANYONE`
|
|
313321
|
-
});
|
|
313322
|
-
continue;
|
|
313323
|
-
}
|
|
313324
|
-
const idProblem = unusableIdentifier(collection.id, ID_MAX);
|
|
313325
|
-
if (idProblem) {
|
|
313326
|
-
dropped.push({ id: shown2(collection.id), reason: `id ${idProblem}` });
|
|
313327
|
-
continue;
|
|
313328
|
-
}
|
|
313329
|
-
const id = collection.id;
|
|
313330
|
-
if (seen.has(id)) {
|
|
313331
|
-
dropped.push({ id: label4, reason: "duplicate id" });
|
|
313332
|
-
continue;
|
|
313333
|
-
}
|
|
313334
|
-
const fields2 = collection.fields.flatMap((field) => {
|
|
313335
|
-
if (field.systemField || field.encrypted) return [];
|
|
313336
|
-
if (unusableIdentifier(field.key, ID_MAX)) return [];
|
|
313337
|
-
const key4 = field.key;
|
|
313338
|
-
return [{
|
|
313339
|
-
key: key4,
|
|
313340
|
-
// `key.slice(NAME_MAX)`, not bare `key`: a field key may be up to `ID_MAX`, and the
|
|
313341
|
-
// manifest caps a display NAME at `NAME_MAX`. Falling back to the whole key would
|
|
313342
|
-
// emit a name the shell's parser refuses, which fails open to the shell's own
|
|
313343
|
-
// collections — the silent restoration this whole function exists to prevent.
|
|
313344
|
-
displayName: plain4(field.displayName, NAME_MAX) || key4.slice(0, NAME_MAX),
|
|
313345
|
-
type: (plain4(field.type, TYPE_MAX) || "TEXT").toUpperCase()
|
|
313346
|
-
}];
|
|
313347
|
-
});
|
|
313348
|
-
const requested = collection.displayField;
|
|
313349
|
-
const displayField = fields2.some((field) => field.key === requested) ? requested : fields2[0]?.key;
|
|
313350
|
-
if (!displayField) {
|
|
313351
|
-
dropped.push({ id: label4, reason: "no readable field to show as a row title" });
|
|
313352
|
-
continue;
|
|
313353
|
-
}
|
|
313354
|
-
seen.add(id);
|
|
313355
|
-
collections2.push({
|
|
313356
|
-
id,
|
|
313357
|
-
displayName: plain4(collection.displayName, NAME_MAX) || id.slice(0, NAME_MAX),
|
|
313358
|
-
displayField,
|
|
313359
|
-
readRole,
|
|
313360
|
-
fields: fields2
|
|
313361
|
-
});
|
|
313362
|
-
}
|
|
313363
|
-
return { collections: collections2, dropped };
|
|
313364
|
-
}
|
|
313365
|
-
function deriveTailoring(ctx, overrides = {}, revision = "site-derived") {
|
|
313366
|
-
const appName2 = deriveAppName(ctx, overrides.appName);
|
|
313367
|
-
const supportUrl = clean3(overrides.supportUrl) || clean3(ctx.url.primary);
|
|
313368
|
-
const privacyUrl = clean3(overrides.privacyUrl);
|
|
313369
|
-
const termsUrl = clean3(overrides.termsUrl);
|
|
313370
|
-
const missing4 = [];
|
|
313371
|
-
if (!supportUrl) missing4.push("supportUrl");
|
|
313372
|
-
if (!privacyUrl) missing4.push("privacyUrl");
|
|
313373
|
-
if (!termsUrl) missing4.push("termsUrl");
|
|
313374
|
-
const provisioning = {
|
|
313375
|
-
version: 1,
|
|
313376
|
-
siteId: ctx.siteId,
|
|
313377
|
-
revision,
|
|
313378
|
-
installedVerticals: deriveVerticals(ctx),
|
|
313379
|
-
// PRESENT AND EMPTY, never absent. `WixSiteContext` carries no CMS chapter, so this base
|
|
313380
|
-
// overlay knows of no readable collection — and an ABSENT key is not that statement, it
|
|
313381
|
-
// is "inherit whatever the shell has", which pointed a customer's app at the shell's demo
|
|
313382
|
-
// collection (#2341). `runSiteAnalyze` replaces this with the site's own, also possibly
|
|
313383
|
-
// empty; either way the key exists and the shell's list never survives the merge.
|
|
313384
|
-
cmsCollections: [],
|
|
313385
|
-
identity: {
|
|
313386
|
-
appName: appName2,
|
|
313387
|
-
businessName: clean3(ctx.identity.businessName) || appName2,
|
|
313388
|
-
tagline: clean3(overrides.tagline) || clean3(ctx.identity.description),
|
|
313389
|
-
// Present even when empty: an absent key would inherit the shell's About text. `analyzeSite`
|
|
313390
|
-
// fills it from the crawl's About section (`aboutFromCrawl`), or drops the key when the crawl
|
|
313391
|
-
// could not tell. The description already shows as the tagline.
|
|
313392
|
-
about: "",
|
|
313393
|
-
// "" means UNKNOWN here, with `missing` above as the signal — the published overlay's
|
|
313394
|
-
// documented shape. Keeping an unknown url out of a MERGE is `apply.ts`'s job, at the
|
|
313395
|
-
// seam where an empty string would otherwise beat the shell's committed value.
|
|
313396
|
-
supportUrl,
|
|
313397
|
-
privacyUrl,
|
|
313398
|
-
termsUrl
|
|
313399
|
-
}
|
|
313400
|
-
};
|
|
313401
|
-
return { appName: appName2, iconSource: deriveIconSource(ctx), provisioning, missing: missing4 };
|
|
313402
|
-
}
|
|
313403
|
-
function bounded(s5, max) {
|
|
313404
|
-
if (s5.length <= max) return s5;
|
|
313405
|
-
const cut2 = s5.slice(0, max - 1).replace(/[\uD800-\uDBFF]$/, "");
|
|
313406
|
-
const space = cut2.lastIndexOf(" ");
|
|
313407
|
-
return `${(space > max * 0.6 ? cut2.slice(0, space) : cut2).trimEnd()}\u2026`;
|
|
313408
|
-
}
|
|
313409
|
-
function deriveStaticFaq(faq) {
|
|
313410
|
-
if (!Array.isArray(faq)) return [];
|
|
313411
|
-
const out2 = [];
|
|
313412
|
-
const seen = /* @__PURE__ */ new Set();
|
|
313413
|
-
for (const raw of faq) {
|
|
313414
|
-
if (out2.length >= STATIC_FAQ_LIMITS.pairs) break;
|
|
313415
|
-
const pair = raw && typeof raw === "object" ? raw : {};
|
|
313416
|
-
const q4 = bounded(oneLine2(pair.q), STATIC_FAQ_LIMITS.question);
|
|
313417
|
-
const a3 = bounded(oneLine2(pair.a), STATIC_FAQ_LIMITS.answer);
|
|
313418
|
-
if (!q4 || !a3 || seen.has(q4.toLowerCase())) continue;
|
|
313419
|
-
seen.add(q4.toLowerCase());
|
|
313420
|
-
out2.push({ q: q4, a: a3 });
|
|
313421
|
-
}
|
|
313422
|
-
return out2;
|
|
313423
|
-
}
|
|
313424
|
-
function deriveStaticGalleries(pages2) {
|
|
313425
|
-
if (!Array.isArray(pages2)) return [];
|
|
313426
|
-
const galleries = [];
|
|
313427
|
-
const seenPhotoSets = /* @__PURE__ */ new Set();
|
|
313428
|
-
let totalPhotos = 0;
|
|
313429
|
-
for (const raw of pages2) {
|
|
313430
|
-
if (galleries.length >= STATIC_GALLERY_LIMITS.galleries || totalPhotos >= STATIC_GALLERY_LIMITS.totalPhotos) break;
|
|
313431
|
-
const page = raw && typeof raw === "object" ? raw : {};
|
|
313432
|
-
if (!Array.isArray(page.galleryImageUrls)) continue;
|
|
313433
|
-
const photos = [];
|
|
313434
|
-
for (const image of page.galleryImageUrls) {
|
|
313435
|
-
if (photos.length >= STATIC_GALLERY_LIMITS.photos || totalPhotos + photos.length >= STATIC_GALLERY_LIMITS.totalPhotos) break;
|
|
313436
|
-
if (typeof image !== "string") continue;
|
|
313437
|
-
const match = /^https:\/\/static\.wixstatic\.com\/media\/([A-Za-z0-9_~.-]+)(?:\/.*)?$/.exec(image);
|
|
313438
|
-
if (!match) continue;
|
|
313439
|
-
const url = `https://static.wixstatic.com/media/${match[1]}`;
|
|
313440
|
-
if (!photos.includes(url)) photos.push(url);
|
|
313441
|
-
}
|
|
313442
|
-
if (!photos.length) continue;
|
|
313443
|
-
const photoSet = photos.join("\n");
|
|
313444
|
-
if (seenPhotoSets.has(photoSet)) continue;
|
|
313445
|
-
seenPhotoSets.add(photoSet);
|
|
313446
|
-
totalPhotos += photos.length;
|
|
313447
|
-
const heading = Array.isArray(page.headings) ? page.headings.find((h2) => typeof h2 === "string" && !!h2.trim()) : void 0;
|
|
313448
|
-
const pageTitle = typeof page.title === "string" ? page.title.split(/\s+[|–—]\s+/)[0] : "";
|
|
313449
|
-
const title = bounded(oneLine2(page.role === "gallery" ? pageTitle || heading || "Gallery" : "Gallery"), STATIC_GALLERY_LIMITS.title);
|
|
313450
|
-
galleries.push({ id: `site-gallery-${galleries.length + 1}`, title, photos });
|
|
313451
|
-
}
|
|
313452
|
-
return galleries;
|
|
313453
|
-
}
|
|
313454
|
-
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;
|
|
313455
|
-
var init_derive = __esm({
|
|
313456
|
-
"src/site-analyze/derive.ts"() {
|
|
313457
|
-
init_define_HHP_CATALOG();
|
|
313458
|
-
init_types2();
|
|
313459
|
-
clean3 = (s5) => (s5 ?? "").trim();
|
|
313460
|
-
ABOUT_MAX_LENGTH = 1e3;
|
|
313461
|
-
ID_MAX = 256;
|
|
313462
|
-
NAME_MAX = 120;
|
|
313463
|
-
TYPE_MAX = 80;
|
|
313464
|
-
CONTROL_CHARS2 = /[\u0000-\u001F\u007F]/g;
|
|
313465
|
-
HAS_CONTROL_CHAR = /[\u0000-\u001F\u007F]/;
|
|
313466
|
-
plain4 = (value2, max) => (value2 ?? "").replace(CONTROL_CHARS2, "").trim().slice(0, max);
|
|
313467
|
-
shown2 = (value2) => (typeof value2 === "string" ? JSON.stringify(value2) : String(value2)).slice(0, 64);
|
|
313468
|
-
STATIC_FAQ_LIMITS = { pairs: 20, question: 200, answer: 1500 };
|
|
313469
|
-
oneLine2 = (s5) => typeof s5 === "string" ? s5.replace(/[\u0000-\u001F\u007F\s]+/g, " ").trim() : "";
|
|
313470
|
-
STATIC_GALLERY_LIMITS = { galleries: 10, photos: 50, totalPhotos: 50, title: 120 };
|
|
313471
|
-
}
|
|
313472
|
-
});
|
|
313473
|
-
|
|
313474
313575
|
// src/site-analyze/copy.ts
|
|
313475
313576
|
function pathOf(url) {
|
|
313476
313577
|
try {
|
|
@@ -314128,7 +314229,7 @@ async function readMobileApp(fetchImpl, auth, deps = {}) {
|
|
|
314128
314229
|
try {
|
|
314129
314230
|
const collected = await collectOneApp(
|
|
314130
314231
|
{ metaSiteId: auth.msid, appInstance: "branded", authorization: auth.current ? await auth.current() : auth.token },
|
|
314131
|
-
{ fetchImpl, timeoutMs: deps.timeoutMs ?? TIMEOUT_MS8, pages: false, inbox: false }
|
|
314232
|
+
{ fetchImpl, timeoutMs: deps.timeoutMs ?? TIMEOUT_MS8, pages: false, inbox: false, about: false }
|
|
314132
314233
|
);
|
|
314133
314234
|
const catalog4 = deps.catalog?.size ? deps.catalog : loadSectionCatalog();
|
|
314134
314235
|
const summary2 = summarizeStructure(collected.rawStructure, catalog4);
|
|
@@ -828,7 +828,12 @@ Apply these interpretation rules:
|
|
|
828
828
|
`himi_services`, `himi_service` and `himi_time` (a value it could not verify stays as the template ships it;
|
|
829
829
|
nothing is invented). It writes the business name into `config.ts`'s `name` and over the slug `himi init` baked
|
|
830
830
|
into displayed names (display slots only, never ids or URLs; a name you chose is kept), so the normal flow needs
|
|
831
|
-
no `validate-identity --fix`. It
|
|
831
|
+
no `validate-identity --fix`. It writes the About screen's text (`himi_app_info`) from
|
|
832
|
+
`businessContext.about`: the site's own description, which collection reads from the same public, site-bound Visitor
|
|
833
|
+
properties (blank lines separate paragraphs). The template's demo text never ships: a site with no description (`""`)
|
|
834
|
+
gets none (the output's `about` says `set`, `removed` or `unchanged`). A description that could not be read
|
|
835
|
+
(`business_about_unavailable`, or evidence from an older CLI) is unknown, so nothing is written (`unverified`), and
|
|
836
|
+
About text that is not the template's demo is someone's own copy and is `kept`. Never write invented About copy. It states the bottom bar as native (`navigation.tabBar.presentation: "native"`; an
|
|
832
837
|
explicit `"kit"` is kept; the output's `tabBar` reports `set`, `unchanged` or `absent`). When the collection
|
|
833
838
|
recorded `memberChat: true` (never a guess), it opens the member Inbox from every baked door (the top-bar chat
|
|
834
839
|
action, the drawer's Inbox item, the chat thread's parent and "Back to inbox", the Profile link) if the scaffold
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2050.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": "
|
|
85
|
+
"falconPackageHash": "927cf3d35bac7545d0ad2ce91e8d7119e3de98bf521cdaae2d7029bb"
|
|
86
86
|
}
|