@wix/himalaya-cli 0.1739.0 → 0.1741.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/l10n-strings.d.ts +13 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/locale.d.ts +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +57 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +51 -2
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{4235535ddd6e62ae867fd4d3588054909040428cffec9bea2807693a68e297d9.bin → d13ef703cc8f4d7eaa9b12967b618314b75002b5d4441dedbcc65e3601c4750d.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/cli.mjs +644 -285
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +1 -1
- package/guides/one-app-to-himi-app.md +11 -2
- package/guides/release-notes.md +12 -0
- package/package.json +2 -2
- package/templates/beauty-salon/l10n/fr.json +4806 -0
- package/templates/beauty-salon/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/branded-lite/l10n/fr.json +9088 -0
- package/templates/branded-lite/l10n/he.json +4 -0
- package/templates/branded-lite/tier5-src/_shared/group-privacy.ts +14 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +11 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
- package/templates/branded-lite/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/community-club/l10n/fr.json +3026 -0
- package/templates/community-club/l10n/he.json +12 -0
- package/templates/community-club/tier5-src/_shared/group-privacy.ts +14 -0
- package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +11 -4
- package/templates/community-club/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
- package/templates/community-club/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/events-meetups/l10n/fr.json +2886 -0
- package/templates/events-meetups/l10n/he.json +12 -0
- package/templates/events-meetups/tier5-src/_shared/group-privacy.ts +14 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +11 -4
- package/templates/events-meetups/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
- package/templates/events-meetups/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/gym-fitness/l10n/fr.json +5412 -0
- package/templates/gym-fitness/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/nonprofit-cause/l10n/fr.json +3499 -0
- package/templates/nonprofit-cause/l10n/he.json +12 -0
- package/templates/nonprofit-cause/tier5-src/_shared/group-privacy.ts +14 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +11 -4
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
- package/templates/nonprofit-cause/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/podcast-creator/l10n/fr.json +3321 -0
- package/templates/podcast-creator/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/portfolio-creative/l10n/fr.json +3880 -0
- package/templates/portfolio-creative/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/restaurant/l10n/fr.json +3528 -0
- package/templates/restaurant/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/retail-store/l10n/fr.json +3279 -0
- package/templates/retail-store/tier5-src/wix-spaces-app-language/index.ts +18 -3
- package/templates/yoga-studio/l10n/fr.json +4531 -0
- package/templates/yoga-studio/tier5-src/wix-spaces-app-language/index.ts +18 -3
package/dist/cli.mjs
CHANGED
|
@@ -1906,7 +1906,7 @@ function sentinelizeIdentity(body, identity) {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
if (identity.name) {
|
|
1908
1908
|
const re2 = new RegExp(`\\b(${NAME_FIELDS.join("|")})(["']?\\s*[:=]\\s*)(["'])${escapeRe(identity.name)}\\3`, "g");
|
|
1909
|
-
out2 = out2.replace(re2, (_m, key4,
|
|
1909
|
+
out2 = out2.replace(re2, (_m, key4, sep31, q4) => `${key4}${sep31}${q4}__HIMI_APP_NAME__${q4}`);
|
|
1910
1910
|
}
|
|
1911
1911
|
return out2;
|
|
1912
1912
|
}
|
|
@@ -4739,6 +4739,7 @@ function assertSiteShellConfig(site, opts) {
|
|
|
4739
4739
|
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;
|
|
4740
4740
|
var init_site_shell = __esm({
|
|
4741
4741
|
"../../core/ts/src/site-shell.ts"() {
|
|
4742
|
+
"use strict";
|
|
4742
4743
|
init_define_HHP_CATALOG();
|
|
4743
4744
|
init_site_screen_form();
|
|
4744
4745
|
init_webview_embedded();
|
|
@@ -4819,8 +4820,8 @@ function committedProvisioningPath(name) {
|
|
|
4819
4820
|
function committedShellFor(path2) {
|
|
4820
4821
|
const normalized = path2.replace(/\\/g, "/");
|
|
4821
4822
|
return SHELL_NAMES.find((name) => {
|
|
4822
|
-
const
|
|
4823
|
-
return normalized ===
|
|
4823
|
+
const relative33 = committedProvisioningPath(name);
|
|
4824
|
+
return normalized === relative33 || normalized.endsWith(`/${relative33}`);
|
|
4824
4825
|
});
|
|
4825
4826
|
}
|
|
4826
4827
|
function isBrandable(repoRoot2, name) {
|
|
@@ -8073,9 +8074,9 @@ function compileV2(html, profile, options2) {
|
|
|
8073
8074
|
if (!row2) error(el2, "HHP-BINDING-SCOPE", "Item bindings require a keyed list template.");
|
|
8074
8075
|
return raw;
|
|
8075
8076
|
}
|
|
8076
|
-
const
|
|
8077
|
-
if (!info4?.paths.has(
|
|
8078
|
-
return `$service:${serviceName2}.${
|
|
8077
|
+
const relative33 = statePath(raw);
|
|
8078
|
+
if (!info4?.paths.has(relative33)) error(el2, "HHP-BINDING-PATH", `Unknown controller state path ${relative33}.`);
|
|
8079
|
+
return `$service:${serviceName2}.${relative33}`;
|
|
8079
8080
|
}
|
|
8080
8081
|
const read2 = (value2, dotted) => dotted.split(".").reduce((current, key4) => current && typeof current === "object" && Object.hasOwn(current, key4) ? current[key4] : void 0, value2);
|
|
8081
8082
|
function rowValues(row2, raw) {
|
|
@@ -13620,7 +13621,8 @@ __export(locale_exports, {
|
|
|
13620
13621
|
shipsLocale: () => shipsLocale
|
|
13621
13622
|
});
|
|
13622
13623
|
function primarySubtag(tag) {
|
|
13623
|
-
|
|
13624
|
+
const primary = (tag ?? "").trim().split(/[-_]/)[0].toLowerCase();
|
|
13625
|
+
return LANGUAGE_ALIASES[primary] ?? primary;
|
|
13624
13626
|
}
|
|
13625
13627
|
function isSupportedLocale(tag) {
|
|
13626
13628
|
return SUPPORTED_LOCALES.includes(tag);
|
|
@@ -13681,17 +13683,70 @@ function parseLocaleSetTag(app2, tag) {
|
|
|
13681
13683
|
if (t2 && shipsLocale(app2, t2)) return { ok: true, tag: t2 };
|
|
13682
13684
|
return { ok: false, error: "unsupported_locale" };
|
|
13683
13685
|
}
|
|
13684
|
-
var SUPPORTED_LOCALES, RTL_LOCALES, LOCALE_SYSTEM, LOCALE_NATIVE_NAMES;
|
|
13686
|
+
var SUPPORTED_LOCALES, RTL_LOCALES, LANGUAGE_ALIASES, LOCALE_SYSTEM, LOCALE_NATIVE_NAMES;
|
|
13685
13687
|
var init_locale = __esm({
|
|
13686
13688
|
"../../core/ts/src/locale.ts"() {
|
|
13687
13689
|
init_define_HHP_CATALOG();
|
|
13688
|
-
SUPPORTED_LOCALES = [
|
|
13690
|
+
SUPPORTED_LOCALES = [
|
|
13691
|
+
"ar",
|
|
13692
|
+
"cs",
|
|
13693
|
+
"da",
|
|
13694
|
+
"de",
|
|
13695
|
+
"el",
|
|
13696
|
+
"en",
|
|
13697
|
+
"es",
|
|
13698
|
+
"fi",
|
|
13699
|
+
"fr",
|
|
13700
|
+
"he",
|
|
13701
|
+
"hu",
|
|
13702
|
+
"id",
|
|
13703
|
+
"it",
|
|
13704
|
+
"ja",
|
|
13705
|
+
"ko",
|
|
13706
|
+
"lt",
|
|
13707
|
+
"nl",
|
|
13708
|
+
"no",
|
|
13709
|
+
"pl",
|
|
13710
|
+
"pt",
|
|
13711
|
+
"ru",
|
|
13712
|
+
"sv",
|
|
13713
|
+
"th",
|
|
13714
|
+
"tr",
|
|
13715
|
+
"uk",
|
|
13716
|
+
"vi",
|
|
13717
|
+
"zh"
|
|
13718
|
+
];
|
|
13689
13719
|
RTL_LOCALES = /* @__PURE__ */ new Set(["he", "ar", "fa", "ur"]);
|
|
13720
|
+
LANGUAGE_ALIASES = { nb: "no", nn: "no" };
|
|
13690
13721
|
LOCALE_SYSTEM = "system";
|
|
13691
13722
|
LOCALE_NATIVE_NAMES = {
|
|
13723
|
+
ar: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629",
|
|
13724
|
+
cs: "\u010Ce\u0161tina",
|
|
13725
|
+
da: "Dansk",
|
|
13726
|
+
de: "Deutsch",
|
|
13727
|
+
el: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",
|
|
13692
13728
|
en: "English",
|
|
13729
|
+
es: "Espa\xF1ol",
|
|
13730
|
+
fi: "Suomi",
|
|
13731
|
+
fr: "Fran\xE7ais",
|
|
13693
13732
|
he: "\u05E2\u05D1\u05E8\u05D9\u05EA",
|
|
13694
|
-
|
|
13733
|
+
hu: "Magyar",
|
|
13734
|
+
id: "Bahasa Indonesia",
|
|
13735
|
+
it: "Italiano",
|
|
13736
|
+
ja: "\u65E5\u672C\u8A9E",
|
|
13737
|
+
ko: "\uD55C\uAD6D\uC5B4",
|
|
13738
|
+
lt: "Lietuvi\u0173",
|
|
13739
|
+
nl: "Nederlands",
|
|
13740
|
+
no: "Norsk",
|
|
13741
|
+
pl: "Polski",
|
|
13742
|
+
pt: "Portugu\xEAs",
|
|
13743
|
+
ru: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439",
|
|
13744
|
+
sv: "Svenska",
|
|
13745
|
+
th: "\u0E44\u0E17\u0E22",
|
|
13746
|
+
tr: "T\xFCrk\xE7e",
|
|
13747
|
+
uk: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",
|
|
13748
|
+
vi: "Ti\u1EBFng Vi\u1EC7t",
|
|
13749
|
+
zh: "\u4E2D\u6587"
|
|
13695
13750
|
};
|
|
13696
13751
|
}
|
|
13697
13752
|
});
|
|
@@ -17086,6 +17141,10 @@ function collectDescriptorStrings(descriptor, options2 = {}) {
|
|
|
17086
17141
|
seen.add(key4);
|
|
17087
17142
|
out2.push(f2);
|
|
17088
17143
|
};
|
|
17144
|
+
walkVisibleLiterals(descriptor, isCopy2, push);
|
|
17145
|
+
return out2;
|
|
17146
|
+
}
|
|
17147
|
+
function walkVisibleLiterals(descriptor, isCopy2, push) {
|
|
17089
17148
|
const visit = (node3, path2) => {
|
|
17090
17149
|
if (Array.isArray(node3)) {
|
|
17091
17150
|
node3.forEach((n2, i2) => visit(n2, `${path2}[${i2}]`));
|
|
@@ -17132,9 +17191,23 @@ function collectDescriptorStrings(descriptor, options2 = {}) {
|
|
|
17132
17191
|
}
|
|
17133
17192
|
};
|
|
17134
17193
|
visit(descriptor, "");
|
|
17135
|
-
return out2;
|
|
17136
17194
|
}
|
|
17137
|
-
|
|
17195
|
+
function isKeyShapedLiteral(s5, keys2) {
|
|
17196
|
+
if (typeof s5 !== "string") return false;
|
|
17197
|
+
if (keys2?.has(s5) === true) return true;
|
|
17198
|
+
if (!s5.includes("_") || !KEY_SHAPED.test(s5)) return false;
|
|
17199
|
+
const leaf = s5.slice(s5.lastIndexOf(".") + 1);
|
|
17200
|
+
return leaf.includes("_") || leaf.length >= 5;
|
|
17201
|
+
}
|
|
17202
|
+
function collectKeyShapedLiterals(descriptor, keys2) {
|
|
17203
|
+
const byPath = /* @__PURE__ */ new Map();
|
|
17204
|
+
walkVisibleLiterals(descriptor, (v2) => isKeyShapedLiteral(v2, keys2), (f2) => {
|
|
17205
|
+
const path2 = f2.path.replace(/^\./, "");
|
|
17206
|
+
if (!byPath.has(path2)) byPath.set(path2, { ...f2, path: path2 });
|
|
17207
|
+
});
|
|
17208
|
+
return [...byPath.values()];
|
|
17209
|
+
}
|
|
17210
|
+
var STRING_FIELDS_BY_TYPE, SECONDARY_FIELDS, UNREACHED_VISIBLE_FIELDS, BINDING_SIGIL, KEY_SHAPED;
|
|
17138
17211
|
var init_l10n_strings = __esm({
|
|
17139
17212
|
"../../core/dev-server/src/l10n-strings.ts"() {
|
|
17140
17213
|
init_define_HHP_CATALOG();
|
|
@@ -17173,6 +17246,7 @@ var init_l10n_strings = __esm({
|
|
|
17173
17246
|
"footer"
|
|
17174
17247
|
]);
|
|
17175
17248
|
BINDING_SIGIL = /^\$(service|flag|item)\b/;
|
|
17249
|
+
KEY_SHAPED = /^[a-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*(?:\.[a-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*)+$/;
|
|
17176
17250
|
}
|
|
17177
17251
|
});
|
|
17178
17252
|
|
|
@@ -17879,8 +17953,8 @@ function textOf(node3) {
|
|
|
17879
17953
|
function plainText(node3) {
|
|
17880
17954
|
if (typeOf2(node3) === "TEXT") return str(at(node3, "textData", "text"));
|
|
17881
17955
|
const children2 = kids(node3).filter(isObj);
|
|
17882
|
-
const
|
|
17883
|
-
return children2.map(plainText).join(
|
|
17956
|
+
const sep31 = children2.every((c2) => typeOf2(c2) === "TEXT") ? "" : "\n";
|
|
17957
|
+
return children2.map(plainText).join(sep31);
|
|
17884
17958
|
}
|
|
17885
17959
|
function alignOf(v2) {
|
|
17886
17960
|
switch (v2) {
|
|
@@ -20274,6 +20348,92 @@ function topBarFindings(descriptor) {
|
|
|
20274
20348
|
}
|
|
20275
20349
|
return out2;
|
|
20276
20350
|
}
|
|
20351
|
+
function deadTopBarFindings(descriptor) {
|
|
20352
|
+
const out2 = [];
|
|
20353
|
+
const bar = descriptor?.topBar;
|
|
20354
|
+
if (!bar || typeof bar !== "object") return out2;
|
|
20355
|
+
const b3 = bar;
|
|
20356
|
+
const set3 = (v2) => typeof v2 === "string" && v2 !== "";
|
|
20357
|
+
const items = Array.isArray(b3.items) ? b3.items : [];
|
|
20358
|
+
items.forEach((raw, idx) => {
|
|
20359
|
+
if (!raw || typeof raw !== "object") return;
|
|
20360
|
+
const i2 = raw;
|
|
20361
|
+
if (!set3(i2.id) || i2.placement === "principal") return;
|
|
20362
|
+
const at2 = `topBar.items[${idx}]`;
|
|
20363
|
+
const id = JSON.stringify(i2.id);
|
|
20364
|
+
if (i2.content != null) {
|
|
20365
|
+
out2.push({ path: `${at2}.content`, ruleCode: "top_bar_item_content_ignored", message: `Top-bar item ${id} sets \`content\`, which only a \`placement: "principal"\` item draws, so no shell draws it here. Put the control's \`label\` (or \`icon\`) and \`onTap\` on the item itself` });
|
|
20366
|
+
}
|
|
20367
|
+
if (!set3(i2.label) && !set3(i2.labelPath) && !set3(i2.icon) && i2.avatar == null) {
|
|
20368
|
+
out2.push({ path: at2, ruleCode: "top_bar_item_no_label", message: `Top-bar item ${id} has no \`label\`, \`labelPath\`, \`icon\` or \`avatar\`, so every shell draws its id ${id} as the label. Give it a \`label\` or an \`icon\`` });
|
|
20369
|
+
}
|
|
20370
|
+
if (i2.onTap == null && !(Array.isArray(i2.menu) && i2.menu.length > 0) && i2.disabled !== true) {
|
|
20371
|
+
out2.push({ path: at2, ruleCode: "top_bar_item_no_action", message: `Top-bar item ${id} has no \`onTap\` and no \`menu\`, so it draws as a control and a tap does nothing. Add an \`onTap\`, or \`disabled: true\` if it is a placeholder` });
|
|
20372
|
+
}
|
|
20373
|
+
});
|
|
20374
|
+
const actions = Array.isArray(b3.actions) ? b3.actions : [];
|
|
20375
|
+
actions.forEach((raw, idx) => {
|
|
20376
|
+
if (!raw || typeof raw !== "object") return;
|
|
20377
|
+
const a3 = raw;
|
|
20378
|
+
const id = JSON.stringify(a3.id);
|
|
20379
|
+
if (!set3(a3.icon) && !set3(a3.iconPath) && !set3(a3.label) && !set3(a3.labelPath)) {
|
|
20380
|
+
out2.push({ path: `topBar.actions[${idx}]`, ruleCode: "top_bar_action_no_label", message: `Top-bar action ${id} has no \`icon\` or \`label\`, so every shell draws its id ${id} as the label. Give it an \`icon\` or a \`label\`` });
|
|
20381
|
+
}
|
|
20382
|
+
if (a3.onTap == null) {
|
|
20383
|
+
out2.push({ path: `topBar.actions[${idx}]`, ruleCode: "top_bar_action_no_action", message: `Top-bar action ${id} has no \`onTap\`, so it draws as a control and a tap does nothing. Add an \`onTap\`` });
|
|
20384
|
+
}
|
|
20385
|
+
});
|
|
20386
|
+
return out2;
|
|
20387
|
+
}
|
|
20388
|
+
function deadButtonFindings(descriptor) {
|
|
20389
|
+
const out2 = [];
|
|
20390
|
+
const hasPress = (o2) => !!o2 && Object.entries(o2).some(([k3, v2]) => PRESS_PROPS.has(k3) && v2 != null);
|
|
20391
|
+
const visit = (v2, path2, owned) => {
|
|
20392
|
+
if (Array.isArray(v2)) {
|
|
20393
|
+
v2.forEach((x2, i2) => visit(x2, `${path2}[${i2}]`, owned));
|
|
20394
|
+
return;
|
|
20395
|
+
}
|
|
20396
|
+
if (!v2 || typeof v2 !== "object") return;
|
|
20397
|
+
const node3 = v2;
|
|
20398
|
+
const body = node3.body;
|
|
20399
|
+
const props2 = body?.props;
|
|
20400
|
+
const pressed = owned || hasPress(node3.modifiers) || hasPress(props2);
|
|
20401
|
+
if (body?.type === "Button" && !pressed && props2?.disabled !== true && !(typeof props2?.disabledPath === "string" && props2.disabledPath)) {
|
|
20402
|
+
out2.push({ path: path2, message: `Button ${JSON.stringify(props2?.title ?? node3.id)} has no \`action\` and nothing around it handles its tap, so it draws and does nothing. Give it an \`action\`, or \`disabled: true\`` });
|
|
20403
|
+
}
|
|
20404
|
+
for (const [k3, child3] of Object.entries(node3)) {
|
|
20405
|
+
if (isOpaqueAuthorJson(k3, child3, path2 === "") || path2 === "logicBundle" && k3 === "bootState") continue;
|
|
20406
|
+
if (child3 && typeof child3 === "object") visit(child3, path2 ? `${path2}.${k3}` : k3, pressed || PRESS_OWNING_SLOTS.has(k3));
|
|
20407
|
+
}
|
|
20408
|
+
};
|
|
20409
|
+
visit(descriptor, "", false);
|
|
20410
|
+
return out2;
|
|
20411
|
+
}
|
|
20412
|
+
function missingTranslationKeyFindings(descriptor, keys2) {
|
|
20413
|
+
const out2 = [];
|
|
20414
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20415
|
+
const visit = (v2, path2) => {
|
|
20416
|
+
if (typeof v2 === "string") {
|
|
20417
|
+
const key4 = translationKey(v2);
|
|
20418
|
+
if (key4 !== null && !keys2.has(key4) && !seen.has(key4)) {
|
|
20419
|
+
seen.add(key4);
|
|
20420
|
+
out2.push({ path: path2, message: `\`$t:${key4}\` has no entry in the app's source-locale catalog, so the screen shows the raw key "${key4}". Add a message with \`key: "${key4}"\` to \`l10n/<default locale>.json\`, or use literal copy` });
|
|
20421
|
+
}
|
|
20422
|
+
return;
|
|
20423
|
+
}
|
|
20424
|
+
if (Array.isArray(v2)) {
|
|
20425
|
+
v2.forEach((x2, i2) => visit(x2, `${path2}[${i2}]`));
|
|
20426
|
+
return;
|
|
20427
|
+
}
|
|
20428
|
+
if (!v2 || typeof v2 !== "object") return;
|
|
20429
|
+
for (const [k3, child3] of Object.entries(v2)) {
|
|
20430
|
+
if (path2 === "" && k3 === "input" || path2 === "logicBundle" && k3 === "bootState") continue;
|
|
20431
|
+
visit(child3, path2 ? `${path2}.${k3}` : k3);
|
|
20432
|
+
}
|
|
20433
|
+
};
|
|
20434
|
+
visit(descriptor, "");
|
|
20435
|
+
return out2;
|
|
20436
|
+
}
|
|
20277
20437
|
function validateTabBarVisibility(screens, navigation) {
|
|
20278
20438
|
const out2 = [];
|
|
20279
20439
|
const items = navigation?.tabBar?.items;
|
|
@@ -20645,6 +20805,26 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
20645
20805
|
for (const finding2 of topBarFindings(descriptor)) {
|
|
20646
20806
|
issues.push({ severity: "warning", pass: "top-bar", path: finding2.path, message: finding2.message, ...finding2.ruleCode ? { ruleCode: finding2.ruleCode } : {} });
|
|
20647
20807
|
}
|
|
20808
|
+
for (const finding2 of deadTopBarFindings(descriptor)) {
|
|
20809
|
+
issues.push({ severity: "error", pass: "dead-control", path: finding2.path, message: finding2.message, ruleCode: finding2.ruleCode });
|
|
20810
|
+
}
|
|
20811
|
+
for (const finding2 of deadButtonFindings(descriptor)) {
|
|
20812
|
+
issues.push({ severity: hygiene, pass: "dead-control", path: finding2.path, message: finding2.message, ruleCode: "button_no_action" });
|
|
20813
|
+
}
|
|
20814
|
+
if (opts.translationKeys) {
|
|
20815
|
+
for (const finding2 of missingTranslationKeyFindings(descriptor, opts.translationKeys)) {
|
|
20816
|
+
issues.push({ severity: "error", pass: "l10n", path: finding2.path, message: finding2.message, ruleCode: "l10n_missing_key" });
|
|
20817
|
+
}
|
|
20818
|
+
}
|
|
20819
|
+
for (const f2 of collectKeyShapedLiterals(descriptor, opts.translationKeys)) {
|
|
20820
|
+
issues.push({
|
|
20821
|
+
severity: hygiene,
|
|
20822
|
+
pass: "l10n",
|
|
20823
|
+
path: f2.path,
|
|
20824
|
+
ruleCode: "l10n_key_literal",
|
|
20825
|
+
message: `${f2.type ?? "The screen"}.${f2.prop} is ${JSON.stringify(f2.value)}, which is shaped like a translation key, so the screen shows the key itself. Write the copy, or \`$t:${f2.value}\` with a catalog entry`
|
|
20826
|
+
});
|
|
20827
|
+
}
|
|
20648
20828
|
issues.push(...depthIssues);
|
|
20649
20829
|
const bindings = collectServiceBindings(descriptor);
|
|
20650
20830
|
const descriptorActions = collectDescriptorActions(descriptor);
|
|
@@ -21298,7 +21478,7 @@ function validateAppWebViewInstances(screens, opts) {
|
|
|
21298
21478
|
];
|
|
21299
21479
|
return webViewEmbeddedIssues(findings).map((issue3, i2) => ({ ...issue3, screenId: findings[i2].screenId }));
|
|
21300
21480
|
}
|
|
21301
|
-
var CRAWL_BLOCKING_PASSES, BOOT_EVAL_TIMEOUT_MS, BUNDLE_FILENAME, DRIFT_PROBES, DEVICE_NETWORK_WITHHELD, DEVICE_STRIPPED_HOST_GLOBALS, DEVICE_WITHHELD, DEVICE_PARITY_CANDIDATES, DEVICE_PARITY_WITHHELD, defaultEvaluator, bootEvaluator, actionEvaluator, NATIVE_PROP_ENUMS, KNOWN_PROPS, IN_ARRAY_BINDING_PROPS, SERVICE_SIGIL, INTEGER_PROPS, NESTED_COMPONENT_SLOTS, NESTED_SLOT_DECODE_KILL, NATIVE_REQUIRED_PROPS, bareNestedClass, NATIVE_NESTED_CLASSES, NATIVE_MODIFIERS_CLASS, NATIVE_NESTED_SCALARS, NATIVE_DESCRIPTOR_CLASS, NATIVE_DESCRIPTOR_NESTED, NATIVE_NESTED_PROPS, LENIENT_TOP_BAR_BLOCKS, MODIFIER_KEYS, INTEGER_MODIFIERS, MODIFIER_KINDS, SCHEMA_SCORED_NODES, CORE_PACKAGES, LEGACY_UNSCORED_KEYS, DYNAMIC_PLACEHOLDER, LITERAL_ONLY_PROPS, SERVICE_ONLY_BINDING_PROPS, WHOLE_VALUE_BINDING, EMBEDDED_BINDING, OPTIONS_BINDING_PROPS, EDITOR_SERVICE_NAME, SHEET_PLACEMENTS, UNSAFE_TO_RECURSE_DEPTH, TOP_BAR_TRAILING_LIMIT, TOP_BAR_NON_TRAILING, TOP_BAR_TITLE_ALIGN_VALUES, TOP_BAR_TITLE_DISPLAY_VALUES, TOP_BAR_SEARCH_BINDINGS, TOP_BAR_SEARCH_GATE, TAB_BAR_KINDS_WITHOUT_BOTTOM_TABS, BUTTON_STYLES, PROP_VALUE_ENUMS, PROP_VALUE_DEFAULTS, EMPTY_STATE_ACTION_STYLES, EMPTY_STATE_ACTION_SIZES;
|
|
21481
|
+
var CRAWL_BLOCKING_PASSES, BOOT_EVAL_TIMEOUT_MS, BUNDLE_FILENAME, DRIFT_PROBES, DEVICE_NETWORK_WITHHELD, DEVICE_STRIPPED_HOST_GLOBALS, DEVICE_WITHHELD, DEVICE_PARITY_CANDIDATES, DEVICE_PARITY_WITHHELD, defaultEvaluator, bootEvaluator, actionEvaluator, NATIVE_PROP_ENUMS, KNOWN_PROPS, IN_ARRAY_BINDING_PROPS, SERVICE_SIGIL, INTEGER_PROPS, NESTED_COMPONENT_SLOTS, NESTED_SLOT_DECODE_KILL, NATIVE_REQUIRED_PROPS, bareNestedClass, NATIVE_NESTED_CLASSES, NATIVE_MODIFIERS_CLASS, NATIVE_NESTED_SCALARS, NATIVE_DESCRIPTOR_CLASS, NATIVE_DESCRIPTOR_NESTED, NATIVE_NESTED_PROPS, LENIENT_TOP_BAR_BLOCKS, MODIFIER_KEYS, INTEGER_MODIFIERS, MODIFIER_KINDS, SCHEMA_SCORED_NODES, CORE_PACKAGES, LEGACY_UNSCORED_KEYS, DYNAMIC_PLACEHOLDER, LITERAL_ONLY_PROPS, SERVICE_ONLY_BINDING_PROPS, WHOLE_VALUE_BINDING, EMBEDDED_BINDING, OPTIONS_BINDING_PROPS, EDITOR_SERVICE_NAME, SHEET_PLACEMENTS, UNSAFE_TO_RECURSE_DEPTH, TOP_BAR_TRAILING_LIMIT, TOP_BAR_NON_TRAILING, TOP_BAR_TITLE_ALIGN_VALUES, TOP_BAR_TITLE_DISPLAY_VALUES, TOP_BAR_SEARCH_BINDINGS, TOP_BAR_SEARCH_GATE, PRESS_PROPS, PRESS_OWNING_SLOTS, TAB_BAR_KINDS_WITHOUT_BOTTOM_TABS, BUTTON_STYLES, PROP_VALUE_ENUMS, PROP_VALUE_DEFAULTS, EMPTY_STATE_ACTION_STYLES, EMPTY_STATE_ACTION_SIZES;
|
|
21302
21482
|
var init_validate_descriptor_core = __esm({
|
|
21303
21483
|
"../../core/dev-server/src/validate-descriptor.core.ts"() {
|
|
21304
21484
|
init_define_HHP_CATALOG();
|
|
@@ -22489,6 +22669,8 @@ var init_validate_descriptor_core = __esm({
|
|
|
22489
22669
|
TOP_BAR_TITLE_DISPLAY_VALUES = /* @__PURE__ */ new Set(["", "automatic", "large", "inline", "hidden"]);
|
|
22490
22670
|
TOP_BAR_SEARCH_BINDINGS = ["valuePath", "focusPath", "loadingPath", "suggestionsPath", "scopePath"];
|
|
22491
22671
|
TOP_BAR_SEARCH_GATE = "$env:topBarSearch";
|
|
22672
|
+
PRESS_PROPS = /* @__PURE__ */ new Set(["action", "onTap"]);
|
|
22673
|
+
PRESS_OWNING_SLOTS = /* @__PURE__ */ new Set(["anchor", "submitButton"]);
|
|
22492
22674
|
TAB_BAR_KINDS_WITHOUT_BOTTOM_TABS = /* @__PURE__ */ new Set(["single", "drawer", "sidebar"]);
|
|
22493
22675
|
BUTTON_STYLES = /* @__PURE__ */ new Set(["filled", "tonal", "outlined", "text", "elevated", "bordered", "prominent", "plain", "glass", "primary", "secondary", "tertiary", "link", "destructive"]);
|
|
22494
22676
|
PROP_VALUE_ENUMS = {
|
|
@@ -38790,7 +38972,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
38790
38972
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
38791
38973
|
var init_idiom = __esm({
|
|
38792
38974
|
"../../core/ts/src/idiom.ts"() {
|
|
38793
|
-
"use strict";
|
|
38794
38975
|
init_define_HHP_CATALOG();
|
|
38795
38976
|
IDIOM_CONTEXTS = {
|
|
38796
38977
|
ios: { native: ["ios"] },
|
|
@@ -42013,7 +42194,7 @@ function redactBodyString(body) {
|
|
|
42013
42194
|
} catch {
|
|
42014
42195
|
}
|
|
42015
42196
|
}
|
|
42016
|
-
return body.replace(FORM_ASSIGNMENT_RE, (m2, name) => isSensitiveBodyName(name) ? `${name}=${REDACTED}` : m2).replace(JSON_FIELD_RE, (m2, name,
|
|
42197
|
+
return body.replace(FORM_ASSIGNMENT_RE, (m2, name) => isSensitiveBodyName(name) ? `${name}=${REDACTED}` : m2).replace(JSON_FIELD_RE, (m2, name, sep31) => isSensitiveBodyName(name) ? `"${name}"${sep31}"${REDACTED}"` : m2).replace(JSON_FIELD_UNTERMINATED_RE, (m2, name, sep31) => isSensitiveBodyName(name) ? `"${name}"${sep31}"${REDACTED}` : m2).replace(BEARER_RE, (_m, s5) => `${s5} ${REDACTED}`);
|
|
42017
42198
|
}
|
|
42018
42199
|
function createWixGatewayState() {
|
|
42019
42200
|
return { mode: "record", rules: [], traffic: [], clients: /* @__PURE__ */ new Set(), seq: 0, ruleSeq: 0 };
|
|
@@ -44594,13 +44775,62 @@ function pluralCategoryFallback(n2, locale) {
|
|
|
44594
44775
|
const lang = (locale || "en").split(/[-_]/)[0].toLowerCase();
|
|
44595
44776
|
const i2 = Math.floor(Math.abs(n2));
|
|
44596
44777
|
const isInt = Number.isInteger(n2);
|
|
44778
|
+
const m10 = i2 % 10;
|
|
44779
|
+
const m100 = i2 % 100;
|
|
44780
|
+
const millions = isInt && i2 !== 0 && i2 % 1e6 === 0;
|
|
44597
44781
|
switch (lang) {
|
|
44598
44782
|
case "he":
|
|
44599
|
-
if (i2 === 1 && isInt) return "one";
|
|
44783
|
+
if (i2 === 1 && isInt || i2 === 0 && !isInt) return "one";
|
|
44600
44784
|
if (i2 === 2 && isInt) return "two";
|
|
44601
44785
|
return "other";
|
|
44602
|
-
case "
|
|
44786
|
+
case "fr":
|
|
44787
|
+
case "pt":
|
|
44788
|
+
if (i2 === 0 || i2 === 1) return "one";
|
|
44789
|
+
return millions ? "many" : "other";
|
|
44603
44790
|
case "es":
|
|
44791
|
+
case "it":
|
|
44792
|
+
if (i2 === 1 && isInt) return "one";
|
|
44793
|
+
return millions ? "many" : "other";
|
|
44794
|
+
case "da":
|
|
44795
|
+
if (isInt ? i2 === 1 : i2 === 0 || i2 === 1) return "one";
|
|
44796
|
+
return "other";
|
|
44797
|
+
case "cs":
|
|
44798
|
+
if (!isInt) return "many";
|
|
44799
|
+
if (i2 === 1) return "one";
|
|
44800
|
+
return i2 >= 2 && i2 <= 4 ? "few" : "other";
|
|
44801
|
+
case "pl":
|
|
44802
|
+
if (!isInt) return "other";
|
|
44803
|
+
if (i2 === 1) return "one";
|
|
44804
|
+
if (m10 >= 2 && m10 <= 4 && !(m100 >= 12 && m100 <= 14)) return "few";
|
|
44805
|
+
return "many";
|
|
44806
|
+
case "ru":
|
|
44807
|
+
case "uk":
|
|
44808
|
+
if (!isInt) return "other";
|
|
44809
|
+
if (m10 === 1 && m100 !== 11) return "one";
|
|
44810
|
+
if (m10 >= 2 && m10 <= 4 && !(m100 >= 12 && m100 <= 14)) return "few";
|
|
44811
|
+
return "many";
|
|
44812
|
+
case "lt": {
|
|
44813
|
+
if (!isInt) return "many";
|
|
44814
|
+
const tail = m100 >= 11 && m100 <= 19;
|
|
44815
|
+
if (m10 === 1 && !tail) return "one";
|
|
44816
|
+
return m10 >= 2 && !tail ? "few" : "other";
|
|
44817
|
+
}
|
|
44818
|
+
case "ar": {
|
|
44819
|
+
if (!isInt) return "other";
|
|
44820
|
+
if (i2 === 0) return "zero";
|
|
44821
|
+
if (i2 === 1) return "one";
|
|
44822
|
+
if (i2 === 2) return "two";
|
|
44823
|
+
if (m100 >= 3 && m100 <= 10) return "few";
|
|
44824
|
+
return m100 >= 11 ? "many" : "other";
|
|
44825
|
+
}
|
|
44826
|
+
case "id":
|
|
44827
|
+
case "ja":
|
|
44828
|
+
case "ko":
|
|
44829
|
+
case "th":
|
|
44830
|
+
case "vi":
|
|
44831
|
+
case "zh":
|
|
44832
|
+
return "other";
|
|
44833
|
+
case "en":
|
|
44604
44834
|
default:
|
|
44605
44835
|
return i2 === 1 && isInt ? "one" : "other";
|
|
44606
44836
|
}
|
|
@@ -48967,10 +49197,10 @@ async function runRicosImageUpload(o2) {
|
|
|
48967
49197
|
} catch {
|
|
48968
49198
|
return fail12("read");
|
|
48969
49199
|
}
|
|
48970
|
-
const
|
|
49200
|
+
const sep31 = entry.uploadUrl.includes("?") ? "&" : "?";
|
|
48971
49201
|
let res;
|
|
48972
49202
|
try {
|
|
48973
|
-
res = await deps.fetch(`${entry.uploadUrl}${
|
|
49203
|
+
res = await deps.fetch(`${entry.uploadUrl}${sep31}filename=${encodeURIComponent(file2.fileName)}`, { method: "PUT", headers: { "Content-Type": file2.mimeType }, body });
|
|
48974
49204
|
} catch {
|
|
48975
49205
|
return fail12("put");
|
|
48976
49206
|
}
|
|
@@ -49613,10 +49843,10 @@ async function runMediaFieldUpload(o2) {
|
|
|
49613
49843
|
} catch (e2) {
|
|
49614
49844
|
return { ok: false, reason: e2 instanceof Deadline ? "timeout" : "read" };
|
|
49615
49845
|
}
|
|
49616
|
-
const
|
|
49846
|
+
const sep31 = uploadUrl.includes("?") ? "&" : "?";
|
|
49617
49847
|
let res;
|
|
49618
49848
|
try {
|
|
49619
|
-
res = await bounded2(deps.fetch(`${uploadUrl}${
|
|
49849
|
+
res = await bounded2(deps.fetch(`${uploadUrl}${sep31}filename=${encodeURIComponent(file2.fileName)}`, {
|
|
49620
49850
|
method: "PUT",
|
|
49621
49851
|
headers: { "Content-Type": file2.mimeType },
|
|
49622
49852
|
body,
|
|
@@ -133398,8 +133628,8 @@ function ensureCountUpRuntime() {
|
|
|
133398
133628
|
const neg = fixed.startsWith("-");
|
|
133399
133629
|
const body = neg ? fixed.slice(1) : fixed;
|
|
133400
133630
|
const [int3, frac] = body.split(".");
|
|
133401
|
-
const
|
|
133402
|
-
return (neg ? "-" : "") +
|
|
133631
|
+
const sep31 = int3.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
133632
|
+
return (neg ? "-" : "") + sep31 + (frac ? "." + frac : "");
|
|
133403
133633
|
};
|
|
133404
133634
|
const animateEl = (el2) => {
|
|
133405
133635
|
const node3 = el2;
|
|
@@ -143913,7 +144143,7 @@ function nodeHidden(modifiers, provider, itemScope, env) {
|
|
|
143913
144143
|
return false;
|
|
143914
144144
|
}
|
|
143915
144145
|
function isObservedTextProp(type2, key4) {
|
|
143916
|
-
return TREE_TEXT_VALUE_PROPS.has(key4) || type2 === "ListItem" && key4 === "subtitle" || type2 === "EmptyState" && (key4 === "subtitle" || key4 === "actionLabel");
|
|
144146
|
+
return TREE_TEXT_VALUE_PROPS.has(key4) || type2 === "ListItem" && key4 === "subtitle" || type2 === "EmptyState" && (key4 === "subtitle" || key4 === "actionLabel") || type2 === "ErrorState" && (key4 === "body" || key4 === "ctaLabel");
|
|
143917
144147
|
}
|
|
143918
144148
|
function resolveTreeScalar(v2, provider, itemScope) {
|
|
143919
144149
|
if (typeof v2 !== "string") return v2;
|
|
@@ -144018,6 +144248,17 @@ function buildRenderTree(node3, path2 = "$", provider = null, itemScope = void 0
|
|
|
144018
144248
|
const actionLabel = props2.action != null ? painted2(props2.actionLabel) : void 0;
|
|
144019
144249
|
if (actionLabel !== void 0) values.actionLabel = actionLabel;
|
|
144020
144250
|
}
|
|
144251
|
+
if (type2 === "ErrorState") {
|
|
144252
|
+
const painted2 = (raw) => {
|
|
144253
|
+
if (typeof raw !== "string") return void 0;
|
|
144254
|
+
const r3 = resolveTreeScalar(raw, provider, itemScope);
|
|
144255
|
+
return typeof r3 === "string" && r3.trim() !== "" ? r3 : void 0;
|
|
144256
|
+
};
|
|
144257
|
+
const body2 = painted2(props2.body);
|
|
144258
|
+
if (body2 !== void 0) values.body = body2;
|
|
144259
|
+
const ctaLabel = props2.cta != null ? painted2(props2.ctaLabel) : void 0;
|
|
144260
|
+
if (ctaLabel !== void 0) values.ctaLabel = ctaLabel;
|
|
144261
|
+
}
|
|
144021
144262
|
const template = props2.template;
|
|
144022
144263
|
if (type2 === "Text" && template && typeof template.template === "string") {
|
|
144023
144264
|
const args = Object.fromEntries(Object.entries(template.params ?? {}).map(([key4, value2]) => [key4, resolveTreeScalar(value2, provider, itemScope)]));
|
|
@@ -146106,6 +146347,18 @@ async function nativeActionsFor(state) {
|
|
|
146106
146347
|
function isWellFormedAppParam(app2) {
|
|
146107
146348
|
return /^(?=.{1,63}$)[a-z0-9][a-z0-9-]*(?:\.[a-z0-9][a-z0-9-]*)?$/.test(app2);
|
|
146108
146349
|
}
|
|
146350
|
+
function sourceTranslationKeys(state) {
|
|
146351
|
+
if (!state.app) return void 0;
|
|
146352
|
+
const tag = uiConfig(state.app.module.config).locale?.default ?? "en";
|
|
146353
|
+
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(tag)) return /* @__PURE__ */ new Set();
|
|
146354
|
+
const path2 = resolve34(state.app.dir, "l10n", `${tag}.json`);
|
|
146355
|
+
if (!existsSync40(path2)) return /* @__PURE__ */ new Set();
|
|
146356
|
+
try {
|
|
146357
|
+
return new Set(keyMap(parseCatalog(readFileSync43(path2, "utf8")), { sourceFallback: true }).keys());
|
|
146358
|
+
} catch {
|
|
146359
|
+
return /* @__PURE__ */ new Set();
|
|
146360
|
+
}
|
|
146361
|
+
}
|
|
146109
146362
|
function handleL10nRequest(req, res, state) {
|
|
146110
146363
|
const u2 = new URL(req.url ?? "", "http://localhost");
|
|
146111
146364
|
const app2 = (u2.searchParams.get("app") ?? "").trim();
|
|
@@ -146169,6 +146422,7 @@ async function runScreenDiagnostics(state, screenId, descriptor) {
|
|
|
146169
146422
|
appServices: appServicesContextFor2(state.app?.dir, state.app?.module.config, state.tier5Dir ?? TIER5_ROOT2),
|
|
146170
146423
|
strict: false,
|
|
146171
146424
|
workerSubtreeScreens: new Set(uiConfig(state.app?.module.config).workerSubtreeScreens ?? []),
|
|
146425
|
+
translationKeys: sourceTranslationKeys(state),
|
|
146172
146426
|
// Same a11y rung the build lint applies (RFC 0058 §5) — diagnostics must not disagree.
|
|
146173
146427
|
a11y: uiConfig(state.app?.module.config).a11y
|
|
146174
146428
|
});
|
|
@@ -148375,6 +148629,7 @@ async function handleAdminPlayground(req, res, state) {
|
|
|
148375
148629
|
appServices: appServicesContextFor2(state.app?.dir, state.app?.module.config, state.tier5Dir ?? TIER5_ROOT2),
|
|
148376
148630
|
strict,
|
|
148377
148631
|
workerSubtreeScreens: new Set(uiConfig(state.app?.module.config).workerSubtreeScreens ?? []),
|
|
148632
|
+
translationKeys: sourceTranslationKeys(state),
|
|
148378
148633
|
a11y: uiConfig(state.app?.module.config).a11y
|
|
148379
148634
|
});
|
|
148380
148635
|
return sendJson(res, report9.ok ? 200 : 422, report9);
|
|
@@ -148744,8 +148999,8 @@ async function handleActionHandlerBundleGet(res, app2) {
|
|
|
148744
148999
|
}
|
|
148745
149000
|
async function serveStatic(req, res, root, prefix) {
|
|
148746
149001
|
const requested = decodeURIComponent((req.url ?? "").split("?")[0]);
|
|
148747
|
-
const
|
|
148748
|
-
const safe = normalize4(
|
|
149002
|
+
const relative33 = requested.replace(prefix, "").replace(/^\//, "");
|
|
149003
|
+
const safe = normalize4(relative33).replace(/^(\.\.[\/\\])+/, "");
|
|
148749
149004
|
const fullPath = resolve34(root, safe);
|
|
148750
149005
|
if (!fullPath.startsWith(root)) {
|
|
148751
149006
|
return send(res, 403, "forbidden");
|
|
@@ -151177,6 +151432,9 @@ function renderedValueDefect(value2, field, componentType = "", l10nKeys) {
|
|
|
151177
151432
|
const key4 = translationKey(v2);
|
|
151178
151433
|
if (key4 === null || !l10nKeys?.get(key4)) return { kind: "unsubstituted-binding", actual: tKey[0].trim() };
|
|
151179
151434
|
}
|
|
151435
|
+
if (field !== "value" && isObservedTextProp(componentType, field) && l10nKeys?.has(v2)) {
|
|
151436
|
+
return { kind: "placeholder-in-text", actual: v2, translationKey: true };
|
|
151437
|
+
}
|
|
151180
151438
|
if (value2.includes("[object Object]")) return { kind: "placeholder-in-text", actual: "[object Object]" };
|
|
151181
151439
|
if (/^[[{]/.test(v2)) {
|
|
151182
151440
|
try {
|
|
@@ -151197,6 +151455,9 @@ function resolvedDefectMessage(defect) {
|
|
|
151197
151455
|
return `visible text is "${defect.actual}"`;
|
|
151198
151456
|
}
|
|
151199
151457
|
function resolvedDefectHint(defect) {
|
|
151458
|
+
if (defect.translationKey) {
|
|
151459
|
+
return "the text is a translation key, not copy \u2014 return the copy from the worker, or a `$t:` key the app's l10n catalog answers";
|
|
151460
|
+
}
|
|
151200
151461
|
if (defect.kind === "unsubstituted-binding") {
|
|
151201
151462
|
return "the bound path resolved to nothing, so the raw token reaches the screen \u2014 check the service name and path against the worker's state";
|
|
151202
151463
|
}
|
|
@@ -152539,8 +152800,8 @@ async function crawlScreenInner(opts) {
|
|
|
152539
152800
|
if (linkable.has(target)) return true;
|
|
152540
152801
|
for (const base2 of linkable) {
|
|
152541
152802
|
if (target.length > base2.length + 1 && target.startsWith(base2)) {
|
|
152542
|
-
const
|
|
152543
|
-
if (
|
|
152803
|
+
const sep31 = target[base2.length];
|
|
152804
|
+
if (sep31 === "_" || sep31 === "/") return true;
|
|
152544
152805
|
}
|
|
152545
152806
|
}
|
|
152546
152807
|
return false;
|
|
@@ -153800,6 +154061,7 @@ __export(build_exports2, {
|
|
|
153800
154061
|
servicesFromBundleJs: () => servicesFromBundleJs,
|
|
153801
154062
|
shellSha: () => shellSha,
|
|
153802
154063
|
snapshotTokens: () => snapshotTokens,
|
|
154064
|
+
sourceTranslationKeys: () => sourceTranslationKeys2,
|
|
153803
154065
|
tokensSnapshotMessage: () => tokensSnapshotMessage,
|
|
153804
154066
|
unsupportedComponentMinVersions: () => unsupportedComponentMinVersions,
|
|
153805
154067
|
withPinnedRelease: () => withPinnedRelease,
|
|
@@ -153807,8 +154069,8 @@ __export(build_exports2, {
|
|
|
153807
154069
|
withoutDevOnlyAppConfig: () => withoutDevOnlyAppConfig
|
|
153808
154070
|
});
|
|
153809
154071
|
import { createHash as createHash23 } from "node:crypto";
|
|
153810
|
-
import { readFileSync as readFileSync46, readdirSync as readdirSync25, existsSync as existsSync43 } from "node:fs";
|
|
153811
|
-
import { dirname as dirname28, join as join37, resolve as resolve36 } from "node:path";
|
|
154072
|
+
import { readFileSync as readFileSync46, readdirSync as readdirSync25, existsSync as existsSync43, realpathSync as realpathSync6 } from "node:fs";
|
|
154073
|
+
import { dirname as dirname28, join as join37, resolve as resolve36, sep as sep13 } from "node:path";
|
|
153812
154074
|
import { fileURLToPath as fileURLToPath27 } from "node:url";
|
|
153813
154075
|
import { createRequire as createRequire3 } from "node:module";
|
|
153814
154076
|
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
@@ -153893,6 +154155,21 @@ function l10nLintOptions(locale, appDir3) {
|
|
|
153893
154155
|
}
|
|
153894
154156
|
return { enforce, catalog: catalog4, locales: tags };
|
|
153895
154157
|
}
|
|
154158
|
+
function sourceTranslationKeys2(locale, appDir3) {
|
|
154159
|
+
const tag = locale?.default || "en";
|
|
154160
|
+
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(tag)) return /* @__PURE__ */ new Set();
|
|
154161
|
+
const l10nDir = join37(appDir3, "l10n");
|
|
154162
|
+
const path2 = join37(l10nDir, `${tag}.json`);
|
|
154163
|
+
if (!existsSync43(path2)) return /* @__PURE__ */ new Set();
|
|
154164
|
+
try {
|
|
154165
|
+
const realDir = realpathSync6(l10nDir);
|
|
154166
|
+
const realFile = realpathSync6(path2);
|
|
154167
|
+
if (!realDir.startsWith(realpathSync6(appDir3) + sep13) || dirname28(realFile) !== realDir) return /* @__PURE__ */ new Set();
|
|
154168
|
+
return new Set(keyMap(parseCatalog(readFileSync46(realFile, "utf8")), { sourceFallback: true }).keys());
|
|
154169
|
+
} catch {
|
|
154170
|
+
return /* @__PURE__ */ new Set();
|
|
154171
|
+
}
|
|
154172
|
+
}
|
|
153896
154173
|
async function bakeCatalogs(app2, locale, fetchCatalog, putDoc) {
|
|
153897
154174
|
const out2 = {};
|
|
153898
154175
|
if (!putDoc) return out2;
|
|
@@ -154453,6 +154730,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
154453
154730
|
const linkable = /* @__PURE__ */ new Set();
|
|
154454
154731
|
let bakedAppConfig;
|
|
154455
154732
|
const lintTokens = collect2?.lint || collect2?.render ? readTokensForLint(preloaded) : void 0;
|
|
154733
|
+
const lintTranslationKeys = collect2?.lint ? sourceTranslationKeys2(config.locale, preloaded.dir) : void 0;
|
|
154456
154734
|
const facedTokens = lintTokens && withServedFontFaces(lintTokens, preloaded.dir);
|
|
154457
154735
|
const idiomPolicy = config.idiom;
|
|
154458
154736
|
const renderTokens = facedTokens && idiomPolicy !== void 0 ? { ...facedTokens, idiomPolicy } : facedTokens;
|
|
@@ -154937,6 +155215,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
154937
155215
|
strict: collect2.strict,
|
|
154938
155216
|
workerSubtreeScreens: new Set(config.workerSubtreeScreens ?? []),
|
|
154939
155217
|
l10n: l10nLintOptions(config.locale, preloaded.dir),
|
|
155218
|
+
translationKeys: lintTranslationKeys,
|
|
154940
155219
|
// RFC 0058 §5 — the app's own rung of the a11y ladder. Omitted ⇒ the validator's
|
|
154941
155220
|
// default, "error"; an in-repo app with ratcheted debt declares "warn".
|
|
154942
155221
|
a11y: config.a11y
|
|
@@ -154966,6 +155245,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
154966
155245
|
const res = await devFetch(`${base2}/v1/screen/${wantedRender}`, { headers: { "X-Himalaya-App": app2 } });
|
|
154967
155246
|
if (res.ok) {
|
|
154968
155247
|
const descriptor = await res.json();
|
|
155248
|
+
bakePinnedLanguage?.(descriptor);
|
|
154969
155249
|
delete descriptor.etag;
|
|
154970
155250
|
const lb = logicBundleOf(descriptor);
|
|
154971
155251
|
const bundleName = lb ? bundleNameFromUrl(lb.url) : null;
|
|
@@ -155448,6 +155728,7 @@ var init_build3 = __esm({
|
|
|
155448
155728
|
init_app_services_requirements();
|
|
155449
155729
|
init_app_icon();
|
|
155450
155730
|
init_app_config();
|
|
155731
|
+
init_l10n_catalog();
|
|
155451
155732
|
init_app_assets();
|
|
155452
155733
|
init_plan_fonts();
|
|
155453
155734
|
init_face_source();
|
|
@@ -156650,14 +156931,14 @@ __export(studio_exports, {
|
|
|
156650
156931
|
writeStudioRecord: () => writeStudioRecord
|
|
156651
156932
|
});
|
|
156652
156933
|
import { createHash as createHash24 } from "node:crypto";
|
|
156653
|
-
import { existsSync as existsSync46, readdirSync as readdirSync27, readFileSync as readFileSync49, realpathSync as
|
|
156654
|
-
import { basename as basename12, extname as extname3, join as join40, relative as relative10, resolve as resolve37, sep as
|
|
156934
|
+
import { existsSync as existsSync46, readdirSync as readdirSync27, readFileSync as readFileSync49, realpathSync as realpathSync7, statSync as statSync10 } from "node:fs";
|
|
156935
|
+
import { basename as basename12, extname as extname3, join as join40, relative as relative10, resolve as resolve37, sep as sep14 } from "node:path";
|
|
156655
156936
|
import { pathToFileURL as pathToFileURL6 } from "node:url";
|
|
156656
156937
|
function realInside(dir, abs) {
|
|
156657
156938
|
try {
|
|
156658
|
-
const root =
|
|
156659
|
-
const real =
|
|
156660
|
-
return real.startsWith(root +
|
|
156939
|
+
const root = realpathSync7(dir);
|
|
156940
|
+
const real = realpathSync7(abs);
|
|
156941
|
+
return real.startsWith(root + sep14) ? real : null;
|
|
156661
156942
|
} catch {
|
|
156662
156943
|
return null;
|
|
156663
156944
|
}
|
|
@@ -163040,21 +163321,21 @@ var init_Matcher = __esm({
|
|
|
163040
163321
|
* @returns {string}
|
|
163041
163322
|
*/
|
|
163042
163323
|
toString(separator, includeNamespace = true) {
|
|
163043
|
-
const
|
|
163044
|
-
const isDefault =
|
|
163324
|
+
const sep31 = separator || this.separator;
|
|
163325
|
+
const isDefault = sep31 === this.separator && includeNamespace === true;
|
|
163045
163326
|
if (isDefault) {
|
|
163046
163327
|
if (this._pathStringCache !== null) {
|
|
163047
163328
|
return this._pathStringCache;
|
|
163048
163329
|
}
|
|
163049
163330
|
const result = this.path.map(
|
|
163050
163331
|
(n2) => n2.namespace ? `${n2.namespace}:${n2.tag}` : n2.tag
|
|
163051
|
-
).join(
|
|
163332
|
+
).join(sep31);
|
|
163052
163333
|
this._pathStringCache = result;
|
|
163053
163334
|
return result;
|
|
163054
163335
|
}
|
|
163055
163336
|
return this.path.map(
|
|
163056
163337
|
(n2) => includeNamespace && n2.namespace ? `${n2.namespace}:${n2.tag}` : n2.tag
|
|
163057
|
-
).join(
|
|
163338
|
+
).join(sep31);
|
|
163058
163339
|
}
|
|
163059
163340
|
/**
|
|
163060
163341
|
* Get path as array of tag names.
|
|
@@ -163764,77 +164045,77 @@ var init_redos = __esm({
|
|
|
163764
164045
|
});
|
|
163765
164046
|
|
|
163766
164047
|
// ../../node_modules/is-unsafe/src/contexts/nosql.js
|
|
163767
|
-
var
|
|
164048
|
+
var sep15, NOSQL_PATTERNS, nosql_default;
|
|
163768
164049
|
var init_nosql = __esm({
|
|
163769
164050
|
"../../node_modules/is-unsafe/src/contexts/nosql.js"() {
|
|
163770
164051
|
init_define_HHP_CATALOG();
|
|
163771
|
-
|
|
164052
|
+
sep15 = `["'\\s]*:`;
|
|
163772
164053
|
NOSQL_PATTERNS = [
|
|
163773
164054
|
// ─── MongoDB $ operator injection ────────────────────────────────────────
|
|
163774
164055
|
{
|
|
163775
164056
|
id: "nosql-where-operator",
|
|
163776
164057
|
description: "$where \u2014 executes arbitrary JavaScript server-side in MongoDB",
|
|
163777
|
-
pattern: new RegExp(`\\$where${
|
|
164058
|
+
pattern: new RegExp(`\\$where${sep15}`, "i")
|
|
163778
164059
|
},
|
|
163779
164060
|
{
|
|
163780
164061
|
id: "nosql-ne-operator",
|
|
163781
164062
|
description: '$ne \u2014 "not equal" operator used to bypass equality checks',
|
|
163782
|
-
pattern: new RegExp(`\\$ne${
|
|
164063
|
+
pattern: new RegExp(`\\$ne${sep15}`, "i")
|
|
163783
164064
|
},
|
|
163784
164065
|
{
|
|
163785
164066
|
id: "nosql-gt-operator",
|
|
163786
164067
|
description: '$gt \u2014 "greater than" used to bypass password/value checks',
|
|
163787
|
-
pattern: new RegExp(`\\$gte?${
|
|
164068
|
+
pattern: new RegExp(`\\$gte?${sep15}`, "i")
|
|
163788
164069
|
},
|
|
163789
164070
|
{
|
|
163790
164071
|
id: "nosql-lt-operator",
|
|
163791
164072
|
description: '$lt / $lte \u2014 "less than" bypass variants',
|
|
163792
|
-
pattern: new RegExp(`\\$lte?${
|
|
164073
|
+
pattern: new RegExp(`\\$lte?${sep15}`, "i")
|
|
163793
164074
|
},
|
|
163794
164075
|
{
|
|
163795
164076
|
id: "nosql-regex-operator",
|
|
163796
164077
|
description: "$regex \u2014 can be used to extract data character by character (blind injection)",
|
|
163797
|
-
pattern: new RegExp(`\\$regex${
|
|
164078
|
+
pattern: new RegExp(`\\$regex${sep15}`, "i")
|
|
163798
164079
|
},
|
|
163799
164080
|
{
|
|
163800
164081
|
id: "nosql-or-operator",
|
|
163801
164082
|
description: "$or \u2014 logical OR; used to create always-true conditions",
|
|
163802
|
-
pattern: new RegExp(`\\$or${
|
|
164083
|
+
pattern: new RegExp(`\\$or${sep15}\\s*\\[`, "i")
|
|
163803
164084
|
},
|
|
163804
164085
|
{
|
|
163805
164086
|
id: "nosql-and-operator",
|
|
163806
164087
|
description: "$and \u2014 logical AND operator injection",
|
|
163807
|
-
pattern: new RegExp(`\\$and${
|
|
164088
|
+
pattern: new RegExp(`\\$and${sep15}\\s*\\[`, "i")
|
|
163808
164089
|
},
|
|
163809
164090
|
{
|
|
163810
164091
|
id: "nosql-nor-operator",
|
|
163811
164092
|
description: "$nor \u2014 logical NOR operator injection",
|
|
163812
|
-
pattern: new RegExp(`\\$nor${
|
|
164093
|
+
pattern: new RegExp(`\\$nor${sep15}\\s*\\[`, "i")
|
|
163813
164094
|
},
|
|
163814
164095
|
{
|
|
163815
164096
|
id: "nosql-exists-operator",
|
|
163816
164097
|
description: "$exists \u2014 can enumerate fields to determine schema",
|
|
163817
|
-
pattern: new RegExp(`\\$exists${
|
|
164098
|
+
pattern: new RegExp(`\\$exists${sep15}`, "i")
|
|
163818
164099
|
},
|
|
163819
164100
|
{
|
|
163820
164101
|
id: "nosql-in-operator",
|
|
163821
164102
|
description: "$in \u2014 matches any value in a list; can enumerate values",
|
|
163822
|
-
pattern: new RegExp(`\\$in${
|
|
164103
|
+
pattern: new RegExp(`\\$in${sep15}\\s*\\[`, "i")
|
|
163823
164104
|
},
|
|
163824
164105
|
{
|
|
163825
164106
|
id: "nosql-expr-operator",
|
|
163826
164107
|
description: "$expr \u2014 allows aggregation expressions in queries (MongoDB 3.6+)",
|
|
163827
|
-
pattern: new RegExp(`\\$expr${
|
|
164108
|
+
pattern: new RegExp(`\\$expr${sep15}`, "i")
|
|
163828
164109
|
},
|
|
163829
164110
|
{
|
|
163830
164111
|
id: "nosql-function-operator",
|
|
163831
164112
|
description: "$function \u2014 executes arbitrary JavaScript in MongoDB 4.4+",
|
|
163832
|
-
pattern: new RegExp(`\\$function${
|
|
164113
|
+
pattern: new RegExp(`\\$function${sep15}`, "i")
|
|
163833
164114
|
},
|
|
163834
164115
|
{
|
|
163835
164116
|
id: "nosql-accumulator-operator",
|
|
163836
164117
|
description: "$accumulator \u2014 custom aggregation with arbitrary JS execution",
|
|
163837
|
-
pattern: new RegExp(`\\$accumulator${
|
|
164118
|
+
pattern: new RegExp(`\\$accumulator${sep15}`, "i")
|
|
163838
164119
|
},
|
|
163839
164120
|
// ─── Prototype pollution ─────────────────────────────────────────────────
|
|
163840
164121
|
{
|
|
@@ -166651,10 +166932,10 @@ __export(content_manifest_exports, {
|
|
|
166651
166932
|
writeContentManifest: () => writeContentManifest
|
|
166652
166933
|
});
|
|
166653
166934
|
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
166654
|
-
import { constants as constants2, lstatSync as lstatSync17, readFileSync as readFileSync57, realpathSync as
|
|
166935
|
+
import { constants as constants2, lstatSync as lstatSync17, readFileSync as readFileSync57, realpathSync as realpathSync8, writeFileSync as writeFileSync20, renameSync as renameSync9, openSync as openSync3, closeSync as closeSync3, unlinkSync as unlinkSync2 } from "node:fs";
|
|
166655
166936
|
import { join as join45 } from "node:path";
|
|
166656
166937
|
function contentManifestPath(dir) {
|
|
166657
|
-
const path2 = join45(
|
|
166938
|
+
const path2 = join45(realpathSync8(dir), "himalaya.content.json");
|
|
166658
166939
|
try {
|
|
166659
166940
|
if (lstatSync17(path2).isSymbolicLink()) throw new Error("himalaya.content.json is a symlink \u2014 refusing to read or write through it");
|
|
166660
166941
|
} catch (error) {
|
|
@@ -167145,11 +167426,13 @@ __export(template_trim_exports, {
|
|
|
167145
167426
|
compareErrors: () => compareErrors,
|
|
167146
167427
|
leftoverNavRefs: () => leftoverNavRefs,
|
|
167147
167428
|
linearSafePattern: () => linearSafePattern,
|
|
167429
|
+
listWorkers: () => listWorkers,
|
|
167148
167430
|
parseApp: () => parseApp,
|
|
167149
167431
|
planTrim: () => planTrim,
|
|
167150
167432
|
routeMatcher: () => routeMatcher,
|
|
167151
167433
|
runTemplateTrim: () => runTemplateTrim,
|
|
167152
|
-
trimCapabilities: () => trimCapabilities
|
|
167434
|
+
trimCapabilities: () => trimCapabilities,
|
|
167435
|
+
workersInUse: () => workersInUse
|
|
167153
167436
|
});
|
|
167154
167437
|
import { cpSync, existsSync as existsSync54, mkdirSync as mkdirSync26, readdirSync as readdirSync29, readFileSync as readFileSync58, renameSync as renameSync10, rmSync as rmSync15, statSync as statSync15, writeFileSync as writeFileSync21 } from "node:fs";
|
|
167155
167438
|
import { dirname as dirname32, join as join46 } from "node:path";
|
|
@@ -167771,6 +168054,29 @@ function workerPinnedScreens(route) {
|
|
|
167771
168054
|
walk4(route.block);
|
|
167772
168055
|
return out2;
|
|
167773
168056
|
}
|
|
168057
|
+
function workersInUse(config, routes, workerFiles) {
|
|
168058
|
+
const configBundles = new Set([...config.matchAll(/\/v1\/bundles\/([A-Za-z0-9_-]+)/g)].map((m2) => m2[1]));
|
|
168059
|
+
const used = /* @__PURE__ */ new Set(["_shared", ...configBundles]);
|
|
168060
|
+
for (const r3 of routes) for (const b3 of r3.bundles) used.add(b3);
|
|
168061
|
+
const importsOf2 = (dir) => {
|
|
168062
|
+
const out2 = [];
|
|
168063
|
+
for (const [rel2, text25] of Object.entries(workerFiles)) {
|
|
168064
|
+
if (!rel2.startsWith(`tier5-src/${dir}/`)) continue;
|
|
168065
|
+
for (const m2 of text25.matchAll(/(?:\bfrom\s*|\bimport\s*\(?\s*|\brequire\s*\(\s*)["']\.\.\/([A-Za-z0-9_.-]+)(?:\/|["'])/g)) out2.push(m2[1]);
|
|
168066
|
+
}
|
|
168067
|
+
return out2;
|
|
168068
|
+
};
|
|
168069
|
+
const pending2 = [...used];
|
|
168070
|
+
while (pending2.length) {
|
|
168071
|
+
for (const dep of importsOf2(pending2.pop())) {
|
|
168072
|
+
if (!used.has(dep)) {
|
|
168073
|
+
used.add(dep);
|
|
168074
|
+
pending2.push(dep);
|
|
168075
|
+
}
|
|
168076
|
+
}
|
|
168077
|
+
}
|
|
168078
|
+
return used;
|
|
168079
|
+
}
|
|
167774
168080
|
function planTrim(src, keepIds, links) {
|
|
167775
168081
|
const app2 = parseApp(src.dev, src.config);
|
|
167776
168082
|
const kept = /* @__PURE__ */ new Set([app2.home]);
|
|
@@ -167924,26 +168230,7 @@ function planTrim(src, keepIds, links) {
|
|
|
167924
168230
|
subtreeRemoved.push(id);
|
|
167925
168231
|
return false;
|
|
167926
168232
|
});
|
|
167927
|
-
const
|
|
167928
|
-
const keptWorkers = /* @__PURE__ */ new Set(["_shared", ...configBundles]);
|
|
167929
|
-
for (const r3 of keptRoutes) for (const b3 of r3.bundles) keptWorkers.add(b3);
|
|
167930
|
-
const importsOf2 = (dir) => {
|
|
167931
|
-
const out2 = [];
|
|
167932
|
-
for (const [rel2, text25] of Object.entries(src.workerFiles)) {
|
|
167933
|
-
if (!rel2.startsWith(`tier5-src/${dir}/`)) continue;
|
|
167934
|
-
for (const m2 of text25.matchAll(/(?:\bfrom\s*|\bimport\s*\(?\s*|\brequire\s*\(\s*)["']\.\.\/([A-Za-z0-9_.-]+)(?:\/|["'])/g)) out2.push(m2[1]);
|
|
167935
|
-
}
|
|
167936
|
-
return out2;
|
|
167937
|
-
};
|
|
167938
|
-
const pending2 = [...keptWorkers];
|
|
167939
|
-
while (pending2.length) {
|
|
167940
|
-
for (const dep of importsOf2(pending2.pop())) {
|
|
167941
|
-
if (!keptWorkers.has(dep)) {
|
|
167942
|
-
keptWorkers.add(dep);
|
|
167943
|
-
pending2.push(dep);
|
|
167944
|
-
}
|
|
167945
|
-
}
|
|
167946
|
-
}
|
|
168233
|
+
const keptWorkers = workersInUse(src.config, keptRoutes, src.workerFiles);
|
|
167947
168234
|
const dirs = new Set(src.workerDirs);
|
|
167948
168235
|
const removedWorkers = sorted(removedRoutes.flatMap((r3) => r3.bundles).filter((b3) => dirs.has(b3) && !keptWorkers.has(b3)));
|
|
167949
168236
|
const workerRefs = [];
|
|
@@ -168487,7 +168774,7 @@ __export(template_adopt_exports, {
|
|
|
168487
168774
|
writeInventory: () => writeInventory
|
|
168488
168775
|
});
|
|
168489
168776
|
import { existsSync as existsSync55, lstatSync as lstatSync18, mkdirSync as mkdirSync27, readdirSync as readdirSync30, readFileSync as readFileSync59, renameSync as renameSync11, statSync as statSync16, writeFileSync as writeFileSync22 } from "node:fs";
|
|
168490
|
-
import { dirname as dirname33, join as join47, posix as posix2 } from "node:path";
|
|
168777
|
+
import { dirname as dirname33, join as join47, posix as posix2, relative as relative12 } from "node:path";
|
|
168491
168778
|
import ts10 from "typescript";
|
|
168492
168779
|
function readAppSources(dir) {
|
|
168493
168780
|
const devPath = join47(dir, "dev", "index.ts");
|
|
@@ -169023,9 +169310,12 @@ function upsertScreens(dir, screens) {
|
|
|
169023
169310
|
}
|
|
169024
169311
|
const files = ["dev/index.ts", "config.ts", "himalaya.content.json"];
|
|
169025
169312
|
const before = new Map(files.map((rel2) => [rel2, existsSync55(join47(dir, rel2)) ? readFileSync59(join47(dir, rel2), "utf8") : void 0]));
|
|
169026
|
-
const
|
|
169313
|
+
const parsedBefore = parseApp(before.get("dev/index.ts") ?? "", before.get("config.ts") ?? "");
|
|
169314
|
+
const existing = new Set(parsedBefore.routes.filter((r3) => r3.kind === "screen").map((r3) => r3.label));
|
|
169315
|
+
const replacedBundles = new Set(parsedBefore.routes.filter((r3) => r3.kind === "screen" && entries.some(([id]) => id === r3.label)).flatMap((r3) => r3.bundles));
|
|
169027
169316
|
const added = [];
|
|
169028
169317
|
const replaced = [];
|
|
169318
|
+
const moved = [];
|
|
169029
169319
|
let used = /* @__PURE__ */ new Set();
|
|
169030
169320
|
try {
|
|
169031
169321
|
const meta = parseScreenMetadata(readContentManifest(dir)?.screens) ?? {};
|
|
@@ -169047,12 +169337,57 @@ function upsertScreens(dir, screens) {
|
|
|
169047
169337
|
added.push(id);
|
|
169048
169338
|
}
|
|
169049
169339
|
}
|
|
169340
|
+
moved.push(...retireUnusedWorkers(dir, replacedBundles));
|
|
169050
169341
|
} catch (e2) {
|
|
169051
169342
|
for (const [rel2, text25] of before) if (text25 !== void 0 && readFileSync59(join47(dir, rel2), "utf8") !== text25) writeNoFollow(dir, rel2, text25);
|
|
169343
|
+
for (const { from, to: to2 } of [...moved].reverse()) {
|
|
169344
|
+
try {
|
|
169345
|
+
renameSync11(to2, from);
|
|
169346
|
+
} catch {
|
|
169347
|
+
}
|
|
169348
|
+
}
|
|
169052
169349
|
const message2 = e2 instanceof Error ? e2.message : String(e2);
|
|
169053
169350
|
throw new TrimRefusal(`--upsert stopped and restored every file: ${message2}`);
|
|
169054
169351
|
}
|
|
169055
|
-
|
|
169352
|
+
const removedWorkers = moved.map((m2) => m2.name);
|
|
169353
|
+
return { ok: true, added, replaced, ...removedWorkers.length ? { removedWorkers, workersBackup: dirname33(relative12(dir, moved[0].to)) } : {} };
|
|
169354
|
+
}
|
|
169355
|
+
function retireUnusedWorkers(dir, candidates) {
|
|
169356
|
+
if (!candidates.size) return [];
|
|
169357
|
+
const src = readAppSources(dir);
|
|
169358
|
+
const workers = listWorkers(dir);
|
|
169359
|
+
const used = workersInUse(src.config, parseApp(src.dev, src.config).routes, workers.files);
|
|
169360
|
+
const unused = [...candidates].filter((name) => /^[A-Za-z0-9_-]+$/.test(name) && workers.dirs.includes(name) && !used.has(name)).sort();
|
|
169361
|
+
if (!unused.length) return [];
|
|
169362
|
+
const real = (rel2) => {
|
|
169363
|
+
const p2 = join47(dir, rel2);
|
|
169364
|
+
if (existsSync55(p2) && lstatSync18(p2).isSymbolicLink()) throw new TrimRefusal(`${rel2} is a symlink \u2014 refusing to move workers through it`);
|
|
169365
|
+
};
|
|
169366
|
+
real("tier5-src");
|
|
169367
|
+
real(".himi");
|
|
169368
|
+
real(join47(".himi", "upsert-backup"));
|
|
169369
|
+
const backup = join47(dir, ".himi", "upsert-backup", (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"));
|
|
169370
|
+
const out2 = [];
|
|
169371
|
+
try {
|
|
169372
|
+
mkdirSync27(backup, { recursive: true });
|
|
169373
|
+
for (const name of unused) {
|
|
169374
|
+
const from = join47(dir, "tier5-src", name);
|
|
169375
|
+
const stat9 = lstatSync18(from);
|
|
169376
|
+
if (stat9.isSymbolicLink() || !stat9.isDirectory()) throw new TrimRefusal(`tier5-src/${name} is not a plain directory \u2014 refusing to move it`);
|
|
169377
|
+
const to2 = join47(backup, name);
|
|
169378
|
+
renameSync11(from, to2);
|
|
169379
|
+
out2.push({ name, from, to: to2 });
|
|
169380
|
+
}
|
|
169381
|
+
} catch (e2) {
|
|
169382
|
+
for (const { from, to: to2 } of out2.reverse()) {
|
|
169383
|
+
try {
|
|
169384
|
+
renameSync11(to2, from);
|
|
169385
|
+
} catch {
|
|
169386
|
+
}
|
|
169387
|
+
}
|
|
169388
|
+
throw e2;
|
|
169389
|
+
}
|
|
169390
|
+
return out2;
|
|
169056
169391
|
}
|
|
169057
169392
|
function removeScreens(dir, ids2) {
|
|
169058
169393
|
const src = readAppSources(dir);
|
|
@@ -170206,7 +170541,7 @@ __export(app_source_exports, {
|
|
|
170206
170541
|
});
|
|
170207
170542
|
import { createHash as createHash29 } from "node:crypto";
|
|
170208
170543
|
import { readdirSync as readdirSync32, lstatSync as lstatSync19, readFileSync as readFileSync63, mkdirSync as mkdirSync29, writeFileSync as writeFileSync24, existsSync as existsSync58, rmSync as rmSync17, rmdirSync as rmdirSync3, unlinkSync as unlinkSync3 } from "node:fs";
|
|
170209
|
-
import { join as join50, resolve as resolve46, sep as
|
|
170544
|
+
import { join as join50, resolve as resolve46, sep as sep16 } from "node:path";
|
|
170210
170545
|
import { createRequire as createRequire4 } from "node:module";
|
|
170211
170546
|
import { deflateRawSync as deflateRawSync2 } from "node:zlib";
|
|
170212
170547
|
function walkSourceTree(dir, file2, skip, enter = () => {
|
|
@@ -170229,7 +170564,7 @@ function walkSourceTree(dir, file2, skip, enter = () => {
|
|
|
170229
170564
|
skip(rel2);
|
|
170230
170565
|
continue;
|
|
170231
170566
|
}
|
|
170232
|
-
file2(rel2.split(
|
|
170567
|
+
file2(rel2.split(sep16).join("/"), rel2);
|
|
170233
170568
|
}
|
|
170234
170569
|
};
|
|
170235
170570
|
walk4("");
|
|
@@ -170293,8 +170628,8 @@ function renderInputRootDirs(dir) {
|
|
|
170293
170628
|
}
|
|
170294
170629
|
function newestSourceChangeMs(dir) {
|
|
170295
170630
|
const roots2 = renderInputRootDirs(dir);
|
|
170296
|
-
const inRead = (hostRel) => !roots2 || roots2.has(hostRel.split(
|
|
170297
|
-
const counts = (hostRel) => !hostRel.includes(
|
|
170631
|
+
const inRead = (hostRel) => !roots2 || roots2.has(hostRel.split(sep16)[0]);
|
|
170632
|
+
const counts = (hostRel) => !hostRel.includes(sep16) || inRead(hostRel);
|
|
170298
170633
|
let newest = 0;
|
|
170299
170634
|
walkSourceTree(
|
|
170300
170635
|
dir,
|
|
@@ -170456,7 +170791,7 @@ function pruneEmptyDirs(root, rel2, needed, removed) {
|
|
|
170456
170791
|
let empty2 = true;
|
|
170457
170792
|
for (const name of readdirSync32(rel2 ? join50(root, rel2) : root)) {
|
|
170458
170793
|
const childRel = rel2 ? join50(rel2, name) : name;
|
|
170459
|
-
const posix5 = childRel.split(
|
|
170794
|
+
const posix5 = childRel.split(sep16).join("/");
|
|
170460
170795
|
const kind = lstatSync19(join50(root, childRel));
|
|
170461
170796
|
if (kind.isSymbolicLink() || !kind.isDirectory() || isDeniedSourceDir(name, rel2)) {
|
|
170462
170797
|
empty2 = false;
|
|
@@ -170540,9 +170875,9 @@ __export(run_watch_exports, {
|
|
|
170540
170875
|
watchedContentDir: () => watchedContentDir,
|
|
170541
170876
|
writeRunRecord: () => writeRunRecord
|
|
170542
170877
|
});
|
|
170543
|
-
import { closeSync as closeSync4, constants as constants3, existsSync as existsSync59, fstatSync, lstatSync as lstatSync20, statSync as statSync18, readdirSync as readdirSync33, mkdirSync as mkdirSync30, openSync as openSync4, readFileSync as readFileSync64, realpathSync as
|
|
170878
|
+
import { closeSync as closeSync4, constants as constants3, existsSync as existsSync59, fstatSync, lstatSync as lstatSync20, statSync as statSync18, readdirSync as readdirSync33, mkdirSync as mkdirSync30, openSync as openSync4, readFileSync as readFileSync64, realpathSync as realpathSync9, renameSync as renameSync12, rmSync as rmSync18, writeFileSync as writeFileSync25, watch as fsWatch } from "node:fs";
|
|
170544
170879
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
170545
|
-
import { extname as extname4, join as join51, relative as
|
|
170880
|
+
import { extname as extname4, join as join51, relative as relative13, resolve as resolve47, sep as sep17 } from "node:path";
|
|
170546
170881
|
function diffReleases(prev, next) {
|
|
170547
170882
|
const bundles = Object.keys(next.bundles).filter((b3) => prev.bundles[b3]?.sha256 !== next.bundles[b3].sha256).sort();
|
|
170548
170883
|
const changedBundles = new Set(bundles);
|
|
@@ -170570,7 +170905,7 @@ function reloadEvents(d2) {
|
|
|
170570
170905
|
function hhpRasterDir(dir) {
|
|
170571
170906
|
const assets = findAssetsDir(dir);
|
|
170572
170907
|
if (!assets) return null;
|
|
170573
|
-
const rel2 =
|
|
170908
|
+
const rel2 = relative13(dir, assets).split(sep17).join("/");
|
|
170574
170909
|
return rel2 ? `${rel2}/hhp-raster` : "hhp-raster";
|
|
170575
170910
|
}
|
|
170576
170911
|
function ignoredChange(relPath, isDirectory = () => false, rasterDir = "assets/hhp-raster") {
|
|
@@ -170798,15 +171133,15 @@ function boardFile(dir, pathname) {
|
|
|
170798
171133
|
function readConfined(root, rel2) {
|
|
170799
171134
|
try {
|
|
170800
171135
|
if (!lstatSync20(root).isDirectory()) return null;
|
|
170801
|
-
const parts = rel2.split(
|
|
171136
|
+
const parts = rel2.split(sep17);
|
|
170802
171137
|
let at2 = root;
|
|
170803
171138
|
for (let i2 = 0; i2 < parts.length; i2++) {
|
|
170804
171139
|
at2 = join51(at2, parts[i2]);
|
|
170805
171140
|
const st2 = lstatSync20(at2);
|
|
170806
171141
|
if (st2.isSymbolicLink() || !(i2 === parts.length - 1 ? st2.isFile() : st2.isDirectory())) return null;
|
|
170807
171142
|
}
|
|
170808
|
-
const canonicalRoot =
|
|
170809
|
-
if (!
|
|
171143
|
+
const canonicalRoot = realpathSync9(root);
|
|
171144
|
+
if (!realpathSync9(at2).startsWith(canonicalRoot + sep17)) return null;
|
|
170810
171145
|
const fd = openSync4(at2, constants3.O_RDONLY | (constants3.O_NOFOLLOW ?? 0));
|
|
170811
171146
|
try {
|
|
170812
171147
|
if (!fstatSync(fd).isFile()) return null;
|
|
@@ -171425,13 +171760,13 @@ import { createHash as createHash32, randomUUID as randomUUID10 } from "node:cry
|
|
|
171425
171760
|
import { spawn as spawn4 } from "node:child_process";
|
|
171426
171761
|
import { closeSync as closeSync5, existsSync as existsSync61, lstatSync as lstatSync23, readFileSync as readFileSync69, statSync as statSync19 } from "node:fs";
|
|
171427
171762
|
import { createServer as createServer3 } from "node:net";
|
|
171428
|
-
import { basename as basename17, dirname as dirname36, isAbsolute as isAbsolute6, join as join56, relative as
|
|
171763
|
+
import { basename as basename17, dirname as dirname36, isAbsolute as isAbsolute6, join as join56, relative as relative14, resolve as resolve48, sep as sep18 } from "node:path";
|
|
171429
171764
|
function homeShotPath(dir, home2) {
|
|
171430
171765
|
const root = resolve48(dir);
|
|
171431
171766
|
const base2 = resolve48(root, ".himi", "shots");
|
|
171432
171767
|
const shot = resolve48(base2, `${home2}.png`);
|
|
171433
|
-
if (!shot.startsWith(base2 +
|
|
171434
|
-
for (let p2 = shot; p2 !== root && p2.startsWith(root +
|
|
171768
|
+
if (!shot.startsWith(base2 + sep18)) return null;
|
|
171769
|
+
for (let p2 = shot; p2 !== root && p2.startsWith(root + sep18); p2 = dirname36(p2)) {
|
|
171435
171770
|
try {
|
|
171436
171771
|
if (lstatSync23(p2).isSymbolicLink()) return null;
|
|
171437
171772
|
} catch {
|
|
@@ -171440,7 +171775,7 @@ function homeShotPath(dir, home2) {
|
|
|
171440
171775
|
return shot;
|
|
171441
171776
|
}
|
|
171442
171777
|
function displayPath(p2, cwd = process.cwd()) {
|
|
171443
|
-
const rel2 =
|
|
171778
|
+
const rel2 = relative14(cwd, p2);
|
|
171444
171779
|
return rel2 && !rel2.startsWith("..") && !isAbsolute6(rel2) ? rel2 : p2;
|
|
171445
171780
|
}
|
|
171446
171781
|
function progressCommand(opts) {
|
|
@@ -171581,7 +171916,7 @@ async function openBoardForSession(dir, cwd = process.cwd()) {
|
|
|
171581
171916
|
try {
|
|
171582
171917
|
const { openStudio: openStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
|
|
171583
171918
|
const { page, url } = openStudio2(dir);
|
|
171584
|
-
const rel2 =
|
|
171919
|
+
const rel2 = relative14(cwd, page);
|
|
171585
171920
|
return { page: rel2 && !rel2.startsWith("..") && !isAbsolute6(rel2) ? rel2 : page, url, opened: false };
|
|
171586
171921
|
} catch (e2) {
|
|
171587
171922
|
return { opened: false, error: `the build board was not created: ${e2.message} \u2014 \`himi studio --no-open\` in the app retries it` };
|
|
@@ -181272,9 +181607,9 @@ function hostOf2(url) {
|
|
|
181272
181607
|
const m2 = /^[A-Za-z][A-Za-z0-9+.-]*:\/\/([^/?#]+)/.exec(url);
|
|
181273
181608
|
return m2 ? m2[1].toLowerCase() : null;
|
|
181274
181609
|
}
|
|
181275
|
-
function splitOnce(s5,
|
|
181276
|
-
const i2 = s5.indexOf(
|
|
181277
|
-
return i2 < 0 ? [s5, void 0] : [s5.slice(0, i2), s5.slice(i2 +
|
|
181610
|
+
function splitOnce(s5, sep31) {
|
|
181611
|
+
const i2 = s5.indexOf(sep31);
|
|
181612
|
+
return i2 < 0 ? [s5, void 0] : [s5.slice(0, i2), s5.slice(i2 + sep31.length)];
|
|
181278
181613
|
}
|
|
181279
181614
|
function stripLeadingSlashes(s5) {
|
|
181280
181615
|
return s5.replace(/^\/+/, "");
|
|
@@ -181976,7 +182311,7 @@ __export(eject_exports, {
|
|
|
181976
182311
|
ejectModule: () => ejectModule
|
|
181977
182312
|
});
|
|
181978
182313
|
import { existsSync as existsSync76, mkdirSync as mkdirSync33, readFileSync as readFileSync85, writeFileSync as writeFileSync30 } from "node:fs";
|
|
181979
|
-
import { dirname as dirname41, join as join72, relative as
|
|
182314
|
+
import { dirname as dirname41, join as join72, relative as relative15, resolve as resolve53, sep as sep19 } from "node:path";
|
|
181980
182315
|
function locate(repoRootOrCwd, mod) {
|
|
181981
182316
|
const inRepo = resolve53(repoRootOrCwd, `stdlib/flows/${mod}/src/index.ts`);
|
|
181982
182317
|
if (existsSync76(inRepo)) return { path: inRepo, form: "source" };
|
|
@@ -182029,7 +182364,7 @@ function ejectModule(opts) {
|
|
|
182029
182364
|
if (!existsSync76(f2)) continue;
|
|
182030
182365
|
const before = readFileSync85(f2, "utf8");
|
|
182031
182366
|
let after = before;
|
|
182032
|
-
let rel2 =
|
|
182367
|
+
let rel2 = relative15(dirname41(f2), target).split(sep19).join("/").replace(/\.tsx?$/, ".js");
|
|
182033
182368
|
if (!rel2.startsWith(".")) rel2 = `./${rel2}`;
|
|
182034
182369
|
for (const spec of specifiersFor(mod)) {
|
|
182035
182370
|
const q4 = spec.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -182211,7 +182546,7 @@ __export(icon_exports, {
|
|
|
182211
182546
|
});
|
|
182212
182547
|
import { createHash as createHash35 } from "node:crypto";
|
|
182213
182548
|
import { accessSync as accessSync3, constants as constants4, existsSync as existsSync77, mkdirSync as mkdirSync34, readFileSync as readFileSync86, statSync as statSync22, writeFileSync as writeFileSync31 } from "node:fs";
|
|
182214
|
-
import { basename as basename19, dirname as dirname42, join as join73, resolve as resolve54, sep as
|
|
182549
|
+
import { basename as basename19, dirname as dirname42, join as join73, resolve as resolve54, sep as sep20 } from "node:path";
|
|
182215
182550
|
function readManifest(dir) {
|
|
182216
182551
|
try {
|
|
182217
182552
|
return JSON.parse(readFileSync86(join73(dir, MANIFEST), "utf8"));
|
|
@@ -182228,7 +182563,7 @@ function declaredIconName(dir) {
|
|
|
182228
182563
|
function iconDest(dir, name) {
|
|
182229
182564
|
const base2 = resolve54(dir);
|
|
182230
182565
|
const abs = resolve54(base2, name);
|
|
182231
|
-
if (!abs.startsWith(base2 +
|
|
182566
|
+
if (!abs.startsWith(base2 + sep20)) {
|
|
182232
182567
|
throw new Error(
|
|
182233
182568
|
`himi icon: himalaya.content.json declares "icon": "${name}", which resolves outside the package (${abs}). Declare a path inside it, e.g. "${DEFAULT_CONTENT_ICON}".`
|
|
182234
182569
|
);
|
|
@@ -182589,8 +182924,8 @@ function baseOf(target, linkable, known2) {
|
|
|
182589
182924
|
let best = null;
|
|
182590
182925
|
for (const base2 of linkable ?? []) {
|
|
182591
182926
|
if (!known2.has(base2) || target.length <= base2.length + 1 || !target.startsWith(base2)) continue;
|
|
182592
|
-
const
|
|
182593
|
-
if ((
|
|
182927
|
+
const sep31 = target[base2.length];
|
|
182928
|
+
if ((sep31 === "_" || sep31 === "/") && (!best || base2.length > best.length)) best = base2;
|
|
182594
182929
|
}
|
|
182595
182930
|
return best;
|
|
182596
182931
|
}
|
|
@@ -182617,8 +182952,8 @@ __export(crawl_layers_exports, {
|
|
|
182617
182952
|
renderMocksFrom: () => renderMocksFrom,
|
|
182618
182953
|
tabRootScreens: () => tabRootScreens
|
|
182619
182954
|
});
|
|
182620
|
-
import { existsSync as existsSync79, readFileSync as readFileSync87, realpathSync as
|
|
182621
|
-
import { dirname as dirname43, join as join75, resolve as resolve55, sep as
|
|
182955
|
+
import { existsSync as existsSync79, readFileSync as readFileSync87, realpathSync as realpathSync10 } from "node:fs";
|
|
182956
|
+
import { dirname as dirname43, join as join75, resolve as resolve55, sep as sep21 } from "node:path";
|
|
182622
182957
|
async function loadContentConfigQuietly(dir) {
|
|
182623
182958
|
try {
|
|
182624
182959
|
return await loadAppConfigModule(dir);
|
|
@@ -182715,9 +183050,9 @@ async function l10nSourceCatalogFile(dir) {
|
|
|
182715
183050
|
const file2 = resolve55(l10nDir, `${tag}.json`);
|
|
182716
183051
|
if (!existsSync79(file2)) return null;
|
|
182717
183052
|
try {
|
|
182718
|
-
const realDir =
|
|
182719
|
-
const realFile =
|
|
182720
|
-
if (!realDir.startsWith(
|
|
183053
|
+
const realDir = realpathSync10(l10nDir);
|
|
183054
|
+
const realFile = realpathSync10(file2);
|
|
183055
|
+
if (!realDir.startsWith(realpathSync10(dir) + sep21) || dirname43(realFile) !== realDir) return null;
|
|
182721
183056
|
return { tag, text: readFileSync87(realFile, "utf8") };
|
|
182722
183057
|
} catch {
|
|
182723
183058
|
return null;
|
|
@@ -184388,7 +184723,7 @@ import {
|
|
|
184388
184723
|
existsSync as existsSync82,
|
|
184389
184724
|
lstatSync as lstatSync26,
|
|
184390
184725
|
mkdirSync as mkdirSync37,
|
|
184391
|
-
realpathSync as
|
|
184726
|
+
realpathSync as realpathSync11,
|
|
184392
184727
|
readlinkSync as readlinkSync2,
|
|
184393
184728
|
readFileSync as readFileSync92,
|
|
184394
184729
|
readdirSync as readdirSync38,
|
|
@@ -184396,7 +184731,7 @@ import {
|
|
|
184396
184731
|
unlinkSync as unlinkSync5,
|
|
184397
184732
|
writeFileSync as writeFileSync34
|
|
184398
184733
|
} from "node:fs";
|
|
184399
|
-
import { basename as basename21, join as join81, relative as
|
|
184734
|
+
import { basename as basename21, join as join81, relative as relative16, resolve as resolve60 } from "node:path";
|
|
184400
184735
|
function attestationVersionOf(value2) {
|
|
184401
184736
|
if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) return null;
|
|
184402
184737
|
const version5 = value2.attestation;
|
|
@@ -184446,7 +184781,7 @@ function repoRoot(contentDir2) {
|
|
|
184446
184781
|
function storedContentDir(contentDir2) {
|
|
184447
184782
|
const absolute = resolve60(contentDir2);
|
|
184448
184783
|
const root = repoRoot(absolute);
|
|
184449
|
-
return root ?
|
|
184784
|
+
return root ? relative16(root, absolute) || "." : ".";
|
|
184450
184785
|
}
|
|
184451
184786
|
function currentGitDiffHash(contentDir2) {
|
|
184452
184787
|
const root = repoRoot(resolve60(contentDir2));
|
|
@@ -184455,17 +184790,17 @@ function currentGitDiffHash(contentDir2) {
|
|
|
184455
184790
|
}
|
|
184456
184791
|
function currentGitUntrackedHash(contentDir2) {
|
|
184457
184792
|
const unresolved = resolve60(contentDir2);
|
|
184458
|
-
const absolute =
|
|
184793
|
+
const absolute = realpathSync11.native(unresolved);
|
|
184459
184794
|
const root = repoRoot(absolute);
|
|
184460
184795
|
if (!root) return sourceTreeHash(absolute);
|
|
184461
|
-
const scope3 =
|
|
184796
|
+
const scope3 = relative16(root, absolute) || ".";
|
|
184462
184797
|
const listed = execFileSync5("git", ["-C", root, "ls-files", "--others", "--exclude-standard", "-z", "--", scope3], {
|
|
184463
184798
|
encoding: "utf8",
|
|
184464
184799
|
maxBuffer: GIT_HASH_MAX_BUFFER
|
|
184465
184800
|
});
|
|
184466
184801
|
const hash3 = createHash39("sha256");
|
|
184467
184802
|
for (const path2 of listed.split("\0").filter(Boolean).sort()) {
|
|
184468
|
-
const local =
|
|
184803
|
+
const local = relative16(absolute, join81(root, path2));
|
|
184469
184804
|
const segs = local.split(/[\\/]/);
|
|
184470
184805
|
if (NOT_ATTESTED_DIRS.has(segs[0])) continue;
|
|
184471
184806
|
if (segs.length === 1 && AGENT_TOOLING_ROOT_FILES.includes(segs[0])) continue;
|
|
@@ -184488,7 +184823,7 @@ function sourceTreeHash(root) {
|
|
|
184488
184823
|
for (const entry of readdirSync38(dir, { withFileTypes: true }).sort((a3, b3) => a3.name < b3.name ? -1 : a3.name > b3.name ? 1 : 0)) {
|
|
184489
184824
|
if (entry.isDirectory() && (entry.name === ".git" || entry.name === "node_modules" || NOT_ATTESTED_DIRS.has(entry.name))) continue;
|
|
184490
184825
|
const path2 = join81(dir, entry.name);
|
|
184491
|
-
const local =
|
|
184826
|
+
const local = relative16(root, path2);
|
|
184492
184827
|
if (dir === root && entry.isFile() && AGENT_TOOLING_ROOT_FILES.includes(entry.name)) continue;
|
|
184493
184828
|
if (MCP_HOST_CONFIG_FILES.includes(local.split(/[\\/]/).join("/"))) continue;
|
|
184494
184829
|
if (entry.isDirectory()) visit(path2);
|
|
@@ -184781,7 +185116,7 @@ var init_attestation = __esm({
|
|
|
184781
185116
|
|
|
184782
185117
|
// src/ux-evidence.ts
|
|
184783
185118
|
import { existsSync as existsSync83, mkdirSync as mkdirSync38, readFileSync as readFileSync93, writeFileSync as writeFileSync35 } from "node:fs";
|
|
184784
|
-
import { dirname as dirname47, isAbsolute as isAbsolute8, join as join82, relative as
|
|
185119
|
+
import { dirname as dirname47, isAbsolute as isAbsolute8, join as join82, relative as relative17, resolve as resolve61 } from "node:path";
|
|
184785
185120
|
function isNativePlatform(value2) {
|
|
184786
185121
|
return typeof value2 === "string" && NATIVE_PLATFORMS.includes(value2);
|
|
184787
185122
|
}
|
|
@@ -184829,7 +185164,7 @@ function writeEvidence(path2, evidence) {
|
|
|
184829
185164
|
writeFileSync35(path2, JSON.stringify(evidence, null, 2) + "\n");
|
|
184830
185165
|
}
|
|
184831
185166
|
function recordedFilePath(dir, file2) {
|
|
184832
|
-
const rel2 =
|
|
185167
|
+
const rel2 = relative17(dir, resolve61(file2));
|
|
184833
185168
|
return rel2 && !rel2.startsWith("..") && !isAbsolute8(rel2) ? rel2 : file2;
|
|
184834
185169
|
}
|
|
184835
185170
|
function recordRenderWidth(content, entry) {
|
|
@@ -186963,12 +187298,12 @@ var init_cli_bridge = __esm({
|
|
|
186963
187298
|
});
|
|
186964
187299
|
|
|
186965
187300
|
// src/mcp/file-tools.ts
|
|
186966
|
-
import { closeSync as closeSync7, constants as constants5, lstatSync as lstatSync27, mkdirSync as mkdirSync39, openSync as openSync6, readdirSync as readdirSync39, readFileSync as readFileSync100, realpathSync as
|
|
187301
|
+
import { closeSync as closeSync7, constants as constants5, lstatSync as lstatSync27, mkdirSync as mkdirSync39, openSync as openSync6, readdirSync as readdirSync39, readFileSync as readFileSync100, realpathSync as realpathSync12, renameSync as renameSync15, rmSync as rmSync22, statSync as statSync24, writeSync as writeSync2, existsSync as existsSync89 } from "node:fs";
|
|
186967
187302
|
import { randomBytes as randomBytes4 } from "node:crypto";
|
|
186968
|
-
import { dirname as dirname48, isAbsolute as isAbsolute9, join as join88, relative as
|
|
187303
|
+
import { dirname as dirname48, isAbsolute as isAbsolute9, join as join88, relative as relative18, resolve as resolve63, sep as sep22 } from "node:path";
|
|
186969
187304
|
import * as z2 from "zod";
|
|
186970
187305
|
function within(root, p2) {
|
|
186971
|
-
return p2 === root || p2.startsWith(root.endsWith(
|
|
187306
|
+
return p2 === root || p2.startsWith(root.endsWith(sep22) ? root : root + sep22);
|
|
186972
187307
|
}
|
|
186973
187308
|
function realish(p2) {
|
|
186974
187309
|
let cur = p2;
|
|
@@ -186976,17 +187311,17 @@ function realish(p2) {
|
|
|
186976
187311
|
while (!existsSync89(cur)) {
|
|
186977
187312
|
const up2 = dirname48(cur);
|
|
186978
187313
|
if (up2 === cur) break;
|
|
186979
|
-
tail.unshift(cur.slice(up2.length + (up2.endsWith(
|
|
187314
|
+
tail.unshift(cur.slice(up2.length + (up2.endsWith(sep22) ? 0 : 1)));
|
|
186980
187315
|
cur = up2;
|
|
186981
187316
|
}
|
|
186982
|
-
return join88(
|
|
187317
|
+
return join88(realpathSync12(cur), ...tail);
|
|
186983
187318
|
}
|
|
186984
187319
|
function symlinkComponent(base2, abs) {
|
|
186985
187320
|
let cur = base2;
|
|
186986
|
-
for (const part4 of
|
|
187321
|
+
for (const part4 of relative18(base2, abs).split(sep22).filter(Boolean)) {
|
|
186987
187322
|
cur = join88(cur, part4);
|
|
186988
187323
|
try {
|
|
186989
|
-
if (lstatSync27(cur).isSymbolicLink()) return
|
|
187324
|
+
if (lstatSync27(cur).isSymbolicLink()) return relative18(base2, cur);
|
|
186990
187325
|
} catch {
|
|
186991
187326
|
return void 0;
|
|
186992
187327
|
}
|
|
@@ -186997,7 +187332,7 @@ function workspaceRefusal(root, target) {
|
|
|
186997
187332
|
const r3 = resolve63(root);
|
|
186998
187333
|
const t2 = resolve63(r3, target);
|
|
186999
187334
|
if (!existsSync89(r3)) return `the workspace folder ${r3} does not exist`;
|
|
187000
|
-
if (!within(r3, t2) || !within(
|
|
187335
|
+
if (!within(r3, t2) || !within(realpathSync12(r3), realish(t2))) return `"${target}" is outside the workspace folder ${r3}`;
|
|
187001
187336
|
const link3 = symlinkComponent(r3, t2);
|
|
187002
187337
|
if (link3) return `"${link3}" is a symlink \u2014 paths must stay in real folders inside the workspace`;
|
|
187003
187338
|
return null;
|
|
@@ -187006,10 +187341,10 @@ async function confinedAppDir(args, deps) {
|
|
|
187006
187341
|
const root = resolve63(await deps.defaultDir());
|
|
187007
187342
|
const dir = typeof args.dir === "string" && args.dir ? resolve63(root, args.dir) : root;
|
|
187008
187343
|
if (!existsSync89(root)) return refuse5("no_workspace", `the workspace folder ${root} does not exist`);
|
|
187009
|
-
if (!within(root, dir) || !within(
|
|
187344
|
+
if (!within(root, dir) || !within(realpathSync12(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
|
|
187010
187345
|
const link3 = symlinkComponent(root, dir);
|
|
187011
187346
|
if (link3) return refuse5("outside_workspace", `"${link3}" is a symlink \u2014 the app folder must be a real folder in the workspace`);
|
|
187012
|
-
const rel2 =
|
|
187347
|
+
const rel2 = relative18(root, dir);
|
|
187013
187348
|
if (rel2 && (isDeniedSourcePath(`${rel2}/x`) || isDeniedSourcePath(`${rel2.toLowerCase()}/x`))) return refuse5("denied", `"${rel2}" is a folder this tool does not touch`);
|
|
187014
187349
|
if (!existsSync89(join88(dir, CONTENT_MARKER))) {
|
|
187015
187350
|
return refuse5("not_an_app", `"${rel2 || "."}" is not an app folder (no ${CONTENT_MARKER}) \u2014 see himi_list_apps, or create one with himi_init`);
|
|
@@ -187022,16 +187357,16 @@ function onDiskSpelling(abs) {
|
|
|
187022
187357
|
while (!existsSync89(cur)) {
|
|
187023
187358
|
const up2 = dirname48(cur);
|
|
187024
187359
|
if (up2 === cur) break;
|
|
187025
|
-
tail.unshift(cur.slice(up2.length + (up2.endsWith(
|
|
187360
|
+
tail.unshift(cur.slice(up2.length + (up2.endsWith(sep22) ? 0 : 1)));
|
|
187026
187361
|
cur = up2;
|
|
187027
187362
|
}
|
|
187028
|
-
return join88(
|
|
187363
|
+
return join88(realpathSync12.native(cur), ...tail);
|
|
187029
187364
|
}
|
|
187030
187365
|
function denied(appDir3, abs) {
|
|
187031
|
-
const rel2 =
|
|
187366
|
+
const rel2 = relative18(appDir3, abs);
|
|
187032
187367
|
if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) return true;
|
|
187033
187368
|
try {
|
|
187034
|
-
return isDeniedSourcePath(
|
|
187369
|
+
return isDeniedSourcePath(relative18(realpathSync12.native(appDir3), onDiskSpelling(abs)));
|
|
187035
187370
|
} catch {
|
|
187036
187371
|
return true;
|
|
187037
187372
|
}
|
|
@@ -187043,7 +187378,7 @@ function confinedPath(appDir3, rel2) {
|
|
|
187043
187378
|
const abs = resolve63(appDir3, rel2);
|
|
187044
187379
|
if (!within(appDir3, abs) || abs === appDir3) return { error: `"${rel2}" is outside the app folder` };
|
|
187045
187380
|
const real = realish(abs);
|
|
187046
|
-
const base2 = existsSync89(appDir3) ?
|
|
187381
|
+
const base2 = existsSync89(appDir3) ? realpathSync12(appDir3) : realish(appDir3);
|
|
187047
187382
|
if (!within(base2, real) || real === base2) return { error: `"${rel2}" is outside the app folder` };
|
|
187048
187383
|
const link3 = symlinkComponent(appDir3, abs);
|
|
187049
187384
|
if (link3) return { error: `"${link3}" is a symlink, which this tool does not follow` };
|
|
@@ -187062,16 +187397,16 @@ function writeNoFollow2(appDir3, abs, content) {
|
|
|
187062
187397
|
closeSync7(fd);
|
|
187063
187398
|
}
|
|
187064
187399
|
const link3 = symlinkComponent(appDir3, abs);
|
|
187065
|
-
if (link3 || !within(
|
|
187400
|
+
if (link3 || !within(realpathSync12(appDir3), realpathSync12(dirname48(abs)))) {
|
|
187066
187401
|
rmSync22(tmp, { force: true });
|
|
187067
|
-
throw new Error(`"${link3 ??
|
|
187402
|
+
throw new Error(`"${link3 ?? relative18(appDir3, dirname48(abs))}" changed into a link while writing`);
|
|
187068
187403
|
}
|
|
187069
187404
|
renameSync15(tmp, abs);
|
|
187070
187405
|
}
|
|
187071
187406
|
function listFiles2(appDir3) {
|
|
187072
187407
|
const files = [];
|
|
187073
187408
|
const walk4 = (d2) => {
|
|
187074
|
-
const parentRel =
|
|
187409
|
+
const parentRel = relative18(appDir3, d2);
|
|
187075
187410
|
for (const e2 of readdirSync39(d2, { withFileTypes: true }).sort((a3, b3) => a3.name.localeCompare(b3.name))) {
|
|
187076
187411
|
if (e2.isSymbolicLink()) continue;
|
|
187077
187412
|
const p2 = join88(d2, e2.name);
|
|
@@ -187079,10 +187414,10 @@ function listFiles2(appDir3) {
|
|
|
187079
187414
|
if (isDeniedSourceDir(e2.name, parentRel) || isDeniedSourceDir(e2.name.toLowerCase(), parentRel)) continue;
|
|
187080
187415
|
if (!walk4(p2)) return false;
|
|
187081
187416
|
} else if (e2.isFile()) {
|
|
187082
|
-
const rel2 =
|
|
187417
|
+
const rel2 = relative18(appDir3, p2);
|
|
187083
187418
|
if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) continue;
|
|
187084
187419
|
if (files.length >= MAX_LISTED) return false;
|
|
187085
|
-
files.push({ path: rel2.split(
|
|
187420
|
+
files.push({ path: rel2.split(sep22).join("/"), bytes: statSync24(p2).size });
|
|
187086
187421
|
}
|
|
187087
187422
|
}
|
|
187088
187423
|
return true;
|
|
@@ -187225,7 +187560,7 @@ var init_file_tools = __esm({
|
|
|
187225
187560
|
|
|
187226
187561
|
// src/mcp/iap-tools.ts
|
|
187227
187562
|
import * as z3 from "zod";
|
|
187228
|
-
import { dirname as dirname49, relative as
|
|
187563
|
+
import { dirname as dirname49, relative as relative19, resolve as resolve64 } from "node:path";
|
|
187229
187564
|
async function paths(args, deps) {
|
|
187230
187565
|
const base2 = await deps.defaultDir();
|
|
187231
187566
|
const result = { ...args, workspaceDir: base2 };
|
|
@@ -187241,7 +187576,7 @@ function workspaceInputRefusal(args, deps, context) {
|
|
|
187241
187576
|
const why = workspaceRefusal(context.boundary, args[key4]);
|
|
187242
187577
|
if (why) return `${key4} ${why}`;
|
|
187243
187578
|
if (key4 !== "dir" && key4 !== "plist") {
|
|
187244
|
-
const confined = confinedPath(context.boundary,
|
|
187579
|
+
const confined = confinedPath(context.boundary, relative19(context.boundary, args[key4]));
|
|
187245
187580
|
if (typeof confined !== "string") return `${key4} ${confined.error}`;
|
|
187246
187581
|
}
|
|
187247
187582
|
}
|
|
@@ -197813,8 +198148,8 @@ var init_dist2 = __esm({
|
|
|
197813
198148
|
|
|
197814
198149
|
// src/store-google-host.ts
|
|
197815
198150
|
import { createHash as createHash52, randomUUID as randomUUID14 } from "node:crypto";
|
|
197816
|
-
import { existsSync as existsSync91, lstatSync as lstatSync29, mkdirSync as mkdirSync40, readFileSync as readFileSync103, readdirSync as readdirSync41, realpathSync as
|
|
197817
|
-
import { join as join103, relative as
|
|
198151
|
+
import { existsSync as existsSync91, lstatSync as lstatSync29, mkdirSync as mkdirSync40, readFileSync as readFileSync103, readdirSync as readdirSync41, realpathSync as realpathSync13, renameSync as renameSync16, rmSync as rmSync23, statSync as statSync26, writeFileSync as writeFileSync36 } from "node:fs";
|
|
198152
|
+
import { join as join103, relative as relative20 } from "node:path";
|
|
197818
198153
|
function readGooglePlayFacts(dir) {
|
|
197819
198154
|
const path2 = join103(dir, GOOGLE_FACTS_FILE);
|
|
197820
198155
|
if (!existsSync91(path2)) return void 0;
|
|
@@ -197929,7 +198264,7 @@ async function googleAppFactsFor(dir, o2) {
|
|
|
197929
198264
|
const himi = packageName.toLowerCase().startsWith("himi.");
|
|
197930
198265
|
if (himi && !site) note(`Signing: ${packageName} is a Containers (himi.*) package, which Wix builds and signs for a site-linked app, but this app names no Wix site (a "wix" block in ${GOOGLE_FACTS_FILE} or ${STORE_FACTS_FILE}). Link it (\`himi store app set --app <id> --site <msid> --android-package ${packageName}\`) and add the wix block, or use your own package name.`);
|
|
197931
198266
|
if (!himi && site) note(`Signing: this app is linked to Wix site ${site.site}, so Wix signs its bundle under a himi.<name> package; ${packageName} is not one. Set packageName to the site's saved himi.<name> package (\`himi store app show --app ${site.app} --site ${site.site}\`), or drop the wix block for an owner-signed app.`);
|
|
197932
|
-
const realDir =
|
|
198267
|
+
const realDir = realpathSync13(dir);
|
|
197933
198268
|
const files = {};
|
|
197934
198269
|
const given = (key4) => {
|
|
197935
198270
|
const p2 = str7(file2[key4]);
|
|
@@ -197938,7 +198273,7 @@ async function googleAppFactsFor(dir, o2) {
|
|
|
197938
198273
|
const bundle = given("bundle") ?? newestAab(dir);
|
|
197939
198274
|
if (bundle) {
|
|
197940
198275
|
files.bundle = bundle;
|
|
197941
|
-
if (!str7(file2.bundle)) note(`Bundle: no bundle in ${GOOGLE_FACTS_FILE}; using the newest .aab in ${LOCAL_AAB_DIR}/, ${
|
|
198276
|
+
if (!str7(file2.bundle)) note(`Bundle: no bundle in ${GOOGLE_FACTS_FILE}; using the newest .aab in ${LOCAL_AAB_DIR}/, ${relative20(dir, bundle)}.`);
|
|
197942
198277
|
} else note(noBundleNote(packageName, signing));
|
|
197943
198278
|
const listing = given("listingDir") ?? (isDir2(join103(dir, DEFAULT_LISTING_DIR)) ? join103(dir, DEFAULT_LISTING_DIR) : void 0);
|
|
197944
198279
|
if (listing) files.listingDir = listing;
|
|
@@ -214103,7 +214438,7 @@ function realPathOf2(path2) {
|
|
|
214103
214438
|
d2 = dirname56(d2);
|
|
214104
214439
|
}
|
|
214105
214440
|
try {
|
|
214106
|
-
return join110(
|
|
214441
|
+
return join110(realpathSync14(d2), ...rest);
|
|
214107
214442
|
} catch {
|
|
214108
214443
|
return resolve70(path2);
|
|
214109
214444
|
}
|
|
@@ -214166,13 +214501,13 @@ function reserveKeyFile(dir, keyId) {
|
|
|
214166
214501
|
}
|
|
214167
214502
|
};
|
|
214168
214503
|
}
|
|
214169
|
-
var createPrivateKey6, closeSync8, existsSync93, mkdirSync42, openSync7,
|
|
214504
|
+
var createPrivateKey6, closeSync8, existsSync93, mkdirSync42, openSync7, realpathSync14, statSync28, unlinkSync7, writeSync3, basename25, dirname56, isAbsolute11, join110, resolve70, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
|
|
214170
214505
|
var init_api_keys = __esm({
|
|
214171
214506
|
"../../node_modules/@wix/asc-web/dist/api-keys.js"() {
|
|
214172
214507
|
init_define_HHP_CATALOG();
|
|
214173
214508
|
init_dist3();
|
|
214174
214509
|
({ createPrivateKey: createPrivateKey6 } = __ascBuiltin040);
|
|
214175
|
-
({ closeSync: closeSync8, existsSync: existsSync93, mkdirSync: mkdirSync42, openSync: openSync7, realpathSync:
|
|
214510
|
+
({ closeSync: closeSync8, existsSync: existsSync93, mkdirSync: mkdirSync42, openSync: openSync7, realpathSync: realpathSync14, statSync: statSync28, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin125);
|
|
214176
214511
|
({ basename: basename25, dirname: dirname56, isAbsolute: isAbsolute11, join: join110, resolve: resolve70 } = __ascBuiltin213);
|
|
214177
214512
|
TEAM_KEY_ROLES = ["ADMIN", "APP_MANAGER", "DEVELOPER", "FINANCE", "SALES", "MARKETING", "ACCESS_TO_REPORTS", "CUSTOMER_SUPPORT", "CREATE_APPS", "CLOUD_MANAGED_APP_DISTRIBUTION", "CLOUD_MANAGED_DEVELOPER_ID"];
|
|
214178
214513
|
DOWNLOAD_ATTEMPTS = 3;
|
|
@@ -226068,7 +226403,7 @@ function fileRoots(env) {
|
|
|
226068
226403
|
const roots2 = [process.cwd(), ...(env.ASC_MCP_FILE_ROOTS ?? "").split(delimiter3)].map((r3) => r3.trim()).filter(Boolean);
|
|
226069
226404
|
return [...new Set(roots2.flatMap((r3) => {
|
|
226070
226405
|
try {
|
|
226071
|
-
return [
|
|
226406
|
+
return [realpathSync15(resolve77(r3))];
|
|
226072
226407
|
} catch {
|
|
226073
226408
|
return [];
|
|
226074
226409
|
}
|
|
@@ -226081,7 +226416,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
|
|
|
226081
226416
|
const given = resolve77(roots2[0] ?? process.cwd(), path2);
|
|
226082
226417
|
let real;
|
|
226083
226418
|
try {
|
|
226084
|
-
real =
|
|
226419
|
+
real = realpathSync15(given);
|
|
226085
226420
|
} catch (e2) {
|
|
226086
226421
|
throw new AscError("invalid", `${param}: cannot read ${path2} (${e2.code ?? "unreadable"})`);
|
|
226087
226422
|
}
|
|
@@ -226090,7 +226425,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
|
|
|
226090
226425
|
throw new AscError("invalid", `${param}: ${path2} is not a ${o2.directory ? "directory" : "regular file"}`);
|
|
226091
226426
|
let state;
|
|
226092
226427
|
try {
|
|
226093
|
-
state =
|
|
226428
|
+
state = realpathSync15(ctx.stateDir);
|
|
226094
226429
|
} catch {
|
|
226095
226430
|
state = void 0;
|
|
226096
226431
|
}
|
|
@@ -226289,7 +226624,7 @@ ${o2.detail}` : ""}` };
|
|
|
226289
226624
|
function enabledTools(env, o2 = {}) {
|
|
226290
226625
|
return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
|
|
226291
226626
|
}
|
|
226292
|
-
var mkdirSync47, readFileSync116,
|
|
226627
|
+
var mkdirSync47, readFileSync116, realpathSync15, statSync36, writeFileSync42, delimiter3, isAbsolute13, join119, relative21, resolve77, sep23, READ, PLAN, APPLY, BATCH_SUMMARY_LINES, BATCH_CHANGES_PER_LINE, BATCH_CHANGE_LINES, ok2, app, reads, jobView2, noAppleId, EXIT_KINDS, notesOf2, cliResult, flag2, ACTIONS, FAMILIES, inside2, identityFile, appleIdParam, TOOLS;
|
|
226293
226628
|
var init_tools2 = __esm({
|
|
226294
226629
|
"../../node_modules/@wix/asc-mcp/dist/tools.js"() {
|
|
226295
226630
|
init_define_HHP_CATALOG();
|
|
@@ -226299,8 +226634,8 @@ var init_tools2 = __esm({
|
|
|
226299
226634
|
init_dist6();
|
|
226300
226635
|
init_dist7();
|
|
226301
226636
|
init_action_catalog_generated();
|
|
226302
|
-
({ mkdirSync: mkdirSync47, readFileSync: readFileSync116, realpathSync:
|
|
226303
|
-
({ delimiter: delimiter3, isAbsolute: isAbsolute13, join: join119, relative:
|
|
226637
|
+
({ mkdirSync: mkdirSync47, readFileSync: readFileSync116, realpathSync: realpathSync15, statSync: statSync36, writeFileSync: writeFileSync42 } = __ascBuiltin063);
|
|
226638
|
+
({ delimiter: delimiter3, isAbsolute: isAbsolute13, join: join119, relative: relative21, resolve: resolve77, sep: sep23 } = __ascBuiltin140);
|
|
226304
226639
|
READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
226305
226640
|
PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
226306
226641
|
APPLY = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true };
|
|
@@ -226356,8 +226691,8 @@ var init_tools2 = __esm({
|
|
|
226356
226691
|
"api.": "a raw API write (prefer a dedicated action)"
|
|
226357
226692
|
};
|
|
226358
226693
|
inside2 = (root, path2) => {
|
|
226359
|
-
const rel2 =
|
|
226360
|
-
return rel2 !== ".." && !rel2.startsWith(`..${
|
|
226694
|
+
const rel2 = relative21(root, path2);
|
|
226695
|
+
return rel2 !== ".." && !rel2.startsWith(`..${sep23}`) && !isAbsolute13(rel2);
|
|
226361
226696
|
};
|
|
226362
226697
|
identityFile = (ctx, jobId) => join119(ctx.stateDir, "mcp", "web-jobs", `${jobId.replace(/[^A-Za-z0-9_-]/g, "_")}.json`);
|
|
226363
226698
|
appleIdParam = z5.string().optional().describe("The signed-in Apple ID; default ASC_APPLE_ID. Never a password: a person signs in at a terminal with asc-node web auth login.");
|
|
@@ -228092,14 +228427,14 @@ __export(apple_keys_exports, {
|
|
|
228092
228427
|
runAppleKeys: () => runAppleKeys
|
|
228093
228428
|
});
|
|
228094
228429
|
import { createPublicKey as createPublicKey5 } from "node:crypto";
|
|
228095
|
-
import { readFileSync as readFileSync117, realpathSync as
|
|
228430
|
+
import { readFileSync as readFileSync117, realpathSync as realpathSync16, statSync as statSync37 } from "node:fs";
|
|
228096
228431
|
function readKey2(flags, kind) {
|
|
228097
228432
|
const names2 = kind === "asc" ? ["asc-key-file", "asc-key-id", "asc-issuer-id"] : ["iap-key", "iap-key-id", "iap-issuer-id"];
|
|
228098
228433
|
if (names2.every((name) => flags[name] === void 0)) return void 0;
|
|
228099
228434
|
const [file2, keyId, issuerId] = names2.map((name) => text14(flags[name]));
|
|
228100
228435
|
if (!file2 || !keyId || !issuerId) throw new UsageError2(`Supply --${names2.join(" --")} together.`);
|
|
228101
228436
|
try {
|
|
228102
|
-
const path2 =
|
|
228437
|
+
const path2 = realpathSync16(file2);
|
|
228103
228438
|
assertCredentialOutsideRepo(names2[0], path2);
|
|
228104
228439
|
if (statSync37(path2).size > 16384) throw new Error("oversized");
|
|
228105
228440
|
const key4 = { keyId, issuerId, key: readFileSync117(path2, "utf8") };
|
|
@@ -228278,9 +228613,9 @@ __export(store_host_exports, {
|
|
|
228278
228613
|
wixTargetOf: () => wixTargetOf
|
|
228279
228614
|
});
|
|
228280
228615
|
import { spawn as spawn7 } from "node:child_process";
|
|
228281
|
-
import { existsSync as existsSync96, lstatSync as lstatSync32, readFileSync as readFileSync118, realpathSync as
|
|
228616
|
+
import { existsSync as existsSync96, lstatSync as lstatSync32, readFileSync as readFileSync118, realpathSync as realpathSync17 } from "node:fs";
|
|
228282
228617
|
import { hostname as hostname5, userInfo as userInfo3 } from "node:os";
|
|
228283
|
-
import { delimiter as delimiter4, dirname as dirname58, isAbsolute as isAbsolute14, join as join120, relative as
|
|
228618
|
+
import { delimiter as delimiter4, dirname as dirname58, isAbsolute as isAbsolute14, join as join120, relative as relative22, resolve as resolve78, sep as sep24 } from "node:path";
|
|
228284
228619
|
function storeNodeRefusal(version5 = process.versions.node) {
|
|
228285
228620
|
const major = Number(version5.split(".")[0]);
|
|
228286
228621
|
return Number.isFinite(major) && major >= STORE_MIN_NODE_MAJOR ? void 0 : `App Store submission needs Node ${STORE_MIN_NODE_MAJOR} or newer (this is Node ${version5}). Install a current Node, then run the command again.`;
|
|
@@ -228352,7 +228687,7 @@ function appDirFor(appRef2, root, exists2 = existsSync96) {
|
|
|
228352
228687
|
const base2 = resolve78(root);
|
|
228353
228688
|
const ref = appRef2.trim();
|
|
228354
228689
|
const dir = !ref || ref === "." ? base2 : isAbsolute14(ref) ? resolve78(ref) : resolve78(base2, ref);
|
|
228355
|
-
const inside4 = dir === base2 || dir.startsWith(base2.endsWith(
|
|
228690
|
+
const inside4 = dir === base2 || dir.startsWith(base2.endsWith(sep24) ? base2 : base2 + sep24);
|
|
228356
228691
|
if (inside4 && ["config.ts", "config.js", "config.mjs", STORE_FACTS_FILE].some((f2) => exists2(join120(dir, f2)))) return dir;
|
|
228357
228692
|
throw new StoreFactsError(
|
|
228358
228693
|
!ref || ref === "." ? `no Himi app in ${base2} (no config.ts or ${STORE_FACTS_FILE}): run from the app's folder or name it (--dir, or the tool's app)` : `no Himi app "${appRef2}" under ${base2}: name the app's folder (where config.ts is), inside the workspace`,
|
|
@@ -228382,7 +228717,7 @@ function writeGeneratedPrivacy(dir, content, name = "store-privacy.json") {
|
|
|
228382
228717
|
return path2;
|
|
228383
228718
|
}
|
|
228384
228719
|
function privacyAnswersFor(dir, ownerPath, shellOnly, checked, deps, note) {
|
|
228385
|
-
const rel2 = (p2) =>
|
|
228720
|
+
const rel2 = (p2) => relative22(dir, p2) || p2;
|
|
228386
228721
|
const render3 = (d2) => `${JSON.stringify(d2, null, 2)}
|
|
228387
228722
|
`;
|
|
228388
228723
|
const answered3 = SHELL_SDKS.filter((s5) => s5.usages).map((s5) => s5.name).join(", ");
|
|
@@ -228411,13 +228746,13 @@ function privacyAnswersFor(dir, ownerPath, shellOnly, checked, deps, note) {
|
|
|
228411
228746
|
function ownerAnswers(dir, ownerPath, deps, note, rel2, render3) {
|
|
228412
228747
|
let real;
|
|
228413
228748
|
try {
|
|
228414
|
-
real =
|
|
228749
|
+
real = realpathSync17(ownerPath);
|
|
228415
228750
|
} catch {
|
|
228416
228751
|
note(`App Privacy: could not read ${rel2(ownerPath)} to check it against the Himi app's own answers.`);
|
|
228417
228752
|
return ownerPath;
|
|
228418
228753
|
}
|
|
228419
|
-
const realDir =
|
|
228420
|
-
if (real !== realDir && !real.startsWith(realDir +
|
|
228754
|
+
const realDir = realpathSync17(dir);
|
|
228755
|
+
if (real !== realDir && !real.startsWith(realDir + sep24)) {
|
|
228421
228756
|
throw new StoreFactsError(`privacyAnswersFile must be inside the app folder; ${rel2(ownerPath)} is not`, "store_facts_invalid");
|
|
228422
228757
|
}
|
|
228423
228758
|
let raw;
|
|
@@ -228453,16 +228788,16 @@ function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
|
|
|
228453
228788
|
if (isAbsolute14(p2)) throw refuse9();
|
|
228454
228789
|
const base2 = resolve78(dir);
|
|
228455
228790
|
const path2 = resolve78(base2, p2);
|
|
228456
|
-
if (path2 === base2 || !path2.startsWith(base2 +
|
|
228791
|
+
if (path2 === base2 || !path2.startsWith(base2 + sep24)) throw refuse9();
|
|
228457
228792
|
let probe2 = path2;
|
|
228458
228793
|
while (!existsSync96(probe2) && probe2 !== base2) probe2 = dirname58(probe2);
|
|
228459
228794
|
let real;
|
|
228460
228795
|
try {
|
|
228461
|
-
real =
|
|
228796
|
+
real = realpathSync17(probe2);
|
|
228462
228797
|
} catch {
|
|
228463
228798
|
throw refuse9();
|
|
228464
228799
|
}
|
|
228465
|
-
if (real !== realDir && !real.startsWith(realDir +
|
|
228800
|
+
if (real !== realDir && !real.startsWith(realDir + sep24)) throw refuse9();
|
|
228466
228801
|
return path2;
|
|
228467
228802
|
}
|
|
228468
228803
|
async function appFactsFor(dir, deps) {
|
|
@@ -228500,7 +228835,7 @@ async function appFactsFor(dir, deps) {
|
|
|
228500
228835
|
...str8(file2.sku) ? { sku: str8(file2.sku) } : {},
|
|
228501
228836
|
...str8(file2.buildNumber) ? { buildNumber: str8(file2.buildNumber) } : {}
|
|
228502
228837
|
};
|
|
228503
|
-
const realDir =
|
|
228838
|
+
const realDir = realpathSync17(dir);
|
|
228504
228839
|
for (const key4 of FILE_FACTS) {
|
|
228505
228840
|
const p2 = str8(file2[key4]);
|
|
228506
228841
|
if (p2) facts[key4] = factPathIn(dir, realDir, key4, p2);
|
|
@@ -228521,7 +228856,7 @@ async function appFactsFor(dir, deps) {
|
|
|
228521
228856
|
}
|
|
228522
228857
|
} else if (build3?.kind === "ipa") {
|
|
228523
228858
|
facts.ipaPath = build3.path;
|
|
228524
|
-
note(`Build: no ipaPath in ${STORE_FACTS_FILE}; using the newest .ipa in build/, ${
|
|
228859
|
+
note(`Build: no ipaPath in ${STORE_FACTS_FILE}; using the newest .ipa in build/, ${relative22(dir, build3.path)}. Set buildNumber to that IPA's build number (CFBundleVersion).`);
|
|
228525
228860
|
} else if (build3?.kind === "none") {
|
|
228526
228861
|
note(`Build: ${build3.message}`);
|
|
228527
228862
|
}
|
|
@@ -228901,7 +229236,7 @@ var init_server2 = __esm({
|
|
|
228901
229236
|
|
|
228902
229237
|
// src/ux-audit.ts
|
|
228903
229238
|
import { existsSync as existsSync99, readFileSync as readFileSync120, readdirSync as readdirSync46 } from "node:fs";
|
|
228904
|
-
import { join as join124, relative as
|
|
229239
|
+
import { join as join124, relative as relative23, resolve as resolve81 } from "node:path";
|
|
228905
229240
|
function issue2(issues, strict, code2, message2, path2) {
|
|
228906
229241
|
issues.push({ code: code2, message: message2, ...path2 ? { path: path2 } : {}, severity: strict ? "error" : "warning" });
|
|
228907
229242
|
}
|
|
@@ -228923,7 +229258,7 @@ function walkSource(dir, root = dir) {
|
|
|
228923
229258
|
if (!SOURCE_EXTENSIONS.has(ext)) continue;
|
|
228924
229259
|
const absolute = join124(dir, entry.name);
|
|
228925
229260
|
const text25 = readText2(absolute);
|
|
228926
|
-
if (text25 !== null) found.push({ path:
|
|
229261
|
+
if (text25 !== null) found.push({ path: relative23(root, absolute), text: text25 });
|
|
228927
229262
|
}
|
|
228928
229263
|
return found;
|
|
228929
229264
|
}
|
|
@@ -229501,8 +229836,8 @@ __export(browser_authoring_exports, {
|
|
|
229501
229836
|
});
|
|
229502
229837
|
import { createServer as createServer6 } from "node:http";
|
|
229503
229838
|
import { createHash as createHash66, randomBytes as randomBytes17 } from "node:crypto";
|
|
229504
|
-
import { existsSync as existsSync101, readdirSync as readdirSync47, readFileSync as readFileSync122, realpathSync as
|
|
229505
|
-
import { join as join127, posix as posix3, relative as
|
|
229839
|
+
import { existsSync as existsSync101, readdirSync as readdirSync47, readFileSync as readFileSync122, realpathSync as realpathSync18, statSync as statSync38 } from "node:fs";
|
|
229840
|
+
import { join as join127, posix as posix3, relative as relative24, sep as sep25 } from "node:path";
|
|
229506
229841
|
function humanMs(ms2) {
|
|
229507
229842
|
return ms2 < 1e3 ? `${ms2}ms` : `${Math.round(ms2 / 1e3)}s`;
|
|
229508
229843
|
}
|
|
@@ -229511,7 +229846,7 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
|
|
|
229511
229846
|
const files = {};
|
|
229512
229847
|
const visitedDirs = /* @__PURE__ */ new Set();
|
|
229513
229848
|
const walk4 = (abs, rel2) => {
|
|
229514
|
-
const real =
|
|
229849
|
+
const real = realpathSync18(abs);
|
|
229515
229850
|
if (visitedDirs.has(real)) return;
|
|
229516
229851
|
visitedDirs.add(real);
|
|
229517
229852
|
for (const name of readdirSync47(abs).sort()) {
|
|
@@ -229552,7 +229887,7 @@ function collectRelativeSiblings(files, tier5SrcDir) {
|
|
|
229552
229887
|
];
|
|
229553
229888
|
for (const abs of candidates) {
|
|
229554
229889
|
if (!existsSync101(abs) || statSync38(abs).isDirectory()) continue;
|
|
229555
|
-
const key4 = `/tier5-src/${
|
|
229890
|
+
const key4 = `/tier5-src/${relative24(tier5SrcDir, abs).split(sep25).join(posix3.sep)}`;
|
|
229556
229891
|
if (key4 in files) break;
|
|
229557
229892
|
files[key4] = readFileSync122(abs, "utf8");
|
|
229558
229893
|
queue.push(key4);
|
|
@@ -231611,7 +231946,7 @@ __export(shot_files_exports, {
|
|
|
231611
231946
|
});
|
|
231612
231947
|
import { createHash as createHash69 } from "node:crypto";
|
|
231613
231948
|
import { mkdirSync as mkdirSync52, readdirSync as readdirSync48, readFileSync as readFileSync126, rmSync as rmSync27, statSync as statSync40 } from "node:fs";
|
|
231614
|
-
import { basename as basename31, dirname as dirname61, join as join131, relative as
|
|
231949
|
+
import { basename as basename31, dirname as dirname61, join as join131, relative as relative25, resolve as resolve84, sep as sep26 } from "node:path";
|
|
231615
231950
|
function writeAtomic2(file2, bytes2) {
|
|
231616
231951
|
for (let attempt2 = 0; ; attempt2++) {
|
|
231617
231952
|
mkdirSync52(dirname61(file2), { recursive: true });
|
|
@@ -231636,7 +231971,7 @@ function writeScreenShot(dir, screenId, base64) {
|
|
|
231636
231971
|
function inside3(base2, rel2) {
|
|
231637
231972
|
const root = resolve84(base2);
|
|
231638
231973
|
const p2 = resolve84(root, rel2);
|
|
231639
|
-
return p2.startsWith(root +
|
|
231974
|
+
return p2.startsWith(root + sep26) ? p2 : null;
|
|
231640
231975
|
}
|
|
231641
231976
|
function pruneRenders(dir, opts = {}) {
|
|
231642
231977
|
try {
|
|
@@ -231699,7 +232034,7 @@ function pruneStaleShots(dir, keepScreenIds, now = Date.now()) {
|
|
|
231699
232034
|
if (mtime !== null && now - mtime >= STALE_TMP_MS) rmSync27(f2, { force: true });
|
|
231700
232035
|
continue;
|
|
231701
232036
|
}
|
|
231702
|
-
const screenId =
|
|
232037
|
+
const screenId = relative25(root, f2).split(sep26).join("/").replace(/\.png$/, "");
|
|
231703
232038
|
if (!keepScreenIds.has(screenId)) rmSync27(f2, { force: true });
|
|
231704
232039
|
}
|
|
231705
232040
|
}
|
|
@@ -235185,8 +235520,8 @@ __export(validate_design_exports, {
|
|
|
235185
235520
|
validateDesign: () => validateDesign
|
|
235186
235521
|
});
|
|
235187
235522
|
import { randomBytes as randomBytes18 } from "node:crypto";
|
|
235188
|
-
import { closeSync as closeSync11, constants as constants9, existsSync as existsSync110, lstatSync as lstatSync33, openSync as openSync10, readFileSync as readFileSync133, realpathSync as
|
|
235189
|
-
import { dirname as dirname63, isAbsolute as isAbsolute16, join as join139, relative as
|
|
235523
|
+
import { closeSync as closeSync11, constants as constants9, existsSync as existsSync110, lstatSync as lstatSync33, openSync as openSync10, readFileSync as readFileSync133, realpathSync as realpathSync19, renameSync as renameSync19, unlinkSync as unlinkSync9, writeFileSync as writeFileSync50 } from "node:fs";
|
|
235524
|
+
import { dirname as dirname63, isAbsolute as isAbsolute16, join as join139, relative as relative26, resolve as resolve87, sep as sep27, win32 } from "node:path";
|
|
235190
235525
|
import ts19 from "typescript";
|
|
235191
235526
|
function readColorToken(tokens2, name) {
|
|
235192
235527
|
const entry = obj5(tokens2.colors)?.[name];
|
|
@@ -235408,14 +235743,14 @@ function writableTokensPath(contentDir2, location) {
|
|
|
235408
235743
|
if (isAbsolute16(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
|
|
235409
235744
|
throw new Error("--fix requires a token path inside the content directory without traversal.");
|
|
235410
235745
|
}
|
|
235411
|
-
const root =
|
|
235746
|
+
const root = realpathSync19(contentDir2);
|
|
235412
235747
|
const path2 = resolve87(root, location);
|
|
235413
|
-
const rel2 =
|
|
235414
|
-
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${
|
|
235748
|
+
const rel2 = relative26(root, path2);
|
|
235749
|
+
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep27}`) || isAbsolute16(rel2)) {
|
|
235415
235750
|
throw new Error("--fix requires a token path inside the content directory.");
|
|
235416
235751
|
}
|
|
235417
235752
|
let current = root;
|
|
235418
|
-
const parts = rel2.split(
|
|
235753
|
+
const parts = rel2.split(sep27);
|
|
235419
235754
|
for (const [index, part4] of parts.entries()) {
|
|
235420
235755
|
current = join139(current, part4);
|
|
235421
235756
|
const stat9 = lstatSync33(current);
|
|
@@ -235423,8 +235758,8 @@ function writableTokensPath(contentDir2, location) {
|
|
|
235423
235758
|
throw new Error("--fix requires a regular token file under directories without symlinks.");
|
|
235424
235759
|
}
|
|
235425
235760
|
}
|
|
235426
|
-
const real =
|
|
235427
|
-
if (!real || real === ".." || real.startsWith(`..${
|
|
235761
|
+
const real = relative26(root, realpathSync19(path2));
|
|
235762
|
+
if (!real || real === ".." || real.startsWith(`..${sep27}`) || isAbsolute16(real)) {
|
|
235428
235763
|
throw new Error("--fix cannot write outside the content directory.");
|
|
235429
235764
|
}
|
|
235430
235765
|
return path2;
|
|
@@ -235620,11 +235955,11 @@ function validateDesign(evidenceDir, contentDir2, options2 = {}) {
|
|
|
235620
235955
|
};
|
|
235621
235956
|
}
|
|
235622
235957
|
function safeEvidencePath(contentDir2, name) {
|
|
235623
|
-
const root =
|
|
235958
|
+
const root = realpathSync19(contentDir2);
|
|
235624
235959
|
const dir = realDirIn(root, ".himi/one-app");
|
|
235625
235960
|
if (!dir) throw new Error("The design evidence directory is not a regular directory.");
|
|
235626
|
-
const real =
|
|
235627
|
-
if (!real || real === ".." || real.startsWith(`..${
|
|
235961
|
+
const real = relative26(root, realpathSync19(dir));
|
|
235962
|
+
if (!real || real === ".." || real.startsWith(`..${sep27}`) || isAbsolute16(real)) {
|
|
235628
235963
|
throw new Error("The design evidence directory is outside the content directory.");
|
|
235629
235964
|
}
|
|
235630
235965
|
const path2 = join139(dir, name);
|
|
@@ -238788,52 +239123,52 @@ var init_preview_assets_generated = __esm({
|
|
|
238788
239123
|
init_define_HHP_CATALOG();
|
|
238789
239124
|
init_preview_assets_format();
|
|
238790
239125
|
PREVIEW_ASSET_MANIFEST = [
|
|
238791
|
-
{ key: "assets/DashboardHost-
|
|
238792
|
-
{ key: "assets/DevDrawer-
|
|
238793
|
-
{ key: "assets/IdiomCompare-
|
|
238794
|
-
{ key: "assets/LightboxViewer-
|
|
238795
|
-
{ key: "assets/OfflineReadingBar-
|
|
238796
|
-
{ key: "assets/PhonePreviewControl-
|
|
238797
|
-
{ key: "assets/SchemeCompare-
|
|
238798
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
239126
|
+
{ key: "assets/DashboardHost-B3yH2ftL.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "b72a4a0a41af03493e6542ef62adcb3e0fd3f4a748fc2b3c6bb22cc8a30a1b48" },
|
|
239127
|
+
{ key: "assets/DevDrawer-CrQNTC9J.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "2878b00333cc6ad4ffc519011716598ff01677f2e3b98ebfe4b173faf1d198a0" },
|
|
239128
|
+
{ key: "assets/IdiomCompare-CLtmgT7N.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "215eb54d6c517ba7d33144c284b1b1cce8c5e40f036001bd3be7b3609ed7f185" },
|
|
239129
|
+
{ key: "assets/LightboxViewer-D1fVJJQx.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "63ab375018c7768574cf83de04925a5abd71ded9a4c2182aa4f7c81ceb5b67e4" },
|
|
239130
|
+
{ key: "assets/OfflineReadingBar-C9gBNxrn.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "40955808e567462969c59e09fd412d83a7af52ba106a6786c448552015829a43" },
|
|
239131
|
+
{ key: "assets/PhonePreviewControl-BotjV7Ij.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "d782109f666b109be3c120cde3ebcc7c34e373246028e270b2a0054874ac2c16" },
|
|
239132
|
+
{ key: "assets/SchemeCompare-C-zJQVO-.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "ef38fae4a17e2e7095adc9ac24c412599a9aacdbf6b36b353b0651e72698be80" },
|
|
239133
|
+
{ key: "assets/WixFrogTelemetrySink-BwMaY6h_.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "fed3310eaef85d43b133c8543ae20fd4b9e2f600d4ec184bcbfb40e62ab9846d" },
|
|
238799
239134
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
238800
239135
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
238801
|
-
{ key: "assets/catalogFontFaces-
|
|
239136
|
+
{ key: "assets/catalogFontFaces-BTAV3YgN.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "f8d7b50dc8c5009554e4c2776479035d4e047a16c41a81aee49f33fcb75a9759" },
|
|
238802
239137
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
238803
|
-
{ key: "assets/files-transfer-
|
|
239138
|
+
{ key: "assets/files-transfer-fqTSB83W.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "43d7450eef2e64752d5d86d71be1e89d2d15583e08c8523db437f1daf82bfaee" },
|
|
238804
239139
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
238805
|
-
{ key: "assets/frogApiRules-
|
|
239140
|
+
{ key: "assets/frogApiRules-CrwXbbn8.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "348b601bd3ca96e1788283bfd01f81899e675db39308d792a3e6a94c2060eb67" },
|
|
238806
239141
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
238807
239142
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
238808
239143
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133340, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
238809
|
-
{ key: "assets/index-
|
|
238810
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
238811
|
-
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
238812
|
-
{ key: "assets/pdf-
|
|
238813
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
238814
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
238815
|
-
{ key: "assets/pdfDocument-
|
|
238816
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
238817
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
238818
|
-
{ key: "assets/webviewBridgeHost-
|
|
238819
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
238820
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
238821
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
238822
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
238823
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
238824
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
238825
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
238826
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
238827
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
238828
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
238829
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
238830
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
238831
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
238832
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
238833
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
238834
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
238835
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
238836
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
239144
|
+
{ key: "assets/index-BOEue-lH.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1583450, sha256: "2331c6a5b9c112df913150c65d969ec03b756b9ba3abce86903c0873138bec0b" },
|
|
239145
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1719494, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
239146
|
+
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1727245, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
|
|
239147
|
+
{ key: "assets/pdf-CYzkvTz2.js", contentType: "application/javascript; charset=utf-8", offset: 1737776, length: 488215, sha256: "d13ef703cc8f4d7eaa9b12967b618314b75002b5d4441dedbcc65e3601c4750d" },
|
|
239148
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2225991, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
239149
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2226081, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
239150
|
+
{ key: "assets/pdfDocument-lp8XvaWf.js", contentType: "application/javascript; charset=utf-8", offset: 3543115, length: 3470, sha256: "c1e05e5dece7797f1b0286eccf3b2ed7499d6128119cef18846b5d55dc2ca6a3" },
|
|
239151
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3546585, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
239152
|
+
{ key: "assets/scrollLinkedRuntime-CLRVaRkz.js", contentType: "application/javascript; charset=utf-8", offset: 3548851, length: 2278, sha256: "6a66c42f9ec16766ccc1b79f49c412262d270d5b74fb4f6bae8df906ab94c7fc" },
|
|
239153
|
+
{ key: "assets/webviewBridgeHost-BMm_RXmv.js", contentType: "application/javascript; charset=utf-8", offset: 3551129, length: 9889, sha256: "b04e22920baf5d68c62716b699771156597f47a4a1206e986acff73a7d55ef99" },
|
|
239154
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3561018, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
239155
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3565628, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
239156
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4054212, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
239157
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4145136, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
239158
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4236120, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
239159
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4327100, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
239160
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4417972, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
239161
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4508952, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
239162
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4617588, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
239163
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4726672, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
239164
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4835720, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
239165
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4943420, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
239166
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5031528, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
239167
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5038346, length: 4924, sha256: "b7c44f0f6fae4fb9c599a7377e99a9ec4035a32809550c8920820f28e5b066a3" },
|
|
239168
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5043270, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
239169
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5054727, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
239170
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5055898, length: 24239, sha256: "42bd04b28606706389a6b3ab79b74f37259ab43bf66580d2d9c69be5980a53fe" },
|
|
239171
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5080137, length: 24256, sha256: "c14ee20bf56b80e2622177d34824b18f368c66faaffd7ea3aa9b07b60582411c" }
|
|
238837
239172
|
];
|
|
238838
239173
|
}
|
|
238839
239174
|
});
|
|
@@ -243674,7 +244009,7 @@ var init_credential_profile = __esm({
|
|
|
243674
244009
|
|
|
243675
244010
|
// ../store-release/iap-credentials.ts
|
|
243676
244011
|
import { createHash as createHash75 } from "node:crypto";
|
|
243677
|
-
import { existsSync as existsSync119, readFileSync as readFileSync144, realpathSync as
|
|
244012
|
+
import { existsSync as existsSync119, readFileSync as readFileSync144, realpathSync as realpathSync20 } from "node:fs";
|
|
243678
244013
|
import { homedir as homedir17 } from "node:os";
|
|
243679
244014
|
function accountFingerprint(keyId, issuerId) {
|
|
243680
244015
|
return `sha256:${createHash75("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
|
|
@@ -243712,7 +244047,7 @@ function resolveIapCredentials(options2) {
|
|
|
243712
244047
|
const { target } = options2;
|
|
243713
244048
|
const home2 = options2.home ?? homedir17();
|
|
243714
244049
|
const readFile21 = options2.readFile ?? ((p2) => readFileSync144(p2, "utf8"));
|
|
243715
|
-
const realpath2 = options2.realpath ??
|
|
244050
|
+
const realpath2 = options2.realpath ?? realpathSync20;
|
|
243716
244051
|
const profile = requireExplicitProfile(options2.profileFlag, target);
|
|
243717
244052
|
const creds = resolveStoreCredentials({
|
|
243718
244053
|
app: target.himiApp,
|
|
@@ -244805,7 +245140,7 @@ var init_store_iap_connect = __esm({
|
|
|
244805
245140
|
});
|
|
244806
245141
|
|
|
244807
245142
|
// src/store-iap-screenshots.ts
|
|
244808
|
-
import { dirname as dirname66, join as join151, relative as
|
|
245143
|
+
import { dirname as dirname66, join as join151, relative as relative28 } from "node:path";
|
|
244809
245144
|
function purchaseScreensFor(item2) {
|
|
244810
245145
|
const screen = item2.wix && PURCHASE_SCREENS[item2.wix.entityType];
|
|
244811
245146
|
if (!screen || !item2.wix) return [];
|
|
@@ -244933,7 +245268,7 @@ async function shoot(selected, run3, outDir) {
|
|
|
244933
245268
|
} catch (e2) {
|
|
244934
245269
|
return { ...report9, skipped: `could not save the screenshot: ${e2.message}` };
|
|
244935
245270
|
}
|
|
244936
|
-
return { ...report9, screenshot:
|
|
245271
|
+
return { ...report9, screenshot: relative28(dirname66(run3.manifestPath), path2) };
|
|
244937
245272
|
}
|
|
244938
245273
|
function visibleText2(html) {
|
|
244939
245274
|
return html.replace(/ | | /gi, "\xA0").replace(/&/g, "&");
|
|
@@ -245131,7 +245466,7 @@ __export(store_iap_exports, {
|
|
|
245131
245466
|
});
|
|
245132
245467
|
import { execFileSync as execFileSync8 } from "node:child_process";
|
|
245133
245468
|
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
245134
|
-
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync56, readFileSync as readFileSync147, realpathSync as
|
|
245469
|
+
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync56, readFileSync as readFileSync147, realpathSync as realpathSync21, renameSync as renameSync22, rmSync as rmSync35, writeFileSync as writeFileSync52 } from "node:fs";
|
|
245135
245470
|
import { homedir as homedir18, hostname as hostname6 } from "node:os";
|
|
245136
245471
|
import { dirname as dirname67, join as join153, resolve as resolve97 } from "node:path";
|
|
245137
245472
|
function scrubDeep(value2, scrub) {
|
|
@@ -245531,7 +245866,7 @@ function readInAppPurchaseKey(flags, deps, creds) {
|
|
|
245531
245866
|
if (!/^[A-Z0-9]{10}$/.test(keyId)) throw new UsageError7(`--iap-key-id must be the 10-character key id App Store Connect shows, got "${keyId}"`);
|
|
245532
245867
|
let privateKey2;
|
|
245533
245868
|
try {
|
|
245534
|
-
assertCredentialOutsideRepo("--iap-key", (deps.realpath ??
|
|
245869
|
+
assertCredentialOutsideRepo("--iap-key", (deps.realpath ?? realpathSync21)(path2));
|
|
245535
245870
|
privateKey2 = readInput2(deps, path2, "In-App Purchase key");
|
|
245536
245871
|
} catch (error) {
|
|
245537
245872
|
throw new KeyError(error.message);
|
|
@@ -248275,7 +248610,7 @@ __export(auth_gate_copy_exports, {
|
|
|
248275
248610
|
});
|
|
248276
248611
|
import { createHash as createHash80 } from "node:crypto";
|
|
248277
248612
|
import { existsSync as existsSync126, readdirSync as readdirSync54, readFileSync as readFileSync156, writeFileSync as writeFileSync55 } from "node:fs";
|
|
248278
|
-
import { dirname as dirname71, join as join160, relative as
|
|
248613
|
+
import { dirname as dirname71, join as join160, relative as relative29, resolve as resolve100 } from "node:path";
|
|
248279
248614
|
import { fileURLToPath as fileURLToPath38 } from "node:url";
|
|
248280
248615
|
function discoverMessageSources() {
|
|
248281
248616
|
const roots2 = [
|
|
@@ -248707,7 +249042,7 @@ var init_auth_gate_copy = __esm({
|
|
|
248707
249042
|
});
|
|
248708
249043
|
|
|
248709
249044
|
// ../l10n/extract.ts
|
|
248710
|
-
import { resolve as resolve101, join as join161, relative as
|
|
249045
|
+
import { resolve as resolve101, join as join161, relative as relative30, dirname as dirname72 } from "node:path";
|
|
248711
249046
|
import { createHash as createHash81 } from "node:crypto";
|
|
248712
249047
|
import { fileURLToPath as fileURLToPath39 } from "node:url";
|
|
248713
249048
|
function keyOf3(source2) {
|
|
@@ -251409,7 +251744,7 @@ var init_analyze = __esm({
|
|
|
251409
251744
|
|
|
251410
251745
|
// src/base44-analyze/write-artifacts.ts
|
|
251411
251746
|
import { existsSync as existsSync134, mkdirSync as mkdirSync61, readFileSync as readFileSync163, rmSync as rmSync38, writeFileSync as writeFileSync62 } from "node:fs";
|
|
251412
|
-
import { dirname as dirname76, join as join169, resolve as resolve104, sep as
|
|
251747
|
+
import { dirname as dirname76, join as join169, resolve as resolve104, sep as sep28 } from "node:path";
|
|
251413
251748
|
function isBookFolder(dir) {
|
|
251414
251749
|
try {
|
|
251415
251750
|
return JSON.parse(readFileSync163(join169(dir, "book.json"), "utf8")).kind === "base44-app-book";
|
|
@@ -251517,7 +251852,7 @@ function writeBase44Book(result, outDir, opts = {}) {
|
|
|
251517
251852
|
for (const f2 of result.sourceFiles) {
|
|
251518
251853
|
if (!safeRel(f2.path)) continue;
|
|
251519
251854
|
const dest = join169(sourceRoot, ...f2.path.split("/"));
|
|
251520
|
-
if (!dest.startsWith(sourceRoot +
|
|
251855
|
+
if (!dest.startsWith(sourceRoot + sep28)) continue;
|
|
251521
251856
|
mkdirSync61(dirname76(dest), { recursive: true });
|
|
251522
251857
|
writeFileSync62(dest, f2.bytes);
|
|
251523
251858
|
}
|
|
@@ -256767,6 +257102,9 @@ function generateScreens(input) {
|
|
|
256767
257102
|
return [`${str13(o2.layoutItemId)}:${str13(o2.sectionId)}:${String(o2.arrayIndex ?? "")}`, o2];
|
|
256768
257103
|
}));
|
|
256769
257104
|
const taken = new Set(input.takenScreenIds ?? []);
|
|
257105
|
+
const hiddenPage = (id) => obj6(obj6(layoutItems[id]).settings).hideFromNavigation === true;
|
|
257106
|
+
const homePage = input.homeScreenId ? str13(arr(obj6(obj6(input.navigation).target).tabs).map(obj6)[0]?.layoutItemId) || (sourceTabs.length > 1 ? tabScreenIds.map((id) => pageItems(id)[0]).find((id) => id && !hiddenPage(id)) : void 0) || items.find((id) => !hiddenPage(id)) || items[0] : void 0;
|
|
257107
|
+
if (input.homeScreenId) taken.add(input.homeScreenId);
|
|
256770
257108
|
const fellBack = /* @__PURE__ */ new Set();
|
|
256771
257109
|
const paramLinked = /* @__PURE__ */ new Set();
|
|
256772
257110
|
const out2 = {
|
|
@@ -256841,7 +257179,7 @@ function generateScreens(input) {
|
|
|
256841
257179
|
out2.routes.push({ layoutItemId, label: label4, screenId: screenId2, kind: "template", ...params && Object.keys(params).length ? { params } : {} });
|
|
256842
257180
|
continue;
|
|
256843
257181
|
}
|
|
256844
|
-
const screenId = screenIdFor(label4, taken);
|
|
257182
|
+
const screenId = layoutItemId === homePage ? input.homeScreenId : screenIdFor(label4, taken);
|
|
256845
257183
|
const uses = [];
|
|
256846
257184
|
const extras = [];
|
|
256847
257185
|
const unmapped = [];
|
|
@@ -256958,6 +257296,9 @@ function generateScreens(input) {
|
|
|
256958
257296
|
}
|
|
256959
257297
|
if (!demoted) break;
|
|
256960
257298
|
}
|
|
257299
|
+
if (input.homeScreenId && homePage && !out2.screens[input.homeScreenId]) {
|
|
257300
|
+
out2.gaps.push({ page: str13(obj6(layoutItems[homePage]).title) || homePage, sectionId: "", sectionDefinitionId: "(navigation)", reason: `the first page did not become a generated screen, so the app still opens the template's ${input.homeScreenId} (sample content) as its Home` });
|
|
257301
|
+
}
|
|
256961
257302
|
mergePageWorkers(out2);
|
|
256962
257303
|
markSharedTemplateParams(out2, paramLinked);
|
|
256963
257304
|
const pointerPart = (id) => id.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
@@ -257136,13 +257477,14 @@ function addNavigation(out2, plan, taken) {
|
|
|
257136
257477
|
out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
|
|
257137
257478
|
out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
|
|
257138
257479
|
}
|
|
257139
|
-
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;
|
|
257480
|
+
var TEMPLATE_HOME_SCREEN, 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;
|
|
257140
257481
|
var init_generate2 = __esm({
|
|
257141
257482
|
"src/one-app/generate.ts"() {
|
|
257142
257483
|
init_define_HHP_CATALOG();
|
|
257143
257484
|
init_recipes();
|
|
257144
257485
|
init_recipes();
|
|
257145
257486
|
init_tab_ids();
|
|
257487
|
+
TEMPLATE_HOME_SCREEN = "himi_branded_home";
|
|
257146
257488
|
TEMPLATE_SCREEN_PARAM_KEYS = {
|
|
257147
257489
|
himi_shop: ["categoryId"],
|
|
257148
257490
|
himi_groups_feed: ["title", "groupListLabel", "pageSize"],
|
|
@@ -258424,13 +258766,14 @@ async function runOneAppApplyNavigation(args, io2) {
|
|
|
258424
258766
|
if (edit.status === "kept") return report6(io2, false, { code: "config_unwritable", error: edit.reason, tabs: plan.tabs });
|
|
258425
258767
|
if (edit.status === "set" && !options2.dryRun) writeFileAtomic(configPath, edit.source);
|
|
258426
258768
|
const icons = plan.tabs.filter((tab) => tab.layoutItemId !== "(more)").map((tab) => ({ tab: tab.label, source: tab.icon ?? null, ...tabIcon(tab.icon) }));
|
|
258769
|
+
const homeGap = screens.has(TEMPLATE_HOME_SCREEN) && plan.tabs[0] && plan.tabs[0].screenId !== TEMPLATE_HOME_SCREEN ? [`the first tab opens ${plan.tabs[0].screenId}, not ${TEMPLATE_HOME_SCREEN}: the Android app, the drawer's Home row and "Not available \u2192 Home" still open the template's Home (sample content)`] : [];
|
|
258427
258770
|
return report6(io2, true, {
|
|
258428
258771
|
navigation: edit.status,
|
|
258429
258772
|
dryRun: options2.dryRun,
|
|
258430
258773
|
tabs: plan.tabs.map((tab, index) => ({ id: edit.tabIds[index], label: tab.label.trim(), screenId: tab.screenId })),
|
|
258431
258774
|
repointedTabIds: edit.repointed,
|
|
258432
258775
|
icons: icons.map(({ tab, source: source2, icon, resolved: resolved3 }) => ({ tab, source: source2, icon, resolved: resolved3 })),
|
|
258433
|
-
gaps: icons.filter((i2) => !i2.resolved).map((i2) => `${i2.tab}: no catalog icon for ${i2.source ?? "(none)"}, using ${i2.icon}`),
|
|
258776
|
+
gaps: [...icons.filter((i2) => !i2.resolved).map((i2) => `${i2.tab}: no catalog icon for ${i2.source ?? "(none)"}, using ${i2.icon}`), ...homeGap],
|
|
258434
258777
|
next: "himi validate --strict"
|
|
258435
258778
|
});
|
|
258436
258779
|
}
|
|
@@ -258443,6 +258786,7 @@ var init_apply_navigation = __esm({
|
|
|
258443
258786
|
init_progress();
|
|
258444
258787
|
init_validate_topbar();
|
|
258445
258788
|
init_tab_ids();
|
|
258789
|
+
init_generate2();
|
|
258446
258790
|
tabsFileOf = (out2) => `${out2}.tabs.json`;
|
|
258447
258791
|
APPLY_NAVIGATION_USAGE = "himi one-app apply-navigation --evidence-dir <.himi/one-app> --content <app-dir> [--tabs <tabs.json>] [--dry-run]";
|
|
258448
258792
|
SOURCE_ICON_ALIASES = {
|
|
@@ -258511,6 +258855,13 @@ function parseArgs5(args) {
|
|
|
258511
258855
|
if (!evidenceDir || !contentDir2) throw new Error("Both --evidence-dir and --content are required.");
|
|
258512
258856
|
return { evidenceDir: resolve110(evidenceDir), contentDir: resolve110(contentDir2), out: resolve110(out2 ?? join177(evidenceDir, "gen", "screens.json")) };
|
|
258513
258857
|
}
|
|
258858
|
+
function claimedHome(out2) {
|
|
258859
|
+
try {
|
|
258860
|
+
return JSON.parse(readFileSync169(homeFile(out2), "utf8")).homeScreenId === TEMPLATE_HOME_SCREEN;
|
|
258861
|
+
} catch {
|
|
258862
|
+
return false;
|
|
258863
|
+
}
|
|
258864
|
+
}
|
|
258514
258865
|
function previousOutput(out2) {
|
|
258515
258866
|
const keys2 = (path2) => {
|
|
258516
258867
|
try {
|
|
@@ -258556,17 +258907,19 @@ async function runOneAppGenerate(args, io2) {
|
|
|
258556
258907
|
}
|
|
258557
258908
|
})();
|
|
258558
258909
|
let taken;
|
|
258910
|
+
let homeScreenId;
|
|
258559
258911
|
const previousIds = previousOutput(options2.out);
|
|
258560
258912
|
try {
|
|
258561
258913
|
const manifest2 = JSON.parse(readFileSync169(join177(options2.contentDir, "himalaya.content.json"), "utf8"));
|
|
258562
258914
|
taken = new Set(Object.keys(manifest2.screens ?? {}));
|
|
258915
|
+
if (taken.has(TEMPLATE_HOME_SCREEN) && (!previousIds.includes(TEMPLATE_HOME_SCREEN) || claimedHome(options2.out))) homeScreenId = TEMPLATE_HOME_SCREEN;
|
|
258563
258916
|
for (const id of previousIds) taken.delete(id);
|
|
258564
258917
|
} catch {
|
|
258565
258918
|
return report7(io2, false, { code: "content_invalid", error: "himalaya.content.json not found or unreadable: --content must be a Himi content package." });
|
|
258566
258919
|
}
|
|
258567
258920
|
let result;
|
|
258568
258921
|
try {
|
|
258569
|
-
result = generateScreens({ raw, pages: pages2, business, navigation, takenScreenIds: taken, recipe: (name, values) => readRecipe(options2.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options2.contentDir, name, values), hasModule: (file2) => existsSync141(join177(options2.contentDir, "tier5-src", "_shared", `${file2}.ts`)) });
|
|
258922
|
+
result = generateScreens({ raw, pages: pages2, business, navigation, takenScreenIds: taken, ...homeScreenId ? { homeScreenId } : {}, recipe: (name, values) => readRecipe(options2.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options2.contentDir, name, values), hasModule: (file2) => existsSync141(join177(options2.contentDir, "tier5-src", "_shared", `${file2}.ts`)) });
|
|
258570
258923
|
} catch (error) {
|
|
258571
258924
|
if (error instanceof RecipeError) return report7(io2, false, { code: "recipe_unavailable", error: error.message });
|
|
258572
258925
|
throw error;
|
|
@@ -258575,6 +258928,7 @@ async function runOneAppGenerate(args, io2) {
|
|
|
258575
258928
|
mkdirSync63(dirname77(options2.out), { recursive: true });
|
|
258576
258929
|
writeFileSync67(options2.out, JSON.stringify(result.screens, null, 2) + "\n", "utf8");
|
|
258577
258930
|
writeFileSync67(idsFile(options2.out), JSON.stringify([.../* @__PURE__ */ new Set([...previousIds, ...Object.keys(result.screens)])].sort()) + "\n", "utf8");
|
|
258931
|
+
if (homeScreenId) writeFileSync67(homeFile(options2.out), JSON.stringify({ homeScreenId }) + "\n", "utf8");
|
|
258578
258932
|
const tabsPath = tabsFileOf(options2.out);
|
|
258579
258933
|
const tabs = tabsFile(result, navigation);
|
|
258580
258934
|
if (tabs) writeFileSync67(tabsPath, JSON.stringify(tabs, null, 2) + "\n", "utf8");
|
|
@@ -258632,7 +258986,7 @@ async function runOneAppGenerate(args, io2) {
|
|
|
258632
258986
|
}
|
|
258633
258987
|
return report7(io2, true, { ...body, next: `himi template screens --upsert --from ${shellArg(options2.out)}` + (result.tabs.length ? ` && himi one-app apply-navigation --evidence-dir ${shellArg(options2.evidenceDir)} --content ${shellArg(options2.contentDir)} --tabs ${shellArg(tabsFileOf(options2.out))}` : "") });
|
|
258634
258988
|
}
|
|
258635
|
-
var GENERATE_USAGE, GENERATED_WORKER_MARKER, idsFile, shellArg;
|
|
258989
|
+
var GENERATE_USAGE, GENERATED_WORKER_MARKER, idsFile, homeFile, shellArg;
|
|
258636
258990
|
var init_generate_cli = __esm({
|
|
258637
258991
|
"src/one-app/generate-cli.ts"() {
|
|
258638
258992
|
init_define_HHP_CATALOG();
|
|
@@ -258645,6 +258999,7 @@ var init_generate_cli = __esm({
|
|
|
258645
258999
|
GENERATE_USAGE = "himi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]";
|
|
258646
259000
|
GENERATED_WORKER_MARKER = "// Generated by `himi one-app generate`";
|
|
258647
259001
|
idsFile = (out2) => `${out2}.ids.json`;
|
|
259002
|
+
homeFile = (out2) => `${out2}.home.json`;
|
|
258648
259003
|
shellArg = (value2) => /^[\w@%+=:,./-]+$/.test(value2) ? value2 : `'${value2.replace(/'/g, `'\\''`)}'`;
|
|
258649
259004
|
}
|
|
258650
259005
|
});
|
|
@@ -259784,7 +260139,7 @@ __export(cli_exports2, {
|
|
|
259784
260139
|
ONE_APP_WORKFLOW: () => ONE_APP_WORKFLOW,
|
|
259785
260140
|
runOneAppCommand: () => runOneAppCommand
|
|
259786
260141
|
});
|
|
259787
|
-
import { closeSync as closeSync13, constants as constants12, lstatSync as lstatSync37, mkdirSync as mkdirSync64, openSync as openSync12, readFileSync as readFileSync172, realpathSync as
|
|
260142
|
+
import { closeSync as closeSync13, constants as constants12, lstatSync as lstatSync37, mkdirSync as mkdirSync64, openSync as openSync12, readFileSync as readFileSync172, realpathSync as realpathSync23, writeFileSync as writeFileSync69 } from "node:fs";
|
|
259788
260143
|
import { createHash as createHash89 } from "node:crypto";
|
|
259789
260144
|
import { isIP as isIP2 } from "node:net";
|
|
259790
260145
|
import { dirname as dirname78, join as join180, parse as parse8, resolve as resolve113 } from "node:path";
|
|
@@ -259980,7 +260335,7 @@ async function runOneAppCommand(argv, io2, deps = {}, commandIncluded = false) {
|
|
|
259980
260335
|
if (argv.includes("--help")) {
|
|
259981
260336
|
io2.log(`${ONE_APP_USAGE}
|
|
259982
260337
|
|
|
259983
|
-
Collect the source mobile app and hand it to the current coding agent. The agent continues with a faithful plan, local generation and a checked hosted draft. Branded falls back to Free (Spaces) only when absent. This command itself does not launch AI or build an app. --locale selects the source view (en by default); choose the app's actual language before collecting. --dir is the parent directory; an existing destination is refused. --top-tabs bottom-tabs (default) plans bottom tabs, one per visible page, for a source with top tabs; keep retains the top tabs.
|
|
260338
|
+
Collect the source mobile app and hand it to the current coding agent. The agent continues with a faithful plan, local generation and a checked hosted draft. Branded falls back to Free (Spaces) only when absent. This command itself does not launch AI or build an app. --locale <tag> selects the source view (en by default); choose the app's actual language before collecting. <tag> is one of the One App's languages: ${SUPPORTED_LOCALES.join(", ")}. --dir is the parent directory; an existing destination is refused. --top-tabs bottom-tabs (default) plans bottom tabs, one per visible page, for a source with top tabs; keep retains the top tabs.
|
|
259984
260339
|
|
|
259985
260340
|
validate-payments checks site-bound payment evidence and explicit paid-flow decisions before scaffolding; it does not independently verify merchant readiness. validate-topbar checks authored source top-bar controls against the migrated config.ts. validate-design compares the source theme's colors, heading/body font families, button shape and accent text contrast with the migrated tokens.json, repairs the mismatches with --fix, and records a passing check for the coverage ledger with --record. Both are scoped to a One App evidence directory and do not change general himi validate behavior.`);
|
|
259986
260341
|
return 0;
|
|
@@ -260031,7 +260386,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
|
|
|
260031
260386
|
mkdirSync64(options2.parentDir, { recursive: true, mode: 448 });
|
|
260032
260387
|
assertSafeParents(options2.parentDir);
|
|
260033
260388
|
mkdirSync64(options2.workspace, { mode: 448 });
|
|
260034
|
-
if (
|
|
260389
|
+
if (realpathSync23(options2.workspace) !== options2.workspace) throw new Error("destination changed");
|
|
260035
260390
|
evidenceDir = join180(options2.workspace, ".himi", "one-app");
|
|
260036
260391
|
mkdirSync64(evidenceDir, { recursive: true, mode: 448 });
|
|
260037
260392
|
} catch (error) {
|
|
@@ -260157,6 +260512,7 @@ var ONE_APP_USAGE, ONE_APP_WORKFLOW, UUID2, SLUG2, VALUE_FLAGS, GLOBAL_SWITCHES,
|
|
|
260157
260512
|
var init_cli2 = __esm({
|
|
260158
260513
|
"src/one-app/cli.ts"() {
|
|
260159
260514
|
init_define_HHP_CATALOG();
|
|
260515
|
+
init_locale();
|
|
260160
260516
|
init_wix_owner();
|
|
260161
260517
|
init_collect();
|
|
260162
260518
|
init_validate_topbar();
|
|
@@ -260175,7 +260531,7 @@ var init_cli2 = __esm({
|
|
|
260175
260531
|
init_payment_review();
|
|
260176
260532
|
init_navigation();
|
|
260177
260533
|
init_version2();
|
|
260178
|
-
ONE_APP_USAGE = "himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale
|
|
260534
|
+
ONE_APP_USAGE = "himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale <tag>] [--prompt <text> | --prompt-file <file>] [--name <slug>] [--dir <parent>] [--target bo] [--top-tabs bottom-tabs|keep] [--json]\nhimi one-app validate-topbar --evidence-dir <.himi/one-app> --content <app-dir> [--json]\nhimi one-app header-badges --evidence-dir <.himi/one-app> --content <app-dir> [--dry-run]\nhimi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]\n" + APPLY_NAVIGATION_USAGE + "\nhimi one-app provision --evidence-dir <.himi/one-app> --content <app-dir> [--dry-run]\n" + ACCESS_USAGE + "\nhimi one-app validate-design --evidence-dir <.himi/one-app> --content <app-dir> [--json] [--fix] [--record --release-hash <sha256>]\nhimi one-app coverage init|sync|check|verify --evidence-dir <.himi/one-app> --content <app-dir> [--release-hash <sha256>]\nhimi one-app validate-identity --evidence-dir <.himi/one-app> --content <app-dir> [--json] [--fix]\n" + PAYMENT_REVIEW_USAGE;
|
|
260179
260535
|
ONE_APP_WORKFLOW = "one-app-to-himi-app";
|
|
260180
260536
|
UUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
260181
260537
|
SLUG2 = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
@@ -261837,9 +262193,8 @@ function siteFetchFor(ports) {
|
|
|
261837
262193
|
return ports.siteFetch ?? guardedSiteFetch;
|
|
261838
262194
|
}
|
|
261839
262195
|
function localeFromSiteLanguage(languageCode) {
|
|
261840
|
-
const tag = languageCode
|
|
261841
|
-
|
|
261842
|
-
return void 0;
|
|
262196
|
+
const tag = coerceSupportedLocale(languageCode);
|
|
262197
|
+
return tag && tag !== "en" ? { default: tag, pin: true } : void 0;
|
|
261843
262198
|
}
|
|
261844
262199
|
async function analyzeSite(input, ports) {
|
|
261845
262200
|
const clientId = input.clientId?.trim() || void 0;
|
|
@@ -262216,6 +262571,7 @@ var init_analyze2 = __esm({
|
|
|
262216
262571
|
init_types2();
|
|
262217
262572
|
init_rest();
|
|
262218
262573
|
init_visitor_auth();
|
|
262574
|
+
init_locale();
|
|
262219
262575
|
init_probes();
|
|
262220
262576
|
init_site_properties();
|
|
262221
262577
|
init_language();
|
|
@@ -262350,8 +262706,8 @@ var init_customer_build = __esm({
|
|
|
262350
262706
|
});
|
|
262351
262707
|
|
|
262352
262708
|
// src/site-analyze/apply.ts
|
|
262353
|
-
import { existsSync as existsSync144, readFileSync as readFileSync174, writeFileSync as writeFileSync70, copyFileSync as copyFileSync2, mkdirSync as mkdirSync65, realpathSync as
|
|
262354
|
-
import { dirname as dirname79, isAbsolute as isAbsolute17, join as join182, resolve as resolve114, sep as
|
|
262709
|
+
import { existsSync as existsSync144, readFileSync as readFileSync174, writeFileSync as writeFileSync70, copyFileSync as copyFileSync2, mkdirSync as mkdirSync65, realpathSync as realpathSync24, statSync as statSync49 } from "node:fs";
|
|
262710
|
+
import { dirname as dirname79, isAbsolute as isAbsolute17, join as join182, resolve as resolve114, sep as sep29 } from "node:path";
|
|
262355
262711
|
import { spawnSync as spawnSync11 } from "node:child_process";
|
|
262356
262712
|
function inRepoBakeRefusal(repoRoot2, shell) {
|
|
262357
262713
|
if (isBrandable(repoRoot2, shell)) return null;
|
|
@@ -262543,7 +262899,7 @@ function buildMergedContract(options2) {
|
|
|
262543
262899
|
const contained = (root, rel2) => {
|
|
262544
262900
|
if (isAbsolute17(rel2)) return void 0;
|
|
262545
262901
|
const full = resolve114(root, rel2);
|
|
262546
|
-
return full.startsWith(resolve114(root) +
|
|
262902
|
+
return full.startsWith(resolve114(root) + sep29) ? full : void 0;
|
|
262547
262903
|
};
|
|
262548
262904
|
const stage = (fromRel, toRel) => {
|
|
262549
262905
|
const from = contained(packageDir, fromRel);
|
|
@@ -262552,12 +262908,12 @@ function buildMergedContract(options2) {
|
|
|
262552
262908
|
let real;
|
|
262553
262909
|
let realRoot;
|
|
262554
262910
|
try {
|
|
262555
|
-
real =
|
|
262556
|
-
realRoot =
|
|
262911
|
+
real = realpathSync24(from);
|
|
262912
|
+
realRoot = realpathSync24(packageDir);
|
|
262557
262913
|
} catch {
|
|
262558
262914
|
return void 0;
|
|
262559
262915
|
}
|
|
262560
|
-
if (!real.startsWith(realRoot +
|
|
262916
|
+
if (!real.startsWith(realRoot + sep29)) return void 0;
|
|
262561
262917
|
try {
|
|
262562
262918
|
if (!statSync49(real).isFile()) return void 0;
|
|
262563
262919
|
mkdirSync65(dirname79(to2), { recursive: true });
|
|
@@ -266367,8 +266723,8 @@ __export(fidelity_exports, {
|
|
|
266367
266723
|
himalayaRepoRoot: () => himalayaRepoRoot
|
|
266368
266724
|
});
|
|
266369
266725
|
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
266370
|
-
import { existsSync as existsSync150, realpathSync as
|
|
266371
|
-
import { join as join190, relative as
|
|
266726
|
+
import { existsSync as existsSync150, realpathSync as realpathSync25 } from "node:fs";
|
|
266727
|
+
import { join as join190, relative as relative32, sep as sep30 } from "node:path";
|
|
266372
266728
|
function himalayaRepoRoot(dir) {
|
|
266373
266729
|
let top;
|
|
266374
266730
|
try {
|
|
@@ -266377,8 +266733,8 @@ function himalayaRepoRoot(dir) {
|
|
|
266377
266733
|
return null;
|
|
266378
266734
|
}
|
|
266379
266735
|
if (!existsSync150(join190(top, "tools/judges/fidelity/JUDGE.md"))) return null;
|
|
266380
|
-
const rel2 =
|
|
266381
|
-
return rel2.startsWith(`..${
|
|
266736
|
+
const rel2 = relative32(realpathSync25(top), realpathSync25(dir));
|
|
266737
|
+
return rel2.startsWith(`..${sep30}`) || rel2 === ".." ? null : top;
|
|
266382
266738
|
}
|
|
266383
266739
|
function fidelityEnvelope(report9) {
|
|
266384
266740
|
return report9.status === "fail" ? { ok: false, code: "fidelity_rows_failed", ...report9 } : { ok: true, ...report9 };
|
|
@@ -267178,7 +267534,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
267178
267534
|
create/store or inspect CAPTCHA keys (not login tokens).
|
|
267179
267535
|
Setup needs final --ios-bundle-id / --android-package-name.
|
|
267180
267536
|
|
|
267181
|
-
himi init <name> [--dir <parent>] [--template <t>] [--remote] [--base44-app-id <id>] [--base44-app-url <https://tenant>] [--push-setup | --no-push-setup] [--no-agent] [--no-first-look] [--locale
|
|
267537
|
+
himi init <name> [--dir <parent>] [--template <t>] [--remote] [--base44-app-id <id>] [--base44-app-url <https://tenant>] [--push-setup | --no-push-setup] [--no-agent] [--no-first-look] [--locale <tag>]
|
|
267182
267538
|
scaffold a starter content package (--template <t> starts
|
|
267183
267539
|
from a reference app; --remote fetches it off the serve plane;
|
|
267184
267540
|
--base44-app-id writes a Base44 app id into a Base44 template
|
|
@@ -267189,7 +267545,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
267189
267545
|
the build board (no browser is opened) and the first picture of
|
|
267190
267546
|
the home screen (offline, journaled; bundled templates only, never
|
|
267191
267547
|
a --remote one; --no-first-look skips it),
|
|
267192
|
-
--locale <tag> writes the app's language into config.ts
|
|
267548
|
+
--locale <tag> (a One App language code) writes the app's language into config.ts
|
|
267193
267549
|
(locale: { default, pin: true }; en adds nothing, an existing
|
|
267194
267550
|
locale is kept); a One App migration workspace supplies it
|
|
267195
267551
|
from its collected manifest when the flag is absent,
|
|
@@ -267935,14 +268291,16 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
267935
268291
|
env vars are accepted as flag equivalents. Optional local
|
|
267936
268292
|
cert/profile flags classify on-disk material without
|
|
267937
268293
|
replacing stored Branded secrets.
|
|
267938
|
-
himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale
|
|
268294
|
+
himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale <tag>]
|
|
267939
268295
|
[--prompt <text> | --prompt-file <file>] [--name <slug>] [--dir <parent>] [--target bo]
|
|
267940
268296
|
[--top-tabs bottom-tabs|keep] [--json]
|
|
267941
268297
|
collect One App configuration and hand off to the current coding agent
|
|
267942
268298
|
for faithful reconstruction and a checked hosted draft. Branded falls
|
|
267943
268299
|
back to Free (Spaces) only when absent. No model is launched here.
|
|
267944
268300
|
--dir is a parent; an existing destination is refused. Top tabs become
|
|
267945
|
-
bottom tabs unless --top-tabs keep. --locale selects the source view (default en)
|
|
268301
|
+
bottom tabs unless --top-tabs keep. --locale <tag> selects the source view (default en);
|
|
268302
|
+
<tag> is one of the One App's languages
|
|
268303
|
+
('himi one-app migrate --help' lists them).
|
|
267946
268304
|
himi one-app apply-navigation --evidence-dir <dir> --content <dir> [--tabs <file>] [--dry-run]
|
|
267947
268305
|
write the source bottom tabs (saved by one-app generate beside its
|
|
267948
268306
|
screens file) into the app config.ts navigation.
|
|
@@ -268129,7 +268487,7 @@ Transport: same targets/tokens as himi-serve \u2014 --target <local|prod|bo>, --
|
|
|
268129
268487
|
--telemetry-url, --control-token/--telemetry-token, or HIMI_* env.
|
|
268130
268488
|
Guides: ${DEVELOPER_PORTAL_URL}`;
|
|
268131
268489
|
var COMMANDS = [
|
|
268132
|
-
{ name: "one-app", summary: "collect One App source configuration and evidence for reconstruction; validate-payments checks payment evidence and explicit owner decisions before scaffolding; validate-topbar checks authored settings and resolved platform bars; header-badges binds the source header's bell, chat and cart counts in config.ts; access carries the source's locked pages (members only, a badge, a paid plan) as lock screens and hidden tabs; provision writes the collected loyalty currency and business time zone into the screens that take them as onAppear params (an unverified value is left unset, never invented); generate writes each source page as a screen descriptor from the evidence alone (source labels, copy, images, styles, alignment, contact text) for `template screens --upsert`, and fails with sections_unmapped rather than ship a placeholder for a section it cannot map; validate-design compares the source theme's colors, heading/body font families, button shape and accent text contrast with the migrated tokens.json; validate-identity checks built display text and the app name in config.ts for accidental technical app slugs against collected business identity (--fix writes the business name into config.ts); coverage inventories and verifies source requirements. Branded falls back to Free/Spaces only when absent. Collection does not launch a model or build the app. User-scoped Wix authentication is required; WIX_API_KEY is not used.", required: "migrate --msid <uuid> [--app-instance branded|free] [--locale
|
|
268490
|
+
{ name: "one-app", summary: "collect One App source configuration and evidence for reconstruction; validate-payments checks payment evidence and explicit owner decisions before scaffolding; validate-topbar checks authored settings and resolved platform bars; header-badges binds the source header's bell, chat and cart counts in config.ts; access carries the source's locked pages (members only, a badge, a paid plan) as lock screens and hidden tabs; provision writes the collected loyalty currency and business time zone into the screens that take them as onAppear params (an unverified value is left unset, never invented); generate writes each source page as a screen descriptor from the evidence alone (source labels, copy, images, styles, alignment, contact text) for `template screens --upsert`, and fails with sections_unmapped rather than ship a placeholder for a section it cannot map; validate-design compares the source theme's colors, heading/body font families, button shape and accent text contrast with the migrated tokens.json; validate-identity checks built display text and the app name in config.ts for accidental technical app slugs against collected business identity (--fix writes the business name into config.ts); coverage inventories and verifies source requirements. Branded falls back to Free/Spaces only when absent. Collection does not launch a model or build the app. User-scoped Wix authentication is required; WIX_API_KEY is not used.", required: "migrate --msid <uuid> [--app-instance branded|free] [--locale <tag>] [--prompt <text> | --prompt-file <file>] [--name <slug>] [--dir <parent>] [--target bo] [--top-tabs bottom-tabs|keep] [--json] | validate-payments --evidence-dir <.himi/one-app> [--json] | validate-topbar --evidence-dir <.himi/one-app> --content <app-dir> [--json] | generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>] | provision --evidence-dir <.himi/one-app> --content <app-dir> [--dry-run] | validate-design --evidence-dir <.himi/one-app> --content <app-dir> [--json] [--fix] [--record --release-hash <sha256>] | validate-identity --evidence-dir <.himi/one-app> --content <app-dir> [--json] [--fix] | coverage init|sync|check|verify --evidence-dir <.himi/one-app> --content <app-dir> [--release-hash <sha256>]" },
|
|
268133
268491
|
{ name: "hhp", summary: "author responsive HTML/CSS/TypeScript screens compiled to native SDUI and T5 workers; scaffold, inspect the app profile, lint or compile declared sources", required: "init <screen> | profile | lint | compile [--app <name>|--content <dir>] [--json] [--dry-run]" },
|
|
268134
268492
|
{ name: "captcha", summary: "create and store native CAPTCHA keys in Serve, or inspect setup status; customer setup verifies Wix site ownership; does not enable member CAPTCHA SDKs", required: "setup|status --app <app> [--content <dir>] [--site <msid>] [--ios-bundle-id <id>] [--android-package-name <id>] [--target <t>]" },
|
|
268135
268493
|
{ name: "init", summary: "scaffold a starter content package (OTA-only; no native shells). --template <t> starts from a full reference app (branded-lite = consumer storefront over a Wix site; owner-lite = owner CRUD/management) instead of the minimal counter; --templates lists bundled ones; --remote fetches the template off the serve plane (falls back to the bundled copy offline). The new app also gets its agent files (the same set `himi agent-init` writes: AGENTS.md, CLAUDE.md, the himalaya skill, HIMALAYA.md, a SessionStart hook) so the next session started inside it picks the work up; --no-agent skips them. It also makes the build board (.himi/studio/, exactly as `himi studio --no-open` does \u2014 it never opens a browser), so every later render, test, validate, push and progress entry refreshes it; and, for a template bundled with this CLI, it makes the FIRST PICTURE itself (never for a --remote one: that is its publisher's code, and a render runs it on this machine, so next[] leaves the render to the agent after it has read the code): exactly `himi render <homeScreenId> --png --mocks --device iphone` (offline \u2014 no request; never --live; --mocks loads the app's recorded data when it has any), run as a child it kills after a time budget, writing .himi/shots/<home>.png and journaling it (by: himi) as the STARTING POINT (\"Starting point: the <template> template, before any of your changes\") so the board and the journal hold a picture when init returns. init also records the source it wrote (.himi/init-source.json: a content fingerprint, Markdown left out), and the first home PNG render after the source diverges from it is journaled once as \"First look at your app\" \u2014 reported as `firstLook: {image}` or `{skipped: <reason>}`, never a failed init; `--no-first-look` skips it (for scripts and CI that render themselves). For a bundled template (never a --remote one \u2014 the preview would build and serve its publisher's code) init also STARTS the live preview itself: `himi run --watch --content <dir> --port <p> --no-open --idle-exit 30`, detached in its own process group with its output in .himi/watch.log, never waited for (the url is chosen before it builds), recorded in .himi/watch.json, and reported as `watch: {started, pid, url, board, log}` \u2014 or `{skipped: <reason>}` for a `CI` environment, a test runner, a watch already running, or a start that failed (never a failed init). Nothing else skips it: outside CI it is started, and `watch.note` says an opt-out was ignored. The envelope LEADS with `doNow`: three lines to run now (the consent preflight, the live preview \u2014 its url and board when init started it, else `himi run --watch --content <dir> &` with the board's path \u2014 and the postcard line), and ENDS with the same lines as `doNowAgain`, so an agent that reads only the head or only the tail (`| tail`) gets them; at a terminal they are also printed as plain text on stderr, before the JSON and again after it. Its `next[]` LEADS with the steps for THIS session, in this order for every app \u2014 the offline first render and that picture's `himi progress` postcard (only when init could not make the picture), the skill's consent preflight (authorize or mock any Wix or external startup request; with none, go straight on), and only then the live preview (the running one's url, or `himi run --watch &` when init did not start it) \u2014 ahead of the next-session guidance", required: "<name> [--dir] [--template <t>] [--remote] [--base44-app-id <id>] [--base44-app-url <https://tenant>] [--no-agent] [--no-first-look] | --templates" },
|
|
@@ -270904,7 +271262,7 @@ init_preview_surfaces();
|
|
|
270904
271262
|
init_lint_report();
|
|
270905
271263
|
import { createHash as createHash71 } from "node:crypto";
|
|
270906
271264
|
import { existsSync as existsSync111 } from "node:fs";
|
|
270907
|
-
import { join as join140, relative as
|
|
271265
|
+
import { join as join140, relative as relative27 } from "node:path";
|
|
270908
271266
|
init_owner_claim();
|
|
270909
271267
|
init_surface_lint();
|
|
270910
271268
|
init_token_lint();
|
|
@@ -271135,7 +271493,7 @@ async function pushCommand(ctx) {
|
|
|
271135
271493
|
}
|
|
271136
271494
|
}
|
|
271137
271495
|
const { shellQuote: shellQuote3 } = await Promise.resolve().then(() => (init_shell_quote(), shell_quote_exports));
|
|
271138
|
-
const contentRel =
|
|
271496
|
+
const contentRel = relative27(process.cwd(), dir) || ".";
|
|
271139
271497
|
const contentArg2 = shellQuote3(contentRel);
|
|
271140
271498
|
if (onlyRaw !== void 0) {
|
|
271141
271499
|
const onlyDraft = flags.draft === true;
|
|
@@ -276880,13 +277238,13 @@ import {
|
|
|
276880
277238
|
openSync as openSync11,
|
|
276881
277239
|
readFileSync as readFileSync157,
|
|
276882
277240
|
readdirSync as readdirSync55,
|
|
276883
|
-
realpathSync as
|
|
277241
|
+
realpathSync as realpathSync22,
|
|
276884
277242
|
renameSync as renameSync23,
|
|
276885
277243
|
rmSync as rmSync36,
|
|
276886
277244
|
statSync as statSync46,
|
|
276887
277245
|
writeFileSync as writeFileSync56
|
|
276888
277246
|
} from "node:fs";
|
|
276889
|
-
import { basename as basename37, dirname as dirname73, join as join162, relative as
|
|
277247
|
+
import { basename as basename37, dirname as dirname73, join as join162, relative as relative31, resolve as resolve102 } from "node:path";
|
|
276890
277248
|
var L10N_USAGE = "usage: himi l10n import --format oneapp <dir> (--app <slug> | --content <app dir>) [--locales en,he] [--source en] [--overwrite] [--json]";
|
|
276891
277249
|
var MESSAGES_FILE = /^messages_(.+)\.json$/;
|
|
276892
277250
|
var UnsafePath = class extends Error {
|
|
@@ -276908,7 +277266,7 @@ function unsafeDestination(appDir3, tags) {
|
|
|
276908
277266
|
const l10nDir = join162(appDir3, "l10n");
|
|
276909
277267
|
for (const path2 of [l10nDir, ...tags.map((t2) => join162(l10nDir, `${t2}.json`))]) {
|
|
276910
277268
|
try {
|
|
276911
|
-
if (lstatSync35(path2).isSymbolicLink()) return `${
|
|
277269
|
+
if (lstatSync35(path2).isSymbolicLink()) return `${relative31(process.cwd(), path2)} is a symbolic link`;
|
|
276912
277270
|
} catch (e2) {
|
|
276913
277271
|
const code2 = e2.code;
|
|
276914
277272
|
if (code2 !== "ENOENT" && code2 !== "ENOTDIR") throw e2;
|
|
@@ -277013,27 +277371,27 @@ async function l10nCommand(ctx) {
|
|
|
277013
277371
|
buf = readRegularFile(path2);
|
|
277014
277372
|
} catch (e2) {
|
|
277015
277373
|
if (isUnsafe2(e2)) {
|
|
277016
|
-
return fail12("unsafe_path", { error: `${
|
|
277374
|
+
return fail12("unsafe_path", { error: `${relative31(process.cwd(), path2)} is a symbolic link \u2014 the import does not follow links in the messages directory`, file: path2, hint: "copy the real file into the directory, or point <dir> at where the files actually live" }, 1);
|
|
277017
277375
|
}
|
|
277018
|
-
return fail12("messages_unreadable", { error: `${
|
|
277376
|
+
return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)}: ${e2.message}`, file: path2 }, 1);
|
|
277019
277377
|
}
|
|
277020
277378
|
const text25 = buf.toString("utf8");
|
|
277021
277379
|
const utf16Bom = buf.length >= 2 && (buf[0] === 255 && buf[1] === 254 || buf[0] === 254 && buf[1] === 255);
|
|
277022
277380
|
if (utf16Bom || buf.includes(0) || Buffer.compare(Buffer.from(text25, "utf8"), buf) !== 0) {
|
|
277023
|
-
return fail12("messages_not_utf8", { error: `${
|
|
277381
|
+
return fail12("messages_not_utf8", { error: `${relative31(process.cwd(), path2)} is not valid UTF-8`, file: path2, hint: "re-encode the file as UTF-8 (UTF-16 exports are the usual cause)" }, 1);
|
|
277024
277382
|
}
|
|
277025
277383
|
let parsed;
|
|
277026
277384
|
try {
|
|
277027
277385
|
parsed = JSON.parse(text25.replace(/^\uFEFF/, ""));
|
|
277028
277386
|
} catch (e2) {
|
|
277029
|
-
return fail12("messages_unreadable", { error: `${
|
|
277387
|
+
return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)}: ${e2.message}`, file: path2 }, 1);
|
|
277030
277388
|
}
|
|
277031
277389
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
277032
|
-
return fail12("messages_unreadable", { error: `${
|
|
277390
|
+
return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)} is not an object of key \u2192 message`, file: path2 }, 1);
|
|
277033
277391
|
}
|
|
277034
277392
|
const bad4 = Object.entries(parsed).filter(([, v2]) => typeof v2 !== "string").map(([k3]) => k3);
|
|
277035
277393
|
if (bad4.length > 0) {
|
|
277036
|
-
return fail12("messages_unreadable", { error: `${
|
|
277394
|
+
return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)} has non-string values`, file: path2, keys: bad4.slice(0, 5) }, 1);
|
|
277037
277395
|
}
|
|
277038
277396
|
files[tag] = parsed;
|
|
277039
277397
|
}
|
|
@@ -277043,7 +277401,7 @@ async function l10nCommand(ctx) {
|
|
|
277043
277401
|
try {
|
|
277044
277402
|
unsafe2 = unsafeDestination(appDir3, requested);
|
|
277045
277403
|
} catch (e2) {
|
|
277046
|
-
return fail12("catalog_write_failed", { error: `cannot inspect ${
|
|
277404
|
+
return fail12("catalog_write_failed", { error: `cannot inspect ${relative31(process.cwd(), join162(appDir3, "l10n"))}: ${e2.message}`, written: [] }, 1);
|
|
277047
277405
|
}
|
|
277048
277406
|
if (unsafe2 !== void 0) {
|
|
277049
277407
|
return fail12("unsafe_path", { error: `${unsafe2} \u2014 the import does not read or write through links`, hint: "replace the link with a real directory/file inside the app, then re-run" }, 1);
|
|
@@ -277059,7 +277417,7 @@ async function l10nCommand(ctx) {
|
|
|
277059
277417
|
existing[tag] = parsed;
|
|
277060
277418
|
} catch (e2) {
|
|
277061
277419
|
return fail12("catalog_unreadable", {
|
|
277062
|
-
error: `existing catalog ${
|
|
277420
|
+
error: `existing catalog ${relative31(process.cwd(), path2)} cannot be parsed \u2014 refusing to overwrite it`,
|
|
277063
277421
|
file: path2,
|
|
277064
277422
|
cause: e2.message
|
|
277065
277423
|
}, 1);
|
|
@@ -277074,10 +277432,11 @@ async function l10nCommand(ctx) {
|
|
|
277074
277432
|
const warnings = [];
|
|
277075
277433
|
const unsupportedTags = undeclaredLocales2(void 0, requested)?.unsupported ?? [];
|
|
277076
277434
|
if (unsupportedTags.length > 0) {
|
|
277435
|
+
const { SUPPORTED_LOCALES: SUPPORTED_LOCALES2 } = await Promise.resolve().then(() => (init_locale(), locale_exports));
|
|
277077
277436
|
warnings.push({
|
|
277078
277437
|
warning: "unsupported_locale_tags",
|
|
277079
277438
|
locales: unsupportedTags,
|
|
277080
|
-
error: `${unsupportedTags.join(", ")} cannot be declared: locale tags must be one of
|
|
277439
|
+
error: `${unsupportedTags.join(", ")} cannot be declared: locale tags must be one of ${SUPPORTED_LOCALES2.join(", ")} (a region tag like es-MX is shortened to its language). The catalog was written but will never bake`
|
|
277081
277440
|
});
|
|
277082
277441
|
}
|
|
277083
277442
|
try {
|
|
@@ -277120,14 +277479,14 @@ async function l10nCommand(ctx) {
|
|
|
277120
277479
|
try {
|
|
277121
277480
|
mkdirSync58(join162(appDir3, "l10n"), { recursive: true });
|
|
277122
277481
|
const swapped = unsafeDestination(appDir3, requested);
|
|
277123
|
-
const l10nReal =
|
|
277124
|
-
if (swapped !== void 0 || l10nReal !== join162(
|
|
277482
|
+
const l10nReal = realpathSync22(join162(appDir3, "l10n"));
|
|
277483
|
+
if (swapped !== void 0 || l10nReal !== join162(realpathSync22(appDir3), "l10n")) {
|
|
277125
277484
|
throw new UnsafePath(swapped ?? `${join162(appDir3, "l10n")} resolves outside the app`);
|
|
277126
277485
|
}
|
|
277127
277486
|
for (const tag of requested) {
|
|
277128
277487
|
const path2 = join162(appDir3, "l10n", `${tag}.json`);
|
|
277129
277488
|
writeCatalog(path2, JSON.stringify(catalogs[tag], null, 2) + "\n");
|
|
277130
|
-
written.push({ tag, path:
|
|
277489
|
+
written.push({ tag, path: relative31(process.cwd(), path2), count: Object.keys(catalogs[tag].messages).length });
|
|
277131
277490
|
}
|
|
277132
277491
|
} catch (e2) {
|
|
277133
277492
|
if (isUnsafe2(e2)) return fail12("unsafe_path", { error: `${e2.message} \u2014 nothing more was written`, written }, 1);
|