@wix/himalaya-cli 0.2030.0 → 0.2032.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 (34) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +11 -2
  2. package/dist/cli.mjs +170 -85
  3. package/guides/splash-screens.md +11 -0
  4. package/package.json +2 -2
  5. package/templates/bare-fashion/config.ts +14 -0
  6. package/templates/beauty-salon/config.ts +1 -1
  7. package/templates/beauty-salon-owner/config.ts +2 -2
  8. package/templates/branded-lite/config.ts +1 -1
  9. package/templates/community-club/config.ts +1 -1
  10. package/templates/community-club-owner/config.ts +2 -2
  11. package/templates/conference/config.ts +14 -0
  12. package/templates/events-meetups/config.ts +1 -1
  13. package/templates/events-meetups-owner/config.ts +2 -2
  14. package/templates/fitness-gym/config.ts +14 -0
  15. package/templates/gym-fitness/config.ts +1 -1
  16. package/templates/gym-fitness-owner/config.ts +2 -2
  17. package/templates/medical-services/config.ts +14 -0
  18. package/templates/nonprofit-cause/config.ts +1 -1
  19. package/templates/nonprofit-cause-owner/config.ts +2 -2
  20. package/templates/owner-lite/config.ts +2 -2
  21. package/templates/personal-fitness-trainer/config.ts +14 -0
  22. package/templates/podcast-creator/config.ts +1 -1
  23. package/templates/podcast-creator-owner/config.ts +2 -2
  24. package/templates/portfolio-creative/config.ts +1 -1
  25. package/templates/portfolio-creative-owner/config.ts +2 -2
  26. package/templates/professional-services/config.ts +14 -0
  27. package/templates/restaurant/config.ts +1 -1
  28. package/templates/restaurant-owner/config.ts +2 -2
  29. package/templates/retail-store/config.ts +1 -1
  30. package/templates/retail-store-owner/config.ts +2 -2
  31. package/templates/salon-spa/config.ts +14 -0
  32. package/templates/wholesale-store/config.ts +14 -0
  33. package/templates/yoga-studio/config.ts +1 -1
  34. package/templates/yoga-studio-owner/config.ts +2 -2
