@wix/himalaya-cli 0.1284.0 → 0.1286.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/ts/src/define-app.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/locale.d.ts +19 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +9 -1
- package/dist/cli.mjs +59 -38
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/creating-wix-sites.md +4 -0
- package/guides/sdk-reference.json +1 -1
- package/package.json +2 -2
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts
CHANGED
|
@@ -311,7 +311,8 @@ export interface AppConfig {
|
|
|
311
311
|
* `NavigationConfig.locale`. `default` must be a supported catalog tag
|
|
312
312
|
* (`en` / `he` / `es`). `pin: true` ignores the device/browser language so a
|
|
313
313
|
* Hebrew app stays RTL on an English phone. In-app `locale.set` still wins.
|
|
314
|
-
*
|
|
314
|
+
* The device/browser language is followed only when it is `default` or listed in
|
|
315
|
+
* `translations`. Omit ⇒ the app runs in English on every device.
|
|
315
316
|
*/
|
|
316
317
|
locale?: LocaleConfig;
|
|
317
318
|
/**
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/locale.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export interface LocaleConfig {
|
|
|
7
7
|
/** BCP-47 primary subtag. Must be in `SUPPORTED_LOCALES` at defineApp time;
|
|
8
8
|
* clients coerce and drop anything else. */
|
|
9
9
|
default: string;
|
|
10
|
-
/** Skip device/browser language
|
|
10
|
+
/** Skip device/browser language, even one listed in `translations`. In-app
|
|
11
|
+
* `locale.set` still wins. */
|
|
11
12
|
pin?: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* RFC 0054 — locale tags this app ships TRANSLATIONS for, beyond `default`.
|
|
@@ -17,8 +18,10 @@ export interface LocaleConfig {
|
|
|
17
18
|
* the eleven `himi init` templates shipped in. Declaring `translations` is what
|
|
18
19
|
* makes that gap reportable.
|
|
19
20
|
*
|
|
20
|
-
*
|
|
21
|
-
* (
|
|
21
|
+
* Also read by clients at runtime: the device/browser language is followed ONLY
|
|
22
|
+
* when it is `default` or listed here (see `shipsLocale`). Without this an English
|
|
23
|
+
* app on a Hebrew phone resolved `he` and painted English copy right-to-left. An
|
|
24
|
+
* older client ignores the field (invariant 6) and keeps following the device.
|
|
22
25
|
*/
|
|
23
26
|
translations?: readonly string[];
|
|
24
27
|
/**
|
|
@@ -40,13 +43,25 @@ export declare function isSupportedLocale(tag: string): tag is SupportedLocale;
|
|
|
40
43
|
export declare function coerceSupportedLocale(tag: string | undefined | null): SupportedLocale | undefined;
|
|
41
44
|
export declare function isRTL(locale: string): boolean;
|
|
42
45
|
export declare function layoutDirection(locale: string): "rtl" | "ltr";
|
|
46
|
+
/**
|
|
47
|
+
* `true` when the app ships copy in `tag`: its source locale (`default`, or `"en"` —
|
|
48
|
+
* the platform's source language — when no supported default is declared) or one of
|
|
49
|
+
* its declared `translations`.
|
|
50
|
+
*
|
|
51
|
+
* This is what decides whether the device/browser language is followed. Production
|
|
52
|
+
* serve swaps no strings by `Accept-Language`: an app only has a translation for a
|
|
53
|
+
* locale it declares, so following any other device language changes the layout
|
|
54
|
+
* direction and nothing else.
|
|
55
|
+
*/
|
|
56
|
+
export declare function shipsLocale(app: LocaleConfig | null | undefined, tag: string): boolean;
|
|
43
57
|
/**
|
|
44
58
|
* Resolve the app locale.
|
|
45
59
|
*
|
|
46
60
|
* 1. Launch override (`-himalaya.locale` / intent extra) if supported.
|
|
47
61
|
* 2. Explicit user choice (`locale.set`) when `source === "user"`.
|
|
48
62
|
* 3. If `pin && default` supported → app default (skip device).
|
|
49
|
-
* 4. Device/browser tag if
|
|
63
|
+
* 4. Device/browser tag if the app ships it (`shipsLocale`). An app with no
|
|
64
|
+
* `locale` block ships English only, so a Hebrew device does not make it RTL.
|
|
50
65
|
* 5. `app.default` if supported.
|
|
51
66
|
* 6. `"en"`.
|
|
52
67
|
*
|
|
@@ -7007,6 +7007,13 @@ function isRTL(locale) {
|
|
|
7007
7007
|
function layoutDirection(locale) {
|
|
7008
7008
|
return isRTL(locale) ? "rtl" : "ltr";
|
|
7009
7009
|
}
|
|
7010
|
+
function shipsLocale(app, tag) {
|
|
7011
|
+
const t = coerceSupportedLocale(tag);
|
|
7012
|
+
if (!t) return false;
|
|
7013
|
+
if (t === (coerceSupportedLocale(app?.default) ?? "en")) return true;
|
|
7014
|
+
const list = app?.translations;
|
|
7015
|
+
return Array.isArray(list) && list.every((x) => typeof x === "string") && list.some((x) => coerceSupportedLocale(x) === t);
|
|
7016
|
+
}
|
|
7010
7017
|
function resolveAppLocale(opts) {
|
|
7011
7018
|
const launch = coerceSupportedLocale(opts.launch);
|
|
7012
7019
|
if (launch) return launch;
|
|
@@ -7019,7 +7026,7 @@ function resolveAppLocale(opts) {
|
|
|
7019
7026
|
}
|
|
7020
7027
|
const appDefault = coerceSupportedLocale(opts.app?.default);
|
|
7021
7028
|
if (opts.app?.pin && appDefault) return appDefault;
|
|
7022
|
-
if (device) return device;
|
|
7029
|
+
if (device && shipsLocale(opts.app, device)) return device;
|
|
7023
7030
|
if (appDefault) return appDefault;
|
|
7024
7031
|
return "en";
|
|
7025
7032
|
}
|
|
@@ -13589,6 +13596,7 @@ export {
|
|
|
13589
13596
|
resolveTabBarPresentation,
|
|
13590
13597
|
screenDescriptorSchema,
|
|
13591
13598
|
selectIdiomOverlay,
|
|
13599
|
+
shipsLocale,
|
|
13592
13600
|
shouldRevealError,
|
|
13593
13601
|
siteAllowedOrigins,
|
|
13594
13602
|
siteHost,
|
package/dist/cli.mjs
CHANGED
|
@@ -3758,7 +3758,9 @@ __export(wix_owner_exports, {
|
|
|
3758
3758
|
ownerTransport: () => ownerTransport,
|
|
3759
3759
|
redactForError: () => redactForError,
|
|
3760
3760
|
resolveSiteId: () => resolveSiteId,
|
|
3761
|
+
siteApiKey: () => siteApiKey,
|
|
3761
3762
|
siteToken: () => siteToken,
|
|
3763
|
+
userSiteToken: () => userSiteToken,
|
|
3762
3764
|
withRetry: () => withRetry
|
|
3763
3765
|
});
|
|
3764
3766
|
import { spawn as spawn2 } from "node:child_process";
|
|
@@ -3772,9 +3774,23 @@ function resolveSiteId(flag) {
|
|
|
3772
3774
|
return id;
|
|
3773
3775
|
}
|
|
3774
3776
|
async function siteToken(msid, spawnImpl = spawn2) {
|
|
3777
|
+
if (!process.env.WIX_TEST_TOKEN?.trim()) {
|
|
3778
|
+
const key2 = siteApiKey();
|
|
3779
|
+
if (key2) return key2;
|
|
3780
|
+
}
|
|
3775
3781
|
return await mintToken(["token", "--site", msid], `wix token --site ${msid}`, msid, spawnImpl);
|
|
3776
3782
|
}
|
|
3783
|
+
async function userSiteToken(msid, spawnImpl = spawn2) {
|
|
3784
|
+
return await mintToken(["token", "--site", msid], `wix token --site ${msid}`, `user:${msid}`, spawnImpl);
|
|
3785
|
+
}
|
|
3786
|
+
function siteApiKey(env = process.env) {
|
|
3787
|
+
return env.WIX_API_KEY?.trim() || void 0;
|
|
3788
|
+
}
|
|
3777
3789
|
async function accountToken(spawnImpl = spawn2) {
|
|
3790
|
+
if (!process.env.WIX_TEST_TOKEN?.trim()) {
|
|
3791
|
+
const key2 = siteApiKey();
|
|
3792
|
+
if (key2) return key2;
|
|
3793
|
+
}
|
|
3778
3794
|
return await mintToken(["token"], "wix token", ACCOUNT_TOKEN_KEY, spawnImpl);
|
|
3779
3795
|
}
|
|
3780
3796
|
async function mintToken(args, label2, cacheKey, spawnImpl) {
|
|
@@ -3836,7 +3852,7 @@ function redactForError(buf) {
|
|
|
3836
3852
|
${trimmed.slice(0, 300)}` : "It printed nothing.";
|
|
3837
3853
|
}
|
|
3838
3854
|
function mintHelp(label2, detail) {
|
|
3839
|
-
return `could not run \`${label2}\` (${detail}). Install the Wix CLI and log in (\`npm i -g @wix/cli && wix login\`), or
|
|
3855
|
+
return `could not run \`${label2}\` (${detail}). Install the Wix CLI and log in (\`npm i -g @wix/cli && wix login\`), or, with no browser, export WIX_API_KEY (manage.wix.com/account/api-keys).`;
|
|
3840
3856
|
}
|
|
3841
3857
|
function ownerTransport(msid, fetchImpl = fetch, timeoutMs = DEFAULT_TIMEOUT_MS2) {
|
|
3842
3858
|
return async (method, path2, body) => {
|
|
@@ -7512,7 +7528,6 @@ function buttonVariant(style) {
|
|
|
7512
7528
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
|
|
7513
7529
|
var init_tokens = __esm({
|
|
7514
7530
|
"../../core/ts/src/tokens.ts"() {
|
|
7515
|
-
"use strict";
|
|
7516
7531
|
SYSTEM_FONT_FAMILY = "$system";
|
|
7517
7532
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
7518
7533
|
BUTTON_MIN_HIT_TARGET = 44;
|
|
@@ -7568,6 +7583,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
|
|
|
7568
7583
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
7569
7584
|
var init_bindings = __esm({
|
|
7570
7585
|
"../../core/ts/src/bindings.ts"() {
|
|
7586
|
+
"use strict";
|
|
7571
7587
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
7572
7588
|
BINDING_SIGIL_RE = new RegExp(
|
|
7573
7589
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -147496,25 +147512,25 @@ var init_preview_assets_generated = __esm({
|
|
|
147496
147512
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
147497
147513
|
init_preview_assets_format();
|
|
147498
147514
|
PREVIEW_ASSET_MANIFEST = [
|
|
147499
|
-
{ key: "assets/index-
|
|
147500
|
-
{ key: "assets/pdf-
|
|
147501
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
147502
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
147503
|
-
{ key: "assets/pdfDocument-
|
|
147504
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
147505
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
147506
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
147507
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147508
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
147509
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
147510
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147511
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
147512
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147513
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
147514
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
147515
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147516
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
147517
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
147515
|
+
{ key: "assets/index-BynCGh_e.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1233760, sha256: "d40489dde38e381b7a12a15594e20b9d6ea29bff761fc9a2a7e9b3a6825a334d" },
|
|
147516
|
+
{ key: "assets/pdf-CSx9d6Ik.js", contentType: "application/javascript; charset=utf-8", offset: 1233768, length: 488199, sha256: "5b5ef5de3805f1f6b1684ff2d5b61a10c86846262a54e5ceaf5f0691327133f0" },
|
|
147517
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1721967, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
147518
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1722040, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
147519
|
+
{ key: "assets/pdfDocument-C0FckwGm.js", contentType: "application/javascript; charset=utf-8", offset: 3039074, length: 2858, sha256: "94229686063333a7b0508e04ed86204424990a1f9c009fdb38cc92a5470bd815" },
|
|
147520
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3041932, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
147521
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3046542, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
147522
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3535126, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
147523
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3626050, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
147524
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3717034, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
147525
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3808014, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
147526
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3898886, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
147527
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3989866, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
147528
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4098502, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
147529
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4207586, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
147530
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4316634, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
147531
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4424334, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
147532
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4512442, length: 4947, sha256: "aed86e7bc0cdd626f7b05cfb4e222718f755959af62153fa7fd8253337af3e8e" },
|
|
147533
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4517389, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
147518
147534
|
];
|
|
147519
147535
|
}
|
|
147520
147536
|
});
|
|
@@ -152178,9 +152194,9 @@ async function runNotifyPing(flags, io2, deps = {}) {
|
|
|
152178
152194
|
if (ownership.state !== "owned") return refuse5(io2, `app_ownership_${ownership.state}`, "Sending requires the app owner.", 1);
|
|
152179
152195
|
let siteToken2;
|
|
152180
152196
|
try {
|
|
152181
|
-
siteToken2 = await (deps.siteToken ??
|
|
152197
|
+
siteToken2 = await (deps.siteToken ?? userSiteToken)(input.site);
|
|
152182
152198
|
} catch {
|
|
152183
|
-
return refuse5(io2, "wix_site_token_required", "Run wix login as the site owner; the site token reads this site's members.", 1);
|
|
152199
|
+
return refuse5(io2, "wix_site_token_required", "Run wix login as the site owner; the site token reads this site's members. A WIX_API_KEY cannot stand in: sending needs a Wix USER, and a key is an app.", 1);
|
|
152184
152200
|
}
|
|
152185
152201
|
if (allMembers) return runAllMembers({ input: { app: ownership.slug, site: input.site }, siteToken: siteToken2, session, requestId: requestId2, flags, io: io2, deps });
|
|
152186
152202
|
const body = {
|
|
@@ -162977,6 +162993,9 @@ __export(site_oauth_client_exports, {
|
|
|
162977
162993
|
function explainOwnerFailure(err, msid) {
|
|
162978
162994
|
if (!(err instanceof WixApiError)) return void 0;
|
|
162979
162995
|
if (err.status === 401 || err.status === 403) {
|
|
162996
|
+
if (siteApiKey() && !process.env.WIX_TEST_TOKEN?.trim()) {
|
|
162997
|
+
return `Wix refused OAuth-client access to site ${msid} (${err.status}) for WIX_API_KEY. The key lacks a permission this call needs (OAuth apps / Headless), or no access to that site. Widen it at https://manage.wix.com/account/api-keys, or create the client in the dashboard: ${DASHBOARD_BASE}/${msid}/oauth-apps-settings`;
|
|
162998
|
+
}
|
|
162980
162999
|
return `Wix refused OAuth-client access to site ${msid} (${err.status}). This is an OWNER-scoped operation: the account behind \`wix token --site ${msid}\` must own (or be a collaborator with permissions on) that site. Check \`wix whoami\`, or create the client in the dashboard: ${DASHBOARD_BASE}/${msid}/oauth-apps-settings`;
|
|
162981
163000
|
}
|
|
162982
163001
|
return void 0;
|
|
@@ -165920,9 +165939,10 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
165920
165939
|
get + store a scoped control token for push/promote
|
|
165921
165940
|
--browser: sign in with your own Wix account in a browser
|
|
165922
165941
|
(NO VPN, no BO) -> use with --target wix
|
|
165923
|
-
--wix: HEADLESS \u2014
|
|
165942
|
+
--wix: HEADLESS \u2014 presents WIX_API_KEY (a Wix account
|
|
165943
|
+
API key) or, without one, the machine's own Wix CLI
|
|
165924
165944
|
credential (\`wix login\`). No browser, no VPN, no BO.
|
|
165925
|
-
The mode for a CI pod or an agent container.
|
|
165945
|
+
The mode for a server, a CI pod or an agent container.
|
|
165926
165946
|
--dpx: Wix employee path via an existing BO session
|
|
165927
165947
|
(internal; --target bo)
|
|
165928
165948
|
himi apps [list] | claim <slug> [--display-name <n>] [--account-id <id>] [--cookie <c>]
|
|
@@ -166271,9 +166291,9 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
166271
166291
|
which is what lets a provisioned manifest stand alone
|
|
166272
166292
|
instead of depending on an exported env var.
|
|
166273
166293
|
MUTATES your Wix account: without --yes it prints the
|
|
166274
|
-
payload and sends nothing. Auth:
|
|
166275
|
-
|
|
166276
|
-
|
|
166294
|
+
payload and sends nothing. Auth: WIX_API_KEY +
|
|
166295
|
+
WIX_ACCOUNT_ID when both are set (no wix CLI needed),
|
|
166296
|
+
else account-scoped 'wix token' (no --site).
|
|
166277
166297
|
himi site list every site the account identity can reach, with its
|
|
166278
166298
|
premium flag (read-only)
|
|
166279
166299
|
himi site client ensure --site <msid> [--name <name>] [--redirect-uri <uri>] [--new]
|
|
@@ -166300,8 +166320,8 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
166300
166320
|
later complete read, moving the resolved clientId between
|
|
166301
166321
|
runs. --name cannot narrow it (the name is applied after
|
|
166302
166322
|
the rows arrive), so the recovery is the dashboard. Auth
|
|
166303
|
-
is SITE-scoped ('wix token --site
|
|
166304
|
-
owner-of-that-site.
|
|
166323
|
+
is SITE-scoped (WIX_API_KEY, else 'wix token --site
|
|
166324
|
+
<msid>'): minting is owner-of-that-site.
|
|
166305
166325
|
himi site client list --site <msid> every Headless OAuth client on the site (read-only). Act
|
|
166306
166326
|
on the 'shippable' column, not 'hasRedirect': shippable
|
|
166307
166327
|
also requires a MOBILE applicationType, because ensure
|
|
@@ -166320,7 +166340,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
166320
166340
|
names 'himi dist --shell' does; default branded-lite.
|
|
166321
166341
|
A SITE shell (brandy) also derives the site's page map
|
|
166322
166342
|
(tabs/drawer from its menu) into the overlay's \`site\`
|
|
166323
|
-
block \u2014 edit it, then --apply. Owner token:
|
|
166343
|
+
block \u2014 edit it, then --apply. Owner token: WIX_API_KEY
|
|
166324
166344
|
or 'wix token --site'. Look/screenshots need Chromium:
|
|
166325
166345
|
npx playwright install chromium.
|
|
166326
166346
|
himi site function list|get|put|publish|invoke [--site <msid>] [--url <https>] [--method GET]
|
|
@@ -166328,7 +166348,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
166328
166348
|
create/update/get/publish/invoke Velo HTTP functions on the
|
|
166329
166349
|
Wix site (backend/http-functions.js). Draft writes are not
|
|
166330
166350
|
live until publish. Not \`himi functions\` (serve-plane jobs).
|
|
166331
|
-
Owner token:
|
|
166351
|
+
Owner token: WIX_API_KEY or 'wix token --site'.
|
|
166332
166352
|
himi base44 analyze (--url <https://\u2026> | --app-id <id>) [--out <dir>] [--sample <n>] [--json]
|
|
166333
166353
|
read a Base44 app into an app book (book.json + BOOK.md,
|
|
166334
166354
|
default .himi/base44-book/). READ-ONLY. --url alone is the
|
|
@@ -166386,9 +166406,9 @@ MODES \u2014 pick by who is at the keyboard
|
|
|
166386
166406
|
has no BO issuer, which is the \`wix\` target \u2014 and \`wix\` is the default target
|
|
166387
166407
|
off-repo, so a bare \`himi login\` there is this mode. --no-open prints the URL
|
|
166388
166408
|
instead of opening it (a headless shell).
|
|
166389
|
-
--wix HEADLESS.
|
|
166390
|
-
\`wix login
|
|
166391
|
-
satisfy. It does not create a credential
|
|
166409
|
+
--wix HEADLESS. Presents WIX_API_KEY (a Wix account API key) when set, else the
|
|
166410
|
+
machine's EXISTING Wix CLI credential (\`wix login\`) \u2014 the mode a server, a CI
|
|
166411
|
+
job or an agent container can satisfy. It does not create a credential.
|
|
166392
166412
|
--dpx Wix EMPLOYEE. Reads the BO session at ~/.dpx/session/token (dpx 2.x:
|
|
166393
166413
|
\`dpx auth login\` then \`dpx auth token > ~/.dpx/session/token\`). Internal
|
|
166394
166414
|
targets only (--target bo); VPN-gated.
|
|
@@ -167462,9 +167482,9 @@ function loginModeReport(input) {
|
|
|
167462
167482
|
const noIssuer = 'the diagnosed target resolves no `ownerIssue`, so this login refuses with `no owner issuer for target "\u2026"` \u2014 use --target wix, pass --owner-issue-url, or set target.ownerIssue in serve-targets.json';
|
|
167463
167483
|
return {
|
|
167464
167484
|
wix: {
|
|
167465
|
-
available: input.hasOwnerIssuer && (input.wixTestToken || input.wixOnPath),
|
|
167485
|
+
available: input.hasOwnerIssuer && (input.wixTestToken || !!input.wixApiKey || input.wixOnPath),
|
|
167466
167486
|
interactive: false,
|
|
167467
|
-
detail: !input.hasOwnerIssuer ? noIssuer : input.wixTestToken ? "WIX_TEST_TOKEN is set, and is used before the `wix` CLI would be spawned at all" : input.wixOnPath ? "the `wix` CLI is on PATH \u2014 NOT checked: whether it is logged in (`wix login`)" : "`wix` is not on PATH \u2014 `npm i -g @wix/cli && wix login`,
|
|
167487
|
+
detail: !input.hasOwnerIssuer ? noIssuer : input.wixTestToken ? "WIX_TEST_TOKEN is set, and is used before the `wix` CLI would be spawned at all" : input.wixApiKey ? "WIX_API_KEY is set, and is presented as the account credential \u2014 no `wix` CLI needed" : input.wixOnPath ? "the `wix` CLI is on PATH \u2014 NOT checked: whether it is logged in (`wix login`)" : "`wix` is not on PATH \u2014 export WIX_API_KEY, `npm i -g @wix/cli && wix login`, or use --dpx"
|
|
167468
167488
|
},
|
|
167469
167489
|
dpx: {
|
|
167470
167490
|
// Gated on the EMPLOYEE issuer, and on the session file being there. Presence is all the
|
|
@@ -173408,7 +173428,7 @@ ${label2}`);
|
|
|
173408
173428
|
} catch (e2) {
|
|
173409
173429
|
io2.error(JSON.stringify({
|
|
173410
173430
|
error: `could not mint a Wix account token: ${e2.message}`,
|
|
173411
|
-
hint: "`himi login --wix`
|
|
173431
|
+
hint: "`himi login --wix` presents WIX_API_KEY, or else an EXISTING Wix CLI credential (it does not create one). On a server, export WIX_API_KEY (manage.wix.com/account/api-keys); otherwise log the machine in with `wix login`, then retry."
|
|
173412
173432
|
}));
|
|
173413
173433
|
return 1;
|
|
173414
173434
|
}
|
|
@@ -173872,6 +173892,7 @@ ${label2}`);
|
|
|
173872
173892
|
const loginModes = loginModeReport({
|
|
173873
173893
|
wixOnPath: executableOnPath("wix"),
|
|
173874
173894
|
wixTestToken: (process.env.WIX_TEST_TOKEN ?? "").trim().length > 0,
|
|
173895
|
+
wixApiKey: !!siteApiKey(),
|
|
173875
173896
|
dpxOnPath: executableOnPath("dpx"),
|
|
173876
173897
|
dpxSession: auth.dpxSession,
|
|
173877
173898
|
dpxPath,
|
|
Binary file
|
|
@@ -39,6 +39,10 @@ Verified: the plain account token is accepted on both `/funnel/projects/v1/creat
|
|
|
39
39
|
`WIX_API_KEY` + `WIX_ACCOUNT_ID` stay supported as a fallback for identities whose token
|
|
40
40
|
lacks the permission — both halves must be present or the key path is ignored.
|
|
41
41
|
|
|
42
|
+
On a server with no `wix login`, set both halves for step 1. Step 2 then reuses
|
|
43
|
+
`WIX_API_KEY` alone with `wix-site-id`, so the whole command runs without a browser. See
|
|
44
|
+
[wix-authentication.md → Headless](wix-authentication.md#headless--himi-on-a-server-or-in-ci-no-browser).
|
|
45
|
+
|
|
42
46
|
Note the base path oddity on step 2: it is `oauth-app/v1` (**singular**), then the
|
|
43
47
|
`oauth-apps` collection. `/headless/v1/…`, `/oauth-apps/v1/…` and a bare `/v1/…` all 404,
|
|
44
48
|
and so does `GET` on the collection — only `POST` create and `POST /query` route.
|
|
@@ -1070,7 +1070,7 @@
|
|
|
1070
1070
|
"name": "LocaleConfig",
|
|
1071
1071
|
"kind": "interface",
|
|
1072
1072
|
"jsdoc": "/** Served on the OTA app-config channel. Unknown `default` tags are ignored by\n * clients rather than failing the envelope decode. */",
|
|
1073
|
-
"decl": "export interface LocaleConfig {\n /** BCP-47 primary subtag. Must be in `SUPPORTED_LOCALES` at defineApp time;\n * clients coerce and drop anything else. */\n default: string;\n /** Skip device/browser language
|
|
1073
|
+
"decl": "export interface LocaleConfig {\n /** BCP-47 primary subtag. Must be in `SUPPORTED_LOCALES` at defineApp time;\n * clients coerce and drop anything else. */\n default: string;\n /** Skip device/browser language, even one listed in `translations`. In-app\n * `locale.set` still wins. */\n pin?: boolean;\n /**\n * Locale tags this app ships TRANSLATIONS for, beyond `default`.\n *\n * Distinct from `default`, which picks the locale the app RUNS in: an app can run\n * in Hebrew with no Hebrew catalog (and paint English), which is exactly the state\n * the eleven `himi init` templates shipped in. Declaring `translations` is what\n * makes that gap reportable.\n *\n * Also read by clients at runtime: the device/browser language is followed ONLY\n * when it is `default` or listed here (see `shipsLocale`). Without this an English\n * app on a Hebrew phone resolved `he` and painted English copy right-to-left. An\n * older client ignores the field and keeps following the device.\n */\n translations?: readonly string[];\n /**\n * How hard `himi validate`'s `l10n` pass pushes on untranslated copy.\n *\n * `\"off\"` — the default, including when omitted entirely. Shipping one locale\n * is a legitimate choice, and a pass that scolds every app for it is\n * a pass everyone learns to ignore.\n * `\"warn\"` — report gaps. Where a new app starts.\n * `\"error\"` — gaps fail validate. Flip only once the app's own number is clean.\n *\n * Build-time only, as above.\n */\n enforce?: \"off\" | \"warn\" | \"error\";\n}"
|
|
1074
1074
|
}
|
|
1075
1075
|
]
|
|
1076
1076
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1286.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": [
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"artifactId": "himalaya-cli"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"falconPackageHash": "
|
|
73
|
+
"falconPackageHash": "9bef92b32e5ba74fc5d57743ad239e87468d3bc9069c8a1f37ac0fe1"
|
|
74
74
|
}
|