@wix/himalaya-cli 0.1881.0 → 0.1882.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 (50) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/app-info/src/index.d.ts +4 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/app-info.mjs +1 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +1 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +1 -0
  5. package/dist/cli.mjs +298 -229
  6. package/package.json +2 -2
  7. package/templates/beauty-salon-owner/config.ts +22 -4
  8. package/templates/beauty-salon-owner/dev/index.ts +2 -1
  9. package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  10. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  11. package/templates/community-club-owner/config.ts +22 -4
  12. package/templates/community-club-owner/dev/index.ts +2 -1
  13. package/templates/community-club-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  14. package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  15. package/templates/events-meetups-owner/config.ts +22 -4
  16. package/templates/events-meetups-owner/dev/index.ts +2 -1
  17. package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  18. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  19. package/templates/gym-fitness-owner/config.ts +22 -4
  20. package/templates/gym-fitness-owner/dev/index.ts +2 -1
  21. package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  22. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  23. package/templates/nonprofit-cause-owner/config.ts +22 -4
  24. package/templates/nonprofit-cause-owner/dev/index.ts +2 -1
  25. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  26. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  27. package/templates/owner-lite/config.ts +22 -4
  28. package/templates/owner-lite/dev/index.ts +2 -1
  29. package/templates/owner-lite/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  30. package/templates/owner-lite/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  31. package/templates/podcast-creator-owner/config.ts +22 -4
  32. package/templates/podcast-creator-owner/dev/index.ts +2 -1
  33. package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  34. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  35. package/templates/portfolio-creative-owner/config.ts +22 -4
  36. package/templates/portfolio-creative-owner/dev/index.ts +2 -1
  37. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  38. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  39. package/templates/restaurant-owner/config.ts +22 -4
  40. package/templates/restaurant-owner/dev/index.ts +2 -1
  41. package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  42. package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  43. package/templates/retail-store-owner/config.ts +22 -4
  44. package/templates/retail-store-owner/dev/index.ts +2 -1
  45. package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  46. package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
  47. package/templates/yoga-studio-owner/config.ts +22 -4
  48. package/templates/yoga-studio-owner/dev/index.ts +2 -1
  49. package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-availability.ts +48 -0
  50. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro/index.ts +33 -31