package/dist/cli.mjs CHANGED
@@ -9536,6 +9536,7 @@ __export(splash_exports, {
9536
9536
  nativeConfigInputTokens: () => nativeConfigInputTokens,
9537
9537
  normalizeHex: () => normalizeHex,
9538
9538
  parseSplashConfig: () => parseSplashConfig,
9539
+ readSplashScalars: () => readSplashScalars,
9539
9540
  renderSplashYaml: () => renderSplashYaml,
9540
9541
  resolveSplashColors: () => resolveSplashColors,
9541
9542
  roundedSquareCornerPt: () => roundedSquareCornerPt,
@@ -9628,17 +9629,24 @@ function splashFields(literal5, resolve142, depth = 0) {
9628
9629
  if (!value2) continue;
9629
9630
  if (ts2.isStringLiteralLike(value2)) fields2.set(key4, value2.text);
9630
9631
  else if (ts2.isNumericLiteral(value2)) fields2.set(key4, Number(value2.text));
9632
+ else if (value2.kind === ts2.SyntaxKind.TrueKeyword) fields2.set(key4, true);
9633
+ else if (value2.kind === ts2.SyntaxKind.FalseKeyword) fields2.set(key4, false);
9631
9634
  }
9632
9635
  return fields2;
9633
9636
  }
9634
- function parseSplashConfig(configTs) {
9635
- if (!configTs.includes("splash")) return {};
9637
+ function splashFieldsOf(configTs) {
9638
+ if (!configTs.includes("splash")) return /* @__PURE__ */ new Map();
9636
9639
  const file2 = parseConfigSource(configTs);
9637
9640
  const hit = findSplashLiteral(file2) ?? (isModuleSource(file2) ? void 0 : findSplashLiteral(parseConfigSource(`({
9638
9641
  ${configTs}
9639
9642
  })`)));
9640
- if (!hit) return {};
9641
- const fields2 = splashFields(hit.literal, hit.resolve);
9643
+ return hit ? splashFields(hit.literal, hit.resolve) : /* @__PURE__ */ new Map();
9644
+ }
9645
+ function readSplashScalars(configTs) {
9646
+ return Object.fromEntries(splashFieldsOf(configTs));
9647
+ }
9648
+ function parseSplashConfig(configTs) {
9649
+ const fields2 = splashFieldsOf(configTs);
9642
9650
  const str27 = (k3) => {
9643
9651
  const v2 = fields2.get(k3);
9644
9652
  return typeof v2 === "string" ? v2 : void 0;
@@ -39709,7 +39717,7 @@ var init_app_services_requirements = __esm({
39709
39717
  });
39710
39718
 
39711
39719
  // ../../core/dev-server/src/app-icon.ts
39712
- import { existsSync as existsSync32, readFileSync as readFileSync30, readdirSync as readdirSync22 } from "node:fs";
39720
+ import { existsSync as existsSync32, readFileSync as readFileSync30, readdirSync as readdirSync22, realpathSync as realpathSync7 } from "node:fs";
39713
39721
  import { dirname as dirname23, join as join28, resolve as resolve26 } from "node:path";
39714
39722
  import { fileURLToPath as fileURLToPath18 } from "node:url";
39715
39723
  function findAppIconPath(appDir3) {
@@ -39739,8 +39747,21 @@ function findContentIconPath(appDir3) {
39739
39747
  if (abs !== base2 && !abs.startsWith(base2 + "/")) return null;
39740
39748
  return existsSync32(abs) ? abs : null;
39741
39749
  }
39750
+ function findTemplateIconPath(appDir3) {
39751
+ const apps = realOrResolved(join28(ROOT2, "apps"));
39752
+ const abs = realOrResolved(appDir3);
39753
+ if (dirname23(abs) !== apps) return null;
39754
+ const name = abs.slice(apps.length + 1);
39755
+ const match = /^himi-([a-z0-9][a-z0-9-]*)$/.exec(name);
39756
+ if (!match) return null;
39757
+ for (const candidate of [name, match[1]]) {
39758
+ const icon = join28(TEMPLATE_ICONS_DIR2, `${candidate}.png`);
39759
+ if (existsSync32(icon)) return icon;
39760
+ }
39761
+ return null;
39762
+ }
39742
39763
  function resolveAppDirIcon(appDir3) {
39743
- return findContentIconPath(appDir3) ?? findAppIconPath(appDir3);
39764
+ return findContentIconPath(appDir3) ?? findAppIconPath(appDir3) ?? findTemplateIconPath(appDir3);
39744
39765
  }
39745
39766
  function readIconFromDir(appDir3) {
39746
39767
  const path2 = resolveAppDirIcon(appDir3);
@@ -39763,12 +39784,20 @@ function readAppIconById(appId3) {
39763
39784
  const dir = resolveAppDir(appId3);
39764
39785
  return dir ? readIconFromDir(dir) : null;
39765
39786
  }
39766
- var ROOT2, APP_ROOTS2;
39787
+ var ROOT2, APP_ROOTS2, TEMPLATE_ICONS_DIR2, realOrResolved;
39767
39788
  var init_app_icon = __esm({
39768
39789
  "../../core/dev-server/src/app-icon.ts"() {
39769
39790
  init_define_HHP_CATALOG();
39770
39791
  ROOT2 = resolve26(dirname23(fileURLToPath18(import.meta.url)), "../../..");
39771
39792
  APP_ROOTS2 = ["apps", "test-apps"];
39793
+ TEMPLATE_ICONS_DIR2 = join28(ROOT2, "tools/himi-cli/template-icons");
39794
+ realOrResolved = (p2) => {
39795
+ try {
39796
+ return realpathSync7(p2);
39797
+ } catch {
39798
+ return resolve26(p2);
39799
+ }
39800
+ };
39772
39801
  }
39773
39802
  });
39774
39803
 
@@ -42900,6 +42929,48 @@ var init_wix_api_rules = __esm({
42900
42929
  needs: ["submitValues (which of first name, last name, nickname and avatar changed, against the profile the screen opened with: the call carries only the new profile)"],
42901
42930
  differs: "The 2xx twin of nano.profile-update-failed-*: only the edit-profile save writes this profile PUT. RN logs after updateCurrentUserProfile resolves, which is this write."
42902
42931
  },
42932
+ {
42933
+ id: "nano.widget-pinned",
42934
+ method: "POST",
42935
+ path: "/_api/nano-user-widgets/v1/user-widgets/toggle-widget-pinned-for-current-user",
42936
+ src: 191,
42937
+ endpoint: "oneapp",
42938
+ evid: 202,
42939
+ module: "nano",
42940
+ when: { "$req.pinned": "true" },
42941
+ mobileAppIds: ["nano"],
42942
+ fields: {
42943
+ widgetId: "$req.widgetId",
42944
+ originScreen: "nano.myWidgets",
42945
+ viewName: "nano.myWidgets.actionSheet",
42946
+ buttonName: "nano.myWidgets.actionSheet.pin",
42947
+ value: "pinned"
42948
+ },
42949
+ rn: "genericClick 191:202 (@wix/bi-logger-wix-nano-data 1.8.0, endpoint ''): wix-private/nano packages/mobile-apps-nano-platform src/common/components/WidgetActionSheet/widgetActionUtils.ts:231",
42950
+ needs: [],
42951
+ differs: "RN logs this click after changeWidgetPin succeeds, which is this write; the pin's Undo snackbar makes the same call, so it is covered too. The value comes from the request's `pinned`, so one rule per direction (#6880 `when`)."
42952
+ },
42953
+ {
42954
+ id: "nano.widget-unpinned",
42955
+ method: "POST",
42956
+ path: "/_api/nano-user-widgets/v1/user-widgets/toggle-widget-pinned-for-current-user",
42957
+ src: 191,
42958
+ endpoint: "oneapp",
42959
+ evid: 202,
42960
+ module: "nano",
42961
+ when: { "$req.pinned": "false" },
42962
+ mobileAppIds: ["nano"],
42963
+ fields: {
42964
+ widgetId: "$req.widgetId",
42965
+ originScreen: "nano.myWidgets",
42966
+ viewName: "nano.myWidgets.actionSheet",
42967
+ buttonName: "nano.myWidgets.actionSheet.pin",
42968
+ value: "unpinned"
42969
+ },
42970
+ rn: "genericClick 191:202 (@wix/bi-logger-wix-nano-data 1.8.0, endpoint ''): wix-private/nano packages/mobile-apps-nano-platform src/common/components/WidgetActionSheet/widgetActionUtils.ts:231",
42971
+ needs: [],
42972
+ differs: "The unpin half of nano.widget-pinned: the same write with `pinned: false`, Undo included."
42973
+ },
42903
42974
  {
42904
42975
  id: "nano.widget-info-update-failed-4xx",
42905
42976
  method: "PUT",
@@ -45212,11 +45283,24 @@ function servedActionMapEntry(e2) {
45212
45283
  fields: e2.fields
45213
45284
  };
45214
45285
  }
45215
- function servedWixApiRules() {
45216
- return splitServedWixApiRules(wix_api_rules_default.rules).apiRules;
45286
+ function servedWixApiRules(modules) {
45287
+ return splitServedWixApiRules(rulesOfModules(modules)).apiRules;
45288
+ }
45289
+ function servedWixApiRulesV2(mobileAppId, modules) {
45290
+ const rules = rulesOfModules(modules);
45291
+ const scoped = mobileAppId === void 0 ? rules : rules.filter((r3) => !r3.when || mobileAppId !== null && (r3.mobileAppIds ?? []).some((s5) => mobileAppIdMatches(s5, mobileAppId)));
45292
+ return splitServedWixApiRules(scoped).apiRulesV2;
45217
45293
  }
45218
- function servedWixApiRulesV2() {
45219
- return splitServedWixApiRules(wix_api_rules_default.rules).apiRulesV2;
45294
+ function mobileAppIdMatches(scope3, mobileAppId) {
45295
+ const at2 = scope3.indexOf("{msid}");
45296
+ if (at2 < 0) return scope3 === mobileAppId;
45297
+ const prefix = scope3.slice(0, at2);
45298
+ const suffix = scope3.slice(at2 + "{msid}".length);
45299
+ return mobileAppId.length > prefix.length + suffix.length && mobileAppId.startsWith(prefix) && mobileAppId.endsWith(suffix);
45300
+ }
45301
+ function rulesOfModules(modules) {
45302
+ const rules = wix_api_rules_default.rules;
45303
+ return modules ? rules.filter((r3) => r3.module !== void 0 && modules.includes(r3.module)) : rules;
45220
45304
  }
45221
45305
  function splitServedWixApiRules(rules) {
45222
45306
  const served = rules.map((r3) => ({
@@ -45266,8 +45350,8 @@ function deriveTelemetryConfig(app2) {
45266
45350
  cfg.frog.lv = wp.bi.lv || "1.0.0|Himi";
45267
45351
  const screenMap = servedScreenMap(app2.name);
45268
45352
  if (screenMap) cfg.frog.screenMap = screenMap;
45269
- cfg.frog.apiRules = servedWixApiRules();
45270
- const apiRulesV2 = servedWixApiRulesV2();
45353
+ cfg.frog.apiRules = servedWixApiRules(wp.bi.apiRuleModules);
45354
+ const apiRulesV2 = servedWixApiRulesV2(cfg.frog.mobileAppId ?? null, wp.bi.apiRuleModules);
45271
45355
  if (apiRulesV2) cfg.frog.apiRulesV2 = apiRulesV2;
45272
45356
  assignServedActionMaps(cfg.frog, sourceActionMap(app2.name));
45273
45357
  const pushMap = servedPushMap(app2.name);
@@ -47728,6 +47812,7 @@ function shouldRevealError(args) {
47728
47812
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
47729
47813
  var init_validation = __esm({
47730
47814
  "../../core/ts/src/validation.ts"() {
47815
+ "use strict";
47731
47816
  init_define_HHP_CATALOG();
47732
47817
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
47733
47818
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -165570,7 +165655,7 @@ __export(build_exports2, {
165570
165655
  withoutDevOnlyAppConfig: () => withoutDevOnlyAppConfig
165571
165656
  });
165572
165657
  import { createHash as createHash27 } from "node:crypto";
165573
- import { readFileSync as readFileSync47, readdirSync as readdirSync27, existsSync as existsSync43, realpathSync as realpathSync7 } from "node:fs";
165658
+ import { readFileSync as readFileSync47, readdirSync as readdirSync27, existsSync as existsSync43, realpathSync as realpathSync8 } from "node:fs";
165574
165659
  import { dirname as dirname29, join as join39, resolve as resolve36, sep as sep13 } from "node:path";
165575
165660
  import { fileURLToPath as fileURLToPath28 } from "node:url";
165576
165661
  import { createRequire as createRequire4 } from "node:module";
@@ -165705,9 +165790,9 @@ function sourceTranslationKeys2(locale, appDir3) {
165705
165790
  const path2 = join39(l10nDir, `${tag2}.json`);
165706
165791
  if (!existsSync43(path2)) return /* @__PURE__ */ new Set();
165707
165792
  try {
165708
- const realDir = realpathSync7(l10nDir);
165709
- const realFile = realpathSync7(path2);
165710
- if (!realDir.startsWith(realpathSync7(appDir3) + sep13) || dirname29(realFile) !== realDir) return /* @__PURE__ */ new Set();
165793
+ const realDir = realpathSync8(l10nDir);
165794
+ const realFile = realpathSync8(path2);
165795
+ if (!realDir.startsWith(realpathSync8(appDir3) + sep13) || dirname29(realFile) !== realDir) return /* @__PURE__ */ new Set();
165711
165796
  return new Set(keyMap(parseCatalog(readFileSync47(realFile, "utf8")), { sourceFallback: true }).keys());
165712
165797
  } catch {
165713
165798
  return /* @__PURE__ */ new Set();
@@ -168717,13 +168802,13 @@ __export(studio_exports, {
168717
168802
  writeStudioRecord: () => writeStudioRecord
168718
168803
  });
168719
168804
  import { createHash as createHash28 } from "node:crypto";
168720
- import { existsSync as existsSync46, readdirSync as readdirSync29, readFileSync as readFileSync50, realpathSync as realpathSync8, statSync as statSync13 } from "node:fs";
168805
+ import { existsSync as existsSync46, readdirSync as readdirSync29, readFileSync as readFileSync50, realpathSync as realpathSync9, statSync as statSync13 } from "node:fs";
168721
168806
  import { basename as basename12, extname as extname3, join as join42, relative as relative11, resolve as resolve37, sep as sep14 } from "node:path";
168722
168807
  import { pathToFileURL as pathToFileURL6 } from "node:url";
168723
168808
  function realInside(dir, abs) {
168724
168809
  try {
168725
- const root = realpathSync8(dir);
168726
- const real = realpathSync8(abs);
168810
+ const root = realpathSync9(dir);
168811
+ const real = realpathSync9(abs);
168727
168812
  return real.startsWith(root + sep14) ? real : null;
168728
168813
  } catch {
168729
168814
  return null;
@@ -180009,10 +180094,10 @@ __export(content_manifest_exports, {
180009
180094
  writeContentManifest: () => writeContentManifest
180010
180095
  });
180011
180096
  import { randomUUID as randomUUID8 } from "node:crypto";
180012
- import { constants as constants3, lstatSync as lstatSync18, readFileSync as readFileSync58, realpathSync as realpathSync9, writeFileSync as writeFileSync22, renameSync as renameSync10, openSync as openSync4, closeSync as closeSync4, unlinkSync as unlinkSync2 } from "node:fs";
180097
+ import { constants as constants3, lstatSync as lstatSync18, readFileSync as readFileSync58, realpathSync as realpathSync10, writeFileSync as writeFileSync22, renameSync as renameSync10, openSync as openSync4, closeSync as closeSync4, unlinkSync as unlinkSync2 } from "node:fs";
180013
180098
  import { join as join47 } from "node:path";
180014
180099
  function contentManifestPath(dir) {
180015
- const path2 = join47(realpathSync9(dir), "himalaya.content.json");
180100
+ const path2 = join47(realpathSync10(dir), "himalaya.content.json");
180016
180101
  try {
180017
180102
  if (lstatSync18(path2).isSymbolicLink()) throw new Error("himalaya.content.json is a symlink \u2014 refusing to read or write through it");
180018
180103
  } catch (error) {
@@ -189289,7 +189374,7 @@ __export(run_watch_exports, {
189289
189374
  watchedContentDir: () => watchedContentDir,
189290
189375
  writeRunRecord: () => writeRunRecord
189291
189376
  });
189292
- import { closeSync as closeSync5, constants as constants5, existsSync as existsSync64, fstatSync as fstatSync2, lstatSync as lstatSync21, statSync as statSync22, readdirSync as readdirSync35, mkdirSync as mkdirSync34, openSync as openSync5, readFileSync as readFileSync69, realpathSync as realpathSync10, renameSync as renameSync13, rmSync as rmSync21, writeFileSync as writeFileSync30, watch as fsWatch } from "node:fs";
189377
+ import { closeSync as closeSync5, constants as constants5, existsSync as existsSync64, fstatSync as fstatSync2, lstatSync as lstatSync21, statSync as statSync22, readdirSync as readdirSync35, mkdirSync as mkdirSync34, openSync as openSync5, readFileSync as readFileSync69, realpathSync as realpathSync11, renameSync as renameSync13, rmSync as rmSync21, writeFileSync as writeFileSync30, watch as fsWatch } from "node:fs";
189293
189378
  import { randomUUID as randomUUID9 } from "node:crypto";
189294
189379
  import { extname as extname4, join as join58, relative as relative14, resolve as resolve49, sep as sep19 } from "node:path";
189295
189380
  function diffReleases(prev, next) {
@@ -189554,8 +189639,8 @@ function readConfined(root, rel2) {
189554
189639
  const st2 = lstatSync21(at2);
189555
189640
  if (st2.isSymbolicLink() || !(i2 === parts.length - 1 ? st2.isFile() : st2.isDirectory())) return null;
189556
189641
  }
189557
- const canonicalRoot = realpathSync10(root);
189558
- if (!realpathSync10(at2).startsWith(canonicalRoot + sep19)) return null;
189642
+ const canonicalRoot = realpathSync11(root);
189643
+ if (!realpathSync11(at2).startsWith(canonicalRoot + sep19)) return null;
189559
189644
  const fd = openSync5(at2, constants5.O_RDONLY | (constants5.O_NOFOLLOW ?? 0));
189560
189645
  try {
189561
189646
  if (!fstatSync2(fd).isFile()) return null;
@@ -204110,7 +204195,7 @@ __export(crawl_layers_exports, {
204110
204195
  renderMocksFrom: () => renderMocksFrom,
204111
204196
  tabRootScreens: () => tabRootScreens
204112
204197
  });
204113
- import { existsSync as existsSync88, readFileSync as readFileSync96, realpathSync as realpathSync11 } from "node:fs";
204198
+ import { existsSync as existsSync88, readFileSync as readFileSync96, realpathSync as realpathSync12 } from "node:fs";
204114
204199
  import { dirname as dirname50, join as join87, resolve as resolve59, sep as sep24 } from "node:path";
204115
204200
  async function loadContentConfigQuietly(dir) {
204116
204201
  try {
@@ -204198,9 +204283,9 @@ async function l10nSourceCatalogFile(dir) {
204198
204283
  const file2 = resolve59(l10nDir, `${tag2}.json`);
204199
204284
  if (!existsSync88(file2)) return null;
204200
204285
  try {
204201
- const realDir = realpathSync11(l10nDir);
204202
- const realFile = realpathSync11(file2);
204203
- if (!realDir.startsWith(realpathSync11(dir) + sep24) || dirname50(realFile) !== realDir) return null;
204286
+ const realDir = realpathSync12(l10nDir);
204287
+ const realFile = realpathSync12(file2);
204288
+ if (!realDir.startsWith(realpathSync12(dir) + sep24) || dirname50(realFile) !== realDir) return null;
204204
204289
  return { tag: tag2, text: readFileSync96(realFile, "utf8") };
204205
204290
  } catch {
204206
204291
  return null;
@@ -206909,7 +206994,7 @@ import {
206909
206994
  existsSync as existsSync91,
206910
206995
  lstatSync as lstatSync28,
206911
206996
  mkdirSync as mkdirSync40,
206912
- realpathSync as realpathSync12,
206997
+ realpathSync as realpathSync13,
206913
206998
  readlinkSync as readlinkSync2,
206914
206999
  readFileSync as readFileSync101,
206915
207000
  readdirSync as readdirSync42,
@@ -206979,7 +207064,7 @@ function currentGitDiffHash(contentDir2) {
206979
207064
  }
206980
207065
  function currentGitUntrackedHash(contentDir2) {
206981
207066
  const unresolved = resolve64(contentDir2);
206982
- const absolute2 = realpathSync12.native(unresolved);
207067
+ const absolute2 = realpathSync13.native(unresolved);
206983
207068
  const root = repoRoot(absolute2);
206984
207069
  if (!root) return sourceTreeHash(absolute2);
206985
207070
  const scope3 = relative19(root, absolute2) || ".";
@@ -219547,7 +219632,7 @@ var init_cli_bridge = __esm({
219547
219632
  });
219548
219633
 
219549
219634
  // src/mcp/file-tools.ts
219550
- import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync31, mkdirSync as mkdirSync43, openSync as openSync7, readdirSync as readdirSync46, readFileSync as readFileSync126, realpathSync as realpathSync13, renameSync as renameSync16, rmSync as rmSync32, statSync as statSync31, writeSync as writeSync2, existsSync as existsSync113 } from "node:fs";
219635
+ import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync31, mkdirSync as mkdirSync43, openSync as openSync7, readdirSync as readdirSync46, readFileSync as readFileSync126, realpathSync as realpathSync14, renameSync as renameSync16, rmSync as rmSync32, statSync as statSync31, writeSync as writeSync2, existsSync as existsSync113 } from "node:fs";
219551
219636
  import { randomBytes as randomBytes5 } from "node:crypto";
219552
219637
  import { dirname as dirname56, isAbsolute as isAbsolute15, join as join114, relative as relative22, resolve as resolve75, sep as sep26 } from "node:path";
219553
219638
  import * as z2 from "zod";
@@ -219563,7 +219648,7 @@ function realish(p2) {
219563
219648
  tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
219564
219649
  cur = up2;
219565
219650
  }
219566
- return join114(realpathSync13(cur), ...tail);
219651
+ return join114(realpathSync14(cur), ...tail);
219567
219652
  }
219568
219653
  function symlinkComponent(base2, abs) {
219569
219654
  let cur = base2;
@@ -219581,7 +219666,7 @@ function workspaceRefusal(root, target) {
219581
219666
  const r3 = resolve75(root);
219582
219667
  const t2 = resolve75(r3, target);
219583
219668
  if (!existsSync113(r3)) return `the workspace folder ${r3} does not exist`;
219584
- if (!within(r3, t2) || !within(realpathSync13(r3), realish(t2))) return `"${target}" is outside the workspace folder ${r3}`;
219669
+ if (!within(r3, t2) || !within(realpathSync14(r3), realish(t2))) return `"${target}" is outside the workspace folder ${r3}`;
219585
219670
  const link4 = symlinkComponent(r3, t2);
219586
219671
  if (link4) return `"${link4}" is a symlink \u2014 paths must stay in real folders inside the workspace`;
219587
219672
  return null;
@@ -219590,7 +219675,7 @@ async function confinedAppDir(args, deps) {
219590
219675
  const root = resolve75(await deps.defaultDir());
219591
219676
  const dir = typeof args.dir === "string" && args.dir ? resolve75(root, args.dir) : root;
219592
219677
  if (!existsSync113(root)) return refuse5("no_workspace", `the workspace folder ${root} does not exist`);
219593
- if (!within(root, dir) || !within(realpathSync13(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
219678
+ if (!within(root, dir) || !within(realpathSync14(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
219594
219679
  const link4 = symlinkComponent(root, dir);
219595
219680
  if (link4) return refuse5("outside_workspace", `"${link4}" is a symlink \u2014 the app folder must be a real folder in the workspace`);
219596
219681
  const rel2 = relative22(root, dir);
@@ -219609,13 +219694,13 @@ function onDiskSpelling(abs) {
219609
219694
  tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
219610
219695
  cur = up2;
219611
219696
  }
219612
- return join114(realpathSync13.native(cur), ...tail);
219697
+ return join114(realpathSync14.native(cur), ...tail);
219613
219698
  }
219614
219699
  function denied(appDir3, abs) {
219615
219700
  const rel2 = relative22(appDir3, abs);
219616
219701
  if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) return true;
219617
219702
  try {
219618
- return isDeniedSourcePath(relative22(realpathSync13.native(appDir3), onDiskSpelling(abs)));
219703
+ return isDeniedSourcePath(relative22(realpathSync14.native(appDir3), onDiskSpelling(abs)));
219619
219704
  } catch {
219620
219705
  return true;
219621
219706
  }
@@ -219627,7 +219712,7 @@ function confinedPath(appDir3, rel2) {
219627
219712
  const abs = resolve75(appDir3, rel2);
219628
219713
  if (!within(appDir3, abs) || abs === appDir3) return { error: `"${rel2}" is outside the app folder` };
219629
219714
  const real = realish(abs);
219630
- const base2 = existsSync113(appDir3) ? realpathSync13(appDir3) : realish(appDir3);
219715
+ const base2 = existsSync113(appDir3) ? realpathSync14(appDir3) : realish(appDir3);
219631
219716
  if (!within(base2, real) || real === base2) return { error: `"${rel2}" is outside the app folder` };
219632
219717
  const link4 = symlinkComponent(appDir3, abs);
219633
219718
  if (link4) return { error: `"${link4}" is a symlink, which this tool does not follow` };
@@ -219646,7 +219731,7 @@ function writeNoFollow2(appDir3, abs, content) {
219646
219731
  closeSync8(fd);
219647
219732
  }
219648
219733
  const link4 = symlinkComponent(appDir3, abs);
219649
- if (link4 || !within(realpathSync13(appDir3), realpathSync13(dirname56(abs)))) {
219734
+ if (link4 || !within(realpathSync14(appDir3), realpathSync14(dirname56(abs)))) {
219650
219735
  rmSync32(tmp, { force: true });
219651
219736
  throw new Error(`"${link4 ?? relative22(appDir3, dirname56(abs))}" changed into a link while writing`);
219652
219737
  }
@@ -234148,7 +234233,7 @@ __export(store_google_host_exports, {
234148
234233
  signingFor: () => signingFor
234149
234234
  });
234150
234235
  import { createHash as createHash69, randomUUID as randomUUID14 } from "node:crypto";
234151
- import { existsSync as existsSync115, lstatSync as lstatSync33, mkdirSync as mkdirSync44, readFileSync as readFileSync129, readdirSync as readdirSync48, realpathSync as realpathSync14, renameSync as renameSync17, rmSync as rmSync33, statSync as statSync33, writeFileSync as writeFileSync49 } from "node:fs";
234236
+ import { existsSync as existsSync115, lstatSync as lstatSync33, mkdirSync as mkdirSync44, readFileSync as readFileSync129, readdirSync as readdirSync48, realpathSync as realpathSync15, renameSync as renameSync17, rmSync as rmSync33, statSync as statSync33, writeFileSync as writeFileSync49 } from "node:fs";
234152
234237
  import { join as join132, relative as relative25 } from "node:path";
234153
234238
  function readGooglePlayFacts(dir) {
234154
234239
  const path2 = join132(dir, GOOGLE_FACTS_FILE);
@@ -234264,7 +234349,7 @@ async function googleAppFactsFor(dir, o2) {
234264
234349
  const himi = packageName.toLowerCase().startsWith("himi.");
234265
234350
  if (himi && !site) note(`Signing: ${packageName} is a Containers (himi.*) package, which Wix builds and signs for a site-linked app, but this app names no Wix site (a "wix" block in ${GOOGLE_FACTS_FILE} or ${STORE_FACTS_FILE}). Link it (\`himi store app set --app <id> --site <msid> --android-package ${packageName}\`) and add the wix block, or use your own package name.`);
234266
234351
  if (!himi && site) note(`Signing: this app is linked to Wix site ${site.site}, so Wix signs its bundle under a himi.<name> package; ${packageName} is not one. Set packageName to the site's saved himi.<name> package (\`himi store app show --app ${site.app} --site ${site.site}\`), or drop the wix block for an owner-signed app.`);
234267
- const realDir = realpathSync14(dir);
234352
+ const realDir = realpathSync15(dir);
234268
234353
  const files = {};
234269
234354
  const given = (key4) => {
234270
234355
  const p2 = str18(file2[key4]);
@@ -251573,7 +251658,7 @@ function realPathOf2(path2) {
251573
251658
  d2 = dirname67(d2);
251574
251659
  }
251575
251660
  try {
251576
- return join139(realpathSync15(d2), ...rest);
251661
+ return join139(realpathSync16(d2), ...rest);
251577
251662
  } catch {
251578
251663
  return resolve85(path2);
251579
251664
  }
@@ -251636,13 +251721,13 @@ function reserveKeyFile(dir, keyId) {
251636
251721
  }
251637
251722
  };
251638
251723
  }
251639
- var createPrivateKey6, closeSync9, existsSync117, mkdirSync46, openSync8, realpathSync15, statSync35, unlinkSync7, writeSync3, basename31, dirname67, isAbsolute17, join139, resolve85, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
251724
+ var createPrivateKey6, closeSync9, existsSync117, mkdirSync46, openSync8, realpathSync16, statSync35, unlinkSync7, writeSync3, basename31, dirname67, isAbsolute17, join139, resolve85, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
251640
251725
  var init_api_keys = __esm({
251641
251726
  "../../node_modules/@wix/asc-web/dist/api-keys.js"() {
251642
251727
  init_define_HHP_CATALOG();
251643
251728
  init_dist3();
251644
251729
  ({ createPrivateKey: createPrivateKey6 } = __ascBuiltin051);
251645
- ({ closeSync: closeSync9, existsSync: existsSync117, mkdirSync: mkdirSync46, openSync: openSync8, realpathSync: realpathSync15, statSync: statSync35, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
251730
+ ({ closeSync: closeSync9, existsSync: existsSync117, mkdirSync: mkdirSync46, openSync: openSync8, realpathSync: realpathSync16, statSync: statSync35, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
251646
251731
  ({ basename: basename31, dirname: dirname67, isAbsolute: isAbsolute17, join: join139, resolve: resolve85 } = __ascBuiltin217);
251647
251732
  TEAM_KEY_ROLES = ["ADMIN", "APP_MANAGER", "DEVELOPER", "FINANCE", "SALES", "MARKETING", "ACCESS_TO_REPORTS", "CUSTOMER_SUPPORT", "CREATE_APPS", "CLOUD_MANAGED_APP_DISTRIBUTION", "CLOUD_MANAGED_DEVELOPER_ID"];
251648
251733
  DOWNLOAD_ATTEMPTS = 3;
@@ -263812,7 +263897,7 @@ function fileRoots(env) {
263812
263897
  const roots2 = [process.cwd(), ...(env.ASC_MCP_FILE_ROOTS ?? "").split(delimiter3)].map((r3) => r3.trim()).filter(Boolean);
263813
263898
  return [...new Set(roots2.flatMap((r3) => {
263814
263899
  try {
263815
- return [realpathSync16(resolve93(r3))];
263900
+ return [realpathSync17(resolve93(r3))];
263816
263901
  } catch {
263817
263902
  return [];
263818
263903
  }
@@ -263825,7 +263910,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
263825
263910
  const given = resolve93(roots2[0] ?? process.cwd(), path2);
263826
263911
  let real;
263827
263912
  try {
263828
- real = realpathSync16(given);
263913
+ real = realpathSync17(given);
263829
263914
  } catch (e2) {
263830
263915
  throw new AscError("invalid", `${param}: cannot read ${path2} (${e2.code ?? "unreadable"})`);
263831
263916
  }
@@ -263834,7 +263919,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
263834
263919
  throw new AscError("invalid", `${param}: ${path2} is not a ${o2.directory ? "directory" : "regular file"}`);
263835
263920
  let state;
263836
263921
  try {
263837
- state = realpathSync16(ctx.stateDir);
263922
+ state = realpathSync17(ctx.stateDir);
263838
263923
  } catch {
263839
263924
  state = void 0;
263840
263925
  }
@@ -264033,7 +264118,7 @@ ${o2.detail}` : ""}` };
264033
264118
  function enabledTools(env, o2 = {}) {
264034
264119
  return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
264035
264120
  }
264036
- var mkdirSync51, readFileSync142, realpathSync16, statSync43, writeFileSync55, delimiter3, isAbsolute19, join149, relative26, resolve93, sep29, 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;
264121
+ var mkdirSync51, readFileSync142, realpathSync17, statSync43, writeFileSync55, delimiter3, isAbsolute19, join149, relative26, resolve93, sep29, 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;
264037
264122
  var init_tools2 = __esm({
264038
264123
  "../../node_modules/@wix/asc-mcp/dist/tools.js"() {
264039
264124
  init_define_HHP_CATALOG();
@@ -264043,7 +264128,7 @@ var init_tools2 = __esm({
264043
264128
  init_dist6();
264044
264129
  init_dist7();
264045
264130
  init_action_catalog_generated();
264046
- ({ mkdirSync: mkdirSync51, readFileSync: readFileSync142, realpathSync: realpathSync16, statSync: statSync43, writeFileSync: writeFileSync55 } = __ascBuiltin075);
264131
+ ({ mkdirSync: mkdirSync51, readFileSync: readFileSync142, realpathSync: realpathSync17, statSync: statSync43, writeFileSync: writeFileSync55 } = __ascBuiltin075);
264047
264132
  ({ delimiter: delimiter3, isAbsolute: isAbsolute19, join: join149, relative: relative26, resolve: resolve93, sep: sep29 } = __ascBuiltin148);
264048
264133
  READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
264049
264134
  PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
@@ -266261,14 +266346,14 @@ __export(apple_keys_exports, {
266261
266346
  runAppleKeys: () => runAppleKeys
266262
266347
  });
266263
266348
  import { createPublicKey as createPublicKey5 } from "node:crypto";
266264
- import { readFileSync as readFileSync143, realpathSync as realpathSync17, statSync as statSync44 } from "node:fs";
266349
+ import { readFileSync as readFileSync143, realpathSync as realpathSync18, statSync as statSync44 } from "node:fs";
266265
266350
  function readKey2(flags, kind) {
266266
266351
  const names2 = kind === "asc" ? ["asc-key-file", "asc-key-id", "asc-issuer-id"] : ["iap-key", "iap-key-id", "iap-issuer-id"];
266267
266352
  if (names2.every((name) => flags[name] === void 0)) return void 0;
266268
266353
  const [file2, keyId, issuerId] = names2.map((name) => text17(flags[name]));
266269
266354
  if (!file2 || !keyId || !issuerId) throw new UsageError2(`Supply --${names2.join(" --")} together.`);
266270
266355
  try {
266271
- const path2 = realpathSync17(file2);
266356
+ const path2 = realpathSync18(file2);
266272
266357
  assertCredentialOutsideRepo(names2[0], path2);
266273
266358
  if (statSync44(path2).size > 16384) throw new Error("oversized");
266274
266359
  const key4 = { keyId, issuerId, key: readFileSync143(path2, "utf8") };
@@ -266452,7 +266537,7 @@ __export(store_host_exports, {
266452
266537
  wixTargetOf: () => wixTargetOf
266453
266538
  });
266454
266539
  import { spawn as spawn8 } from "node:child_process";
266455
- import { existsSync as existsSync120, lstatSync as lstatSync36, readFileSync as readFileSync144, readdirSync as readdirSync53, realpathSync as realpathSync18 } from "node:fs";
266540
+ import { existsSync as existsSync120, lstatSync as lstatSync36, readFileSync as readFileSync144, readdirSync as readdirSync53, realpathSync as realpathSync19 } from "node:fs";
266456
266541
  import { homedir as homedir16, hostname as hostname6, userInfo as userInfo3 } from "node:os";
266457
266542
  import { delimiter as delimiter4, dirname as dirname69, isAbsolute as isAbsolute20, join as join151, relative as relative27, resolve as resolve94, sep as sep30 } from "node:path";
266458
266543
  function storeNodeRefusal(version5 = process.versions.node) {
@@ -266585,12 +266670,12 @@ function privacyAnswersFor(dir, ownerPath, shellOnly, checked, deps, note) {
266585
266670
  function ownerAnswers(dir, ownerPath, deps, note, rel2, render3) {
266586
266671
  let real;
266587
266672
  try {
266588
- real = realpathSync18(ownerPath);
266673
+ real = realpathSync19(ownerPath);
266589
266674
  } catch {
266590
266675
  note(`App Privacy: could not read ${rel2(ownerPath)} to check it against the Himi app's own answers.`);
266591
266676
  return ownerPath;
266592
266677
  }
266593
- const realDir = realpathSync18(dir);
266678
+ const realDir = realpathSync19(dir);
266594
266679
  if (real !== realDir && !real.startsWith(realDir + sep30)) {
266595
266680
  throw new StoreFactsError(`privacyAnswersFile must be inside the app folder; ${rel2(ownerPath)} is not`, "store_facts_invalid");
266596
266681
  }
@@ -266632,7 +266717,7 @@ function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
266632
266717
  while (!existsSync120(probe2) && probe2 !== base2) probe2 = dirname69(probe2);
266633
266718
  let real;
266634
266719
  try {
266635
- real = realpathSync18(probe2);
266720
+ real = realpathSync19(probe2);
266636
266721
  } catch {
266637
266722
  throw refuse11();
266638
266723
  }
@@ -266674,7 +266759,7 @@ async function appFactsFor(dir, deps) {
266674
266759
  ...str21(file2.sku) ? { sku: str21(file2.sku) } : {},
266675
266760
  ...str21(file2.buildNumber) ? { buildNumber: str21(file2.buildNumber) } : {}
266676
266761
  };
266677
- const realDir = realpathSync18(dir);
266762
+ const realDir = realpathSync19(dir);
266678
266763
  for (const key4 of FILE_FACTS) {
266679
266764
  const p2 = str21(file2[key4]);
266680
266765
  if (p2) facts[key4] = factPathIn(dir, realDir, key4, p2);
@@ -269018,11 +269103,11 @@ __export(input_evidence_isolation_exports, {
269018
269103
  runInputEvidenceChild: () => runInputEvidenceChild
269019
269104
  });
269020
269105
  async function installInputEvidenceIsolation(dir) {
269021
- const { lstatSync: lstatSync46, readdirSync: readdirSync70, readlinkSync: readlinkSync4, realpathSync: realpathSync28 } = await import("node:fs");
269106
+ const { lstatSync: lstatSync46, readdirSync: readdirSync70, readlinkSync: readlinkSync4, realpathSync: realpathSync29 } = await import("node:fs");
269022
269107
  const { dirname: dirname96, isAbsolute: isAbsolute26, join: join231, relative: relative42, resolve: resolve142, sep: sep38 } = await import("node:path");
269023
269108
  const root = resolve142(dir);
269024
269109
  const privateDir = join231(root, ".himi");
269025
- const privateReal = join231(realpathSync28(root), ".himi") + sep38;
269110
+ const privateReal = join231(realpathSync29(root), ".himi") + sep38;
269026
269111
  const within2 = (base2, path2) => {
269027
269112
  const rel2 = relative42(base2, path2);
269028
269113
  return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute26(rel2);
@@ -269035,10 +269120,10 @@ async function installInputEvidenceIsolation(dir) {
269035
269120
  if (isAbsolute26(link4)) return false;
269036
269121
  const target = resolve142(dirname96(path2), link4);
269037
269122
  if (!within2(privateDir, target)) return false;
269038
- if (realpathSync28(path2) !== join231(realpathSync28(root), relative42(root, target))) return false;
269123
+ if (realpathSync29(path2) !== join231(realpathSync29(root), relative42(root, target))) return false;
269039
269124
  return lstatSync46(target).isFile();
269040
269125
  }
269041
- return within2(privateDir, resolve142(path2)) && realpathSync28(path2).startsWith(privateReal);
269126
+ return within2(privateDir, resolve142(path2)) && realpathSync29(path2).startsWith(privateReal);
269042
269127
  } catch {
269043
269128
  return false;
269044
269129
  }
@@ -269468,7 +269553,7 @@ __export(browser_authoring_exports, {
269468
269553
  });
269469
269554
  import { createServer as createServer6 } from "node:http";
269470
269555
  import { createHash as createHash84, randomBytes as randomBytes20 } from "node:crypto";
269471
- import { existsSync as existsSync126, readdirSync as readdirSync55, readFileSync as readFileSync149, realpathSync as realpathSync19, statSync as statSync45 } from "node:fs";
269556
+ import { existsSync as existsSync126, readdirSync as readdirSync55, readFileSync as readFileSync149, realpathSync as realpathSync20, statSync as statSync45 } from "node:fs";
269472
269557
  import { join as join159, posix as posix3, relative as relative30, sep as sep31 } from "node:path";
269473
269558
  function humanMs(ms2) {
269474
269559
  return ms2 < 1e3 ? `${ms2}ms` : `${Math.round(ms2 / 1e3)}s`;
@@ -269478,7 +269563,7 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
269478
269563
  const files = {};
269479
269564
  const visitedDirs = /* @__PURE__ */ new Set();
269480
269565
  const walk6 = (abs, rel2) => {
269481
- const real = realpathSync19(abs);
269566
+ const real = realpathSync20(abs);
269482
269567
  if (visitedDirs.has(real)) return;
269483
269568
  visitedDirs.add(real);
269484
269569
  for (const name of readdirSync55(abs).sort()) {
@@ -272113,7 +272198,7 @@ __export(render_cache_exports, {
272113
272198
  });
272114
272199
  import { AsyncLocalStorage as AsyncLocalStorage4 } from "node:async_hooks";
272115
272200
  import { createHash as createHash87, randomBytes as randomBytes21 } from "node:crypto";
272116
- import { existsSync as existsSync135, lstatSync as lstatSync37, mkdirSync as mkdirSync60, readdirSync as readdirSync58, readFileSync as readFileSync158, readlinkSync as readlinkSync3, realpathSync as realpathSync20, renameSync as renameSync21, rmSync as rmSync39, statSync as statSync47, writeFileSync as writeFileSync63 } from "node:fs";
272201
+ import { existsSync as existsSync135, lstatSync as lstatSync37, mkdirSync as mkdirSync60, readdirSync as readdirSync58, readFileSync as readFileSync158, readlinkSync as readlinkSync3, realpathSync as realpathSync21, renameSync as renameSync21, rmSync as rmSync39, statSync as statSync47, writeFileSync as writeFileSync63 } from "node:fs";
272117
272202
  import { join as join169, resolve as resolve103 } from "node:path";
272118
272203
  import { fileURLToPath as fileURLToPath36 } from "node:url";
272119
272204
  function renderCacheKey(contentDir2, inputs) {
@@ -272122,7 +272207,7 @@ function renderCacheKey(contentDir2, inputs) {
272122
272207
  const root = resolve103(contentDir2);
272123
272208
  const seen = /* @__PURE__ */ new Set();
272124
272209
  const walk6 = (dir, rel2) => {
272125
- seen.add(realpathSync20(dir));
272210
+ seen.add(realpathSync21(dir));
272126
272211
  for (const name of readdirSync58(dir).sort()) {
272127
272212
  if (SKIPPED_ANYWHERE.has(name) || rel2 === "" && SKIPPED_TOP.has(name)) continue;
272128
272213
  const path2 = join169(dir, name);
@@ -272133,10 +272218,10 @@ function renderCacheKey(contentDir2, inputs) {
272133
272218
  if (link4) hash3.update(`\0l${relPath}\0${readlinkSync3(path2)}`);
272134
272219
  if (!st2) continue;
272135
272220
  if (st2.isDirectory()) {
272136
- if (!link4 || !seen.has(realpathSync20(path2))) walk6(path2, relPath);
272221
+ if (!link4 || !seen.has(realpathSync21(path2))) walk6(path2, relPath);
272137
272222
  } else if (st2.isFile()) hash3.update(`\0f${relPath}\0`).update(createHash87("sha256").update(readFileSync158(path2)).digest("hex"));
272138
272223
  }
272139
- seen.delete(realpathSync20(dir));
272224
+ seen.delete(realpathSync21(dir));
272140
272225
  };
272141
272226
  walk6(root, "");
272142
272227
  return hash3.digest("hex").slice(0, 32);
@@ -273822,7 +273907,7 @@ __export(validate_design_exports, {
273822
273907
  validateDesign: () => validateDesign
273823
273908
  });
273824
273909
  import { randomBytes as randomBytes22 } from "node:crypto";
273825
- import { closeSync as closeSync12, constants as constants10, existsSync as existsSync139, lstatSync as lstatSync38, openSync as openSync11, readFileSync as readFileSync163, realpathSync as realpathSync21, renameSync as renameSync22, unlinkSync as unlinkSync9, writeFileSync as writeFileSync65 } from "node:fs";
273910
+ import { closeSync as closeSync12, constants as constants10, existsSync as existsSync139, lstatSync as lstatSync38, openSync as openSync11, readFileSync as readFileSync163, realpathSync as realpathSync22, renameSync as renameSync22, unlinkSync as unlinkSync9, writeFileSync as writeFileSync65 } from "node:fs";
273826
273911
  import { dirname as dirname76, isAbsolute as isAbsolute22, join as join174, relative as relative32, resolve as resolve106, sep as sep33, win32 } from "node:path";
273827
273912
  import ts41 from "typescript";
273828
273913
  function readColorToken(tokens2, name) {
@@ -274045,7 +274130,7 @@ function writableTokensPath(contentDir2, location) {
274045
274130
  if (isAbsolute22(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
274046
274131
  throw new Error("--fix requires a token path inside the content directory without traversal.");
274047
274132
  }
274048
- const root = realpathSync21(contentDir2);
274133
+ const root = realpathSync22(contentDir2);
274049
274134
  const path2 = resolve106(root, location);
274050
274135
  const rel2 = relative32(root, path2);
274051
274136
  if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute22(rel2)) {
@@ -274060,7 +274145,7 @@ function writableTokensPath(contentDir2, location) {
274060
274145
  throw new Error("--fix requires a regular token file under directories without symlinks.");
274061
274146
  }
274062
274147
  }
274063
- const real = relative32(root, realpathSync21(path2));
274148
+ const real = relative32(root, realpathSync22(path2));
274064
274149
  if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute22(real)) {
274065
274150
  throw new Error("--fix cannot write outside the content directory.");
274066
274151
  }
@@ -274257,10 +274342,10 @@ function validateDesign(evidenceDir, contentDir2, options2 = {}) {
274257
274342
  };
274258
274343
  }
274259
274344
  function safeEvidencePath(contentDir2, name) {
274260
- const root = realpathSync21(contentDir2);
274345
+ const root = realpathSync22(contentDir2);
274261
274346
  const dir = realDirIn(root, ".himi/one-app");
274262
274347
  if (!dir) throw new Error("The design evidence directory is not a regular directory.");
274263
- const real = relative32(root, realpathSync21(dir));
274348
+ const real = relative32(root, realpathSync22(dir));
274264
274349
  if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute22(real)) {
274265
274350
  throw new Error("The design evidence directory is outside the content directory.");
274266
274351
  }
@@ -288033,7 +288118,7 @@ var init_credential_profile = __esm({
288033
288118
 
288034
288119
  // ../store-release/iap-credentials.ts
288035
288120
  import { createHash as createHash94 } from "node:crypto";
288036
- import { existsSync as existsSync152, readFileSync as readFileSync179, realpathSync as realpathSync22 } from "node:fs";
288121
+ import { existsSync as existsSync152, readFileSync as readFileSync179, realpathSync as realpathSync23 } from "node:fs";
288037
288122
  import { homedir as homedir19 } from "node:os";
288038
288123
  function accountFingerprint(keyId, issuerId) {
288039
288124
  return `sha256:${createHash94("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
@@ -288071,7 +288156,7 @@ function resolveIapCredentials(options2) {
288071
288156
  const { target } = options2;
288072
288157
  const home2 = options2.home ?? homedir19();
288073
288158
  const readFile26 = options2.readFile ?? ((p2) => readFileSync179(p2, "utf8"));
288074
- const realpath3 = options2.realpath ?? realpathSync22;
288159
+ const realpath3 = options2.realpath ?? realpathSync23;
288075
288160
  const profile = requireExplicitProfile(options2.profileFlag, target);
288076
288161
  const creds = resolveStoreCredentials({
288077
288162
  app: target.himiApp,
@@ -289452,7 +289537,7 @@ __export(store_iap_exports, {
289452
289537
  });
289453
289538
  import { execFileSync as execFileSync11 } from "node:child_process";
289454
289539
  import { randomUUID as randomUUID17 } from "node:crypto";
289455
- import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync64, readFileSync as readFileSync182, realpathSync as realpathSync23, renameSync as renameSync26, rmSync as rmSync48, writeFileSync as writeFileSync69 } from "node:fs";
289540
+ import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync64, readFileSync as readFileSync182, realpathSync as realpathSync24, renameSync as renameSync26, rmSync as rmSync48, writeFileSync as writeFileSync69 } from "node:fs";
289456
289541
  import { homedir as homedir20, hostname as hostname7 } from "node:os";
289457
289542
  import { dirname as dirname82, join as join193, resolve as resolve119 } from "node:path";
289458
289543
  function scrubDeep(value2, scrub) {
@@ -289852,7 +289937,7 @@ function readInAppPurchaseKey(flags, deps, creds) {
289852
289937
  if (!/^[A-Z0-9]{10}$/.test(keyId)) throw new UsageError10(`--iap-key-id must be the 10-character key id App Store Connect shows, got "${keyId}"`);
289853
289938
  let privateKey2;
289854
289939
  try {
289855
- assertCredentialOutsideRepo("--iap-key", (deps.realpath ?? realpathSync23)(path2));
289940
+ assertCredentialOutsideRepo("--iap-key", (deps.realpath ?? realpathSync24)(path2));
289856
289941
  privateKey2 = readInput2(deps, path2, "In-App Purchase key");
289857
289942
  } catch (error) {
289858
289943
  throw new KeyError(error.message);
@@ -297943,7 +298028,7 @@ import {
297943
298028
  openSync as openSync13,
297944
298029
  readFileSync as readFileSync195,
297945
298030
  readdirSync as readdirSync68,
297946
- realpathSync as realpathSync24,
298031
+ realpathSync as realpathSync25,
297947
298032
  renameSync as renameSync27,
297948
298033
  rmSync as rmSync49,
297949
298034
  statSync as statSync56,
@@ -298186,8 +298271,8 @@ async function l10nCommand(ctx) {
298186
298271
  try {
298187
298272
  mkdirSync66(join204(appDir3, "l10n"), { recursive: true });
298188
298273
  const swapped = unsafeDestination(appDir3, requested);
298189
- const l10nReal = realpathSync24(join204(appDir3, "l10n"));
298190
- if (swapped !== void 0 || l10nReal !== join204(realpathSync24(appDir3), "l10n")) {
298274
+ const l10nReal = realpathSync25(join204(appDir3, "l10n"));
298275
+ if (swapped !== void 0 || l10nReal !== join204(realpathSync25(appDir3), "l10n")) {
298191
298276
  throw new UnsafePath(swapped ?? `${join204(appDir3, "l10n")} resolves outside the app`);
298192
298277
  }
298193
298278
  for (const tag2 of requested) {
@@ -308117,7 +308202,7 @@ __export(cli_exports2, {
308117
308202
  ONE_APP_WORKFLOW: () => ONE_APP_WORKFLOW,
308118
308203
  runOneAppCommand: () => runOneAppCommand
308119
308204
  });
308120
- import { closeSync as closeSync15, constants as constants13, lstatSync as lstatSync45, mkdirSync as mkdirSync73, openSync as openSync14, readFileSync as readFileSync207, realpathSync as realpathSync25, writeFileSync as writeFileSync85 } from "node:fs";
308205
+ import { closeSync as closeSync15, constants as constants13, lstatSync as lstatSync45, mkdirSync as mkdirSync73, openSync as openSync14, readFileSync as readFileSync207, realpathSync as realpathSync26, writeFileSync as writeFileSync85 } from "node:fs";
308121
308206
  import { createHash as createHash107 } from "node:crypto";
308122
308207
  import { isIP as isIP2 } from "node:net";
308123
308208
  import { dirname as dirname93, join as join219, parse as parse13, resolve as resolve136 } from "node:path";
@@ -308373,7 +308458,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
308373
308458
  mkdirSync73(options2.parentDir, { recursive: true, mode: 448 });
308374
308459
  assertSafeParents(options2.parentDir);
308375
308460
  mkdirSync73(options2.workspace, { mode: 448 });
308376
- if (realpathSync25(options2.workspace) !== options2.workspace) throw new Error("destination changed");
308461
+ if (realpathSync26(options2.workspace) !== options2.workspace) throw new Error("destination changed");
308377
308462
  evidenceDir = join219(options2.workspace, ".himi", "one-app");
308378
308463
  mkdirSync73(evidenceDir, { recursive: true, mode: 448 });
308379
308464
  } catch (error) {
@@ -310668,7 +310753,7 @@ var init_customer_build = __esm({
310668
310753
  });
310669
310754
 
310670
310755
  // src/site-analyze/apply.ts
310671
- import { existsSync as existsSync176, readFileSync as readFileSync209, writeFileSync as writeFileSync86, copyFileSync as copyFileSync5, mkdirSync as mkdirSync74, realpathSync as realpathSync26, statSync as statSync58 } from "node:fs";
310756
+ import { existsSync as existsSync176, readFileSync as readFileSync209, writeFileSync as writeFileSync86, copyFileSync as copyFileSync5, mkdirSync as mkdirSync74, realpathSync as realpathSync27, statSync as statSync58 } from "node:fs";
310672
310757
  import { dirname as dirname94, isAbsolute as isAbsolute24, join as join221, resolve as resolve137, sep as sep36 } from "node:path";
310673
310758
  import { spawnSync as spawnSync15 } from "node:child_process";
310674
310759
  function inRepoBakeRefusal(repoRoot2, shell) {
@@ -311023,8 +311108,8 @@ function buildMergedContract(options2) {
311023
311108
  let real;
311024
311109
  let realRoot;
311025
311110
  try {
311026
- real = realpathSync26(from);
311027
- realRoot = realpathSync26(packageDir);
311111
+ real = realpathSync27(from);
311112
+ realRoot = realpathSync27(packageDir);
311028
311113
  } catch {
311029
311114
  return void 0;
311030
311115
  }
@@ -315054,7 +315139,7 @@ __export(fidelity_exports, {
315054
315139
  himalayaRepoRoot: () => himalayaRepoRoot
315055
315140
  });
315056
315141
  import { execFileSync as execFileSync13 } from "node:child_process";
315057
- import { existsSync as existsSync182, realpathSync as realpathSync27 } from "node:fs";
315142
+ import { existsSync as existsSync182, realpathSync as realpathSync28 } from "node:fs";
315058
315143
  import { join as join229, relative as relative41, sep as sep37 } from "node:path";
315059
315144
  function himalayaRepoRoot(dir) {
315060
315145
  let top;
@@ -315064,7 +315149,7 @@ function himalayaRepoRoot(dir) {
315064
315149
  return null;
315065
315150
  }
315066
315151
  if (!existsSync182(join229(top, "tools/judges/fidelity/JUDGE.md"))) return null;
315067
- const rel2 = relative41(realpathSync27(top), realpathSync27(dir));
315152
+ const rel2 = relative41(realpathSync28(top), realpathSync28(dir));
315068
315153
  return rel2.startsWith(`..${sep37}`) || rel2 === ".." ? null : top;
315069
315154
  }
315070
315155
  function fidelityEnvelope(report9) {