@wix/himalaya-cli 0.1719.0 → 0.1720.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/provisioning-facts.d.ts +48 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
- package/dist/cli.mjs +205 -58
- package/guides/one-app-to-himi-app.md +23 -0
- package/package.json +2 -2
|
@@ -138,6 +138,7 @@ export interface NavigationConfig {
|
|
|
138
138
|
cashierConfig?: import("@wix/himalaya/core").CashierConfig;
|
|
139
139
|
base44Config?: import("@wix/himalaya/core").Base44Config;
|
|
140
140
|
wixIapConfig?: import("@wix/himalaya/core").WixIapConfig;
|
|
141
|
+
contract?: import("./provisioning-facts.js").ServedReleaseContract;
|
|
141
142
|
wixPlatformConfig?: WixPlatformConfig;
|
|
142
143
|
devGatewayConfig?: DevGatewayConfig;
|
|
143
144
|
dataSchema?: import("@wix/himalaya/core").DataSchemaConfig;
|
|
@@ -199,6 +199,9 @@ export interface DerivedAppMeta {
|
|
|
199
199
|
* `development-site` is not). Resolves a frog `mobileAppId` template such as Branded Lite's
|
|
200
200
|
* `brandedLite_{msid}`: the binary is bound by its Headless clientId and holds no msid. */
|
|
201
201
|
provisionedMsid?: string;
|
|
202
|
+
/** `provisioning.json`'s contract blocks for a site package (RFC 0079 §10), served as the
|
|
203
|
+
* app-config's `contract` for the dist projection. Read from disk at load time. */
|
|
204
|
+
releaseContract?: import("./provisioning-facts.js").ServedReleaseContract;
|
|
202
205
|
/** Forwarded from AppConfig.control for the OTA app-config channel. */
|
|
203
206
|
control?: import("@wix/himalaya/core").AppControl;
|
|
204
207
|
/** Forwarded from AppConfig.appLinkHosts for the OTA app-config channel. */
|
|
@@ -1,7 +1,54 @@
|
|
|
1
1
|
export interface ProvisioningFacts {
|
|
2
2
|
siteId?: string;
|
|
3
3
|
installedVerticals?: string[];
|
|
4
|
+
/** RFC 0079 §10 — the content package's contract blocks, served in its app-config as `contract`
|
|
5
|
+
* so the dist projection can read them. Present only for a package that carries a site block. */
|
|
6
|
+
contract?: ServedReleaseContract;
|
|
4
7
|
}
|
|
5
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The contract blocks a release serves in its app-config (`contract`), for serve-control's dist
|
|
10
|
+
* projection (core/serve-control/src/dist-contract.ts, `releaseContractBlocksOf` in
|
|
11
|
+
* tools/mobile-dist/dist-contract-merge.ts) — RFC 0079 §10 "Dist": a website-only release on the
|
|
12
|
+
* Branded Lite shell bakes ITS site, binding and identity, never the shell's reference ones.
|
|
13
|
+
*
|
|
14
|
+
* Copied, not validated: the projection validates every value it bakes (all or nothing) and refuses
|
|
15
|
+
* a contract that is present but invalid, so this module stays a plain reader. Only the keys below
|
|
16
|
+
* are copied — a provisioning file carries much more (location, hours, FAQ, …) that has no business
|
|
17
|
+
* in a served document.
|
|
18
|
+
*/
|
|
19
|
+
export interface ServedReleaseContract {
|
|
20
|
+
/** The site-shell `site` block (`origin`, `kind`, `pages`, …), as the package wrote it. */
|
|
21
|
+
site: Record<string, unknown>;
|
|
22
|
+
/** `bindings { wix, base44 }` and the older top-level spellings, as written: the projection folds
|
|
23
|
+
* them with the shared rule (two that disagree are refused, never resolved). */
|
|
24
|
+
bindings?: Record<string, unknown>;
|
|
25
|
+
wix?: Record<string, unknown>;
|
|
26
|
+
base44?: Record<string, unknown>;
|
|
27
|
+
/** The public identity fields the shared contract names beside `appName` (which the app-config's
|
|
28
|
+
* `name` already carries). A non-object `identity` is served AS WRITTEN, so the projection refuses
|
|
29
|
+
* it instead of quietly baking neutral values over a typo. */
|
|
30
|
+
identity?: Partial<Record<(typeof SERVED_IDENTITY_KEYS)[number], unknown>> | ServedMalformedBlock;
|
|
31
|
+
/** `branding.secondaryColor` only — the primary colour and the icon come from the release's
|
|
32
|
+
* tokens and icon. */
|
|
33
|
+
branding?: {
|
|
34
|
+
secondaryColor?: unknown;
|
|
35
|
+
} | ServedMalformedBlock;
|
|
36
|
+
/** A native app with website pages names its verticals and CMS collections beside its site. */
|
|
37
|
+
installedVerticals?: unknown[];
|
|
38
|
+
cmsCollections?: unknown[];
|
|
39
|
+
}
|
|
40
|
+
/** A block the package wrote with the wrong type (a string, a number, an array): served as written,
|
|
41
|
+
* for the projection to refuse. */
|
|
42
|
+
export type ServedMalformedBlock = string | number | boolean | unknown[];
|
|
43
|
+
/** The identity fields a release's served contract carries. */
|
|
44
|
+
export declare const SERVED_IDENTITY_KEYS: readonly ["businessName", "tagline", "supportUrl", "privacyUrl", "termsUrl"];
|
|
45
|
+
/**
|
|
46
|
+
* The served contract of a parsed provisioning document, or undefined when it carries no site
|
|
47
|
+
* block. "A site block" is decided by shape only — an object naming an `origin` and a `pages` list —
|
|
48
|
+
* so a malformed one is still SERVED and the projection refuses it, rather than this reader quietly
|
|
49
|
+
* dropping it and the build inheriting the shell's reference site. Pure.
|
|
50
|
+
*/
|
|
51
|
+
export declare function servedReleaseContractOf(raw: unknown): ServedReleaseContract | undefined;
|
|
52
|
+
/** `<dir>/provisioning.json`'s site, verticals and (for a site package) contract blocks. A missing or unreadable file, or a field of
|
|
6
53
|
* the wrong type, reads as absent: the file is a build input, never a reason to fail one. */
|
|
7
54
|
export declare function readProvisioningFacts(dir: string): ProvisioningFacts;
|
|
@@ -9602,6 +9602,7 @@ function deriveAppMeta(name, m, platforms = {}, provisioning = {}) {
|
|
|
9602
9602
|
...config.push?.screens ? { pushScreens: config.push.screens } : {},
|
|
9603
9603
|
...provisioning.installedVerticals ? { installedVerticals: provisioning.installedVerticals } : {},
|
|
9604
9604
|
...isMetaSiteId(provisioning.siteId) ? { provisionedMsid: provisioning.siteId } : {},
|
|
9605
|
+
...provisioning.contract ? { releaseContract: provisioning.contract } : {},
|
|
9605
9606
|
control: config.control,
|
|
9606
9607
|
appLinkHosts: config.appLinkHosts,
|
|
9607
9608
|
permissionCopy: config.permissionCopy,
|
package/dist/cli.mjs
CHANGED
|
@@ -4700,7 +4700,6 @@ function assertSiteShellConfig(site, opts) {
|
|
|
4700
4700
|
var SITE_LAYOUTS, SITE_SHELL_MAX_TABS, SITE_SCREEN_PREFIX, SITE_PAGE_SCREEN_ID, BASE44_ORIGINS, PAGE_ID, SITE_PAGE_NODE_ID, SITE_SCREEN_FORMS, SITE_NODE_SCREEN_RENDERER;
|
|
4701
4701
|
var init_site_shell = __esm({
|
|
4702
4702
|
"../../core/ts/src/site-shell.ts"() {
|
|
4703
|
-
"use strict";
|
|
4704
4703
|
init_define_HHP_CATALOG();
|
|
4705
4704
|
init_site_screen_form();
|
|
4706
4705
|
init_webview_embedded();
|
|
@@ -11822,6 +11821,7 @@ function deriveAppMeta(name, m2, platforms = {}, provisioning = {}) {
|
|
|
11822
11821
|
...config.push?.screens ? { pushScreens: config.push.screens } : {},
|
|
11823
11822
|
...provisioning.installedVerticals ? { installedVerticals: provisioning.installedVerticals } : {},
|
|
11824
11823
|
...isMetaSiteId(provisioning.siteId) ? { provisionedMsid: provisioning.siteId } : {},
|
|
11824
|
+
...provisioning.contract ? { releaseContract: provisioning.contract } : {},
|
|
11825
11825
|
control: config.control,
|
|
11826
11826
|
appLinkHosts: config.appLinkHosts,
|
|
11827
11827
|
permissionCopy: config.permissionCopy,
|
|
@@ -11879,6 +11879,30 @@ var init_app_module = __esm({
|
|
|
11879
11879
|
// ../../core/dev-server/src/provisioning-facts.ts
|
|
11880
11880
|
import { readFileSync as readFileSync15 } from "node:fs";
|
|
11881
11881
|
import { resolve as resolve13 } from "node:path";
|
|
11882
|
+
function servedReleaseContractOf(raw) {
|
|
11883
|
+
if (!isPlainObject(raw)) return void 0;
|
|
11884
|
+
const site = raw.site;
|
|
11885
|
+
if (!isPlainObject(site) || !("origin" in site) || !("pages" in site)) return void 0;
|
|
11886
|
+
const contract = { site: jsonCopy(site) };
|
|
11887
|
+
for (const key4 of ["bindings", "wix", "base44"]) {
|
|
11888
|
+
if (raw[key4] != null) contract[key4] = jsonCopy(raw[key4]);
|
|
11889
|
+
}
|
|
11890
|
+
if (isPlainObject(raw.identity)) {
|
|
11891
|
+
const identity = {};
|
|
11892
|
+
for (const key4 of SERVED_IDENTITY_KEYS) if (raw.identity[key4] != null) identity[key4] = jsonCopy(raw.identity[key4]);
|
|
11893
|
+
if (Object.keys(identity).length) contract.identity = identity;
|
|
11894
|
+
} else if (raw.identity != null) {
|
|
11895
|
+
contract.identity = jsonCopy(raw.identity);
|
|
11896
|
+
}
|
|
11897
|
+
if (isPlainObject(raw.branding)) {
|
|
11898
|
+
if (raw.branding.secondaryColor != null) contract.branding = { secondaryColor: jsonCopy(raw.branding.secondaryColor) };
|
|
11899
|
+
} else if (raw.branding != null) {
|
|
11900
|
+
contract.branding = jsonCopy(raw.branding);
|
|
11901
|
+
}
|
|
11902
|
+
if (Array.isArray(raw.installedVerticals)) contract.installedVerticals = jsonCopy(raw.installedVerticals);
|
|
11903
|
+
if (Array.isArray(raw.cmsCollections)) contract.cmsCollections = jsonCopy(raw.cmsCollections);
|
|
11904
|
+
return contract;
|
|
11905
|
+
}
|
|
11882
11906
|
function readProvisioningFacts(dir) {
|
|
11883
11907
|
let raw;
|
|
11884
11908
|
try {
|
|
@@ -11888,14 +11912,20 @@ function readProvisioningFacts(dir) {
|
|
|
11888
11912
|
}
|
|
11889
11913
|
if (!raw || typeof raw !== "object") return {};
|
|
11890
11914
|
const { siteId, installedVerticals } = raw;
|
|
11915
|
+
const contract = servedReleaseContractOf(raw);
|
|
11891
11916
|
return {
|
|
11892
11917
|
...typeof siteId === "string" && siteId ? { siteId } : {},
|
|
11893
|
-
...Array.isArray(installedVerticals) ? { installedVerticals: installedVerticals.filter((v2) => typeof v2 === "string") } : {}
|
|
11918
|
+
...Array.isArray(installedVerticals) ? { installedVerticals: installedVerticals.filter((v2) => typeof v2 === "string") } : {},
|
|
11919
|
+
...contract ? { contract } : {}
|
|
11894
11920
|
};
|
|
11895
11921
|
}
|
|
11922
|
+
var SERVED_IDENTITY_KEYS, isPlainObject, jsonCopy;
|
|
11896
11923
|
var init_provisioning_facts = __esm({
|
|
11897
11924
|
"../../core/dev-server/src/provisioning-facts.ts"() {
|
|
11898
11925
|
init_define_HHP_CATALOG();
|
|
11926
|
+
SERVED_IDENTITY_KEYS = ["businessName", "tagline", "supportUrl", "privacyUrl", "termsUrl"];
|
|
11927
|
+
isPlainObject = (value2) => !!value2 && typeof value2 === "object" && !Array.isArray(value2);
|
|
11928
|
+
jsonCopy = (value2) => JSON.parse(JSON.stringify(value2));
|
|
11899
11929
|
}
|
|
11900
11930
|
});
|
|
11901
11931
|
|
|
@@ -32298,6 +32328,44 @@ var init_capabilities_generated = __esm({
|
|
|
32298
32328
|
}
|
|
32299
32329
|
});
|
|
32300
32330
|
|
|
32331
|
+
// ../native-config/site-contract-fields.ts
|
|
32332
|
+
var SITE_CHROME_FLAGS, PAGE_WEBVIEW_BOOLEANS, PAGE_WEBVIEW_STRINGS, SITE_MEMBER_PAGE_KEYS, SITE_STRING_FIELDS, SITE_BOOLEAN_FIELDS;
|
|
32333
|
+
var init_site_contract_fields = __esm({
|
|
32334
|
+
"../native-config/site-contract-fields.ts"() {
|
|
32335
|
+
init_define_HHP_CATALOG();
|
|
32336
|
+
SITE_CHROME_FLAGS = ["hideSiteHeader", "hideSiteMenu", "hideSiteFooter", "hideWixAds"];
|
|
32337
|
+
PAGE_WEBVIEW_BOOLEANS = [
|
|
32338
|
+
"pullToRefresh",
|
|
32339
|
+
"showProgressBar",
|
|
32340
|
+
"hideHostedSiteHeader",
|
|
32341
|
+
"hideHostedSiteFooter",
|
|
32342
|
+
"hideHostedSiteMenu",
|
|
32343
|
+
"hideWixAds",
|
|
32344
|
+
"immersive",
|
|
32345
|
+
"keepAlive"
|
|
32346
|
+
];
|
|
32347
|
+
PAGE_WEBVIEW_STRINGS = ["loadingText", "errorTitle"];
|
|
32348
|
+
SITE_MEMBER_PAGE_KEYS = ["orders", "bookings"];
|
|
32349
|
+
SITE_STRING_FIELDS = {
|
|
32350
|
+
origin: "url",
|
|
32351
|
+
kind: "id",
|
|
32352
|
+
layout: "id",
|
|
32353
|
+
menuSource: "id",
|
|
32354
|
+
"pages[].id": "id",
|
|
32355
|
+
"pages[].title": "text",
|
|
32356
|
+
"pages[].path": "path",
|
|
32357
|
+
"pages[].icon": "id",
|
|
32358
|
+
"pages[].placement": "id",
|
|
32359
|
+
...Object.fromEntries(PAGE_WEBVIEW_STRINGS.map((key4) => [`pages[].webView.${key4}`, "text"])),
|
|
32360
|
+
...Object.fromEntries(SITE_MEMBER_PAGE_KEYS.map((key4) => [`memberPages.${key4}`, "path"]))
|
|
32361
|
+
};
|
|
32362
|
+
SITE_BOOLEAN_FIELDS = /* @__PURE__ */ new Set([
|
|
32363
|
+
...SITE_CHROME_FLAGS.map((key4) => `chrome.${key4}`),
|
|
32364
|
+
...PAGE_WEBVIEW_BOOLEANS.map((key4) => `pages[].webView.${key4}`)
|
|
32365
|
+
]);
|
|
32366
|
+
}
|
|
32367
|
+
});
|
|
32368
|
+
|
|
32301
32369
|
// ../native-config/site-contract.ts
|
|
32302
32370
|
function defaultWebSdkBundle(capabilities) {
|
|
32303
32371
|
return capabilities.length === 1 && capabilities[0] === "health" ? HEALTH_PROOF_BUNDLE : companionBundleName(capabilities);
|
|
@@ -32369,13 +32437,14 @@ var init_site_contract = __esm({
|
|
|
32369
32437
|
init_known();
|
|
32370
32438
|
init_capabilities_generated();
|
|
32371
32439
|
init_page_worker();
|
|
32440
|
+
init_site_contract_fields();
|
|
32372
32441
|
HEALTH_PROOF_BUNDLE = "himi-webview-health";
|
|
32373
32442
|
GENERATED_PREFIX = "himi-webview-page-";
|
|
32374
32443
|
}
|
|
32375
32444
|
});
|
|
32376
32445
|
|
|
32377
32446
|
// ../native-config/binding-spellings.ts
|
|
32378
|
-
function
|
|
32447
|
+
function isPlainObject2(value2) {
|
|
32379
32448
|
return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
32380
32449
|
}
|
|
32381
32450
|
function blank(value2) {
|
|
@@ -32388,10 +32457,10 @@ function sameValue(field, a3, b3) {
|
|
|
32388
32457
|
return JSON.stringify(a3) === JSON.stringify(b3);
|
|
32389
32458
|
}
|
|
32390
32459
|
function mergeBlock(key4, legacy, nested) {
|
|
32391
|
-
if (nested != null && !
|
|
32460
|
+
if (nested != null && !isPlainObject2(nested)) throw new Error(`provisioning.bindings.${key4} must be an object`);
|
|
32392
32461
|
if (legacy == null) return nested ?? void 0;
|
|
32393
32462
|
if (nested == null) return legacy;
|
|
32394
|
-
if (!
|
|
32463
|
+
if (!isPlainObject2(legacy)) return legacy;
|
|
32395
32464
|
const merged = { ...legacy };
|
|
32396
32465
|
for (const [field, value2] of Object.entries(nested)) {
|
|
32397
32466
|
if (blank(value2)) continue;
|
|
@@ -32408,7 +32477,7 @@ function mergeBlock(key4, legacy, nested) {
|
|
|
32408
32477
|
function bindingsEnvelope(input) {
|
|
32409
32478
|
const raw = input.bindings;
|
|
32410
32479
|
if (raw == null) return void 0;
|
|
32411
|
-
if (!
|
|
32480
|
+
if (!isPlainObject2(raw)) throw new Error("provisioning.bindings must be an object");
|
|
32412
32481
|
for (const key4 of Object.keys(raw)) {
|
|
32413
32482
|
if (!BINDING_KEYS.includes(key4)) {
|
|
32414
32483
|
throw new Error(`provisioning.bindings.${key4} is not a binding (allowed: ${BINDING_KEYS.join(", ")})`);
|
|
@@ -37053,6 +37122,7 @@ function deriveNavigationConfig(app2, bundleCtx) {
|
|
|
37053
37122
|
if (app2.cashier !== void 0) config.cashierConfig = app2.cashier;
|
|
37054
37123
|
if (app2.base44 !== void 0) config.base44Config = { appId: app2.base44.appId, ...app2.base44.serverUrl !== void 0 ? { serverUrl: app2.base44.serverUrl } : {} };
|
|
37055
37124
|
if (app2.wixIap !== void 0) config.wixIapConfig = app2.wixIap;
|
|
37125
|
+
if (app2.releaseContract !== void 0) config.contract = app2.releaseContract;
|
|
37056
37126
|
if (app2.wixPlatform !== void 0) config.wixPlatformConfig = app2.wixPlatform;
|
|
37057
37127
|
if (app2.devGateway !== void 0) config.devGatewayConfig = app2.devGateway;
|
|
37058
37128
|
if (app2.dataSchema !== void 0) config.dataSchema = app2.dataSchema;
|
|
@@ -37527,11 +37597,11 @@ function selectIdiomOverlay(doc, ctx = {}) {
|
|
|
37527
37597
|
];
|
|
37528
37598
|
return candidates.find((c2) => authored(overlays, c2));
|
|
37529
37599
|
}
|
|
37530
|
-
function
|
|
37600
|
+
function isPlainObject3(v2) {
|
|
37531
37601
|
return v2 !== null && typeof v2 === "object" && !Array.isArray(v2);
|
|
37532
37602
|
}
|
|
37533
37603
|
function deepMerge(base2, overlay) {
|
|
37534
|
-
if (!
|
|
37604
|
+
if (!isPlainObject3(overlay) || !isPlainObject3(base2)) return overlay;
|
|
37535
37605
|
const out2 = { ...base2 };
|
|
37536
37606
|
for (const [key4, value2] of Object.entries(overlay)) {
|
|
37537
37607
|
if (UNSAFE_KEYS.has(key4)) continue;
|
|
@@ -37543,12 +37613,12 @@ function mergeIdiomOverlay(base2, overlay) {
|
|
|
37543
37613
|
const merged = deepMerge(base2, overlay);
|
|
37544
37614
|
const baseColors = base2.colors;
|
|
37545
37615
|
const overlayColors = overlay.colors;
|
|
37546
|
-
if (
|
|
37616
|
+
if (isPlainObject3(baseColors) && isPlainObject3(overlayColors)) {
|
|
37547
37617
|
const colors = { ...merged.colors };
|
|
37548
37618
|
for (const [name, value2] of Object.entries(overlayColors)) {
|
|
37549
37619
|
if (UNSAFE_KEYS.has(name)) continue;
|
|
37550
37620
|
const was = Object.hasOwn(baseColors, name) ? baseColors[name] : void 0;
|
|
37551
|
-
if (typeof was === "string" &&
|
|
37621
|
+
if (typeof was === "string" && isPlainObject3(value2)) colors[name] = { light: was, ...value2 };
|
|
37552
37622
|
}
|
|
37553
37623
|
merged.colors = colors;
|
|
37554
37624
|
}
|
|
@@ -37565,7 +37635,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
37565
37635
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
37566
37636
|
var init_idiom = __esm({
|
|
37567
37637
|
"../../core/ts/src/idiom.ts"() {
|
|
37568
|
-
"use strict";
|
|
37569
37638
|
init_define_HHP_CATALOG();
|
|
37570
37639
|
IDIOM_CONTEXTS = {
|
|
37571
37640
|
ios: { native: ["ios"] },
|
|
@@ -178540,7 +178609,7 @@ function resolveDistBase44Binding(app2, added, binding2) {
|
|
|
178540
178609
|
if (!binding2) {
|
|
178541
178610
|
throw new DistBindingError(
|
|
178542
178611
|
"base44_binding_missing",
|
|
178543
|
-
`${app2}: this release declares base44 but its dist contract carries no Base44 binding (base44.appId beside a site of kind "base44") \u2014 the verbs would have no Base44 app to talk to, so the build stops. The serve plane
|
|
178612
|
+
`${app2}: this release declares base44 but its dist contract carries no Base44 binding (base44.appId beside a site of kind "base44") \u2014 the verbs would have no Base44 app to talk to, so the build stops. The serve plane projects one only for a release that serves a Base44 binding and a base44 site it can verify (RFC 0079 phase 6).`
|
|
178544
178613
|
);
|
|
178545
178614
|
}
|
|
178546
178615
|
const serverOk = binding2.serverUrl === void 0 || bakeableHttpsOrigin(binding2.serverUrl) === binding2.serverUrl;
|
|
@@ -178553,6 +178622,13 @@ function resolveDistBase44Binding(app2, added, binding2) {
|
|
|
178553
178622
|
`${app2}: a dist build's Base44 site must be https://<tenant>.base44.app (the session bridge writes the user's Base44 token into it), got: ${binding2.siteOrigin}`
|
|
178554
178623
|
);
|
|
178555
178624
|
}
|
|
178625
|
+
const v2 = binding2.siteVerified;
|
|
178626
|
+
if (!v2 || v2.origin !== binding2.siteOrigin || v2.appId !== binding2.appId) {
|
|
178627
|
+
throw new DistBindingError(
|
|
178628
|
+
"base44_binding_unverified",
|
|
178629
|
+
`${app2}: the Base44 binding's site ${JSON.stringify(binding2.siteOrigin)} is not verified to be app ${JSON.stringify(binding2.appId)}'s own Base44 tenant (no matching siteVerified marker from the serve plane: ${JSON.stringify(v2 ?? null)}) \u2014 the session bridge would trust it, so the build stops.`
|
|
178630
|
+
);
|
|
178631
|
+
}
|
|
178556
178632
|
return binding2;
|
|
178557
178633
|
}
|
|
178558
178634
|
function distBootInfo(dist, base44Binding) {
|
|
@@ -179758,7 +179834,7 @@ async function navIssues(dir, strict) {
|
|
|
179758
179834
|
if (captcha && captcha.code !== "captcha_auth_site_case" && !issues.some((i2) => i2.ruleCode === "push-auth-site"))
|
|
179759
179835
|
push("warning", "auth-captcha-site", captcha.message);
|
|
179760
179836
|
if (nav === void 0 || nav === null) return issues;
|
|
179761
|
-
if (!
|
|
179837
|
+
if (!isPlainObject4(nav)) {
|
|
179762
179838
|
error("nav-not-an-object", `navigation must be an object (got ${Array.isArray(nav) ? "array" : typeof nav}).`);
|
|
179763
179839
|
return issues;
|
|
179764
179840
|
}
|
|
@@ -179788,18 +179864,18 @@ async function navIssues(dir, strict) {
|
|
|
179788
179864
|
for (const key4 of ITEMS_BLOCKS) {
|
|
179789
179865
|
const block = nav[key4];
|
|
179790
179866
|
if (block === void 0) continue;
|
|
179791
|
-
if (!
|
|
179867
|
+
if (!isPlainObject4(block) || !Array.isArray(block.items)) {
|
|
179792
179868
|
error(
|
|
179793
179869
|
"nav-chrome-shape",
|
|
179794
|
-
`navigation.${key4} must be an object with an \`items\` array \u2014 \`${key4}: { items: [ \u2026 ] }\` (got ${Array.isArray(block) ? "an array" :
|
|
179870
|
+
`navigation.${key4} must be an object with an \`items\` array \u2014 \`${key4}: { items: [ \u2026 ] }\` (got ${Array.isArray(block) ? "an array" : isPlainObject4(block) ? "an object with no `items` array" : typeof block}). The server forwards this verbatim, so the shell finds no destinations and draws none.`
|
|
179795
179871
|
);
|
|
179796
179872
|
}
|
|
179797
179873
|
}
|
|
179798
|
-
if (ITEMS_BLOCKS.some((key4) =>
|
|
179874
|
+
if (ITEMS_BLOCKS.some((key4) => isPlainObject4(nav[key4]) && Array.isArray(nav[key4].items))) {
|
|
179799
179875
|
const tabIds = /* @__PURE__ */ new Set();
|
|
179800
|
-
const authoredTabs =
|
|
179876
|
+
const authoredTabs = isPlainObject4(nav.tabBar) && Array.isArray(nav.tabBar.items) ? nav.tabBar.items : [];
|
|
179801
179877
|
authoredTabs.forEach((tab, index) => {
|
|
179802
|
-
const id =
|
|
179878
|
+
const id = isPlainObject4(tab) ? tab.id : void 0;
|
|
179803
179879
|
if (typeof id !== "string" || !id.trim()) {
|
|
179804
179880
|
error("nav-tab-id-invalid", `navigation.tabBar.items[${index}].id must be a non-empty string.`);
|
|
179805
179881
|
} else if (tabIds.has(id)) {
|
|
@@ -179810,7 +179886,7 @@ async function navIssues(dir, strict) {
|
|
|
179810
179886
|
});
|
|
179811
179887
|
const ids2 = (key4) => {
|
|
179812
179888
|
const block = nav[key4];
|
|
179813
|
-
return
|
|
179889
|
+
return isPlainObject4(block) && Array.isArray(block.items) ? block.items.filter((item2) => isPlainObject4(item2) && !(key4 === "drawer" && (item2.role === "section" || item2.role === "note"))).map((item2) => item2.id).filter((id) => typeof id === "string" && !!id.trim()) : [];
|
|
179814
179890
|
};
|
|
179815
179891
|
const drawerIds = ids2("drawer");
|
|
179816
179892
|
const sidebarIds = ids2("sidebar");
|
|
@@ -179818,8 +179894,8 @@ async function navIssues(dir, strict) {
|
|
|
179818
179894
|
const platforms = readLocalPlatforms(dir);
|
|
179819
179895
|
for (const surface of PREVIEW_SURFACES) {
|
|
179820
179896
|
if (!isTargeted(surface, platforms) || surface.gate.kind === "family" || surface.gate.kind === "projection") continue;
|
|
179821
|
-
const entry =
|
|
179822
|
-
const requested =
|
|
179897
|
+
const entry = isPlainObject4(nav.surfaces) ? nav.surfaces[surface.id] : void 0;
|
|
179898
|
+
const requested = isPlainObject4(entry) ? entry.destinations : void 0;
|
|
179823
179899
|
if (requested != null && (!Array.isArray(requested) || requested.some((id) => typeof id !== "string" || !id.trim()))) {
|
|
179824
179900
|
error("nav-surface-destinations-shape", `navigation.surfaces.${surface.id}.destinations must be an array of non-empty destination IDs.`);
|
|
179825
179901
|
}
|
|
@@ -179835,7 +179911,7 @@ async function navIssues(dir, strict) {
|
|
|
179835
179911
|
for (const id of active2) destinationIds.add(id);
|
|
179836
179912
|
}
|
|
179837
179913
|
if (Array.isArray(nav.linkableScreens)) nav.linkableScreens.forEach((link3, index) => {
|
|
179838
|
-
if (!
|
|
179914
|
+
if (!isPlainObject4(link3) || link3.tabId == null || link3.tabId === "") return;
|
|
179839
179915
|
if (typeof link3.tabId !== "string" || !destinationIds.has(link3.tabId)) {
|
|
179840
179916
|
error("nav-linkable-tab-unknown", `navigation.linkableScreens[${index}].tabId ${JSON.stringify(link3.tabId)} does not name a selectable primary navigation destination on any enabled surface. Use the app's actual id (${[...destinationIds].map((id) => JSON.stringify(id)).join(", ") || "none declared"}), not a leftover template id.`);
|
|
179841
179917
|
}
|
|
@@ -179860,7 +179936,7 @@ async function navIssues(dir, strict) {
|
|
|
179860
179936
|
}
|
|
179861
179937
|
for (const message2 of navSharedIdErrors(nav)) error("nav-row-id-shadows-tab", `navigation.${message2}`);
|
|
179862
179938
|
const topBarDefault = nav.topBarDefault;
|
|
179863
|
-
if (
|
|
179939
|
+
if (isPlainObject4(topBarDefault)) {
|
|
179864
179940
|
for (const key4 of SCREEN_ONLY_TOP_BAR_KEYS) {
|
|
179865
179941
|
const value2 = topBarDefault[key4];
|
|
179866
179942
|
if (value2 === void 0 || value2 === null || value2 === "" || key4 === "scrollBehavior" && value2 === "pinned") continue;
|
|
@@ -179870,7 +179946,7 @@ async function navIssues(dir, strict) {
|
|
|
179870
179946
|
);
|
|
179871
179947
|
}
|
|
179872
179948
|
}
|
|
179873
|
-
if (
|
|
179949
|
+
if (isPlainObject4(topBarDefault)) {
|
|
179874
179950
|
const align = topBarDefault.titleAlign;
|
|
179875
179951
|
if (typeof align === "string" && align !== "" && align !== "auto") {
|
|
179876
179952
|
warn4(
|
|
@@ -179885,7 +179961,7 @@ async function navIssues(dir, strict) {
|
|
|
179885
179961
|
if (effectiveBottomTabs && !declaresOtherChrome && itemCount(nav.tabBar) === 0) {
|
|
179886
179962
|
const linkables = Array.isArray(nav.linkableScreens) ? nav.linkableScreens : [];
|
|
179887
179963
|
const topLevel = new Set(
|
|
179888
|
-
linkables.filter((s5) =>
|
|
179964
|
+
linkables.filter((s5) => isPlainObject4(s5) && !s5.parentScreenId).map((s5) => String(s5.screenId ?? ""))
|
|
179889
179965
|
);
|
|
179890
179966
|
topLevel.delete("");
|
|
179891
179967
|
if (topLevel.size > 1) {
|
|
@@ -179903,9 +179979,9 @@ async function navIssues(dir, strict) {
|
|
|
179903
179979
|
return issues;
|
|
179904
179980
|
}
|
|
179905
179981
|
function pushRouteIssues(push, nav, provisioning, warn4) {
|
|
179906
|
-
if (!
|
|
179982
|
+
if (!isPlainObject4(push) || push.payloadAdapter !== "wix-ping") return;
|
|
179907
179983
|
if (derivesWixPushRoutes(push, provisioning.installedVerticals)) return;
|
|
179908
|
-
const routes = Array.isArray(push.routes) ? push.routes.filter(
|
|
179984
|
+
const routes = Array.isArray(push.routes) ? push.routes.filter(isPlainObject4) : [];
|
|
179909
179985
|
if (routes.length === 0) {
|
|
179910
179986
|
const derivable = push.routes === void 0 ? ` Or leave push.routes out and record the site's verticals with \`himi site analyze --apply\`: the build then derives the routes from provisioning.json and the app's screens.` : "";
|
|
179911
179987
|
warn4(
|
|
@@ -179914,10 +179990,10 @@ function pushRouteIssues(push, nav, provisioning, warn4) {
|
|
|
179914
179990
|
);
|
|
179915
179991
|
return;
|
|
179916
179992
|
}
|
|
179917
|
-
const linkables =
|
|
179993
|
+
const linkables = isPlainObject4(nav) ? nav.linkableScreens : void 0;
|
|
179918
179994
|
if (!Array.isArray(linkables)) return;
|
|
179919
179995
|
const declared = new Set(
|
|
179920
|
-
linkables.filter(
|
|
179996
|
+
linkables.filter(isPlainObject4).map((s5) => String(s5.screenId ?? ""))
|
|
179921
179997
|
);
|
|
179922
179998
|
for (const route of routes) {
|
|
179923
179999
|
const screenId = /:\/\/screen\/([^?]+)/.exec(String(route.link ?? ""))?.[1];
|
|
@@ -179930,7 +180006,7 @@ function pushRouteIssues(push, nav, provisioning, warn4) {
|
|
|
179930
180006
|
}
|
|
179931
180007
|
}
|
|
179932
180008
|
function pushLinkPrefixIssues(push, provisioning, warn4) {
|
|
179933
|
-
if (!
|
|
180009
|
+
if (!isPlainObject4(push) || push.linkPrefixes === void 0) return;
|
|
179934
180010
|
if (!Array.isArray(push.linkPrefixes)) {
|
|
179935
180011
|
warn4(
|
|
179936
180012
|
"push-link-prefixes-invalid",
|
|
@@ -179975,7 +180051,7 @@ function wixLinkSpacePrefix(prefix) {
|
|
|
179975
180051
|
return adaptPayloadLink(probe2, "wix-ping").adapted && !adaptPayloadLink(probe2, "").adapted;
|
|
179976
180052
|
}
|
|
179977
180053
|
function pushScreenMapIssues(push, provisioning, warn4) {
|
|
179978
|
-
if (!
|
|
180054
|
+
if (!isPlainObject4(push) || !isPlainObject4(push.screens)) return;
|
|
179979
180055
|
const destinations2 = WIX_MEMBER_PUSH_DESTINATIONS.map((d2) => d2.id);
|
|
179980
180056
|
const unknown = Object.keys(push.screens).filter((key4) => !destinations2.includes(key4));
|
|
179981
180057
|
if (unknown.length) {
|
|
@@ -179990,9 +180066,9 @@ function pushScreenMapIssues(push, provisioning, warn4) {
|
|
|
179990
180066
|
}
|
|
179991
180067
|
}
|
|
179992
180068
|
function pushAuthIssues(push, auth, provisioning, warn4) {
|
|
179993
|
-
if (!
|
|
179994
|
-
if (
|
|
179995
|
-
const memberLogin =
|
|
180069
|
+
if (!isPlainObject4(push) || push.registrar !== "wix-ping") return;
|
|
180070
|
+
if (isPlainObject4(auth) && auth.providerId === "wix-native" && isPlainObject4(auth.config) && auth.config.mode === "owner") return;
|
|
180071
|
+
const memberLogin = isPlainObject4(auth) && auth.providerId === "wix-consumer" && isPlainObject4(auth.config) ? auth.config : void 0;
|
|
179996
180072
|
const siteId = typeof memberLogin?.siteId === "string" ? memberLogin.siteId : void 0;
|
|
179997
180073
|
const problem = !memberLogin ? "auth is not a Wix member login (WixConsumerAuthProvider), so the device never registers" : !siteId ? "auth (WixConsumerAuthProvider) names no siteId, so the device never registers" : provisioning.siteId && siteId !== provisioning.siteId ? `auth's siteId "${siteId}" is not provisioning.json's "${provisioning.siteId}", so the device registers under another site's push credentials` : void 0;
|
|
179998
180074
|
if (!problem) return;
|
|
@@ -180002,10 +180078,10 @@ function pushAuthIssues(push, auth, provisioning, warn4) {
|
|
|
180002
180078
|
);
|
|
180003
180079
|
}
|
|
180004
180080
|
function placeholderLogin(auth) {
|
|
180005
|
-
return
|
|
180081
|
+
return isPlainObject4(auth) && isPlainObject4(auth.config) && auth.config.clientId === PLACEHOLDER_CLIENT_ID;
|
|
180006
180082
|
}
|
|
180007
180083
|
function pushFamilyIssues(push, warn4) {
|
|
180008
|
-
if (!
|
|
180084
|
+
if (!isPlainObject4(push) || push.registrar !== "wix-ping" || typeof push.pingAppName !== "string") return;
|
|
180009
180085
|
const replacement = replacementPingFamily(push.pingAppName);
|
|
180010
180086
|
if (!replacement) return;
|
|
180011
180087
|
warn4(
|
|
@@ -180038,8 +180114,8 @@ function unmappedAdvisory({ destination, vertical, reason, screenId, paramKey })
|
|
|
180038
180114
|
function navSharedIdErrors(nav) {
|
|
180039
180115
|
const items = (key4) => {
|
|
180040
180116
|
const block = nav[key4];
|
|
180041
|
-
const list4 =
|
|
180042
|
-
return Array.isArray(list4) ? list4.flatMap((x2, i2) =>
|
|
180117
|
+
const list4 = isPlainObject4(block) ? block.items : void 0;
|
|
180118
|
+
return Array.isArray(list4) ? list4.flatMap((x2, i2) => isPlainObject4(x2) ? [[x2, i2]] : []) : [];
|
|
180043
180119
|
};
|
|
180044
180120
|
const tabScreens = /* @__PURE__ */ new Map();
|
|
180045
180121
|
for (const [tab] of items("tabBar")) if (typeof tab.id === "string" && !tabScreens.has(tab.id)) tabScreens.set(tab.id, tab.screenId);
|
|
@@ -180058,7 +180134,7 @@ function navSharedIdErrors(nav) {
|
|
|
180058
180134
|
}
|
|
180059
180135
|
return out2;
|
|
180060
180136
|
}
|
|
180061
|
-
var NAVIGATION_KEYS, NAV_KINDS, ITEMS_BLOCKS, SERVED_ONLY_NAV_KEYS, MISPLACED_TOP_LEVEL_KEYS, SCREEN_ONLY_TOP_BAR_KEYS,
|
|
180137
|
+
var NAVIGATION_KEYS, NAV_KINDS, ITEMS_BLOCKS, SERVED_ONLY_NAV_KEYS, MISPLACED_TOP_LEVEL_KEYS, SCREEN_ONLY_TOP_BAR_KEYS, isPlainObject4, itemCount;
|
|
180062
180138
|
var init_nav_lint = __esm({
|
|
180063
180139
|
"src/nav-lint.ts"() {
|
|
180064
180140
|
init_define_HHP_CATALOG();
|
|
@@ -180122,8 +180198,8 @@ var init_nav_lint = __esm({
|
|
|
180122
180198
|
"linkableScreens"
|
|
180123
180199
|
];
|
|
180124
180200
|
SCREEN_ONLY_TOP_BAR_KEYS = ["scrollBehavior", "dirtyPath", "visibilityPath"];
|
|
180125
|
-
|
|
180126
|
-
itemCount = (v2) =>
|
|
180201
|
+
isPlainObject4 = (v2) => typeof v2 === "object" && v2 !== null && !Array.isArray(v2);
|
|
180202
|
+
itemCount = (v2) => isPlainObject4(v2) && Array.isArray(v2.items) ? v2.items.length : 0;
|
|
180127
180203
|
}
|
|
180128
180204
|
});
|
|
180129
180205
|
|
|
@@ -254983,6 +255059,7 @@ function generateScreens(input) {
|
|
|
254983
255059
|
}));
|
|
254984
255060
|
const taken = new Set(input.takenScreenIds ?? []);
|
|
254985
255061
|
const fellBack = /* @__PURE__ */ new Set();
|
|
255062
|
+
const paramLinked = /* @__PURE__ */ new Set();
|
|
254986
255063
|
const out2 = {
|
|
254987
255064
|
screens: {},
|
|
254988
255065
|
routes: [],
|
|
@@ -255023,7 +255100,11 @@ function generateScreens(input) {
|
|
|
255023
255100
|
continue;
|
|
255024
255101
|
}
|
|
255025
255102
|
const verticals = new Set(elements.map((e2) => TEMPLATE_VERTICALS[str13(obj6(sections2[str13(e2.elementId)]).sectionDefinitionId)]));
|
|
255026
|
-
|
|
255103
|
+
const distinctLinks = elements.length > 1 && elements.every((e2) => FALLBACK_TARGETS[str13(obj6(sections2[str13(e2.elementId)]).sectionDefinitionId)]?.params) && new Set(elements.map((e2) => {
|
|
255104
|
+
const section3 = obj6(sections2[str13(e2.elementId)]);
|
|
255105
|
+
return JSON.stringify(TEMPLATE_PARAMS[str13(section3.sectionDefinitionId)]?.(section3, obj6(section3.settings)) ?? {});
|
|
255106
|
+
})).size > 1;
|
|
255107
|
+
if (verticals.size === 1 && !verticals.has(void 0) && !distinctLinks) {
|
|
255027
255108
|
const first = obj6(sections2[str13(elements[0].elementId)]);
|
|
255028
255109
|
const type2 = str13(first.sectionDefinitionId);
|
|
255029
255110
|
const params = TEMPLATE_PARAMS[type2]?.(first, obj6(first.settings));
|
|
@@ -255047,6 +255128,7 @@ function generateScreens(input) {
|
|
|
255047
255128
|
}
|
|
255048
255129
|
continue;
|
|
255049
255130
|
}
|
|
255131
|
+
for (const reason of SCREEN_ADAPTATIONS[type2]?.(obj6(first.settings)) ?? []) out2.gaps.push({ page: label4, sectionId: str13(elements[0].elementId), sectionDefinitionId: type2, reason });
|
|
255050
255132
|
out2.routes.push({ layoutItemId, label: label4, screenId: screenId2, kind: "template", ...params && Object.keys(params).length ? { params } : {} });
|
|
255051
255133
|
continue;
|
|
255052
255134
|
}
|
|
@@ -255117,12 +255199,16 @@ function generateScreens(input) {
|
|
|
255117
255199
|
const sibling = fallback.sibling ? items.find((other) => other !== layoutItemId && arr(obj6(layoutItems[other]).elements).some((e2) => str13(obj6(sections2[str13(obj6(e2).elementId)]).sectionDefinitionId) === fallback.sibling)) : void 0;
|
|
255118
255200
|
fellBack.add(`${layoutItemId}|${type2}`);
|
|
255119
255201
|
const target = `${ROUTE_PLACEHOLDER}${sibling ?? ""}|${fallback.screen}|${fallback.sibling ?? ""}`;
|
|
255120
|
-
const
|
|
255202
|
+
const values = fallback.params?.(obj6(section3.settings)) ?? {};
|
|
255203
|
+
const passed = values.categoryId !== void 0 ? { ...values, categoryActivation: sectionNodeId } : values;
|
|
255204
|
+
if (fallback.params) paramLinked.add(fallback.screen);
|
|
255205
|
+
const title = section3.showTitle === false ? "" : str13(section3.title).trim() || label4;
|
|
255121
255206
|
children2.push(vstack(`${sectionNodeId}.box`, [
|
|
255122
|
-
text22(`${sectionNodeId}.title`, title, "title3"),
|
|
255123
|
-
node(`${sectionNodeId}.all`, "Button", { title: "See All", style: "secondary", size: "md", fullWidth: true, action: { actionId: "himi.open", params: { screenId: target } } })
|
|
255207
|
+
...title ? [text22(`${sectionNodeId}.title`, title, "title3")] : [],
|
|
255208
|
+
node(`${sectionNodeId}.all`, "Button", { title: "See All", style: "secondary", size: "md", fullWidth: true, action: { actionId: "himi.open", params: { screenId: target, ...passed } } })
|
|
255124
255209
|
], 12, inset(16, 16)));
|
|
255125
255210
|
out2.gaps.push({ page: label4, sectionId, sectionDefinitionId: type2, reason: `${reasons.join("; ")}. Shown as its title and a See All link instead of the data.` });
|
|
255211
|
+
for (const reason of SCREEN_ADAPTATIONS[type2]?.(obj6(section3.settings)) ?? []) out2.gaps.push({ page: label4, sectionId, sectionDefinitionId: type2, reason });
|
|
255126
255212
|
return;
|
|
255127
255213
|
}
|
|
255128
255214
|
if (Array.isArray(built)) children2.push(...built);
|
|
@@ -255164,7 +255250,7 @@ function generateScreens(input) {
|
|
|
255164
255250
|
if (!demoted) break;
|
|
255165
255251
|
}
|
|
255166
255252
|
mergePageWorkers(out2);
|
|
255167
|
-
markSharedTemplateParams(out2);
|
|
255253
|
+
markSharedTemplateParams(out2, paramLinked);
|
|
255168
255254
|
const pointerPart = (id) => id.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
255169
255255
|
const screenOfPage = new Map(out2.routes.filter((r3) => r3.screenId).map((r3) => [r3.layoutItemId, r3.screenId]));
|
|
255170
255256
|
const mapRow = (source2, screenId) => {
|
|
@@ -255198,11 +255284,11 @@ function generateScreens(input) {
|
|
|
255198
255284
|
resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen);
|
|
255199
255285
|
return out2;
|
|
255200
255286
|
}
|
|
255201
|
-
function markSharedTemplateParams(out2) {
|
|
255287
|
+
function markSharedTemplateParams(out2, paramLinked) {
|
|
255202
255288
|
const users = /* @__PURE__ */ new Map();
|
|
255203
255289
|
for (const route of out2.routes) if (route.kind === "template" && route.screenId) users.set(route.screenId, [...users.get(route.screenId) ?? [], route]);
|
|
255204
|
-
for (const routes of users
|
|
255205
|
-
if (routes.length < 2) continue;
|
|
255290
|
+
for (const [screenId, routes] of users) {
|
|
255291
|
+
if (routes.length < 2 && !paramLinked.has(screenId)) continue;
|
|
255206
255292
|
for (const route of routes) {
|
|
255207
255293
|
if (!route.params) continue;
|
|
255208
255294
|
route.openOnly = true;
|
|
@@ -255235,7 +255321,8 @@ function resolveRoutePlaceholders(out2, fellBack, slugs, hasTabBar, pageOfScreen
|
|
|
255235
255321
|
const retarget = (tap) => {
|
|
255236
255322
|
const target = resolve116(str13(obj6(tap.params).screenId));
|
|
255237
255323
|
const tab = tabOfScreen.get(target);
|
|
255238
|
-
|
|
255324
|
+
const carries = Object.keys(obj6(tap.params)).some((key4) => key4 !== "screenId");
|
|
255325
|
+
return tab && !carries ? { actionId: "himi.tab", params: { tab } } : { ...tap, params: { ...obj6(tap.params), screenId: target } };
|
|
255239
255326
|
};
|
|
255240
255327
|
const isPlaceholderTap = (v2) => !!v2 && typeof v2 === "object" && str13(obj6(obj6(v2).params).screenId).startsWith(ROUTE_PLACEHOLDER);
|
|
255241
255328
|
const isDeadButton = (v2) => {
|
|
@@ -255340,7 +255427,7 @@ function addNavigation(out2, plan, taken) {
|
|
|
255340
255427
|
out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
|
|
255341
255428
|
out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
|
|
255342
255429
|
}
|
|
255343
|
-
var TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, TEMPLATE_PARAMS, FALLBACK_TARGETS, NO_INLINE_SECTION, ROUTE_PLACEHOLDER, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, TEMPLATE_FALLBACKS, MODULES, obj6, arr, str13, node, text22, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
|
|
255430
|
+
var 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, obj6, arr, str13, node, text22, vstack, hstack, inset, openUrl2, youtubeIdOf, DIRECT_VIDEO_FILE, dialUrl, mailUrl, BUSINESS_CHAT_SCREEN, sourceTap, HANDLERS, MERGED_PAGES_BUNDLE, chevron;
|
|
255344
255431
|
var init_generate2 = __esm({
|
|
255345
255432
|
"src/one-app/generate.ts"() {
|
|
255346
255433
|
init_define_HHP_CATALOG();
|
|
@@ -255353,17 +255440,51 @@ var init_generate2 = __esm({
|
|
|
255353
255440
|
himi_groups: ["title", "groupListLabel", "pageSize"]
|
|
255354
255441
|
};
|
|
255355
255442
|
SYSTEM_ALL_PRODUCTS_ID = "00000000-000000-000000-000000000001";
|
|
255443
|
+
collectionParams = (st2) => {
|
|
255444
|
+
const id = str13(obj6(st2.collection).id).trim();
|
|
255445
|
+
return id && id !== SYSTEM_ALL_PRODUCTS_ID ? { categoryId: id } : {};
|
|
255446
|
+
};
|
|
255356
255447
|
TEMPLATE_PARAMS = {
|
|
255357
255448
|
groups_feed_section: (_section, st2) => ({
|
|
255358
255449
|
...str13(st2.sectionTitle).trim() ? { title: str13(st2.sectionTitle).trim() } : {},
|
|
255359
255450
|
...str13(st2.openGroupListButtonText).trim() ? { groupListLabel: str13(st2.openGroupListButtonText).trim() } : {},
|
|
255360
255451
|
...Number.isInteger(st2.postNumber) ? { pageSize: st2.postNumber } : {}
|
|
255361
255452
|
}),
|
|
255362
|
-
|
|
255363
|
-
|
|
255364
|
-
|
|
255365
|
-
|
|
255366
|
-
|
|
255453
|
+
stores_products_grid_section: (_section, st2) => collectionParams(st2),
|
|
255454
|
+
stores_products_carousel_section: (_section, st2) => collectionParams(st2)
|
|
255455
|
+
};
|
|
255456
|
+
countOf2 = (value2) => typeof value2 === "string" ? /^\d+$/.test(value2) ? Number(value2) : void 0 : Number.isSafeInteger(value2) && value2 > 0 ? value2 : void 0;
|
|
255457
|
+
SCREEN_ADAPTATIONS = {
|
|
255458
|
+
upcoming_bookings_section: (st2) => [
|
|
255459
|
+
...obj6(st2.previousBookings).enabled === false ? ["the source has no previous bookings; himi_bookings has an Upcoming and a Past tab"] : [],
|
|
255460
|
+
...str13(obj6(st2.emptyState).text).trim() ? [`the source's empty text "${str13(obj6(st2.emptyState).text).trim()}" is not set on himi_bookings, which has its own`] : []
|
|
255461
|
+
],
|
|
255462
|
+
platform_paid_plans_section: (st2) => {
|
|
255463
|
+
const chosen = arr(st2.selectedPlanIds).length;
|
|
255464
|
+
return chosen ? [`the source shows only its ${chosen} chosen plan(s); himi_plans takes no plan selection and shows every plan`] : [];
|
|
255465
|
+
},
|
|
255466
|
+
groups_list_section: (st2) => {
|
|
255467
|
+
const chosen = arr(st2.groupsIds).length, max = countOf2(st2.maxGroups);
|
|
255468
|
+
return [
|
|
255469
|
+
...chosen ? [`the source shows only its ${chosen} chosen group(s); himi_groups takes no group selection and lists every group`] : [],
|
|
255470
|
+
...max !== void 0 ? [`the source shows at most ${max} group(s) and a "${str13(st2.expandButtonText).trim() || "View All"}" button; himi_groups lists every group`] : []
|
|
255471
|
+
];
|
|
255472
|
+
},
|
|
255473
|
+
faq_list_section: (st2) => {
|
|
255474
|
+
const limit = countOf2(obj6(st2.questions).NumberOfFAQs);
|
|
255475
|
+
return [
|
|
255476
|
+
...limit !== void 0 ? [`the source shows ${limit} question(s); himi_faq lists every question`] : [],
|
|
255477
|
+
...Object.keys(obj6(st2.categories)).length ? ["the source limits its questions to chosen categories; himi_faq takes no category selection and lists every category"] : []
|
|
255478
|
+
];
|
|
255479
|
+
},
|
|
255480
|
+
newBlog_postlist_carousel_full_section: (st2) => {
|
|
255481
|
+
const content = obj6(st2.contentSettings), limit = countOf2(content.postsPerCategory), category = str13(content.categoryId).trim();
|
|
255482
|
+
return [
|
|
255483
|
+
...category && category !== "all" ? [`the source shows only the posts of category ${category}; himi_blog does not open on a given category and shows every post`] : [],
|
|
255484
|
+
...content.featuredOnly === true ? ["the source shows only featured posts; himi_blog shows every post"] : [],
|
|
255485
|
+
"the source shows its posts as a carousel; himi_blog is the full post list",
|
|
255486
|
+
...limit !== void 0 ? [`the source shows only ${limit} post(s); himi_blog lists every post`] : []
|
|
255487
|
+
];
|
|
255367
255488
|
}
|
|
255368
255489
|
};
|
|
255369
255490
|
FALLBACK_TARGETS = {
|
|
@@ -255380,7 +255501,16 @@ var init_generate2 = __esm({
|
|
|
255380
255501
|
progallery_carousel_section: { screen: "himi_galleries", needsScreen: true },
|
|
255381
255502
|
achievements_participant_carousel_section: { screen: "himi_member_programs", needsScreen: true },
|
|
255382
255503
|
groups_cards_section: { screen: "himi_groups", needsScreen: true },
|
|
255383
|
-
newBlog_search_section: { screen: "himi_blog", needsScreen: true }
|
|
255504
|
+
newBlog_search_section: { screen: "himi_blog", needsScreen: true },
|
|
255505
|
+
// Sections that ARE a template screen (`TEMPLATE_VERTICALS`): on a page of other sections they keep their place as a title and a link.
|
|
255506
|
+
upcoming_bookings_section: { screen: "himi_bookings", needsScreen: true },
|
|
255507
|
+
memberships_packages_section: { screen: "himi_my_subscriptions", needsScreen: true },
|
|
255508
|
+
platform_paid_plans_section: { screen: "himi_plans", needsScreen: true },
|
|
255509
|
+
groups_list_section: { screen: "himi_groups", needsScreen: true },
|
|
255510
|
+
faq_list_section: { screen: "himi_faq", needsScreen: true },
|
|
255511
|
+
newBlog_postlist_carousel_full_section: { screen: "himi_blog", needsScreen: true },
|
|
255512
|
+
stores_products_grid_section: { screen: "himi_shop", needsScreen: true, params: collectionParams },
|
|
255513
|
+
stores_products_carousel_section: { screen: "himi_shop", needsScreen: true, params: collectionParams }
|
|
255384
255514
|
};
|
|
255385
255515
|
NO_INLINE_SECTION = "its data has no inline section yet";
|
|
255386
255516
|
ROUTE_PLACEHOLDER = "@route:";
|
|
@@ -255391,7 +255521,14 @@ var init_generate2 = __esm({
|
|
|
255391
255521
|
loyalty_status_section: "himi_loyalty",
|
|
255392
255522
|
loyalty_offering_section: "himi_loyalty",
|
|
255393
255523
|
stores_products_grid_section: "himi_shop",
|
|
255394
|
-
|
|
255524
|
+
stores_products_carousel_section: "himi_shop",
|
|
255525
|
+
bookings_services_list_section: "himi_services",
|
|
255526
|
+
upcoming_bookings_section: "himi_bookings",
|
|
255527
|
+
memberships_packages_section: "himi_my_subscriptions",
|
|
255528
|
+
platform_paid_plans_section: "himi_plans",
|
|
255529
|
+
groups_list_section: "himi_groups",
|
|
255530
|
+
faq_list_section: "himi_faq",
|
|
255531
|
+
newBlog_postlist_carousel_full_section: "himi_blog"
|
|
255395
255532
|
};
|
|
255396
255533
|
TEMPLATE_FALLBACKS = { himi_groups_feed: "himi_groups" };
|
|
255397
255534
|
MODULES = {
|
|
@@ -255603,6 +255740,16 @@ var init_generate2 = __esm({
|
|
|
255603
255740
|
achievements_participant_carousel_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "achievements_participant_carousel_section", NO_INLINE_SECTION),
|
|
255604
255741
|
groups_cards_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "groups_cards_section", NO_INLINE_SECTION),
|
|
255605
255742
|
newBlog_search_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "newBlog_search_section", NO_INLINE_SECTION),
|
|
255743
|
+
...Object.fromEntries([
|
|
255744
|
+
"upcoming_bookings_section",
|
|
255745
|
+
"memberships_packages_section",
|
|
255746
|
+
"platform_paid_plans_section",
|
|
255747
|
+
"groups_list_section",
|
|
255748
|
+
"faq_list_section",
|
|
255749
|
+
"newBlog_postlist_carousel_full_section",
|
|
255750
|
+
"stores_products_grid_section",
|
|
255751
|
+
"stores_products_carousel_section"
|
|
255752
|
+
].map((type2) => [type2, (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, type2, NO_INLINE_SECTION)])),
|
|
255606
255753
|
// One chosen group: the title and a button that opens that group (the template's group screen takes the id).
|
|
255607
255754
|
single_group_feed_section: (id, s5, st2, _i2, ctx, elementId) => {
|
|
255608
255755
|
const groupId = str13(st2.groupId);
|
|
@@ -191,6 +191,29 @@ no adaptation waiver, and this checklist must not force the disabled control on.
|
|
|
191
191
|
Data/access-dependent controls need the relevant source state; never fabricate
|
|
192
192
|
participants or derive program completion from a badge title.
|
|
193
193
|
|
|
194
|
+
### Sections whose screen already exists
|
|
195
|
+
|
|
196
|
+
`himi one-app generate` connects these sections to a screen the template already ships. It builds nothing for them:
|
|
197
|
+
a page made only of the section opens the screen as its tab, and beside other sections the page keeps the source's title
|
|
198
|
+
(only when the source shows it) and a **See All** button to the screen.
|
|
199
|
+
|
|
200
|
+
| Source section | Screen | What the section passes |
|
|
201
|
+
| --- | --- | --- |
|
|
202
|
+
| `upcoming_bookings_section` | `himi_bookings` | nothing |
|
|
203
|
+
| `memberships_packages_section` | `himi_my_subscriptions` | nothing |
|
|
204
|
+
| `platform_paid_plans_section` | `himi_plans` | nothing: the screen takes no plan selection |
|
|
205
|
+
| `groups_list_section` | `himi_groups` | nothing: no group selection or count |
|
|
206
|
+
| `faq_list_section` | `himi_faq` | nothing: no question count or category selection |
|
|
207
|
+
| `newBlog_postlist_carousel_full_section` | `himi_blog` | nothing: the screen does not open on a category |
|
|
208
|
+
| `stores_products_grid_section`, `stores_products_carousel_section` | `himi_shop` | `categoryId`: the section's collection (Wix's "All Products" collection is the shop's own All chip) |
|
|
209
|
+
|
|
210
|
+
A screen that cannot follow a setting would show more or other content than the source, so `generate` reports one **gap** per
|
|
211
|
+
such setting (a chosen plan or group list, a question or post count, a category, featured-only posts, previous bookings, an empty
|
|
212
|
+
text). Record each as an `adapted` row in the coverage ledger; never leave it unsaid. A scaffold without the screen reports
|
|
213
|
+
the section as unmapped, and `apply-navigation` keeps refusing it. A link that passes a collection opens the shop screen
|
|
214
|
+
instead of selecting its tab, so the collection arrives; the shop screen then carries no collection of its own.
|
|
215
|
+
Forum, `performance_tracker_section` and `platform_general_upcoming_section` have no screen and stay unmapped.
|
|
216
|
+
|
|
194
217
|
### Preserve section visibility across authentication
|
|
195
218
|
|
|
196
219
|
The eight member-only rows above are supported by the shared visibility recipe below;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1720.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": [
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"artifactId": "himalaya-cli"
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"falconPackageHash": "
|
|
84
|
+
"falconPackageHash": "98987669d8a14db16afd3973512e2dc5c03bb23599118c14eeee0f24"
|
|
85
85
|
}
|