package/dist/cli.mjs CHANGED
@@ -4456,6 +4456,7 @@ var init_himi_package = __esm({
4456
4456
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
4457
4457
  var init_icon_catalog_generated = __esm({
4458
4458
  "../../core/ts/src/icon-catalog.generated.ts"() {
4459
+ "use strict";
4459
4460
  init_define_HHP_CATALOG();
4460
4461
  ICON_VIEW_BOX = 24;
4461
4462
  ICON_STROKE_WIDTH = 2;
@@ -41737,6 +41738,7 @@ function resolveIdiom(tokens2, ctx = {}) {
41737
41738
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
41738
41739
  var init_idiom = __esm({
41739
41740
  "../../core/ts/src/idiom.ts"() {
41741
+ "use strict";
41740
41742
  init_define_HHP_CATALOG();
41741
41743
  IDIOM_CONTEXTS = {
41742
41744
  ios: { native: ["ios"] },
@@ -189727,11 +189729,49 @@ var init_prebuild = __esm({
189727
189729
  }
189728
189730
  });
189729
189731
 
189732
+ // ../native-config/jvm-source.ts
189733
+ function stripJvmComments(text32) {
189734
+ let out2 = "";
189735
+ let i2 = 0;
189736
+ while (i2 < text32.length) {
189737
+ const c2 = text32[i2];
189738
+ const next = text32[i2 + 1];
189739
+ if (c2 === "/" && next === "/") {
189740
+ while (i2 < text32.length && text32[i2] !== "\n") i2++;
189741
+ } else if (c2 === "/" && next === "*") {
189742
+ const end2 = text32.indexOf("*/", i2 + 2);
189743
+ i2 = end2 < 0 ? text32.length : end2 + 2;
189744
+ out2 += " ";
189745
+ } else if (c2 === "`") {
189746
+ const end2 = text32.indexOf("`", i2 + 1);
189747
+ const j2 = end2 < 0 || text32.slice(i2, end2).includes("\n") ? i2 + 1 : end2 + 1;
189748
+ out2 += text32.slice(i2, j2);
189749
+ i2 = j2;
189750
+ } else if (c2 === '"' || c2 === "'") {
189751
+ const quote = text32.startsWith('"""', i2) ? '"""' : c2;
189752
+ let j2 = i2 + quote.length;
189753
+ while (j2 < text32.length && !text32.startsWith(quote, j2)) j2 += text32[j2] === "\\" && quote !== '"""' ? 2 : 1;
189754
+ j2 = Math.min(text32.length, j2 + quote.length);
189755
+ out2 += text32.slice(i2, j2);
189756
+ i2 = j2;
189757
+ } else {
189758
+ out2 += c2;
189759
+ i2++;
189760
+ }
189761
+ }
189762
+ return out2;
189763
+ }
189764
+ var init_jvm_source = __esm({
189765
+ "../native-config/jvm-source.ts"() {
189766
+ init_define_HHP_CATALOG();
189767
+ }
189768
+ });
189769
+
189730
189770
  // ../native-config/native-core.ts
189731
189771
  import { execFileSync as execFileSync4 } from "node:child_process";
189732
189772
  import { existsSync as existsSync77, mkdtempSync as mkdtempSync3, readFileSync as readFileSync84, rmSync as rmSync21, writeFileSync as writeFileSync31 } from "node:fs";
189733
189773
  import { tmpdir as tmpdir4 } from "node:os";
189734
- import { isAbsolute as isAbsolute9, join as join75, relative as relative17, resolve as resolve54, sep as sep22 } from "node:path";
189774
+ import { dirname as dirname43, isAbsolute as isAbsolute9, join as join75, relative as relative17, resolve as resolve54, sep as sep22 } from "node:path";
189735
189775
  function carrierGeneratedRoot(root, carrierInstallDir) {
189736
189776
  return resolve54(root, carrierInstallDir, "generated");
189737
189777
  }
@@ -189831,13 +189871,25 @@ function renderCompat(carrier, selection) {
189831
189871
  return JSON.parse(renderCompatText(carrier, selection));
189832
189872
  }
189833
189873
  function gradleProjectReferences(gradleText) {
189834
- const text32 = gradleText.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
189874
+ const text32 = stripJvmComments(gradleText);
189835
189875
  return [...text32.matchAll(/\bproject\s*\(\s*(?:path\s*[=:]\s*)?["'](:[^"']+)["'][^)]*\)/g)].map((m2) => {
189836
189876
  const wrapper = /\b(\w+)\s*\(\s*$/.exec(text32.slice(Math.max(0, m2.index - 200), m2.index));
189837
189877
  const closed = /^\s*\)/.test(text32.slice(m2.index + m2[0].length));
189838
189878
  return { config: wrapper && closed ? wrapper[1] : null, project: m2[1] };
189839
189879
  });
189840
189880
  }
189881
+ function assertTestkitDependenciesWired(testkits, closure, graph) {
189882
+ for (const id of testkits) {
189883
+ for (const dep of graph[id]?.platforms.android?.dependencies ?? []) {
189884
+ if (!closure.includes(dep.id)) {
189885
+ throw new Error(`native-core: testkit ${id} depends on Core module ${dep.id}, which is not in the selection's Android closure [${closure.join(", ")}]; add ${dep.id} to the selection, or drop the testkit`);
189886
+ }
189887
+ }
189888
+ }
189889
+ }
189890
+ function referencesTestingLibrary(gradleText) {
189891
+ return gradleProjectReferences(gradleText).some((r3) => r3.project === TESTING_ANDROID_PROJECT);
189892
+ }
189841
189893
  function satelliteAndroidApiProjects(gradleText) {
189842
189894
  return gradleProjectReferences(gradleText).filter((r3) => r3.config === "api").map((r3) => r3.project);
189843
189895
  }
@@ -189854,10 +189906,12 @@ function planNativeCore(adoption, opts = {}) {
189854
189906
  const graph = readGraph(carrier);
189855
189907
  const base2 = readSatelliteSelection(root, sat);
189856
189908
  const effective = deriveEffectiveSelection(base2, adoption, adapters, graph);
189857
- const closure = renderCompat(carrier, effective).selectedModules;
189909
+ const rendered = renderCompat(carrier, effective);
189910
+ const closure = rendered.selectedModules;
189858
189911
  const gradlePath = join75(root, sat.android.dir, "build.gradle.kts");
189859
189912
  if (!existsSync77(gradlePath)) throw new Error(`native-core: the satellite's Android build file ${sat.android.dir}/build.gradle.kts does not exist`);
189860
- const referenced = satelliteAndroidApiProjects(readFileSync84(gradlePath, "utf8")).map((p2) => p2.replace(/^:/, ""));
189913
+ const satelliteGradle = readFileSync84(gradlePath, "utf8");
189914
+ const referenced = satelliteAndroidApiProjects(satelliteGradle).map((p2) => p2.replace(/^:/, ""));
189861
189915
  const satelliteClosure = referenced.length ? renderCompat(carrier, { ...base2, selectedModules: { ios: [], android: referenced } }).selectedModules.android : [];
189862
189916
  const diff = equalSets(satelliteClosure, closure.android);
189863
189917
  if (diff.missing.length || diff.extra.length) {
@@ -189866,7 +189920,12 @@ function planNativeCore(adoption, opts = {}) {
189866
189920
  );
189867
189921
  }
189868
189922
  const androidIncludes = [{ project: sat.android.project, dir: sat.android.dir, origin: "satellite" }];
189869
- for (const id of closure.android) {
189923
+ if (referencesTestingLibrary(satelliteGradle)) {
189924
+ androidIncludes.push({ project: TESTING_ANDROID_PROJECT, dir: `${dirname43(sat.android.dir)}/${TESTING_ANDROID_DIR_NAME}`, origin: "satellite" });
189925
+ }
189926
+ const testkits = rendered.testkitModules?.android ?? [];
189927
+ assertTestkitDependenciesWired(testkits, closure.android, graph);
189928
+ for (const id of [...closure.android, ...testkits]) {
189870
189929
  const carrierPath = graph[id]?.platforms.android?.carrierPath;
189871
189930
  if (!carrierPath) throw new Error(`native-core: the carrier's dependency graph has no Android carrierPath for ${JSON.stringify(id)}`);
189872
189931
  androidIncludes.push({ project: `:${id}`, dir: `${sat.carrierInstallDir}/generated/${carrierPath}`, origin: "core" });
@@ -189920,13 +189979,16 @@ function assertNoSettingsCollision(plan, settingsWithoutBlock, where) {
189920
189979
  throw new Error(`native-core: ${where}: ${problems.join("; ")}. A Core project id is a root-level Gradle path; rename or remove the colliding entry.`);
189921
189980
  }
189922
189981
  }
189923
- var CARRIER_GENERATED_SEGMENT, compatCache, sorted2;
189982
+ var CARRIER_GENERATED_SEGMENT, TESTING_ANDROID_PROJECT, TESTING_ANDROID_DIR_NAME, compatCache, sorted2;
189924
189983
  var init_native_core2 = __esm({
189925
189984
  "../native-config/native-core.ts"() {
189926
189985
  init_define_HHP_CATALOG();
189927
189986
  init_src2();
189928
189987
  init_paths();
189988
+ init_jvm_source();
189929
189989
  CARRIER_GENERATED_SEGMENT = "/node_modules/@wix/mobile-native-core/generated/";
189990
+ TESTING_ANDROID_PROJECT = ":himalaya-wix-native-core-testing";
189991
+ TESTING_ANDROID_DIR_NAME = "himalaya-wix-native-core-testing";
189930
189992
  compatCache = /* @__PURE__ */ new Map();
189931
189993
  sorted2 = (xs2) => [...new Set(xs2)].sort();
189932
189994
  }
@@ -190187,7 +190249,7 @@ var init_swiftpm_manifest = __esm({
190187
190249
  import { execFileSync as execFileSync5 } from "node:child_process";
190188
190250
  import { existsSync as existsSync79, readdirSync as readdirSync39, readFileSync as readFileSync86 } from "node:fs";
190189
190251
  import { createRequire as createRequire6 } from "node:module";
190190
- import { basename as basename20, dirname as dirname43, join as join77, resolve as resolve56 } from "node:path";
190252
+ import { basename as basename20, dirname as dirname44, join as join77, resolve as resolve56 } from "node:path";
190191
190253
  function loadYaml(text32) {
190192
190254
  yamlLoad ??= createRequire6(import.meta.url)("js-yaml").load;
190193
190255
  return yamlLoad(text32);
@@ -190232,37 +190294,6 @@ function coreIosModules(graph) {
190232
190294
  function coreAndroidProjects(graph) {
190233
190295
  return new Set(Object.entries(graph).filter(([, m2]) => m2.platforms.android?.carrierPath).map(([id]) => id));
190234
190296
  }
190235
- function stripJvmComments(text32) {
190236
- let out2 = "";
190237
- let i2 = 0;
190238
- while (i2 < text32.length) {
190239
- const c2 = text32[i2];
190240
- const next = text32[i2 + 1];
190241
- if (c2 === "/" && next === "/") {
190242
- while (i2 < text32.length && text32[i2] !== "\n") i2++;
190243
- } else if (c2 === "/" && next === "*") {
190244
- const end2 = text32.indexOf("*/", i2 + 2);
190245
- i2 = end2 < 0 ? text32.length : end2 + 2;
190246
- out2 += " ";
190247
- } else if (c2 === "`") {
190248
- const end2 = text32.indexOf("`", i2 + 1);
190249
- const j2 = end2 < 0 || text32.slice(i2, end2).includes("\n") ? i2 + 1 : end2 + 1;
190250
- out2 += text32.slice(i2, j2);
190251
- i2 = j2;
190252
- } else if (c2 === '"' || c2 === "'") {
190253
- const quote = text32.startsWith('"""', i2) ? '"""' : c2;
190254
- let j2 = i2 + quote.length;
190255
- while (j2 < text32.length && !text32.startsWith(quote, j2)) j2 += text32[j2] === "\\" && quote !== '"""' ? 2 : 1;
190256
- j2 = Math.min(text32.length, j2 + quote.length);
190257
- out2 += text32.slice(i2, j2);
190258
- i2 = j2;
190259
- } else {
190260
- out2 += c2;
190261
- i2++;
190262
- }
190263
- }
190264
- return out2;
190265
- }
190266
190297
  function stripSwiftComments(text32) {
190267
190298
  let out2 = "";
190268
190299
  let i2 = 0;
@@ -190368,38 +190399,38 @@ function xcodegenTargets(text32) {
190368
190399
  return doc && typeof doc === "object" && doc.targets && typeof doc.targets === "object" ? doc.targets : {};
190369
190400
  }
190370
190401
  function testSupportProblems(files) {
190371
- const problems = [];
190372
- for (const f2 of files) {
190373
- if (!f2.text.includes(TEST_SUPPORT_PRODUCT)) continue;
190374
- if (isProjectYml(f2.path)) {
190375
- let targets;
190376
- try {
190377
- targets = xcodegenTargets(f2.text);
190378
- } catch (e2) {
190379
- problems.push(`${f2.path}: names ${TEST_SUPPORT_PRODUCT} but cannot be parsed as YAML (${e2.message}), so the test-only rule cannot be proven`);
190380
- continue;
190381
- }
190382
- for (const [name, t2] of Object.entries(targets)) {
190383
- const links = (t2.dependencies ?? []).some((d2) => d2 && (d2.product === TEST_SUPPORT_PRODUCT || d2.package === TEST_SUPPORT_PRODUCT));
190384
- if (links && !TEST_TARGET_TYPE.test(t2.type ?? "")) {
190385
- problems.push(`${f2.path}: target ${name} (type ${t2.type ?? "unset"}) links ${TEST_SUPPORT_PRODUCT}; only test targets (bundle.unit-test, bundle.ui-testing) may \u2014 a production target would ship test doubles`);
190386
- }
190387
- }
190388
- } else if (isPackageSwift(f2.path)) {
190389
- try {
190390
- const m2 = manifestFromSource(f2.text, dirname43(f2.path));
190391
- for (const t2 of m2.targets) {
190392
- const links = t2.dependencies.some((d2) => "product" in d2 && d2.product[0] === TEST_SUPPORT_PRODUCT);
190393
- if (links && t2.type !== "test") {
190394
- problems.push(`${f2.path}: target ${t2.name} (${t2.type}) depends on the ${TEST_SUPPORT_PRODUCT} product; only .testTarget may`);
190395
- }
190396
- }
190397
- } catch (e2) {
190398
- problems.push(`${f2.path}: names ${TEST_SUPPORT_PRODUCT} but its manifest cannot be read (${e2.message}), so the test-only rule cannot be proven`);
190399
- }
190400
- }
190402
+ return files.flatMap((f2) => [
190403
+ ...TEST_SUPPORT_PRODUCTS.flatMap((product2) => f2.text.includes(product2) ? productLinkProblems(f2, product2) : []),
190404
+ ...isGradleBuild(f2.path) ? testingLibraryReferenceProblems(f2) : []
190405
+ ]);
190406
+ }
190407
+ function productLinkProblems(f2, product2) {
190408
+ if (isProjectYml(f2.path)) return projectYmlLinkProblems(f2, product2);
190409
+ if (isPackageSwift(f2.path)) return packageSwiftLinkProblems(f2, product2);
190410
+ return [];
190411
+ }
190412
+ function projectYmlLinkProblems(f2, product2) {
190413
+ let targets;
190414
+ try {
190415
+ targets = xcodegenTargets(f2.text);
190416
+ } catch (e2) {
190417
+ return [`${f2.path}: names ${product2} but cannot be parsed as YAML (${e2.message}), so the test-only rule cannot be proven`];
190401
190418
  }
190402
- return problems;
190419
+ return Object.entries(targets).filter(([, t2]) => (t2.dependencies ?? []).some((d2) => d2 && (d2.product === product2 || d2.package === product2)) && !TEST_TARGET_TYPE.test(t2.type ?? "")).map(([name, t2]) => `${f2.path}: target ${name} (type ${t2.type ?? "unset"}) links ${product2}; only test targets (bundle.unit-test, bundle.ui-testing) may \u2014 a production target would ship test doubles`);
190420
+ }
190421
+ function packageSwiftLinkProblems(f2, product2) {
190422
+ try {
190423
+ return manifestFromSource(f2.text, dirname44(f2.path)).targets.filter((t2) => t2.type !== "test" && t2.dependencies.some((d2) => "product" in d2 && d2.product[0] === product2)).map((t2) => `${f2.path}: target ${t2.name} (${t2.type}) depends on the ${product2} product; only .testTarget may`);
190424
+ } catch (e2) {
190425
+ return [`${f2.path}: names ${product2} but its manifest cannot be read (${e2.message}), so the test-only rule cannot be proven`];
190426
+ }
190427
+ }
190428
+ function testingLibraryReferenceProblems(f2) {
190429
+ return testingLibraryConfigurations(f2.text).filter((config) => !(config && TEST_CONFIGURATION.test(config))).map((config) => `${f2.path}: ${config ?? ""}(project("${TESTING_ANDROID_PROJECT}")): the testing library may be referenced only from a test configuration (testImplementation, androidTestImplementation); a production configuration would ship test doubles`);
190430
+ }
190431
+ function testingLibraryConfigurations(text32) {
190432
+ const unwrapped = [...stripJvmComments(text32).matchAll(UNWRAPPED_TESTING_REFERENCE)].map((m2) => m2[1] ?? m2[2]);
190433
+ return gradleProjectReferences(text32).filter((r3) => r3.project === TESTING_ANDROID_PROJECT).map((r3) => r3.config && r3.config !== "add" ? r3.config : unwrapped.shift() ?? null);
190403
190434
  }
190404
190435
  function xcodegenProject(text32) {
190405
190436
  const doc = loadYaml(text32);
@@ -190449,12 +190480,17 @@ function directCoreProblems(file2, pods) {
190449
190480
  }
190450
190481
  return problems;
190451
190482
  }
190452
- var yamlLoad, TEST_SUPPORT_PRODUCT, SATELLITE_WORKSPACE_PREFIX, SKIP_DIRS, isProjectYml, isPackageSwift, isSwift, isGradleBuild, isJvmSource, CORE_ANDROID_PACKAGE, wordAround, GRADLE_PROJECT_REF, CORE_PACKAGE_WORD, JVM_CORE_IMPORT, JVM_CORE_REFERENCE, SWIFT_IMPORT, TEST_TARGET_TYPE;
190483
+ var yamlLoad, TEST_SUPPORT_PRODUCT, TESTING_PRODUCT, TEST_SUPPORT_PRODUCTS, SATELLITE_WORKSPACE_PREFIX, SKIP_DIRS, isProjectYml, isPackageSwift, isSwift, isGradleBuild, isJvmSource, CORE_ANDROID_PACKAGE, wordAround, GRADLE_PROJECT_REF, CORE_PACKAGE_WORD, JVM_CORE_IMPORT, JVM_CORE_REFERENCE, SWIFT_IMPORT, TEST_TARGET_TYPE, TEST_CONFIGURATION, UNWRAPPED_TESTING_REFERENCE;
190453
190484
  var init_native_core_guards = __esm({
190454
190485
  "../native-config/native-core-guards.ts"() {
190455
190486
  init_define_HHP_CATALOG();
190456
190487
  init_swiftpm_manifest();
190488
+ init_native_core2();
190489
+ init_jvm_source();
190490
+ init_jvm_source();
190457
190491
  TEST_SUPPORT_PRODUCT = "HimalayaWixNativeCoreTestSupport";
190492
+ TESTING_PRODUCT = "HimalayaWixNativeCoreTesting";
190493
+ TEST_SUPPORT_PRODUCTS = [TEST_SUPPORT_PRODUCT, TESTING_PRODUCT];
190458
190494
  SATELLITE_WORKSPACE_PREFIX = "stdlib/wix-native-core/";
190459
190495
  SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "build", "Pods", "DerivedData", ".gradle", ".swiftpm", ".build"]);
190460
190496
  isProjectYml = (p2) => basename20(p2) === "project.yml";
@@ -190470,6 +190506,11 @@ var init_native_core_guards = __esm({
190470
190506
  JVM_CORE_REFERENCE = new RegExp(`(?<![A-Za-z0-9_.])(${CORE_PACKAGE_WORD}(?![A-Za-z0-9_])(?:\\.[A-Za-z_][A-Za-z0-9_]*)*)`);
190471
190507
  SWIFT_IMPORT = /^[ \t]*(?:@[A-Za-z_][A-Za-z0-9_]*(?:\([^)\n]*\))?\s+)*(?:(?:public|package|internal|fileprivate|private)\s+)?import\s+(?:(?:struct|class|enum|protocol|func|var|let|typealias)\s+)?([A-Za-z_][A-Za-z0-9_]*)/gm;
190472
190508
  TEST_TARGET_TYPE = /^bundle\.(?:unit-test|ui-testing)$/;
190509
+ TEST_CONFIGURATION = /^(?:test|androidTest)(?!Fixtures)(?:[A-Z][A-Za-z0-9]*)?(?:Implementation|CompileOnly|RuntimeOnly)$/;
190510
+ UNWRAPPED_TESTING_REFERENCE = new RegExp(
190511
+ `(?:\\badd\\s*\\(\\s*["'](\\w+)["']\\s*,\\s*|\\b(\\w+)\\s+)project\\s*\\(\\s*(?:path\\s*[:=]\\s*)?["']${TESTING_ANDROID_PROJECT}["']`,
190512
+ "g"
190513
+ );
190473
190514
  }
190474
190515
  });
190475
190516
 
@@ -190477,7 +190518,7 @@ var init_native_core_guards = __esm({
190477
190518
  import { spawnSync as spawnSync8 } from "node:child_process";
190478
190519
  import { existsSync as existsSync80, mkdtempSync as mkdtempSync4, readFileSync as readFileSync87, rmSync as rmSync22, writeFileSync as writeFileSync32 } from "node:fs";
190479
190520
  import { tmpdir as tmpdir5 } from "node:os";
190480
- import { basename as basename21, dirname as dirname44, join as join78 } from "node:path";
190521
+ import { basename as basename21, dirname as dirname45, join as join78 } from "node:path";
190481
190522
  function blank2(app2) {
190482
190523
  return {
190483
190524
  app: app2,
@@ -190508,16 +190549,17 @@ function readIosSatellite(root, dirRel, pods, testkitPods, carrierInstallDir) {
190508
190549
  out2.problems.push(`${dirRel}/Package.swift cannot be read statically (${message2(e2)}); the satellite manifest must stay in the simple subset the shared parser reads, so its products can be proven`);
190509
190550
  return out2;
190510
190551
  }
190552
+ const testOnly = testOnlyTargets(manifest2);
190511
190553
  const local = manifest2.dependencies.flatMap((d2) => "fileSystem" in d2 ? d2.fileSystem : []);
190512
190554
  const generated = carrierGeneratedRoot(root, carrierInstallDir);
190513
190555
  const corePackage = join78(generated, "ios");
190514
190556
  const adapterRoot = join78(generated, "ios-adapters");
190515
- const adapters = new Set(local.filter((p2) => dirname44(p2.path) === adapterRoot).map((p2) => basename21(p2.path).toLowerCase()));
190557
+ const adapters = new Set(local.filter((p2) => dirname45(p2.path) === adapterRoot).map((p2) => basename21(p2.path).toLowerCase()));
190516
190558
  for (const p2 of local) {
190517
190559
  const atCore = p2.path === corePackage;
190518
190560
  if (p2.identity === "ios" && !atCore) {
190519
190561
  out2.problems.push(`${dirRel}/Package.swift: local package ${p2.path} has the SwiftPM identity "ios", which belongs to the carrier's core package (${corePackage})`);
190520
- } else if (!atCore && dirname44(p2.path) !== adapterRoot && (p2.path.includes("mobile-native-core/generated") || isInside(generated, p2.path))) {
190562
+ } else if (!atCore && dirname45(p2.path) !== adapterRoot && (p2.path.includes("mobile-native-core/generated") || isInside(generated, p2.path))) {
190521
190563
  out2.problems.push(`${dirRel}/Package.swift: local package ${p2.path} points into a Native Core carrier but is neither ${corePackage} nor a package directly under ${adapterRoot}`);
190522
190564
  }
190523
190565
  }
@@ -190530,8 +190572,9 @@ function readIosSatellite(root, dirRel, pods, testkitPods, carrierInstallDir) {
190530
190572
  if (pods.has(name)) out2.problems.push(`${dirRel}/Package.swift: target ${t2.name} links Core product ${name} through package ${JSON.stringify(pkg)}, which is neither WixNativeCore nor an ios-adapters package`);
190531
190573
  continue;
190532
190574
  }
190575
+ const isTestOnly = t2.type === "test" || testOnly.has(t2.name);
190533
190576
  if (testkitPods.has(name)) {
190534
- if (t2.type === "test") out2.testkits.push(name);
190577
+ if (isTestOnly) out2.testkits.push(name);
190535
190578
  else out2.problems.push(`${dirRel}/Package.swift: non-test target ${t2.name} links testkit product ${name}; testkits may only be linked by a .testTarget`);
190536
190579
  continue;
190537
190580
  }
@@ -190539,7 +190582,7 @@ function readIosSatellite(root, dirRel, pods, testkitPods, carrierInstallDir) {
190539
190582
  out2.problems.push(`${dirRel}/Package.swift: target ${t2.name} links ${name} from the Core package, which is not a product in the carrier's dependency graph (podModuleName)`);
190540
190583
  continue;
190541
190584
  }
190542
- if (t2.type !== "test") out2.products.push(name);
190585
+ if (!isTestOnly) out2.products.push(name);
190543
190586
  }
190544
190587
  }
190545
190588
  return out2;
@@ -190561,6 +190604,31 @@ function satelliteAndroidRuleProblems(gradleText, graph, androidTestkits) {
190561
190604
  }
190562
190605
  return problems;
190563
190606
  }
190607
+ function testOnlyTargets(manifest2) {
190608
+ const names2 = new Set(manifest2.targets.map((t2) => t2.name));
190609
+ const depsOf = new Map(manifest2.targets.map((t2) => [t2.name, t2.dependencies.flatMap((d2) => "byName" in d2 ? [d2.byName[0]] : "target" in d2 ? [d2.target[0]] : []).filter((n2) => names2.has(n2))]));
190610
+ const production = /* @__PURE__ */ new Set();
190611
+ const visit = (t2) => {
190612
+ if (production.has(t2)) return;
190613
+ production.add(t2);
190614
+ for (const d2 of depsOf.get(t2) ?? []) visit(d2);
190615
+ };
190616
+ manifest2.products.filter((p2) => p2.name !== TESTING_PRODUCT).forEach((p2) => p2.targets.forEach(visit));
190617
+ return new Set(manifest2.products.filter((p2) => p2.name === TESTING_PRODUCT).flatMap((p2) => p2.targets).filter((t2) => !production.has(t2)));
190618
+ }
190619
+ function testingAndroidRuleProblems(root, sat, graph, androidTestkits) {
190620
+ const rel2 = `${dirname45(sat.android.dir)}/${TESTING_ANDROID_DIR_NAME}/build.gradle.kts`;
190621
+ const file2 = join78(root, rel2);
190622
+ if (!existsSync80(file2)) return [];
190623
+ return gradleProjectReferences(readFileSync87(file2, "utf8")).flatMap((ref) => {
190624
+ const id = ref.project.replace(/^:/, "");
190625
+ const mod = graph[id];
190626
+ const at2 = `${rel2}: ${ref.config ?? ""}(project("${ref.project}"))`;
190627
+ if (!mod) return [];
190628
+ if (!mod.testkit) return [`${at2}: the testing library reaches production Core only through the satellite (${sat.android.project})`];
190629
+ return androidTestkits.includes(id) ? [] : [`${rel2}: testkit ${id} is not declared in the selection's testkitModules.android`];
190630
+ });
190631
+ }
190564
190632
  function firstDifference(expected, actual) {
190565
190633
  const e2 = expected.split("\n");
190566
190634
  const a3 = actual.split("\n");
@@ -190664,6 +190732,7 @@ function checkNativeCoreSatellite(opts = {}) {
190664
190732
  if (diff.missing.length || diff.extra.length) r3.ios.ok = false;
190665
190733
  }
190666
190734
  problems.push(...satelliteAndroidRuleProblems(gradleText, graph, expected.testkit.android));
190735
+ problems.push(...testingAndroidRuleProblems(root, sat, graph, expected.testkit.android));
190667
190736
  runGuards(r3, root, opts.files, pods, problems, coreAndroidProjects(graph));
190668
190737
  return r3;
190669
190738
  }
@@ -190759,7 +190828,7 @@ function checkNativeCore(app2, opts = {}) {
190759
190828
  r3.android = runCarrierAndroidCheck(carrier, effective, settingsPath);
190760
190829
  problems.push(
190761
190830
  ...settingsCoreIdProblems(readFileSync87(settingsPath, "utf8"), graph, `apps/${app2}/android/settings.gradle.kts`, {
190762
- settingsDir: dirname44(settingsPath),
190831
+ settingsDir: dirname45(settingsPath),
190763
190832
  root,
190764
190833
  carrierInstallDir: sat.carrierInstallDir
190765
190834
  })
@@ -191371,7 +191440,7 @@ __export(gen_native_config_exports, {
191371
191440
  yamlScalar: () => yamlScalar
191372
191441
  });
191373
191442
  import { existsSync as existsSync81, mkdirSync as mkdirSync34, readFileSync as readFileSync89, readdirSync as readdirSync40, rmSync as rmSync23, statSync as statSync23, writeFileSync as writeFileSync34 } from "node:fs";
191374
- import { dirname as dirname45, join as join79 } from "node:path";
191443
+ import { dirname as dirname46, join as join79 } from "node:path";
191375
191444
  import { fileURLToPath as fileURLToPath30 } from "node:url";
191376
191445
  import ts18 from "typescript";
191377
191446
  function withoutComments(src) {
@@ -192023,7 +192092,7 @@ function androidSettingsGradle(app2) {
192023
192092
  return join79(appDir(app2), "android", "settings.gradle.kts");
192024
192093
  }
192025
192094
  function androidAppGradle(app2) {
192026
- return join79(dirname45(androidManifestPath2(app2)), "..", "..", "build.gradle.kts");
192095
+ return join79(dirname46(androidManifestPath2(app2)), "..", "..", "build.gradle.kts");
192027
192096
  }
192028
192097
  function androidManifestPath2(app2) {
192029
192098
  const androidDir = join79(appDir(app2), "android");
@@ -192033,7 +192102,7 @@ function androidManifestPath2(app2) {
192033
192102
  return candidates.length === 1 ? candidates[0] : preferred;
192034
192103
  }
192035
192104
  function automotiveAppDescPath(app2) {
192036
- return join79(dirname45(androidManifestPath2(app2)), "res", "xml", "automotive_app_desc.xml");
192105
+ return join79(dirname46(androidManifestPath2(app2)), "res", "xml", "automotive_app_desc.xml");
192037
192106
  }
192038
192107
  function applyToFile(path2, kind, label4, render3, check) {
192039
192108
  if (!existsSync81(path2)) return { path: path2, outcome: "skipped" };
@@ -192063,7 +192132,7 @@ function applyWholeFile(path2, content, check) {
192063
192132
  const current = existsSync81(path2) ? readFileSync89(path2, "utf8") : null;
192064
192133
  if (current === content) return { path: path2, outcome: "unchanged" };
192065
192134
  if (check) return { path: path2, outcome: "drift" };
192066
- mkdirSync34(dirname45(path2), { recursive: true });
192135
+ mkdirSync34(dirname46(path2), { recursive: true });
192067
192136
  writeFileSync34(path2, content);
192068
192137
  return { path: path2, outcome: "written" };
192069
192138
  }
@@ -192082,8 +192151,8 @@ function storeAdoptPaths(app2) {
192082
192151
  iosYml: iosProjectYml(app2),
192083
192152
  storeSpec: iosStoreSpec(app2),
192084
192153
  manifest: manifest2,
192085
- storeManifest: join79(dirname45(manifest2), "..", "..", STORE_MANIFEST_REL),
192086
- legacyReleaseManifest: join79(dirname45(manifest2), "..", "release", "AndroidManifest.xml"),
192154
+ storeManifest: join79(dirname46(manifest2), "..", "..", STORE_MANIFEST_REL),
192155
+ legacyReleaseManifest: join79(dirname46(manifest2), "..", "release", "AndroidManifest.xml"),
192087
192156
  gradle: androidAppGradle(app2)
192088
192157
  };
192089
192158
  }
@@ -192257,19 +192326,19 @@ function appSourceRoot(projectYmlPath, platform) {
192257
192326
  if (!existsSync81(projectYmlPath)) return void 0;
192258
192327
  const project = load5(readFileSync89(projectYmlPath, "utf8"));
192259
192328
  const main4 = Object.values(project.targets ?? {}).find((t2) => t2.type === "application" && t2.platform === platform);
192260
- const iosDir = dirname45(projectYmlPath);
192329
+ const iosDir = dirname46(projectYmlPath);
192261
192330
  const root = main4?.sources?.map((s5) => typeof s5 === "string" ? s5 : s5.path).find((p2) => p2 && existsSync81(join79(iosDir, p2, "Info.plist")));
192262
192331
  return root ? join79(iosDir, root) : void 0;
192263
192332
  }
192264
192333
  function coreExtensionSourceRoots(projectYmlPath) {
192265
192334
  if (!existsSync81(projectYmlPath)) return [];
192266
192335
  const project = load5(readFileSync89(projectYmlPath, "utf8"));
192267
- const dir = dirname45(projectYmlPath);
192336
+ const dir = dirname46(projectYmlPath);
192268
192337
  const roots2 = [];
192269
192338
  for (const t2 of Object.values(project.targets ?? {})) {
192270
192339
  if (t2.type !== "app-extension" || !(t2.dependencies ?? []).some((d2) => /^HimalayaCore/.test(d2.product ?? d2.package ?? ""))) continue;
192271
192340
  const paths2 = (t2.sources ?? []).map((s5) => typeof s5 === "string" ? s5 : s5.path).filter((p2) => !!p2);
192272
- const infoDir = t2.info?.path ? dirname45(t2.info.path) : void 0;
192341
+ const infoDir = t2.info?.path ? dirname46(t2.info.path) : void 0;
192273
192342
  const root = paths2.find((p2) => p2 === infoDir) ?? paths2.find((p2) => existsSync81(join79(dir, p2)) && statSync23(join79(dir, p2)).isDirectory());
192274
192343
  if (!root) throw new Error(`${projectYmlPath}: app extension linking HimalayaCore has no source directory to bundle its privacy manifest from`);
192275
192344
  roots2.push(join79(dir, root));
@@ -192442,7 +192511,7 @@ function genNativeConfig(app2, opts = {}) {
192442
192511
  applyModuleFlags(iosProjectYml(app2), moduleLinks.iosLinked(), check),
192443
192512
  // Model B, `url:` form: the trait selector package that enables the linked satellites' traits
192444
192513
  // in the published package (#4129). Removed when the app links none, or is not in that form.
192445
- applyTraitSelector(join79(dirname45(iosProjectYml(app2)), BINARY_CORE_IOS_TRAIT_SELECTOR, "Package.swift"), moduleLinks.iosTraitSelector(), check),
192514
+ applyTraitSelector(join79(dirname46(iosProjectYml(app2)), BINARY_CORE_IOS_TRAIT_SELECTOR, "Package.swift"), moduleLinks.iosTraitSelector(), check),
192446
192515
  // macOS (RFC 0046) reuses the iOS boot, so it links the same macOS-capable modules.
192447
192516
  applyToFile(macosProjectYml(app2), "yaml", LABEL_MODULES_IOS_PACKAGE, (i2) => renderModulesIosPackage(modules.macos, i2), check),
192448
192517
  applyToFile(macosProjectYml(app2), "yaml", LABEL_MODULES_IOS_LINK, (i2) => renderModulesIosLink(modules.macos, i2), check),
@@ -192534,9 +192603,9 @@ function genNativeConfig(app2, opts = {}) {
192534
192603
  const plan = live4;
192535
192604
  files.push(applyToFile(iosYml, "yaml", LABEL_LIVE_TARGET, (i2) => plan.target.map((line) => i2 + line), check));
192536
192605
  files.push(applyToFile(iosYml, "yaml", LABEL_LIVE_EMBED, (i2) => plan.embed.map((line) => i2 + line), check));
192537
- const source2 = join79(dirname45(iosYml), LIVE_SOURCE_PATH);
192606
+ const source2 = join79(dirname46(iosYml), LIVE_SOURCE_PATH);
192538
192607
  files.push(plan.source ? applyWholeFile(source2, plan.source, check) : removeWholeFile(source2, check));
192539
- const entitlements = join79(dirname45(iosYml), LIVE_ENTITLEMENTS_PATH);
192608
+ const entitlements = join79(dirname46(iosYml), LIVE_ENTITLEMENTS_PATH);
192540
192609
  files.push(plan.entitlements ? applyWholeFile(entitlements, plan.entitlements, check) : removeWholeFile(entitlements, check));
192541
192610
  }
192542
192611
  const iosSplashManaged = existsSync81(iosYml) && hasMarkers(readFileSync89(iosYml, "utf8"), "yaml", LABEL_IOS_SPLASH);
@@ -192555,10 +192624,10 @@ function genNativeConfig(app2, opts = {}) {
192555
192624
  for (const root of sourceRoots) files.push(applyWholeFile(join79(root, "PrivacyInfo.xcprivacy"), renderPrivacyManifest(root === iosRoot ? iosPlan : plan), check));
192556
192625
  }
192557
192626
  if (targetManaged) {
192558
- const manifest3 = join79(dirname45(iosYml), LIVE_PRIVACY_MANIFEST_PATH);
192627
+ const manifest3 = join79(dirname46(iosYml), LIVE_PRIVACY_MANIFEST_PATH);
192559
192628
  files.push(live4.source ? applyWholeFile(manifest3, renderPrivacyManifest(privacyPlanFor([])), check) : removeWholeFile(manifest3, check));
192560
192629
  }
192561
- const liveRoot = join79(dirname45(iosYml), dirname45(LIVE_PRIVACY_MANIFEST_PATH));
192630
+ const liveRoot = join79(dirname46(iosYml), dirname46(LIVE_PRIVACY_MANIFEST_PATH));
192562
192631
  for (const yml of [iosYml, macosProjectYml(app2)]) {
192563
192632
  for (const root of coreExtensionSourceRoots(yml)) {
192564
192633
  if (targetManaged && root === liveRoot) continue;
@@ -192632,7 +192701,7 @@ var init_gen_native_config = __esm({
192632
192701
  FROM_APP_PLATFORM_DIR = "../../../";
192633
192702
  linkedFlag = (product2) => `HIMALAYA_LINKED_${product2}`;
192634
192703
  CORE_ANDROID_CAPABILITY_MODULES = join79(
192635
- dirname45(fileURLToPath30(import.meta.url)),
192704
+ dirname46(fileURLToPath30(import.meta.url)),
192636
192705
  "../../core/runtime/android/io/himalaya/core/src/main/kotlin/io/himalaya/core/CapabilityModules.kt"
192637
192706
  );
192638
192707
  ANDROID_MAX_DEPTH = 16;
@@ -193911,7 +193980,7 @@ __export(base44_types_exports, {
193911
193980
  writeBase44Types: () => writeBase44Types
193912
193981
  });
193913
193982
  import { existsSync as existsSync83, mkdirSync as mkdirSync35, readFileSync as readFileSync91, writeFileSync as writeFileSync35 } from "node:fs";
193914
- import { dirname as dirname46, join as join81 } from "node:path";
193983
+ import { dirname as dirname47, join as join81 } from "node:path";
193915
193984
  function logicalName(spec) {
193916
193985
  return (isAdoptedEntity(spec) ? spec.base44Name : spec.name) ?? "";
193917
193986
  }
@@ -193992,7 +194061,7 @@ async function writeBase44Types(dir, app2) {
193992
194061
  const path2 = join81(dir, BASE44_TYPES_PATH);
193993
194062
  const changed = !existsSync83(path2) || readFileSync91(path2, "utf8") !== text32;
193994
194063
  if (changed) {
193995
- mkdirSync35(dirname46(path2), { recursive: true });
194064
+ mkdirSync35(dirname47(path2), { recursive: true });
193996
194065
  writeFileSync35(path2, text32);
193997
194066
  }
193998
194067
  return { path: path2, changed, entities: text32.split("\nexport const ").length - 1 };
@@ -194508,7 +194577,7 @@ __export(eject_exports, {
194508
194577
  ejectModule: () => ejectModule
194509
194578
  });
194510
194579
  import { existsSync as existsSync85, mkdirSync as mkdirSync36, readFileSync as readFileSync93, writeFileSync as writeFileSync36 } from "node:fs";
194511
- import { dirname as dirname47, join as join83, relative as relative18, resolve as resolve58, sep as sep23 } from "node:path";
194580
+ import { dirname as dirname48, join as join83, relative as relative18, resolve as resolve58, sep as sep23 } from "node:path";
194512
194581
  function locate(repoRootOrCwd, mod) {
194513
194582
  const inRepo = resolve58(repoRootOrCwd, `stdlib/flows/${mod}/src/index.ts`);
194514
194583
  if (existsSync85(inRepo)) return { path: inRepo, form: "source" };
@@ -194538,7 +194607,7 @@ function ejectModule(opts) {
194538
194607
  }
194539
194608
  const ext = found.form === "source" ? "ts" : "mjs";
194540
194609
  const target = join83(contentDir2, "tier5-src", "_ejected", `${mod}.${ext}`);
194541
- mkdirSync36(dirname47(target), { recursive: true });
194610
+ mkdirSync36(dirname48(target), { recursive: true });
194542
194611
  const banner = `// EJECTED from @wix/himalaya/${mod}. This app owns this file now.
194543
194612
  //
194544
194613
  // Central fixes to @wix/himalaya/${mod} NO LONGER REACH THIS APP \u2014 including any
@@ -194561,7 +194630,7 @@ function ejectModule(opts) {
194561
194630
  if (!existsSync85(f2)) continue;
194562
194631
  const before = readFileSync93(f2, "utf8");
194563
194632
  let after = before;
194564
- let rel2 = relative18(dirname47(f2), target).split(sep23).join("/").replace(/\.tsx?$/, ".js");
194633
+ let rel2 = relative18(dirname48(f2), target).split(sep23).join("/").replace(/\.tsx?$/, ".js");
194565
194634
  if (!rel2.startsWith(".")) rel2 = `./${rel2}`;
194566
194635
  for (const spec of specifiersFor(mod)) {
194567
194636
  const q4 = spec.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -194607,7 +194676,7 @@ __export(crawl_layers_exports, {
194607
194676
  tabRootScreens: () => tabRootScreens
194608
194677
  });
194609
194678
  import { existsSync as existsSync87, readFileSync as readFileSync94, realpathSync as realpathSync10 } from "node:fs";
194610
- import { dirname as dirname48, join as join85, resolve as resolve59, sep as sep24 } from "node:path";
194679
+ import { dirname as dirname49, join as join85, resolve as resolve59, sep as sep24 } from "node:path";
194611
194680
  async function loadContentConfigQuietly(dir) {
194612
194681
  try {
194613
194682
  return await loadAppConfigModule(dir);
@@ -194696,7 +194765,7 @@ async function l10nSourceCatalogFile(dir) {
194696
194765
  try {
194697
194766
  const realDir = realpathSync10(l10nDir);
194698
194767
  const realFile = realpathSync10(file2);
194699
- if (!realDir.startsWith(realpathSync10(dir) + sep24) || dirname48(realFile) !== realDir) return null;
194768
+ if (!realDir.startsWith(realpathSync10(dir) + sep24) || dirname49(realFile) !== realDir) return null;
194700
194769
  return { tag, text: readFileSync94(realFile, "utf8") };
194701
194770
  } catch {
194702
194771
  return null;
@@ -195849,13 +195918,13 @@ var init_test = __esm({
195849
195918
  });
195850
195919
 
195851
195920
  // ../ai-review-gate/paths.mjs
195852
- import { resolve as resolve61, dirname as dirname49 } from "node:path";
195921
+ import { resolve as resolve61, dirname as dirname50 } from "node:path";
195853
195922
  import { fileURLToPath as fileURLToPath31 } from "node:url";
195854
195923
  var REPO_ROOT6;
195855
195924
  var init_paths3 = __esm({
195856
195925
  "../ai-review-gate/paths.mjs"() {
195857
195926
  init_define_HHP_CATALOG();
195858
- REPO_ROOT6 = resolve61(dirname49(fileURLToPath31(import.meta.url)), "../..");
195927
+ REPO_ROOT6 = resolve61(dirname50(fileURLToPath31(import.meta.url)), "../..");
195859
195928
  }
195860
195929
  });
195861
195930
 
@@ -195887,7 +195956,7 @@ var init_policy = __esm({
195887
195956
  // ../pre-pr-review/scope.mjs
195888
195957
  import { execFileSync as execFileSync6 } from "node:child_process";
195889
195958
  import { createHash as createHash38 } from "node:crypto";
195890
- import { resolve as resolve62, dirname as dirname50, isAbsolute as isAbsolute10, join as join88 } from "node:path";
195959
+ import { resolve as resolve62, dirname as dirname51, isAbsolute as isAbsolute10, join as join88 } from "node:path";
195891
195960
  import { fileURLToPath as fileURLToPath32 } from "node:url";
195892
195961
  function resolveRepoRoot2(cwd = process.cwd()) {
195893
195962
  let top;
@@ -195925,7 +195994,7 @@ var init_scope = __esm({
195925
195994
  init_command();
195926
195995
  init_policy();
195927
195996
  init_paths3();
195928
- REPO_ROOT7 = resolve62(dirname50(fileURLToPath32(import.meta.url)), "../..");
195997
+ REPO_ROOT7 = resolve62(dirname51(fileURLToPath32(import.meta.url)), "../..");
195929
195998
  BASE_REF = process.env.PRE_PR_REVIEW_BASE || "origin/master";
195930
195999
  }
195931
196000
  });
@@ -195942,7 +196011,7 @@ import {
195942
196011
  } from "node:fs";
195943
196012
  import { createHash as createHash39 } from "node:crypto";
195944
196013
  import { tmpdir as tmpdir7 } from "node:os";
195945
- import { basename as basename23, dirname as dirname51, join as join89, resolve as resolve63 } from "node:path";
196014
+ import { basename as basename23, dirname as dirname52, join as join89, resolve as resolve63 } from "node:path";
195946
196015
  import { pathToFileURL as pathToFileURL7 } from "node:url";
195947
196016
  function isValidationMetadata(path2) {
195948
196017
  return VALIDATION_METADATA.has(path2) || /(^|[\\/])\.himi([\\/]|$)/.test(path2);
@@ -196108,7 +196177,7 @@ function seed(repo, commands) {
196108
196177
  }
196109
196178
  function write(repo, rel2, body) {
196110
196179
  const absolute2 = resolve63(repo, rel2);
196111
- mkdirSync38(dirname51(absolute2), { recursive: true });
196180
+ mkdirSync38(dirname52(absolute2), { recursive: true });
196112
196181
  writeFileSync38(absolute2, body);
196113
196182
  }
196114
196183
  function selfTestRepo({ withBase }) {
@@ -196800,7 +196869,7 @@ var init_attestation = __esm({
196800
196869
 
196801
196870
  // src/ux-evidence.ts
196802
196871
  import { existsSync as existsSync91, mkdirSync as mkdirSync40, readFileSync as readFileSync100, writeFileSync as writeFileSync40 } from "node:fs";
196803
- import { dirname as dirname52, isAbsolute as isAbsolute11, join as join92, relative as relative20, resolve as resolve65 } from "node:path";
196872
+ import { dirname as dirname53, isAbsolute as isAbsolute11, join as join92, relative as relative20, resolve as resolve65 } from "node:path";
196804
196873
  function isNativePlatform(value2) {
196805
196874
  return typeof value2 === "string" && NATIVE_PLATFORMS.includes(value2);
196806
196875
  }
@@ -196844,7 +196913,7 @@ function recordedRenderWidths(content) {
196844
196913
  return renderEvidenceEntries(evidence).map((entry) => entry.width);
196845
196914
  }
196846
196915
  function writeEvidence(path2, evidence) {
196847
- mkdirSync40(dirname52(path2), { recursive: true });
196916
+ mkdirSync40(dirname53(path2), { recursive: true });
196848
196917
  writeFileSync40(path2, JSON.stringify(evidence, null, 2) + "\n");
196849
196918
  }
196850
196919
  function recordedFilePath(dir, file2) {
@@ -199119,7 +199188,7 @@ var init_cli_bridge = __esm({
199119
199188
  // src/mcp/file-tools.ts
199120
199189
  import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync29, mkdirSync as mkdirSync41, openSync as openSync7, readdirSync as readdirSync42, readFileSync as readFileSync108, realpathSync as realpathSync12, renameSync as renameSync15, rmSync as rmSync26, statSync as statSync26, writeSync as writeSync2, existsSync as existsSync97 } from "node:fs";
199121
199190
  import { randomBytes as randomBytes4 } from "node:crypto";
199122
- import { dirname as dirname53, isAbsolute as isAbsolute13, join as join98, relative as relative21, resolve as resolve68, sep as sep26 } from "node:path";
199191
+ import { dirname as dirname54, isAbsolute as isAbsolute13, join as join98, relative as relative21, resolve as resolve68, sep as sep26 } from "node:path";
199123
199192
  import * as z2 from "zod";
199124
199193
  function within(root, p2) {
199125
199194
  return p2 === root || p2.startsWith(root.endsWith(sep26) ? root : root + sep26);
@@ -199128,7 +199197,7 @@ function realish(p2) {
199128
199197
  let cur = p2;
199129
199198
  const tail = [];
199130
199199
  while (!existsSync97(cur)) {
199131
- const up2 = dirname53(cur);
199200
+ const up2 = dirname54(cur);
199132
199201
  if (up2 === cur) break;
199133
199202
  tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
199134
199203
  cur = up2;
@@ -199174,7 +199243,7 @@ function onDiskSpelling(abs) {
199174
199243
  let cur = abs;
199175
199244
  const tail = [];
199176
199245
  while (!existsSync97(cur)) {
199177
- const up2 = dirname53(cur);
199246
+ const up2 = dirname54(cur);
199178
199247
  if (up2 === cur) break;
199179
199248
  tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
199180
199249
  cur = up2;
@@ -199205,10 +199274,10 @@ function confinedPath(appDir3, rel2) {
199205
199274
  return abs;
199206
199275
  }
199207
199276
  function writeNoFollow2(appDir3, abs, content) {
199208
- mkdirSync41(dirname53(abs), { recursive: true });
199277
+ mkdirSync41(dirname54(abs), { recursive: true });
199209
199278
  const before = symlinkComponent(appDir3, abs);
199210
199279
  if (before) throw new Error(`"${before}" became a symlink`);
199211
- const tmp = join98(dirname53(abs), `.himi-write-${process.pid}-${randomBytes4(6).toString("hex")}.tmp`);
199280
+ const tmp = join98(dirname54(abs), `.himi-write-${process.pid}-${randomBytes4(6).toString("hex")}.tmp`);
199212
199281
  const fd = openSync7(tmp, constants6.O_WRONLY | constants6.O_CREAT | constants6.O_EXCL | (constants6.O_NOFOLLOW ?? 0), 420);
199213
199282
  try {
199214
199283
  writeSync2(fd, content);
@@ -199216,9 +199285,9 @@ function writeNoFollow2(appDir3, abs, content) {
199216
199285
  closeSync8(fd);
199217
199286
  }
199218
199287
  const link4 = symlinkComponent(appDir3, abs);
199219
- if (link4 || !within(realpathSync12(appDir3), realpathSync12(dirname53(abs)))) {
199288
+ if (link4 || !within(realpathSync12(appDir3), realpathSync12(dirname54(abs)))) {
199220
199289
  rmSync26(tmp, { force: true });
199221
- throw new Error(`"${link4 ?? relative21(appDir3, dirname53(abs))}" changed into a link while writing`);
199290
+ throw new Error(`"${link4 ?? relative21(appDir3, dirname54(abs))}" changed into a link while writing`);
199222
199291
  }
199223
199292
  renameSync15(tmp, abs);
199224
199293
  }
@@ -199379,7 +199448,7 @@ var init_file_tools = __esm({
199379
199448
 
199380
199449
  // src/mcp/iap-tools.ts
199381
199450
  import * as z3 from "zod";
199382
- import { dirname as dirname54, relative as relative22, resolve as resolve69 } from "node:path";
199451
+ import { dirname as dirname55, relative as relative22, resolve as resolve69 } from "node:path";
199383
199452
  async function paths(args, deps) {
199384
199453
  const base2 = await deps.defaultDir();
199385
199454
  const result = { ...args, workspaceDir: base2 };
@@ -199403,7 +199472,7 @@ function workspaceInputRefusal(args, deps, context) {
199403
199472
  if (typeof file2 !== "string") return null;
199404
199473
  const doc = JSON.parse(deps.readFile(file2).toString("utf8"));
199405
199474
  const manifest2 = args.plan ? doc.manifest : doc;
199406
- const base2 = args.plan ? resolve69(typeof doc.manifestDir === "string" ? doc.manifestDir : process.cwd()) : dirname54(file2);
199475
+ const base2 = args.plan ? resolve69(typeof doc.manifestDir === "string" ? doc.manifestDir : process.cwd()) : dirname55(file2);
199407
199476
  for (const item2 of manifest2?.items ?? []) {
199408
199477
  if (typeof item2.reviewScreenshot !== "string") continue;
199409
199478
  const why = workspaceRefusal(context.boundary, resolve69(base2, item2.reviewScreenshot));
@@ -200687,13 +200756,13 @@ import * as __ascBuiltin1 from "node:path";
200687
200756
  function scrubEvent(event) {
200688
200757
  return JSON.parse(JSON.stringify(event), (_key, value2) => typeof value2 === "string" ? scrubSecrets(value2) : value2);
200689
200758
  }
200690
- var appendFile, mkdir, readFile2, dirname55, MemoryAuditSink, JsonlAuditSink;
200759
+ var appendFile, mkdir, readFile2, dirname56, MemoryAuditSink, JsonlAuditSink;
200691
200760
  var init_audit = __esm({
200692
200761
  "../../node_modules/@wix/asc-core/dist/ports/audit.js"() {
200693
200762
  init_define_HHP_CATALOG();
200694
200763
  init_scrub();
200695
200764
  ({ appendFile, mkdir, readFile: readFile2 } = __ascBuiltin02);
200696
- ({ dirname: dirname55 } = __ascBuiltin1);
200765
+ ({ dirname: dirname56 } = __ascBuiltin1);
200697
200766
  MemoryAuditSink = class {
200698
200767
  events = [];
200699
200768
  async append(event) {
@@ -200707,7 +200776,7 @@ var init_audit = __esm({
200707
200776
  this.path = path2;
200708
200777
  }
200709
200778
  async append(event) {
200710
- this.ready ??= mkdir(dirname55(this.path), { recursive: true });
200779
+ this.ready ??= mkdir(dirname56(this.path), { recursive: true });
200711
200780
  await this.ready;
200712
200781
  await appendFile(this.path, `${JSON.stringify(scrubEvent(event))}
200713
200782
  `, { flag: "a" });
@@ -201931,7 +202000,7 @@ function parseStored(text32, where) {
201931
202000
  throw new AuthError(`the sign-in stored in ${where} is incomplete`);
201932
202001
  return user;
201933
202002
  }
201934
- var spawn7, createHash47, randomBytes5, chmod, mkdir4, readFile4, rename2, rm3, writeFile3, createServer4, homedir10, dirname56, join102, PLAY_SCOPES, TOKEN_URI, RefreshTokenAuth, execCommand, GOOGLE_OAUTH_HOSTS, FileCredentialStore, SECURITY_NOT_FOUND, KeychainCredentialStore;
202003
+ var spawn7, createHash47, randomBytes5, chmod, mkdir4, readFile4, rename2, rm3, writeFile3, createServer4, homedir10, dirname57, join102, PLAY_SCOPES, TOKEN_URI, RefreshTokenAuth, execCommand, GOOGLE_OAUTH_HOSTS, FileCredentialStore, SECURITY_NOT_FOUND, KeychainCredentialStore;
201935
202004
  var init_auth2 = __esm({
201936
202005
  "../../node_modules/@wix/gplay-api/dist/auth.js"() {
201937
202006
  init_define_HHP_CATALOG();
@@ -201943,7 +202012,7 @@ var init_auth2 = __esm({
201943
202012
  ({ chmod, mkdir: mkdir4, readFile: readFile4, rename: rename2, rm: rm3, writeFile: writeFile3 } = __ascBuiltin24);
201944
202013
  ({ createServer: createServer4 } = __ascBuiltin3);
201945
202014
  ({ homedir: homedir10 } = __ascBuiltin4);
201946
- ({ dirname: dirname56, join: join102 } = __ascBuiltin5);
202015
+ ({ dirname: dirname57, join: join102 } = __ascBuiltin5);
201947
202016
  PLAY_SCOPES = ["https://www.googleapis.com/auth/androidpublisher", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/firebase"];
201948
202017
  TOKEN_URI = `https://${HOSTS.oauth}/token`;
201949
202018
  RefreshTokenAuth = class {
@@ -201999,7 +202068,7 @@ var init_auth2 = __esm({
201999
202068
  return parseStored(text32, this.path);
202000
202069
  }
202001
202070
  async save(user) {
202002
- await mkdir4(dirname56(this.path), { recursive: true, mode: 448 });
202071
+ await mkdir4(dirname57(this.path), { recursive: true, mode: 448 });
202003
202072
  const temp = `${this.path}.${process.pid}.tmp`;
202004
202073
  await writeFile3(temp, JSON.stringify(user), { mode: 384 });
202005
202074
  await chmod(temp, 384);
@@ -202182,7 +202251,7 @@ async function readClosedTestRecord(stateDir2, packageName) {
202182
202251
  }
202183
202252
  async function writeClosedTestRecord(stateDir2, packageName, record6) {
202184
202253
  const path2 = recordPath(stateDir2, packageName);
202185
- await mkdir5(dirname57(path2), { recursive: true, mode: 448 });
202254
+ await mkdir5(dirname58(path2), { recursive: true, mode: 448 });
202186
202255
  await writeFile4(path2, `${JSON.stringify(record6, null, 2)}
202187
202256
  `);
202188
202257
  }
@@ -202224,14 +202293,14 @@ async function setUpClosedTest(edit, setup) {
202224
202293
  }
202225
202294
  return { createdTrack: !existing, replaced };
202226
202295
  }
202227
- var mkdir5, readFile5, writeFile4, dirname57, join103, REQUIRED_TESTERS, REQUIRED_DAYS, CLOSED_TEST_RULE, DAY_MS, LATEST_LOCAL_OFFSET_MS, DATE, recordPath, toDay;
202296
+ var mkdir5, readFile5, writeFile4, dirname58, join103, REQUIRED_TESTERS, REQUIRED_DAYS, CLOSED_TEST_RULE, DAY_MS, LATEST_LOCAL_OFFSET_MS, DATE, recordPath, toDay;
202228
202297
  var init_closedtest = __esm({
202229
202298
  "../../node_modules/@wix/gplay-api/dist/closedtest.js"() {
202230
202299
  init_define_HHP_CATALOG();
202231
202300
  init_errors3();
202232
202301
  init_rollout();
202233
202302
  ({ mkdir: mkdir5, readFile: readFile5, writeFile: writeFile4 } = __ascBuiltin07);
202234
- ({ dirname: dirname57, join: join103 } = __ascBuiltin16);
202303
+ ({ dirname: dirname58, join: join103 } = __ascBuiltin16);
202235
202304
  REQUIRED_TESTERS = 12;
202236
202305
  REQUIRED_DAYS = 14;
202237
202306
  CLOSED_TEST_RULE = `${REQUIRED_TESTERS} testers opted in for ${REQUIRED_DAYS} consecutive days; opting out restarts the count. Google's API can't report any of it, so check Play Console before applying.`;
@@ -206571,9 +206640,9 @@ import * as __ascBuiltin32 from "node:util";
206571
206640
  async function realPathOf(path2) {
206572
206641
  const rest = [];
206573
206642
  let dir = resolve72(path2);
206574
- while (!await exists(dir) && dirname58(dir) !== dir) {
206643
+ while (!await exists(dir) && dirname59(dir) !== dir) {
206575
206644
  rest.unshift(basename26(dir));
206576
- dir = dirname58(dir);
206645
+ dir = dirname59(dir);
206577
206646
  }
206578
206647
  try {
206579
206648
  return join106(await realpath(dir), ...rest);
@@ -206582,10 +206651,10 @@ async function realPathOf(path2) {
206582
206651
  }
206583
206652
  }
206584
206653
  async function insideGitRepository(path2) {
206585
- for (let dir = dirname58(await realPathOf(path2)); ; dir = dirname58(dir)) {
206654
+ for (let dir = dirname59(await realPathOf(path2)); ; dir = dirname59(dir)) {
206586
206655
  if (await exists(join106(dir, ".git")))
206587
206656
  return true;
206588
- if (dirname58(dir) === dir)
206657
+ if (dirname59(dir) === dir)
206589
206658
  return false;
206590
206659
  }
206591
206660
  }
@@ -206609,7 +206678,7 @@ async function generateUploadKey(options2) {
206609
206678
  throw new GplayError("refused", `${file2} already exists; move it first`);
206610
206679
  if (await insideGitRepository(keystore))
206611
206680
  throw new GplayError("refused", `${keystore} is inside a Git repository, where a commit could publish it. Choose a path outside any repository.`);
206612
- await mkdir7(dirname58(keystore), { recursive: true, mode: 448 });
206681
+ await mkdir7(dirname59(keystore), { recursive: true, mode: 448 });
206613
206682
  if (await insideGitRepository(keystore))
206614
206683
  throw new GplayError("refused", `${keystore} is inside a Git repository, where a commit could publish it. Choose a path outside any repository.`);
206615
206684
  const password = randomBytes8(32).toString("base64url");
@@ -206634,7 +206703,7 @@ async function generateUploadKey(options2) {
206634
206703
  throw e2;
206635
206704
  }
206636
206705
  }
206637
- var generateKeyPair, randomBytes8, mkdir7, realpath, rm5, stat4, writeFile5, basename26, dirname58, join106, resolve72, promisify, VALIDITY_DAYS, DAY_MS2, generate, exists;
206706
+ var generateKeyPair, randomBytes8, mkdir7, realpath, rm5, stat4, writeFile5, basename26, dirname59, join106, resolve72, promisify, VALIDITY_DAYS, DAY_MS2, generate, exists;
206638
206707
  var init_keygen = __esm({
206639
206708
  "../../node_modules/@wix/gplay-api/dist/keygen.js"() {
206640
206709
  init_define_HHP_CATALOG();
@@ -206644,7 +206713,7 @@ var init_keygen = __esm({
206644
206713
  init_x509();
206645
206714
  ({ generateKeyPair, randomBytes: randomBytes8 } = __ascBuiltin014);
206646
206715
  ({ mkdir: mkdir7, realpath, rm: rm5, stat: stat4, writeFile: writeFile5 } = __ascBuiltin110);
206647
- ({ basename: basename26, dirname: dirname58, join: join106, resolve: resolve72 } = __ascBuiltin25);
206716
+ ({ basename: basename26, dirname: dirname59, join: join106, resolve: resolve72 } = __ascBuiltin25);
206648
206717
  ({ promisify } = __ascBuiltin32);
206649
206718
  VALIDITY_DAYS = 1e4;
206650
206719
  DAY_MS2 = 864e5;
@@ -207467,7 +207536,7 @@ async function readPlanRecord(stateDir2, packageName) {
207467
207536
  }
207468
207537
  async function writePlanRecord(stateDir2, packageName, record6) {
207469
207538
  const path2 = planPath(stateDir2, packageName);
207470
- await mkdir10(dirname59(path2), { recursive: true, mode: 448 });
207539
+ await mkdir10(dirname60(path2), { recursive: true, mode: 448 });
207471
207540
  await writeFile8(path2, `${JSON.stringify(record6, null, 2)}
207472
207541
  `);
207473
207542
  }
@@ -207509,7 +207578,7 @@ function buildPlan(context, record6, observed) {
207509
207578
  };
207510
207579
  });
207511
207580
  }
207512
- var mkdir10, readdir4, readFile9, writeFile8, dirname59, join109, CONSOLE, q3, yesNo2, ids, declareCmd, known, signer, wixSigned, yesNo, ask2, appContent, account, home, STEPS, STANDARD_OPEN_TRACKS, planPath, PLAN_STEP_IDS, DECLARE_FORM_PLAN_STEP, DECLARATION_TITLE_PLAN_STEP;
207581
+ var mkdir10, readdir4, readFile9, writeFile8, dirname60, join109, CONSOLE, q3, yesNo2, ids, declareCmd, known, signer, wixSigned, yesNo, ask2, appContent, account, home, STEPS, STANDARD_OPEN_TRACKS, planPath, PLAN_STEP_IDS, DECLARE_FORM_PLAN_STEP, DECLARATION_TITLE_PLAN_STEP;
207513
207582
  var init_plan4 = __esm({
207514
207583
  "../../node_modules/@wix/gplay-api/dist/plan.js"() {
207515
207584
  init_define_HHP_CATALOG();
@@ -207517,7 +207586,7 @@ var init_plan4 = __esm({
207517
207586
  init_owner_key();
207518
207587
  init_data_safety_generate();
207519
207588
  ({ mkdir: mkdir10, readdir: readdir4, readFile: readFile9, writeFile: writeFile8 } = __ascBuiltin018);
207520
- ({ dirname: dirname59, join: join109 } = __ascBuiltin113);
207589
+ ({ dirname: dirname60, join: join109 } = __ascBuiltin113);
207521
207590
  CONSOLE = "https://play.google.com/console/u/0/developers";
207522
207591
  q3 = (value2, placeholder3) => value2 ? /^[\w@./:+-]+$/.test(value2) ? value2 : `"${value2.replace(/(["\\$`])/g, "\\$1")}"` : `<${placeholder3}>`;
207523
207592
  yesNo2 = (value2) => value2 === void 0 ? "<no|yes>" : value2 ? "yes" : "no";
@@ -210343,7 +210412,7 @@ async function syncDir(dir) {
210343
210412
  }
210344
210413
  }
210345
210414
  async function atomicWrite(file2, content) {
210346
- const dir = dirname60(file2);
210415
+ const dir = dirname61(file2);
210347
210416
  await mkdir12(dir, { recursive: true, mode: 448 });
210348
210417
  const tmp = join113(dir, `.${randomBytes9(6).toString("hex")}.tmp`);
210349
210418
  try {
@@ -210363,13 +210432,13 @@ async function atomicWrite(file2, content) {
210363
210432
  }
210364
210433
  await syncDir(dir);
210365
210434
  }
210366
- var randomBytes9, mkdir12, open3, rename4, unlink2, dirname60, join113, RETRY_CODES, RENAME_TRIES, sleep, errCode;
210435
+ var randomBytes9, mkdir12, open3, rename4, unlink2, dirname61, join113, RETRY_CODES, RENAME_TRIES, sleep, errCode;
210367
210436
  var init_atomic = __esm({
210368
210437
  "../../node_modules/@wix/asc-core/dist/store-record/atomic.js"() {
210369
210438
  init_define_HHP_CATALOG();
210370
210439
  ({ randomBytes: randomBytes9 } = __ascBuiltin026);
210371
210440
  ({ mkdir: mkdir12, open: open3, rename: rename4, unlink: unlink2 } = __ascBuiltin119);
210372
- ({ dirname: dirname60, join: join113 } = __ascBuiltin29);
210441
+ ({ dirname: dirname61, join: join113 } = __ascBuiltin29);
210373
210442
  RETRY_CODES = /* @__PURE__ */ new Set(["EPERM", "EBUSY", "EACCES"]);
210374
210443
  RENAME_TRIES = 5;
210375
210444
  sleep = (ms2) => new Promise((r3) => setTimeout(r3, ms2));
@@ -210413,7 +210482,7 @@ async function withFileLock(file2, fn2, opts = {}) {
210413
210482
  }
210414
210483
  async function acquire(lock, waitMs, staleMs) {
210415
210484
  const deadline = Date.now() + waitMs;
210416
- await mkdir13(dirname61(lock), { recursive: true, mode: 448 });
210485
+ await mkdir13(dirname62(lock), { recursive: true, mode: 448 });
210417
210486
  const me2 = newOwner();
210418
210487
  for (let delay = 1; ; delay = Math.min(delay * 2, 16)) {
210419
210488
  if (await createExclusive(lock, me2))
@@ -210557,7 +210626,7 @@ async function removeIfId(path2, id, staleMs, mustBeStale, depth) {
210557
210626
  }
210558
210627
  return false;
210559
210628
  }
210560
- var randomBytes10, link2, mkdir13, open4, unlink3, utimes, writeFile11, hostname3, dirname61, resolve75, WAIT_MS, STALE_MS, MAX_CLAIM_DEPTH, HOST2, sleep2, newOwner, queues;
210629
+ var randomBytes10, link2, mkdir13, open4, unlink3, utimes, writeFile11, hostname3, dirname62, resolve75, WAIT_MS, STALE_MS, MAX_CLAIM_DEPTH, HOST2, sleep2, newOwner, queues;
210561
210630
  var init_lock2 = __esm({
210562
210631
  "../../node_modules/@wix/asc-core/dist/store-record/lock.js"() {
210563
210632
  init_define_HHP_CATALOG();
@@ -210565,7 +210634,7 @@ var init_lock2 = __esm({
210565
210634
  ({ randomBytes: randomBytes10 } = __ascBuiltin027);
210566
210635
  ({ link: link2, mkdir: mkdir13, open: open4, unlink: unlink3, utimes, writeFile: writeFile11 } = __ascBuiltin120);
210567
210636
  ({ hostname: hostname3 } = __ascBuiltin210);
210568
- ({ dirname: dirname61, resolve: resolve75 } = __ascBuiltin33);
210637
+ ({ dirname: dirname62, resolve: resolve75 } = __ascBuiltin33);
210569
210638
  WAIT_MS = 6e4;
210570
210639
  STALE_MS = 3e4;
210571
210640
  MAX_CLAIM_DEPTH = 3;
@@ -210795,7 +210864,7 @@ var init_envelope = __esm({
210795
210864
  import * as __ascBuiltin028 from "node:fs/promises";
210796
210865
  import * as __ascBuiltin121 from "node:path";
210797
210866
  async function appendLine(file2, line) {
210798
- await mkdir14(dirname62(file2), { recursive: true, mode: 448 });
210867
+ await mkdir14(dirname63(file2), { recursive: true, mode: 448 });
210799
210868
  const fh = await open5(file2, "a+", 384);
210800
210869
  try {
210801
210870
  const { size } = await fh.stat();
@@ -210834,12 +210903,12 @@ async function readLines(file2) {
210834
210903
  }
210835
210904
  return out2;
210836
210905
  }
210837
- var mkdir14, open5, readFile13, dirname62;
210906
+ var mkdir14, open5, readFile13, dirname63;
210838
210907
  var init_logs = __esm({
210839
210908
  "../../node_modules/@wix/asc-core/dist/store-record/logs.js"() {
210840
210909
  init_define_HHP_CATALOG();
210841
210910
  ({ mkdir: mkdir14, open: open5, readFile: readFile13 } = __ascBuiltin028);
210842
- ({ dirname: dirname62 } = __ascBuiltin121);
210911
+ ({ dirname: dirname63 } = __ascBuiltin121);
210843
210912
  }
210844
210913
  });
210845
210914
 
@@ -215585,10 +215654,10 @@ import * as __ascBuiltin34 from "node:path";
215585
215654
  function assertOutsideRepo(what, path2, fs2 = nodeFs) {
215586
215655
  if (!isAbsolute14(path2))
215587
215656
  throw new CredentialError(`${what} must be an absolute path outside any repository`);
215588
- for (let dir = dirname63(resolve77(path2)); ; dir = dirname63(dir)) {
215657
+ for (let dir = dirname64(resolve77(path2)); ; dir = dirname64(dir)) {
215589
215658
  if (fs2.exists(join117(dir, ".git")))
215590
215659
  throw new CredentialError(`${what} is inside the git work tree at ${dir}; keep credentials outside every repository`);
215591
- if (dirname63(dir) === dir)
215660
+ if (dirname64(dir) === dir)
215592
215661
  return;
215593
215662
  }
215594
215663
  }
@@ -215636,7 +215705,7 @@ function readKey(fs2, path2, what, providerId) {
215636
215705
  throw new CredentialError(`${what} could not be read`, providerId, "unavailable");
215637
215706
  }
215638
215707
  }
215639
- var chmodSync3, existsSync100, mkdirSync43, readdirSync45, readFileSync112, unlinkSync6, writeFileSync42, randomBytes11, homedir13, dirname63, isAbsolute14, join117, resolve77, nodeFs, TRUTHY2, EnvCredentialProvider, PROFILE_FIELDS, FileCredentialProvider;
215708
+ var chmodSync3, existsSync100, mkdirSync43, readdirSync45, readFileSync112, unlinkSync6, writeFileSync42, randomBytes11, homedir13, dirname64, isAbsolute14, join117, resolve77, nodeFs, TRUTHY2, EnvCredentialProvider, PROFILE_FIELDS, FileCredentialProvider;
215640
215709
  var init_local = __esm({
215641
215710
  "../../node_modules/@wix/asc-core/dist/providers/local.js"() {
215642
215711
  init_define_HHP_CATALOG();
@@ -215646,7 +215715,7 @@ var init_local = __esm({
215646
215715
  ({ chmodSync: chmodSync3, existsSync: existsSync100, mkdirSync: mkdirSync43, readdirSync: readdirSync45, readFileSync: readFileSync112, unlinkSync: unlinkSync6, writeFileSync: writeFileSync42 } = __ascBuiltin038);
215647
215716
  ({ randomBytes: randomBytes11 } = __ascBuiltin125);
215648
215717
  ({ homedir: homedir13 } = __ascBuiltin212);
215649
- ({ dirname: dirname63, isAbsolute: isAbsolute14, join: join117, resolve: resolve77 } = __ascBuiltin34);
215718
+ ({ dirname: dirname64, isAbsolute: isAbsolute14, join: join117, resolve: resolve77 } = __ascBuiltin34);
215650
215719
  nodeFs = {
215651
215720
  readFile: (p2) => readFileSync112(p2, "utf8"),
215652
215721
  exists: existsSync100,
@@ -215900,7 +215969,7 @@ var init_local = __esm({
215900
215969
  } catch {
215901
215970
  }
215902
215971
  this.fs.remove?.(jsonPath);
215903
- if (keyPath && dirname63(resolve77(keyPath)) === resolve77(this.dir) && /\.p8(\.dpapi)?$/.test(keyPath))
215972
+ if (keyPath && dirname64(resolve77(keyPath)) === resolve77(this.dir) && /\.p8(\.dpapi)?$/.test(keyPath))
215904
215973
  this.fs.remove?.(keyPath);
215905
215974
  return true;
215906
215975
  }
@@ -231002,9 +231071,9 @@ function checkedPem(pem) {
231002
231071
  function realPathOf2(path2) {
231003
231072
  const rest = [];
231004
231073
  let d2 = resolve78(path2);
231005
- while (!existsSync101(d2) && dirname64(d2) !== d2) {
231074
+ while (!existsSync101(d2) && dirname65(d2) !== d2) {
231006
231075
  rest.unshift(basename29(d2));
231007
- d2 = dirname64(d2);
231076
+ d2 = dirname65(d2);
231008
231077
  }
231009
231078
  try {
231010
231079
  return join123(realpathSync14(d2), ...rest);
@@ -231013,10 +231082,10 @@ function realPathOf2(path2) {
231013
231082
  }
231014
231083
  }
231015
231084
  function gitCheckoutOf(path2) {
231016
- for (let d2 = realPathOf2(path2); ; d2 = dirname64(d2)) {
231085
+ for (let d2 = realPathOf2(path2); ; d2 = dirname65(d2)) {
231017
231086
  if (existsSync101(join123(d2, ".git")))
231018
231087
  return d2;
231019
- if (dirname64(d2) === d2)
231088
+ if (dirname65(d2) === d2)
231020
231089
  return void 0;
231021
231090
  }
231022
231091
  }
@@ -231070,14 +231139,14 @@ function reserveKeyFile(dir, keyId) {
231070
231139
  }
231071
231140
  };
231072
231141
  }
231073
- var createPrivateKey6, closeSync9, existsSync101, mkdirSync44, openSync8, realpathSync14, statSync30, unlinkSync7, writeSync3, basename29, dirname64, isAbsolute15, join123, resolve78, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
231142
+ var createPrivateKey6, closeSync9, existsSync101, mkdirSync44, openSync8, realpathSync14, statSync30, unlinkSync7, writeSync3, basename29, dirname65, isAbsolute15, join123, resolve78, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
231074
231143
  var init_api_keys = __esm({
231075
231144
  "../../node_modules/@wix/asc-web/dist/api-keys.js"() {
231076
231145
  init_define_HHP_CATALOG();
231077
231146
  init_dist3();
231078
231147
  ({ createPrivateKey: createPrivateKey6 } = __ascBuiltin051);
231079
231148
  ({ closeSync: closeSync9, existsSync: existsSync101, mkdirSync: mkdirSync44, openSync: openSync8, realpathSync: realpathSync14, statSync: statSync30, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
231080
- ({ basename: basename29, dirname: dirname64, isAbsolute: isAbsolute15, join: join123, resolve: resolve78 } = __ascBuiltin217);
231149
+ ({ basename: basename29, dirname: dirname65, isAbsolute: isAbsolute15, join: join123, resolve: resolve78 } = __ascBuiltin217);
231081
231150
  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"];
231082
231151
  DOWNLOAD_ATTEMPTS = 3;
231083
231152
  ApiKeysApi = class {
@@ -233554,7 +233623,7 @@ function writeSessionBundle(path2, bundle, overwrite) {
233554
233623
  }
233555
233624
  if (exists2 && !overwrite)
233556
233625
  throw new SessionBundleError(`${path2} already exists; pass --overwrite to replace it`);
233557
- const staging = join128(dirname65(path2), `.asc-node-session-${randomBytes16(6).toString("hex")}`);
233626
+ const staging = join128(dirname66(path2), `.asc-node-session-${randomBytes16(6).toString("hex")}`);
233558
233627
  const fd = openSync10(staging, constants9.O_WRONLY | constants9.O_CREAT | constants9.O_EXCL | constants9.O_NOFOLLOW, 384);
233559
233628
  try {
233560
233629
  writeSync5(fd, `${JSON.stringify(bundle, null, 2)}
@@ -233580,7 +233649,7 @@ function readSessionBundle(path2) {
233580
233649
  throw new SessionBundleError(`the session bundle is larger than ${MAX_SESSION_BUNDLE_BYTES} bytes`);
233581
233650
  return readFileSync116(path2, "utf8");
233582
233651
  }
233583
- var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync33, mkdirSync47, openSync10, readFileSync116, renameSync17, rmSync28, statSync35, writeSync5, createHash68, randomBytes16, dirname65, isAbsolute16, join128, resolve80, SESSION_BUNDLE_KIND, SESSION_BUNDLE_VERSION, MAX_SESSION_BUNDLE_BYTES, SessionBundleError, isAppleDomain, SESSION_FILE_VERSION, FileSessionStore, KEYRING_HINT, SecretServiceSessionStore;
233652
+ var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync33, mkdirSync47, openSync10, readFileSync116, renameSync17, rmSync28, statSync35, writeSync5, createHash68, randomBytes16, dirname66, isAbsolute16, join128, resolve80, SESSION_BUNDLE_KIND, SESSION_BUNDLE_VERSION, MAX_SESSION_BUNDLE_BYTES, SessionBundleError, isAppleDomain, SESSION_FILE_VERSION, FileSessionStore, KEYRING_HINT, SecretServiceSessionStore;
233584
233653
  var init_session_transfer = __esm({
233585
233654
  "../../node_modules/@wix/asc-web/dist/session-transfer.js"() {
233586
233655
  init_define_HHP_CATALOG();
@@ -233590,7 +233659,7 @@ var init_session_transfer = __esm({
233590
233659
  init_session();
233591
233660
  ({ chmodSync: chmodSync4, closeSync: closeSync11, constants: constants9, fstatSync: fstatSync3, lstatSync: lstatSync33, mkdirSync: mkdirSync47, openSync: openSync10, readFileSync: readFileSync116, renameSync: renameSync17, rmSync: rmSync28, statSync: statSync35, writeSync: writeSync5 } = __ascBuiltin058);
233592
233661
  ({ createHash: createHash68, randomBytes: randomBytes16 } = __ascBuiltin139);
233593
- ({ dirname: dirname65, isAbsolute: isAbsolute16, join: join128, resolve: resolve80 } = __ascBuiltin220);
233662
+ ({ dirname: dirname66, isAbsolute: isAbsolute16, join: join128, resolve: resolve80 } = __ascBuiltin220);
233594
233663
  SESSION_BUNDLE_KIND = "asc-node-web-session";
233595
233664
  SESSION_BUNDLE_VERSION = 1;
233596
233665
  MAX_SESSION_BUNDLE_BYTES = 1 << 20;
@@ -233608,7 +233677,7 @@ var init_session_transfer = __esm({
233608
233677
  lockOptions;
233609
233678
  box;
233610
233679
  persistent = true;
233611
- constructor(dir, lockDir = join128(dirname65(dir), "web-session-locks"), lockOptions, box) {
233680
+ constructor(dir, lockDir = join128(dirname66(dir), "web-session-locks"), lockOptions, box) {
233612
233681
  this.dir = dir;
233613
233682
  this.lockDir = lockDir;
233614
233683
  this.lockOptions = lockOptions;
@@ -245888,7 +245957,7 @@ __export(store_host_exports, {
245888
245957
  import { spawn as spawn8 } from "node:child_process";
245889
245958
  import { existsSync as existsSync104, lstatSync as lstatSync34, readFileSync as readFileSync126, readdirSync as readdirSync49, realpathSync as realpathSync17 } from "node:fs";
245890
245959
  import { homedir as homedir16, hostname as hostname6, userInfo as userInfo3 } from "node:os";
245891
- import { delimiter as delimiter4, dirname as dirname66, isAbsolute as isAbsolute18, join as join135, relative as relative26, resolve as resolve87, sep as sep30 } from "node:path";
245960
+ import { delimiter as delimiter4, dirname as dirname67, isAbsolute as isAbsolute18, join as join135, relative as relative26, resolve as resolve87, sep as sep30 } from "node:path";
245892
245961
  function storeNodeRefusal(version5 = process.versions.node) {
245893
245962
  const major = Number(version5.split(".")[0]);
245894
245963
  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.`;
@@ -246063,7 +246132,7 @@ function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
246063
246132
  const path2 = resolve87(base2, p2);
246064
246133
  if (path2 === base2 || !path2.startsWith(base2 + sep30)) throw refuse10();
246065
246134
  let probe2 = path2;
246066
- while (!existsSync104(probe2) && probe2 !== base2) probe2 = dirname66(probe2);
246135
+ while (!existsSync104(probe2) && probe2 !== base2) probe2 = dirname67(probe2);
246067
246136
  let real;
246068
246137
  try {
246069
246138
  real = realpathSync17(probe2);
@@ -248063,7 +248132,7 @@ __export(input_evidence_isolation_exports, {
248063
248132
  });
248064
248133
  async function installInputEvidenceIsolation(dir) {
248065
248134
  const { lstatSync: lstatSync44, readdirSync: readdirSync68, readlinkSync: readlinkSync4, realpathSync: realpathSync27 } = await import("node:fs");
248066
- const { dirname: dirname93, isAbsolute: isAbsolute25, join: join223, relative: relative41, resolve: resolve139, sep: sep37 } = await import("node:path");
248135
+ const { dirname: dirname94, isAbsolute: isAbsolute25, join: join223, relative: relative41, resolve: resolve139, sep: sep37 } = await import("node:path");
248067
248136
  const root = resolve139(dir);
248068
248137
  const privateDir = join223(root, ".himi");
248069
248138
  const privateReal = join223(realpathSync27(root), ".himi") + sep37;
@@ -248077,7 +248146,7 @@ async function installInputEvidenceIsolation(dir) {
248077
248146
  if (path2 === recording) {
248078
248147
  const link4 = readlinkSync4(path2);
248079
248148
  if (isAbsolute25(link4)) return false;
248080
- const target = resolve139(dirname93(path2), link4);
248149
+ const target = resolve139(dirname94(path2), link4);
248081
248150
  if (!within2(privateDir, target)) return false;
248082
248151
  if (realpathSync27(path2) !== join223(realpathSync27(root), relative41(root, target))) return false;
248083
248152
  return lstatSync44(target).isFile();
@@ -249283,7 +249352,7 @@ import { spawnSync as spawnSync11 } from "node:child_process";
249283
249352
  import { createHash as createHash76 } from "node:crypto";
249284
249353
  import { copyFileSync as copyFileSync3, existsSync as existsSync111, mkdirSync as mkdirSync55, mkdtempSync as mkdtempSync9, readFileSync as readFileSync132, rmSync as rmSync31, writeFileSync as writeFileSync52 } from "node:fs";
249285
249354
  import { tmpdir as tmpdir10 } from "node:os";
249286
- import { dirname as dirname69, isAbsolute as isAbsolute19, join as join144, resolve as resolve93 } from "node:path";
249355
+ import { dirname as dirname70, isAbsolute as isAbsolute19, join as join144, resolve as resolve93 } from "node:path";
249287
249356
  import { pathToFileURL as pathToFileURL9 } from "node:url";
249288
249357
  import * as cheerio4 from "cheerio";
249289
249358
  function junitOutcome(xml2) {
@@ -249371,8 +249440,8 @@ function eventsOutcome(jsonl) {
249371
249440
  }
249372
249441
  function invokeNodeTests(o2) {
249373
249442
  const content = resolve93(o2.contentDir);
249374
- const reporter = join144(dirname69(o2.reportPath), "himi-widget-events-reporter.mjs");
249375
- const eventsPath = join144(dirname69(o2.reportPath), "events.jsonl");
249443
+ const reporter = join144(dirname70(o2.reportPath), "himi-widget-events-reporter.mjs");
249444
+ const eventsPath = join144(dirname70(o2.reportPath), "events.jsonl");
249376
249445
  writeFileSync52(reporter, EVENT_REPORTER_SOURCE);
249377
249446
  const args = [
249378
249447
  ...o2.imports.flatMap((i2) => ["--import", i2]),
@@ -249447,7 +249516,7 @@ function executeWidgetTests(contentDir2, evidenceDir, runPaths, now = () => (/*
249447
249516
  copyFileSync3(reportPath, join144(content, VERIFY_RUNS, stamp, "junit.xml"));
249448
249517
  report9 = join144(VERIFY_RUNS, stamp, "junit.xml");
249449
249518
  }
249450
- if (run4.events && report9) copyFileSync3(run4.eventsPath, join144(content, dirname69(report9), "events.jsonl"));
249519
+ if (run4.events && report9) copyFileSync3(run4.eventsPath, join144(content, dirname70(report9), "events.jsonl"));
249451
249520
  const outcome = eventsOutcome(run4.events);
249452
249521
  return { exitCode: run4.exitCode, ...outcome ? { cases: outcome.cases, unowned: outcome.unowned, failures: outcome.failures } : {}, files, ...report9 ? { report: report9 } : {} };
249453
249522
  } finally {
@@ -256881,10 +256950,10 @@ __export(shot_files_exports, {
256881
256950
  });
256882
256951
  import { createHash as createHash83 } from "node:crypto";
256883
256952
  import { mkdirSync as mkdirSync56, readdirSync as readdirSync54, readFileSync as readFileSync144, rmSync as rmSync35, statSync as statSync43 } from "node:fs";
256884
- import { basename as basename35, dirname as dirname70, join as join156, relative as relative30, resolve as resolve99, sep as sep32 } from "node:path";
256953
+ import { basename as basename35, dirname as dirname71, join as join156, relative as relative30, resolve as resolve99, sep as sep32 } from "node:path";
256885
256954
  function writeAtomic2(file2, bytes2) {
256886
256955
  for (let attempt2 = 0; ; attempt2++) {
256887
- mkdirSync56(dirname70(file2), { recursive: true });
256956
+ mkdirSync56(dirname71(file2), { recursive: true });
256888
256957
  try {
256889
256958
  writeFileAtomic(file2, bytes2);
256890
256959
  return;
@@ -256924,8 +256993,8 @@ function pruneRenders(dir, opts = {}) {
256924
256993
  if (now - mtime >= STALE_TMP_MS) rmSync35(f2, { force: true });
256925
256994
  continue;
256926
256995
  }
256927
- let files = byScreen.get(dirname70(f2));
256928
- if (!files) byScreen.set(dirname70(f2), files = []);
256996
+ let files = byScreen.get(dirname71(f2));
256997
+ if (!files) byScreen.set(dirname71(f2), files = []);
256929
256998
  files.push({ f: f2, mtime });
256930
256999
  }
256931
257000
  for (const files of byScreen.values()) {
@@ -257018,7 +257087,7 @@ __export(coverage_exports2, {
257018
257087
  trendAndStore: () => trendAndStore
257019
257088
  });
257020
257089
  import { existsSync as existsSync123, mkdirSync as mkdirSync57, readFileSync as readFileSync145, writeFileSync as writeFileSync58 } from "node:fs";
257021
- import { dirname as dirname71, join as join157 } from "node:path";
257090
+ import { dirname as dirname72, join as join157 } from "node:path";
257022
257091
  function suppressedNativeKeys(oracle) {
257023
257092
  return [...oracle.ios ? [] : ["native-decode|ios"], ...oracle.android ? [] : ["native-decode|android"]];
257024
257093
  }
@@ -257210,7 +257279,7 @@ function trendAndStore(dir, entries, suppressed) {
257210
257279
  const current = entries.map((e2) => e2.key);
257211
257280
  const stored = [.../* @__PURE__ */ new Set([...current, ...(previous ?? []).filter((key4) => (suppressed ?? []).includes(key4))])];
257212
257281
  try {
257213
- mkdirSync57(dirname71(p2), { recursive: true });
257282
+ mkdirSync57(dirname72(p2), { recursive: true });
257214
257283
  writeFileSync58(p2, JSON.stringify({ keys: stored, ts: (/* @__PURE__ */ new Date()).toISOString() }, null, 2));
257215
257284
  } catch {
257216
257285
  return null;
@@ -257255,7 +257324,7 @@ function diffAndStoreObservations(dir, current) {
257255
257324
  } catch {
257256
257325
  }
257257
257326
  try {
257258
- mkdirSync57(dirname71(p2), { recursive: true });
257327
+ mkdirSync57(dirname72(p2), { recursive: true });
257259
257328
  writeFileSync58(p2, JSON.stringify({ screens: current, ts: (/* @__PURE__ */ new Date()).toISOString() }, null, 2));
257260
257329
  } catch {
257261
257330
  return null;
@@ -257644,7 +257713,7 @@ var init_render_cache = __esm({
257644
257713
 
257645
257714
  // src/commands/render.ts
257646
257715
  import { readFileSync as readFileSync148 } from "node:fs";
257647
- import { dirname as dirname72, join as join160, resolve as resolve101 } from "node:path";
257716
+ import { dirname as dirname73, join as join160, resolve as resolve101 } from "node:path";
257648
257717
  import { fileURLToPath as fileURLToPath36 } from "node:url";
257649
257718
  function renderDeviceWidths() {
257650
257719
  return {
@@ -257782,7 +257851,7 @@ function renderBatchRefusal(flags) {
257782
257851
  async function renderBuild(dir, app2, a3, opts) {
257783
257852
  const { cliFingerprint: cliFingerprint2, dropBuildDir: dropBuildDir2, envUnchanged: envUnchanged2, keepBuild: keepBuild2, newBuildDir: newBuildDir2, outsideEnvRecording: outsideEnvRecording2, readKeptBuild: readKeptBuild2, recordingEnvReads: recordingEnvReads2, renderCacheKey: renderCacheKey2 } = await Promise.resolve().then(() => (init_render_cache(), render_cache_exports));
257784
257853
  const head2 = a3.gitSha();
257785
- const monorepo = head2 === "dev" ? null : { head: head2, diff: currentGitDiffHash(dirname72(fileURLToPath36(import.meta.url))) };
257854
+ const monorepo = head2 === "dev" ? null : { head: head2, diff: currentGitDiffHash(dirname73(fileURLToPath36(import.meta.url))) };
257786
257855
  const inputs = {
257787
257856
  cli: cliFingerprint2(cliVersion(), monorepo),
257788
257857
  sdk: JSON.stringify({ resolution: opts.resolution ?? "default", umbrella: a3.umbrellaVersion(dir) }),
@@ -258773,7 +258842,7 @@ __export(validate_design_exports, {
258773
258842
  });
258774
258843
  import { randomBytes as randomBytes21 } from "node:crypto";
258775
258844
  import { closeSync as closeSync12, constants as constants10, existsSync as existsSync129, lstatSync as lstatSync37, openSync as openSync11, readFileSync as readFileSync152, realpathSync as realpathSync20, renameSync as renameSync21, unlinkSync as unlinkSync9, writeFileSync as writeFileSync61 } from "node:fs";
258776
- import { dirname as dirname73, isAbsolute as isAbsolute21, join as join164, relative as relative31, resolve as resolve103, sep as sep33, win32 } from "node:path";
258845
+ import { dirname as dirname74, isAbsolute as isAbsolute21, join as join164, relative as relative31, resolve as resolve103, sep as sep33, win32 } from "node:path";
258777
258846
  import ts30 from "typescript";
258778
258847
  function readColorToken(tokens2, name) {
258779
258848
  const entry = obj23(tokens2.colors)?.[name];
@@ -259017,7 +259086,7 @@ function writableTokensPath(contentDir2, location) {
259017
259086
  return path2;
259018
259087
  }
259019
259088
  function writeFixedTokens(contentDir2, location, path2, tokens2) {
259020
- const temp = join164(dirname73(path2), `.himi-design-${process.pid}-${randomBytes21(6).toString("hex")}.tmp`);
259089
+ const temp = join164(dirname74(path2), `.himi-design-${process.pid}-${randomBytes21(6).toString("hex")}.tmp`);
259021
259090
  const mode = lstatSync37(path2).mode & 511;
259022
259091
  const fd = openSync11(temp, constants10.O_WRONLY | constants10.O_CREAT | constants10.O_EXCL | (constants10.O_NOFOLLOW ?? 0), mode);
259023
259092
  try {
@@ -259221,7 +259290,7 @@ function safeEvidencePath(contentDir2, name) {
259221
259290
  }
259222
259291
  function writeEvidenceFile(contentDir2, name, contents) {
259223
259292
  const path2 = safeEvidencePath(contentDir2, name);
259224
- const temp = join164(dirname73(path2), `.himi-design-${process.pid}-${randomBytes21(6).toString("hex")}.tmp`);
259293
+ const temp = join164(dirname74(path2), `.himi-design-${process.pid}-${randomBytes21(6).toString("hex")}.tmp`);
259225
259294
  const fd = openSync11(temp, constants10.O_WRONLY | constants10.O_CREAT | constants10.O_EXCL | (constants10.O_NOFOLLOW ?? 0), 384);
259226
259295
  try {
259227
259296
  try {
@@ -263083,12 +263152,12 @@ var init_wix_client_id = __esm({
263083
263152
 
263084
263153
  // src/run-godot-web.ts
263085
263154
  import { existsSync as existsSync133, readFileSync as readFileSync155, statSync as statSync48 } from "node:fs";
263086
- import { dirname as dirname74, join as join168, resolve as resolve107 } from "node:path";
263155
+ import { dirname as dirname75, join as join168, resolve as resolve107 } from "node:path";
263087
263156
  import { fileURLToPath as fileURLToPath38 } from "node:url";
263088
263157
  function localGodotWebDir(env = process.env) {
263089
263158
  const explicit3 = env.HIMI_GODOT_WEB_DIR?.trim();
263090
263159
  if (explicit3) return existsSync133(join168(explicit3, "godot.js")) ? resolve107(explicit3) : null;
263091
- const here = dirname74(fileURLToPath38(import.meta.url));
263160
+ const here = dirname75(fileURLToPath38(import.meta.url));
263092
263161
  const checkout = resolve107(here, "../../../packages/himi-game-web/dist/statics/game");
263093
263162
  return existsSync133(join168(checkout, "godot.js")) ? checkout : null;
263094
263163
  }
@@ -263229,7 +263298,7 @@ __export(run_exports, {
263229
263298
  });
263230
263299
  import { cpSync as cpSync2, existsSync as existsSync134, lstatSync as lstatSync38, mkdirSync as mkdirSync60, mkdtempSync as mkdtempSync12, readdirSync as readdirSync60, readFileSync as readFileSync156, rmSync as rmSync40, statSync as statSync49 } from "node:fs";
263231
263300
  import { networkInterfaces as osNetworkInterfaces, tmpdir as tmpdir13 } from "node:os";
263232
- import { dirname as dirname75, join as join169 } from "node:path";
263301
+ import { dirname as dirname76, join as join169 } from "node:path";
263233
263302
  import { fileURLToPath as fileURLToPath39 } from "node:url";
263234
263303
  function makePackageRunHandler(opts) {
263235
263304
  const store = new FileReleaseStore(opts.releaseRoot);
@@ -263326,7 +263395,7 @@ async function resolvePackage(source2, workDir) {
263326
263395
  }
263327
263396
  async function loadPreviewAssets(deps = {}) {
263328
263397
  try {
263329
- const here = dirname75(fileURLToPath39(import.meta.url));
263398
+ const here = dirname76(fileURLToPath39(import.meta.url));
263330
263399
  const published = join169(here, "preview-assets.generated.bin");
263331
263400
  const repoRoot2 = join169(here, "../../..");
263332
263401
  if (!existsSync134(published) && existsSync134(join169(repoRoot2, "packages/serve/scripts/preview-embed-fresh.mjs"))) {
@@ -263485,7 +263554,7 @@ __export(run_browser_exports, {
263485
263554
  import { createServer as createServer8 } from "node:http";
263486
263555
  import { existsSync as existsSync135, readFileSync as readFileSync157 } from "node:fs";
263487
263556
  import { spawnSync as spawnSync13 } from "node:child_process";
263488
- import { dirname as dirname76, resolve as resolve108 } from "node:path";
263557
+ import { dirname as dirname77, resolve as resolve108 } from "node:path";
263489
263558
  import { fileURLToPath as fileURLToPath40 } from "node:url";
263490
263559
  function stagedDir() {
263491
263560
  return browserPlaneDir({ repo: REPO5, here: HERE4, out: process.env.HIMI_BROWSER_PLANE_OUT });
@@ -263657,7 +263726,7 @@ var init_run_browser = __esm({
263657
263726
  init_open_url();
263658
263727
  init_file_store();
263659
263728
  init_wix_client_id();
263660
- HERE4 = dirname76(fileURLToPath40(import.meta.url));
263729
+ HERE4 = dirname77(fileURLToPath40(import.meta.url));
263661
263730
  REPO5 = resolve108(HERE4, "..", "..", "..");
263662
263731
  STAGE_SCRIPT = ["core", "serve", "scripts", "stage-browser-plane.mjs"];
263663
263732
  SERVED = /* @__PURE__ */ new Set(["host.html", "sw.js", "package-reader.js"]);
@@ -270063,7 +270132,7 @@ var init_store_iap_connect = __esm({
270063
270132
  });
270064
270133
 
270065
270134
  // src/store-iap-screenshots.ts
270066
- import { dirname as dirname77, join as join179, relative as relative33 } from "node:path";
270135
+ import { dirname as dirname78, join as join179, relative as relative33 } from "node:path";
270067
270136
  function purchaseScreensFor(item2) {
270068
270137
  const screen = item2.wix && PURCHASE_SCREENS[item2.wix.entityType];
270069
270138
  if (!screen || !item2.wix) return [];
@@ -270191,7 +270260,7 @@ async function shoot(selected, run4, outDir) {
270191
270260
  } catch (e2) {
270192
270261
  return { ...report9, skipped: `could not save the screenshot: ${e2.message}` };
270193
270262
  }
270194
- return { ...report9, screenshot: relative33(dirname77(run4.manifestPath), path2) };
270263
+ return { ...report9, screenshot: relative33(dirname78(run4.manifestPath), path2) };
270195
270264
  }
270196
270265
  function visibleText2(html) {
270197
270266
  return html.replace(/&nbsp;|&#160;|&#xa0;/gi, "\xA0").replace(/&amp;/g, "&");
@@ -270203,7 +270272,7 @@ function manifestWithScreenshots(text32, shot) {
270203
270272
  `;
270204
270273
  }
270205
270274
  async function takeReviewScreenshots(run4) {
270206
- const outDir = run4.outDir ?? join179(dirname77(run4.manifestPath), DEFAULT_OUT_DIR);
270275
+ const outDir = run4.outDir ?? join179(dirname78(run4.manifestPath), DEFAULT_OUT_DIR);
270207
270276
  const items = unknownOnlyIds(run4);
270208
270277
  const shot = /* @__PURE__ */ new Map();
270209
270278
  try {
@@ -270391,7 +270460,7 @@ import { execFileSync as execFileSync10 } from "node:child_process";
270391
270460
  import { randomUUID as randomUUID17 } from "node:crypto";
270392
270461
  import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync61, readFileSync as readFileSync168, realpathSync as realpathSync22, renameSync as renameSync25, rmSync as rmSync44, writeFileSync as writeFileSync64 } from "node:fs";
270393
270462
  import { homedir as homedir20, hostname as hostname7 } from "node:os";
270394
- import { dirname as dirname78, join as join181, resolve as resolve115 } from "node:path";
270463
+ import { dirname as dirname79, join as join181, resolve as resolve115 } from "node:path";
270395
270464
  function scrubDeep(value2, scrub) {
270396
270465
  if (typeof value2 === "string") return scrub(value2);
270397
270466
  if (Array.isArray(value2)) return value2.map((v2) => scrubDeep(v2, scrub));
@@ -270426,7 +270495,7 @@ function readManifest3(deps, path2) {
270426
270495
  return parseIapManifest(readInput2(deps, path2, "manifest"), path2);
270427
270496
  }
270428
270497
  function manifestDirOf(manifestPath) {
270429
- return dirname78(resolve115(manifestPath));
270498
+ return dirname79(resolve115(manifestPath));
270430
270499
  }
270431
270500
  function readPlan2(deps, path2) {
270432
270501
  const text32 = readInput2(deps, path2, "plan");
@@ -271056,7 +271125,7 @@ async function screenshotsCommand(flags, deps, out2) {
271056
271125
  return report9.complete ? 0 : 1;
271057
271126
  }
271058
271127
  function writeBinaryFile(path2, bytes2) {
271059
- mkdirSync61(dirname78(path2), { recursive: true });
271128
+ mkdirSync61(dirname79(path2), { recursive: true });
271060
271129
  const partial = `${path2}.${process.pid}.partial`;
271061
271130
  writeFileSync64(partial, bytes2);
271062
271131
  renameSync25(partial, path2);
@@ -271646,7 +271715,7 @@ __export(preflight_app_exports, {
271646
271715
  });
271647
271716
  import { readFileSync as readFileSync169, existsSync as existsSync143, readdirSync as readdirSync62, statSync as statSync50 } from "node:fs";
271648
271717
  import { createHash as createHash93 } from "node:crypto";
271649
- import { dirname as dirname79, join as join182 } from "node:path";
271718
+ import { dirname as dirname80, join as join182 } from "node:path";
271650
271719
  function analyze(projectYml, storeConfig, icon, account2, adopted) {
271651
271720
  const f2 = [];
271652
271721
  const has = (re2, s5) => re2.test(s5);
@@ -271792,7 +271861,7 @@ function readXcconfigVars(iosDir, projectYml) {
271792
271861
  for (const raw of readFileSync169(path2, "utf8").split("\n")) {
271793
271862
  const inc = /^\s*#include\??\s+"([^"]+)"/.exec(raw);
271794
271863
  if (inc) {
271795
- read2(join182(dirname79(path2), inc[1]));
271864
+ read2(join182(dirname80(path2), inc[1]));
271796
271865
  continue;
271797
271866
  }
271798
271867
  const line = raw.replace(/\/\/.*$/, "");
@@ -272656,7 +272725,7 @@ var init_component_lookup = __esm({
272656
272725
  // ../../core/functions-secrets/src/vault.ts
272657
272726
  import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv3, randomBytes as randomBytes24 } from "node:crypto";
272658
272727
  import { mkdir as mkdir21, readFile as readFile25, rename as rename9, writeFile as writeFile17 } from "node:fs/promises";
272659
- import { dirname as dirname80 } from "node:path";
272728
+ import { dirname as dirname81 } from "node:path";
272660
272729
  function createJsonSecretStore(filePath) {
272661
272730
  const read2 = async () => {
272662
272731
  try {
@@ -272669,7 +272738,7 @@ function createJsonSecretStore(filePath) {
272669
272738
  }
272670
272739
  };
272671
272740
  const write3 = async (records) => {
272672
- await mkdir21(dirname80(filePath), { recursive: true });
272741
+ await mkdir21(dirname81(filePath), { recursive: true });
272673
272742
  const temporary = `${filePath}.${process.pid}.tmp`;
272674
272743
  await writeFile17(temporary, `${JSON.stringify(records, null, 2)}
272675
272744
  `, { mode: 384 });
@@ -273333,7 +273402,7 @@ __export(notify_exports, {
273333
273402
  });
273334
273403
  import { chmodSync as chmodSync6, mkdirSync as mkdirSync62, readFileSync as readFileSync176, writeFileSync as writeFileSync66 } from "node:fs";
273335
273404
  import { homedir as homedir21 } from "node:os";
273336
- import { dirname as dirname81, join as join187 } from "node:path";
273405
+ import { dirname as dirname82, join as join187 } from "node:path";
273337
273406
  function defaultSessionsPath() {
273338
273407
  return process.env.HIMI_ADMIN_SESSIONS_FILE ?? join187(homedir21(), ".himalaya", "admin-sessions.json");
273339
273408
  }
@@ -273347,10 +273416,10 @@ function loadSessionsFile(path2 = defaultSessionsPath()) {
273347
273416
  function saveAdminSession(adminUrl, session, path2 = defaultSessionsPath()) {
273348
273417
  const file2 = loadSessionsFile(path2);
273349
273418
  file2.sessions = { ...file2.sessions, [adminUrl]: session };
273350
- mkdirSync62(dirname81(path2), { recursive: true, mode: 448 });
273419
+ mkdirSync62(dirname82(path2), { recursive: true, mode: 448 });
273351
273420
  writeFileSync66(path2, JSON.stringify(file2, null, 2) + "\n", { mode: 384 });
273352
273421
  try {
273353
- chmodSync6(dirname81(path2), 448);
273422
+ chmodSync6(dirname82(path2), 448);
273354
273423
  chmodSync6(path2, 384);
273355
273424
  } catch {
273356
273425
  }
@@ -274396,7 +274465,7 @@ __export(runtime_copy_exports, {
274396
274465
  import { createHash as createHash96 } from "node:crypto";
274397
274466
  import { existsSync as existsSync147, readFileSync as readFileSync178, writeFileSync as writeFileSync67 } from "node:fs";
274398
274467
  import { readdirSync as readdirSync63 } from "node:fs";
274399
- import { dirname as dirname82, join as join188, relative as relative34, resolve as resolve119 } from "node:path";
274468
+ import { dirname as dirname83, join as join188, relative as relative34, resolve as resolve119 } from "node:path";
274400
274469
  import { fileURLToPath as fileURLToPath41 } from "node:url";
274401
274470
  function appSourceCatalogs() {
274402
274471
  const appsDir = join188(REPO_ROOT8, "apps");
@@ -274499,7 +274568,7 @@ var REPO_ROOT8, TABLE_PATH, SWIFT_OUT, KOTLIN_OUT, TS_OUT, HEADER3, RENDERER_PRE
274499
274568
  var init_runtime_copy = __esm({
274500
274569
  "../l10n/runtime-copy.ts"() {
274501
274570
  init_define_HHP_CATALOG();
274502
- REPO_ROOT8 = resolve119(dirname82(fileURLToPath41(import.meta.url)), "../..");
274571
+ REPO_ROOT8 = resolve119(dirname83(fileURLToPath41(import.meta.url)), "../..");
274503
274572
  TABLE_PATH = join188(REPO_ROOT8, "core/runtime/l10n/runtime/en.json");
274504
274573
  SWIFT_OUT = join188(REPO_ROOT8, "core/runtime/ios/HimalayaCore/Sources/HimalayaCore/RuntimeCopyDefaults.generated.swift");
274505
274574
  KOTLIN_OUT = join188(REPO_ROOT8, "core/runtime/android/io/himalaya/core/src/main/kotlin/io/himalaya/core/RuntimeCopyDefaults.generated.kt");
@@ -274553,7 +274622,7 @@ __export(auth_gate_copy_exports, {
274553
274622
  });
274554
274623
  import { createHash as createHash97 } from "node:crypto";
274555
274624
  import { existsSync as existsSync148, readdirSync as readdirSync64, readFileSync as readFileSync179, writeFileSync as writeFileSync68 } from "node:fs";
274556
- import { dirname as dirname83, join as join189, relative as relative35, resolve as resolve120 } from "node:path";
274625
+ import { dirname as dirname84, join as join189, relative as relative35, resolve as resolve120 } from "node:path";
274557
274626
  import { fileURLToPath as fileURLToPath42 } from "node:url";
274558
274627
  function discoverMessageSources() {
274559
274628
  const roots2 = [
@@ -274767,7 +274836,7 @@ function expectedOutputs2(table = loadTable2()) {
274767
274836
  ];
274768
274837
  for (const p2 of appSourceCatalogs2()) {
274769
274838
  const committed = JSON.parse(readFileSync179(p2, "utf8"));
274770
- out2.push({ path: p2, content: serializeCatalog(injectAllNativeRows(committed, dirname83(dirname83(p2)), table)) });
274839
+ out2.push({ path: p2, content: serializeCatalog(injectAllNativeRows(committed, dirname84(dirname84(p2)), table)) });
274771
274840
  }
274772
274841
  return out2;
274773
274842
  }
@@ -274794,7 +274863,7 @@ var init_auth_gate_copy = __esm({
274794
274863
  init_rules();
274795
274864
  init_governs();
274796
274865
  init_runtime_copy();
274797
- HERE5 = dirname83(fileURLToPath42(import.meta.url));
274866
+ HERE5 = dirname84(fileURLToPath42(import.meta.url));
274798
274867
  REPO_ROOT9 = resolve120(HERE5, "../..");
274799
274868
  TABLE_PATH2 = join189(REPO_ROOT9, "core/runtime/l10n/auth-gate/en.json");
274800
274869
  SWIFT_OUT2 = join189(
@@ -274856,7 +274925,7 @@ var init_auth_gate_copy = __esm({
274856
274925
  });
274857
274926
 
274858
274927
  // ../l10n/extract.ts
274859
- import { resolve as resolve121, join as join190, relative as relative36, dirname as dirname84 } from "node:path";
274928
+ import { resolve as resolve121, join as join190, relative as relative36, dirname as dirname85 } from "node:path";
274860
274929
  import { createHash as createHash98 } from "node:crypto";
274861
274930
  import { fileURLToPath as fileURLToPath43 } from "node:url";
274862
274931
  function keyOf3(source2) {
@@ -275603,7 +275672,7 @@ __export(generate_exports, {
275603
275672
  });
275604
275673
  import { createHash as createHash99 } from "node:crypto";
275605
275674
  import { existsSync as existsSync151, mkdirSync as mkdirSync64, readdirSync as readdirSync66, readFileSync as readFileSync182, writeFileSync as writeFileSync71 } from "node:fs";
275606
- import { dirname as dirname86, join as join193 } from "node:path";
275675
+ import { dirname as dirname87, join as join193 } from "node:path";
275607
275676
  function withHeader(body) {
275608
275677
  return `${GENERATED_HEADER}${sha2568(body)}
275609
275678
  ${body}`;
@@ -275737,7 +275806,7 @@ function writeGenerated2(dir, files, opts = {}) {
275737
275806
  else outcome = "written";
275738
275807
  }
275739
275808
  if (outcome === "written" && !opts.dryRun) {
275740
- mkdirSync64(dirname86(abs), { recursive: true });
275809
+ mkdirSync64(dirname87(abs), { recursive: true });
275741
275810
  writeFileSync71(abs, next);
275742
275811
  }
275743
275812
  out2.push({ path: f2.path, outcome });
@@ -275797,7 +275866,7 @@ __export(base44_auth_exports, {
275797
275866
  });
275798
275867
  import { chmodSync as chmodSync7, existsSync as existsSync152, mkdirSync as mkdirSync65, readFileSync as readFileSync183, rmSync as rmSync46, writeFileSync as writeFileSync72 } from "node:fs";
275799
275868
  import { homedir as homedir22 } from "node:os";
275800
- import { dirname as dirname87, join as join194 } from "node:path";
275869
+ import { dirname as dirname88, join as join194 } from "node:path";
275801
275870
  function base44ApiBase(env = process.env) {
275802
275871
  return (env.BASE44_API_URL?.trim() || "https://app.base44.com").replace(/\/+$/, "");
275803
275872
  }
@@ -275816,7 +275885,7 @@ function readBase44Session(home2) {
275816
275885
  }
275817
275886
  function writeBase44Session(session, home2) {
275818
275887
  const p2 = base44SessionPath(home2);
275819
- mkdirSync65(dirname87(p2), { recursive: true, mode: 448 });
275888
+ mkdirSync65(dirname88(p2), { recursive: true, mode: 448 });
275820
275889
  writeFileSync72(p2, `${JSON.stringify(session, null, 2)}
275821
275890
  `, { mode: 384 });
275822
275891
  chmodSync7(p2, 384);
@@ -277559,7 +277628,7 @@ var init_analyze = __esm({
277559
277628
 
277560
277629
  // src/base44-analyze/write-artifacts.ts
277561
277630
  import { existsSync as existsSync156, mkdirSync as mkdirSync66, readFileSync as readFileSync186, rmSync as rmSync47, writeFileSync as writeFileSync75 } from "node:fs";
277562
- import { dirname as dirname88, join as join198, resolve as resolve124, sep as sep34 } from "node:path";
277631
+ import { dirname as dirname89, join as join198, resolve as resolve124, sep as sep34 } from "node:path";
277563
277632
  function isBookFolder(dir) {
277564
277633
  try {
277565
277634
  return JSON.parse(readFileSync186(join198(dir, "book.json"), "utf8")).kind === "base44-app-book";
@@ -277668,7 +277737,7 @@ function writeBase44Book(result, outDir, opts = {}) {
277668
277737
  if (!safeRel(f2.path)) continue;
277669
277738
  const dest = join198(sourceRoot, ...f2.path.split("/"));
277670
277739
  if (!dest.startsWith(sourceRoot + sep34)) continue;
277671
- mkdirSync66(dirname88(dest), { recursive: true });
277740
+ mkdirSync66(dirname89(dest), { recursive: true });
277672
277741
  writeFileSync75(dest, f2.bytes);
277673
277742
  }
277674
277743
  if (result.sourceFiles.length) files.push(`source/ (${result.sourceFiles.length} files)`);
@@ -283653,7 +283722,7 @@ var init_widgets_plan = __esm({
283653
283722
 
283654
283723
  // src/one-app/generate-cli.ts
283655
283724
  import { existsSync as existsSync163, mkdirSync as mkdirSync68, readdirSync as readdirSync67, readFileSync as readFileSync192, rmSync as rmSync50, writeFileSync as writeFileSync79 } from "node:fs";
283656
- import { dirname as dirname89, join as join206, resolve as resolve129 } from "node:path";
283725
+ import { dirname as dirname90, join as join206, resolve as resolve129 } from "node:path";
283657
283726
  function removeStaleGeneratedWorkers(contentDir2, current) {
283658
283727
  const root = join206(contentDir2, "tier5-src");
283659
283728
  if (!existsSync163(root)) return;
@@ -283799,7 +283868,7 @@ async function runOneAppGenerate(args, io2) {
283799
283868
  return report8(io2, false, { code: "content_invalid", error: error instanceof Error ? error.message : String(error) });
283800
283869
  }
283801
283870
  try {
283802
- mkdirSync68(dirname89(options2.out), { recursive: true });
283871
+ mkdirSync68(dirname90(options2.out), { recursive: true });
283803
283872
  writeFileSync79(options2.out, JSON.stringify(result.screens, null, 2) + "\n", "utf8");
283804
283873
  writeFileSync79(idsFile(options2.out), JSON.stringify([.../* @__PURE__ */ new Set([...previousIds, ...Object.keys(result.screens)])].sort()) + "\n", "utf8");
283805
283874
  if (homeScreenId) writeFileSync79(homeFile(options2.out), JSON.stringify({ homeScreenId }) + "\n", "utf8");
@@ -285381,7 +285450,7 @@ __export(cli_exports2, {
285381
285450
  import { closeSync as closeSync15, constants as constants13, lstatSync as lstatSync43, mkdirSync as mkdirSync71, openSync as openSync14, readFileSync as readFileSync197, realpathSync as realpathSync24, writeFileSync as writeFileSync82 } from "node:fs";
285382
285451
  import { createHash as createHash104 } from "node:crypto";
285383
285452
  import { isIP as isIP2 } from "node:net";
285384
- import { dirname as dirname90, join as join211, parse as parse12, resolve as resolve133 } from "node:path";
285453
+ import { dirname as dirname91, join as join211, parse as parse12, resolve as resolve133 } from "node:path";
285385
285454
  function nativeSiteHost(host) {
285386
285455
  if (isIP2(host.startsWith("[") ? host.slice(1, -1) : host)) return true;
285387
285456
  const labels = host.replace(/\.$/, "").split(".");
@@ -285497,7 +285566,7 @@ function assertSafeParents(path2) {
285497
285566
  throw new OneAppError("invalid_output_path", "The output parent cannot be inspected.");
285498
285567
  }
285499
285568
  }
285500
- current = dirname90(current);
285569
+ current = dirname91(current);
285501
285570
  }
285502
285571
  }
285503
285572
  function writePrivate(path2, contents, append) {
@@ -287891,7 +287960,7 @@ var init_customer_build = __esm({
287891
287960
 
287892
287961
  // src/site-analyze/apply.ts
287893
287962
  import { existsSync as existsSync168, readFileSync as readFileSync199, writeFileSync as writeFileSync83, copyFileSync as copyFileSync4, mkdirSync as mkdirSync72, realpathSync as realpathSync25, statSync as statSync54 } from "node:fs";
287894
- import { dirname as dirname91, isAbsolute as isAbsolute23, join as join213, resolve as resolve134, sep as sep35 } from "node:path";
287963
+ import { dirname as dirname92, isAbsolute as isAbsolute23, join as join213, resolve as resolve134, sep as sep35 } from "node:path";
287895
287964
  import { spawnSync as spawnSync14 } from "node:child_process";
287896
287965
  function inRepoBakeRefusal(repoRoot2, shell) {
287897
287966
  if (isBrandable(repoRoot2, shell)) return null;
@@ -288251,7 +288320,7 @@ function buildMergedContract(options2) {
288251
288320
  if (!real.startsWith(realRoot + sep35)) return void 0;
288252
288321
  try {
288253
288322
  if (!statSync54(real).isFile()) return void 0;
288254
- mkdirSync72(dirname91(to2), { recursive: true });
288323
+ mkdirSync72(dirname92(to2), { recursive: true });
288255
288324
  copyFileSync4(real, to2);
288256
288325
  } catch {
288257
288326
  return void 0;
@@ -288289,7 +288358,7 @@ function buildMergedContract(options2) {
288289
288358
  const path2 = join213(packageDir, "provisioning.contract.json");
288290
288359
  writeFileSync83(path2, body);
288291
288360
  const localPath2 = join213(appDir3, LOCAL_CONTRACT_REL);
288292
- mkdirSync72(dirname91(localPath2), { recursive: true });
288361
+ mkdirSync72(dirname92(localPath2), { recursive: true });
288293
288362
  writeFileSync83(localPath2, body);
288294
288363
  staged.push(localPath2);
288295
288364
  return { path: path2, staged };
@@ -288323,7 +288392,7 @@ function catalogTypography(overlay, template) {
288323
288392
  function staticFaqFor(overlay, overlayPath) {
288324
288393
  const own6 = overlay.faq;
288325
288394
  if (own6 !== void 0) return deriveStaticFaq(own6);
288326
- const bookPath = join213(dirname91(resolve134(overlayPath)), "book.json");
288395
+ const bookPath = join213(dirname92(resolve134(overlayPath)), "book.json");
288327
288396
  if (!existsSync168(bookPath)) return void 0;
288328
288397
  try {
288329
288398
  const book = JSON.parse(readFileSync199(bookPath, "utf8"));
@@ -288340,7 +288409,7 @@ function staticGalleriesFor(overlay, overlayPath) {
288340
288409
  if (overlay.galleries !== void 0) return deriveStaticGalleries(
288341
288410
  overlay.galleries.map((gallery) => ({ role: "gallery", title: gallery.title, galleryImageUrls: gallery.photos }))
288342
288411
  );
288343
- const bookPath = join213(dirname91(resolve134(overlayPath)), "book.json");
288412
+ const bookPath = join213(dirname92(resolve134(overlayPath)), "book.json");
288344
288413
  if (!existsSync168(bookPath)) return void 0;
288345
288414
  try {
288346
288415
  const book = JSON.parse(readFileSync199(bookPath, "utf8"));
@@ -288378,7 +288447,7 @@ async function applyOverlays(input) {
288378
288447
  if (bakeRefusal) throw Object.assign(new Error(bakeRefusal), { exit: 2, code: APPLY_SHELL_CANNOT_BAKE });
288379
288448
  const appDir3 = join213(repoRoot2, shellAppDir(shell));
288380
288449
  assertOverlayNamesSite(join213(appDir3, "provisioning.json"), overlay, `shell "${shell}"`, ` --shell ${shell}`);
288381
- const packageDir = dirname91(resolve134(input.overlayPath));
288450
+ const packageDir = dirname92(resolve134(input.overlayPath));
288382
288451
  if (input.dryRun) {
288383
288452
  return {
288384
288453
  mode: "dry",
@@ -288556,7 +288625,7 @@ async function applyOverlays(input) {
288556
288625
  else pageScreens = { added: pages2.added, replaced: pages2.replaced, removed: pages2.removed, rows: pages2.rows };
288557
288626
  }
288558
288627
  if (!input.iconPath || !existsSync168(input.iconPath)) {
288559
- const book = input.iconPath ? dirname91(dirname91(resolve134(input.iconPath))) : void 0;
288628
+ const book = input.iconPath ? dirname92(dirname92(resolve134(input.iconPath))) : void 0;
288560
288629
  notes.push(
288561
288630
  book ? `no icon installed \u2014 ${siteLogoAbsence(book).hint}` : "no icon installed and no business book to say why \u2014 `himi icon generate` draws one from the accent, or `himi icon set <file.png>` installs the customer's own mark"
288562
288631
  );
@@ -291134,7 +291203,7 @@ var init_capture = __esm({
291134
291203
  import { spawn as spawn10 } from "node:child_process";
291135
291204
  import { copyFileSync as copyFileSync5, mkdtempSync as mkdtempSync17, readFileSync as readFileSync202, rmSync as rmSync53 } from "node:fs";
291136
291205
  import { tmpdir as tmpdir18 } from "node:os";
291137
- import { basename as basename42, dirname as dirname92, join as join215, resolve as resolve137 } from "node:path";
291206
+ import { basename as basename42, dirname as dirname93, join as join215, resolve as resolve137 } from "node:path";
291138
291207
  import { fileURLToPath as fileURLToPath44 } from "node:url";
291139
291208
  function parseVerdict(value2, captured) {
291140
291209
  const v2 = value2;
@@ -291210,7 +291279,7 @@ var SOURCE_JUDGE_DIR, JUDGE_MODEL, spawnProcess, cannotTell, SEVERITY, worse, VE
291210
291279
  var init_judge = __esm({
291211
291280
  "src/fidelity/judge.ts"() {
291212
291281
  init_define_HHP_CATALOG();
291213
- SOURCE_JUDGE_DIR = resolve137(dirname92(fileURLToPath44(import.meta.url)), "../../../judges/fidelity");
291282
+ SOURCE_JUDGE_DIR = resolve137(dirname93(fileURLToPath44(import.meta.url)), "../../../judges/fidelity");
291214
291283
  JUDGE_MODEL = "claude-sonnet-5-5";
291215
291284
  spawnProcess = (cmd, args, { cwd, input, timeoutMs }) => new Promise((done) => {
291216
291285
  let stdout = "", stderr = "", timedOut = false;
@@ -295532,7 +295601,7 @@ async function functionsCommand(ctx) {
295532
295601
  init_define_HHP_CATALOG();
295533
295602
  init_guides();
295534
295603
  import { mkdirSync as mkdirSync52, writeFileSync as writeFileSync49 } from "node:fs";
295535
- import { join as join137, resolve as resolve90, dirname as dirname67 } from "node:path";
295604
+ import { join as join137, resolve as resolve90, dirname as dirname68 } from "node:path";
295536
295605
  init_cli_shared();
295537
295606
  async function mcpCommand(ctx) {
295538
295607
  const { io: io2, pos, flags, print } = ctx;
@@ -295548,7 +295617,7 @@ async function mcpCommand(ctx) {
295548
295617
  const dir2 = resolve90(out2);
295549
295618
  const files2 = himiStudioPluginFiles2();
295550
295619
  for (const f2 of files2) {
295551
- mkdirSync52(dirname67(join137(dir2, f2.path)), { recursive: true });
295620
+ mkdirSync52(dirname68(join137(dir2, f2.path)), { recursive: true });
295552
295621
  writeFileSync49(join137(dir2, f2.path), f2.text);
295553
295622
  }
295554
295623
  print({ ok: true, dir: dir2, files: files2.map((f2) => f2.path), next: [`claude plugin validate ${dir2}`, `claude --plugin-dir ${dir2}`] });
@@ -295564,7 +295633,7 @@ async function mcpCommand(ctx) {
295564
295633
  const dir = resolve90(out2);
295565
295634
  const files = himiPluginFiles2(skills.skillMd);
295566
295635
  for (const f2 of files) {
295567
- mkdirSync52(dirname67(join137(dir, f2.path)), { recursive: true });
295636
+ mkdirSync52(dirname68(join137(dir, f2.path)), { recursive: true });
295568
295637
  writeFileSync49(join137(dir, f2.path), f2.text);
295569
295638
  }
295570
295639
  print({ ok: true, dir, files: files.map((f2) => f2.path), next: [`claude plugin validate ${dir}`, `claude --plugin-dir ${dir}`] });
@@ -295584,7 +295653,7 @@ async function mcpCommand(ctx) {
295584
295653
  init_define_HHP_CATALOG();
295585
295654
  init_cli_shared();
295586
295655
  import { mkdirSync as mkdirSync53, writeFileSync as writeFileSync50, existsSync as existsSync106 } from "node:fs";
295587
- import { join as join138, resolve as resolve91, basename as basename34, dirname as dirname68 } from "node:path";
295656
+ import { join as join138, resolve as resolve91, basename as basename34, dirname as dirname69 } from "node:path";
295588
295657
  async function studioCommand(ctx) {
295589
295658
  const { io: io2, pos, flags, print } = ctx;
295590
295659
  const { openStudio: openStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
@@ -295597,7 +295666,7 @@ async function studioCommand(ctx) {
295597
295666
  const { buildReel: buildReel2 } = await Promise.resolve().then(() => (init_studio_reel(), studio_reel_exports));
295598
295667
  const out2 = resolve91(str3(flags.out) ?? join138(dir, ".himi", "making-of.html"));
295599
295668
  const { html, plan } = buildReel2(dir);
295600
- mkdirSync53(dirname68(out2), { recursive: true });
295669
+ mkdirSync53(dirname69(out2), { recursive: true });
295601
295670
  writeFileSync50(out2, html);
295602
295671
  const { pathToFileURL: pathToFileURL15 } = await import("node:url");
295603
295672
  const url2 = pathToFileURL15(out2).href;
@@ -303156,7 +303225,7 @@ import {
303156
303225
  statSync as statSync52,
303157
303226
  writeFileSync as writeFileSync69
303158
303227
  } from "node:fs";
303159
- import { basename as basename41, dirname as dirname85, join as join191, relative as relative37, resolve as resolve122 } from "node:path";
303228
+ import { basename as basename41, dirname as dirname86, join as join191, relative as relative37, resolve as resolve122 } from "node:path";
303160
303229
  var L10N_USAGE = "usage: himi l10n import --format oneapp <dir> (--app <slug> | --content <app dir>) [--locales en,he] [--source en] [--overwrite] [--json]";
303161
303230
  var MESSAGES_FILE = /^messages_(.+)\.json$/;
303162
303231
  var UnsafePath = class extends Error {
@@ -303187,7 +303256,7 @@ function unsafeDestination(appDir3, tags) {
303187
303256
  return void 0;
303188
303257
  }
303189
303258
  function writeCatalog(path2, text32) {
303190
- const tmp = join191(dirname85(path2), `.${basename41(path2)}.${process.pid}.${randomBytes25(4).toString("hex")}.tmp`);
303259
+ const tmp = join191(dirname86(path2), `.${basename41(path2)}.${process.pid}.${randomBytes25(4).toString("hex")}.tmp`);
303191
303260
  try {
303192
303261
  writeFileSync69(tmp, text32, { encoding: "utf8", flag: "wx" });
303193
303262
  renameSync26(tmp, path2);