@wix/himalaya-cli 0.1155.0 → 0.1157.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 +16 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +14 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/provisioning-facts.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +8 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/wix-push-links.d.ts +81 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +8 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +13 -3
- package/dist/cli.mjs +2227 -1610
- package/guides/getting-started.md +3 -2
- package/guides/himi-skill.md +3 -2
- package/guides/push-cli-onboarding.md +82 -12
- package/guides/wix-site-to-himi-app.md +5 -0
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ import type { IncomingMessage, ServerResponse } from "node:http";
|
|
|
2
2
|
import type { DerivedAppMeta } from "./app-module.js";
|
|
3
3
|
import { type WixCachePolicy } from "./wix-cache-policy.js";
|
|
4
4
|
import type { WixMockRule } from "./wix-gateway.js";
|
|
5
|
+
import { type UnmappedPushDestination } from "../../ts/src/wix-push-links.js";
|
|
5
6
|
import type { PushConfig, FlagConfig, AppControl, TabBarConfig, DrawerConfig, SidebarConfig, SplashConfig, LocaleConfig, NavKind, OrientationConfig, StreamPolicy } from "@wix/himalaya/core";
|
|
6
7
|
export type { PushConfig, FlagConfig, AppControl, TabBarConfig, DrawerConfig, SidebarConfig, SplashConfig, LocaleConfig, NavKind, OrientationConfig, StreamPolicy };
|
|
7
8
|
export interface DeepLinkPattern {
|
|
@@ -214,6 +215,21 @@ export interface NavBundleContext {
|
|
|
214
215
|
serverBaseUrl: string;
|
|
215
216
|
bundleIntegrity(bundleName: string): string | null;
|
|
216
217
|
}
|
|
218
|
+
/** The push block an app serves, and what a derived route table could not cover. */
|
|
219
|
+
export interface ServedPush {
|
|
220
|
+
push?: import("@wix/himalaya/core").PushConfig;
|
|
221
|
+
/** True when `routes` were derived rather than authored. */
|
|
222
|
+
derived: boolean;
|
|
223
|
+
unmapped: UnmappedPushDestination[];
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The app's push block with its notification routes filled in, when the author opted into Wix
|
|
227
|
+
* push (`payloadAdapter: "wix-ping"`), wrote no `routes` of their own, and the package records its
|
|
228
|
+
* site's verticals (`derivesWixPushRoutes`). Routes then come from those verticals and the screens the router can open,
|
|
229
|
+
* so a build after adding a screen picks it up with no other step. Authored routes — an empty
|
|
230
|
+
* list included — are the author's, and are served untouched.
|
|
231
|
+
*/
|
|
232
|
+
export declare function derivePushForApp(app: DerivedAppMeta, linkableScreens?: readonly LinkableScreen[]): ServedPush;
|
|
217
233
|
export declare function deriveNavigationConfig(app: DerivedAppMeta, bundleCtx?: NavBundleContext): NavigationConfig;
|
|
218
234
|
export interface AppConfigDocument {
|
|
219
235
|
config: NavigationConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppConfig, AppConfigLike, FunctionsAppConfig } from "@wix/himalaya/core";
|
|
1
|
+
import type { AppConfig, AppConfigLike, FunctionsAppConfig, PushConfig } from "@wix/himalaya/core";
|
|
2
2
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
3
3
|
import type { ActionHandler } from "./actions/types.js";
|
|
4
4
|
import type { ScreenDescriptor } from "./builder.js";
|
|
@@ -175,8 +175,15 @@ export interface DerivedAppMeta {
|
|
|
175
175
|
urlScheme: string;
|
|
176
176
|
/** Forwarded from AppConfig.cache: the app's declared Wix read cache rules (#3450 follow-up). */
|
|
177
177
|
cache?: import("@wix/himalaya/core").AppCacheConfig;
|
|
178
|
-
/** Forwarded from AppConfig.push for the OTA app-config channel
|
|
178
|
+
/** Forwarded from AppConfig.push for the OTA app-config channel, minus the authoring-only
|
|
179
|
+
* `screens` map, which is carried separately below and never served. */
|
|
179
180
|
push?: import("@wix/himalaya/core").PushConfig;
|
|
181
|
+
/** AppConfig.push.screens — which screen each Wix notification destination opens, for the
|
|
182
|
+
* routes `deriveNavigationConfig` derives when the app wrote none. */
|
|
183
|
+
pushScreens?: PushConfig["screens"];
|
|
184
|
+
/** `provisioning.json` `installedVerticals` — the site's verticals, which decide which Wix
|
|
185
|
+
* notification destinations a derived route table covers. Read from disk at load time. */
|
|
186
|
+
installedVerticals?: string[];
|
|
180
187
|
/** Forwarded from AppConfig.control for the OTA app-config channel. */
|
|
181
188
|
control?: import("@wix/himalaya/core").AppControl;
|
|
182
189
|
/** Forwarded from AppConfig.appLinkHosts for the OTA app-config channel. */
|
|
@@ -270,7 +277,8 @@ export interface DerivedAppMeta {
|
|
|
270
277
|
/** Android App-Links identity for /.well-known/assetlinks.json. */
|
|
271
278
|
androidAssetLinks?: import("@wix/himalaya/core").AndroidAssetLinks;
|
|
272
279
|
}
|
|
273
|
-
/** `platforms` is the app's parsed `platforms.json` (RFC 0051 surface envelope)
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
|
|
280
|
+
/** `platforms` is the app's parsed `platforms.json` (RFC 0051 surface envelope), and
|
|
281
|
+
* `provisioning` the facts read from its `provisioning.json`. Both are passed IN rather than
|
|
282
|
+
* read here because this module is types-only by design — the readers live in loader.ts and
|
|
283
|
+
* provisioning-facts.ts, which already touch the filesystem. */
|
|
284
|
+
export declare function deriveAppMeta(name: string, m: AppDevModule, platforms?: Record<string, boolean>, provisioning?: import("./provisioning-facts.js").ProvisioningFacts): DerivedAppMeta;
|
|
@@ -137,6 +137,8 @@ export interface WebViewConfig {
|
|
|
137
137
|
coverBandColor?: string;
|
|
138
138
|
hideWixAds?: boolean;
|
|
139
139
|
hideHostedSiteFooter?: boolean;
|
|
140
|
+
sessionBridge?: boolean;
|
|
141
|
+
hostedSiteAdapter?: "" | "wix" | "base44";
|
|
140
142
|
}
|
|
141
143
|
export declare function vstack(props: {
|
|
142
144
|
spacing?: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ProvisioningFacts {
|
|
2
|
+
siteId?: string;
|
|
3
|
+
installedVerticals?: string[];
|
|
4
|
+
}
|
|
5
|
+
/** `<dir>/provisioning.json`'s site and verticals. A missing or unreadable file, or a field of
|
|
6
|
+
* the wrong type, reads as absent: the file is a build input, never a reason to fail one. */
|
|
7
|
+
export declare function readProvisioningFacts(dir: string): ProvisioningFacts;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DesignTokens } from "./tokens.js";
|
|
2
2
|
import type { PushRoute, PushPayloadAdapter } from "./push-routes.js";
|
|
3
|
+
import type { PushScreenMapEntry } from "./wix-push-links.js";
|
|
3
4
|
import type { NavigationConfig, SplashConfig } from "./schema.js";
|
|
4
5
|
import { type LocaleConfig } from "./locale.js";
|
|
5
6
|
import { type DistributionConfig } from "./distribution.js";
|
|
@@ -7,7 +8,7 @@ import type { CmsConfig } from "./cms.js";
|
|
|
7
8
|
import { type DataResourcesConfig } from "@wix/himalaya/data-resources";
|
|
8
9
|
import type { FunctionDefinition, FunctionScheduleRecord } from "@himalaya/functions";
|
|
9
10
|
export type { CmsConfig, CmsCollectionSpec, CmsFieldSpec, WixFieldType } from "./cms.js";
|
|
10
|
-
export type { PushRoute, PushPayloadAdapter };
|
|
11
|
+
export type { PushRoute, PushPayloadAdapter, PushScreenMapEntry };
|
|
11
12
|
export type { DataResourcesConfig, KvSpec, ResourceEnvironment, ResourceScope } from "@wix/himalaya/data-resources";
|
|
12
13
|
export { WIX_FIELD_TYPES } from "./cms.js";
|
|
13
14
|
/** Wix site/environment binding used by the server-function surface. */
|
|
@@ -530,6 +531,12 @@ export interface PushConfig {
|
|
|
530
531
|
* hand-listing them, so a route can never target a screen the provisioned app
|
|
531
532
|
* does not have. Honoured by iOS + Android; the web host has no push transport. */
|
|
532
533
|
routes?: PushRoute[];
|
|
534
|
+
/** Authoring-only: which screen each Wix notification destination opens, keyed by
|
|
535
|
+
* destination id (`{ "store.order": "my_order" }`), when it is not the canonical one.
|
|
536
|
+
* With `payloadAdapter: "wix-ping"` and no `routes`, every build expands this — together
|
|
537
|
+
* with the site's `provisioning.json` verticals and the app's linkable screens — into
|
|
538
|
+
* `routes`. Never served; `himi validate` lists the destinations still unrouted. */
|
|
539
|
+
screens?: Record<string, PushScreenMapEntry>;
|
|
533
540
|
payloadAdapter?: PushPayloadAdapter;
|
|
534
541
|
/** A `tier5.<service>.<action>` dispatched on EVERY notification — receipt or tap
|
|
535
542
|
* — so a worker can keep a badge count or refresh a feed without navigating. It
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -3036,6 +3036,14 @@ export interface WebViewConfig {
|
|
|
3036
3036
|
* script, like {@link hideHostedSiteHeader}. No-op on web (cross-origin iframe).
|
|
3037
3037
|
*/
|
|
3038
3038
|
hideHostedSiteFooter?: boolean;
|
|
3039
|
+
/**
|
|
3040
|
+
* RFC 0062 §5.8 — sign the page in natively. Runs only when {@link hostedSiteAdapter} names an
|
|
3041
|
+
* adapter AND the app declares that adapter's capability; the host seeds the adapter's session
|
|
3042
|
+
* into the page's own storage at document start, on the exact {@link allowedOrigins} only.
|
|
3043
|
+
*/
|
|
3044
|
+
sessionBridge?: boolean;
|
|
3045
|
+
/** RFC 0062 §5.8 — which site adapter the host runs: `""` (none) | `"wix"` | `"base44"`. */
|
|
3046
|
+
hostedSiteAdapter?: "" | "wix" | "base44";
|
|
3039
3047
|
}
|
|
3040
3048
|
/**
|
|
3041
3049
|
* Embeddable WebView component (web-in-SDUI). WebViews have no intrinsic height,
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -1051,6 +1051,13 @@ export declare const screenDescriptorSchema: {
|
|
|
1051
1051
|
readonly hideHostedSiteFooter: {
|
|
1052
1052
|
readonly type: "boolean";
|
|
1053
1053
|
};
|
|
1054
|
+
readonly sessionBridge: {
|
|
1055
|
+
readonly type: "boolean";
|
|
1056
|
+
};
|
|
1057
|
+
readonly hostedSiteAdapter: {
|
|
1058
|
+
readonly type: "string";
|
|
1059
|
+
readonly enum: readonly ["", "wix", "base44"];
|
|
1060
|
+
};
|
|
1054
1061
|
};
|
|
1055
1062
|
};
|
|
1056
1063
|
};
|
|
@@ -2012,6 +2019,13 @@ export declare const widgetSnapshotSchema: {
|
|
|
2012
2019
|
readonly hideHostedSiteFooter: {
|
|
2013
2020
|
readonly type: "boolean";
|
|
2014
2021
|
};
|
|
2022
|
+
readonly sessionBridge: {
|
|
2023
|
+
readonly type: "boolean";
|
|
2024
|
+
};
|
|
2025
|
+
readonly hostedSiteAdapter: {
|
|
2026
|
+
readonly type: "string";
|
|
2027
|
+
readonly enum: readonly ["", "wix", "base44"];
|
|
2028
|
+
};
|
|
2015
2029
|
};
|
|
2016
2030
|
};
|
|
2017
2031
|
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { PushRoute } from "./push-routes.js";
|
|
2
|
+
/**
|
|
3
|
+
* The Ping app family a customer app's members register under. Ping treats it exactly as
|
|
4
|
+
* `WixBrandedLite`: member recipients, the site's own credentials by `filterForMetaSite`,
|
|
5
|
+
* the BRANDED link format. One constant, so a revert is a one-line change.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_PING_APP_NAME = "WixBrandedWebApp";
|
|
8
|
+
/** One place a member notification can open, and every Wix link shape that names it. */
|
|
9
|
+
export interface WixPushDestination {
|
|
10
|
+
/** `<vertical>.<thing>`, the key an author uses in `push.screens`. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** The vertical `himi site analyze` writes into `provisioning.json` `installedVerticals`. */
|
|
13
|
+
vertical: string;
|
|
14
|
+
/** Owner (`wixUser`) links live in a different Ping recipient space; none are listed yet. */
|
|
15
|
+
audience: "member";
|
|
16
|
+
/** Longest first, which is the order routes are tried in. */
|
|
17
|
+
matches: readonly string[];
|
|
18
|
+
/** The capture that names the item, filled into the screen's param. Absent ⇒ the
|
|
19
|
+
* destination is a list screen and the link carries no param. */
|
|
20
|
+
screenParam?: string;
|
|
21
|
+
/** The branded-lite screen id, which template-derived apps share. */
|
|
22
|
+
canonicalScreen: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const WIX_MEMBER_PUSH_DESTINATIONS: readonly WixPushDestination[];
|
|
25
|
+
/** `push.screens` value: the screen a destination opens, optionally with the param it reads. */
|
|
26
|
+
export type PushScreenMapEntry = string | {
|
|
27
|
+
screenId: string;
|
|
28
|
+
paramKey?: string;
|
|
29
|
+
};
|
|
30
|
+
/** A screen a route may target — the shape of a served `LinkableScreen`, loosely. */
|
|
31
|
+
export interface PushTargetScreen {
|
|
32
|
+
screenId: string;
|
|
33
|
+
paramKeys?: readonly string[];
|
|
34
|
+
}
|
|
35
|
+
export interface UnmappedPushDestination {
|
|
36
|
+
destination: string;
|
|
37
|
+
vertical: string;
|
|
38
|
+
/** `no_screen`: nothing the app can open. `screen_lacks_param`: a detail screen that
|
|
39
|
+
* declares no param key the item id can go in. `param_not_declared`: `push.screens` names a
|
|
40
|
+
* `paramKey` the screen does not declare. */
|
|
41
|
+
reason: "no_screen" | "screen_lacks_param" | "param_not_declared";
|
|
42
|
+
/** The screen that was considered, when there was one. */
|
|
43
|
+
screenId?: string;
|
|
44
|
+
/** The undeclared key, for `param_not_declared`. */
|
|
45
|
+
paramKey?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface DerivedWixPushRoutes {
|
|
48
|
+
routes: PushRoute[];
|
|
49
|
+
unmapped: UnmappedPushDestination[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Whether a build derives `routes` for this push block: the author opted into Wix links
|
|
53
|
+
* (`payloadAdapter: "wix-ping"`), declared no table of their own, and the package records its
|
|
54
|
+
* site's verticals in provisioning.json — an empty list included, since a screen the app has is
|
|
55
|
+
* routed whatever the verticals say. The build and `himi validate` both ask this, so they agree.
|
|
56
|
+
*/
|
|
57
|
+
export declare function derivesWixPushRoutes(push: {
|
|
58
|
+
payloadAdapter?: string;
|
|
59
|
+
routes?: unknown;
|
|
60
|
+
} | undefined, installedVerticals: readonly string[] | undefined): boolean;
|
|
61
|
+
/** The routes for one destination, opening `screenId` and putting the item id in `paramKey`. */
|
|
62
|
+
export declare function wixPushRoutesTo(destination: WixPushDestination, target: {
|
|
63
|
+
scheme: string;
|
|
64
|
+
screenId: string;
|
|
65
|
+
paramKey?: string;
|
|
66
|
+
}): PushRoute[];
|
|
67
|
+
/**
|
|
68
|
+
* The routes an app's screens support, and every destination its site has that the app cannot
|
|
69
|
+
* honour yet. A destination is routed only when its screen is CERTAIN — named in `map`, or the
|
|
70
|
+
* canonical id is one the app has — because a wrong screen is worse than none.
|
|
71
|
+
*
|
|
72
|
+
* The site's verticals, and the author's own `map` entries, decide only what is reported missing.
|
|
73
|
+
* A screen that is there is routed whatever the verticals say: `himi site analyze` cannot detect every vertical (it has no probe for
|
|
74
|
+
* notifications or galleries), and a route to a screen the app has can never open the wrong one.
|
|
75
|
+
*/
|
|
76
|
+
export declare function deriveWixPushRoutes(input: {
|
|
77
|
+
verticals: readonly string[];
|
|
78
|
+
scheme: string;
|
|
79
|
+
screens: readonly PushTargetScreen[];
|
|
80
|
+
map?: Readonly<Record<string, PushScreenMapEntry>>;
|
|
81
|
+
}): DerivedWixPushRoutes;
|
|
@@ -8634,7 +8634,10 @@ var screenDescriptorSchema = {
|
|
|
8634
8634
|
coverBandColor: { type: "string" },
|
|
8635
8635
|
// RFC 0062 — binary-shipped chrome hiding for a hosted site (no page script over the air).
|
|
8636
8636
|
hideWixAds: { type: "boolean" },
|
|
8637
|
-
hideHostedSiteFooter: { type: "boolean" }
|
|
8637
|
+
hideHostedSiteFooter: { type: "boolean" },
|
|
8638
|
+
// RFC 0062 §5.8 — the native session bridge (fields 47/48).
|
|
8639
|
+
sessionBridge: { type: "boolean" },
|
|
8640
|
+
hostedSiteAdapter: { type: "string", enum: ["", "wix", "base44"] }
|
|
8638
8641
|
}
|
|
8639
8642
|
}
|
|
8640
8643
|
}
|
|
@@ -13169,6 +13172,10 @@ function siteWebViewPreset(site) {
|
|
|
13169
13172
|
hideHostedSiteFooter: chrome.hideSiteFooter,
|
|
13170
13173
|
// Wix ads only exist on Wix free sites; a Base44 site never gets the Wix selectors.
|
|
13171
13174
|
hideWixAds: site.kind === "wix" && chrome.hideWixAds,
|
|
13175
|
+
// RFC 0062 §5.8 — a Base44 app is signed in natively and its session carried into the page.
|
|
13176
|
+
// The host still refuses unless the app declares the `base44` capability. Wix keeps its
|
|
13177
|
+
// item-2 bridge (not built yet), so a Wix site carries neither field.
|
|
13178
|
+
...site.kind === "base44" ? { hostedSiteAdapter: "base44", sessionBridge: true } : {},
|
|
13172
13179
|
pullToRefresh: true,
|
|
13173
13180
|
showProgressBar: true,
|
|
13174
13181
|
syncStatusBarAppearance: true,
|
|
@@ -7587,7 +7587,10 @@ var screenDescriptorSchema = {
|
|
|
7587
7587
|
coverBandColor: { type: "string" },
|
|
7588
7588
|
// RFC 0062 — binary-shipped chrome hiding for a hosted site (no page script over the air).
|
|
7589
7589
|
hideWixAds: { type: "boolean" },
|
|
7590
|
-
hideHostedSiteFooter: { type: "boolean" }
|
|
7590
|
+
hideHostedSiteFooter: { type: "boolean" },
|
|
7591
|
+
// RFC 0062 §5.8 — the native session bridge (fields 47/48).
|
|
7592
|
+
sessionBridge: { type: "boolean" },
|
|
7593
|
+
hostedSiteAdapter: { type: "string", enum: ["", "wix", "base44"] }
|
|
7591
7594
|
}
|
|
7592
7595
|
}
|
|
7593
7596
|
}
|
|
@@ -9050,7 +9053,7 @@ function isFunctionsOnlyConfig(config) {
|
|
|
9050
9053
|
function uiConfig(config) {
|
|
9051
9054
|
return config ?? {};
|
|
9052
9055
|
}
|
|
9053
|
-
function deriveAppMeta(name, m, platforms = {}) {
|
|
9056
|
+
function deriveAppMeta(name, m, platforms = {}, provisioning = {}) {
|
|
9054
9057
|
const config = m.config;
|
|
9055
9058
|
return {
|
|
9056
9059
|
surfaces: config.navigation?.surfaces,
|
|
@@ -9061,7 +9064,9 @@ function deriveAppMeta(name, m, platforms = {}) {
|
|
|
9061
9064
|
screenIds: Object.keys(m.screens.exact),
|
|
9062
9065
|
templatedPatterns: (m.screens.templated ?? []).map((t) => t.display),
|
|
9063
9066
|
urlScheme: m.urlScheme ?? config.navigation?.scheme ?? `himalaya-${name}`,
|
|
9064
|
-
push: config.push,
|
|
9067
|
+
push: servedPush(config.push),
|
|
9068
|
+
...config.push?.screens ? { pushScreens: config.push.screens } : {},
|
|
9069
|
+
...provisioning.installedVerticals ? { installedVerticals: provisioning.installedVerticals } : {},
|
|
9065
9070
|
control: config.control,
|
|
9066
9071
|
appLinkHosts: config.appLinkHosts,
|
|
9067
9072
|
tabBar: config.navigation?.tabBar,
|
|
@@ -9095,6 +9100,11 @@ function deriveAppMeta(name, m, platforms = {}) {
|
|
|
9095
9100
|
androidAssetLinks: config.androidAssetLinks
|
|
9096
9101
|
};
|
|
9097
9102
|
}
|
|
9103
|
+
function servedPush(push) {
|
|
9104
|
+
if (!push) return void 0;
|
|
9105
|
+
const { screens: _authoringOnly, ...served } = push;
|
|
9106
|
+
return served;
|
|
9107
|
+
}
|
|
9098
9108
|
|
|
9099
9109
|
// ../../core/sdui/src/screen-kit.ts
|
|
9100
9110
|
function skRect(height, id) {
|