@wix/himalaya-cli 0.1740.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.
Files changed (49) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/locale.d.ts +3 -1
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +57 -3
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +51 -2
  4. package/dist/browser-plane/assets.json +5 -5
  5. package/dist/browser-plane/preview-deferred/{4235535ddd6e62ae867fd4d3588054909040428cffec9bea2807693a68e297d9.bin → d13ef703cc8f4d7eaa9b12967b618314b75002b5d4441dedbcc65e3601c4750d.bin} +1 -1
  6. package/dist/browser-plane/sw.js +6 -6
  7. package/dist/cli.mjs +338 -155
  8. package/dist/preview-assets.generated.bin +0 -0
  9. package/guides/himi-json-output.md +1 -1
  10. package/guides/one-app-to-himi-app.md +11 -2
  11. package/package.json +2 -2
  12. package/templates/beauty-salon/l10n/fr.json +4806 -0
  13. package/templates/beauty-salon/tier5-src/wix-spaces-app-language/index.ts +18 -3
  14. package/templates/branded-lite/l10n/fr.json +9088 -0
  15. package/templates/branded-lite/l10n/he.json +4 -0
  16. package/templates/branded-lite/tier5-src/_shared/group-privacy.ts +14 -0
  17. package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +11 -4
  18. package/templates/branded-lite/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
  19. package/templates/branded-lite/tier5-src/wix-spaces-app-language/index.ts +18 -3
  20. package/templates/community-club/l10n/fr.json +3026 -0
  21. package/templates/community-club/l10n/he.json +12 -0
  22. package/templates/community-club/tier5-src/_shared/group-privacy.ts +14 -0
  23. package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +11 -4
  24. package/templates/community-club/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
  25. package/templates/community-club/tier5-src/wix-spaces-app-language/index.ts +18 -3
  26. package/templates/events-meetups/l10n/fr.json +2886 -0
  27. package/templates/events-meetups/l10n/he.json +12 -0
  28. package/templates/events-meetups/tier5-src/_shared/group-privacy.ts +14 -0
  29. package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +11 -4
  30. package/templates/events-meetups/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
  31. package/templates/events-meetups/tier5-src/wix-spaces-app-language/index.ts +18 -3
  32. package/templates/gym-fitness/l10n/fr.json +5412 -0
  33. package/templates/gym-fitness/tier5-src/wix-spaces-app-language/index.ts +18 -3
  34. package/templates/nonprofit-cause/l10n/fr.json +3499 -0
  35. package/templates/nonprofit-cause/l10n/he.json +12 -0
  36. package/templates/nonprofit-cause/tier5-src/_shared/group-privacy.ts +14 -0
  37. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +11 -4
  38. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group-about/index.ts +2 -6
  39. package/templates/nonprofit-cause/tier5-src/wix-spaces-app-language/index.ts +18 -3
  40. package/templates/podcast-creator/l10n/fr.json +3321 -0
  41. package/templates/podcast-creator/tier5-src/wix-spaces-app-language/index.ts +18 -3
  42. package/templates/portfolio-creative/l10n/fr.json +3880 -0
  43. package/templates/portfolio-creative/tier5-src/wix-spaces-app-language/index.ts +18 -3
  44. package/templates/restaurant/l10n/fr.json +3528 -0
  45. package/templates/restaurant/tier5-src/wix-spaces-app-language/index.ts +18 -3
  46. package/templates/retail-store/l10n/fr.json +3279 -0
  47. package/templates/retail-store/tier5-src/wix-spaces-app-language/index.ts +18 -3
  48. package/templates/yoga-studio/l10n/fr.json +4531 -0
  49. package/templates/yoga-studio/tier5-src/wix-spaces-app-language/index.ts +18 -3
package/dist/cli.mjs CHANGED
@@ -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 relative32 = committedProvisioningPath(name);
4823
- return normalized === relative32 || normalized.endsWith(`/${relative32}`);
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 relative32 = statePath(raw);
8077
- if (!info4?.paths.has(relative32)) error(el2, "HHP-BINDING-PATH", `Unknown controller state path ${relative32}.`);
8078
- return `$service:${serviceName2}.${relative32}`;
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
- return (tag ?? "").trim().split(/[-_]/)[0].toLowerCase();
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 = ["en", "he", "es"];
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
- es: "Espa\xF1ol"
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
  });
