@wix/himalaya-cli 0.1059.0 → 0.1061.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 +11 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +3 -8
- package/dist/cli.mjs +992 -542
- package/guides/headless-loop.md +6 -1
- package/guides/himi-test.md +17 -0
- package/guides/sdk-reference.json +1 -1
- package/guides/wix-platform-usage.md +14 -9
- package/package.json +2 -2
- package/templates/surface-showcase/dev/index.ts +3 -1
|
@@ -90,18 +90,25 @@ export interface NavigationConfig {
|
|
|
90
90
|
* offline dev seam to a REAL Wix backend call — routed through `wixApi`
|
|
91
91
|
* (WixApiCapability), so it is auto-covered by the dev-mode Wix gateway /
|
|
92
92
|
* admin inspector. Members absent / false keep the seam, so unregistered members
|
|
93
|
-
* and non-Wix apps are unaffected. `bi
|
|
94
|
-
*
|
|
95
|
-
* Best-effort: Frog
|
|
96
|
-
*
|
|
93
|
+
* and non-Wix apps are unaffected. `bi` carries the registration-specific
|
|
94
|
+
* params (Frog src/endpoint+variant).
|
|
95
|
+
* Best-effort: Frog may 4xx until a Wix App is registered — the gateway records
|
|
96
|
+
* those real errors, which is itself useful production data. */
|
|
97
97
|
export interface WixPlatformConfig {
|
|
98
98
|
/** Which cross-cutting members make REAL Wix calls (vs the offline seam). */
|
|
99
99
|
real?: {
|
|
100
100
|
bi?: boolean;
|
|
101
|
+
/** No effect: experiments and flags come from the app's served flags
|
|
102
|
+
* (`/v1/flags/<app>/assignments`), never Wix Petri. Kept so existing configs type-check. */
|
|
101
103
|
experiments?: boolean;
|
|
104
|
+
/** No effect — see `experiments`. */
|
|
102
105
|
flags?: boolean;
|
|
106
|
+
/** No effect: the translations-server lookup, Ping registration and the Jot deferred link
|
|
107
|
+
* have no route on any Wix host a himi app reaches, so they always use the seam. */
|
|
103
108
|
i18n?: boolean;
|
|
109
|
+
/** No effect — see `i18n`. */
|
|
104
110
|
ping?: boolean;
|
|
111
|
+
/** No effect — see `i18n`. */
|
|
105
112
|
deeplink?: boolean;
|
|
106
113
|
session?: boolean;
|
|
107
114
|
auth?: boolean;
|
|
@@ -41,7 +41,9 @@ export declare const flags: {
|
|
|
41
41
|
};
|
|
42
42
|
export declare const i18n: {
|
|
43
43
|
/** Resolve a translation key for the current locale; `fallback` (or the key)
|
|
44
|
-
* when unknown.
|
|
44
|
+
* when unknown. Always the native seam: `/_api/translations-server/v1/translation/<key>`
|
|
45
|
+
* has no route on any Wix host a himi app reaches (the same 404 as a made-up path, with or
|
|
46
|
+
* without a token), so `real.i18n` no longer sends it anywhere — it only ever 404ed. */
|
|
45
47
|
t(key: string, fallback?: string): Promise<string>;
|
|
46
48
|
/** Current resolved UI locale (2-letter). */
|
|
47
49
|
locale(): Promise<string>;
|
|
@@ -125,15 +125,10 @@ var flags = {
|
|
|
125
125
|
};
|
|
126
126
|
var i18n = {
|
|
127
127
|
/** Resolve a translation key for the current locale; `fallback` (or the key)
|
|
128
|
-
* when unknown.
|
|
128
|
+
* when unknown. Always the native seam: `/_api/translations-server/v1/translation/<key>`
|
|
129
|
+
* has no route on any Wix host a himi app reaches (the same 404 as a made-up path, with or
|
|
130
|
+
* without a token), so `real.i18n` no longer sends it anywhere — it only ever 404ed. */
|
|
129
131
|
async t(key, fallback) {
|
|
130
|
-
if (isMemberReal("i18n")) {
|
|
131
|
-
try {
|
|
132
|
-
const r2 = await realWix("GET", `/_api/translations-server/v1/translation/${encodeURIComponent(key)}`);
|
|
133
|
-
if (typeof r2?.translation === "string") return r2.translation;
|
|
134
|
-
} catch {
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
132
|
const r = await call("i18nTranslate", { key, fallback: fallback ?? key });
|
|
138
133
|
return r?.value ?? fallback ?? key;
|
|
139
134
|
},
|