@wix/himalaya-cli 0.1052.0 → 0.1053.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-module.d.ts +10 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/wix-member-login.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +8 -0
- package/dist/cli.mjs +74 -41
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppConfigLike } from "@wix/himalaya/core";
|
|
1
|
+
import type { AppConfig, AppConfigLike, FunctionsAppConfig } 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";
|
|
@@ -121,6 +121,15 @@ export type DataRouteHandler = (req: IncomingMessage, res: ServerResponse, ctx:
|
|
|
121
121
|
store: AppStore;
|
|
122
122
|
serverBaseUrl: string;
|
|
123
123
|
}) => void | Promise<void>;
|
|
124
|
+
/** A functions-only app (`defineApp({ kind: "functions", … })`): no screens, and none of a UI
|
|
125
|
+
* app's config. The same test `defineApp` itself applies. */
|
|
126
|
+
export declare function isFunctionsOnlyConfig(config: AppConfigLike): config is FunctionsAppConfig;
|
|
127
|
+
/** An app's config seen as a UI app's, every field optional. `FunctionsAppConfig` declares none
|
|
128
|
+
* of `AppConfig`'s UI fields, so on a functions-only app each one reads as absent, which is what
|
|
129
|
+
* the `?.` / `??` at every call site already assumes. For code that handles both kinds; code
|
|
130
|
+
* past an `isFunctionsOnlyConfig` return should narrow instead. No app at all reads the same way,
|
|
131
|
+
* as `state.app?.module.config.x` did. */
|
|
132
|
+
export declare function uiConfig(config: AppConfigLike | undefined): Partial<AppConfig>;
|
|
124
133
|
/** The complete contract an app package exports for the dev-server to serve. */
|
|
125
134
|
export interface AppDevModule {
|
|
126
135
|
/** The `defineApp()` result from the app's config.ts — single source of identity. */
|
|
@@ -15,3 +15,8 @@ export declare function webWixCall(method: string, path: string, body: string |
|
|
|
15
15
|
status: number;
|
|
16
16
|
body: string;
|
|
17
17
|
}>;
|
|
18
|
+
/** The signed-in member's Wix id, or null when the profile read fails (the identity route then
|
|
19
|
+
* falls back to the login email). The token belongs in `webWixCall`'s TOKEN slot: the identity
|
|
20
|
+
* route used to pass it third, where it became the GET's ignored body, so the read went out as
|
|
21
|
+
* `Authorization: undefined`, always failed, and every member's id was reported as their email. */
|
|
22
|
+
export declare function readMemberId(memberToken: string): Promise<string | null>;
|
|
@@ -8549,6 +8549,12 @@ function agendaList(props, opts) {
|
|
|
8549
8549
|
}
|
|
8550
8550
|
|
|
8551
8551
|
// ../../core/dev-server/src/app-module.ts
|
|
8552
|
+
function isFunctionsOnlyConfig(config) {
|
|
8553
|
+
return config.kind === "functions";
|
|
8554
|
+
}
|
|
8555
|
+
function uiConfig(config) {
|
|
8556
|
+
return config ?? {};
|
|
8557
|
+
}
|
|
8552
8558
|
function deriveAppMeta(name, m, platforms = {}) {
|
|
8553
8559
|
const config = m.config;
|
|
8554
8560
|
return {
|
|
@@ -8658,6 +8664,7 @@ export {
|
|
|
8658
8664
|
icon,
|
|
8659
8665
|
iconButton,
|
|
8660
8666
|
image,
|
|
8667
|
+
isFunctionsOnlyConfig,
|
|
8661
8668
|
label,
|
|
8662
8669
|
labeledContent,
|
|
8663
8670
|
lazyList,
|
|
@@ -8703,6 +8710,7 @@ export {
|
|
|
8703
8710
|
timeline,
|
|
8704
8711
|
toggle,
|
|
8705
8712
|
tooltip,
|
|
8713
|
+
uiConfig,
|
|
8706
8714
|
video,
|
|
8707
8715
|
voiceNote,
|
|
8708
8716
|
vstack,
|
package/dist/cli.mjs
CHANGED
|
@@ -4274,8 +4274,9 @@ function confinedHost(ts2, contentDir2, options) {
|
|
|
4274
4274
|
host.writeFile = (fileName) => {
|
|
4275
4275
|
throw new Error(`Tier-5 typecheck attempted to write ${fileName} under noEmit \u2014 refusing`);
|
|
4276
4276
|
};
|
|
4277
|
-
|
|
4278
|
-
|
|
4277
|
+
const writable = host;
|
|
4278
|
+
if (writable.createDirectory) {
|
|
4279
|
+
writable.createDirectory = (dir) => {
|
|
4279
4280
|
throw new Error(`Tier-5 typecheck attempted to create ${dir} under noEmit \u2014 refusing`);
|
|
4280
4281
|
};
|
|
4281
4282
|
}
|
|
@@ -5603,6 +5604,7 @@ function walk(node, registry, path2, out) {
|
|
|
5603
5604
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA;
|
|
5604
5605
|
var init_tokens = __esm({
|
|
5605
5606
|
"../../core/ts/src/tokens.ts"() {
|
|
5607
|
+
"use strict";
|
|
5606
5608
|
SYSTEM_FONT_FAMILY = "$system";
|
|
5607
5609
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
5608
5610
|
}
|
|
@@ -5629,6 +5631,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
|
|
|
5629
5631
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
5630
5632
|
var init_bindings = __esm({
|
|
5631
5633
|
"../../core/ts/src/bindings.ts"() {
|
|
5634
|
+
"use strict";
|
|
5632
5635
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
5633
5636
|
BINDING_SIGIL_RE = new RegExp(
|
|
5634
5637
|
`^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -13865,7 +13868,7 @@ function listReport(opts = {}) {
|
|
|
13865
13868
|
for (const [name, sys] of Object.entries(catalog.system)) {
|
|
13866
13869
|
families.push({ family: name, category: sys.category ?? "serif", variable: false, weights: "platform", kb: 0, license: "system" });
|
|
13867
13870
|
}
|
|
13868
|
-
return { ok: true, count: families.length, totalBytes, families };
|
|
13871
|
+
return { ok: true, count: families.length, totalBytes, problems: [], families };
|
|
13869
13872
|
}
|
|
13870
13873
|
async function fontFindings(appDir2, opts = {}) {
|
|
13871
13874
|
const tokensPath = join22(appDir2, configuredTokensPath(appDir2).path ?? "tokens.json");
|
|
@@ -16991,6 +16994,12 @@ var init_agent_context = __esm({
|
|
|
16991
16994
|
});
|
|
16992
16995
|
|
|
16993
16996
|
// ../../core/dev-server/src/app-module.ts
|
|
16997
|
+
function isFunctionsOnlyConfig(config) {
|
|
16998
|
+
return config.kind === "functions";
|
|
16999
|
+
}
|
|
17000
|
+
function uiConfig(config) {
|
|
17001
|
+
return config ?? {};
|
|
17002
|
+
}
|
|
16994
17003
|
function deriveAppMeta(name, m, platforms = {}) {
|
|
16995
17004
|
const config = m.config;
|
|
16996
17005
|
return {
|
|
@@ -17272,7 +17281,10 @@ async function loadContainedDevModule(name, entry, dir) {
|
|
|
17272
17281
|
"the contained dev-module realm is not installed, so the upload's dev/index.ts would have been imported into the host realm (which is not a security boundary)"
|
|
17273
17282
|
);
|
|
17274
17283
|
}
|
|
17275
|
-
const { buildContainedDevModule: buildContainedDevModule2, CONTAINED_DEV_MODULE_SERVICE: CONTAINED_DEV_MODULE_SERVICE2, CONTAINED_DEV_MODULE_ACTION: CONTAINED_DEV_MODULE_ACTION2 } =
|
|
17284
|
+
const { buildContainedDevModule: buildContainedDevModule2, CONTAINED_DEV_MODULE_SERVICE: CONTAINED_DEV_MODULE_SERVICE2, CONTAINED_DEV_MODULE_ACTION: CONTAINED_DEV_MODULE_ACTION2 } = (
|
|
17285
|
+
// @ts-expect-error — .mjs sibling without types; the cast below states what this uses.
|
|
17286
|
+
await Promise.resolve().then(() => (init_build_lib(), build_lib_exports))
|
|
17287
|
+
);
|
|
17276
17288
|
let js;
|
|
17277
17289
|
try {
|
|
17278
17290
|
js = await buildContainedDevModule2(entry, { absWorkingDir: dir, confineTo: dir });
|
|
@@ -18212,6 +18224,7 @@ __export(wix_member_login_exports, {
|
|
|
18212
18224
|
memberDirectLogin: () => memberDirectLogin,
|
|
18213
18225
|
memberDirectRegister: () => memberDirectRegister,
|
|
18214
18226
|
mintVisitor: () => mintVisitor,
|
|
18227
|
+
readMemberId: () => readMemberId,
|
|
18215
18228
|
webWixCall: () => webWixCall
|
|
18216
18229
|
});
|
|
18217
18230
|
import { createHash as createHash10, randomBytes as randomBytes3 } from "node:crypto";
|
|
@@ -18345,6 +18358,16 @@ async function webWixCall(method, path2, body, token, cookie, forwardedHeaders =
|
|
|
18345
18358
|
});
|
|
18346
18359
|
return { status: res.status, body: await res.text() };
|
|
18347
18360
|
}
|
|
18361
|
+
async function readMemberId(memberToken) {
|
|
18362
|
+
try {
|
|
18363
|
+
const identity = await webWixCall("GET", "/members/v1/members/my", void 0, memberToken);
|
|
18364
|
+
if (identity.status < 200 || identity.status >= 300) return null;
|
|
18365
|
+
const parsed = JSON.parse(identity.body);
|
|
18366
|
+
return parsed.member?.id ?? parsed.id ?? null;
|
|
18367
|
+
} catch {
|
|
18368
|
+
return null;
|
|
18369
|
+
}
|
|
18370
|
+
}
|
|
18348
18371
|
var API;
|
|
18349
18372
|
var init_wix_member_login = __esm({
|
|
18350
18373
|
"../../core/dev-server/src/wix-member-login.ts"() {
|
|
@@ -21734,6 +21757,7 @@ function shouldRevealError(args) {
|
|
|
21734
21757
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
21735
21758
|
var init_validation = __esm({
|
|
21736
21759
|
"../../core/ts/src/validation.ts"() {
|
|
21760
|
+
"use strict";
|
|
21737
21761
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
21738
21762
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
21739
21763
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -25334,6 +25358,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
25334
25358
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
25335
25359
|
var init_worker_subtree = __esm({
|
|
25336
25360
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
25361
|
+
"use strict";
|
|
25337
25362
|
init_worker_subtree_safe_types_generated();
|
|
25338
25363
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
25339
25364
|
maxEncodedBytes: 65536,
|
|
@@ -33950,7 +33975,7 @@ function makeEtag(body) {
|
|
|
33950
33975
|
return `"${createHash16("sha256").update(body).digest("hex").slice(0, 32)}"`;
|
|
33951
33976
|
}
|
|
33952
33977
|
function servedTokensPath(app) {
|
|
33953
|
-
return app.module.designTokensPath ?? resolve31(app.dir, app.module.config.designTokensPath ?? "tokens.json");
|
|
33978
|
+
return app.module.designTokensPath ?? resolve31(app.dir, uiConfig(app.module.config).designTokensPath ?? "tokens.json");
|
|
33954
33979
|
}
|
|
33955
33980
|
function readAppTokens(state) {
|
|
33956
33981
|
if (!state.app) return null;
|
|
@@ -34032,7 +34057,7 @@ function handleL10nRequest(req, res, state) {
|
|
|
34032
34057
|
res.end();
|
|
34033
34058
|
return;
|
|
34034
34059
|
}
|
|
34035
|
-
const sourceLocale = state.app.module.config.locale?.default ?? "en";
|
|
34060
|
+
const sourceLocale = uiConfig(state.app.module.config).locale?.default ?? "en";
|
|
34036
34061
|
let messages;
|
|
34037
34062
|
try {
|
|
34038
34063
|
messages = Object.fromEntries(
|
|
@@ -34070,9 +34095,9 @@ async function runScreenDiagnostics(state, screenId, descriptor) {
|
|
|
34070
34095
|
nativeActions,
|
|
34071
34096
|
appWorkerActions,
|
|
34072
34097
|
strict: false,
|
|
34073
|
-
workerSubtreeScreens: new Set(state.app?.module.config.workerSubtreeScreens ?? []),
|
|
34098
|
+
workerSubtreeScreens: new Set(uiConfig(state.app?.module.config).workerSubtreeScreens ?? []),
|
|
34074
34099
|
// Same a11y rung the build lint applies (RFC 0058 §5) — diagnostics must not disagree.
|
|
34075
|
-
a11y: state.app?.module.config.a11y
|
|
34100
|
+
a11y: uiConfig(state.app?.module.config).a11y
|
|
34076
34101
|
});
|
|
34077
34102
|
const telemetry = state.telemetryEvents.filter((e) => e.screenId === screenId && (/^worker_/.test(e.type) || e.type === "bundle_load_revoked")).slice(-20);
|
|
34078
34103
|
const lastError = [...telemetry].reverse().find((e) => /crash|revoked|error|fail/i.test(e.type)) ?? null;
|
|
@@ -34423,7 +34448,7 @@ async function buildDescriptorForScreenId(state, screenId, query = new URLSearch
|
|
|
34423
34448
|
}
|
|
34424
34449
|
return null;
|
|
34425
34450
|
})();
|
|
34426
|
-
return built ? ensureTransportCapability(applyTopBarDefault(attachAssignments(built, state, evalCtx, cfg?.overrides), state.app.module.config), state.tier5Dir ?? TIER5_ROOT2) : null;
|
|
34451
|
+
return built ? ensureTransportCapability(applyTopBarDefault(attachAssignments(built, state, evalCtx, cfg?.overrides), uiConfig(state.app.module.config)), state.tier5Dir ?? TIER5_ROOT2) : null;
|
|
34427
34452
|
}
|
|
34428
34453
|
return null;
|
|
34429
34454
|
}
|
|
@@ -35261,15 +35286,7 @@ async function handleWebWix(req, res, state) {
|
|
|
35261
35286
|
}
|
|
35262
35287
|
if (path2 === "/v1/__webwix/identity" && (req.method === "GET" || req.method === "POST")) {
|
|
35263
35288
|
if (!session.memberToken) return reply(200, { authenticated: false, userId: null, email: "" });
|
|
35264
|
-
|
|
35265
|
-
try {
|
|
35266
|
-
const identity = await webWixCall("GET", "/members/v1/members/my", session.memberToken);
|
|
35267
|
-
if (identity.status >= 200 && identity.status < 300) {
|
|
35268
|
-
const parsed = JSON.parse(identity.body);
|
|
35269
|
-
userId = parsed.member?.id ?? parsed.id ?? null;
|
|
35270
|
-
}
|
|
35271
|
-
} catch {
|
|
35272
|
-
}
|
|
35289
|
+
const userId = await readMemberId(session.memberToken);
|
|
35273
35290
|
const preferenceIdentity = session.email?.trim().toLowerCase() || userId;
|
|
35274
35291
|
return reply(200, {
|
|
35275
35292
|
authenticated: true,
|
|
@@ -35844,8 +35861,8 @@ async function handleAdminPlayground(req, res, state) {
|
|
|
35844
35861
|
nativeActions,
|
|
35845
35862
|
appWorkerActions,
|
|
35846
35863
|
strict,
|
|
35847
|
-
workerSubtreeScreens: new Set(state.app?.module.config.workerSubtreeScreens ?? []),
|
|
35848
|
-
a11y: state.app?.module.config.a11y
|
|
35864
|
+
workerSubtreeScreens: new Set(uiConfig(state.app?.module.config).workerSubtreeScreens ?? []),
|
|
35865
|
+
a11y: uiConfig(state.app?.module.config).a11y
|
|
35849
35866
|
});
|
|
35850
35867
|
return sendJson(res, report2.ok ? 200 : 422, report2);
|
|
35851
35868
|
}
|
|
@@ -40192,7 +40209,7 @@ async function buildReleaseFromContent(contentDir2, dest, opts = {}) {
|
|
|
40192
40209
|
}
|
|
40193
40210
|
function readTokensForLint(preloaded) {
|
|
40194
40211
|
try {
|
|
40195
|
-
const tokenPath = preloaded.module.designTokensPath ?? resolve32(preloaded.dir, preloaded.module.config.designTokensPath ?? "tokens.json");
|
|
40212
|
+
const tokenPath = preloaded.module.designTokensPath ?? resolve32(preloaded.dir, uiConfig(preloaded.module.config).designTokensPath ?? "tokens.json");
|
|
40196
40213
|
const parsed = JSON.parse(readFileSync42(tokenPath, "utf8"));
|
|
40197
40214
|
delete parsed._meta;
|
|
40198
40215
|
return parsed;
|
|
@@ -40204,7 +40221,8 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40204
40221
|
const app = preloaded.name;
|
|
40205
40222
|
const tier5Dir = opts.tier5Dir ?? TIER5_DIR;
|
|
40206
40223
|
const collect2 = opts.collect;
|
|
40207
|
-
|
|
40224
|
+
const config = preloaded.module.config;
|
|
40225
|
+
if (isFunctionsOnlyConfig(config)) {
|
|
40208
40226
|
return buildFunctionsOnlyRelease(preloaded, dest);
|
|
40209
40227
|
}
|
|
40210
40228
|
const store = typeof dest === "string" ? new FileReleaseStore(dest) : dest;
|
|
@@ -40230,14 +40248,14 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40230
40248
|
};
|
|
40231
40249
|
const LIVE_LOAD_BUDGET_MS = 3e4;
|
|
40232
40250
|
const appLocalDbSchema = (() => {
|
|
40233
|
-
const entities =
|
|
40251
|
+
const entities = config.dataSchema?.entities ?? [];
|
|
40234
40252
|
const names = entities.map((e) => e?.name).filter((n) => typeof n === "string" && n.length > 0);
|
|
40235
40253
|
return names.length ? names.map((name) => ({ name })) : null;
|
|
40236
40254
|
})();
|
|
40237
40255
|
let liveWixCall = null;
|
|
40238
40256
|
const ensureLiveWixCall = async () => {
|
|
40239
40257
|
if (liveWixCall) return liveWixCall;
|
|
40240
|
-
const auth =
|
|
40258
|
+
const auth = config.auth;
|
|
40241
40259
|
const clientId = auth?.config?.clientId;
|
|
40242
40260
|
if (auth?.providerId !== "wix-consumer" || typeof clientId !== "string" || !clientId) {
|
|
40243
40261
|
throw new Error(
|
|
@@ -40322,7 +40340,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40322
40340
|
};
|
|
40323
40341
|
let handlers;
|
|
40324
40342
|
let minBinaryVersion = null;
|
|
40325
|
-
const requiredCapabilities = new Set(
|
|
40343
|
+
const requiredCapabilities = new Set(config.capabilities ?? []);
|
|
40326
40344
|
const requiredNativeComponents = /* @__PURE__ */ new Set();
|
|
40327
40345
|
const tierScreens = [];
|
|
40328
40346
|
const tierBundles = /* @__PURE__ */ new Map();
|
|
@@ -40568,11 +40586,11 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40568
40586
|
nativeActions,
|
|
40569
40587
|
appWorkerActions,
|
|
40570
40588
|
strict: collect2.strict,
|
|
40571
|
-
workerSubtreeScreens: new Set(
|
|
40572
|
-
l10n: l10nLintOptions(
|
|
40589
|
+
workerSubtreeScreens: new Set(config.workerSubtreeScreens ?? []),
|
|
40590
|
+
l10n: l10nLintOptions(config.locale, preloaded.dir),
|
|
40573
40591
|
// RFC 0058 §5 — the app's own rung of the a11y ladder. Omitted ⇒ the validator's
|
|
40574
40592
|
// default, "error"; an in-repo app with ratcheted debt declares "warn".
|
|
40575
|
-
a11y:
|
|
40593
|
+
a11y: config.a11y
|
|
40576
40594
|
});
|
|
40577
40595
|
lint.push({ screenId, ok: report2.ok, issues: report2.issues });
|
|
40578
40596
|
}
|
|
@@ -40600,8 +40618,8 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40600
40618
|
nativeActions,
|
|
40601
40619
|
appWorkerActions,
|
|
40602
40620
|
strict: collect2.strict,
|
|
40603
|
-
workerSubtreeScreens: new Set(
|
|
40604
|
-
a11y:
|
|
40621
|
+
workerSubtreeScreens: new Set(config.workerSubtreeScreens ?? []),
|
|
40622
|
+
a11y: config.a11y
|
|
40605
40623
|
});
|
|
40606
40624
|
lint.push({ screenId: wantedRender, ok: report2.ok, issues: report2.issues });
|
|
40607
40625
|
}
|
|
@@ -40635,6 +40653,10 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40635
40653
|
store: preloaded.module.createStore(app),
|
|
40636
40654
|
toggles: {},
|
|
40637
40655
|
query: new URLSearchParams(),
|
|
40656
|
+
// A bake has no requesting member: the anonymous caller the dev-server also defaults to.
|
|
40657
|
+
// `ScreenBuildContext.caller` is documented never-absent, so a `seedIds` may read
|
|
40658
|
+
// `ctx.caller.entitled` unguarded, and would have thrown here without it.
|
|
40659
|
+
caller: { entitled: false },
|
|
40638
40660
|
serverBaseUrl: base,
|
|
40639
40661
|
bundleIntegrity: () => null,
|
|
40640
40662
|
// Resolve for real: a baked templated route whose descriptor references an asset must
|
|
@@ -40744,7 +40766,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40744
40766
|
}
|
|
40745
40767
|
Object.assign(catalogs, await bakeCatalogs(
|
|
40746
40768
|
app,
|
|
40747
|
-
|
|
40769
|
+
config.locale,
|
|
40748
40770
|
async (tag) => {
|
|
40749
40771
|
const res = await devFetch(
|
|
40750
40772
|
`${base}/v1/l10n?app=${encodeURIComponent(app)}&tag=${encodeURIComponent(tag)}`,
|
|
@@ -40759,7 +40781,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40759
40781
|
const served = await cfgRes.text();
|
|
40760
40782
|
const prodText = withProdServeAppConfig(
|
|
40761
40783
|
opts.keepDevOnlyAppConfig ? served : withoutDevOnlyAppConfig(served),
|
|
40762
|
-
|
|
40784
|
+
config.environments?.prod
|
|
40763
40785
|
);
|
|
40764
40786
|
const streamPolicyErrors = validateReleaseStreamPolicyConfig(prodText);
|
|
40765
40787
|
if (streamPolicyErrors.length) {
|
|
@@ -40831,7 +40853,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40831
40853
|
playerRequirements: {
|
|
40832
40854
|
capabilities: [...requiredCapabilities].sort(),
|
|
40833
40855
|
nativeComponents: [...requiredNativeComponents].sort(),
|
|
40834
|
-
authProviders: [
|
|
40856
|
+
authProviders: [config.auth.providerId].filter(Boolean).sort()
|
|
40835
40857
|
},
|
|
40836
40858
|
iconHash,
|
|
40837
40859
|
...brandFonts.length ? { brandFonts } : {},
|
|
@@ -40887,7 +40909,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40887
40909
|
// core identifies an oversized bundle by SRI, which is unactionable on its own, so the
|
|
40888
40910
|
// name is resolved back in here (most-specific match: `integrity` is a full SRI, but a
|
|
40889
40911
|
// descriptor carrying none would fall back to a bare name, and names nest).
|
|
40890
|
-
tierCapViolations: checkTierCaps(
|
|
40912
|
+
tierCapViolations: checkTierCaps(config, tierScreens, [...tierBundles.values()]).map((v) => {
|
|
40891
40913
|
const named = [...tierBundles.values()].filter((b) => v.message.includes(b.integrity)).sort((a, b) => b.integrity.length - a.integrity.length)[0];
|
|
40892
40914
|
return named ? { ...v, message: `${v.message} \u2014 bundle "${named.name}"` } : v;
|
|
40893
40915
|
}),
|
|
@@ -40900,7 +40922,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
40900
40922
|
...renderTokens !== void 0 ? { tokens: renderTokens } : {},
|
|
40901
40923
|
...preloaded.meta.surfaces ? { surfaceNav: preloaded.meta.surfaces } : {},
|
|
40902
40924
|
auth: (() => {
|
|
40903
|
-
const a =
|
|
40925
|
+
const a = config.auth;
|
|
40904
40926
|
const cid = a?.config?.clientId;
|
|
40905
40927
|
return { ...a?.providerId ? { providerId: a.providerId } : {}, ...typeof cid === "string" && cid ? { clientId: cid } : {} };
|
|
40906
40928
|
})()
|
|
@@ -40944,7 +40966,7 @@ async function buildFunctionsOnlyRelease(preloaded, dest) {
|
|
|
40944
40966
|
const sha = gitSha();
|
|
40945
40967
|
const manifest = { releaseId: contentReleaseId(content), gitSha: sha, ...content };
|
|
40946
40968
|
await store.putManifest(app, manifest);
|
|
40947
|
-
return { manifest, failedToBuild: [], missingBundles: [], auth: {} };
|
|
40969
|
+
return { manifest, failedToBuild: [], missingBundles: [], auth: {}, tierCapViolations: [] };
|
|
40948
40970
|
}
|
|
40949
40971
|
function listBuildableApps() {
|
|
40950
40972
|
const appsDir = join37(REPO_ROOT7, "apps");
|
|
@@ -40957,6 +40979,7 @@ var init_build3 = __esm({
|
|
|
40957
40979
|
init_contained_dev_module();
|
|
40958
40980
|
init_tier5_dir();
|
|
40959
40981
|
init_build_sha();
|
|
40982
|
+
init_app_module();
|
|
40960
40983
|
init_app_icon();
|
|
40961
40984
|
init_app_assets();
|
|
40962
40985
|
init_plan_fonts();
|
|
@@ -48346,6 +48369,14 @@ function memoryStore(manifest, built) {
|
|
|
48346
48369
|
},
|
|
48347
48370
|
async getAppConfig() {
|
|
48348
48371
|
return null;
|
|
48372
|
+
},
|
|
48373
|
+
// The two members the cast used to paper over. Serve-relative, as FileReleaseStore's is; and
|
|
48374
|
+
// nothing to prune, since this store only ever holds the one release it was built with.
|
|
48375
|
+
bundleUrl(_app, sha2565) {
|
|
48376
|
+
return `/v1/bundles/${sha2565}.bundle.js`;
|
|
48377
|
+
},
|
|
48378
|
+
async prune() {
|
|
48379
|
+
return 0;
|
|
48349
48380
|
}
|
|
48350
48381
|
};
|
|
48351
48382
|
}
|
|
@@ -69726,7 +69757,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
69726
69757
|
const { detectAndroidNativeDecode: detectAndroidNativeDecode2, detectNativeDecode: detectNativeDecode2, nativeDecodePlatforms: nativeDecodePlatforms2 } = await Promise.resolve().then(() => (init_native_decode(), native_decode_exports));
|
|
69727
69758
|
let platforms;
|
|
69728
69759
|
try {
|
|
69729
|
-
platforms = nativeDecodePlatforms2(flags.native === true ? true : str6(flags.native));
|
|
69760
|
+
platforms = nativeDecodePlatforms2(flags.native === true ? true : str6(flags.native) ?? String(flags.native));
|
|
69730
69761
|
} catch (error) {
|
|
69731
69762
|
io.error(JSON.stringify({ error: error.message }));
|
|
69732
69763
|
return 2;
|
|
@@ -71726,10 +71757,11 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
71726
71757
|
// right below says how (or whether) the narrowing was measured.
|
|
71727
71758
|
enabled: (() => {
|
|
71728
71759
|
const envelope = resolveSurfaceEnvelope(platforms).enabled;
|
|
71729
|
-
|
|
71760
|
+
const families = produced.families;
|
|
71761
|
+
if (!families) return envelope;
|
|
71730
71762
|
return envelope.filter((id) => {
|
|
71731
71763
|
const surface = surfaceById(id);
|
|
71732
|
-
return !surface || !isWidgetFamilySurface(surface) ||
|
|
71764
|
+
return !surface || !isWidgetFamilySurface(surface) || families.has(surfaceFrozenFamily(surface));
|
|
71733
71765
|
});
|
|
71734
71766
|
})(),
|
|
71735
71767
|
// Says which question the `produced` column answered, and — when it could not
|
|
@@ -73598,7 +73630,8 @@ ${report2.ok ? "OK \u2014 data + serve plane reachable." : typeof report2.hint =
|
|
|
73598
73630
|
return 2;
|
|
73599
73631
|
}
|
|
73600
73632
|
const environment2 = str6(flags.environment) ?? "preview";
|
|
73601
|
-
|
|
73633
|
+
const isResourceEnvironment = (v) => v === "preview" || v === "production";
|
|
73634
|
+
if (!isResourceEnvironment(environment2)) {
|
|
73602
73635
|
io.error(JSON.stringify({ error: "--environment must be preview or production" }));
|
|
73603
73636
|
return 2;
|
|
73604
73637
|
}
|
|
@@ -73881,7 +73914,7 @@ ${report2.ok ? "OK \u2014 data + serve plane reachable." : typeof report2.hint =
|
|
|
73881
73914
|
redirectUri: redirectFlag,
|
|
73882
73915
|
cwd: str6(flags.content) ?? process.cwd()
|
|
73883
73916
|
});
|
|
73884
|
-
print(
|
|
73917
|
+
print(r);
|
|
73885
73918
|
return 0;
|
|
73886
73919
|
} catch (e) {
|
|
73887
73920
|
io.error(JSON.stringify({ error: e.message }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1053.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": [
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"artifactId": "himalaya-cli"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
"falconPackageHash": "
|
|
68
|
+
"falconPackageHash": "09a8cfb09738de91c22097314d5bb642195d40f284ccec170bb75968"
|
|
69
69
|
}
|