@@ -29343,6 +29398,7 @@ var init_page_worker = __esm({
29343
29398
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
29344
29399
  var init_icon_catalog_generated = __esm({
29345
29400
  "../../core/ts/src/icon-catalog.generated.ts"() {
29401
+ "use strict";
29346
29402
  init_define_HHP_CATALOG();
29347
29403
  ICON_VIEW_BOX = 24;
29348
29404
  ICON_STROKE_WIDTH = 2;
@@ -40651,7 +40707,6 @@ function shouldRevealError(args) {
40651
40707
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
40652
40708
  var init_validation = __esm({
40653
40709
  "../../core/ts/src/validation.ts"() {
40654
- "use strict";
40655
40710
  init_define_HHP_CATALOG();
40656
40711
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
40657
40712
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -44720,13 +44775,62 @@ function pluralCategoryFallback(n2, locale) {
44720
44775
  const lang = (locale || "en").split(/[-_]/)[0].toLowerCase();
44721
44776
  const i2 = Math.floor(Math.abs(n2));
44722
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;
44723
44781
  switch (lang) {
44724
44782
  case "he":
44725
- if (i2 === 1 && isInt) return "one";
44783
+ if (i2 === 1 && isInt || i2 === 0 && !isInt) return "one";
44726
44784
  if (i2 === 2 && isInt) return "two";
44727
44785
  return "other";
44728
- case "en":
44786
+ case "fr":
44787
+ case "pt":
44788
+ if (i2 === 0 || i2 === 1) return "one";
44789
+ return millions ? "many" : "other";
44729
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":
44730
44834
  default:
44731
44835
  return i2 === 1 && isInt ? "one" : "other";
44732
44836
  }
@@ -148895,8 +148999,8 @@ async function handleActionHandlerBundleGet(res, app2) {
148895
148999
  }
148896
149000
  async function serveStatic(req, res, root, prefix) {
148897
149001
  const requested = decodeURIComponent((req.url ?? "").split("?")[0]);
148898
- const relative32 = requested.replace(prefix, "").replace(/^\//, "");
148899
- const safe = normalize4(relative32).replace(/^(\.\.[\/\\])+/, "");
149002
+ const relative33 = requested.replace(prefix, "").replace(/^\//, "");
149003
+ const safe = normalize4(relative33).replace(/^(\.\.[\/\\])+/, "");
148900
149004
  const fullPath = resolve34(root, safe);
148901
149005
  if (!fullPath.startsWith(root)) {
148902
149006
  return send(res, 403, "forbidden");
@@ -155141,6 +155245,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
155141
155245
  const res = await devFetch(`${base2}/v1/screen/${wantedRender}`, { headers: { "X-Himalaya-App": app2 } });
155142
155246
  if (res.ok) {
155143
155247
  const descriptor = await res.json();
155248
+ bakePinnedLanguage?.(descriptor);
155144
155249
  delete descriptor.etag;
155145
155250
  const lb = logicBundleOf(descriptor);
155146
155251
  const bundleName = lb ? bundleNameFromUrl(lb.url) : null;
@@ -167321,11 +167426,13 @@ __export(template_trim_exports, {
167321
167426
  compareErrors: () => compareErrors,
167322
167427
  leftoverNavRefs: () => leftoverNavRefs,
167323
167428
  linearSafePattern: () => linearSafePattern,
167429
+ listWorkers: () => listWorkers,
167324
167430
  parseApp: () => parseApp,
167325
167431
  planTrim: () => planTrim,
167326
167432
  routeMatcher: () => routeMatcher,
167327
167433
  runTemplateTrim: () => runTemplateTrim,
167328
- trimCapabilities: () => trimCapabilities
167434
+ trimCapabilities: () => trimCapabilities,
167435
+ workersInUse: () => workersInUse
167329
167436
  });
167330
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";
167331
167438
  import { dirname as dirname32, join as join46 } from "node:path";
@@ -167947,6 +168054,29 @@ function workerPinnedScreens(route) {
167947
168054
  walk4(route.block);
167948
168055
  return out2;
167949
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
+ }
167950
168080
  function planTrim(src, keepIds, links) {
167951
168081
  const app2 = parseApp(src.dev, src.config);
167952
168082
  const kept = /* @__PURE__ */ new Set([app2.home]);
@@ -168100,26 +168230,7 @@ function planTrim(src, keepIds, links) {
168100
168230
  subtreeRemoved.push(id);
168101
168231
  return false;
168102
168232
  });
168103
- const configBundles = new Set([...src.config.matchAll(/\/v1\/bundles\/([A-Za-z0-9_-]+)/g)].map((m2) => m2[1]));
168104
- const keptWorkers = /* @__PURE__ */ new Set(["_shared", ...configBundles]);
168105
- for (const r3 of keptRoutes) for (const b3 of r3.bundles) keptWorkers.add(b3);
168106
- const importsOf2 = (dir) => {
168107
- const out2 = [];
168108
- for (const [rel2, text25] of Object.entries(src.workerFiles)) {
168109
- if (!rel2.startsWith(`tier5-src/${dir}/`)) continue;
168110
- for (const m2 of text25.matchAll(/(?:\bfrom\s*|\bimport\s*\(?\s*|\brequire\s*\(\s*)["']\.\.\/([A-Za-z0-9_.-]+)(?:\/|["'])/g)) out2.push(m2[1]);
168111
- }
168112
- return out2;
168113
- };
168114
- const pending2 = [...keptWorkers];
168115
- while (pending2.length) {
168116
- for (const dep of importsOf2(pending2.pop())) {
168117
- if (!keptWorkers.has(dep)) {
168118
- keptWorkers.add(dep);
168119
- pending2.push(dep);
168120
- }
168121
- }
168122
- }
168233
+ const keptWorkers = workersInUse(src.config, keptRoutes, src.workerFiles);
168123
168234
  const dirs = new Set(src.workerDirs);
168124
168235
  const removedWorkers = sorted(removedRoutes.flatMap((r3) => r3.bundles).filter((b3) => dirs.has(b3) && !keptWorkers.has(b3)));
168125
168236
  const workerRefs = [];
@@ -168663,7 +168774,7 @@ __export(template_adopt_exports, {
168663
168774
  writeInventory: () => writeInventory
168664
168775
  });
168665
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";
168666
- 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";
168667
168778
  import ts10 from "typescript";
168668
168779
  function readAppSources(dir) {
168669
168780
  const devPath = join47(dir, "dev", "index.ts");
@@ -169199,9 +169310,12 @@ function upsertScreens(dir, screens) {
169199
169310
  }
169200
169311
  const files = ["dev/index.ts", "config.ts", "himalaya.content.json"];
169201
169312
  const before = new Map(files.map((rel2) => [rel2, existsSync55(join47(dir, rel2)) ? readFileSync59(join47(dir, rel2), "utf8") : void 0]));
169202
- const existing = new Set(parseApp(before.get("dev/index.ts") ?? "", before.get("config.ts") ?? "").routes.filter((r3) => r3.kind === "screen").map((r3) => r3.label));
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));
169203
169316
  const added = [];
169204
169317
  const replaced = [];
169318
+ const moved = [];
169205
169319
  let used = /* @__PURE__ */ new Set();
169206
169320
  try {
169207
169321
  const meta = parseScreenMetadata(readContentManifest(dir)?.screens) ?? {};
@@ -169223,12 +169337,57 @@ function upsertScreens(dir, screens) {
169223
169337
  added.push(id);
169224
169338
  }
169225
169339
  }
169340
+ moved.push(...retireUnusedWorkers(dir, replacedBundles));
169226
169341
  } catch (e2) {
169227
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
+ }
169228
169349
  const message2 = e2 instanceof Error ? e2.message : String(e2);
169229
169350
  throw new TrimRefusal(`--upsert stopped and restored every file: ${message2}`);
169230
169351
  }
169231
- return { ok: true, added, replaced };
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;
169232
169391
  }
169233
169392
  function removeScreens(dir, ids2) {
169234
169393
  const src = readAppSources(dir);
@@ -170718,7 +170877,7 @@ __export(run_watch_exports, {
170718
170877
  });
170719
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";
170720
170879
  import { randomUUID as randomUUID9 } from "node:crypto";
170721
- import { extname as extname4, join as join51, relative as relative12, resolve as resolve47, sep as sep17 } from "node:path";
170880
+ import { extname as extname4, join as join51, relative as relative13, resolve as resolve47, sep as sep17 } from "node:path";
170722
170881
  function diffReleases(prev, next) {
170723
170882
  const bundles = Object.keys(next.bundles).filter((b3) => prev.bundles[b3]?.sha256 !== next.bundles[b3].sha256).sort();
170724
170883
  const changedBundles = new Set(bundles);
@@ -170746,7 +170905,7 @@ function reloadEvents(d2) {
170746
170905
  function hhpRasterDir(dir) {
170747
170906
  const assets = findAssetsDir(dir);
170748
170907
  if (!assets) return null;
170749
- const rel2 = relative12(dir, assets).split(sep17).join("/");
170908
+ const rel2 = relative13(dir, assets).split(sep17).join("/");
170750
170909
  return rel2 ? `${rel2}/hhp-raster` : "hhp-raster";
170751
170910
  }
170752
170911
  function ignoredChange(relPath, isDirectory = () => false, rasterDir = "assets/hhp-raster") {
@@ -171601,7 +171760,7 @@ import { createHash as createHash32, randomUUID as randomUUID10 } from "node:cry
171601
171760
  import { spawn as spawn4 } from "node:child_process";
171602
171761
  import { closeSync as closeSync5, existsSync as existsSync61, lstatSync as lstatSync23, readFileSync as readFileSync69, statSync as statSync19 } from "node:fs";
171603
171762
  import { createServer as createServer3 } from "node:net";
171604
- import { basename as basename17, dirname as dirname36, isAbsolute as isAbsolute6, join as join56, relative as relative13, resolve as resolve48, sep as sep18 } from "node:path";
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";
171605
171764
  function homeShotPath(dir, home2) {
171606
171765
  const root = resolve48(dir);
171607
171766
  const base2 = resolve48(root, ".himi", "shots");
@@ -171616,7 +171775,7 @@ function homeShotPath(dir, home2) {
171616
171775
  return shot;
171617
171776
  }
171618
171777
  function displayPath(p2, cwd = process.cwd()) {
171619
- const rel2 = relative13(cwd, p2);
171778
+ const rel2 = relative14(cwd, p2);
171620
171779
  return rel2 && !rel2.startsWith("..") && !isAbsolute6(rel2) ? rel2 : p2;
171621
171780
  }
171622
171781
  function progressCommand(opts) {
@@ -171757,7 +171916,7 @@ async function openBoardForSession(dir, cwd = process.cwd()) {
171757
171916
  try {
171758
171917
  const { openStudio: openStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
171759
171918
  const { page, url } = openStudio2(dir);
171760
- const rel2 = relative13(cwd, page);
171919
+ const rel2 = relative14(cwd, page);
171761
171920
  return { page: rel2 && !rel2.startsWith("..") && !isAbsolute6(rel2) ? rel2 : page, url, opened: false };
171762
171921
  } catch (e2) {
171763
171922
  return { opened: false, error: `the build board was not created: ${e2.message} \u2014 \`himi studio --no-open\` in the app retries it` };
@@ -182152,7 +182311,7 @@ __export(eject_exports, {
182152
182311
  ejectModule: () => ejectModule
182153
182312
  });
182154
182313
  import { existsSync as existsSync76, mkdirSync as mkdirSync33, readFileSync as readFileSync85, writeFileSync as writeFileSync30 } from "node:fs";
182155
- import { dirname as dirname41, join as join72, relative as relative14, resolve as resolve53, sep as sep19 } from "node:path";
182314
+ import { dirname as dirname41, join as join72, relative as relative15, resolve as resolve53, sep as sep19 } from "node:path";
182156
182315
  function locate(repoRootOrCwd, mod) {
182157
182316
  const inRepo = resolve53(repoRootOrCwd, `stdlib/flows/${mod}/src/index.ts`);
182158
182317
  if (existsSync76(inRepo)) return { path: inRepo, form: "source" };
@@ -182205,7 +182364,7 @@ function ejectModule(opts) {
182205
182364
  if (!existsSync76(f2)) continue;
182206
182365
  const before = readFileSync85(f2, "utf8");
182207
182366
  let after = before;
182208
- let rel2 = relative14(dirname41(f2), target).split(sep19).join("/").replace(/\.tsx?$/, ".js");
182367
+ let rel2 = relative15(dirname41(f2), target).split(sep19).join("/").replace(/\.tsx?$/, ".js");
182209
182368
  if (!rel2.startsWith(".")) rel2 = `./${rel2}`;
182210
182369
  for (const spec of specifiersFor(mod)) {
182211
182370
  const q4 = spec.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -184572,7 +184731,7 @@ import {
184572
184731
  unlinkSync as unlinkSync5,
184573
184732
  writeFileSync as writeFileSync34
184574
184733
  } from "node:fs";
184575
- import { basename as basename21, join as join81, relative as relative15, resolve as resolve60 } from "node:path";
184734
+ import { basename as basename21, join as join81, relative as relative16, resolve as resolve60 } from "node:path";
184576
184735
  function attestationVersionOf(value2) {
184577
184736
  if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) return null;
184578
184737
  const version5 = value2.attestation;
@@ -184622,7 +184781,7 @@ function repoRoot(contentDir2) {
184622
184781
  function storedContentDir(contentDir2) {
184623
184782
  const absolute = resolve60(contentDir2);
184624
184783
  const root = repoRoot(absolute);
184625
- return root ? relative15(root, absolute) || "." : ".";
184784
+ return root ? relative16(root, absolute) || "." : ".";
184626
184785
  }
184627
184786
  function currentGitDiffHash(contentDir2) {
184628
184787
  const root = repoRoot(resolve60(contentDir2));
@@ -184634,14 +184793,14 @@ function currentGitUntrackedHash(contentDir2) {
184634
184793
  const absolute = realpathSync11.native(unresolved);
184635
184794
  const root = repoRoot(absolute);
184636
184795
  if (!root) return sourceTreeHash(absolute);
184637
- const scope3 = relative15(root, absolute) || ".";
184796
+ const scope3 = relative16(root, absolute) || ".";
184638
184797
  const listed = execFileSync5("git", ["-C", root, "ls-files", "--others", "--exclude-standard", "-z", "--", scope3], {
184639
184798
  encoding: "utf8",
184640
184799
  maxBuffer: GIT_HASH_MAX_BUFFER
184641
184800
  });
184642
184801
  const hash3 = createHash39("sha256");
184643
184802
  for (const path2 of listed.split("\0").filter(Boolean).sort()) {
184644
- const local = relative15(absolute, join81(root, path2));
184803
+ const local = relative16(absolute, join81(root, path2));
184645
184804
  const segs = local.split(/[\\/]/);
184646
184805
  if (NOT_ATTESTED_DIRS.has(segs[0])) continue;
184647
184806
  if (segs.length === 1 && AGENT_TOOLING_ROOT_FILES.includes(segs[0])) continue;
@@ -184664,7 +184823,7 @@ function sourceTreeHash(root) {
184664
184823
  for (const entry of readdirSync38(dir, { withFileTypes: true }).sort((a3, b3) => a3.name < b3.name ? -1 : a3.name > b3.name ? 1 : 0)) {
184665
184824
  if (entry.isDirectory() && (entry.name === ".git" || entry.name === "node_modules" || NOT_ATTESTED_DIRS.has(entry.name))) continue;
184666
184825
  const path2 = join81(dir, entry.name);
184667
- const local = relative15(root, path2);
184826
+ const local = relative16(root, path2);
184668
184827
  if (dir === root && entry.isFile() && AGENT_TOOLING_ROOT_FILES.includes(entry.name)) continue;
184669
184828
  if (MCP_HOST_CONFIG_FILES.includes(local.split(/[\\/]/).join("/"))) continue;
184670
184829
  if (entry.isDirectory()) visit(path2);
@@ -184957,7 +185116,7 @@ var init_attestation = __esm({
184957
185116
 
184958
185117
  // src/ux-evidence.ts
184959
185118
  import { existsSync as existsSync83, mkdirSync as mkdirSync38, readFileSync as readFileSync93, writeFileSync as writeFileSync35 } from "node:fs";
184960
- import { dirname as dirname47, isAbsolute as isAbsolute8, join as join82, relative as relative16, resolve as resolve61 } from "node:path";
185119
+ import { dirname as dirname47, isAbsolute as isAbsolute8, join as join82, relative as relative17, resolve as resolve61 } from "node:path";
184961
185120
  function isNativePlatform(value2) {
184962
185121
  return typeof value2 === "string" && NATIVE_PLATFORMS.includes(value2);
184963
185122
  }
@@ -185005,7 +185164,7 @@ function writeEvidence(path2, evidence) {
185005
185164
  writeFileSync35(path2, JSON.stringify(evidence, null, 2) + "\n");
185006
185165
  }
185007
185166
  function recordedFilePath(dir, file2) {
185008
- const rel2 = relative16(dir, resolve61(file2));
185167
+ const rel2 = relative17(dir, resolve61(file2));
185009
185168
  return rel2 && !rel2.startsWith("..") && !isAbsolute8(rel2) ? rel2 : file2;
185010
185169
  }
185011
185170
  function recordRenderWidth(content, entry) {
@@ -187141,7 +187300,7 @@ var init_cli_bridge = __esm({
187141
187300
  // src/mcp/file-tools.ts
187142
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";
187143
187302
  import { randomBytes as randomBytes4 } from "node:crypto";
187144
- import { dirname as dirname48, isAbsolute as isAbsolute9, join as join88, relative as relative17, resolve as resolve63, sep as sep22 } from "node:path";
187303
+ import { dirname as dirname48, isAbsolute as isAbsolute9, join as join88, relative as relative18, resolve as resolve63, sep as sep22 } from "node:path";
187145
187304
  import * as z2 from "zod";
187146
187305
  function within(root, p2) {
187147
187306
  return p2 === root || p2.startsWith(root.endsWith(sep22) ? root : root + sep22);
@@ -187159,10 +187318,10 @@ function realish(p2) {
187159
187318
  }
187160
187319
  function symlinkComponent(base2, abs) {
187161
187320
  let cur = base2;
187162
- for (const part4 of relative17(base2, abs).split(sep22).filter(Boolean)) {
187321
+ for (const part4 of relative18(base2, abs).split(sep22).filter(Boolean)) {
187163
187322
  cur = join88(cur, part4);
187164
187323
  try {
187165
- if (lstatSync27(cur).isSymbolicLink()) return relative17(base2, cur);
187324
+ if (lstatSync27(cur).isSymbolicLink()) return relative18(base2, cur);
187166
187325
  } catch {
187167
187326
  return void 0;
187168
187327
  }
@@ -187185,7 +187344,7 @@ async function confinedAppDir(args, deps) {
187185
187344
  if (!within(root, dir) || !within(realpathSync12(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
187186
187345
  const link3 = symlinkComponent(root, dir);
187187
187346
  if (link3) return refuse5("outside_workspace", `"${link3}" is a symlink \u2014 the app folder must be a real folder in the workspace`);
187188
- const rel2 = relative17(root, dir);
187347
+ const rel2 = relative18(root, dir);
187189
187348
  if (rel2 && (isDeniedSourcePath(`${rel2}/x`) || isDeniedSourcePath(`${rel2.toLowerCase()}/x`))) return refuse5("denied", `"${rel2}" is a folder this tool does not touch`);
187190
187349
  if (!existsSync89(join88(dir, CONTENT_MARKER))) {
187191
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`);
@@ -187204,10 +187363,10 @@ function onDiskSpelling(abs) {
187204
187363
  return join88(realpathSync12.native(cur), ...tail);
187205
187364
  }
187206
187365
  function denied(appDir3, abs) {
187207
- const rel2 = relative17(appDir3, abs);
187366
+ const rel2 = relative18(appDir3, abs);
187208
187367
  if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) return true;
187209
187368
  try {
187210
- return isDeniedSourcePath(relative17(realpathSync12.native(appDir3), onDiskSpelling(abs)));
187369
+ return isDeniedSourcePath(relative18(realpathSync12.native(appDir3), onDiskSpelling(abs)));
187211
187370
  } catch {
187212
187371
  return true;
187213
187372
  }
@@ -187240,14 +187399,14 @@ function writeNoFollow2(appDir3, abs, content) {
187240
187399
  const link3 = symlinkComponent(appDir3, abs);
187241
187400
  if (link3 || !within(realpathSync12(appDir3), realpathSync12(dirname48(abs)))) {
187242
187401
  rmSync22(tmp, { force: true });
187243
- throw new Error(`"${link3 ?? relative17(appDir3, dirname48(abs))}" changed into a link while writing`);
187402
+ throw new Error(`"${link3 ?? relative18(appDir3, dirname48(abs))}" changed into a link while writing`);
187244
187403
  }
187245
187404
  renameSync15(tmp, abs);
187246
187405
  }
187247
187406
  function listFiles2(appDir3) {
187248
187407
  const files = [];
187249
187408
  const walk4 = (d2) => {
187250
- const parentRel = relative17(appDir3, d2);
187409
+ const parentRel = relative18(appDir3, d2);
187251
187410
  for (const e2 of readdirSync39(d2, { withFileTypes: true }).sort((a3, b3) => a3.name.localeCompare(b3.name))) {
187252
187411
  if (e2.isSymbolicLink()) continue;
187253
187412
  const p2 = join88(d2, e2.name);
@@ -187255,7 +187414,7 @@ function listFiles2(appDir3) {
187255
187414
  if (isDeniedSourceDir(e2.name, parentRel) || isDeniedSourceDir(e2.name.toLowerCase(), parentRel)) continue;
187256
187415
  if (!walk4(p2)) return false;
187257
187416
  } else if (e2.isFile()) {
187258
- const rel2 = relative17(appDir3, p2);
187417
+ const rel2 = relative18(appDir3, p2);
187259
187418
  if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) continue;
187260
187419
  if (files.length >= MAX_LISTED) return false;
187261
187420
  files.push({ path: rel2.split(sep22).join("/"), bytes: statSync24(p2).size });
@@ -187401,7 +187560,7 @@ var init_file_tools = __esm({
187401
187560
 
187402
187561
  // src/mcp/iap-tools.ts
187403
187562
  import * as z3 from "zod";
187404
- import { dirname as dirname49, relative as relative18, resolve as resolve64 } from "node:path";
187563
+ import { dirname as dirname49, relative as relative19, resolve as resolve64 } from "node:path";
187405
187564
  async function paths(args, deps) {
187406
187565
  const base2 = await deps.defaultDir();
187407
187566
  const result = { ...args, workspaceDir: base2 };
@@ -187417,7 +187576,7 @@ function workspaceInputRefusal(args, deps, context) {
187417
187576
  const why = workspaceRefusal(context.boundary, args[key4]);
187418
187577
  if (why) return `${key4} ${why}`;
187419
187578
  if (key4 !== "dir" && key4 !== "plist") {
187420
- const confined = confinedPath(context.boundary, relative18(context.boundary, args[key4]));
187579
+ const confined = confinedPath(context.boundary, relative19(context.boundary, args[key4]));
187421
187580
  if (typeof confined !== "string") return `${key4} ${confined.error}`;
187422
187581
  }
187423
187582
  }
@@ -197990,7 +198149,7 @@ var init_dist2 = __esm({
197990
198149
  // src/store-google-host.ts
197991
198150
  import { createHash as createHash52, randomUUID as randomUUID14 } from "node:crypto";
197992
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";
197993
- import { join as join103, relative as relative19 } from "node:path";
198152
+ import { join as join103, relative as relative20 } from "node:path";
197994
198153
  function readGooglePlayFacts(dir) {
197995
198154
  const path2 = join103(dir, GOOGLE_FACTS_FILE);
197996
198155
  if (!existsSync91(path2)) return void 0;
@@ -198114,7 +198273,7 @@ async function googleAppFactsFor(dir, o2) {
198114
198273
  const bundle = given("bundle") ?? newestAab(dir);
198115
198274
  if (bundle) {
198116
198275
  files.bundle = bundle;
198117
- if (!str7(file2.bundle)) note(`Bundle: no bundle in ${GOOGLE_FACTS_FILE}; using the newest .aab in ${LOCAL_AAB_DIR}/, ${relative19(dir, bundle)}.`);
198276
+ if (!str7(file2.bundle)) note(`Bundle: no bundle in ${GOOGLE_FACTS_FILE}; using the newest .aab in ${LOCAL_AAB_DIR}/, ${relative20(dir, bundle)}.`);
198118
198277
  } else note(noBundleNote(packageName, signing));
198119
198278
  const listing = given("listingDir") ?? (isDir2(join103(dir, DEFAULT_LISTING_DIR)) ? join103(dir, DEFAULT_LISTING_DIR) : void 0);
198120
198279
  if (listing) files.listingDir = listing;
@@ -226465,7 +226624,7 @@ ${o2.detail}` : ""}` };
226465
226624
  function enabledTools(env, o2 = {}) {
226466
226625
  return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
226467
226626
  }
226468
- var mkdirSync47, readFileSync116, realpathSync15, statSync36, writeFileSync42, delimiter3, isAbsolute13, join119, relative20, 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;
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;
226469
226628
  var init_tools2 = __esm({
226470
226629
  "../../node_modules/@wix/asc-mcp/dist/tools.js"() {
226471
226630
  init_define_HHP_CATALOG();
@@ -226476,7 +226635,7 @@ var init_tools2 = __esm({
226476
226635
  init_dist7();
226477
226636
  init_action_catalog_generated();
226478
226637
  ({ mkdirSync: mkdirSync47, readFileSync: readFileSync116, realpathSync: realpathSync15, statSync: statSync36, writeFileSync: writeFileSync42 } = __ascBuiltin063);
226479
- ({ delimiter: delimiter3, isAbsolute: isAbsolute13, join: join119, relative: relative20, resolve: resolve77, sep: sep23 } = __ascBuiltin140);
226638
+ ({ delimiter: delimiter3, isAbsolute: isAbsolute13, join: join119, relative: relative21, resolve: resolve77, sep: sep23 } = __ascBuiltin140);
226480
226639
  READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
226481
226640
  PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
226482
226641
  APPLY = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true };
@@ -226532,7 +226691,7 @@ var init_tools2 = __esm({
226532
226691
  "api.": "a raw API write (prefer a dedicated action)"
226533
226692
  };
226534
226693
  inside2 = (root, path2) => {
226535
- const rel2 = relative20(root, path2);
226694
+ const rel2 = relative21(root, path2);
226536
226695
  return rel2 !== ".." && !rel2.startsWith(`..${sep23}`) && !isAbsolute13(rel2);
226537
226696
  };
226538
226697
  identityFile = (ctx, jobId) => join119(ctx.stateDir, "mcp", "web-jobs", `${jobId.replace(/[^A-Za-z0-9_-]/g, "_")}.json`);
@@ -228456,7 +228615,7 @@ __export(store_host_exports, {
228456
228615
  import { spawn as spawn7 } from "node:child_process";
228457
228616
  import { existsSync as existsSync96, lstatSync as lstatSync32, readFileSync as readFileSync118, realpathSync as realpathSync17 } from "node:fs";
228458
228617
  import { hostname as hostname5, userInfo as userInfo3 } from "node:os";
228459
- import { delimiter as delimiter4, dirname as dirname58, isAbsolute as isAbsolute14, join as join120, relative as relative21, resolve as resolve78, sep as sep24 } from "node:path";
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";
228460
228619
  function storeNodeRefusal(version5 = process.versions.node) {
228461
228620
  const major = Number(version5.split(".")[0]);
228462
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.`;
@@ -228558,7 +228717,7 @@ function writeGeneratedPrivacy(dir, content, name = "store-privacy.json") {
228558
228717
  return path2;
228559
228718
  }
228560
228719
  function privacyAnswersFor(dir, ownerPath, shellOnly, checked, deps, note) {
228561
- const rel2 = (p2) => relative21(dir, p2) || p2;
228720
+ const rel2 = (p2) => relative22(dir, p2) || p2;
228562
228721
  const render3 = (d2) => `${JSON.stringify(d2, null, 2)}
228563
228722
  `;
228564
228723
  const answered3 = SHELL_SDKS.filter((s5) => s5.usages).map((s5) => s5.name).join(", ");
@@ -228697,7 +228856,7 @@ async function appFactsFor(dir, deps) {
228697
228856
  }
228698
228857
  } else if (build3?.kind === "ipa") {
228699
228858
  facts.ipaPath = build3.path;
228700
- note(`Build: no ipaPath in ${STORE_FACTS_FILE}; using the newest .ipa in build/, ${relative21(dir, build3.path)}. Set buildNumber to that IPA's build number (CFBundleVersion).`);
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).`);
228701
228860
  } else if (build3?.kind === "none") {
228702
228861
  note(`Build: ${build3.message}`);
228703
228862
  }
@@ -229077,7 +229236,7 @@ var init_server2 = __esm({
229077
229236
 
229078
229237
  // src/ux-audit.ts
229079
229238
  import { existsSync as existsSync99, readFileSync as readFileSync120, readdirSync as readdirSync46 } from "node:fs";
229080
- import { join as join124, relative as relative22, resolve as resolve81 } from "node:path";
229239
+ import { join as join124, relative as relative23, resolve as resolve81 } from "node:path";
229081
229240
  function issue2(issues, strict, code2, message2, path2) {
229082
229241
  issues.push({ code: code2, message: message2, ...path2 ? { path: path2 } : {}, severity: strict ? "error" : "warning" });
229083
229242
  }
@@ -229099,7 +229258,7 @@ function walkSource(dir, root = dir) {
229099
229258
  if (!SOURCE_EXTENSIONS.has(ext)) continue;
229100
229259
  const absolute = join124(dir, entry.name);
229101
229260
  const text25 = readText2(absolute);
229102
- if (text25 !== null) found.push({ path: relative22(root, absolute), text: text25 });
229261
+ if (text25 !== null) found.push({ path: relative23(root, absolute), text: text25 });
229103
229262
  }
229104
229263
  return found;
229105
229264
  }
@@ -229678,7 +229837,7 @@ __export(browser_authoring_exports, {
229678
229837
  import { createServer as createServer6 } from "node:http";
229679
229838
  import { createHash as createHash66, randomBytes as randomBytes17 } from "node:crypto";
229680
229839
  import { existsSync as existsSync101, readdirSync as readdirSync47, readFileSync as readFileSync122, realpathSync as realpathSync18, statSync as statSync38 } from "node:fs";
229681
- import { join as join127, posix as posix3, relative as relative23, sep as sep25 } from "node:path";
229840
+ import { join as join127, posix as posix3, relative as relative24, sep as sep25 } from "node:path";
229682
229841
  function humanMs(ms2) {
229683
229842
  return ms2 < 1e3 ? `${ms2}ms` : `${Math.round(ms2 / 1e3)}s`;
229684
229843
  }
@@ -229728,7 +229887,7 @@ function collectRelativeSiblings(files, tier5SrcDir) {
229728
229887
  ];
229729
229888
  for (const abs of candidates) {
229730
229889
  if (!existsSync101(abs) || statSync38(abs).isDirectory()) continue;
229731
- const key4 = `/tier5-src/${relative23(tier5SrcDir, abs).split(sep25).join(posix3.sep)}`;
229890
+ const key4 = `/tier5-src/${relative24(tier5SrcDir, abs).split(sep25).join(posix3.sep)}`;
229732
229891
  if (key4 in files) break;
229733
229892
  files[key4] = readFileSync122(abs, "utf8");
229734
229893
  queue.push(key4);
@@ -231787,7 +231946,7 @@ __export(shot_files_exports, {
231787
231946
  });
231788
231947
  import { createHash as createHash69 } from "node:crypto";
231789
231948
  import { mkdirSync as mkdirSync52, readdirSync as readdirSync48, readFileSync as readFileSync126, rmSync as rmSync27, statSync as statSync40 } from "node:fs";
231790
- import { basename as basename31, dirname as dirname61, join as join131, relative as relative24, resolve as resolve84, sep as sep26 } from "node:path";
231949
+ import { basename as basename31, dirname as dirname61, join as join131, relative as relative25, resolve as resolve84, sep as sep26 } from "node:path";
231791
231950
  function writeAtomic2(file2, bytes2) {
231792
231951
  for (let attempt2 = 0; ; attempt2++) {
231793
231952
  mkdirSync52(dirname61(file2), { recursive: true });
@@ -231875,7 +232034,7 @@ function pruneStaleShots(dir, keepScreenIds, now = Date.now()) {
231875
232034
  if (mtime !== null && now - mtime >= STALE_TMP_MS) rmSync27(f2, { force: true });
231876
232035
  continue;
231877
232036
  }
231878
- const screenId = relative24(root, f2).split(sep26).join("/").replace(/\.png$/, "");
232037
+ const screenId = relative25(root, f2).split(sep26).join("/").replace(/\.png$/, "");
231879
232038
  if (!keepScreenIds.has(screenId)) rmSync27(f2, { force: true });
231880
232039
  }
231881
232040
  }
@@ -235362,7 +235521,7 @@ __export(validate_design_exports, {
235362
235521
  });
235363
235522
  import { randomBytes as randomBytes18 } from "node:crypto";
235364
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";
235365
- import { dirname as dirname63, isAbsolute as isAbsolute16, join as join139, relative as relative25, resolve as resolve87, sep as sep27, win32 } from "node:path";
235524
+ import { dirname as dirname63, isAbsolute as isAbsolute16, join as join139, relative as relative26, resolve as resolve87, sep as sep27, win32 } from "node:path";
235366
235525
  import ts19 from "typescript";
235367
235526
  function readColorToken(tokens2, name) {
235368
235527
  const entry = obj5(tokens2.colors)?.[name];
@@ -235586,7 +235745,7 @@ function writableTokensPath(contentDir2, location) {
235586
235745
  }
235587
235746
  const root = realpathSync19(contentDir2);
235588
235747
  const path2 = resolve87(root, location);
235589
- const rel2 = relative25(root, path2);
235748
+ const rel2 = relative26(root, path2);
235590
235749
  if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep27}`) || isAbsolute16(rel2)) {
235591
235750
  throw new Error("--fix requires a token path inside the content directory.");
235592
235751
  }
@@ -235599,7 +235758,7 @@ function writableTokensPath(contentDir2, location) {
235599
235758
  throw new Error("--fix requires a regular token file under directories without symlinks.");
235600
235759
  }
235601
235760
  }
235602
- const real = relative25(root, realpathSync19(path2));
235761
+ const real = relative26(root, realpathSync19(path2));
235603
235762
  if (!real || real === ".." || real.startsWith(`..${sep27}`) || isAbsolute16(real)) {
235604
235763
  throw new Error("--fix cannot write outside the content directory.");
235605
235764
  }
@@ -235799,7 +235958,7 @@ function safeEvidencePath(contentDir2, name) {
235799
235958
  const root = realpathSync19(contentDir2);
235800
235959
  const dir = realDirIn(root, ".himi/one-app");
235801
235960
  if (!dir) throw new Error("The design evidence directory is not a regular directory.");
235802
- const real = relative25(root, realpathSync19(dir));
235961
+ const real = relative26(root, realpathSync19(dir));
235803
235962
  if (!real || real === ".." || real.startsWith(`..${sep27}`) || isAbsolute16(real)) {
235804
235963
  throw new Error("The design evidence directory is outside the content directory.");
235805
235964
  }
@@ -238964,52 +239123,52 @@ var init_preview_assets_generated = __esm({
238964
239123
  init_define_HHP_CATALOG();
238965
239124
  init_preview_assets_format();
238966
239125
  PREVIEW_ASSET_MANIFEST = [
238967
- { key: "assets/DashboardHost-_bUu4rzw.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "12a9a00647f822c3a79eddcdc738791612f609abd85b727f10741ce9672de4e5" },
238968
- { key: "assets/DevDrawer-CesMsu-N.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "370a5b2d4e5338097e652214067402ce923de5b4824cf82ddbb39cdb5b0bea5e" },
238969
- { key: "assets/IdiomCompare-B-1vJwQV.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "06a48352ba10d66111d798b8929f0fffbd6284dde36434f71af45906a6ae80de" },
238970
- { key: "assets/LightboxViewer-CEl8kTZ5.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "063f0b1ece0545b9dd406805f24a041cef9790c1e294483f6134984e89ed74c8" },
238971
- { key: "assets/OfflineReadingBar-Cim8oVod.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "5a729023861d10ce0292dfb263103ded559cfc50af1cdd7c4c893543ee8d41b8" },
238972
- { key: "assets/PhonePreviewControl-B-JBu9To.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "246fbcfc110e9d480034db763285e8b40119b1ee800adddc5b23fa5a331b71e1" },
238973
- { key: "assets/SchemeCompare-DwLM3Q2g.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "90df87531dd4ef34fd2674f4398545d63dbfd05fb725bf80a17fbb0803498b52" },
238974
- { key: "assets/WixFrogTelemetrySink-CiKiJ3cx.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "ac9b83d8f84200b33a787dd93f0875b0c06bbf296750634c3b791ac5882b0556" },
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" },
238975
239134
  { key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
238976
239135
  { key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
238977
- { key: "assets/catalogFontFaces-DbC8wK9i.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "fe7f240c3412eb5056731ee96df05b0e7a23afd17384202de9d469c69eed5814" },
239136
+ { key: "assets/catalogFontFaces-BTAV3YgN.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "f8d7b50dc8c5009554e4c2776479035d4e047a16c41a81aee49f33fcb75a9759" },
238978
239137
  { key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
238979
- { key: "assets/files-transfer-BoatCtG7.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "c6abf900ad5e306ba93a01e521e3eeaed89a3a17acdd9c89b214956682ed06a3" },
239138
+ { key: "assets/files-transfer-fqTSB83W.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "43d7450eef2e64752d5d86d71be1e89d2d15583e08c8523db437f1daf82bfaee" },
238980
239139
  { key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
238981
- { key: "assets/frogApiRules-BS8TxKbk.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "c570912110396270707386f6a9175dde99de1044b115e2c1db7fcdf80fd4d178" },
239140
+ { key: "assets/frogApiRules-CrwXbbn8.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "348b601bd3ca96e1788283bfd01f81899e675db39308d792a3e6a94c2060eb67" },
238982
239141
  { key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
238983
239142
  { key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
238984
239143
  { key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133340, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
238985
- { key: "assets/index-DXdlE0BN.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1582250, sha256: "3cceda5408ce0a61c7639335e6a8fc74d9a07b465ee5e4395d487fbef18ec786" },
238986
- { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1718294, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
238987
- { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1726045, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
238988
- { key: "assets/pdf-sB1lTpkq.js", contentType: "application/javascript; charset=utf-8", offset: 1736576, length: 488215, sha256: "4235535ddd6e62ae867fd4d3588054909040428cffec9bea2807693a68e297d9" },
238989
- { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2224791, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
238990
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2224881, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
238991
- { key: "assets/pdfDocument-DNpw6jPI.js", contentType: "application/javascript; charset=utf-8", offset: 3541915, length: 3470, sha256: "e5187048a056cdb09cb2ab09a3a3a1257dfe5092a1af29450eadcbe2e9d2d326" },
238992
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3545385, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
238993
- { key: "assets/scrollLinkedRuntime-CD-iBuJf.js", contentType: "application/javascript; charset=utf-8", offset: 3547651, length: 2278, sha256: "36a015da2953e6e33059901ef7674702237ace8733e51fe59c8a7c72b16bffd8" },
238994
- { key: "assets/webviewBridgeHost-DwGkjc4C.js", contentType: "application/javascript; charset=utf-8", offset: 3549929, length: 9889, sha256: "232e8b0a238a7aff4cf05a967cbf33cc4b4ab1160026db834042f4fc537f3241" },
238995
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3559818, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
238996
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3564428, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
238997
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4053012, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
238998
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4143936, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
238999
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4234920, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
239000
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4325900, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
239001
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4416772, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
239002
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4507752, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
239003
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4616388, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
239004
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4725472, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
239005
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4834520, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
239006
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4942220, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
239007
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5030328, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
239008
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5037146, length: 4924, sha256: "51032ca2443b41889450d025ba3b7cbd0631fabc4cad948ac18ecaf4db205da7" },
239009
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5042070, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
239010
- { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5053527, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
239011
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5054698, length: 24239, sha256: "42bd04b28606706389a6b3ab79b74f37259ab43bf66580d2d9c69be5980a53fe" },
239012
- { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5078937, length: 24256, sha256: "c14ee20bf56b80e2622177d34824b18f368c66faaffd7ea3aa9b07b60582411c" }
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" }
239013
239172
  ];
239014
239173
  }
239015
239174
  });
@@ -244981,7 +245140,7 @@ var init_store_iap_connect = __esm({
244981
245140
  });
244982
245141
 
244983
245142
  // src/store-iap-screenshots.ts
244984
- import { dirname as dirname66, join as join151, relative as relative27 } from "node:path";
245143
+ import { dirname as dirname66, join as join151, relative as relative28 } from "node:path";
244985
245144
  function purchaseScreensFor(item2) {
244986
245145
  const screen = item2.wix && PURCHASE_SCREENS[item2.wix.entityType];
244987
245146
  if (!screen || !item2.wix) return [];
@@ -245109,7 +245268,7 @@ async function shoot(selected, run3, outDir) {
245109
245268
  } catch (e2) {
245110
245269
  return { ...report9, skipped: `could not save the screenshot: ${e2.message}` };
245111
245270
  }
245112
- return { ...report9, screenshot: relative27(dirname66(run3.manifestPath), path2) };
245271
+ return { ...report9, screenshot: relative28(dirname66(run3.manifestPath), path2) };
245113
245272
  }
245114
245273
  function visibleText2(html) {
245115
245274
  return html.replace(/&nbsp;|&#160;|&#xa0;/gi, "\xA0").replace(/&amp;/g, "&");
@@ -248451,7 +248610,7 @@ __export(auth_gate_copy_exports, {
248451
248610
  });
248452
248611
  import { createHash as createHash80 } from "node:crypto";
248453
248612
  import { existsSync as existsSync126, readdirSync as readdirSync54, readFileSync as readFileSync156, writeFileSync as writeFileSync55 } from "node:fs";
248454
- import { dirname as dirname71, join as join160, relative as relative28, resolve as resolve100 } from "node:path";
248613
+ import { dirname as dirname71, join as join160, relative as relative29, resolve as resolve100 } from "node:path";
248455
248614
  import { fileURLToPath as fileURLToPath38 } from "node:url";
248456
248615
  function discoverMessageSources() {
248457
248616
  const roots2 = [
@@ -248883,7 +249042,7 @@ var init_auth_gate_copy = __esm({
248883
249042
  });
248884
249043
 
248885
249044
  // ../l10n/extract.ts
248886
- import { resolve as resolve101, join as join161, relative as relative29, dirname as dirname72 } from "node:path";
249045
+ import { resolve as resolve101, join as join161, relative as relative30, dirname as dirname72 } from "node:path";
248887
249046
  import { createHash as createHash81 } from "node:crypto";
248888
249047
  import { fileURLToPath as fileURLToPath39 } from "node:url";
248889
249048
  function keyOf3(source2) {
@@ -256943,6 +257102,9 @@ function generateScreens(input) {
256943
257102
  return [`${str13(o2.layoutItemId)}:${str13(o2.sectionId)}:${String(o2.arrayIndex ?? "")}`, o2];
256944
257103
  }));
256945
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);
256946
257108
  const fellBack = /* @__PURE__ */ new Set();
256947
257109
  const paramLinked = /* @__PURE__ */ new Set();
256948
257110
  const out2 = {
@@ -257017,7 +257179,7 @@ function generateScreens(input) {
257017
257179
  out2.routes.push({ layoutItemId, label: label4, screenId: screenId2, kind: "template", ...params && Object.keys(params).length ? { params } : {} });
257018
257180
  continue;
257019
257181
  }
257020
- const screenId = screenIdFor(label4, taken);
257182
+ const screenId = layoutItemId === homePage ? input.homeScreenId : screenIdFor(label4, taken);
257021
257183
  const uses = [];
257022
257184
  const extras = [];
257023
257185
  const unmapped = [];
@@ -257134,6 +257296,9 @@ function generateScreens(input) {
257134
257296
  }
257135
257297
  if (!demoted) break;
257136
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
+ }
257137
257302
  mergePageWorkers(out2);
257138
257303
  markSharedTemplateParams(out2, paramLinked);
257139
257304
  const pointerPart = (id) => id.replaceAll("~", "~0").replaceAll("/", "~1");
@@ -257312,13 +257477,14 @@ function addNavigation(out2, plan, taken) {
257312
257477
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
257313
257478
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
257314
257479
  }
257315
- 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;
257316
257481
  var init_generate2 = __esm({
257317
257482
  "src/one-app/generate.ts"() {
257318
257483
  init_define_HHP_CATALOG();
257319
257484
  init_recipes();
257320
257485
  init_recipes();
257321
257486
  init_tab_ids();
257487
+ TEMPLATE_HOME_SCREEN = "himi_branded_home";
257322
257488
  TEMPLATE_SCREEN_PARAM_KEYS = {
257323
257489
  himi_shop: ["categoryId"],
257324
257490
  himi_groups_feed: ["title", "groupListLabel", "pageSize"],
@@ -258600,13 +258766,14 @@ async function runOneAppApplyNavigation(args, io2) {
258600
258766
  if (edit.status === "kept") return report6(io2, false, { code: "config_unwritable", error: edit.reason, tabs: plan.tabs });
258601
258767
  if (edit.status === "set" && !options2.dryRun) writeFileAtomic(configPath, edit.source);
258602
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)`] : [];
258603
258770
  return report6(io2, true, {
258604
258771
  navigation: edit.status,
258605
258772
  dryRun: options2.dryRun,
258606
258773
  tabs: plan.tabs.map((tab, index) => ({ id: edit.tabIds[index], label: tab.label.trim(), screenId: tab.screenId })),
258607
258774
  repointedTabIds: edit.repointed,
258608
258775
  icons: icons.map(({ tab, source: source2, icon, resolved: resolved3 }) => ({ tab, source: source2, icon, resolved: resolved3 })),
258609
- 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],
258610
258777
  next: "himi validate --strict"
258611
258778
  });
258612
258779
  }
@@ -258619,6 +258786,7 @@ var init_apply_navigation = __esm({
258619
258786
  init_progress();
258620
258787
  init_validate_topbar();
258621
258788
  init_tab_ids();
258789
+ init_generate2();
258622
258790
  tabsFileOf = (out2) => `${out2}.tabs.json`;
258623
258791
  APPLY_NAVIGATION_USAGE = "himi one-app apply-navigation --evidence-dir <.himi/one-app> --content <app-dir> [--tabs <tabs.json>] [--dry-run]";
258624
258792
  SOURCE_ICON_ALIASES = {
@@ -258687,6 +258855,13 @@ function parseArgs5(args) {
258687
258855
  if (!evidenceDir || !contentDir2) throw new Error("Both --evidence-dir and --content are required.");
258688
258856
  return { evidenceDir: resolve110(evidenceDir), contentDir: resolve110(contentDir2), out: resolve110(out2 ?? join177(evidenceDir, "gen", "screens.json")) };
258689
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
+ }
258690
258865
  function previousOutput(out2) {
258691
258866
  const keys2 = (path2) => {
258692
258867
  try {
@@ -258732,17 +258907,19 @@ async function runOneAppGenerate(args, io2) {
258732
258907
  }
258733
258908
  })();
258734
258909
  let taken;
258910
+ let homeScreenId;
258735
258911
  const previousIds = previousOutput(options2.out);
258736
258912
  try {
258737
258913
  const manifest2 = JSON.parse(readFileSync169(join177(options2.contentDir, "himalaya.content.json"), "utf8"));
258738
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;
258739
258916
  for (const id of previousIds) taken.delete(id);
258740
258917
  } catch {
258741
258918
  return report7(io2, false, { code: "content_invalid", error: "himalaya.content.json not found or unreadable: --content must be a Himi content package." });
258742
258919
  }
258743
258920
  let result;
258744
258921
  try {
258745
- 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`)) });
258746
258923
  } catch (error) {
258747
258924
  if (error instanceof RecipeError) return report7(io2, false, { code: "recipe_unavailable", error: error.message });
258748
258925
  throw error;
@@ -258751,6 +258928,7 @@ async function runOneAppGenerate(args, io2) {
258751
258928
  mkdirSync63(dirname77(options2.out), { recursive: true });
258752
258929
  writeFileSync67(options2.out, JSON.stringify(result.screens, null, 2) + "\n", "utf8");
258753
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");
258754
258932
  const tabsPath = tabsFileOf(options2.out);
258755
258933
  const tabs = tabsFile(result, navigation);
258756
258934
  if (tabs) writeFileSync67(tabsPath, JSON.stringify(tabs, null, 2) + "\n", "utf8");
@@ -258808,7 +258986,7 @@ async function runOneAppGenerate(args, io2) {
258808
258986
  }
258809
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))}` : "") });
258810
258988
  }
258811
- var GENERATE_USAGE, GENERATED_WORKER_MARKER, idsFile, shellArg;
258989
+ var GENERATE_USAGE, GENERATED_WORKER_MARKER, idsFile, homeFile, shellArg;
258812
258990
  var init_generate_cli = __esm({
258813
258991
  "src/one-app/generate-cli.ts"() {
258814
258992
  init_define_HHP_CATALOG();
@@ -258821,6 +258999,7 @@ var init_generate_cli = __esm({
258821
258999
  GENERATE_USAGE = "himi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]";
258822
259000
  GENERATED_WORKER_MARKER = "// Generated by `himi one-app generate`";
258823
259001
  idsFile = (out2) => `${out2}.ids.json`;
259002
+ homeFile = (out2) => `${out2}.home.json`;
258824
259003
  shellArg = (value2) => /^[\w@%+=:,./-]+$/.test(value2) ? value2 : `'${value2.replace(/'/g, `'\\''`)}'`;
258825
259004
  }
258826
259005
  });
@@ -260156,7 +260335,7 @@ async function runOneAppCommand(argv, io2, deps = {}, commandIncluded = false) {
260156
260335
  if (argv.includes("--help")) {
260157
260336
  io2.log(`${ONE_APP_USAGE}
260158
260337
 
260159
- 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.
260160
260339
 
260161
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.`);
260162
260341
  return 0;
@@ -260333,6 +260512,7 @@ var ONE_APP_USAGE, ONE_APP_WORKFLOW, UUID2, SLUG2, VALUE_FLAGS, GLOBAL_SWITCHES,
260333
260512
  var init_cli2 = __esm({
260334
260513
  "src/one-app/cli.ts"() {
260335
260514
  init_define_HHP_CATALOG();
260515
+ init_locale();
260336
260516
  init_wix_owner();
260337
260517
  init_collect();
260338
260518
  init_validate_topbar();
@@ -260351,7 +260531,7 @@ var init_cli2 = __esm({
260351
260531
  init_payment_review();
260352
260532
  init_navigation();
260353
260533
  init_version2();
260354
- ONE_APP_USAGE = "himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale en|he|es] [--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;
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;
260355
260535
  ONE_APP_WORKFLOW = "one-app-to-himi-app";
260356
260536
  UUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
260357
260537
  SLUG2 = /^[a-z0-9][a-z0-9-]{0,62}$/;
@@ -262013,9 +262193,8 @@ function siteFetchFor(ports) {
262013
262193
  return ports.siteFetch ?? guardedSiteFetch;
262014
262194
  }
262015
262195
  function localeFromSiteLanguage(languageCode) {
262016
- const tag = languageCode.trim().toLowerCase().split(/[-_]/)[0] ?? "";
262017
- if (tag === "he" || tag === "es") return { default: tag, pin: true };
262018
- return void 0;
262196
+ const tag = coerceSupportedLocale(languageCode);
262197
+ return tag && tag !== "en" ? { default: tag, pin: true } : void 0;
262019
262198
  }
262020
262199
  async function analyzeSite(input, ports) {
262021
262200
  const clientId = input.clientId?.trim() || void 0;
@@ -262392,6 +262571,7 @@ var init_analyze2 = __esm({
262392
262571
  init_types2();
262393
262572
  init_rest();
262394
262573
  init_visitor_auth();
262574
+ init_locale();
262395
262575
  init_probes();
262396
262576
  init_site_properties();
262397
262577
  init_language();
@@ -266544,7 +266724,7 @@ __export(fidelity_exports, {
266544
266724
  });
266545
266725
  import { execFileSync as execFileSync10 } from "node:child_process";
266546
266726
  import { existsSync as existsSync150, realpathSync as realpathSync25 } from "node:fs";
266547
- import { join as join190, relative as relative31, sep as sep30 } from "node:path";
266727
+ import { join as join190, relative as relative32, sep as sep30 } from "node:path";
266548
266728
  function himalayaRepoRoot(dir) {
266549
266729
  let top;
266550
266730
  try {
@@ -266553,7 +266733,7 @@ function himalayaRepoRoot(dir) {
266553
266733
  return null;
266554
266734
  }
266555
266735
  if (!existsSync150(join190(top, "tools/judges/fidelity/JUDGE.md"))) return null;
266556
- const rel2 = relative31(realpathSync25(top), realpathSync25(dir));
266736
+ const rel2 = relative32(realpathSync25(top), realpathSync25(dir));
266557
266737
  return rel2.startsWith(`..${sep30}`) || rel2 === ".." ? null : top;
266558
266738
  }
266559
266739
  function fidelityEnvelope(report9) {
@@ -267354,7 +267534,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
267354
267534
  create/store or inspect CAPTCHA keys (not login tokens).
267355
267535
  Setup needs final --ios-bundle-id / --android-package-name.
267356
267536
 
267357
- 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 en|he|es]
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>]
267358
267538
  scaffold a starter content package (--template <t> starts
267359
267539
  from a reference app; --remote fetches it off the serve plane;
267360
267540
  --base44-app-id writes a Base44 app id into a Base44 template
@@ -267365,7 +267545,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
267365
267545
  the build board (no browser is opened) and the first picture of
267366
267546
  the home screen (offline, journaled; bundled templates only, never
267367
267547
  a --remote one; --no-first-look skips it),
267368
- --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
267369
267549
  (locale: { default, pin: true }; en adds nothing, an existing
267370
267550
  locale is kept); a One App migration workspace supplies it
267371
267551
  from its collected manifest when the flag is absent,
@@ -268111,14 +268291,16 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
268111
268291
  env vars are accepted as flag equivalents. Optional local
268112
268292
  cert/profile flags classify on-disk material without
268113
268293
  replacing stored Branded secrets.
268114
- himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale en|he|es]
268294
+ himi one-app migrate --msid <uuid> [--app-instance branded|free] [--locale <tag>]
268115
268295
  [--prompt <text> | --prompt-file <file>] [--name <slug>] [--dir <parent>] [--target bo]
268116
268296
  [--top-tabs bottom-tabs|keep] [--json]
268117
268297
  collect One App configuration and hand off to the current coding agent
268118
268298
  for faithful reconstruction and a checked hosted draft. Branded falls
268119
268299
  back to Free (Spaces) only when absent. No model is launched here.
268120
268300
  --dir is a parent; an existing destination is refused. Top tabs become
268121
- 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).
268122
268304
  himi one-app apply-navigation --evidence-dir <dir> --content <dir> [--tabs <file>] [--dry-run]
268123
268305
  write the source bottom tabs (saved by one-app generate beside its
268124
268306
  screens file) into the app config.ts navigation.
@@ -268305,7 +268487,7 @@ Transport: same targets/tokens as himi-serve \u2014 --target <local|prod|bo>, --
268305
268487
  --telemetry-url, --control-token/--telemetry-token, or HIMI_* env.
268306
268488
  Guides: ${DEVELOPER_PORTAL_URL}`;
268307
268489
  var COMMANDS = [
268308
- { 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 en|he|es] [--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>]" },
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>]" },
268309
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]" },
268310
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>]" },
268311
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" },
@@ -271080,7 +271262,7 @@ init_preview_surfaces();
271080
271262
  init_lint_report();
271081
271263
  import { createHash as createHash71 } from "node:crypto";
271082
271264
  import { existsSync as existsSync111 } from "node:fs";
271083
- import { join as join140, relative as relative26 } from "node:path";
271265
+ import { join as join140, relative as relative27 } from "node:path";
271084
271266
  init_owner_claim();
271085
271267
  init_surface_lint();
271086
271268
  init_token_lint();
@@ -271311,7 +271493,7 @@ async function pushCommand(ctx) {
271311
271493
  }
271312
271494
  }
271313
271495
  const { shellQuote: shellQuote3 } = await Promise.resolve().then(() => (init_shell_quote(), shell_quote_exports));
271314
- const contentRel = relative26(process.cwd(), dir) || ".";
271496
+ const contentRel = relative27(process.cwd(), dir) || ".";
271315
271497
  const contentArg2 = shellQuote3(contentRel);
271316
271498
  if (onlyRaw !== void 0) {
271317
271499
  const onlyDraft = flags.draft === true;
@@ -277062,7 +277244,7 @@ import {
277062
277244
  statSync as statSync46,
277063
277245
  writeFileSync as writeFileSync56
277064
277246
  } from "node:fs";
277065
- import { basename as basename37, dirname as dirname73, join as join162, relative as relative30, resolve as resolve102 } from "node:path";
277247
+ import { basename as basename37, dirname as dirname73, join as join162, relative as relative31, resolve as resolve102 } from "node:path";
277066
277248
  var L10N_USAGE = "usage: himi l10n import --format oneapp <dir> (--app <slug> | --content <app dir>) [--locales en,he] [--source en] [--overwrite] [--json]";
277067
277249
  var MESSAGES_FILE = /^messages_(.+)\.json$/;
277068
277250
  var UnsafePath = class extends Error {
@@ -277084,7 +277266,7 @@ function unsafeDestination(appDir3, tags) {
277084
277266
  const l10nDir = join162(appDir3, "l10n");
277085
277267
  for (const path2 of [l10nDir, ...tags.map((t2) => join162(l10nDir, `${t2}.json`))]) {
277086
277268
  try {
277087
- if (lstatSync35(path2).isSymbolicLink()) return `${relative30(process.cwd(), path2)} is a symbolic link`;
277269
+ if (lstatSync35(path2).isSymbolicLink()) return `${relative31(process.cwd(), path2)} is a symbolic link`;
277088
277270
  } catch (e2) {
277089
277271
  const code2 = e2.code;
277090
277272
  if (code2 !== "ENOENT" && code2 !== "ENOTDIR") throw e2;
@@ -277189,27 +277371,27 @@ async function l10nCommand(ctx) {
277189
277371
  buf = readRegularFile(path2);
277190
277372
  } catch (e2) {
277191
277373
  if (isUnsafe2(e2)) {
277192
- return fail12("unsafe_path", { error: `${relative30(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);
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);
277193
277375
  }
277194
- return fail12("messages_unreadable", { error: `${relative30(process.cwd(), path2)}: ${e2.message}`, file: path2 }, 1);
277376
+ return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)}: ${e2.message}`, file: path2 }, 1);
277195
277377
  }
277196
277378
  const text25 = buf.toString("utf8");
277197
277379
  const utf16Bom = buf.length >= 2 && (buf[0] === 255 && buf[1] === 254 || buf[0] === 254 && buf[1] === 255);
277198
277380
  if (utf16Bom || buf.includes(0) || Buffer.compare(Buffer.from(text25, "utf8"), buf) !== 0) {
277199
- return fail12("messages_not_utf8", { error: `${relative30(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);
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);
277200
277382
  }
277201
277383
  let parsed;
277202
277384
  try {
277203
277385
  parsed = JSON.parse(text25.replace(/^\uFEFF/, ""));
277204
277386
  } catch (e2) {
277205
- return fail12("messages_unreadable", { error: `${relative30(process.cwd(), path2)}: ${e2.message}`, file: path2 }, 1);
277387
+ return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)}: ${e2.message}`, file: path2 }, 1);
277206
277388
  }
277207
277389
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
277208
- return fail12("messages_unreadable", { error: `${relative30(process.cwd(), path2)} is not an object of key \u2192 message`, file: path2 }, 1);
277390
+ return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)} is not an object of key \u2192 message`, file: path2 }, 1);
277209
277391
  }
277210
277392
  const bad4 = Object.entries(parsed).filter(([, v2]) => typeof v2 !== "string").map(([k3]) => k3);
277211
277393
  if (bad4.length > 0) {
277212
- return fail12("messages_unreadable", { error: `${relative30(process.cwd(), path2)} has non-string values`, file: path2, keys: bad4.slice(0, 5) }, 1);
277394
+ return fail12("messages_unreadable", { error: `${relative31(process.cwd(), path2)} has non-string values`, file: path2, keys: bad4.slice(0, 5) }, 1);
277213
277395
  }
277214
277396
  files[tag] = parsed;
277215
277397
  }
@@ -277219,7 +277401,7 @@ async function l10nCommand(ctx) {
277219
277401
  try {
277220
277402
  unsafe2 = unsafeDestination(appDir3, requested);
277221
277403
  } catch (e2) {
277222
- return fail12("catalog_write_failed", { error: `cannot inspect ${relative30(process.cwd(), join162(appDir3, "l10n"))}: ${e2.message}`, written: [] }, 1);
277404
+ return fail12("catalog_write_failed", { error: `cannot inspect ${relative31(process.cwd(), join162(appDir3, "l10n"))}: ${e2.message}`, written: [] }, 1);
277223
277405
  }
277224
277406
  if (unsafe2 !== void 0) {
277225
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);
@@ -277235,7 +277417,7 @@ async function l10nCommand(ctx) {
277235
277417
  existing[tag] = parsed;
277236
277418
  } catch (e2) {
277237
277419
  return fail12("catalog_unreadable", {
277238
- error: `existing catalog ${relative30(process.cwd(), path2)} cannot be parsed \u2014 refusing to overwrite it`,
277420
+ error: `existing catalog ${relative31(process.cwd(), path2)} cannot be parsed \u2014 refusing to overwrite it`,
277239
277421
  file: path2,
277240
277422
  cause: e2.message
277241
277423
  }, 1);
@@ -277250,10 +277432,11 @@ async function l10nCommand(ctx) {
277250
277432
  const warnings = [];
277251
277433
  const unsupportedTags = undeclaredLocales2(void 0, requested)?.unsupported ?? [];
277252
277434
  if (unsupportedTags.length > 0) {
277435
+ const { SUPPORTED_LOCALES: SUPPORTED_LOCALES2 } = await Promise.resolve().then(() => (init_locale(), locale_exports));
277253
277436
  warnings.push({
277254
277437
  warning: "unsupported_locale_tags",
277255
277438
  locales: unsupportedTags,
277256
- error: `${unsupportedTags.join(", ")} cannot be declared: locale tags must be one of en, he, es (a region tag like es-MX is shortened to its language). The catalog was written but will never bake`
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`
277257
277440
  });
277258
277441
  }
277259
277442
  try {
@@ -277303,7 +277486,7 @@ async function l10nCommand(ctx) {
277303
277486
  for (const tag of requested) {
277304
277487
  const path2 = join162(appDir3, "l10n", `${tag}.json`);
277305
277488
  writeCatalog(path2, JSON.stringify(catalogs[tag], null, 2) + "\n");
277306
- written.push({ tag, path: relative30(process.cwd(), path2), count: Object.keys(catalogs[tag].messages).length });
277489
+ written.push({ tag, path: relative31(process.cwd(), path2), count: Object.keys(catalogs[tag].messages).length });
277307
277490
  }
277308
277491
  } catch (e2) {
277309
277492
  if (isUnsafe2(e2)) return fail12("unsafe_path", { error: `${e2.message} \u2014 nothing more was written`, written }, 1);