peachsim 0.1.2680 → 0.1.2682

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 (129) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +905 -828
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +2 -2
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-KFRNGPIS.mjs → acorn-V7B4X5PR.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-SAKCEYPB.mjs → chunk-3UQZATB5.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-2DSJ4Y2B.mjs → chunk-3VAFU4BM.mjs} +4 -4
  29. package/dist-lib/esm-chunks/{chunk-6FMJ3RGV.mjs → chunk-5SWSDDXC.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-YOSTYBQ5.mjs → chunk-64UA6DQO.mjs} +3 -3
  31. package/dist-lib/esm-chunks/{chunk-63IRSGUP.mjs → chunk-6PSNFREM.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-BRJ7ARFB.mjs → chunk-AXBK3CA4.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-MA526IJY.mjs → chunk-BJHQOPWO.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-BZZUMB6S.mjs → chunk-DU3VOY6S.mjs} +6 -6
  35. package/dist-lib/esm-chunks/{chunk-UASVIFF4.mjs → chunk-EC5RY4HR.mjs} +2 -2
  36. package/dist-lib/esm-chunks/{chunk-SZLZ7MYO.mjs → chunk-EK36QRGX.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-AKMQQCL4.mjs → chunk-GNZDVDDX.mjs} +6 -6
  38. package/dist-lib/esm-chunks/{chunk-D7K24QPS.mjs → chunk-IOLISFIO.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-UTPHWDOY.mjs → chunk-KYIRROKJ.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-5ZUDE2OE.mjs → chunk-LV55WJFQ.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-54DXR7XC.mjs → chunk-PE7HDZNI.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-HTM32XYI.mjs → chunk-R2WPUKVT.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-NDNSEMKC.mjs → chunk-SZ5UPZE4.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-RXNQMOOQ.mjs → chunk-UTI6VCYT.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-ISLJJHL6.mjs → chunk-VTJTOL53.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-I567ROA6.mjs → chunk-X37OP27I.mjs} +14 -14
  47. package/dist-lib/esm-chunks/{chunk-YIBGV5BP.mjs → chunk-Y6WPXDCC.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-TTFIUXYS.mjs → chunk-YKGS4NSG.mjs} +5 -5
  49. package/dist-lib/esm-chunks/{chunk-X6TNJRLY.mjs → chunk-Z6R2HZIH.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-S2R5CB3W.mjs → chunk-ZYD227CX.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{metro-layout-parser-6ETCKA7E.mjs → metro-layout-parser-5RTSOQCS.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-GTSH3CYC.mjs → swift-package-prebuilt-EH5JIX6L.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-PUPJSKNY.mjs → swift-sdk-app-module-VHAOCBXW.mjs} +16 -16
  54. package/dist-lib/esm-chunks/{swift-sdk-image-YPS6TJTZ.mjs → swift-sdk-image-3NCWCGQZ.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-5NMRH53W.mjs → swift-sdk-image-producer-5S4IKSJ2.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +736 -659
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +741 -664
  61. package/dist-lib/host/fetch-proxy-handler.cjs +84 -81
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +410 -304
  75. package/dist-lib/native-app-identity-project.mjs +418 -312
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +87 -85
  87. package/dist-lib/public-origins-lib.json +73 -71
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +781 -704
  95. package/dist-lib/swift-compile.cjs +1 -1
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/dist-types/packages/peach-engine/src/engine/native-image-pipeline.d.ts +5 -0
  123. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +3 -0
  124. package/package.json +1 -1
  125. package/runtime-companion.json +1 -1
  126. package/src/expo-swift-host.ts +73 -31
  127. package/src/swift-xcframework.ts +13 -7
  128. package/src/turbo-codegen-intake.ts +4 -1
  129. package/src/xcode-project.ts +57 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2680 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -2706,7 +2706,7 @@ var init_process_liveness = __esm({
2706
2706
  var runtime_companion_default;
2707
2707
  var init_runtime_companion = __esm({
2708
2708
  "runtime-companion.json"() {
2709
- runtime_companion_default = { abi: 1, sha256: "daf162d4a4e16da33424ba3f1895db477c3561a9d74f1f77b381d8f6af391475", file: "node/cli-daf162d4a4e16da33424ba3f1895db477c3561a9d74f1f77b381d8f6af391475.cjs" };
2709
+ runtime_companion_default = { abi: 1, sha256: "7a60ab959af99bebbcef81dda2fe962c6eeb694ec491218da2b3b923a7e8e7a9", file: "node/cli-7a60ab959af99bebbcef81dda2fe962c6eeb694ec491218da2b3b923a7e8e7a9.cjs" };
2710
2710
  }
2711
2711
  });
2712
2712
 
@@ -6320,13 +6320,13 @@ var init_swift_standin_digest = __esm({
6320
6320
  ];
6321
6321
  RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
6322
6322
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
6323
- STANDIN_SOURCE_DIGEST = true ? "4289873bce1ce2ab2636a7dfd38503815524abc6fd13e3bb62739b7395f65b20" : standinSourceDigest();
6323
+ STANDIN_SOURCE_DIGEST = true ? "cdf4a04b8b51e0280fcba42b7e2b6356a9ea69d0c483e1a08dc29a0dafbc3207" : standinSourceDigest();
6324
6324
  }
6325
6325
  });
6326
6326
 
6327
6327
  // src/expo-native-compiler-digest.ts
6328
6328
  function expoNativeCompilerDigestValue() {
6329
- return true ? "32e5f0f006289879151f5e79955eb059b1701f32206abe1b3134a47271cca666" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
6329
+ return true ? "dd69e490ecc79ee83e8cba98c4532818a62e9b0e93c21113e2d6c21ec60d8eee" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
6330
6330
  }
6331
6331
  var import_node_crypto12;
6332
6332
  var init_expo_native_compiler_digest = __esm({
@@ -74564,7 +74564,7 @@ var init_provenance = __esm({
74564
74564
  import_node_crypto56 = require("node:crypto");
74565
74565
  import_node_fs96 = require("node:fs");
74566
74566
  import_node_path99 = require("node:path");
74567
- swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"692791414734a0fe5949c1d2638941d5de882b8737675deae2e3a49512f2a126","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"9f3d95e988cb75510a2e46eb32cf9c864a814f7e9d3c9a0a5b6ada290699f921","xcode-target-members.ts":"2379e6d411c5d63fa65ddc24c4e4fc8bfcd001b5be109b694c848fe62908db86","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path99.join)(__sootsim_import_meta_dirname, ".."));
74567
+ swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"692791414734a0fe5949c1d2638941d5de882b8737675deae2e3a49512f2a126","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"d140088a94d032e28788e18bf11499965e0c626255fd904538764ededcf1d751","xcode-target-members.ts":"2379e6d411c5d63fa65ddc24c4e4fc8bfcd001b5be109b694c848fe62908db86","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path99.join)(__sootsim_import_meta_dirname, ".."));
74568
74568
  }
74569
74569
  });
74570
74570
 
@@ -75694,6 +75694,92 @@ var init_xcode_assets = __esm({
75694
75694
  }
75695
75695
  });
75696
75696
 
75697
+ // src/swift-xcframework.ts
75698
+ function simulatorNativeLibrary(dir) {
75699
+ if (dir.endsWith(".framework")) {
75700
+ const name3 = import_node_path102.default.basename(dir, ".framework");
75701
+ return {
75702
+ name: name3,
75703
+ file: import_node_path102.default.join(dir, name3),
75704
+ slice: import_node_path102.default.dirname(dir),
75705
+ kind: "framework"
75706
+ };
75707
+ }
75708
+ if (!dir.endsWith(".xcframework")) return null;
75709
+ const info = parsePlistBytes(import_node_fs99.default.readFileSync(import_node_path102.default.join(dir, "Info.plist")));
75710
+ if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
75711
+ throw new Error(`${dir}: invalid XCFramework library declarations`);
75712
+ const matches = [];
75713
+ for (const entry of info.AvailableLibraries) {
75714
+ if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
75715
+ if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
75716
+ continue;
75717
+ if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
75718
+ throw new Error(`${dir}: invalid simulator library paths`);
75719
+ const archive = /\.a$/.test(entry.LibraryPath);
75720
+ const framework = /\.framework$/.test(entry.LibraryPath);
75721
+ if (!archive && !framework) continue;
75722
+ const slice = import_node_path102.default.resolve(dir, entry.LibraryIdentifier);
75723
+ const bundle = import_node_path102.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
75724
+ const bundleRelative = import_node_path102.default.relative(dir, bundle);
75725
+ if (bundleRelative.startsWith("..") || import_node_path102.default.isAbsolute(bundleRelative))
75726
+ throw new Error(`${dir}: library escapes its XCFramework`);
75727
+ let name3 = entry.LibraryPath;
75728
+ let file = bundle;
75729
+ if (framework) {
75730
+ name3 = import_node_path102.default.basename(bundle, ".framework");
75731
+ file = import_node_path102.default.join(bundle, name3);
75732
+ }
75733
+ const relative6 = import_node_path102.default.relative(dir, file);
75734
+ if (relative6.startsWith("..") || import_node_path102.default.isAbsolute(relative6))
75735
+ throw new Error(`${dir}: library escapes its XCFramework`);
75736
+ if (framework) {
75737
+ matches.push({ name: name3, file, slice, kind: "framework" });
75738
+ continue;
75739
+ }
75740
+ const headers = typeof entry.HeadersPath === "string" ? import_node_path102.default.resolve(slice, entry.HeadersPath) : void 0;
75741
+ if (headers && relativeInside(slice, headers) === null)
75742
+ throw new Error(`${dir}: headers escape their XCFramework slice`);
75743
+ matches.push({ name: name3, file, slice, kind: "archive", headers });
75744
+ }
75745
+ if (matches.length === 0) return null;
75746
+ if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
75747
+ return matches[0];
75748
+ }
75749
+ function isDynamicLibrary2(file) {
75750
+ const fd = import_node_fs99.default.openSync(file, "r");
75751
+ try {
75752
+ const read2 = (offset) => {
75753
+ const bytes = Buffer.alloc(16);
75754
+ import_node_fs99.default.readSync(fd, bytes, 0, 16, offset);
75755
+ return bytes;
75756
+ };
75757
+ let header = read2(0);
75758
+ const universal = header.readUInt32BE(0);
75759
+ if (universal === 3405691582 || universal === 3405691583) {
75760
+ const arch = read2(8);
75761
+ header = read2(
75762
+ universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
75763
+ );
75764
+ }
75765
+ const magic = header.readUInt32LE(0);
75766
+ return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
75767
+ } finally {
75768
+ import_node_fs99.default.closeSync(fd);
75769
+ }
75770
+ }
75771
+ var import_node_fs99, import_node_path102;
75772
+ var init_swift_xcframework = __esm({
75773
+ "src/swift-xcframework.ts"() {
75774
+ "use strict";
75775
+ import_node_fs99 = __toESM(require("node:fs"), 1);
75776
+ import_node_path102 = __toESM(require("node:path"), 1);
75777
+ init_is_record();
75778
+ init_plist_bytes();
75779
+ init_swift_source_file();
75780
+ }
75781
+ });
75782
+
75697
75783
  // src/intent-definition/system-types.ts
75698
75784
  function systemIntentType(kind, name3) {
75699
75785
  const hashes = kind === "Enum" ? systemEnumHashes : systemObjectHashes;
@@ -77301,17 +77387,17 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
77301
77387
  throw new Error(`${definition2}: invalid intent code generation language ${language}`);
77302
77388
  if (prefix) identifier(prefix);
77303
77389
  if (module2) identifier(module2);
77304
- const source = import_node_fs99.default.readFileSync(definition2);
77390
+ const source = import_node_fs100.default.readFileSync(definition2);
77305
77391
  const key2 = (0, import_node_crypto59.createHash)("sha256").update(
77306
77392
  JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
77307
77393
  ).update("\0").update(source).digest("hex");
77308
- const cache = import_node_path102.default.join(derivedDirectory, "IntentDefinitions");
77309
- const output = import_node_path102.default.join(cache, key2);
77310
- const localization = definition2.split(import_node_path102.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
77311
- const compiledRelative = import_node_path102.default.join("Resources", localization, import_node_path102.default.basename(definition2));
77312
- const compiled = import_node_path102.default.join(output, compiledRelative);
77313
- const generated = import_node_path102.default.join(output, "Sources");
77314
- if (import_node_fs99.default.existsSync(compiled) && import_node_fs99.default.existsSync(generated)) return { compiled, generated };
77394
+ const cache = import_node_path103.default.join(derivedDirectory, "IntentDefinitions");
77395
+ const output = import_node_path103.default.join(cache, key2);
77396
+ const localization = definition2.split(import_node_path103.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
77397
+ const compiledRelative = import_node_path103.default.join("Resources", localization, import_node_path103.default.basename(definition2));
77398
+ const compiled = import_node_path103.default.join(output, compiledRelative);
77399
+ const generated = import_node_path103.default.join(output, "Sources");
77400
+ if (import_node_fs100.default.existsSync(compiled) && import_node_fs100.default.existsSync(generated)) return { compiled, generated };
77315
77401
  let metadata;
77316
77402
  let sources;
77317
77403
  try {
@@ -77321,34 +77407,34 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
77321
77407
  } catch (cause) {
77322
77408
  throw new Error(`could not compile intent definition ${definition2}`, { cause });
77323
77409
  }
77324
- import_node_fs99.default.mkdirSync(cache, { recursive: true });
77325
- const stage = import_node_fs99.default.mkdtempSync(import_node_path102.default.join(cache, ".compile-"));
77410
+ import_node_fs100.default.mkdirSync(cache, { recursive: true });
77411
+ const stage = import_node_fs100.default.mkdtempSync(import_node_path103.default.join(cache, ".compile-"));
77326
77412
  try {
77327
- const sourceDirectory = import_node_path102.default.join(stage, "Sources");
77328
- const resource = import_node_path102.default.join(stage, compiledRelative);
77329
- import_node_fs99.default.mkdirSync(sourceDirectory);
77330
- import_node_fs99.default.mkdirSync(import_node_path102.default.dirname(resource), { recursive: true });
77331
- import_node_fs99.default.writeFileSync(resource, metadata);
77413
+ const sourceDirectory = import_node_path103.default.join(stage, "Sources");
77414
+ const resource = import_node_path103.default.join(stage, compiledRelative);
77415
+ import_node_fs100.default.mkdirSync(sourceDirectory);
77416
+ import_node_fs100.default.mkdirSync(import_node_path103.default.dirname(resource), { recursive: true });
77417
+ import_node_fs100.default.writeFileSync(resource, metadata);
77332
77418
  for (const [file, contents2] of sources)
77333
- import_node_fs99.default.writeFileSync(import_node_path102.default.join(sourceDirectory, file), contents2);
77419
+ import_node_fs100.default.writeFileSync(import_node_path103.default.join(sourceDirectory, file), contents2);
77334
77420
  try {
77335
- import_node_fs99.default.renameSync(stage, output);
77421
+ import_node_fs100.default.renameSync(stage, output);
77336
77422
  } catch (error) {
77337
- if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !import_node_fs99.default.existsSync(compiled) || !import_node_fs99.default.existsSync(generated))
77423
+ if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !import_node_fs100.default.existsSync(compiled) || !import_node_fs100.default.existsSync(generated))
77338
77424
  throw error;
77339
77425
  }
77340
77426
  return { compiled, generated };
77341
77427
  } finally {
77342
- import_node_fs99.default.rmSync(stage, { recursive: true, force: true });
77428
+ import_node_fs100.default.rmSync(stage, { recursive: true, force: true });
77343
77429
  }
77344
77430
  }
77345
- var import_node_crypto59, import_node_fs99, import_node_path102, intentCompilerRevision;
77431
+ var import_node_crypto59, import_node_fs100, import_node_path103, intentCompilerRevision;
77346
77432
  var init_xcode_intents = __esm({
77347
77433
  "src/xcode-intents.ts"() {
77348
77434
  "use strict";
77349
77435
  import_node_crypto59 = require("node:crypto");
77350
- import_node_fs99 = __toESM(require("node:fs"), 1);
77351
- import_node_path102 = __toESM(require("node:path"), 1);
77436
+ import_node_fs100 = __toESM(require("node:fs"), 1);
77437
+ import_node_path103 = __toESM(require("node:path"), 1);
77352
77438
  init_fields();
77353
77439
  init_metadata();
77354
77440
  init_plist_reader();
@@ -77404,7 +77490,7 @@ function remoteVersionRequirement(entry) {
77404
77490
  function readXcodeJsonProject(xcodeproj, source) {
77405
77491
  const json = Bun.JSON5.parse(source);
77406
77492
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
77407
- const projectDir = import_node_path103.default.dirname(xcodeproj);
77493
+ const projectDir = import_node_path104.default.dirname(xcodeproj);
77408
77494
  const objects = {};
77409
77495
  let next = 0;
77410
77496
  const add = (entry, id) => {
@@ -77417,7 +77503,7 @@ function readXcodeJsonProject(xcodeproj, source) {
77417
77503
  const base2 = /^<([A-Z]+)>\/(.*)$/.exec(raw2);
77418
77504
  if (base2) {
77419
77505
  if (base2[1] === "PROJECT")
77420
- return { sourceTree: "<absolute>", path: import_node_path103.default.join(projectDir, base2[2]) };
77506
+ return { sourceTree: "<absolute>", path: import_node_path104.default.join(projectDir, base2[2]) };
77421
77507
  if (base2[1] === "PRODUCTS")
77422
77508
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base2[2] };
77423
77509
  return null;
@@ -77425,7 +77511,7 @@ function readXcodeJsonProject(xcodeproj, source) {
77425
77511
  const unescaped = raw2.replaceAll("\\<", "<");
77426
77512
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
77427
77513
  if (unescaped.startsWith("~")) return null;
77428
- return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path103.default.join(groupDir, unescaped) };
77514
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path104.default.join(groupDir, unescaped) };
77429
77515
  };
77430
77516
  const memberships = [];
77431
77517
  const folders = [];
@@ -77436,7 +77522,7 @@ function readXcodeJsonProject(xcodeproj, source) {
77436
77522
  const kind = text6(entry.kind) ?? "file-reference";
77437
77523
  const raw2 = text6(entry.path) ?? "";
77438
77524
  const located = raw2 === "" ? null : locate(raw2, parent.dir);
77439
- const name3 = text6(entry.name) ?? import_node_path103.default.basename(raw2);
77525
+ const name3 = text6(entry.name) ?? import_node_path104.default.basename(raw2);
77440
77526
  const node = { id: "", name: name3, dir: null, parent, children: [] };
77441
77527
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
77442
77528
  node.dir = raw2 === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -77557,7 +77643,7 @@ function readXcodeJsonProject(xcodeproj, source) {
77557
77643
  if (!isObject(entry)) continue;
77558
77644
  const repository = text6(entry.repository);
77559
77645
  const local = text6(entry.path);
77560
- const name3 = local !== void 0 ? import_node_path103.default.basename(import_node_path103.default.resolve(import_node_path103.default.dirname(xcodeproj), local)) : import_node_path103.default.basename(repository ?? "").replace(/\.git$/, "");
77646
+ const name3 = local !== void 0 ? import_node_path104.default.basename(import_node_path104.default.resolve(import_node_path104.default.dirname(xcodeproj), local)) : import_node_path104.default.basename(repository ?? "").replace(/\.git$/, "");
77561
77647
  const id = text6(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
77562
77648
  isa: "XCRemoteSwiftPackageReference",
77563
77649
  repositoryURL: repository ?? "",
@@ -77729,11 +77815,11 @@ function readXcodeJsonProject(xcodeproj, source) {
77729
77815
  function isJsonObject(value) {
77730
77816
  return typeof value === "object" && value !== null && !Array.isArray(value);
77731
77817
  }
77732
- var import_node_path103, isObject, text6, items, PHASE_ISA;
77818
+ var import_node_path104, isObject, text6, items, PHASE_ISA;
77733
77819
  var init_xcode_json_project = __esm({
77734
77820
  "src/xcode-json-project.ts"() {
77735
77821
  "use strict";
77736
- import_node_path103 = __toESM(require("node:path"), 1);
77822
+ import_node_path104 = __toESM(require("node:path"), 1);
77737
77823
  isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
77738
77824
  text6 = (value) => typeof value === "string" ? value : void 0;
77739
77825
  items = (value) => Array.isArray(value) ? value : [];
@@ -77815,27 +77901,27 @@ var init_xcode_swift_features = __esm({
77815
77901
 
77816
77902
  // src/xcode-project.ts
77817
77903
  function walkFiles(dir) {
77818
- if (!import_node_fs100.default.existsSync(dir)) return [];
77904
+ if (!import_node_fs101.default.existsSync(dir)) return [];
77819
77905
  const out = [];
77820
- for (const entry of import_node_fs100.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
77906
+ for (const entry of import_node_fs101.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
77821
77907
  if (entry.name.startsWith(".")) continue;
77822
- const full = import_node_path104.default.join(dir, entry.name);
77908
+ const full = import_node_path105.default.join(dir, entry.name);
77823
77909
  if (entry.isDirectory()) out.push(...walkFiles(full));
77824
77910
  else if (entry.isFile()) out.push(full);
77825
77911
  }
77826
77912
  return out;
77827
77913
  }
77828
77914
  function readXcconfig(file, read2) {
77829
- if (read2.includes(file) || !import_node_fs100.default.existsSync(file)) return {};
77915
+ if (read2.includes(file) || !import_node_fs101.default.existsSync(file)) return {};
77830
77916
  read2.push(file);
77831
77917
  const settings = {};
77832
- for (const raw2 of import_node_fs100.default.readFileSync(file, "utf8").split("\n")) {
77918
+ for (const raw2 of import_node_fs101.default.readFileSync(file, "utf8").split("\n")) {
77833
77919
  const line = raw2.replace(/\/\/.*$/, "").trim();
77834
77920
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
77835
77921
  if (include) {
77836
77922
  Object.assign(
77837
77923
  settings,
77838
- readXcconfig(import_node_path104.default.resolve(import_node_path104.default.dirname(file), include[1]), read2)
77924
+ readXcconfig(import_node_path105.default.resolve(import_node_path105.default.dirname(file), include[1]), read2)
77839
77925
  );
77840
77926
  continue;
77841
77927
  }
@@ -77880,8 +77966,8 @@ function applyOperator(value, operator) {
77880
77966
  return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
77881
77967
  case "standardizepath":
77882
77968
  if (value === ".") return value;
77883
- if (import_node_path104.default.posix.isAbsolute(value))
77884
- return import_node_path104.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
77969
+ if (import_node_path105.default.posix.isAbsolute(value))
77970
+ return import_node_path105.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
77885
77971
  return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
77886
77972
  }
77887
77973
  throw new Error(`unsupported build setting operator :${operator}`);
@@ -77890,22 +77976,22 @@ function decodeXml(text7) {
77890
77976
  return text7.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
77891
77977
  }
77892
77978
  function workspaceReferences(workspace) {
77893
- const data = import_node_path104.default.join(workspace, "contents.xcworkspacedata");
77894
- if (!import_node_fs100.default.existsSync(data))
77979
+ const data = import_node_path105.default.join(workspace, "contents.xcworkspacedata");
77980
+ if (!import_node_fs101.default.existsSync(data))
77895
77981
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
77896
- const container = import_node_path104.default.dirname(workspace);
77982
+ const container = import_node_path105.default.dirname(workspace);
77897
77983
  const locate = (location, base2) => {
77898
77984
  const colon = location.indexOf(":");
77899
77985
  const kind = location.slice(0, colon);
77900
77986
  const rest = location.slice(colon + 1);
77901
- if (kind === "group") return import_node_path104.default.resolve(base2, rest);
77902
- if (kind === "container" || kind === "self") return import_node_path104.default.resolve(container, rest);
77903
- if (kind === "absolute") return import_node_path104.default.resolve(rest);
77904
- throw new Error(`${import_node_path104.default.basename(workspace)} has an unsupported location ${location}`);
77987
+ if (kind === "group") return import_node_path105.default.resolve(base2, rest);
77988
+ if (kind === "container" || kind === "self") return import_node_path105.default.resolve(container, rest);
77989
+ if (kind === "absolute") return import_node_path105.default.resolve(rest);
77990
+ throw new Error(`${import_node_path105.default.basename(workspace)} has an unsupported location ${location}`);
77905
77991
  };
77906
77992
  const groups = [container];
77907
77993
  const references = [];
77908
- for (const [, closing, tag, attributes, selfClosing] of import_node_fs100.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
77994
+ for (const [, closing, tag, attributes, selfClosing] of import_node_fs101.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
77909
77995
  if (closing) {
77910
77996
  if (tag === "Group") groups.pop();
77911
77997
  continue;
@@ -77919,29 +78005,29 @@ function workspaceReferences(workspace) {
77919
78005
  return references;
77920
78006
  }
77921
78007
  function enclosingXcodeWorkspace(xcodeproj) {
77922
- const project2 = import_node_fs100.default.realpathSync.native(xcodeproj);
77923
- for (let dir = import_node_path104.default.dirname(project2); ; dir = import_node_path104.default.dirname(dir)) {
77924
- for (const name3 of import_node_fs100.default.readdirSync(dir).sort()) {
78008
+ const project2 = import_node_fs101.default.realpathSync.native(xcodeproj);
78009
+ for (let dir = import_node_path105.default.dirname(project2); ; dir = import_node_path105.default.dirname(dir)) {
78010
+ for (const name3 of import_node_fs101.default.readdirSync(dir).sort()) {
77925
78011
  if (!name3.endsWith(".xcworkspace")) continue;
77926
- const workspace = import_node_path104.default.join(dir, name3);
77927
- if (!import_node_fs100.default.existsSync(import_node_path104.default.join(workspace, "contents.xcworkspacedata"))) continue;
78012
+ const workspace = import_node_path105.default.join(dir, name3);
78013
+ if (!import_node_fs101.default.existsSync(import_node_path105.default.join(workspace, "contents.xcworkspacedata"))) continue;
77928
78014
  if (workspaceReferences(workspace).some(
77929
- (reference) => import_node_fs100.default.existsSync(reference) && import_node_fs100.default.realpathSync.native(reference) === project2
78015
+ (reference) => import_node_fs101.default.existsSync(reference) && import_node_fs101.default.realpathSync.native(reference) === project2
77930
78016
  ))
77931
78017
  return workspace;
77932
78018
  }
77933
- if (import_node_fs100.default.existsSync(import_node_path104.default.join(dir, ".git")) || import_node_path104.default.dirname(dir) === dir) return null;
78019
+ if (import_node_fs101.default.existsSync(import_node_path105.default.join(dir, ".git")) || import_node_path105.default.dirname(dir) === dir) return null;
77934
78020
  }
77935
78021
  }
77936
78022
  function findXcodeProject(input) {
77937
- const resolved = import_node_path104.default.resolve(input);
78023
+ const resolved = import_node_path105.default.resolve(input);
77938
78024
  if (resolved.endsWith(".xcworkspace")) {
77939
- return import_node_path104.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path104.default.dirname(resolved) : resolved;
78025
+ return import_node_path105.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path105.default.dirname(resolved) : resolved;
77940
78026
  }
77941
78027
  if (resolved.endsWith(".xcodeproj")) return resolved;
77942
78028
  if (!isDirectory3(resolved)) return null;
77943
78029
  for (const extension of [".xcworkspace", ".xcodeproj"]) {
77944
- const found2 = import_node_fs100.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
78030
+ const found2 = import_node_fs101.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
77945
78031
  if (found2.length > 1) {
77946
78032
  if (extension === ".xcworkspace") {
77947
78033
  const selected = selectXcodeWorkspace(resolved, found2);
@@ -77951,14 +78037,14 @@ function findXcodeProject(input) {
77951
78037
  `${resolved} holds ${found2.length} ${extension} bundles (${found2.join(", ")}); pass one`
77952
78038
  );
77953
78039
  }
77954
- if (found2.length === 1) return import_node_path104.default.join(resolved, found2[0]);
78040
+ if (found2.length === 1) return import_node_path105.default.join(resolved, found2[0]);
77955
78041
  }
77956
78042
  return null;
77957
78043
  }
77958
78044
  function sameXcodeProject(reference, xcodeproj) {
77959
- if (import_node_path104.default.normalize(reference) === import_node_path104.default.normalize(xcodeproj)) return true;
78045
+ if (import_node_path105.default.normalize(reference) === import_node_path105.default.normalize(xcodeproj)) return true;
77960
78046
  try {
77961
- return import_node_fs100.default.existsSync(reference) && import_node_fs100.default.existsSync(xcodeproj) && import_node_fs100.default.realpathSync.native(reference) === import_node_fs100.default.realpathSync.native(xcodeproj);
78047
+ return import_node_fs101.default.existsSync(reference) && import_node_fs101.default.existsSync(xcodeproj) && import_node_fs101.default.realpathSync.native(reference) === import_node_fs101.default.realpathSync.native(xcodeproj);
77962
78048
  } catch {
77963
78049
  return false;
77964
78050
  }
@@ -77966,38 +78052,38 @@ function sameXcodeProject(reference, xcodeproj) {
77966
78052
  function selectXcodeWorkspace(directory2, workspaces) {
77967
78053
  const sorted2 = [...workspaces].sort();
77968
78054
  if (sorted2.length === 0) return null;
77969
- if (sorted2.length === 1) return import_node_path104.default.join(directory2, sorted2[0]);
77970
- const xcodeprojs = import_node_fs100.default.readdirSync(directory2).filter((name3) => name3.endsWith(".xcodeproj")).sort();
78055
+ if (sorted2.length === 1) return import_node_path105.default.join(directory2, sorted2[0]);
78056
+ const xcodeprojs = import_node_fs101.default.readdirSync(directory2).filter((name3) => name3.endsWith(".xcodeproj")).sort();
77971
78057
  if (xcodeprojs.length !== 1) return null;
77972
- const app = import_node_path104.default.join(directory2, xcodeprojs[0]);
78058
+ const app = import_node_path105.default.join(directory2, xcodeprojs[0]);
77973
78059
  const referencing = sorted2.filter((workspace) => {
77974
78060
  try {
77975
- return workspaceReferences(import_node_path104.default.join(directory2, workspace)).some(
78061
+ return workspaceReferences(import_node_path105.default.join(directory2, workspace)).some(
77976
78062
  (reference) => sameXcodeProject(reference, app)
77977
78063
  );
77978
78064
  } catch {
77979
78065
  return false;
77980
78066
  }
77981
78067
  });
77982
- if (referencing.length === 1) return import_node_path104.default.join(directory2, referencing[0]);
78068
+ if (referencing.length === 1) return import_node_path105.default.join(directory2, referencing[0]);
77983
78069
  if (referencing.length === 0) return null;
77984
- const own2 = `${import_node_path104.default.basename(app, ".xcodeproj")}.xcworkspace`;
78070
+ const own2 = `${import_node_path105.default.basename(app, ".xcodeproj")}.xcworkspace`;
77985
78071
  const named = referencing.filter((workspace) => workspace === own2);
77986
- return named.length === 1 ? import_node_path104.default.join(directory2, named[0]) : null;
78072
+ return named.length === 1 ? import_node_path105.default.join(directory2, named[0]) : null;
77987
78073
  }
77988
78074
  function installedXcodeWorkspace(projectRoot) {
77989
- const ios = import_node_path104.default.join(projectRoot, "ios");
77990
- if (!import_node_fs100.default.existsSync(ios)) return null;
78075
+ const ios = import_node_path105.default.join(projectRoot, "ios");
78076
+ if (!import_node_fs101.default.existsSync(ios)) return null;
77991
78077
  return selectXcodeWorkspace(
77992
78078
  ios,
77993
- import_node_fs100.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
78079
+ import_node_fs101.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
77994
78080
  );
77995
78081
  }
77996
78082
  function requireInstalledXcodeWorkspace(projectRoot, needed) {
77997
78083
  const workspace = installedXcodeWorkspace(projectRoot);
77998
78084
  if (!workspace)
77999
78085
  throw new Error(
78000
- `${needed} needs an installed pod workspace in ${import_node_path104.default.join(projectRoot, "ios")}`
78086
+ `${needed} needs an installed pod workspace in ${import_node_path105.default.join(projectRoot, "ios")}`
78001
78087
  );
78002
78088
  return workspace;
78003
78089
  }
@@ -78038,8 +78124,8 @@ function remotePackageRequirements(projects2) {
78038
78124
  }
78039
78125
  function xcodeProjectFile(xcodeproj) {
78040
78126
  for (const name3 of ["project.pbxproj", "project.xcproj"]) {
78041
- const file = import_node_path104.default.join(xcodeproj, name3);
78042
- if (import_node_fs100.default.existsSync(file)) return file;
78127
+ const file = import_node_path105.default.join(xcodeproj, name3);
78128
+ if (import_node_fs101.default.existsSync(file)) return file;
78043
78129
  }
78044
78130
  return null;
78045
78131
  }
@@ -78047,7 +78133,7 @@ function loadProject(xcodeproj) {
78047
78133
  const projectFile = xcodeProjectFile(xcodeproj);
78048
78134
  if (!projectFile)
78049
78135
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
78050
- const source = import_node_fs100.default.readFileSync(projectFile, "utf8");
78136
+ const source = import_node_fs101.default.readFileSync(projectFile, "utf8");
78051
78137
  const digest3 = (0, import_node_crypto60.createHash)("sha256").update(source).digest("hex");
78052
78138
  const cached4 = loaded3.get(projectFile);
78053
78139
  if (cached4?.digest === digest3) return cached4.project;
@@ -78064,10 +78150,10 @@ function loadProject(xcodeproj) {
78064
78150
  if (!project2 || project2.isa !== "PBXProject") {
78065
78151
  throw new Error(`${projectFile} has no PBXProject root`);
78066
78152
  }
78067
- const projectDir = import_node_fs100.default.realpathSync.native(
78068
- import_node_path104.default.resolve(import_node_path104.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
78153
+ const projectDir = import_node_fs101.default.realpathSync.native(
78154
+ import_node_path105.default.resolve(import_node_path105.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
78069
78155
  );
78070
- const resolvePath = xcodePathResolver(objects, projectDir, import_node_path104.default.join);
78156
+ const resolvePath = xcodePathResolver(objects, projectDir, import_node_path105.default.join);
78071
78157
  const result = {
78072
78158
  xcodeproj,
78073
78159
  projectFile,
@@ -78098,9 +78184,9 @@ function xcodeInstallationIdentity() {
78098
78184
  if (process.platform !== "darwin") return null;
78099
78185
  const selected = process.env.DEVELOPER_DIR || selectedDeveloperDir(true);
78100
78186
  if (!selected) return null;
78101
- const directory2 = import_node_path104.default.extname(selected) === ".app" ? import_node_path104.default.join(selected, "Contents", "Developer") : selected;
78187
+ const directory2 = import_node_path105.default.extname(selected) === ".app" ? import_node_path105.default.join(selected, "Contents", "Developer") : selected;
78102
78188
  const versionFile = `${directory2}/../version.plist`;
78103
- const version2 = import_node_fs100.default.existsSync(versionFile) ? (0, import_node_crypto60.createHash)("sha256").update(import_node_fs100.default.readFileSync(versionFile)).digest("hex") : null;
78189
+ const version2 = import_node_fs101.default.existsSync(versionFile) ? (0, import_node_crypto60.createHash)("sha256").update(import_node_fs101.default.readFileSync(versionFile)).digest("hex") : null;
78104
78190
  return { directory: directory2, version: version2 };
78105
78191
  }
78106
78192
  function defaultConfiguration(project2) {
@@ -78120,7 +78206,7 @@ function expandValue(value, settings) {
78120
78206
  return value;
78121
78207
  }
78122
78208
  function processedInfoPlist(name3, file, settings, settingKeys) {
78123
- const source = file ? parsePlist(import_node_fs100.default.readFileSync(file, "utf8")) : {};
78209
+ const source = file ? parsePlist(import_node_fs101.default.readFileSync(file, "utf8")) : {};
78124
78210
  if (!source || typeof source !== "object" || Array.isArray(source) || source instanceof Date || Buffer.isBuffer(source))
78125
78211
  throw new Error(`${name3} Info.plist must contain a dictionary`);
78126
78212
  const info = {};
@@ -78160,8 +78246,8 @@ function targetSettings(ref, configuration2, builtins, options2 = {}, overrides
78160
78246
  const relative6 = str2(config.baseConfigurationReferenceRelativePath);
78161
78247
  const own2 = isDict(config.buildSettings) ? config.buildSettings : {};
78162
78248
  const directory2 = anchor ? project2.resolvePath(anchor) : null;
78163
- const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative6 ? import_node_path104.default.resolve(directory2, relative6) : null;
78164
- if ((options2.requireSources !== false || options2.installedPods) && (base2 || anchor || relative6) && (!baseFile || !import_node_fs100.default.existsSync(baseFile)))
78249
+ const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative6 ? import_node_path105.default.resolve(directory2, relative6) : null;
78250
+ if ((options2.requireSources !== false || options2.installedPods) && (base2 || anchor || relative6) && (!baseFile || !import_node_fs101.default.existsSync(baseFile)))
78165
78251
  throw new Error(
78166
78252
  `Unable to open base configuration reference file '${baseFile ?? base2 ?? relative6 ?? anchor}'`
78167
78253
  );
@@ -78255,10 +78341,10 @@ function hostMacroPluginFlags(flags) {
78255
78341
  if (flags[index - 1] !== "-load-plugin-executable") return flag;
78256
78342
  const separator = flag.lastIndexOf("#");
78257
78343
  if (separator < 0) return flag;
78258
- const root = import_node_path104.default.dirname(import_node_path104.default.dirname(flag.slice(0, separator)));
78259
- const manifest = import_node_path104.default.join(root, "package.json");
78260
- if (!import_node_fs100.default.existsSync(manifest)) return flag;
78261
- const pkg = JSON.parse(import_node_fs100.default.readFileSync(manifest, "utf8"));
78344
+ const root = import_node_path105.default.dirname(import_node_path105.default.dirname(flag.slice(0, separator)));
78345
+ const manifest = import_node_path105.default.join(root, "package.json");
78346
+ if (!import_node_fs101.default.existsSync(manifest)) return flag;
78347
+ const pkg = JSON.parse(import_node_fs101.default.readFileSync(manifest, "utf8"));
78262
78348
  if (!isRecord(pkg) || pkg.name !== "expo-modules-macros") return flag;
78263
78349
  const macros = (0, import_node_module9.createRequire)(manifest)(root);
78264
78350
  if (!isRecord(macros) || typeof macros.getScannerBinaryPath !== "function")
@@ -78276,26 +78362,26 @@ function scriptCommand(shell, script) {
78276
78362
  return [executable, ...args, "-c", script];
78277
78363
  }
78278
78364
  function expandSearchPath(directory2, rules2) {
78279
- if (import_node_path104.default.basename(directory2) !== "**") return [directory2];
78365
+ if (import_node_path105.default.basename(directory2) !== "**") return [directory2];
78280
78366
  const expanded = [];
78281
78367
  const seen = /* @__PURE__ */ new Set();
78282
- const queue = [import_node_path104.default.dirname(directory2)];
78368
+ const queue = [import_node_path105.default.dirname(directory2)];
78283
78369
  for (let at = 0; at < queue.length; at++) {
78284
78370
  const current2 = queue[at];
78285
78371
  let real;
78286
78372
  try {
78287
- real = import_node_fs100.default.realpathSync.native(current2);
78373
+ real = import_node_fs101.default.realpathSync.native(current2);
78288
78374
  } catch {
78289
78375
  continue;
78290
78376
  }
78291
- if (!import_node_fs100.default.statSync(real).isDirectory() || seen.has(real)) continue;
78377
+ if (!import_node_fs101.default.statSync(real).isDirectory() || seen.has(real)) continue;
78292
78378
  seen.add(real);
78293
78379
  expanded.push(current2);
78294
- for (const entry of import_node_fs100.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
78380
+ for (const entry of import_node_fs101.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
78295
78381
  if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
78296
78382
  if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
78297
78383
  continue;
78298
- queue.push(import_node_path104.default.join(current2, entry.name));
78384
+ queue.push(import_node_path105.default.join(current2, entry.name));
78299
78385
  }
78300
78386
  }
78301
78387
  return expanded;
@@ -78306,7 +78392,7 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
78306
78392
  const rules2 = recursiveSearchRules(settings);
78307
78393
  const directories = new Set(
78308
78394
  settingList(settings("LIBRARY_SEARCH_PATHS")).flatMap(
78309
- (raw2) => expandSearchPath(import_node_path104.default.resolve(projectDir, expand(raw2, settings)), rules2)
78395
+ (raw2) => expandSearchPath(import_node_path105.default.resolve(projectDir, expand(raw2, settings)), rules2)
78310
78396
  )
78311
78397
  );
78312
78398
  const resolved = [];
@@ -78319,18 +78405,18 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
78319
78405
  }
78320
78406
  let archive;
78321
78407
  for (const directory2 of directories) {
78322
- const file = (extension) => import_node_path104.default.join(directory2, `lib${name3}.${extension}`);
78408
+ const file = (extension) => import_node_path105.default.join(directory2, `lib${name3}.${extension}`);
78323
78409
  const dylib = file("dylib");
78324
- const parent = import_node_path104.default.dirname(dylib);
78410
+ const parent = import_node_path105.default.dirname(dylib);
78325
78411
  let present = libraryDirectories.get(parent);
78326
78412
  if (present === void 0) {
78327
- present = import_node_fs100.default.existsSync(parent);
78413
+ present = import_node_fs101.default.existsSync(parent);
78328
78414
  libraryDirectories.set(parent, present);
78329
78415
  }
78330
78416
  if (!present) continue;
78331
- if (import_node_fs100.default.existsSync(dylib) || import_node_fs100.default.existsSync(file("tbd"))) break;
78417
+ if (import_node_fs101.default.existsSync(dylib) || import_node_fs101.default.existsSync(file("tbd"))) break;
78332
78418
  const staticLibrary = file("a");
78333
- if (!import_node_fs100.default.existsSync(staticLibrary)) continue;
78419
+ if (!import_node_fs101.default.existsSync(staticLibrary)) continue;
78334
78420
  archive = staticLibrary;
78335
78421
  break;
78336
78422
  }
@@ -78427,7 +78513,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
78427
78513
  for (const token of tokens2) {
78428
78514
  if (token.startsWith("-")) break;
78429
78515
  const file = resolve11(token);
78430
- if (file?.endsWith(".xcassets")) catalogs.push(import_node_path104.default.resolve(projectDir, file));
78516
+ if (file?.endsWith(".xcassets")) catalogs.push(import_node_path105.default.resolve(projectDir, file));
78431
78517
  }
78432
78518
  }
78433
78519
  return catalogs;
@@ -78472,14 +78558,14 @@ function shellCopies(script, settings, projectDir) {
78472
78558
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
78473
78559
  return [];
78474
78560
  copies.push({
78475
- from: import_node_path104.default.resolve(projectDir, operands[0]),
78476
- to: import_node_path104.default.resolve(projectDir, operands[1])
78561
+ from: import_node_path105.default.resolve(projectDir, operands[0]),
78562
+ to: import_node_path105.default.resolve(projectDir, operands[1])
78477
78563
  });
78478
78564
  }
78479
78565
  return copies;
78480
78566
  }
78481
78567
  function fileListEntries(file, absolute) {
78482
- return import_node_fs100.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
78568
+ return import_node_fs101.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
78483
78569
  }
78484
78570
  function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78485
78571
  const { project: project2, target, id: targetId } = ref;
@@ -78493,17 +78579,17 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78493
78579
  const copiedFiles = [];
78494
78580
  let generatedInfoPlist = false;
78495
78581
  const declaredInfoPlist = settings("INFOPLIST_FILE");
78496
- const infoPlistOutput = declaredInfoPlist ? import_node_path104.default.resolve(project2.projectDir, declaredInfoPlist) : null;
78582
+ const infoPlistOutput = declaredInfoPlist ? import_node_path105.default.resolve(project2.projectDir, declaredInfoPlist) : null;
78497
78583
  const isPreparedOutput = (file) => file === infoPlistOutput || options2.requireSources !== false && file.endsWith(".swift");
78498
78584
  let absentSources = false;
78499
78585
  if (options2.prepareGeneratedSources === true && options2.requireSources !== false)
78500
78586
  project2.visitMembers(
78501
78587
  targetId,
78502
- xcodePathResolver(project2.objects, project2.projectDir, import_node_path104.default.join, settings),
78503
- (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs100.default.existsSync(file) ? [file] : [],
78504
- import_node_path104.default.join,
78588
+ xcodePathResolver(project2.objects, project2.projectDir, import_node_path105.default.join, settings),
78589
+ (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs101.default.existsSync(file) ? [file] : [],
78590
+ import_node_path105.default.join,
78505
78591
  (file, kind) => {
78506
- if (kind !== "header" && kind !== "resource" && !import_node_fs100.default.existsSync(file))
78592
+ if (kind !== "header" && kind !== "resource" && !import_node_fs101.default.existsSync(file))
78507
78593
  absentSources = true;
78508
78594
  }
78509
78595
  );
@@ -78522,7 +78608,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78522
78608
  copiedFiles.push(
78523
78609
  ...shellCopies(str2(phase.shellScript) ?? "", settings, project2.projectDir)
78524
78610
  );
78525
- const absolute = (raw2) => import_node_path104.default.resolve(project2.projectDir, expand(raw2, settings));
78611
+ const absolute = (raw2) => import_node_path105.default.resolve(project2.projectDir, expand(raw2, settings));
78526
78612
  const inputs2 = list(phase.inputPaths).map(absolute);
78527
78613
  const outputs = list(phase.outputPaths).map(absolute);
78528
78614
  const fileLists = /* @__PURE__ */ new Map();
@@ -78531,7 +78617,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78531
78617
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
78532
78618
  ).map((raw2) => {
78533
78619
  const file = absolute(raw2);
78534
- if (!import_node_fs100.default.existsSync(file)) {
78620
+ if (!import_node_fs101.default.existsSync(file)) {
78535
78621
  return { file, entries: [] };
78536
78622
  }
78537
78623
  return { file, entries: fileListEntries(file, absolute) };
@@ -78552,14 +78638,14 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78552
78638
  ...fileLists.get("OUTPUT").map((item) => item.file)
78553
78639
  ];
78554
78640
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
78555
- for (const file of inputFiles) if (import_node_fs100.default.existsSync(file)) projectInputs.add(file);
78641
+ for (const file of inputFiles) if (import_node_fs101.default.existsSync(file)) projectInputs.add(file);
78556
78642
  }
78557
78643
  const undeclaredGenerator = absentSources && beforeSources && allOutputs.length === 0 && str2(phase.runOnlyForDeploymentPostprocessing) !== "1";
78558
78644
  if (options2.prepareGeneratedSources === true && (allOutputs.some(isPreparedOutput) || undeclaredGenerator)) {
78559
- const phaseDir = import_node_path104.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
78645
+ const phaseDir = import_node_path105.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
78560
78646
  for (const lists of fileLists.values())
78561
78647
  for (const { file } of lists)
78562
- if (!import_node_fs100.default.existsSync(file))
78648
+ if (!import_node_fs101.default.existsSync(file))
78563
78649
  throw new Error(
78564
78650
  `${targetName}: Run Script "${script}" missing file list ${file}`
78565
78651
  );
@@ -78578,7 +78664,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78578
78664
  const lists = fileLists.get(kind);
78579
78665
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
78580
78666
  lists.forEach((_item, index) => {
78581
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path104.default.join(
78667
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path105.default.join(
78582
78668
  phaseDir,
78583
78669
  `${kind}-${index}.xcfilelist`
78584
78670
  );
@@ -78589,22 +78675,22 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78589
78675
  );
78590
78676
  for (const file of inputFiles) {
78591
78677
  signature2.update(file);
78592
- if (import_node_fs100.default.existsSync(file)) {
78593
- const stat2 = import_node_fs100.default.statSync(file);
78678
+ if (import_node_fs101.default.existsSync(file)) {
78679
+ const stat2 = import_node_fs101.default.statSync(file);
78594
78680
  signature2.update(`${stat2.mtimeMs}:${stat2.ctimeMs}:${stat2.size}`);
78595
78681
  } else signature2.update("missing");
78596
78682
  }
78597
78683
  const stamp = signature2.digest("hex");
78598
78684
  const key2 = `${project2.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
78599
- if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs100.default.existsSync(file)))
78685
+ if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs101.default.existsSync(file)))
78600
78686
  continue;
78601
- import_node_fs100.default.mkdirSync(phaseDir, { recursive: true });
78687
+ import_node_fs101.default.mkdirSync(phaseDir, { recursive: true });
78602
78688
  if (process.platform === "linux") {
78603
78689
  const bin = swiftToolchainBin(
78604
78690
  privateSwiftRelease() ?? swiftNativePin().distribution.release
78605
78691
  );
78606
- const startup = import_node_path104.default.join(phaseDir, "peach-tools.sh");
78607
- import_node_fs100.default.writeFileSync(
78692
+ const startup = import_node_path105.default.join(phaseDir, "peach-tools.sh");
78693
+ import_node_fs101.default.writeFileSync(
78608
78694
  startup,
78609
78695
  'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
78610
78696
  );
@@ -78613,15 +78699,15 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78613
78699
  env.PEACH_PHASE_TOOLCHAIN = bin;
78614
78700
  env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
78615
78701
  env.BASH_ENV = startup;
78616
- env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path104.default.delimiter);
78702
+ env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path105.default.delimiter);
78617
78703
  }
78618
- import_node_fs100.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
78619
- import_node_fs100.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
78704
+ import_node_fs101.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
78705
+ import_node_fs101.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
78620
78706
  for (const output of allOutputs)
78621
- import_node_fs100.default.mkdirSync(import_node_path104.default.dirname(output), { recursive: true });
78707
+ import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
78622
78708
  for (const [kind, lists] of fileLists)
78623
78709
  lists.forEach((item, index) => {
78624
- import_node_fs100.default.writeFileSync(
78710
+ import_node_fs101.default.writeFileSync(
78625
78711
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
78626
78712
  `${item.entries.join("\n")}
78627
78713
  `
@@ -78629,9 +78715,9 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
78629
78715
  });
78630
78716
  const rawScript = str2(phase.shellScript) ?? "";
78631
78717
  if (rawScript.includes("generate-modules-provider")) {
78632
- const preloadPath = import_node_path104.default.join(phaseDir, "expo-scan-timeout.cjs");
78633
- import_node_fs100.default.mkdirSync(phaseDir, { recursive: true });
78634
- import_node_fs100.default.writeFileSync(
78718
+ const preloadPath = import_node_path105.default.join(phaseDir, "expo-scan-timeout.cjs");
78719
+ import_node_fs101.default.mkdirSync(phaseDir, { recursive: true });
78720
+ import_node_fs101.default.writeFileSync(
78635
78721
  preloadPath,
78636
78722
  [
78637
78723
  "const cp = require('node:child_process');",
@@ -78669,7 +78755,7 @@ ${output}`
78669
78755
  );
78670
78756
  }
78671
78757
  const missing2 = allOutputs.filter(
78672
- (file) => file === infoPlistOutput && !import_node_fs100.default.existsSync(file)
78758
+ (file) => file === infoPlistOutput && !import_node_fs101.default.existsSync(file)
78673
78759
  );
78674
78760
  if (missing2.length > 0)
78675
78761
  throw new Error(
@@ -78680,9 +78766,9 @@ ${output}`
78680
78766
  }
78681
78767
  project2.visitMembers(
78682
78768
  targetId,
78683
- xcodePathResolver(project2.objects, project2.projectDir, import_node_path104.default.join, settings),
78684
- (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs100.default.existsSync(file) ? [file] : [],
78685
- import_node_path104.default.join,
78769
+ xcodePathResolver(project2.objects, project2.projectDir, import_node_path105.default.join, settings),
78770
+ (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs101.default.existsSync(file) ? [file] : [],
78771
+ import_node_path105.default.join,
78686
78772
  (file, kind, bundleName) => {
78687
78773
  if (kind === "header") {
78688
78774
  headers.add(file);
@@ -78693,9 +78779,9 @@ ${output}`
78693
78779
  if (bundleName) resourceNames[file] = bundleName;
78694
78780
  return;
78695
78781
  }
78696
- if (!import_node_fs100.default.existsSync(file)) {
78782
+ if (!import_node_fs101.default.existsSync(file)) {
78697
78783
  if (options2.requireSources === false) return;
78698
- const script = scriptForOutput.get(import_node_path104.default.normalize(file));
78784
+ const script = scriptForOutput.get(import_node_path105.default.normalize(file));
78699
78785
  throw new Error(
78700
78786
  script ? `${targetName}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName}: missing source ${file}`
78701
78787
  );
@@ -78706,21 +78792,21 @@ ${output}`
78706
78792
  );
78707
78793
  if (options2.prepareGeneratedSources && options2.requireSources !== false) {
78708
78794
  const interfaceFiles = [...resources].filter(
78709
- (file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path104.default.sep).some((part) => part.endsWith(".bundle"))
78795
+ (file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path105.default.sep).some((part) => part.endsWith(".bundle"))
78710
78796
  );
78711
78797
  let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
78712
- if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs100.default.existsSync(infoPlistOutput)) {
78713
- const info = parsePlist(import_node_fs100.default.readFileSync(infoPlistOutput, "utf8"));
78798
+ if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs101.default.existsSync(infoPlistOutput)) {
78799
+ const info = parsePlist(import_node_fs101.default.readFileSync(infoPlistOutput, "utf8"));
78714
78800
  const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
78715
78801
  if (typeof declared === "string") launchName = expand(declared, settings);
78716
78802
  }
78717
78803
  const interfaceOutputs = /* @__PURE__ */ new Set();
78718
78804
  for (const file of interfaceFiles) {
78719
- const localization = file.split(import_node_path104.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
78805
+ const localization = file.split(import_node_path105.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
78720
78806
  const isStoryboard = file.endsWith(".storyboard");
78721
78807
  const extension = isStoryboard ? ".storyboardc" : ".nib";
78722
- const name3 = import_node_path104.default.basename(file, import_node_path104.default.extname(file));
78723
- const output = import_node_path104.default.join(
78808
+ const name3 = import_node_path105.default.basename(file, import_node_path105.default.extname(file));
78809
+ const output = import_node_path105.default.join(
78724
78810
  settings("DERIVED_FILE_DIR"),
78725
78811
  "InterfaceBuilder",
78726
78812
  localization,
@@ -78739,10 +78825,10 @@ ${output}`
78739
78825
  const inputs2 = JSON.stringify([
78740
78826
  1,
78741
78827
  args,
78742
- (0, import_node_crypto60.createHash)("sha256").update(import_node_fs100.default.readFileSync(file)).digest("hex")
78828
+ (0, import_node_crypto60.createHash)("sha256").update(import_node_fs101.default.readFileSync(file)).digest("hex")
78743
78829
  ]);
78744
78830
  const developer = settings("DEVELOPER_DIR");
78745
- const cached4 = import_node_fs100.default.existsSync(output) && import_node_fs100.default.existsSync(stamp) ? import_node_fs100.default.readFileSync(stamp, "utf8").split("\n") : [];
78831
+ const cached4 = import_node_fs101.default.existsSync(output) && import_node_fs101.default.existsSync(stamp) ? import_node_fs101.default.readFileSync(stamp, "utf8").split("\n") : [];
78746
78832
  projectInputs.add(file);
78747
78833
  resources.delete(file);
78748
78834
  if (cached4[0] !== inputs2 || process.platform === "darwin" && cached4[1] !== developer) {
@@ -78752,15 +78838,15 @@ ${output}`
78752
78838
  `${targetName}: Interface Builder compilation requires macOS and Xcode`
78753
78839
  );
78754
78840
  }
78755
- import_node_fs100.default.rmSync(output, { recursive: true, force: true });
78756
- import_node_fs100.default.rmSync(stamp, { force: true });
78757
- import_node_fs100.default.mkdirSync(import_node_path104.default.dirname(output), { recursive: true });
78841
+ import_node_fs101.default.rmSync(output, { recursive: true, force: true });
78842
+ import_node_fs101.default.rmSync(stamp, { force: true });
78843
+ import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
78758
78844
  (0, import_node_child_process47.execFileSync)("xcrun", ["ibtool", "--compile", output, file, ...args], {
78759
78845
  cwd: project2.projectDir,
78760
78846
  stdio: ["ignore", "pipe", "pipe"],
78761
78847
  timeout: runScriptTimeoutMs
78762
78848
  });
78763
- import_node_fs100.default.writeFileSync(stamp, `${inputs2}
78849
+ import_node_fs101.default.writeFileSync(stamp, `${inputs2}
78764
78850
  ${developer}
78765
78851
  `);
78766
78852
  }
@@ -78802,33 +78888,33 @@ ${developer}
78802
78888
  function commonAncestor(dirs) {
78803
78889
  let common2 = dirs[0];
78804
78890
  for (const dir of dirs) {
78805
- while (common2 !== import_node_path104.default.dirname(common2) && import_node_path104.default.relative(common2, dir).startsWith(".."))
78806
- common2 = import_node_path104.default.dirname(common2);
78891
+ while (common2 !== import_node_path105.default.dirname(common2) && import_node_path105.default.relative(common2, dir).startsWith(".."))
78892
+ common2 = import_node_path105.default.dirname(common2);
78807
78893
  }
78808
78894
  return common2;
78809
78895
  }
78810
78896
  function installedPodsSandbox(pods) {
78811
- const podfileLock = import_node_path104.default.join(import_node_path104.default.dirname(pods), "Podfile.lock");
78812
- const manifestLock = import_node_path104.default.join(pods, "Manifest.lock");
78813
- if (!import_node_fs100.default.existsSync(podfileLock))
78897
+ const podfileLock = import_node_path105.default.join(import_node_path105.default.dirname(pods), "Podfile.lock");
78898
+ const manifestLock = import_node_path105.default.join(pods, "Manifest.lock");
78899
+ if (!import_node_fs101.default.existsSync(podfileLock))
78814
78900
  throw new Error(
78815
- `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path104.default.dirname(pods)}`
78901
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
78816
78902
  );
78817
- if (!import_node_fs100.default.existsSync(manifestLock) || !import_node_fs100.default.readFileSync(manifestLock).equals(import_node_fs100.default.readFileSync(podfileLock)))
78903
+ if (!import_node_fs101.default.existsSync(manifestLock) || !import_node_fs101.default.readFileSync(manifestLock).equals(import_node_fs101.default.readFileSync(podfileLock)))
78818
78904
  throw new Error(
78819
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path104.default.dirname(pods)}`
78905
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
78820
78906
  );
78821
78907
  const specChecksums = {};
78822
- const lines = import_node_fs100.default.readFileSync(manifestLock, "utf8").split("\n");
78908
+ const lines = import_node_fs101.default.readFileSync(manifestLock, "utf8").split("\n");
78823
78909
  const start = lines.indexOf("SPEC CHECKSUMS:");
78824
78910
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
78825
78911
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
78826
78912
  if (!entry) break;
78827
78913
  specChecksums[entry[1]] = entry[2];
78828
78914
  }
78829
- const specs = import_node_path104.default.join(pods, "Local Podspecs");
78830
- const generated = import_node_path104.default.join(pods, POD_GRAPH_SPECIFICATIONS);
78831
- if (import_node_fs100.default.existsSync(generated))
78915
+ const specs = import_node_path105.default.join(pods, "Local Podspecs");
78916
+ const generated = import_node_path105.default.join(pods, POD_GRAPH_SPECIFICATIONS);
78917
+ if (import_node_fs101.default.existsSync(generated))
78832
78918
  return {
78833
78919
  podfileLock,
78834
78920
  manifestLock,
@@ -78836,15 +78922,15 @@ function installedPodsSandbox(pods) {
78836
78922
  localPodspecs: readPodGraphSpecifications(generated),
78837
78923
  specificationFiles: [generated]
78838
78924
  };
78839
- const specificationFiles = isDirectory3(specs) ? import_node_fs100.default.readdirSync(specs).filter((name3) => name3.endsWith(".podspec.json")).sort().map((name3) => import_node_path104.default.join(specs, name3)) : [];
78925
+ const specificationFiles = isDirectory3(specs) ? import_node_fs101.default.readdirSync(specs).filter((name3) => name3.endsWith(".podspec.json")).sort().map((name3) => import_node_path105.default.join(specs, name3)) : [];
78840
78926
  return {
78841
78927
  podfileLock,
78842
78928
  manifestLock,
78843
78929
  specChecksums,
78844
78930
  localPodspecs: new Map(
78845
78931
  specificationFiles.map((file) => [
78846
- import_node_path104.default.basename(file, ".podspec.json"),
78847
- import_node_fs100.default.readFileSync(file, "utf8")
78932
+ import_node_path105.default.basename(file, ".podspec.json"),
78933
+ import_node_fs101.default.readFileSync(file, "utf8")
78848
78934
  ])
78849
78935
  ),
78850
78936
  specificationFiles
@@ -78859,14 +78945,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
78859
78945
  if (!xcodeProjectFile(xcodeproj)) {
78860
78946
  if (installedPods && isPodsProject(xcodeproj))
78861
78947
  throw new Error(
78862
- `${import_node_path104.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path104.default.dirname(import_node_path104.default.dirname(xcodeproj))}`
78948
+ `${import_node_path105.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path105.default.dirname(import_node_path105.default.dirname(xcodeproj))}`
78863
78949
  );
78864
78950
  return;
78865
78951
  }
78866
- const key2 = import_node_fs100.default.realpathSync.native(xcodeproj);
78867
- if (projectAt.has(key2) || !installedPods && key2.split(import_node_path104.default.sep).includes("Pods"))
78952
+ const key2 = import_node_fs101.default.realpathSync.native(xcodeproj);
78953
+ if (projectAt.has(key2) || !installedPods && key2.split(import_node_path105.default.sep).includes("Pods"))
78868
78954
  return;
78869
- if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path104.default.dirname(key2));
78955
+ if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path105.default.dirname(key2));
78870
78956
  const project2 = loadProject(key2);
78871
78957
  projectAt.set(key2, project2);
78872
78958
  projects2.push(project2);
@@ -78882,12 +78968,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
78882
78968
  for (const reference of listed)
78883
78969
  if (reference.endsWith(".xcodeproj")) addProject(reference);
78884
78970
  if (projects2.length === 0) {
78885
- throw new Error(`${import_node_path104.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
78971
+ throw new Error(`${import_node_path105.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
78886
78972
  }
78887
- const podfile = import_node_path104.default.join(import_node_path104.default.dirname(xcodeprojOrWorkspace), "Podfile");
78888
- if (installedPods && !cocoapods && import_node_fs100.default.existsSync(podfile))
78973
+ const podfile = import_node_path105.default.join(import_node_path105.default.dirname(xcodeprojOrWorkspace), "Podfile");
78974
+ if (installedPods && !cocoapods && import_node_fs101.default.existsSync(podfile))
78889
78975
  throw new Error(
78890
- `${podfile} is not installed into ${import_node_path104.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path104.default.dirname(podfile)} and open the workspace it writes`
78976
+ `${podfile} is not installed into ${import_node_path105.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path105.default.dirname(podfile)} and open the workspace it writes`
78891
78977
  );
78892
78978
  return { listed, projects: projects2, projectAt, cocoapods };
78893
78979
  }
@@ -78924,7 +79010,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options2 = {}) {
78924
79010
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options2)).map((ref) => str2(ref.target.name) ?? ref.id);
78925
79011
  }
78926
79012
  function defaultXcodeAppTarget(xcodeproj) {
78927
- const project2 = loadProject(import_node_fs100.default.realpathSync.native(xcodeproj));
79013
+ const project2 = loadProject(import_node_fs101.default.realpathSync.native(xcodeproj));
78928
79014
  for (const [id, target] of Object.entries(project2.objects)) {
78929
79015
  if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
78930
79016
  if (isIosAppTarget({ project: project2, id, target }, { requireSources: false }))
@@ -78932,7 +79018,7 @@ function defaultXcodeAppTarget(xcodeproj) {
78932
79018
  }
78933
79019
  }
78934
79020
  function readXcodeExtensionTargets(input) {
78935
- return workspaceProjects(import_node_fs100.default.realpathSync.native(input)).projects.flatMap(
79021
+ return workspaceProjects(import_node_fs101.default.realpathSync.native(input)).projects.flatMap(
78936
79022
  (project2) => projectTargets(project2).flatMap((ref) => {
78937
79023
  if (ref.target.productType !== APP_EXTENSION) return [];
78938
79024
  const name3 = str2(ref.target.name) ?? ref.id;
@@ -78949,7 +79035,7 @@ function readXcodeExtensionTargets(input) {
78949
79035
  const infoFile = get2("INFOPLIST_FILE");
78950
79036
  if (!infoFile) throw new Error(`${name3}: extension has no INFOPLIST_FILE`);
78951
79037
  const info = parsePlist(
78952
- import_node_fs100.default.readFileSync(import_node_path104.default.resolve(project2.projectDir, infoFile), "utf8")
79038
+ import_node_fs101.default.readFileSync(import_node_path105.default.resolve(project2.projectDir, infoFile), "utf8")
78953
79039
  );
78954
79040
  if (!isRecord(info))
78955
79041
  throw new Error(`${name3}: extension Info.plist is not a dictionary`);
@@ -78972,30 +79058,30 @@ function readXcodeExtensionTargets(input) {
78972
79058
  );
78973
79059
  }
78974
79060
  function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
78975
- const container = import_node_fs100.default.realpathSync.native(xcodeprojOrWorkspace);
79061
+ const container = import_node_fs101.default.realpathSync.native(xcodeprojOrWorkspace);
78976
79062
  const { projects: projects2 } = workspaceProjects(container);
78977
79063
  const containers = [
78978
79064
  .../* @__PURE__ */ new Set([container, ...projects2.map((project3) => project3.xcodeproj)])
78979
79065
  ];
78980
79066
  const found2 = containers.flatMap(
78981
79067
  (dir) => [
78982
- import_node_path104.default.join(dir, "xcshareddata"),
78983
- ...isDirectory3(import_node_path104.default.join(dir, "xcuserdata")) ? import_node_fs100.default.readdirSync(import_node_path104.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path104.default.join(dir, "xcuserdata", user)) : []
79068
+ import_node_path105.default.join(dir, "xcshareddata"),
79069
+ ...isDirectory3(import_node_path105.default.join(dir, "xcuserdata")) ? import_node_fs101.default.readdirSync(import_node_path105.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path105.default.join(dir, "xcuserdata", user)) : []
78984
79070
  ].map((data) => ({
78985
79071
  dir,
78986
- file: import_node_path104.default.join(data, "xcschemes", `${scheme}.xcscheme`)
79072
+ file: import_node_path105.default.join(data, "xcschemes", `${scheme}.xcscheme`)
78987
79073
  }))
78988
- ).find((candidate) => import_node_fs100.default.existsSync(candidate.file));
79074
+ ).find((candidate) => import_node_fs101.default.existsSync(candidate.file));
78989
79075
  if (!found2) {
78990
79076
  const known = containers.flatMap(
78991
- (dir) => import_node_fs100.default.existsSync(import_node_path104.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs100.default.readdirSync(import_node_path104.default.join(dir, "xcshareddata", "xcschemes")).filter((name4) => name4.endsWith(".xcscheme")).map((name4) => name4.slice(0, -".xcscheme".length)).sort() : []
79077
+ (dir) => import_node_fs101.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs101.default.readdirSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes")).filter((name4) => name4.endsWith(".xcscheme")).map((name4) => name4.slice(0, -".xcscheme".length)).sort() : []
78992
79078
  );
78993
79079
  throw new Error(
78994
- `${import_node_path104.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
79080
+ `${import_node_path105.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
78995
79081
  );
78996
79082
  }
78997
79083
  const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
78998
- import_node_fs100.default.readFileSync(found2.file, "utf8")
79084
+ import_node_fs101.default.readFileSync(found2.file, "utf8")
78999
79085
  );
79000
79086
  const attribute2 = (text7, name4) => {
79001
79087
  const value = new RegExp(`\\b${name4}\\s*=\\s*"([^"]*)"`).exec(text7)?.[1];
@@ -79008,12 +79094,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
79008
79094
  if (!configuration2 || !blueprint || !referenced?.startsWith("container:")) {
79009
79095
  throw new Error(`scheme ${scheme} runs no application target`);
79010
79096
  }
79011
- const projectPath = import_node_path104.default.resolve(
79012
- import_node_path104.default.dirname(found2.dir),
79097
+ const projectPath = import_node_path105.default.resolve(
79098
+ import_node_path105.default.dirname(found2.dir),
79013
79099
  referenced.slice("container:".length)
79014
79100
  );
79015
79101
  const project2 = projects2.find(
79016
- (candidate) => import_node_fs100.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs100.default.realpathSync.native(projectPath)
79102
+ (candidate) => import_node_fs101.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs101.default.realpathSync.native(projectPath)
79017
79103
  );
79018
79104
  const target = project2 && projectTargets(project2).find((ref) => ref.id === blueprint);
79019
79105
  const name3 = target && str2(target.target.name);
@@ -79031,26 +79117,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
79031
79117
  return { target: name3, configuration: configuration2 };
79032
79118
  }
79033
79119
  function selectIosAppTarget(projectRoot, iosTarget) {
79034
- const nested = import_node_path104.default.join(projectRoot, "ios");
79035
- const iosRoot = import_node_fs100.default.existsSync(nested) ? nested : projectRoot;
79036
- const entries2 = import_node_fs100.default.readdirSync(iosRoot, { withFileTypes: true });
79120
+ const nested = import_node_path105.default.join(projectRoot, "ios");
79121
+ const iosRoot = import_node_fs101.default.existsSync(nested) ? nested : projectRoot;
79122
+ const entries2 = import_node_fs101.default.readdirSync(iosRoot, { withFileTypes: true });
79037
79123
  const projects2 = (entries2.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
79038
- xcodeproj: import_node_path104.default.join(iosRoot, entry.name),
79124
+ xcodeproj: import_node_path105.default.join(iosRoot, entry.name),
79039
79125
  workspace: null
79040
79126
  })) : entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
79041
- const workspace = import_node_path104.default.join(iosRoot, entry.name);
79127
+ const workspace = import_node_path105.default.join(iosRoot, entry.name);
79042
79128
  return workspaceReferences(workspace).map((xcodeproj2) => ({
79043
79129
  xcodeproj: xcodeproj2,
79044
79130
  workspace
79045
79131
  }));
79046
79132
  }).filter(
79047
- ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path104.default.sep).includes("Pods") && import_node_fs100.default.existsSync(xcodeproj2)
79133
+ ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path105.default.sep).includes("Pods") && import_node_fs101.default.existsSync(xcodeproj2)
79048
79134
  ).filter(
79049
79135
  ({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
79050
79136
  )).map(({ xcodeproj: xcodeproj2, workspace }) => ({
79051
79137
  xcodeproj: xcodeproj2,
79052
79138
  workspace,
79053
- name: import_node_path104.default.basename(xcodeproj2)
79139
+ name: import_node_path105.default.basename(xcodeproj2)
79054
79140
  }));
79055
79141
  if (projects2.length === 0) return null;
79056
79142
  if (projects2.length > 1 && !iosTarget) {
@@ -79089,13 +79175,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
79089
79175
  if (!target) throw new Error("native app identity has no iOS application target");
79090
79176
  if (!iosTarget) {
79091
79177
  const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
79092
- const container = import_node_fs100.default.existsSync(workspace) ? workspace : xcodeproj;
79178
+ const container = import_node_fs101.default.existsSync(workspace) ? workspace : xcodeproj;
79093
79179
  const hasScheme = [container, xcodeproj].some((dir) => {
79094
- if (import_node_fs100.default.existsSync(import_node_path104.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
79180
+ if (import_node_fs101.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
79095
79181
  return true;
79096
- const users = import_node_path104.default.join(dir, "xcuserdata");
79097
- return import_node_fs100.default.existsSync(users) && import_node_fs100.default.readdirSync(users).some(
79098
- (user) => import_node_fs100.default.existsSync(import_node_path104.default.join(users, user, "xcschemes", `${target}.xcscheme`))
79182
+ const users = import_node_path105.default.join(dir, "xcuserdata");
79183
+ return import_node_fs101.default.existsSync(users) && import_node_fs101.default.readdirSync(users).some(
79184
+ (user) => import_node_fs101.default.existsSync(import_node_path105.default.join(users, user, "xcschemes", `${target}.xcscheme`))
79099
79185
  );
79100
79186
  });
79101
79187
  if (hasScheme) target = readXcodeScheme(container, target).target;
@@ -79107,7 +79193,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
79107
79193
  return { xcodeproj, target, workspace: project2.workspace };
79108
79194
  }
79109
79195
  async function resolveXcodeSwiftPackages(input, signal, target, configuration2) {
79110
- if (import_node_fs100.default.existsSync(workspaceResolvedFile(import_node_fs100.default.realpathSync.native(input)))) return;
79196
+ if (import_node_fs101.default.existsSync(workspaceResolvedFile(import_node_fs101.default.realpathSync.native(input)))) return;
79111
79197
  try {
79112
79198
  readXcodeAppTarget(input, target, configuration2, {
79113
79199
  installedPods: true,
@@ -79126,7 +79212,7 @@ async function resolveXcodeSwiftPackages(input, signal, target, configuration2)
79126
79212
  function readXcodeAppTarget(input, targetName, configurationName, options2 = {}) {
79127
79213
  if (isBazelPackage(input))
79128
79214
  return readBazelAppTarget(input, targetName, configurationName, options2);
79129
- const xcodeprojOrWorkspace = import_node_fs100.default.realpathSync.native(input);
79215
+ const xcodeprojOrWorkspace = import_node_fs101.default.realpathSync.native(input);
79130
79216
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
79131
79217
  const { listed, projects: projects2, projectAt, cocoapods } = workspaceProjects(
79132
79218
  xcodeprojOrWorkspace,
@@ -79137,7 +79223,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79137
79223
  (ref) => options2.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") : isIosAppTarget(ref, options2) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
79138
79224
  );
79139
79225
  const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
79140
- const container = import_node_path104.default.basename(xcodeprojOrWorkspace);
79226
+ const container = import_node_path105.default.basename(xcodeprojOrWorkspace);
79141
79227
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
79142
79228
  if (named.length !== 1) {
79143
79229
  if (options2.frameworkMachOType)
@@ -79166,15 +79252,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79166
79252
  for (const ref of allTargets) {
79167
79253
  const product = ref.project.object(str2(ref.target.productReference));
79168
79254
  const file = str2(product?.path);
79169
- if (file && !byProduct.has(import_node_path104.default.basename(file)))
79170
- byProduct.set(import_node_path104.default.basename(file), ref);
79255
+ if (file && !byProduct.has(import_node_path105.default.basename(file)))
79256
+ byProduct.set(import_node_path105.default.basename(file), ref);
79171
79257
  }
79172
79258
  const proxied = (project2, proxyId) => {
79173
79259
  const proxy = project2.object(proxyId);
79174
79260
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
79175
79261
  const portal = str2(proxy.containerPortal);
79176
79262
  const portalPath = project2.resolvePath(portal ?? "");
79177
- const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath && import_node_fs100.default.existsSync(portalPath) ? projectAt.get(import_node_fs100.default.realpathSync.native(portalPath)) : void 0;
79263
+ const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath && import_node_fs101.default.existsSync(portalPath) ? projectAt.get(import_node_fs101.default.realpathSync.native(portalPath)) : void 0;
79178
79264
  const remote = str2(proxy.remoteGlobalIDString);
79179
79265
  if (!owner || !remote) return void 0;
79180
79266
  return projectTargets(owner).find(
@@ -79191,7 +79277,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79191
79277
  const buildFile = project2.object(buildFileId);
79192
79278
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
79193
79279
  const file = project2.object(str2(buildFile.fileRef));
79194
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path104.default.basename(str2(file.path) ?? "")) : void 0;
79280
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path105.default.basename(str2(file.path) ?? "")) : void 0;
79195
79281
  if (resolved)
79196
79282
  found2.push({
79197
79283
  target: resolved,
@@ -79272,7 +79358,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79272
79358
  const otherProduct = productName(other);
79273
79359
  for (const { file, visibility } of headerPhase(other)) {
79274
79360
  if (visibility === "Project") continue;
79275
- const key2 = `${otherProduct}/${import_node_path104.default.basename(file)}`;
79361
+ const key2 = `${otherProduct}/${import_node_path105.default.basename(file)}`;
79276
79362
  if (!headers.has(key2)) headers.set(key2, file);
79277
79363
  }
79278
79364
  }
@@ -79302,8 +79388,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79302
79388
  ref.project.visitMembers(
79303
79389
  ref.id,
79304
79390
  ref.project.resolvePath,
79305
- (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs100.default.existsSync(file) ? [file] : [],
79306
- import_node_path104.default.join,
79391
+ (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs101.default.existsSync(file) ? [file] : [],
79392
+ import_node_path105.default.join,
79307
79393
  (file, kind) => {
79308
79394
  if (kind === "header") found2.push(file);
79309
79395
  }
@@ -79319,12 +79405,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79319
79405
  for (const ref of projectTargets(project2)) {
79320
79406
  const product = productName(ref);
79321
79407
  for (const { file, visibility } of headerPhase(ref)) {
79322
- const name3 = import_node_path104.default.basename(file);
79408
+ const name3 = import_node_path105.default.basename(file);
79323
79409
  if (!entries2.has(name3))
79324
79410
  entries2.set(name3, visibility !== "Project" ? `${product}/${name3}` : file);
79325
79411
  }
79326
79412
  for (const file of synchronizedHeaders(ref)) {
79327
- const name3 = import_node_path104.default.basename(file);
79413
+ const name3 = import_node_path105.default.basename(file);
79328
79414
  if (!entries2.has(name3)) entries2.set(name3, file);
79329
79415
  }
79330
79416
  }
@@ -79334,7 +79420,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79334
79420
  if (folder === null) continue;
79335
79421
  for (const file of walkFiles(folder)) {
79336
79422
  if (!HEADER_FILE.test(file)) continue;
79337
- const name3 = import_node_path104.default.basename(file);
79423
+ const name3 = import_node_path105.default.basename(file);
79338
79424
  if (!entries2.has(name3)) entries2.set(name3, file);
79339
79425
  }
79340
79426
  }
@@ -79342,18 +79428,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79342
79428
  for (const id of Object.keys(project2.objects)) {
79343
79429
  if (project2.object(id)?.isa !== "PBXFileReference") continue;
79344
79430
  const file = project2.resolvePath(id);
79345
- if (file && HEADER_FILE.test(file) && !entries2.has(import_node_path104.default.basename(file)))
79346
- entries2.set(import_node_path104.default.basename(file), file);
79431
+ if (file && HEADER_FILE.test(file) && !entries2.has(import_node_path105.default.basename(file)))
79432
+ entries2.set(import_node_path105.default.basename(file), file);
79347
79433
  }
79348
79434
  const map2 = [...entries2];
79349
79435
  projectHeaderMaps.set(project2, map2);
79350
79436
  return map2;
79351
79437
  };
79352
79438
  const xcconfigs = /* @__PURE__ */ new Set();
79353
- const buildDir = (project2) => import_node_path104.default.join(project2.projectDir, ".build/peach-xcode/Build");
79439
+ const buildDir = (project2) => import_node_path105.default.join(project2.projectDir, ".build/peach-xcode/Build");
79354
79440
  const workspaceBuild = {
79355
- SYMROOT: import_node_path104.default.join(buildDir(app.project), "Products"),
79356
- OBJROOT: import_node_path104.default.join(buildDir(app.project), "Intermediates.noindex")
79441
+ SYMROOT: import_node_path105.default.join(buildDir(app.project), "Products"),
79442
+ OBJROOT: import_node_path105.default.join(buildDir(app.project), "Intermediates.noindex")
79357
79443
  };
79358
79444
  const moduleTarget = (ref) => {
79359
79445
  const name3 = str2(ref.target.name) ?? ref.id;
@@ -79369,16 +79455,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79369
79455
  TARGET_NAME: name3,
79370
79456
  TARGETNAME: "$(TARGET_NAME)",
79371
79457
  PROJECT: "$(PROJECT_NAME)",
79372
- PROJECT_NAME: import_node_path104.default.basename(ref.project.xcodeproj, ".xcodeproj"),
79458
+ PROJECT_NAME: import_node_path105.default.basename(ref.project.xcodeproj, ".xcodeproj"),
79373
79459
  PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
79374
79460
  PROJECT_FILE_PATH: ref.project.xcodeproj,
79375
79461
  SRCROOT: ref.project.projectDir,
79376
79462
  SOURCE_ROOT: ref.project.projectDir,
79377
79463
  PROJECT_DIR: ref.project.projectDir,
79378
- SYMROOT: import_node_path104.default.join(buildDir(ref.project), "Products"),
79464
+ SYMROOT: import_node_path105.default.join(buildDir(ref.project), "Products"),
79379
79465
  BUILD_DIR: "$(SYMROOT)",
79380
79466
  BUILD_ROOT: "$(SYMROOT)",
79381
- OBJROOT: import_node_path104.default.join(buildDir(ref.project), "Intermediates.noindex"),
79467
+ OBJROOT: import_node_path105.default.join(buildDir(ref.project), "Intermediates.noindex"),
79382
79468
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
79383
79469
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
79384
79470
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
@@ -79427,7 +79513,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79427
79513
  xcconfigs
79428
79514
  );
79429
79515
  const searchRules = recursiveSearchRules(settings2);
79430
- const absolute = (file) => import_node_path104.default.resolve(ref.project.projectDir, file);
79516
+ const absolute = (file) => import_node_path105.default.resolve(ref.project.projectDir, file);
79431
79517
  const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
79432
79518
  const product = settings2("PRODUCT_NAME");
79433
79519
  const moduleName2 = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -79458,7 +79544,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79458
79544
  `${name3}: Swift compatibility header phase has no Swift producer sources`
79459
79545
  );
79460
79546
  const building2 = options2.prepareGeneratedSources && options2.requireSources !== false;
79461
- const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path104.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
79547
+ const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
79462
79548
  if (versioning) {
79463
79549
  const version2 = settings2("CURRENT_PROJECT_VERSION");
79464
79550
  const custom = [
@@ -79471,7 +79557,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79471
79557
  ].filter((key2) => settings2(key2));
79472
79558
  if (custom.length)
79473
79559
  throw new Error(
79474
- `${name3}: Xcode generates ${import_node_path104.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
79560
+ `${name3}: Xcode generates ${import_node_path105.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
79475
79561
  );
79476
79562
  const symbol2 = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
79477
79563
  const [major, minor] = version2.split(".");
@@ -79484,9 +79570,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79484
79570
  ` const double ${symbol2}VersionNumber __attribute__ ((used)) = (double)${number4};`,
79485
79571
  ""
79486
79572
  ].join("\n");
79487
- if (!import_node_fs100.default.existsSync(versioning) || import_node_fs100.default.readFileSync(versioning, "utf8") !== unit2) {
79488
- import_node_fs100.default.mkdirSync(import_node_path104.default.dirname(versioning), { recursive: true });
79489
- import_node_fs100.default.writeFileSync(versioning, unit2);
79573
+ if (!import_node_fs101.default.existsSync(versioning) || import_node_fs101.default.readFileSync(versioning, "utf8") !== unit2) {
79574
+ import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(versioning), { recursive: true });
79575
+ import_node_fs101.default.writeFileSync(versioning, unit2);
79490
79576
  }
79491
79577
  allSources.push(versioning);
79492
79578
  }
@@ -79505,7 +79591,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79505
79591
  const headerFiles3 = headerPhase(ref);
79506
79592
  const ownHeaders = /* @__PURE__ */ new Map();
79507
79593
  for (const { file, visibility } of headerFiles3) {
79508
- const name4 = import_node_path104.default.basename(file);
79594
+ const name4 = import_node_path105.default.basename(file);
79509
79595
  const published4 = visibility !== "Project";
79510
79596
  if (!ownHeaders.has(name4))
79511
79597
  ownHeaders.set(name4, published4 ? `${product}/${name4}` : file);
@@ -79513,35 +79599,35 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79513
79599
  ownHeaders.set(`${product}/${name4}`, file);
79514
79600
  }
79515
79601
  for (const file of synchronizedHeaders(ref)) {
79516
- const name4 = import_node_path104.default.basename(file);
79602
+ const name4 = import_node_path105.default.basename(file);
79517
79603
  if (ownHeaders.has(name4)) continue;
79518
79604
  ownHeaders.set(name4, file);
79519
79605
  const qualified3 = `${product}/${name4}`;
79520
79606
  if (!ownHeaders.has(qualified3)) ownHeaders.set(qualified3, file);
79521
79607
  }
79522
79608
  const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
79523
- const wrapper = import_node_path104.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
79524
- const publicHeaders = import_node_path104.default.resolve(
79609
+ const wrapper = import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
79610
+ const publicHeaders = import_node_path105.default.resolve(
79525
79611
  settings2("BUILT_PRODUCTS_DIR"),
79526
- settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path104.default.join(wrapper, "Headers")
79612
+ settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "Headers")
79527
79613
  );
79528
- const privateHeaders = import_node_path104.default.resolve(
79614
+ const privateHeaders = import_node_path105.default.resolve(
79529
79615
  settings2("BUILT_PRODUCTS_DIR"),
79530
- settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path104.default.join(wrapper, "PrivateHeaders")
79616
+ settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "PrivateHeaders")
79531
79617
  );
79532
79618
  const moduleMap2 = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
79533
- const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ? import_node_path104.default.join(import_node_path104.default.dirname(moduleMap2), `${moduleName2}-umbrella.h`) : null;
79534
- const frameworkCompatibility = frameworkUmbrella && moduleMap2 && import_node_fs100.default.existsSync(moduleMap2) && import_node_fs100.default.existsSync(frameworkUmbrella) ? {
79619
+ const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ? import_node_path105.default.join(import_node_path105.default.dirname(moduleMap2), `${moduleName2}-umbrella.h`) : null;
79620
+ const frameworkCompatibility = frameworkUmbrella && moduleMap2 && import_node_fs101.default.existsSync(moduleMap2) && import_node_fs101.default.existsSync(frameworkUmbrella) ? {
79535
79621
  framework: true,
79536
79622
  moduleMap: moduleMap2,
79537
79623
  umbrella: frameworkUmbrella,
79538
- outputModuleMap: import_node_path104.default.join(wrapper, "Modules", "module.modulemap"),
79539
- outputUmbrella: import_node_path104.default.join(
79624
+ outputModuleMap: import_node_path105.default.join(wrapper, "Modules", "module.modulemap"),
79625
+ outputUmbrella: import_node_path105.default.join(
79540
79626
  wrapper,
79541
79627
  "Headers",
79542
- import_node_path104.default.basename(frameworkUmbrella)
79628
+ import_node_path105.default.basename(frameworkUmbrella)
79543
79629
  ),
79544
- outputHeader: import_node_path104.default.join(
79630
+ outputHeader: import_node_path105.default.join(
79545
79631
  wrapper,
79546
79632
  "Headers",
79547
79633
  settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName2}-Swift.h`
@@ -79555,10 +79641,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79555
79641
  outputUmbrella: compatibility.outputUmbrella,
79556
79642
  outputHeader: compatibility.outputHeader
79557
79643
  } : frameworkCompatibility;
79558
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 && import_node_path104.default.relative(import_node_path104.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap2).split(import_node_path104.default.sep)[0] !== ".." && import_node_fs100.default.existsSync(moduleMap2) ? import_node_fs100.default.readdirSync(import_node_path104.default.dirname(moduleMap2)).flatMap((entry) => {
79644
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 && import_node_path105.default.relative(import_node_path105.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap2).split(import_node_path105.default.sep)[0] !== ".." && import_node_fs101.default.existsSync(moduleMap2) ? import_node_fs101.default.readdirSync(import_node_path105.default.dirname(moduleMap2)).flatMap((entry) => {
79559
79645
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
79560
- const file = import_node_path104.default.join(import_node_path104.default.dirname(moduleMap2), entry);
79561
- return import_node_fs100.default.existsSync(file) ? [file] : [];
79646
+ const file = import_node_path105.default.join(import_node_path105.default.dirname(moduleMap2), entry);
79647
+ return import_node_fs101.default.existsSync(file) ? [file] : [];
79562
79648
  }) : [];
79563
79649
  const fileFlags = {};
79564
79650
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -79644,15 +79730,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79644
79730
  // xcode searches its products' include directory before
79645
79731
  // HEADER_SEARCH_PATHS and the target's derived sources after.
79646
79732
  headerSearchPaths: [
79647
- import_node_path104.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
79733
+ import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
79648
79734
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
79649
79735
  (raw2) => expandSearchPath(absolute(raw2), searchRules)
79650
79736
  ),
79651
- import_node_path104.default.join(
79737
+ import_node_path105.default.join(
79652
79738
  `${settings2("DERIVED_FILE_DIR")}-normal`,
79653
79739
  settings2("CURRENT_ARCH")
79654
79740
  ),
79655
- import_node_path104.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
79741
+ import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
79656
79742
  settings2("DERIVED_FILE_DIR")
79657
79743
  ],
79658
79744
  userHeaderSearchPaths: settingList(
@@ -79702,9 +79788,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79702
79788
  ...headerFiles3.flatMap(
79703
79789
  ({ file, visibility }) => visibility === "Project" ? [] : [
79704
79790
  [
79705
- import_node_path104.default.join(
79791
+ import_node_path105.default.join(
79706
79792
  visibility === "Public" ? publicHeaders : privateHeaders,
79707
- import_node_path104.default.basename(file)
79793
+ import_node_path105.default.basename(file)
79708
79794
  ),
79709
79795
  file
79710
79796
  ]
@@ -79726,17 +79812,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79726
79812
  );
79727
79813
  return file && HEADER_FILE.test(file) ? [
79728
79814
  [
79729
- import_node_path104.default.resolve(
79815
+ import_node_path105.default.resolve(
79730
79816
  settings2("BUILT_PRODUCTS_DIR"),
79731
79817
  destination,
79732
- import_node_path104.default.basename(file)
79818
+ import_node_path105.default.basename(file)
79733
79819
  ),
79734
79820
  file
79735
79821
  ]
79736
79822
  ] : [];
79737
79823
  });
79738
79824
  }),
79739
- ...moduleMap2 ? [[import_node_path104.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
79825
+ ...moduleMap2 ? [[import_node_path105.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
79740
79826
  ]) : Object.fromEntries([
79741
79827
  ...podHeaders.map((file) => [file, file]),
79742
79828
  ...moduleMap2 ? [[moduleMap2, moduleMap2]] : []
@@ -79747,6 +79833,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79747
79833
  };
79748
79834
  };
79749
79835
  const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
79836
+ const xcframeworkCopies = builtTargets.flatMap(
79837
+ ({ ref, settings: settings2 }) => list(ref.target.buildPhases).flatMap((phaseId) => {
79838
+ const phase = ref.project.object(phaseId);
79839
+ if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy XCFrameworks")
79840
+ return [];
79841
+ const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
79842
+ const files2 = (paths, lists) => [
79843
+ ...list(paths).map(absolute),
79844
+ ...list(lists).flatMap((raw2) => {
79845
+ const file = absolute(raw2);
79846
+ if (!import_node_fs101.default.existsSync(file)) return [];
79847
+ xcconfigs.add(file);
79848
+ return fileListEntries(file, absolute);
79849
+ })
79850
+ ];
79851
+ const destinations = new Set(
79852
+ files2(phase.outputPaths, phase.outputFileListPaths).map(
79853
+ (file) => import_node_path105.default.dirname(file)
79854
+ )
79855
+ );
79856
+ const slices = files2(phase.inputPaths, phase.inputFileListPaths).flatMap(
79857
+ (file) => file.endsWith(".xcframework") && import_node_fs101.default.existsSync(file) ? [simulatorNativeLibrary(file)?.slice ?? []].flat() : []
79858
+ );
79859
+ return destinations.size === 1 && slices.length > 0 ? [{ destination: [...destinations][0], slices }] : [];
79860
+ })
79861
+ );
79862
+ const copiedSearchPath = (directory2) => {
79863
+ for (const { destination, slices } of xcframeworkCopies) {
79864
+ const rest = relativeInside(destination, directory2);
79865
+ if (rest === null) continue;
79866
+ const found2 = slices.map((slice) => import_node_path105.default.join(slice, rest)).filter((candidate) => isDirectory3(candidate));
79867
+ if (found2.length) return found2;
79868
+ }
79869
+ return [directory2];
79870
+ };
79871
+ if (xcframeworkCopies.length)
79872
+ for (const { module: module3 } of builtTargets) {
79873
+ const objc = module3.objc;
79874
+ if (!objc) continue;
79875
+ objc.headerSearchPaths = objc.headerSearchPaths.flatMap(copiedSearchPath);
79876
+ objc.userHeaderSearchPaths = objc.userHeaderSearchPaths.flatMap(copiedSearchPath);
79877
+ objc.frameworkSearchPaths = objc.frameworkSearchPaths.flatMap(copiedSearchPath);
79878
+ }
79750
79879
  for (const { ref, module: module3, settings: settings2 } of builtTargets)
79751
79880
  module3.targetDependencies = [
79752
79881
  .../* @__PURE__ */ new Set([
@@ -79775,7 +79904,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79775
79904
  const generate = settings2("GENERATE_INFOPLIST_FILE") === "YES";
79776
79905
  if (!FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") || !plistSetting && !generate || module3.generatedInfoPlist && !options2.prepareGeneratedSources)
79777
79906
  return { ref, framework: module3 };
79778
- const file = plistSetting ? import_node_path104.default.resolve(ref.project.projectDir, plistSetting) : null;
79907
+ const file = plistSetting ? import_node_path105.default.resolve(ref.project.projectDir, plistSetting) : null;
79779
79908
  if (file) xcconfigs.add(file);
79780
79909
  const info2 = processedInfoPlist(module3.name, file, productSettings2, keys);
79781
79910
  if (generate) {
@@ -79791,7 +79920,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79791
79920
  });
79792
79921
  const frameworks = frameworkTargets.map(({ framework }) => framework);
79793
79922
  const podSourceDirs = builtTargets.slice(0, -1).flatMap(
79794
- ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path104.default.dirname(file)).filter((dir) => import_node_fs100.default.existsSync(dir)) : []
79923
+ ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path105.default.dirname(file)).filter((dir) => import_node_fs101.default.existsSync(dir)) : []
79795
79924
  );
79796
79925
  const resourceProducts = [];
79797
79926
  const bundleTargets = builtTargets.filter(
@@ -79802,7 +79931,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79802
79931
  const phase = owner.ref.project.object(phaseId);
79803
79932
  if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
79804
79933
  continue;
79805
- const absolute = (raw2) => import_node_path104.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
79934
+ const absolute = (raw2) => import_node_path105.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
79806
79935
  const entries2 = (paths) => paths.flatMap((raw2) => {
79807
79936
  const file = absolute(raw2);
79808
79937
  xcconfigs.add(file);
@@ -79818,7 +79947,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79818
79947
  ].filter((file) => file.endsWith(".bundle"));
79819
79948
  if (inputs2.length !== outputs.length)
79820
79949
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
79821
- const destinationRoot = import_node_path104.default.join(
79950
+ const destinationRoot = import_node_path105.default.join(
79822
79951
  owner.settings("TARGET_BUILD_DIR"),
79823
79952
  owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
79824
79953
  );
@@ -79827,24 +79956,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79827
79956
  const file = str2(
79828
79957
  target.ref.project.object(str2(target.ref.target.productReference))?.path
79829
79958
  );
79830
- return file && import_node_path104.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
79959
+ return file && import_node_path105.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
79831
79960
  });
79832
79961
  if (!product && !isDirectory3(input2))
79833
79962
  throw new Error(
79834
79963
  `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
79835
79964
  );
79836
- const destination = import_node_path104.default.relative(destinationRoot, outputs[index]);
79837
- if (destination === ".." || destination.startsWith(`..${import_node_path104.default.sep}`) || import_node_path104.default.isAbsolute(destination) || import_node_path104.default.basename(input2) !== import_node_path104.default.basename(destination))
79965
+ const destination = import_node_path105.default.relative(destinationRoot, outputs[index]);
79966
+ if (destination === ".." || destination.startsWith(`..${import_node_path105.default.sep}`) || import_node_path105.default.isAbsolute(destination) || import_node_path105.default.basename(input2) !== import_node_path105.default.basename(destination))
79838
79967
  throw new Error(
79839
79968
  `${owner.module.name}: invalid resource bundle copy destination`
79840
79969
  );
79841
- const infoFile = product ? import_node_path104.default.resolve(
79970
+ const infoFile = product ? import_node_path105.default.resolve(
79842
79971
  product.ref.project.projectDir,
79843
79972
  product.settings("INFOPLIST_FILE")
79844
79973
  ) : null;
79845
79974
  if (infoFile) xcconfigs.add(infoFile);
79846
79975
  const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
79847
- const bundlePath = prefix + destination.split(import_node_path104.default.sep).join("/");
79976
+ const bundlePath = prefix + destination.split(import_node_path105.default.sep).join("/");
79848
79977
  if (resourceProducts.some((resource) => resource.path === bundlePath))
79849
79978
  throw new Error(
79850
79979
  `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
@@ -79855,20 +79984,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79855
79984
  resources: product.module.resources,
79856
79985
  infoPlist: buildPlist(
79857
79986
  expandValue(
79858
- parsePlist(import_node_fs100.default.readFileSync(infoFile, "utf8")),
79987
+ parsePlist(import_node_fs101.default.readFileSync(infoFile, "utf8")),
79859
79988
  product.productSettings
79860
79989
  )
79861
79990
  )
79862
79991
  } : {
79863
- resources: import_node_fs100.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path104.default.join(entry.parentPath, entry.name)).sort(),
79992
+ resources: import_node_fs101.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path105.default.join(entry.parentPath, entry.name)).sort(),
79864
79993
  sourceRoot: input2
79865
79994
  }
79866
79995
  });
79867
79996
  }
79868
79997
  }
79869
79998
  }
79870
- const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path104.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
79871
- const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path104.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
79999
+ const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path105.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
80000
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path105.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
79872
80001
  const infoPlistPending = module2.generatedInfoPlist && !options2.prepareGeneratedSources;
79873
80002
  const info = processedInfoPlist(
79874
80003
  module2.name,
@@ -79877,7 +80006,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79877
80006
  settingKeys
79878
80007
  );
79879
80008
  const bundleIdentifier = productSettings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
79880
- const entitlements = entitlementsFile ? parsePlist(import_node_fs100.default.readFileSync(entitlementsFile, "utf8")) : void 0;
80009
+ const entitlements = entitlementsFile ? parsePlist(import_node_fs101.default.readFileSync(entitlementsFile, "utf8")) : void 0;
79881
80010
  const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
79882
80011
  entitlements,
79883
80012
  (value) => expand(value, (key2) => {
@@ -79915,7 +80044,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79915
80044
  };
79916
80045
  }
79917
80046
  const localPackageDirs = [
79918
- ...listed.filter((reference) => import_node_fs100.default.existsSync(import_node_path104.default.join(reference, "Package.swift"))),
80047
+ ...listed.filter((reference) => import_node_fs101.default.existsSync(import_node_path105.default.join(reference, "Package.swift"))),
79919
80048
  ...projects2.flatMap(
79920
80049
  (project2) => Object.entries(project2.objects).flatMap(([id, entry]) => {
79921
80050
  if (!isDict(entry)) return [];
@@ -79925,19 +80054,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79925
80054
  const packages = [];
79926
80055
  while (pending2.length > 0) {
79927
80056
  const dir = pending2.pop();
79928
- if (import_node_fs100.default.existsSync(import_node_path104.default.join(dir, "Package.swift"))) {
80057
+ if (import_node_fs101.default.existsSync(import_node_path105.default.join(dir, "Package.swift"))) {
79929
80058
  packages.push(dir);
79930
80059
  continue;
79931
80060
  }
79932
80061
  if (!isDirectory3(dir)) continue;
79933
- for (const child of import_node_fs100.default.readdirSync(dir, { withFileTypes: true }))
80062
+ for (const child of import_node_fs101.default.readdirSync(dir, { withFileTypes: true }))
79934
80063
  if (child.isDirectory() && !child.name.startsWith("."))
79935
- pending2.push(import_node_path104.default.join(dir, child.name));
80064
+ pending2.push(import_node_path105.default.join(dir, child.name));
79936
80065
  }
79937
80066
  return packages;
79938
80067
  }
79939
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path104.default.resolve(project2.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project2.resolvePath(id) : null;
79940
- return candidate && import_node_fs100.default.existsSync(import_node_path104.default.join(candidate, "Package.swift")) ? [candidate] : [];
80068
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path105.default.resolve(project2.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project2.resolvePath(id) : null;
80069
+ return candidate && import_node_fs101.default.existsSync(import_node_path105.default.join(candidate, "Package.swift")) ? [candidate] : [];
79941
80070
  })
79942
80071
  )
79943
80072
  ];
@@ -79967,7 +80096,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79967
80096
  if ((flag === "-framework" || flag === "-weak_framework") && name3)
79968
80097
  sdkFrameworks.add(name3);
79969
80098
  });
79970
- const absolute = (raw2) => import_node_path104.default.resolve(ref.project.projectDir, expand(raw2, settings2));
80099
+ const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
79971
80100
  const requested = options2.nativeModules;
79972
80101
  const includeBinary = (name3, dir) => {
79973
80102
  if (!requested || nativeTargets2.has(ref) || requested.includes(name3) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
@@ -79979,14 +80108,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79979
80108
  for (const directory2 of expandSearchPath(absolute(raw2), searchRules)) {
79980
80109
  if (frameworkSearchDirectories.has(directory2)) continue;
79981
80110
  frameworkSearchDirectories.add(directory2);
79982
- if (!import_node_fs100.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
80111
+ if (!import_node_fs101.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
79983
80112
  continue;
79984
- for (const entry of import_node_fs100.default.readdirSync(directory2, { withFileTypes: true })) {
80113
+ for (const entry of import_node_fs101.default.readdirSync(directory2, { withFileTypes: true })) {
79985
80114
  const name3 = /^(.+)\.framework$/.exec(entry.name)?.[1];
79986
80115
  if (!name3 || byProduct.has(entry.name) || searchedFrameworks.has(name3))
79987
80116
  continue;
79988
- const file = import_node_path104.default.join(directory2, entry.name);
79989
- if (import_node_fs100.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
80117
+ const file = import_node_path105.default.join(directory2, entry.name);
80118
+ if (import_node_fs101.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
79990
80119
  searchedFrameworks.set(name3, file);
79991
80120
  }
79992
80121
  }
@@ -79994,9 +80123,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
79994
80123
  }
79995
80124
  for (const raw2 of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
79996
80125
  const dir = absolute(raw2);
79997
- const modulemap = import_node_path104.default.join(dir, "module.modulemap");
79998
- if (!import_node_fs100.default.existsSync(modulemap)) continue;
79999
- const name3 = moduleMapName(import_node_fs100.default.readFileSync(modulemap, "utf8"));
80126
+ const modulemap = import_node_path105.default.join(dir, "module.modulemap");
80127
+ if (!import_node_fs101.default.existsSync(modulemap)) continue;
80128
+ const name3 = moduleMapName(import_node_fs101.default.readFileSync(modulemap, "utf8"));
80000
80129
  if (name3 && !binaryFrameworks.has(name3)) includeBinary(name3, dir);
80001
80130
  }
80002
80131
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -80005,7 +80134,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80005
80134
  const inputs2 = list(phase.inputPaths).map(absolute);
80006
80135
  for (const raw2 of list(phase.inputFileListPaths)) {
80007
80136
  const file = absolute(raw2);
80008
- if (!import_node_fs100.default.existsSync(file)) continue;
80137
+ if (!import_node_fs101.default.existsSync(file)) continue;
80009
80138
  xcconfigs.add(file);
80010
80139
  inputs2.push(...fileListEntries(file, absolute));
80011
80140
  }
@@ -80070,7 +80199,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80070
80199
  ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
80071
80200
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
80072
80201
  kind: "local",
80073
- dir: import_node_path104.default.resolve(
80202
+ dir: import_node_path105.default.resolve(
80074
80203
  project2.projectDir,
80075
80204
  str2(reference.relativePath) ?? ""
80076
80205
  )
@@ -80104,14 +80233,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80104
80233
  continue;
80105
80234
  }
80106
80235
  if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
80107
- byProduct.has(import_node_path104.default.basename(rawPath)))
80236
+ byProduct.has(import_node_path105.default.basename(rawPath)))
80108
80237
  continue;
80109
80238
  const resolved = fileId ? project2.resolvePath(fileId) : null;
80110
- if (fileId && resolved !== null && !import_node_fs100.default.existsSync(resolved)) {
80111
- const parts2 = resolved.split(import_node_path104.default.sep);
80239
+ if (fileId && resolved !== null && !import_node_fs101.default.existsSync(resolved)) {
80240
+ const parts2 = resolved.split(import_node_path105.default.sep);
80112
80241
  const pods = parts2.lastIndexOf("Pods");
80113
- const sandbox = parts2.slice(0, pods + 1).join(import_node_path104.default.sep);
80114
- if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs100.default.existsSync(import_node_path104.default.join(import_node_path104.default.dirname(sandbox), "Podfile")))
80242
+ const sandbox = parts2.slice(0, pods + 1).join(import_node_path105.default.sep);
80243
+ if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs101.default.existsSync(import_node_path105.default.join(import_node_path105.default.dirname(sandbox), "Podfile")))
80115
80244
  continue;
80116
80245
  if (!ios_sdk_frameworks_default.frameworks.includes(name3))
80117
80246
  throw new Error(
@@ -80139,7 +80268,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80139
80268
  ({ product }) => !options2.nativeModules || nativeTargets2.has(built2.ref) || options2.nativeModules.includes(product)
80140
80269
  );
80141
80270
  const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
80142
- let packageResolved = import_node_fs100.default.existsSync(resolvedFile) ? [import_node_fs100.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path104.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs100.default.existsSync(file)).map((file) => import_node_fs100.default.realpathSync.native(file)).sort();
80271
+ let packageResolved = import_node_fs101.default.existsSync(resolvedFile) ? [import_node_fs101.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path105.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs101.default.existsSync(file)).map((file) => import_node_fs101.default.realpathSync.native(file)).sort();
80143
80272
  if (packageResolved.length === 0) {
80144
80273
  const requirements = remotePackageRequirements(projects2);
80145
80274
  if (requirements.length > 0) {
@@ -80195,19 +80324,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80195
80324
  } : {},
80196
80325
  rootDir: commonAncestor(
80197
80326
  [
80198
- workspace ? import_node_path104.default.dirname(workspace) : app.project.projectDir,
80327
+ workspace ? import_node_path105.default.dirname(workspace) : app.project.projectDir,
80199
80328
  ...used.map((project2) => project2.projectDir),
80200
80329
  ...localPackageDirs,
80201
80330
  ...linkedProducts.flatMap(
80202
- ({ source }) => source.kind === "local" && import_node_fs100.default.existsSync(source.dir) ? [source.dir] : []
80331
+ ({ source }) => source.kind === "local" && import_node_fs101.default.existsSync(source.dir) ? [source.dir] : []
80203
80332
  ),
80204
80333
  ...new Set(podSourceDirs),
80205
80334
  // a target's own files may sit beside the project, such as an asset
80206
80335
  // catalog one folder up, and xcode builds them from there
80207
80336
  ...new Set(
80208
- [...module2.allSources, ...module2.resources].filter((file) => import_node_fs100.default.existsSync(file)).map((file) => import_node_path104.default.dirname(file))
80337
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs101.default.existsSync(file)).map((file) => import_node_path105.default.dirname(file))
80209
80338
  )
80210
- ].map((dir) => import_node_fs100.default.realpathSync.native(dir))
80339
+ ].map((dir) => import_node_fs101.default.realpathSync.native(dir))
80211
80340
  ),
80212
80341
  projectFiles: [
80213
80342
  .../* @__PURE__ */ new Set([
@@ -80233,7 +80362,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80233
80362
  resourceProducts,
80234
80363
  linkedProducts,
80235
80364
  localPackageDirs: [
80236
- ...new Set(localPackageDirs.map((dir) => import_node_fs100.default.realpathSync.native(dir)))
80365
+ ...new Set(localPackageDirs.map((dir) => import_node_fs101.default.realpathSync.native(dir)))
80237
80366
  ].sort(),
80238
80367
  binaryFrameworks: [...binaryFrameworks].map(([name3, file]) => ({ name: name3, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
80239
80368
  sdkFrameworks: [...sdkFrameworks].filter(
@@ -80246,15 +80375,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
80246
80375
  cocoapods
80247
80376
  };
80248
80377
  }
80249
- var import_node_child_process47, import_node_crypto60, import_node_fs100, import_node_module9, import_node_path104, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
80378
+ var import_node_child_process47, import_node_crypto60, import_node_fs101, import_node_module9, import_node_path105, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
80250
80379
  var init_xcode_project = __esm({
80251
80380
  "src/xcode-project.ts"() {
80252
80381
  "use strict";
80253
80382
  import_node_child_process47 = require("node:child_process");
80254
80383
  import_node_crypto60 = require("node:crypto");
80255
- import_node_fs100 = __toESM(require("node:fs"), 1);
80384
+ import_node_fs101 = __toESM(require("node:fs"), 1);
80256
80385
  import_node_module9 = require("node:module");
80257
- import_node_path104 = __toESM(require("node:path"), 1);
80386
+ import_node_path105 = __toESM(require("node:path"), 1);
80258
80387
  init_bazel_project();
80259
80388
  init_ios_sdk_frameworks();
80260
80389
  init_is_record();
@@ -80266,7 +80395,9 @@ var init_xcode_project = __esm({
80266
80395
  init_swift_distribution();
80267
80396
  init_swift_native_pin();
80268
80397
  init_swift_package();
80398
+ init_swift_source_file();
80269
80399
  init_swift_toolchain();
80400
+ init_swift_xcframework();
80270
80401
  init_xcode_intents();
80271
80402
  init_xcode_json_project();
80272
80403
  init_xcode_swift_features();
@@ -80319,15 +80450,15 @@ var init_xcode_project = __esm({
80319
80450
  arch: "arm64",
80320
80451
  variant: "normal"
80321
80452
  };
80322
- isDirectory3 = (dir) => import_node_fs100.default.existsSync(dir) && import_node_fs100.default.statSync(dir).isDirectory();
80453
+ isDirectory3 = (dir) => import_node_fs101.default.existsSync(dir) && import_node_fs101.default.statSync(dir).isDirectory();
80323
80454
  loaded3 = /* @__PURE__ */ new Map();
80324
80455
  preparedSourcePhases = /* @__PURE__ */ new Map();
80325
- isPodsProject = (xcodeproj) => import_node_path104.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path104.default.basename(import_node_path104.default.dirname(xcodeproj)) === "Pods";
80456
+ isPodsProject = (xcodeproj) => import_node_path105.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path105.default.basename(import_node_path105.default.dirname(xcodeproj)) === "Pods";
80326
80457
  targetRefs = /* @__PURE__ */ new WeakMap();
80327
80458
  NativeAppTargetSelectionError = class extends Error {
80328
80459
  };
80329
- workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path104.default.join(
80330
- xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path104.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
80460
+ workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path105.default.join(
80461
+ xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path105.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
80331
80462
  "xcshareddata",
80332
80463
  "swiftpm",
80333
80464
  "Package.resolved"
@@ -80363,7 +80494,7 @@ function workspacePackageManager(root, declared, excluded) {
80363
80494
  { manager: "yarn", files: ["yarn.lock"] },
80364
80495
  { manager: "npm", files: ["package-lock.json"] }
80365
80496
  ].filter(
80366
- ({ files: files2 }) => files2.some((file) => !excluded(file) && import_node_fs101.default.existsSync(import_node_path105.default.join(root, file)))
80497
+ ({ files: files2 }) => files2.some((file) => !excluded(file) && import_node_fs102.default.existsSync(import_node_path106.default.join(root, file)))
80367
80498
  );
80368
80499
  if (locks.length !== 1) return manager;
80369
80500
  const lockedManager = locks[0].manager;
@@ -80377,9 +80508,9 @@ function pinnedNodeVersion(root, manifest) {
80377
80508
  return exactVersionFile(root, ".nvmrc") ?? exactVersionFile(root, ".node-version");
80378
80509
  }
80379
80510
  function exactVersionFile(root, name3) {
80380
- const file = import_node_path105.default.join(root, name3);
80381
- if (!import_node_fs101.default.existsSync(file)) return null;
80382
- const version2 = import_node_fs101.default.readFileSync(file, "utf8").trim().replace(/^v/, "");
80511
+ const file = import_node_path106.default.join(root, name3);
80512
+ if (!import_node_fs102.default.existsSync(file)) return null;
80513
+ const version2 = import_node_fs102.default.readFileSync(file, "utf8").trim().replace(/^v/, "");
80383
80514
  return EXACT_VERSION.test(version2) ? version2 : null;
80384
80515
  }
80385
80516
  async function hashExpoWorkspace(app, signal) {
@@ -80391,15 +80522,15 @@ async function hashExpoSourceWorkspace(app, signal) {
80391
80522
  return { root, hash };
80392
80523
  }
80393
80524
  function pnpmStoreArgs(root) {
80394
- const modules = import_node_path105.default.join(root, "node_modules", ".modules.yaml");
80395
- if (!import_node_fs101.default.existsSync(modules)) return [];
80525
+ const modules = import_node_path106.default.join(root, "node_modules", ".modules.yaml");
80526
+ if (!import_node_fs102.default.existsSync(modules)) return [];
80396
80527
  const store = /^\s*"?storeDir"?:\s*["']?([^"'\n,]+)/m.exec(
80397
- import_node_fs101.default.readFileSync(modules, "utf8")
80528
+ import_node_fs102.default.readFileSync(modules, "utf8")
80398
80529
  );
80399
80530
  return store ? ["--store-dir", store[1]] : [];
80400
80531
  }
80401
80532
  function linkedPackageDirectories(root, app) {
80402
- const appRelative = import_node_path105.default.relative(root, app);
80533
+ const appRelative = import_node_path106.default.relative(root, app);
80403
80534
  return localPackageDirectories(root, app).filter(
80404
80535
  (directory2) => directory2 !== "" && directory2 !== appRelative
80405
80536
  );
@@ -80407,11 +80538,11 @@ function linkedPackageDirectories(root, app) {
80407
80538
  function localPackageDirectories(root, app) {
80408
80539
  const directories = /* @__PURE__ */ new Set();
80409
80540
  const visit3 = (directory2) => {
80410
- const relative6 = import_node_path105.default.relative(root, directory2);
80541
+ const relative6 = import_node_path106.default.relative(root, directory2);
80411
80542
  if (directories.has(relative6)) return;
80412
80543
  directories.add(relative6);
80413
80544
  const manifest = JSON.parse(
80414
- import_node_fs101.default.readFileSync(import_node_path105.default.join(directory2, "package.json"), "utf8")
80545
+ import_node_fs102.default.readFileSync(import_node_path106.default.join(directory2, "package.json"), "utf8")
80415
80546
  );
80416
80547
  for (const name3 of Object.keys({
80417
80548
  ...manifest.dependencies,
@@ -80419,12 +80550,12 @@ function localPackageDirectories(root, app) {
80419
80550
  ...manifest.peerDependencies,
80420
80551
  ...manifest.optionalDependencies
80421
80552
  })) {
80422
- for (let at = directory2; ; at = import_node_path105.default.dirname(at)) {
80423
- const link = import_node_path105.default.join(at, "node_modules", name3);
80424
- if (import_node_fs101.default.existsSync(link)) {
80425
- const target = import_node_fs101.default.realpathSync(link);
80426
- const within2 = import_node_path105.default.relative(root, target);
80427
- if (!within2.startsWith("..") && !within2.split(import_node_path105.default.sep).includes("node_modules") && import_node_fs101.default.existsSync(import_node_path105.default.join(target, "package.json")))
80553
+ for (let at = directory2; ; at = import_node_path106.default.dirname(at)) {
80554
+ const link = import_node_path106.default.join(at, "node_modules", name3);
80555
+ if (import_node_fs102.default.existsSync(link)) {
80556
+ const target = import_node_fs102.default.realpathSync(link);
80557
+ const within2 = import_node_path106.default.relative(root, target);
80558
+ if (!within2.startsWith("..") && !within2.split(import_node_path106.default.sep).includes("node_modules") && import_node_fs102.default.existsSync(import_node_path106.default.join(target, "package.json")))
80428
80559
  visit3(target);
80429
80560
  break;
80430
80561
  }
@@ -80436,7 +80567,7 @@ function localPackageDirectories(root, app) {
80436
80567
  return [...directories];
80437
80568
  }
80438
80569
  async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, podsEnvironment = reactNativePodsEnvironment()) {
80439
- app = import_node_fs101.default.realpathSync(app);
80570
+ app = import_node_fs102.default.realpathSync(app);
80440
80571
  const key2 = JSON.stringify([app, everyByte, sourceOnly, podsEnvironment]);
80441
80572
  let pending2 = hashing.get(key2);
80442
80573
  if (!pending2) {
@@ -80456,22 +80587,22 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
80456
80587
  sourceOnly,
80457
80588
  linkedPackageDirectories(root, app)
80458
80589
  );
80459
- const appRelative = import_node_path105.default.relative(root, app);
80460
- const manifest = JSON.parse(import_node_fs101.default.readFileSync(import_node_path105.default.join(root, "package.json"), "utf8"));
80590
+ const appRelative = import_node_path106.default.relative(root, app);
80591
+ const manifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
80461
80592
  const hash = (0, import_node_crypto61.createHash)("sha256");
80462
80593
  const native = (0, import_node_crypto61.createHash)("sha256");
80463
80594
  const nativeDirectories = localPackageDirectories(root, app);
80464
80595
  const versionFree = new Set(
80465
80596
  nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
80466
- (directory2) => !import_node_fs101.default.readdirSync(import_node_path105.default.join(root, directory2)).some((name3) => NATIVE_PACKAGE_ENTRY.test(name3))
80467
- ).map((directory2) => directory2.split(import_node_path105.default.sep).join("/"))
80597
+ (directory2) => !import_node_fs102.default.readdirSync(import_node_path106.default.join(root, directory2)).some((name3) => NATIVE_PACKAGE_ENTRY.test(name3))
80598
+ ).map((directory2) => directory2.split(import_node_path106.default.sep).join("/"))
80468
80599
  );
80469
80600
  const versioned = new Set(
80470
- nativeDirectories.map((directory2) => directory2.split(import_node_path105.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
80601
+ nativeDirectories.map((directory2) => directory2.split(import_node_path106.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
80471
80602
  );
80472
80603
  const nativeConfigBytes = (posix2, bytes) => {
80473
- const directory2 = import_node_path105.default.posix.dirname(posix2);
80474
- if (import_node_path105.default.posix.basename(posix2) === "package.json" && versionFree.has(directory2)) {
80604
+ const directory2 = import_node_path106.default.posix.dirname(posix2);
80605
+ if (import_node_path106.default.posix.basename(posix2) === "package.json" && versionFree.has(directory2)) {
80475
80606
  const { version: _version, ...manifest2 } = JSON.parse(bytes.toString("utf8"));
80476
80607
  return JSON.stringify(manifest2);
80477
80608
  }
@@ -80485,21 +80616,21 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
80485
80616
  return !(workspaces && entry && !versioned.has(entry) && /^ {6}"version": "[^"]*",$/.test(line));
80486
80617
  }).join("\n");
80487
80618
  };
80488
- const steersNative = (relative6) => !relative6.includes(import_node_path105.default.sep) || relative6.startsWith(`patches${import_node_path105.default.sep}`) || relative6.startsWith(import_node_path105.default.join("scripts", "lib", "expo-plugins") + import_node_path105.default.sep) || nativeDirectories.some(
80489
- (directory2) => directory2 === "" || relative6 === directory2 || relative6.startsWith(directory2 + import_node_path105.default.sep)
80619
+ const steersNative = (relative6) => !relative6.includes(import_node_path106.default.sep) || relative6.startsWith(`patches${import_node_path106.default.sep}`) || relative6.startsWith(import_node_path106.default.join("scripts", "lib", "expo-plugins") + import_node_path106.default.sep) || nativeDirectories.some(
80620
+ (directory2) => directory2 === "" || relative6 === directory2 || relative6.startsWith(directory2 + import_node_path106.default.sep)
80490
80621
  );
80491
80622
  const steps = [];
80492
80623
  const unread = [];
80493
80624
  const walk4 = (directory2) => {
80494
- const entries2 = import_node_fs101.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
80625
+ const entries2 = import_node_fs102.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
80495
80626
  for (const entry of entries2) {
80496
- const file = import_node_path105.default.join(directory2, entry.name);
80497
- const relative6 = import_node_path105.default.relative(root, file);
80627
+ const file = import_node_path106.default.join(directory2, entry.name);
80628
+ const relative6 = import_node_path106.default.relative(root, file);
80498
80629
  if (excluded(relative6, entry.isDirectory())) continue;
80499
80630
  const firstStep = steps.length;
80500
80631
  steps.push(() => hash.update(`${relative6}\0`));
80501
80632
  if (entry.isSymbolicLink()) {
80502
- const link = `link\0${import_node_fs101.default.readlinkSync(file)}\0`;
80633
+ const link = `link\0${import_node_fs102.default.readlinkSync(file)}\0`;
80503
80634
  steps.push(() => {
80504
80635
  hash.update(link);
80505
80636
  if (steersNative(relative6)) native.update(`${relative6}\0${link}`);
@@ -80509,9 +80640,9 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
80509
80640
  walk4(file);
80510
80641
  if (sourceOnly && steps.length === firstStep + 2) steps.length = firstStep;
80511
80642
  } else if (entry.isFile()) {
80512
- const posix2 = relative6.split(import_node_path105.default.sep).join("/");
80643
+ const posix2 = relative6.split(import_node_path106.default.sep).join("/");
80513
80644
  if (NATIVE_CONFIG_FILE.test(posix2)) {
80514
- const bytes = import_node_fs101.default.readFileSync(file);
80645
+ const bytes = import_node_fs102.default.readFileSync(file);
80515
80646
  steps.push(() => {
80516
80647
  if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
80517
80648
  if (steersNative(relative6))
@@ -80520,7 +80651,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
80520
80651
  continue;
80521
80652
  }
80522
80653
  if (everyByte) {
80523
- const stat2 = import_node_fs101.default.statSync(file);
80654
+ const stat2 = import_node_fs102.default.statSync(file);
80524
80655
  const known = fileDigests.get(file);
80525
80656
  const content = known?.ino === stat2.ino && known.size === stat2.size && known.mtimeMs === stat2.mtimeMs && known.ctimeMs === stat2.ctimeMs ? known : {
80526
80657
  ino: stat2.ino,
@@ -80541,7 +80672,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
80541
80672
  for (let start = 0; start < unread.length; start += 32) {
80542
80673
  await Promise.all(
80543
80674
  unread.slice(start, start + 32).map(async ({ file, content }) => {
80544
- const bytes = await import_node_fs101.default.promises.readFile(file);
80675
+ const bytes = await import_node_fs102.default.promises.readFile(file);
80545
80676
  content.size = bytes.length;
80546
80677
  content.digest = (0, import_node_crypto61.createHash)("sha256").update(bytes).digest("hex");
80547
80678
  fileDigests.set(file, content);
@@ -80588,13 +80719,13 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
80588
80719
  const retire = (directory2, used) => withSwiftRootLock(
80589
80720
  directory2,
80590
80721
  async () => {
80591
- const retired = import_node_path105.default.join(
80722
+ const retired = import_node_path106.default.join(
80592
80723
  parent,
80593
- `${RETIRED_PREFIX2}${process.pid}-${import_node_path105.default.basename(directory2)}`
80724
+ `${RETIRED_PREFIX2}${process.pid}-${import_node_path106.default.basename(directory2)}`
80594
80725
  );
80595
- if (import_node_fs101.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
80726
+ if (import_node_fs102.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
80596
80727
  try {
80597
- import_node_fs101.default.renameSync(directory2, retired);
80728
+ import_node_fs102.default.renameSync(directory2, retired);
80598
80729
  } catch (error) {
80599
80730
  if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
80600
80731
  throw error;
@@ -80605,15 +80736,15 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
80605
80736
  false
80606
80737
  );
80607
80738
  const complete = [];
80608
- for (const name3 of import_node_fs101.default.readdirSync(parent)) {
80609
- const directory2 = import_node_path105.default.join(parent, name3);
80739
+ for (const name3 of import_node_fs102.default.readdirSync(parent)) {
80740
+ const directory2 = import_node_path106.default.join(parent, name3);
80610
80741
  if (name3.startsWith(RETIRED_PREFIX2)) {
80611
80742
  reapRetiredCacheDirectory(parent, name3);
80612
80743
  continue;
80613
80744
  }
80614
- const used = import_node_fs101.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
80745
+ const used = import_node_fs102.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
80615
80746
  if (directory2 === keep || used === void 0) continue;
80616
- if (import_node_fs101.default.existsSync(import_node_path105.default.join(directory2, ".peach-complete")) || import_node_fs101.default.existsSync(import_node_path105.default.join(directory2, ".peach-project-complete")))
80747
+ if (import_node_fs102.default.existsSync(import_node_path106.default.join(directory2, ".peach-complete")) || import_node_fs102.default.existsSync(import_node_path106.default.join(directory2, ".peach-project-complete")))
80617
80748
  complete.push({ directory: directory2, used });
80618
80749
  else if (Date.now() - used > ABANDONED_WORKSPACE_MS) await retire(directory2, used);
80619
80750
  }
@@ -80622,38 +80753,38 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
80622
80753
  }
80623
80754
  function syncChangedFiles(root, work, appRelative, excluded, installed2) {
80624
80755
  const copyIfNewer = (file, relative6, newerOnly) => {
80625
- const source = import_node_fs101.default.statSync(file);
80626
- const target = import_node_path105.default.join(work, relative6);
80627
- const existing = import_node_fs101.default.statSync(target, { throwIfNoEntry: false });
80756
+ const source = import_node_fs102.default.statSync(file);
80757
+ const target = import_node_path106.default.join(work, relative6);
80758
+ const existing = import_node_fs102.default.statSync(target, { throwIfNoEntry: false });
80628
80759
  if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
80629
80760
  return;
80630
- import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(target), { recursive: true });
80761
+ import_node_fs102.default.mkdirSync(import_node_path106.default.dirname(target), { recursive: true });
80631
80762
  const staged = `${target}.${process.pid}.peach-sync`;
80632
- import_node_fs101.default.copyFileSync(file, staged);
80633
- import_node_fs101.default.utimesSync(staged, source.atime, source.mtime);
80634
- import_node_fs101.default.renameSync(staged, target);
80763
+ import_node_fs102.default.copyFileSync(file, staged);
80764
+ import_node_fs102.default.utimesSync(staged, source.atime, source.mtime);
80765
+ import_node_fs102.default.renameSync(staged, target);
80635
80766
  };
80636
80767
  const walkInstalled = (directory2) => {
80637
- for (const entry of import_node_fs101.default.readdirSync(directory2, { withFileTypes: true })) {
80638
- const file = import_node_path105.default.join(directory2, entry.name);
80768
+ for (const entry of import_node_fs102.default.readdirSync(directory2, { withFileTypes: true })) {
80769
+ const file = import_node_path106.default.join(directory2, entry.name);
80639
80770
  if (entry.isDirectory()) walkInstalled(file);
80640
- else if (entry.isFile()) copyIfNewer(file, import_node_path105.default.relative(root, file), true);
80771
+ else if (entry.isFile()) copyIfNewer(file, import_node_path106.default.relative(root, file), true);
80641
80772
  }
80642
80773
  };
80643
- const sourceIos = import_node_fs101.default.existsSync(import_node_path105.default.join(root, appRelative, "ios", "Podfile"));
80774
+ const sourceIos = import_node_fs102.default.existsSync(import_node_path106.default.join(root, appRelative, "ios", "Podfile"));
80644
80775
  const walk4 = (directory2) => {
80645
- for (const entry of import_node_fs101.default.readdirSync(directory2, { withFileTypes: true })) {
80646
- const file = import_node_path105.default.join(directory2, entry.name);
80647
- const relative6 = import_node_path105.default.relative(root, file);
80648
- if (installed2 && entry.name === "node_modules" && entry.isDirectory() && import_node_fs101.default.existsSync(import_node_path105.default.join(work, relative6))) {
80776
+ for (const entry of import_node_fs102.default.readdirSync(directory2, { withFileTypes: true })) {
80777
+ const file = import_node_path106.default.join(directory2, entry.name);
80778
+ const relative6 = import_node_path106.default.relative(root, file);
80779
+ if (installed2 && entry.name === "node_modules" && entry.isDirectory() && import_node_fs102.default.existsSync(import_node_path106.default.join(work, relative6))) {
80649
80780
  walkInstalled(file);
80650
80781
  continue;
80651
80782
  }
80652
- if (excluded(relative6, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative6 === import_node_path105.default.join(appRelative, "ios"))
80783
+ if (excluded(relative6, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative6 === import_node_path106.default.join(appRelative, "ios"))
80653
80784
  continue;
80654
80785
  if (entry.isDirectory()) walk4(file);
80655
80786
  else if (entry.isFile()) {
80656
- if (NATIVE_CONFIG_FILE.test(relative6.split(import_node_path105.default.sep).join("/"))) continue;
80787
+ if (NATIVE_CONFIG_FILE.test(relative6.split(import_node_path106.default.sep).join("/"))) continue;
80657
80788
  copyIfNewer(file, relative6, false);
80658
80789
  }
80659
80790
  }
@@ -80664,10 +80795,10 @@ function watchRoot(root) {
80664
80795
  const existing = watches.get(root);
80665
80796
  if (existing) return existing;
80666
80797
  const watch3 = { edits: 0 };
80667
- const watcher = import_node_fs101.default.watch(root, { recursive: true }, (_event, filename) => {
80668
- const parts2 = filename?.split(import_node_path105.default.sep) ?? [];
80798
+ const watcher = import_node_fs102.default.watch(root, { recursive: true }, (_event, filename) => {
80799
+ const parts2 = filename?.split(import_node_path106.default.sep) ?? [];
80669
80800
  const { excluded } = watch3;
80670
- if (excluded && parts2.some((_, index) => excluded(parts2.slice(0, index + 1).join(import_node_path105.default.sep))))
80801
+ if (excluded && parts2.some((_, index) => excluded(parts2.slice(0, index + 1).join(import_node_path106.default.sep))))
80671
80802
  return;
80672
80803
  if (filename && watch3.ignoredLater?.(filename)) return;
80673
80804
  watch3.edits += 1;
@@ -80683,8 +80814,8 @@ function watchRoot(root) {
80683
80814
  }
80684
80815
  async function prepareExpoNativeWorkspace(app, signal, target) {
80685
80816
  const prepared = await prepare2(app, "workspace", signal);
80686
- const ios = import_node_path105.default.join(prepared.app, "ios");
80687
- const workspaces = import_node_fs101.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
80817
+ const ios = import_node_path106.default.join(prepared.app, "ios");
80818
+ const workspaces = import_node_fs102.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
80688
80819
  const workspace = selectXcodeWorkspace(ios, workspaces);
80689
80820
  if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`);
80690
80821
  await resolveXcodeSwiftPackages(workspace, signal, target);
@@ -80701,13 +80832,13 @@ function prepareExpoNativeProject(app, signal, dependencies = "lockfile") {
80701
80832
  );
80702
80833
  }
80703
80834
  function prepare2(app, stage, signal) {
80704
- app = import_node_fs101.default.realpathSync(app);
80835
+ app = import_node_fs102.default.realpathSync(app);
80705
80836
  const podsEnvironment = reactNativePodsEnvironment();
80706
80837
  const key2 = `${app}\0${stage}\0${JSON.stringify(podsEnvironment)}`;
80707
80838
  const last = current.get(key2);
80708
- if (last && last.watch.edits === last.edits && (import_node_fs101.default.existsSync(import_node_path105.default.join(last.result.work, ".peach-complete")) || stage !== "workspace" && import_node_fs101.default.existsSync(import_node_path105.default.join(last.result.work, ".peach-project-complete")))) {
80839
+ if (last && last.watch.edits === last.edits && (import_node_fs102.default.existsSync(import_node_path106.default.join(last.result.work, ".peach-complete")) || stage !== "workspace" && import_node_fs102.default.existsSync(import_node_path106.default.join(last.result.work, ".peach-project-complete")))) {
80709
80840
  const now = /* @__PURE__ */ new Date();
80710
- import_node_fs101.default.utimesSync(last.result.work, now, now);
80841
+ import_node_fs102.default.utimesSync(last.result.work, now, now);
80711
80842
  return Promise.resolve(last.result);
80712
80843
  }
80713
80844
  let shared = preparing.get(key2);
@@ -80730,25 +80861,25 @@ function prepare2(app, stage, signal) {
80730
80861
  }
80731
80862
  async function copyInstalledWorkspace(root, destination, excluded) {
80732
80863
  const installed2 = [];
80733
- await import_node_fs101.default.promises.cp(root, destination, {
80864
+ await import_node_fs102.default.promises.cp(root, destination, {
80734
80865
  recursive: true,
80735
- mode: import_node_fs101.default.constants.COPYFILE_FICLONE,
80866
+ mode: import_node_fs102.default.constants.COPYFILE_FICLONE,
80736
80867
  preserveTimestamps: true,
80737
80868
  verbatimSymlinks: true,
80738
80869
  filter: (source) => {
80739
- const relative6 = import_node_path105.default.relative(root, source);
80740
- if (import_node_path105.default.basename(source) === "node_modules") installed2.push(relative6);
80870
+ const relative6 = import_node_path106.default.relative(root, source);
80871
+ if (import_node_path106.default.basename(source) === "node_modules") installed2.push(relative6);
80741
80872
  return !excluded(relative6);
80742
80873
  }
80743
80874
  });
80744
80875
  const entries2 = installed2.flatMap((relative6) => {
80745
- const source = import_node_path105.default.join(root, relative6);
80746
- if (import_node_fs101.default.lstatSync(source).isSymbolicLink()) {
80747
- import_node_fs101.default.symlinkSync(import_node_fs101.default.readlinkSync(source), import_node_path105.default.join(destination, relative6));
80876
+ const source = import_node_path106.default.join(root, relative6);
80877
+ if (import_node_fs102.default.lstatSync(source).isSymbolicLink()) {
80878
+ import_node_fs102.default.symlinkSync(import_node_fs102.default.readlinkSync(source), import_node_path106.default.join(destination, relative6));
80748
80879
  return [];
80749
80880
  }
80750
- import_node_fs101.default.mkdirSync(import_node_path105.default.join(destination, relative6));
80751
- return import_node_fs101.default.readdirSync(source).filter((name3) => name3 !== ".cache").map((name3) => import_node_path105.default.join(relative6, name3));
80881
+ import_node_fs102.default.mkdirSync(import_node_path106.default.join(destination, relative6));
80882
+ return import_node_fs102.default.readdirSync(source).filter((name3) => name3 !== ".cache").map((name3) => import_node_path106.default.join(relative6, name3));
80752
80883
  });
80753
80884
  if (process.platform === "darwin") {
80754
80885
  await new Promise((resolve11, reject) => {
@@ -80760,8 +80891,8 @@ async function copyInstalledWorkspace(root, destination, excluded) {
80760
80891
  );
80761
80892
  child.stdin?.end(
80762
80893
  entries2.flatMap((relative6) => [
80763
- import_node_path105.default.join(root, relative6),
80764
- import_node_path105.default.join(destination, relative6)
80894
+ import_node_path106.default.join(root, relative6),
80895
+ import_node_path106.default.join(destination, relative6)
80765
80896
  ]).join("\0")
80766
80897
  );
80767
80898
  });
@@ -80774,32 +80905,32 @@ async function copyInstalledWorkspace(root, destination, excluded) {
80774
80905
  "-R",
80775
80906
  "-p",
80776
80907
  "--reflink=auto",
80777
- import_node_path105.default.join(root, relative6),
80778
- import_node_path105.default.join(destination, relative6)
80908
+ import_node_path106.default.join(root, relative6),
80909
+ import_node_path106.default.join(destination, relative6)
80779
80910
  ]);
80780
80911
  return clone();
80781
80912
  };
80782
80913
  await Promise.all(Array.from({ length: 8 }, clone));
80783
80914
  }
80784
80915
  function nativeWorkspacesDir(root) {
80785
- const device = import_node_fs101.default.statSync(root).dev;
80916
+ const device = import_node_fs102.default.statSync(root).dev;
80786
80917
  for (const cache of [
80787
80918
  sharedCacheDir(cacheDir()),
80788
80919
  cacheDir(),
80789
- import_node_path105.default.join(import_node_os21.default.homedir(), ".peach-cache")
80920
+ import_node_path106.default.join(import_node_os21.default.homedir(), ".peach-cache")
80790
80921
  ]) {
80791
80922
  let existing = cache;
80792
- while (!import_node_fs101.default.existsSync(existing)) existing = import_node_path105.default.dirname(existing);
80793
- if (import_node_fs101.default.statSync(existing).dev === device)
80794
- return import_node_path105.default.join(cache, "expo-native-workspaces");
80795
- }
80796
- let mount = import_node_fs101.default.realpathSync(root);
80797
- while (import_node_path105.default.dirname(mount) !== mount && import_node_fs101.default.statSync(import_node_path105.default.dirname(mount)).dev === device)
80798
- mount = import_node_path105.default.dirname(mount);
80799
- const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp", import_node_fs101.default.realpathSync(import_node_os21.default.tmpdir())]);
80923
+ while (!import_node_fs102.default.existsSync(existing)) existing = import_node_path106.default.dirname(existing);
80924
+ if (import_node_fs102.default.statSync(existing).dev === device)
80925
+ return import_node_path106.default.join(cache, "expo-native-workspaces");
80926
+ }
80927
+ let mount = import_node_fs102.default.realpathSync(root);
80928
+ while (import_node_path106.default.dirname(mount) !== mount && import_node_fs102.default.statSync(import_node_path106.default.dirname(mount)).dev === device)
80929
+ mount = import_node_path106.default.dirname(mount);
80930
+ const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp", import_node_fs102.default.realpathSync(import_node_os21.default.tmpdir())]);
80800
80931
  if (tmpRoots.has(mount))
80801
- return import_node_path105.default.join(sharedCacheDir(cacheDir()), "expo-native-workspaces");
80802
- return import_node_path105.default.join(mount, ".peach-cache", "expo-native-workspaces");
80932
+ return import_node_path106.default.join(sharedCacheDir(cacheDir()), "expo-native-workspaces");
80933
+ return import_node_path106.default.join(mount, ".peach-cache", "expo-native-workspaces");
80803
80934
  }
80804
80935
  function preparedExpoWorkspacesDir(app) {
80805
80936
  return nativeWorkspacesDir(findWorkspaceRoot(app));
@@ -80813,7 +80944,7 @@ function trackedSourceEntries(root, work) {
80813
80944
  if (listed.status !== 0) return [];
80814
80945
  return listed.stdout.toString("utf8").split("\0").filter((entry) => {
80815
80946
  const tab = entry.indexOf(" ");
80816
- return tab > 0 && import_node_fs101.default.existsSync(import_node_path105.default.join(work, entry.slice(tab + 1)));
80947
+ return tab > 0 && import_node_fs102.default.existsSync(import_node_path106.default.join(work, entry.slice(tab + 1)));
80817
80948
  });
80818
80949
  }
80819
80950
  function initializeWorkspaceGit(root, work) {
@@ -80862,42 +80993,42 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
80862
80993
  );
80863
80994
  watch3.excluded = excluded;
80864
80995
  watch3.ignoredLater = await untrackedIgnored(root, linkedPackageDirectories(root, app));
80865
- const manifest = JSON.parse(import_node_fs101.default.readFileSync(import_node_path105.default.join(root, "package.json"), "utf8"));
80866
- const appManifest = JSON.parse(import_node_fs101.default.readFileSync(import_node_path105.default.join(app, "package.json"), "utf8"));
80867
- const work = import_node_path105.default.join(
80996
+ const manifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
80997
+ const appManifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(app, "package.json"), "utf8"));
80998
+ const work = import_node_path106.default.join(
80868
80999
  nativeWorkspacesDir(root),
80869
81000
  stage === "installed-project" ? `${nativeHash}-installed` : nativeHash
80870
81001
  );
80871
81002
  report(`hashed ${root}`);
80872
81003
  const result = await withSwiftRootLock(work, async (lease) => {
80873
- const marker = import_node_path105.default.join(work, ".peach-complete");
80874
- const projectMarker = import_node_path105.default.join(work, ".peach-project-complete");
80875
- const preparedApp = import_node_path105.default.join(work, appRelative);
80876
- const projectReady = import_node_fs101.default.existsSync(marker) || import_node_fs101.default.existsSync(projectMarker);
81004
+ const marker = import_node_path106.default.join(work, ".peach-complete");
81005
+ const projectMarker = import_node_path106.default.join(work, ".peach-project-complete");
81006
+ const preparedApp = import_node_path106.default.join(work, appRelative);
81007
+ const projectReady = import_node_fs102.default.existsSync(marker) || import_node_fs102.default.existsSync(projectMarker);
80877
81008
  if (projectReady) {
80878
81009
  syncChangedFiles(
80879
81010
  root,
80880
81011
  work,
80881
81012
  appRelative,
80882
81013
  excluded,
80883
- stage === "workspace" && !import_node_fs101.default.existsSync(marker)
81014
+ stage === "workspace" && !import_node_fs102.default.existsSync(marker)
80884
81015
  );
80885
81016
  report(`reusing prepared workspace ${work}`);
80886
81017
  }
80887
81018
  if (!projectReady) {
80888
81019
  const partial = `${work}.${process.pid}.partial`;
80889
- await import_node_fs101.default.promises.rm(partial, { recursive: true, force: true });
80890
- await import_node_fs101.default.promises.rm(work, { recursive: true, force: true });
80891
- import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(work), { recursive: true });
81020
+ await import_node_fs102.default.promises.rm(partial, { recursive: true, force: true });
81021
+ await import_node_fs102.default.promises.rm(work, { recursive: true, force: true });
81022
+ import_node_fs102.default.mkdirSync(import_node_path106.default.dirname(work), { recursive: true });
80892
81023
  report("copying workspace");
80893
81024
  await copyInstalledWorkspace(root, partial, excluded);
80894
- import_node_fs101.default.renameSync(partial, work);
81025
+ import_node_fs102.default.renameSync(partial, work);
80895
81026
  initializeWorkspaceGit(root, work);
80896
81027
  report("copied workspace");
80897
81028
  }
80898
- if (projectReady && (stage !== "workspace" || import_node_fs101.default.existsSync(marker))) {
81029
+ if (projectReady && (stage !== "workspace" || import_node_fs102.default.existsSync(marker))) {
80899
81030
  const now2 = /* @__PURE__ */ new Date();
80900
- import_node_fs101.default.utimesSync(work, now2, now2);
81031
+ import_node_fs102.default.utimesSync(work, now2, now2);
80901
81032
  return { app: preparedApp, work };
80902
81033
  }
80903
81034
  const trustedConfigs = /* @__PURE__ */ new Set();
@@ -80909,10 +81040,10 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
80909
81040
  if (result2.status !== 0) continue;
80910
81041
  const configs = JSON.parse(result2.stdout);
80911
81042
  for (const config of configs) {
80912
- const relative6 = import_node_path105.default.relative(root, config.path);
80913
- if (relative6.startsWith("..") || import_node_path105.default.isAbsolute(relative6)) continue;
80914
- const copy = import_node_path105.default.join(work, relative6);
80915
- if (import_node_fs101.default.existsSync(copy) && import_node_fs101.default.readFileSync(config.path).equals(import_node_fs101.default.readFileSync(copy)))
81043
+ const relative6 = import_node_path106.default.relative(root, config.path);
81044
+ if (relative6.startsWith("..") || import_node_path106.default.isAbsolute(relative6)) continue;
81045
+ const copy = import_node_path106.default.join(work, relative6);
81046
+ if (import_node_fs102.default.existsSync(copy) && import_node_fs102.default.readFileSync(config.path).equals(import_node_fs102.default.readFileSync(copy)))
80916
81047
  trustedConfigs.add(copy);
80917
81048
  }
80918
81049
  }
@@ -80920,7 +81051,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
80920
81051
  MISE_TRUSTED_CONFIG_PATHS: [
80921
81052
  process.env.MISE_TRUSTED_CONFIG_PATHS,
80922
81053
  ...trustedConfigs
80923
- ].filter(Boolean).join(import_node_path105.default.delimiter)
81054
+ ].filter(Boolean).join(import_node_path106.default.delimiter)
80924
81055
  };
80925
81056
  const run17 = (command, args, cwd, env = {}, admit = true) => {
80926
81057
  const admitted = admit && teamMachineInstalled();
@@ -80938,8 +81069,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
80938
81069
  const nodeVersion = pinnedNodeVersion(root, manifest);
80939
81070
  const pinnedBun = manager.startsWith("bun@");
80940
81071
  const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, ...pinnedBun ? [manager] : [], "--"] : [];
80941
- const bunPrefix = import_node_path105.default.join(cacheDir(), "package-managers", manager);
80942
- const bunExecutable = import_node_path105.default.join(bunPrefix, "node_modules/.bin/bun");
81072
+ const bunPrefix = import_node_path106.default.join(cacheDir(), "package-managers", manager);
81073
+ const bunExecutable = import_node_path106.default.join(bunPrefix, "node_modules/.bin/bun");
80943
81074
  const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
80944
81075
  "npx",
80945
81076
  "--yes",
@@ -80954,7 +81085,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
80954
81085
  );
80955
81086
  const installEnv = {
80956
81087
  npm_config_ignore_scripts: "false",
80957
- ...pinnedBun && !nodeVersion ? { PATH: [import_node_path105.default.dirname(bunExecutable), process.env.PATH].join(import_node_path105.default.delimiter) } : {}
81088
+ ...pinnedBun && !nodeVersion ? { PATH: [import_node_path106.default.dirname(bunExecutable), process.env.PATH].join(import_node_path106.default.delimiter) } : {}
80958
81089
  };
80959
81090
  const execute = async (args, cwd, env = {}) => {
80960
81091
  const command = [...prefix, ...args];
@@ -80980,7 +81111,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
80980
81111
  );
80981
81112
  }
80982
81113
  }
80983
- if (install[0] === "npm" && import_node_fs101.default.existsSync(import_node_path105.default.join(work, "package-lock.json"))) {
81114
+ if (install[0] === "npm" && import_node_fs102.default.existsSync(import_node_path106.default.join(work, "package-lock.json"))) {
80984
81115
  report("checking npm lockfile");
80985
81116
  const check2 = [
80986
81117
  ...prefix,
@@ -81008,9 +81139,9 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
81008
81139
  report,
81009
81140
  oneSdkPrepared
81010
81141
  );
81011
- import_node_fs101.default.writeFileSync(projectMarker, "complete\n");
81142
+ import_node_fs102.default.writeFileSync(projectMarker, "complete\n");
81012
81143
  }
81013
- if (stage === "workspace" && !import_node_fs101.default.existsSync(marker)) {
81144
+ if (stage === "workspace" && !import_node_fs102.default.existsSync(marker)) {
81014
81145
  await prepareNativeProject(
81015
81146
  preparedApp,
81016
81147
  work,
@@ -81020,14 +81151,14 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
81020
81151
  report,
81021
81152
  oneSdkPrepared
81022
81153
  );
81023
- import_node_fs101.default.writeFileSync(marker, "complete\n");
81154
+ import_node_fs102.default.writeFileSync(marker, "complete\n");
81024
81155
  }
81025
81156
  const now = /* @__PURE__ */ new Date();
81026
- import_node_fs101.default.utimesSync(work, now, now);
81157
+ import_node_fs102.default.utimesSync(work, now, now);
81027
81158
  return { app: preparedApp, work };
81028
81159
  });
81029
81160
  if (stage === "workspace") readInstalledPodspecs(app, result.app);
81030
- await pruneExpoNativeWorkspaces(import_node_path105.default.dirname(work), work);
81161
+ await pruneExpoNativeWorkspaces(import_node_path106.default.dirname(work), work);
81031
81162
  current.set(key2, { watch: watch3, edits, result });
81032
81163
  return result;
81033
81164
  }
@@ -81035,20 +81166,20 @@ function declaresNativeDependency(manifest, name3) {
81035
81166
  return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
81036
81167
  }
81037
81168
  async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
81038
- const appRequire = (0, import_node_module10.createRequire)(import_node_path105.default.join(app, "package.json"));
81169
+ const appRequire = (0, import_node_module10.createRequire)(import_node_path106.default.join(app, "package.json"));
81039
81170
  const sourcePodEnv = {
81040
81171
  EXPO_USE_PRECOMPILED_MODULES: "0",
81041
81172
  ONE_PREBUILT_IOS: "0",
81042
81173
  RCT_NEW_ARCH_ENABLED: process.env.RCT_NEW_ARCH_ENABLED ?? "1"
81043
81174
  };
81044
81175
  const declares2 = (name3) => declaresNativeDependency(manifest, name3);
81045
- if (!import_node_fs101.default.existsSync(import_node_path105.default.join(app, "ios", "Podfile"))) {
81176
+ if (!import_node_fs102.default.existsSync(import_node_path106.default.join(app, "ios", "Podfile"))) {
81046
81177
  if (!declares2("expo") && !declares2("one"))
81047
81178
  throw new Error(
81048
81179
  `${app} has no ios/Podfile and declares neither expo nor one, so peach cannot generate an iOS project for it`
81049
81180
  );
81050
81181
  const prebuild = declares2("expo") ? [appRequire.resolve("expo/bin/cli"), "prebuild"] : [
81051
- import_node_path105.default.join(import_node_path105.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
81182
+ import_node_path106.default.join(import_node_path106.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
81052
81183
  "prebuild"
81053
81184
  ];
81054
81185
  await execute(
@@ -81084,25 +81215,25 @@ async function prepareNativeProject(app, workspace, manifest, stage, execute, re
81084
81215
  function stageCachedQuickCryptoOpenSsl(app) {
81085
81216
  const root = findWorkspaceRoot(app);
81086
81217
  let packageDir = null;
81087
- for (let at = app; ; at = import_node_path105.default.dirname(at)) {
81088
- const candidate = import_node_path105.default.join(at, "node_modules", "react-native-quick-crypto");
81089
- if (import_node_fs101.default.existsSync(import_node_path105.default.join(candidate, "QuickCrypto.podspec"))) {
81218
+ for (let at = app; ; at = import_node_path106.default.dirname(at)) {
81219
+ const candidate = import_node_path106.default.join(at, "node_modules", "react-native-quick-crypto");
81220
+ if (import_node_fs102.default.existsSync(import_node_path106.default.join(candidate, "QuickCrypto.podspec"))) {
81090
81221
  packageDir = candidate;
81091
81222
  break;
81092
81223
  }
81093
- if (at === root || import_node_path105.default.dirname(at) === at) break;
81224
+ if (at === root || import_node_path106.default.dirname(at) === at) break;
81094
81225
  }
81095
81226
  if (!packageDir) return;
81096
- const opensslDir = import_node_path105.default.join(packageDir, "ios", "openssl");
81097
- if (import_node_fs101.default.existsSync(import_node_path105.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
81098
- const podspec = import_node_fs101.default.readFileSync(import_node_path105.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
81227
+ const opensslDir = import_node_path106.default.join(packageDir, "ios", "openssl");
81228
+ if (import_node_fs102.default.existsSync(import_node_path106.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
81229
+ const podspec = import_node_fs102.default.readFileSync(import_node_path106.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
81099
81230
  const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
81100
81231
  if (!sha2565) return;
81101
- const archive = import_node_path105.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
81102
- if (!import_node_fs101.default.existsSync(archive) || (0, import_node_crypto61.createHash)("sha256").update(import_node_fs101.default.readFileSync(archive)).digest("hex") !== sha2565)
81232
+ const archive = import_node_path106.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
81233
+ if (!import_node_fs102.default.existsSync(archive) || (0, import_node_crypto61.createHash)("sha256").update(import_node_fs102.default.readFileSync(archive)).digest("hex") !== sha2565)
81103
81234
  return;
81104
- import_node_fs101.default.rmSync(opensslDir, { recursive: true, force: true });
81105
- import_node_fs101.default.mkdirSync(opensslDir, { recursive: true });
81235
+ import_node_fs102.default.rmSync(opensslDir, { recursive: true, force: true });
81236
+ import_node_fs102.default.mkdirSync(opensslDir, { recursive: true });
81106
81237
  (0, import_node_child_process48.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
81107
81238
  }
81108
81239
  async function runAdmitted(lease, command, args, cwd, extraEnv, admitted) {
@@ -81137,16 +81268,16 @@ ${failedOutputLine(command, cwd, bytes)}`
81137
81268
  });
81138
81269
  });
81139
81270
  }
81140
- var import_node_child_process48, import_node_crypto61, import_node_fs101, import_node_module10, import_node_os21, import_node_path105, import_node_util13, isolatedGitEnv, EXACT_VERSION, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE2, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
81271
+ var import_node_child_process48, import_node_crypto61, import_node_fs102, import_node_module10, import_node_os21, import_node_path106, import_node_util13, isolatedGitEnv, EXACT_VERSION, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE2, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
81141
81272
  var init_expo_native_workspace = __esm({
81142
81273
  "src/expo-native-workspace.ts"() {
81143
81274
  "use strict";
81144
81275
  import_node_child_process48 = require("node:child_process");
81145
81276
  import_node_crypto61 = require("node:crypto");
81146
- import_node_fs101 = __toESM(require("node:fs"), 1);
81277
+ import_node_fs102 = __toESM(require("node:fs"), 1);
81147
81278
  import_node_module10 = require("node:module");
81148
81279
  import_node_os21 = __toESM(require("node:os"), 1);
81149
- import_node_path105 = __toESM(require("node:path"), 1);
81280
+ import_node_path106 = __toESM(require("node:path"), 1);
81150
81281
  import_node_util13 = require("node:util");
81151
81282
  init_detect();
81152
81283
  init_admitted_mac_build();
@@ -81234,7 +81365,7 @@ async function expoDiscoveryKey(options2) {
81234
81365
  return { key: key2, root };
81235
81366
  }
81236
81367
  function expoDiscoveryCacheDir() {
81237
- return import_node_path106.default.join(sharedCacheDir(import_node_path106.default.join(ambientHomeDir(), "cache")), "expo-discovery");
81368
+ return import_node_path107.default.join(sharedCacheDir(import_node_path107.default.join(ambientHomeDir(), "cache")), "expo-discovery");
81238
81369
  }
81239
81370
  function vanished2(error) {
81240
81371
  return error instanceof Error && "code" in error && error.code === "ENOENT";
@@ -81242,25 +81373,25 @@ function vanished2(error) {
81242
81373
  function renew(file) {
81243
81374
  const now = /* @__PURE__ */ new Date();
81244
81375
  try {
81245
- import_node_fs102.default.utimesSync(file, now, now);
81376
+ import_node_fs103.default.utimesSync(file, now, now);
81246
81377
  } catch (error) {
81247
81378
  if (!vanished2(error)) throw error;
81248
81379
  }
81249
81380
  }
81250
81381
  function expireDiscovery(dir, keep) {
81251
81382
  const sweep = (parent, expiry) => {
81252
- if (!import_node_fs102.default.existsSync(parent)) return;
81253
- for (const name3 of import_node_fs102.default.readdirSync(parent)) {
81383
+ if (!import_node_fs103.default.existsSync(parent)) return;
81384
+ for (const name3 of import_node_fs103.default.readdirSync(parent)) {
81254
81385
  if (!expiry(name3)) continue;
81255
- const file = import_node_path106.default.join(parent, name3);
81256
- const modified = import_node_fs102.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
81386
+ const file = import_node_path107.default.join(parent, name3);
81387
+ const modified = import_node_fs103.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
81257
81388
  if (modified === void 0 || file === keep) continue;
81258
81389
  const limit = name3.endsWith(".tmp") ? ORPHAN_TEMPORARY_MS : EXPIRY_MS;
81259
- if (Date.now() - modified > limit) import_node_fs102.default.rmSync(file, { force: true });
81390
+ if (Date.now() - modified > limit) import_node_fs103.default.rmSync(file, { force: true });
81260
81391
  }
81261
81392
  };
81262
81393
  sweep(dir, (name3) => name3.endsWith(".json") || name3.endsWith(".tmp"));
81263
- sweep(import_node_path106.default.join(dir, "blobs"), () => true);
81394
+ sweep(import_node_path107.default.join(dir, "blobs"), () => true);
81264
81395
  }
81265
81396
  function isExpoSwiftSourceUnit(value) {
81266
81397
  return isRecord(value) && typeof value.namespace === "string" && typeof value.moduleId === "string" && (value.nativeAppIdentity === void 0 || isNativeAppIdentity(value.nativeAppIdentity)) && strings2(value.classes) && strings2(value.bridgeModules) && strings2(value.appDelegateSubscribers) && strings2(value.reactDelegateHandlers) && stringRecord(value.files) && strings2(value.frameworks) && (value.workspaceSources === void 0 || strings2(value.workspaceSources)) && (value.nativeTargets === void 0 || Array.isArray(value.nativeTargets) && value.nativeTargets.every(isRecord)) && (value.nativeFiles === void 0 || stringRecord(value.nativeFiles)) && (value.resources === void 0 || stringRecord(value.resources)) && (value.resourceBundles === void 0 || isSwiftResourceBundles(value.resourceBundles)) && (value.swiftLanguageMode === void 0 || typeof value.swiftLanguageMode === "number");
@@ -81270,9 +81401,9 @@ function isStoredUnit(value) {
81270
81401
  }
81271
81402
  function readExpoDiscovery(key2) {
81272
81403
  let parsed2;
81273
- const record6 = import_node_path106.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
81404
+ const record6 = import_node_path107.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
81274
81405
  try {
81275
- parsed2 = JSON.parse(import_node_fs102.default.readFileSync(record6, "utf8"));
81406
+ parsed2 = JSON.parse(import_node_fs103.default.readFileSync(record6, "utf8"));
81276
81407
  } catch {
81277
81408
  return void 0;
81278
81409
  }
@@ -81299,8 +81430,8 @@ function readExpoDiscovery(key2) {
81299
81430
  if (!Array.isArray(parsed2.units) || !parsed2.units.every(isBodyOffset))
81300
81431
  return void 0;
81301
81432
  if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
81302
- const archive = import_node_path106.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
81303
- const bytes = import_node_fs102.default.readFileSync(archive);
81433
+ const archive = import_node_path107.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
81434
+ const bytes = import_node_fs103.default.readFileSync(archive);
81304
81435
  if ((0, import_node_crypto62.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
81305
81436
  return void 0;
81306
81437
  const bodies = (0, import_node_zlib7.zstdDecompressSync)(bytes);
@@ -81355,13 +81486,13 @@ function readExpoDiscovery(key2) {
81355
81486
  }
81356
81487
  }
81357
81488
  function fileHashesPath() {
81358
- return import_node_path106.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
81489
+ return import_node_path107.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
81359
81490
  }
81360
81491
  function stampedFileHash(file) {
81361
81492
  if (!fileHashesLoaded) {
81362
81493
  fileHashesLoaded = true;
81363
81494
  try {
81364
- const saved = JSON.parse(import_node_fs102.default.readFileSync(fileHashesPath(), "utf8"));
81495
+ const saved = JSON.parse(import_node_fs103.default.readFileSync(fileHashesPath(), "utf8"));
81365
81496
  if (isRecord(saved)) {
81366
81497
  for (const [entry, value] of Object.entries(saved))
81367
81498
  if (Array.isArray(value) && typeof value[0] === "string" && typeof value[1] === "string")
@@ -81371,11 +81502,11 @@ function stampedFileHash(file) {
81371
81502
  fileHashes.clear();
81372
81503
  }
81373
81504
  }
81374
- const stat2 = import_node_fs102.default.statSync(file, { bigint: true });
81505
+ const stat2 = import_node_fs103.default.statSync(file, { bigint: true });
81375
81506
  const stamp = [stat2.dev, stat2.ino, stat2.size, stat2.mtimeNs, stat2.ctimeNs].join(":");
81376
81507
  const cached4 = fileHashes.get(file);
81377
81508
  if (cached4?.stamp === stamp) return cached4.checksum;
81378
- const checksum = (0, import_node_crypto62.createHash)("sha256").update(import_node_fs102.default.readFileSync(file)).digest("hex");
81509
+ const checksum = (0, import_node_crypto62.createHash)("sha256").update(import_node_fs103.default.readFileSync(file)).digest("hex");
81379
81510
  fileHashes.set(file, { stamp, checksum });
81380
81511
  fileHashesChanged = true;
81381
81512
  return checksum;
@@ -81386,18 +81517,18 @@ function saveFileHashes() {
81386
81517
  const target = fileHashesPath();
81387
81518
  const temporary = `${target}.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`;
81388
81519
  try {
81389
- import_node_fs102.default.mkdirSync(import_node_path106.default.dirname(target), { recursive: true });
81390
- import_node_fs102.default.writeFileSync(
81520
+ import_node_fs103.default.mkdirSync(import_node_path107.default.dirname(target), { recursive: true });
81521
+ import_node_fs103.default.writeFileSync(
81391
81522
  temporary,
81392
81523
  JSON.stringify(
81393
81524
  Object.fromEntries(
81394
- [...fileHashes].filter(([entry]) => import_node_fs102.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
81525
+ [...fileHashes].filter(([entry]) => import_node_fs103.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
81395
81526
  )
81396
81527
  )
81397
81528
  );
81398
- import_node_fs102.default.renameSync(temporary, target);
81529
+ import_node_fs103.default.renameSync(temporary, target);
81399
81530
  } catch {
81400
- import_node_fs102.default.rmSync(temporary, { force: true });
81531
+ import_node_fs103.default.rmSync(temporary, { force: true });
81401
81532
  }
81402
81533
  }
81403
81534
  function treeDigest(directory2, signal) {
@@ -81405,14 +81536,14 @@ function treeDigest(directory2, signal) {
81405
81536
  const seen = /* @__PURE__ */ new Set();
81406
81537
  const walk4 = (dir) => {
81407
81538
  signal?.throwIfAborted();
81408
- const canonical = import_node_fs102.default.realpathSync(dir);
81539
+ const canonical = import_node_fs103.default.realpathSync(dir);
81409
81540
  if (seen.has(canonical)) return;
81410
81541
  seen.add(canonical);
81411
- for (const child of import_node_fs102.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
81412
- const file = import_node_path106.default.join(dir, child.name);
81413
- const relative6 = import_node_path106.default.relative(directory2, file);
81542
+ for (const child of import_node_fs103.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
81543
+ const file = import_node_path107.default.join(dir, child.name);
81544
+ const relative6 = import_node_path107.default.relative(directory2, file);
81414
81545
  if (child.isSymbolicLink()) {
81415
- entries2.set(relative6, `link\0${import_node_fs102.default.readlinkSync(file)}`);
81546
+ entries2.set(relative6, `link\0${import_node_fs103.default.readlinkSync(file)}`);
81416
81547
  } else if (child.isDirectory()) {
81417
81548
  walk4(file);
81418
81549
  } else if (child.isFile()) {
@@ -81426,7 +81557,7 @@ function treeDigest(directory2, signal) {
81426
81557
  function frameworkDigest(directory2, signal) {
81427
81558
  let root;
81428
81559
  try {
81429
- root = import_node_fs102.default.realpathSync(directory2);
81560
+ root = import_node_fs103.default.realpathSync(directory2);
81430
81561
  } catch (error) {
81431
81562
  if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
81432
81563
  return MISSING_TREE;
@@ -81435,8 +81566,8 @@ function frameworkDigest(directory2, signal) {
81435
81566
  const entries2 = treeDigest(directory2, signal);
81436
81567
  for (const [relative6, value] of entries2) {
81437
81568
  if (!value.startsWith("link\0")) continue;
81438
- const target = import_node_fs102.default.realpathSync(import_node_path106.default.join(directory2, relative6));
81439
- if (target !== root && !target.startsWith(`${root}${import_node_path106.default.sep}`))
81569
+ const target = import_node_fs103.default.realpathSync(import_node_path107.default.join(directory2, relative6));
81570
+ if (target !== root && !target.startsWith(`${root}${import_node_path107.default.sep}`))
81440
81571
  throw new Error(`framework link escapes its tree: ${relative6}`);
81441
81572
  }
81442
81573
  return (0, import_node_crypto62.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
@@ -81454,8 +81585,8 @@ function rewritePreparedPaths(options2) {
81454
81585
  let preparedBytes;
81455
81586
  let sourceBytes;
81456
81587
  try {
81457
- preparedBytes = import_node_fs102.default.readFileSync(preparedFile);
81458
- sourceBytes = import_node_fs102.default.readFileSync(sourceFile);
81588
+ preparedBytes = import_node_fs103.default.readFileSync(preparedFile);
81589
+ sourceBytes = import_node_fs103.default.readFileSync(sourceFile);
81459
81590
  } catch {
81460
81591
  return null;
81461
81592
  }
@@ -81485,7 +81616,7 @@ function rewritePreparedPaths(options2) {
81485
81616
  return match;
81486
81617
  const separator = value.lastIndexOf("#");
81487
81618
  const preparedFile = value.slice(0, separator);
81488
- if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path106.default.sep}`)) {
81619
+ if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path107.default.sep}`)) {
81489
81620
  refusedPlugin = true;
81490
81621
  return match;
81491
81622
  }
@@ -81533,22 +81664,22 @@ function rewritePreparedPaths(options2) {
81533
81664
  frameworkDependencies[sourceDir] = sourceDigest;
81534
81665
  let portableDir = sourceDir;
81535
81666
  if (preparedDigest !== sourceDigest) {
81536
- const parent = import_node_path106.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
81537
- portableDir = import_node_path106.default.join(parent, import_node_path106.default.basename(dir));
81538
- if (!import_node_fs102.default.existsSync(portableDir)) {
81539
- import_node_fs102.default.mkdirSync(parent, { recursive: true });
81540
- const tmp = import_node_path106.default.join(parent, `.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`);
81667
+ const parent = import_node_path107.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
81668
+ portableDir = import_node_path107.default.join(parent, import_node_path107.default.basename(dir));
81669
+ if (!import_node_fs103.default.existsSync(portableDir)) {
81670
+ import_node_fs103.default.mkdirSync(parent, { recursive: true });
81671
+ const tmp = import_node_path107.default.join(parent, `.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`);
81541
81672
  try {
81542
- import_node_fs102.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
81673
+ import_node_fs103.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
81543
81674
  if (frameworkDigest(tmp, signal) !== preparedDigest)
81544
81675
  return { refuse: `framework changed while copying: ${dir}` };
81545
81676
  try {
81546
- import_node_fs102.default.renameSync(tmp, portableDir);
81677
+ import_node_fs103.default.renameSync(tmp, portableDir);
81547
81678
  } catch (error) {
81548
- if (!import_node_fs102.default.existsSync(portableDir)) throw error;
81679
+ if (!import_node_fs103.default.existsSync(portableDir)) throw error;
81549
81680
  }
81550
81681
  } finally {
81551
- import_node_fs102.default.rmSync(tmp, { recursive: true, force: true });
81682
+ import_node_fs103.default.rmSync(tmp, { recursive: true, force: true });
81552
81683
  }
81553
81684
  }
81554
81685
  if (frameworkDigest(portableDir, signal) !== preparedDigest)
@@ -81565,10 +81696,10 @@ function rewritePreparedPaths(options2) {
81565
81696
  function writeExpoDiscovery(options2) {
81566
81697
  try {
81567
81698
  const dir = expoDiscoveryCacheDir();
81568
- import_node_fs102.default.mkdirSync(dir, { recursive: true });
81569
- const tmp = import_node_path106.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`);
81699
+ import_node_fs103.default.mkdirSync(dir, { recursive: true });
81700
+ const tmp = import_node_path107.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`);
81570
81701
  if (options2.units === null) {
81571
- import_node_fs102.default.writeFileSync(
81702
+ import_node_fs103.default.writeFileSync(
81572
81703
  tmp,
81573
81704
  JSON.stringify({
81574
81705
  format: FORMAT,
@@ -81578,11 +81709,11 @@ function writeExpoDiscovery(options2) {
81578
81709
  frameworks: {}
81579
81710
  })
81580
81711
  );
81581
- import_node_fs102.default.renameSync(tmp, import_node_path106.default.join(dir, `${options2.key}.json`));
81582
- expireDiscovery(dir, import_node_path106.default.join(dir, `${options2.key}.json`));
81712
+ import_node_fs103.default.renameSync(tmp, import_node_path107.default.join(dir, `${options2.key}.json`));
81713
+ expireDiscovery(dir, import_node_path107.default.join(dir, `${options2.key}.json`));
81583
81714
  return null;
81584
81715
  }
81585
- const preparedRoot = import_node_fs102.default.realpathSync(options2.preparedRoot);
81716
+ const preparedRoot = import_node_fs103.default.realpathSync(options2.preparedRoot);
81586
81717
  const rewritten = rewritePreparedPaths({
81587
81718
  units: options2.units,
81588
81719
  sourceRoot: options2.sourceRoot,
@@ -81590,8 +81721,8 @@ function writeExpoDiscovery(options2) {
81590
81721
  signal: options2.signal
81591
81722
  });
81592
81723
  if ("refuse" in rewritten) return rewritten.refuse;
81593
- const blobDir = import_node_path106.default.join(dir, "blobs");
81594
- import_node_fs102.default.mkdirSync(blobDir, { recursive: true });
81724
+ const blobDir = import_node_path107.default.join(dir, "blobs");
81725
+ import_node_fs103.default.mkdirSync(blobDir, { recursive: true });
81595
81726
  const seen = /* @__PURE__ */ new Map();
81596
81727
  const chunks = [];
81597
81728
  let size2 = 0;
@@ -81630,14 +81761,14 @@ function writeExpoDiscovery(options2) {
81630
81761
  );
81631
81762
  const contents2 = (0, import_node_zlib7.zstdCompressSync)(Buffer.concat(chunks, size2));
81632
81763
  const archive = (0, import_node_crypto62.createHash)("sha256").update(contents2).digest("hex");
81633
- const temporary = import_node_path106.default.join(blobDir, "." + (0, import_node_crypto62.randomUUID)() + ".tmp");
81764
+ const temporary = import_node_path107.default.join(blobDir, "." + (0, import_node_crypto62.randomUUID)() + ".tmp");
81634
81765
  try {
81635
- import_node_fs102.default.writeFileSync(temporary, contents2);
81636
- import_node_fs102.default.renameSync(temporary, import_node_path106.default.join(blobDir, `${archive}.zst`));
81766
+ import_node_fs103.default.writeFileSync(temporary, contents2);
81767
+ import_node_fs103.default.renameSync(temporary, import_node_path107.default.join(blobDir, `${archive}.zst`));
81637
81768
  } finally {
81638
- import_node_fs102.default.rmSync(temporary, { force: true });
81769
+ import_node_fs103.default.rmSync(temporary, { force: true });
81639
81770
  }
81640
- import_node_fs102.default.writeFileSync(
81771
+ import_node_fs103.default.writeFileSync(
81641
81772
  tmp,
81642
81773
  JSON.stringify({
81643
81774
  format: FORMAT,
@@ -81648,8 +81779,8 @@ function writeExpoDiscovery(options2) {
81648
81779
  frameworks: rewritten.frameworks
81649
81780
  })
81650
81781
  );
81651
- import_node_fs102.default.renameSync(tmp, import_node_path106.default.join(dir, `${options2.key}.json`));
81652
- expireDiscovery(dir, import_node_path106.default.join(dir, `${options2.key}.json`));
81782
+ import_node_fs103.default.renameSync(tmp, import_node_path107.default.join(dir, `${options2.key}.json`));
81783
+ expireDiscovery(dir, import_node_path107.default.join(dir, `${options2.key}.json`));
81653
81784
  saveFileHashes();
81654
81785
  return rewritten.units;
81655
81786
  } catch (error) {
@@ -81657,13 +81788,13 @@ function writeExpoDiscovery(options2) {
81657
81788
  return error instanceof Error ? error.message : String(error);
81658
81789
  }
81659
81790
  }
81660
- var import_node_crypto62, import_node_fs102, import_node_path106, import_node_zlib7, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
81791
+ var import_node_crypto62, import_node_fs103, import_node_path107, import_node_zlib7, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
81661
81792
  var init_expo_discovery_cache = __esm({
81662
81793
  "src/expo-discovery-cache.ts"() {
81663
81794
  "use strict";
81664
81795
  import_node_crypto62 = require("node:crypto");
81665
- import_node_fs102 = __toESM(require("node:fs"), 1);
81666
- import_node_path106 = __toESM(require("node:path"), 1);
81796
+ import_node_fs103 = __toESM(require("node:fs"), 1);
81797
+ import_node_path107 = __toESM(require("node:path"), 1);
81667
81798
  import_node_zlib7 = require("node:zlib");
81668
81799
  init_expo_eager_seam_contract();
81669
81800
  init_answeredNativePackages();
@@ -81817,7 +81948,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
81817
81948
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary3.RTCAppGroupIdentifier);
81818
81949
  const screenShareExtensionBundleId = typeof dictionary3.ScreenShareExtensionBundleId === "string" ? dictionary3.ScreenShareExtensionBundleId : void 0;
81819
81950
  const rootModuleName = readRootModuleName(
81820
- app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs103.default.existsSync(file)).map((file) => import_node_fs103.default.readFileSync(file, "utf8"))
81951
+ app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs104.default.existsSync(file)).map((file) => import_node_fs104.default.readFileSync(file, "utf8"))
81821
81952
  );
81822
81953
  const identity2 = {
81823
81954
  ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
@@ -81841,7 +81972,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
81841
81972
  googleSignIn: readGoogleSignInConfiguration(
81842
81973
  dictionary3,
81843
81974
  Object.fromEntries(
81844
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(import_node_fs103.default.readFileSync(file), parseInfoPlist)])
81975
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(import_node_fs104.default.readFileSync(file), parseInfoPlist)])
81845
81976
  )
81846
81977
  ),
81847
81978
  supportedInterfaceOrientations,
@@ -81851,11 +81982,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
81851
81982
  bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
81852
81983
  appIconArtwork: resolveNativeAppIconArtwork(
81853
81984
  app.resources,
81854
- (file) => import_node_fs103.default.readFileSync(file, "utf8"),
81985
+ (file) => import_node_fs104.default.readFileSync(file, "utf8"),
81855
81986
  (file) => {
81856
- const extension = import_node_path107.default.extname(file).toLowerCase();
81987
+ const extension = import_node_path108.default.extname(file).toLowerCase();
81857
81988
  const contentType2 = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
81858
- return `data:${contentType2};base64,${import_node_fs103.default.readFileSync(file).toString("base64")}`;
81989
+ return `data:${contentType2};base64,${import_node_fs104.default.readFileSync(file).toString("base64")}`;
81859
81990
  },
81860
81991
  icons,
81861
81992
  app.appIconName,
@@ -81884,13 +82015,13 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
81884
82015
  environment
81885
82016
  });
81886
82017
  }
81887
- var import_node_fs103, import_node_module11, import_node_path107, SDK_BEFORE_SCENE_REQUIREMENT;
82018
+ var import_node_fs104, import_node_module11, import_node_path108, SDK_BEFORE_SCENE_REQUIREMENT;
81888
82019
  var init_native_app_identity_project = __esm({
81889
82020
  "src/native-app-identity-project.ts"() {
81890
82021
  "use strict";
81891
- import_node_fs103 = __toESM(require("node:fs"), 1);
82022
+ import_node_fs104 = __toESM(require("node:fs"), 1);
81892
82023
  import_node_module11 = require("node:module");
81893
- import_node_path107 = __toESM(require("node:path"), 1);
82024
+ import_node_path108 = __toESM(require("node:path"), 1);
81894
82025
  init_android_app_identity();
81895
82026
  init_is_record();
81896
82027
  init_native_app_identity();
@@ -81906,8 +82037,8 @@ var init_native_app_identity_project = __esm({
81906
82037
 
81907
82038
  // src/native-firebase-config.ts
81908
82039
  function hasExpoConfig(projectRoot) {
81909
- const packagePath = import_node_path108.default.join(projectRoot, "package.json");
81910
- const manifest = import_node_fs104.default.existsSync(packagePath) ? JSON.parse(import_node_fs104.default.readFileSync(packagePath, "utf8")) : null;
82040
+ const packagePath = import_node_path109.default.join(projectRoot, "package.json");
82041
+ const manifest = import_node_fs105.default.existsSync(packagePath) ? JSON.parse(import_node_fs105.default.readFileSync(packagePath, "utf8")) : null;
81911
82042
  if (isRecord(manifest)) {
81912
82043
  const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
81913
82044
  isRecord
@@ -81915,13 +82046,13 @@ function hasExpoConfig(projectRoot) {
81915
82046
  if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
81916
82047
  return false;
81917
82048
  }
81918
- const appJsonPath = import_node_path108.default.join(projectRoot, "app.json");
81919
- const appJson = import_node_fs104.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs104.default.readFileSync(appJsonPath, "utf8")) : null;
82049
+ const appJsonPath = import_node_path109.default.join(projectRoot, "app.json");
82050
+ const appJson = import_node_fs105.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs105.default.readFileSync(appJsonPath, "utf8")) : null;
81920
82051
  const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
81921
82052
  (value) => isRecord(value) && typeof value.googleServicesFile === "string"
81922
82053
  ));
81923
82054
  return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
81924
- (name3) => import_node_fs104.default.existsSync(import_node_path108.default.join(projectRoot, name3))
82055
+ (name3) => import_node_fs105.default.existsSync(import_node_path109.default.join(projectRoot, name3))
81925
82056
  );
81926
82057
  }
81927
82058
  function expoConfigArgs(projectRoot, resultPath) {
@@ -81929,7 +82060,7 @@ function expoConfigArgs(projectRoot, resultPath) {
81929
82060
  "--input-type=commonjs",
81930
82061
  "-e",
81931
82062
  EXPO_CONFIG_SCRIPT,
81932
- import_node_path108.default.resolve(projectRoot),
82063
+ import_node_path109.default.resolve(projectRoot),
81933
82064
  resultPath
81934
82065
  ];
81935
82066
  }
@@ -81942,14 +82073,14 @@ function readExpoConfigResult(resultPath, status, signal, stderr) {
81942
82073
  throw new Error(
81943
82074
  stderr || (signal ? `Expo native configuration evaluation was killed by ${signal}.` : "Expo native configuration evaluation failed.")
81944
82075
  );
81945
- const resolved = JSON.parse(import_node_fs104.default.readFileSync(resultPath, "utf8"));
82076
+ const resolved = JSON.parse(import_node_fs105.default.readFileSync(resultPath, "utf8"));
81946
82077
  if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
81947
82078
  return resolved;
81948
82079
  }
81949
82080
  async function readExpoConfigAsync(projectRoot) {
81950
82081
  if (!hasExpoConfig(projectRoot)) return {};
81951
82082
  const directory2 = resultDirectory();
81952
- const resultPath = import_node_path108.default.join(directory2, "config.json");
82083
+ const resultPath = import_node_path109.default.join(directory2, "config.json");
81953
82084
  try {
81954
82085
  const child = (0, import_node_child_process49.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
81955
82086
  cwd: projectRoot,
@@ -81969,18 +82100,18 @@ async function readExpoConfigAsync(projectRoot) {
81969
82100
  );
81970
82101
  return readExpoConfigResult(resultPath, status, signal, stderr);
81971
82102
  } finally {
81972
- import_node_fs104.default.rmSync(directory2, { recursive: true, force: true });
82103
+ import_node_fs105.default.rmSync(directory2, { recursive: true, force: true });
81973
82104
  }
81974
82105
  }
81975
- var import_node_child_process49, import_node_fs104, import_node_module12, import_node_os22, import_node_path108, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
82106
+ var import_node_child_process49, import_node_fs105, import_node_module12, import_node_os22, import_node_path109, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
81976
82107
  var init_native_firebase_config = __esm({
81977
82108
  "src/native-firebase-config.ts"() {
81978
82109
  "use strict";
81979
82110
  import_node_child_process49 = require("node:child_process");
81980
- import_node_fs104 = __toESM(require("node:fs"), 1);
82111
+ import_node_fs105 = __toESM(require("node:fs"), 1);
81981
82112
  import_node_module12 = require("node:module");
81982
82113
  import_node_os22 = __toESM(require("node:os"), 1);
81983
- import_node_path108 = __toESM(require("node:path"), 1);
82114
+ import_node_path109 = __toESM(require("node:path"), 1);
81984
82115
  init_is_record();
81985
82116
  init_plist();
81986
82117
  init_xcode_project();
@@ -82001,7 +82132,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
82001
82132
  if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
82002
82133
  writeFileSync(process.argv[2], result, { mode: 0o600 });`;
82003
82134
  EXPO_CONFIG_TIMEOUT_MS = 3e4;
82004
- resultDirectory = () => import_node_fs104.default.mkdtempSync(import_node_path108.default.join(import_node_os22.default.tmpdir(), "peach-expo-config-"));
82135
+ resultDirectory = () => import_node_fs105.default.mkdtempSync(import_node_path109.default.join(import_node_os22.default.tmpdir(), "peach-expo-config-"));
82005
82136
  }
82006
82137
  });
82007
82138
 
@@ -82103,12 +82234,12 @@ var init_nitroContract = __esm({
82103
82234
  function hashPackageTree(root, options2) {
82104
82235
  const files2 = [];
82105
82236
  const walk4 = (directory2, relative6) => {
82106
- for (const entry of (0, import_node_fs105.readdirSync)(directory2, { withFileTypes: true }).sort(
82237
+ for (const entry of (0, import_node_fs106.readdirSync)(directory2, { withFileTypes: true }).sort(
82107
82238
  (a, b) => options2.compareNames(a.name, b.name)
82108
82239
  )) {
82109
82240
  if (entry.name === "node_modules") continue;
82110
82241
  const path168 = `${relative6}${entry.name}`;
82111
- if (entry.isDirectory()) walk4((0, import_node_path109.join)(directory2, entry.name), `${path168}/`);
82242
+ if (entry.isDirectory()) walk4((0, import_node_path110.join)(directory2, entry.name), `${path168}/`);
82112
82243
  else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path168);
82113
82244
  }
82114
82245
  };
@@ -82117,7 +82248,7 @@ function hashPackageTree(root, options2) {
82117
82248
  return (async () => {
82118
82249
  for (let start = 0; start < files2.length; start += READ_AHEAD) {
82119
82250
  const batch = files2.slice(start, start + READ_AHEAD);
82120
- const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0, import_node_path109.join)(root, file))));
82251
+ const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0, import_node_path110.join)(root, file))));
82121
82252
  batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
82122
82253
  }
82123
82254
  return hash.digest("hex");
@@ -82134,14 +82265,14 @@ function nativePackageTreeDigest(root) {
82134
82265
  skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
82135
82266
  });
82136
82267
  }
82137
- var import_node_crypto63, import_node_fs105, import_promises12, import_node_path109, READ_AHEAD;
82268
+ var import_node_crypto63, import_node_fs106, import_promises12, import_node_path110, READ_AHEAD;
82138
82269
  var init_package_tree_digest = __esm({
82139
82270
  "src/package-tree-digest.ts"() {
82140
82271
  "use strict";
82141
82272
  import_node_crypto63 = require("node:crypto");
82142
- import_node_fs105 = require("node:fs");
82273
+ import_node_fs106 = require("node:fs");
82143
82274
  import_promises12 = require("node:fs/promises");
82144
- import_node_path109 = require("node:path");
82275
+ import_node_path110 = require("node:path");
82145
82276
  READ_AHEAD = 64;
82146
82277
  }
82147
82278
  });
@@ -82167,16 +82298,16 @@ function packageRootOf(appRoot, file) {
82167
82298
  if (parts2[0] !== "node_modules") return null;
82168
82299
  const at = parts2.lastIndexOf("node_modules") + 1;
82169
82300
  const end = at + (parts2[at]?.startsWith("@") ? 2 : 1);
82170
- return parts2.length > end ? import_node_path110.default.join(appRoot, ...parts2.slice(0, end)) : null;
82301
+ return parts2.length > end ? import_node_path111.default.join(appRoot, ...parts2.slice(0, end)) : null;
82171
82302
  }
82172
82303
  async function expoNativeInputs(appRoot) {
82173
- appRoot = import_node_fs106.default.realpathSync(appRoot);
82174
- if (findXcodeProject(import_node_path110.default.join(appRoot, "ios"))) return null;
82175
- const appRequire = (0, import_node_module13.createRequire)(import_node_path110.default.join(appRoot, "package.json"));
82304
+ appRoot = import_node_fs107.default.realpathSync(appRoot);
82305
+ if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
82306
+ const appRequire = (0, import_node_module13.createRequire)(import_node_path111.default.join(appRoot, "package.json"));
82176
82307
  let fingerprintEntry;
82177
82308
  try {
82178
82309
  fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
82179
- paths: [import_node_path110.default.dirname(appRequire.resolve("expo/package.json"))]
82310
+ paths: [import_node_path111.default.dirname(appRequire.resolve("expo/package.json"))]
82180
82311
  });
82181
82312
  } catch {
82182
82313
  return null;
@@ -82202,7 +82333,7 @@ async function expoNativeInputs(appRoot) {
82202
82333
  const root = (source.type === "package" || source.type === "dir") && source.filePath ? packageRootOf(appRoot, source.filePath) : null;
82203
82334
  if (!root) continue;
82204
82335
  const manifest = JSON.parse(
82205
- import_node_fs106.default.readFileSync(import_node_path110.default.join(root, "package.json"), "utf8")
82336
+ import_node_fs107.default.readFileSync(import_node_path111.default.join(root, "package.json"), "utf8")
82206
82337
  );
82207
82338
  if (!isRecord(manifest) || typeof manifest.name !== "string")
82208
82339
  throw new Error(`${root}: package has no name`);
@@ -82210,7 +82341,7 @@ async function expoNativeInputs(appRoot) {
82210
82341
  }
82211
82342
  packages.set(
82212
82343
  "react-native",
82213
- import_node_path110.default.dirname(appRequire.resolve("react-native/package.json"))
82344
+ import_node_path111.default.dirname(appRequire.resolve("react-native/package.json"))
82214
82345
  );
82215
82346
  return {
82216
82347
  inputs: {
@@ -82271,7 +82402,7 @@ function readExpoNativeEntry(value) {
82271
82402
  };
82272
82403
  }
82273
82404
  async function answer(appRoot) {
82274
- if (findXcodeProject(import_node_path110.default.join(appRoot, "ios"))) return null;
82405
+ if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
82275
82406
  const [source, config] = await Promise.all([
82276
82407
  hashExpoSourceWorkspace(appRoot),
82277
82408
  readExpoConfigAsync(appRoot)
@@ -82301,7 +82432,7 @@ async function lookup2(appRoot) {
82301
82432
  }
82302
82433
  function prebuiltExpoNative(appRoot, iosTarget) {
82303
82434
  if (iosTarget !== void 0) return Promise.resolve(null);
82304
- const root = import_node_fs106.default.realpathSync(appRoot);
82435
+ const root = import_node_fs107.default.realpathSync(appRoot);
82305
82436
  let pending2 = lookups.get(root);
82306
82437
  if (!pending2) {
82307
82438
  pending2 = answer(root).finally(() => lookups.delete(root));
@@ -82311,20 +82442,20 @@ function prebuiltExpoNative(appRoot, iosTarget) {
82311
82442
  }
82312
82443
  async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
82313
82444
  const prepared = await prepareExpoNativeProject(
82314
- import_node_fs106.default.realpathSync(appRoot),
82445
+ import_node_fs107.default.realpathSync(appRoot),
82315
82446
  signal,
82316
82447
  dependencies
82317
82448
  );
82318
- const ios = import_node_path110.default.join(prepared.app, "ios");
82319
- const projects2 = import_node_fs106.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcodeproj"));
82449
+ const ios = import_node_path111.default.join(prepared.app, "ios");
82450
+ const projects2 = import_node_fs107.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcodeproj"));
82320
82451
  if (projects2.length !== 1) throw new Error(`expected one Xcode project in ${ios}`);
82321
- return readXcodeAppTarget(import_node_path110.default.join(ios, projects2[0]), void 0, "Debug", {
82452
+ return readXcodeAppTarget(import_node_path111.default.join(ios, projects2[0]), void 0, "Debug", {
82322
82453
  requireSources: false
82323
82454
  });
82324
82455
  }
82325
82456
  function isManagedExpoApp(appRoot) {
82326
- return !findXcodeProject(import_node_path110.default.join(appRoot, "ios")) && declaresNativeDependency(
82327
- JSON.parse(import_node_fs106.default.readFileSync(import_node_path110.default.join(appRoot, "package.json"), "utf8")),
82457
+ return !findXcodeProject(import_node_path111.default.join(appRoot, "ios")) && declaresNativeDependency(
82458
+ JSON.parse(import_node_fs107.default.readFileSync(import_node_path111.default.join(appRoot, "package.json"), "utf8")),
82328
82459
  "expo"
82329
82460
  );
82330
82461
  }
@@ -82336,7 +82467,7 @@ async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
82336
82467
  }
82337
82468
  function servedExpoSwift(appRoot, entry, app) {
82338
82469
  if (!entry.expoSwift) return null;
82339
- const rootId = `${(0, import_node_crypto64.createHash)("sha256").update(import_node_fs106.default.realpathSync(appRoot)).digest("hex")}/Expo`;
82470
+ const rootId = `${(0, import_node_crypto64.createHash)("sha256").update(import_node_fs107.default.realpathSync(appRoot)).digest("hex")}/Expo`;
82340
82471
  if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
82341
82472
  const installed2 = installedInfoPlist(app.infoPlist, entry.infoPlist);
82342
82473
  const infoPlist2 = Buffer.from(installed2).toString("base64");
@@ -82364,14 +82495,14 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
82364
82495
  await prebuiltAppTarget(appRoot, signal, "installed")
82365
82496
  );
82366
82497
  }
82367
- var import_node_crypto64, import_node_fs106, import_node_module13, import_node_path110, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
82498
+ var import_node_crypto64, import_node_fs107, import_node_module13, import_node_path111, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
82368
82499
  var init_expo_native_prebuilt = __esm({
82369
82500
  "src/expo-native-prebuilt.ts"() {
82370
82501
  "use strict";
82371
82502
  import_node_crypto64 = require("node:crypto");
82372
- import_node_fs106 = __toESM(require("node:fs"), 1);
82503
+ import_node_fs107 = __toESM(require("node:fs"), 1);
82373
82504
  import_node_module13 = require("node:module");
82374
- import_node_path110 = __toESM(require("node:path"), 1);
82505
+ import_node_path111 = __toESM(require("node:path"), 1);
82375
82506
  import_node_util14 = require("node:util");
82376
82507
  init_answeredNativePackages();
82377
82508
  init_expo_native_compiler_digest();
@@ -82399,8 +82530,8 @@ var init_expo_native_prebuilt = __esm({
82399
82530
 
82400
82531
  // src/native-preparation.ts
82401
82532
  function ignoredChange(relative6) {
82402
- const parts2 = relative6.split(import_node_path111.default.sep);
82403
- return relative6 === import_node_path111.default.join(".git", "index") || parts2.includes(".cache") || parts2.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
82533
+ const parts2 = relative6.split(import_node_path112.default.sep);
82534
+ return relative6 === import_node_path112.default.join(".git", "index") || parts2.includes(".cache") || parts2.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
82404
82535
  relative6
82405
82536
  );
82406
82537
  }
@@ -82422,7 +82553,7 @@ function watchNativeInputs(root) {
82422
82553
  }
82423
82554
  const inputs2 = { expiry, revision: (0, import_node_crypto65.randomUUID)() };
82424
82555
  const watch3 = (directory2, recursive, name3) => {
82425
- const watcher = import_node_fs107.default.watch(
82556
+ const watcher = import_node_fs108.default.watch(
82426
82557
  directory2,
82427
82558
  { recursive, persistent: false },
82428
82559
  (_event, file) => {
@@ -82435,17 +82566,17 @@ function watchNativeInputs(root) {
82435
82566
  const scan3 = (directory2, watchRoot2) => {
82436
82567
  if (visited.has(directory2)) return;
82437
82568
  visited.add(directory2);
82438
- for (const entry of import_node_fs107.default.readdirSync(directory2, { withFileTypes: true })) {
82439
- const file = import_node_path111.default.join(directory2, entry.name);
82440
- if (ignoredChange(import_node_path111.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
82569
+ for (const entry of import_node_fs108.default.readdirSync(directory2, { withFileTypes: true })) {
82570
+ const file = import_node_path112.default.join(directory2, entry.name);
82571
+ if (ignoredChange(import_node_path112.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
82441
82572
  if (entry.isDirectory()) scan3(file, watchRoot2);
82442
82573
  if (!entry.isSymbolicLink()) continue;
82443
- const target = import_node_path111.default.resolve(directory2, import_node_fs107.default.readlinkSync(file));
82444
- if (target === workspace || target.startsWith(workspace + import_node_path111.default.sep)) continue;
82445
- const real = import_node_fs107.default.realpathSync(file);
82574
+ const target = import_node_path112.default.resolve(directory2, import_node_fs108.default.readlinkSync(file));
82575
+ if (target === workspace || target.startsWith(workspace + import_node_path112.default.sep)) continue;
82576
+ const real = import_node_fs108.default.realpathSync(file);
82446
82577
  if (visited.has(real)) continue;
82447
- watch3(import_node_path111.default.dirname(real), false, import_node_path111.default.basename(real));
82448
- if (import_node_fs107.default.statSync(real).isDirectory()) {
82578
+ watch3(import_node_path112.default.dirname(real), false, import_node_path112.default.basename(real));
82579
+ if (import_node_fs108.default.statSync(real).isDirectory()) {
82449
82580
  watch3(real, true);
82450
82581
  scan3(real, real);
82451
82582
  } else visited.add(real);
@@ -82465,13 +82596,13 @@ function nativeInputRevision(root) {
82465
82596
  const inputs2 = watchNativeInputs(root);
82466
82597
  if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
82467
82598
  }
82468
- var import_node_crypto65, import_node_fs107, import_node_path111, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
82599
+ var import_node_crypto65, import_node_fs108, import_node_path112, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
82469
82600
  var init_native_preparation = __esm({
82470
82601
  "src/native-preparation.ts"() {
82471
82602
  "use strict";
82472
82603
  import_node_crypto65 = require("node:crypto");
82473
- import_node_fs107 = __toESM(require("node:fs"), 1);
82474
- import_node_path111 = __toESM(require("node:path"), 1);
82604
+ import_node_fs108 = __toESM(require("node:fs"), 1);
82605
+ import_node_path112 = __toESM(require("node:path"), 1);
82475
82606
  import_node_timers2 = require("node:timers");
82476
82607
  init_nativePreparationContract();
82477
82608
  init_runtime_assets();
@@ -82535,87 +82666,6 @@ var init_native_preparation = __esm({
82535
82666
  }
82536
82667
  });
82537
82668
 
82538
- // src/swift-xcframework.ts
82539
- function simulatorNativeLibrary(dir) {
82540
- if (dir.endsWith(".framework")) {
82541
- const name3 = import_node_path112.default.basename(dir, ".framework");
82542
- return { name: name3, file: import_node_path112.default.join(dir, name3), kind: "framework" };
82543
- }
82544
- if (!dir.endsWith(".xcframework")) return null;
82545
- const info = parsePlistBytes(import_node_fs108.default.readFileSync(import_node_path112.default.join(dir, "Info.plist")));
82546
- if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
82547
- throw new Error(`${dir}: invalid XCFramework library declarations`);
82548
- const matches = [];
82549
- for (const entry of info.AvailableLibraries) {
82550
- if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
82551
- if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
82552
- continue;
82553
- if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
82554
- throw new Error(`${dir}: invalid simulator library paths`);
82555
- const archive = /\.a$/.test(entry.LibraryPath);
82556
- const framework = /\.framework$/.test(entry.LibraryPath);
82557
- if (!archive && !framework) continue;
82558
- const bundle = import_node_path112.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
82559
- const bundleRelative = import_node_path112.default.relative(dir, bundle);
82560
- if (bundleRelative.startsWith("..") || import_node_path112.default.isAbsolute(bundleRelative))
82561
- throw new Error(`${dir}: library escapes its XCFramework`);
82562
- let name3 = entry.LibraryPath;
82563
- let file = bundle;
82564
- if (framework) {
82565
- name3 = import_node_path112.default.basename(bundle, ".framework");
82566
- file = import_node_path112.default.join(bundle, name3);
82567
- }
82568
- const relative6 = import_node_path112.default.relative(dir, file);
82569
- if (relative6.startsWith("..") || import_node_path112.default.isAbsolute(relative6))
82570
- throw new Error(`${dir}: library escapes its XCFramework`);
82571
- if (framework) {
82572
- matches.push({ name: name3, file, kind: "framework" });
82573
- continue;
82574
- }
82575
- const slice = import_node_path112.default.resolve(dir, entry.LibraryIdentifier);
82576
- const headers = typeof entry.HeadersPath === "string" ? import_node_path112.default.resolve(slice, entry.HeadersPath) : void 0;
82577
- if (headers && relativeInside(slice, headers) === null)
82578
- throw new Error(`${dir}: headers escape their XCFramework slice`);
82579
- matches.push({ name: name3, file, kind: "archive", headers });
82580
- }
82581
- if (matches.length === 0) return null;
82582
- if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
82583
- return matches[0];
82584
- }
82585
- function isDynamicLibrary2(file) {
82586
- const fd = import_node_fs108.default.openSync(file, "r");
82587
- try {
82588
- const read2 = (offset) => {
82589
- const bytes = Buffer.alloc(16);
82590
- import_node_fs108.default.readSync(fd, bytes, 0, 16, offset);
82591
- return bytes;
82592
- };
82593
- let header = read2(0);
82594
- const universal = header.readUInt32BE(0);
82595
- if (universal === 3405691582 || universal === 3405691583) {
82596
- const arch = read2(8);
82597
- header = read2(
82598
- universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
82599
- );
82600
- }
82601
- const magic = header.readUInt32LE(0);
82602
- return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
82603
- } finally {
82604
- import_node_fs108.default.closeSync(fd);
82605
- }
82606
- }
82607
- var import_node_fs108, import_node_path112;
82608
- var init_swift_xcframework = __esm({
82609
- "src/swift-xcframework.ts"() {
82610
- "use strict";
82611
- import_node_fs108 = __toESM(require("node:fs"), 1);
82612
- import_node_path112 = __toESM(require("node:path"), 1);
82613
- init_is_record();
82614
- init_plist_bytes();
82615
- init_swift_source_file();
82616
- }
82617
- });
82618
-
82619
82669
  // src/native-static-libraries.ts
82620
82670
  function nonmodularFrameworkLibraries(directories, moduleRoot) {
82621
82671
  return [
@@ -104851,7 +104901,7 @@ var init_installed_native_libraries = __esm({
104851
104901
  // src/turbo-codegen-intake.ts
104852
104902
  function installedRendererDependencyGlobs(reactNativeRoot, appRoot) {
104853
104903
  return Object.fromEntries(
104854
- ["RCT-Folly", "DoubleConversion", "fmt"].map((name3) => {
104904
+ RENDERER_DEPENDENCY_PODS.map((name3) => {
104855
104905
  const spec = loadPodspec(
104856
104906
  import_node_path140.default.join(reactNativeRoot, "third-party-podspecs", `${name3}.podspec`),
104857
104907
  appRoot
@@ -104969,7 +105019,7 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
104969
105019
  files: hashTree(generatedRoot)
104970
105020
  };
104971
105021
  }
104972
- var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run11, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
105022
+ var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run11, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
104973
105023
  var init_turbo_codegen_intake = __esm({
104974
105024
  "src/turbo-codegen-intake.ts"() {
104975
105025
  "use strict";
@@ -104984,6 +105034,7 @@ var init_turbo_codegen_intake = __esm({
104984
105034
  init_nitro_source();
104985
105035
  init_podspec_sources();
104986
105036
  run11 = (0, import_node_util17.promisify)(import_node_child_process68.execFile);
105037
+ RENDERER_DEPENDENCY_PODS = ["RCT-Folly", "DoubleConversion", "fmt"];
104987
105038
  RENDERER_PODS = /* @__PURE__ */ new Set([
104988
105039
  "React-Fabric",
104989
105040
  "React-FabricComponents",
@@ -110897,7 +110948,7 @@ var init_react_native_core = __esm({
110897
110948
  init_swift_distribution();
110898
110949
  init_swift_package();
110899
110950
  init_swiftContract();
110900
- recipe = true ? "d54320ef52f1a201f825b780998684f9460a3c75c115b7dadf4789e14ec7f639" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
110951
+ recipe = true ? "db2c81d6628055a561c22667b098e4686f9d8924ffb229c4c7d9e15a25182502" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
110901
110952
  strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
110902
110953
  building = /* @__PURE__ */ new Map();
110903
110954
  }
@@ -111488,6 +111539,8 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
111488
111539
  return originals.some((file) => import_node_fs144.default.realpathSync(file).startsWith(reactNativeRoot)) ? [target.name] : [];
111489
111540
  })
111490
111541
  );
111542
+ for (const name3 of RENDERER_DEPENDENCY_PODS)
111543
+ if (targetByName.has(name3)) reactTargets.add(name3);
111491
111544
  for (const [file, source] of Object.entries(installed2.sourcePaths)) {
111492
111545
  if (!file.endsWith(".swift") || !import_node_fs144.default.realpathSync(source).startsWith(reactNativeRoot))
111493
111546
  continue;
@@ -113244,8 +113297,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
113244
113297
  return prepared;
113245
113298
  }
113246
113299
  }
113247
- const link = async (linked2) => {
113248
- const packagePath = expoSwiftPackage(key2, "linked-app");
113300
+ const link = async (linked2, name3 = "linked-app") => {
113301
+ const packagePath = expoSwiftPackage(key2, name3);
113249
113302
  preparePackage2(linked2, packagePath);
113250
113303
  signal.throwIfAborted();
113251
113304
  const stamp = sourceContentStamp(packagePath, module2.root);
@@ -113303,35 +113356,24 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
113303
113356
  error instanceof SwiftMissingModulesError ? [...message.matchAll(/^ (\S+)/gm)].map((match) => match[1]) : []
113304
113357
  );
113305
113358
  return pool.filter(
113306
- (unit2) => [...Object.keys(unit2.files), ...expoUnitAppPaths(unit2)].some(
113359
+ (unit2) => [
113360
+ ...Object.keys(unit2.files),
113361
+ ...expoUnitAppPaths(unit2),
113362
+ ...(unit2.nativeTargets ?? []).flatMap(
113363
+ (native) => [native.bridgingHeader, native.prefixHeader].filter(
113364
+ (file) => file !== null
113365
+ )
113366
+ )
113367
+ ].some(
113307
113368
  (name3) => nativeCopies.includes(name3) || errorFiles.some((file) => file === name3 || file.endsWith(`/${name3}`))
113308
113369
  ) || Object.values(unit2.files).some(
113309
113370
  (source) => swiftImportNames(source).some((name3) => missing2.has(name3))
113310
113371
  )
113311
113372
  );
113312
113373
  };
113313
- let checked = candidates;
113314
113374
  linked = [];
113315
- let rest = candidates;
113316
- let failure2 = linkError;
113317
- for (; ; ) {
113318
- const named = namedBy(failure2, rest);
113319
- if (named.length === 0 || named.length === rest.length) break;
113320
- rest = rest.filter((unit2) => !named.includes(unit2));
113321
- report(`linking ${rest.length} namespaces the diagnostic does not name`);
113322
- try {
113323
- artifact = await link(rest);
113324
- linked = rest;
113325
- checked = candidates.filter((unit2) => !rest.includes(unit2));
113326
- break;
113327
- } catch (error) {
113328
- signal.throwIfAborted();
113329
- if (error instanceof ExpoSwiftLinkRefusal) throw error;
113330
- failure2 = error;
113331
- }
113332
- }
113333
- const linkedWithoutChecks = linked.length;
113334
- for (const unit2 of checked) {
113375
+ let isolatedArtifact;
113376
+ const check2 = async (unit2) => {
113335
113377
  signal.throwIfAborted();
113336
113378
  const packagePath = expoSwiftPackage(key2, unit2.moduleId);
113337
113379
  preparePackage2([unit2], packagePath);
@@ -113381,9 +113423,43 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
113381
113423
  unitErrors.length ? unitErrors.join("\n") : diagnostic
113382
113424
  );
113383
113425
  }
113384
- }
113426
+ };
113427
+ const isolate = async (group, failure2) => {
113428
+ const named = namedBy(failure2, group);
113429
+ if (group !== candidates)
113430
+ report(
113431
+ `${group.length} namespaces failed${named.length ? `, naming ${named.map((unit2) => unit2.moduleId).join(", ")}` : ""}: ${(failure2 instanceof Error ? failure2.message : String(failure2)).match(/^.+: error: .*$/m)?.[0] ?? "no source error"}`
113432
+ );
113433
+ const half = Math.ceil(group.length / 2);
113434
+ const parts2 = named.length > 0 && named.length < group.length ? [
113435
+ ...named.map((unit2) => [unit2]),
113436
+ group.filter((unit2) => !named.includes(unit2))
113437
+ ] : [group.slice(0, half), group.slice(half)];
113438
+ for (const part of parts2) {
113439
+ signal.throwIfAborted();
113440
+ if (part.length === 0) continue;
113441
+ if (part.length === 1) {
113442
+ await check2(part[0]);
113443
+ continue;
113444
+ }
113445
+ const name3 = (0, import_node_crypto88.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
113446
+ report(`linking ${part.length} namespaces to isolate failures`);
113447
+ try {
113448
+ const built2 = await link(part, `isolate-${name3}`);
113449
+ linked.push(...part);
113450
+ isolatedArtifact = { units: part, artifact: built2 };
113451
+ } catch (error) {
113452
+ signal.throwIfAborted();
113453
+ if (error instanceof ExpoSwiftLinkRefusal) throw error;
113454
+ await isolate(part, error);
113455
+ }
113456
+ }
113457
+ };
113458
+ await isolate(candidates, linkError);
113385
113459
  if (linked.length === candidates.length) throw linkError;
113386
- if (linked.length > linkedWithoutChecks) {
113460
+ if (isolatedArtifact?.units.length === linked.length)
113461
+ artifact = isolatedArtifact.artifact;
113462
+ else if (linked.length) {
113387
113463
  try {
113388
113464
  artifact = await link(linked);
113389
113465
  } catch (error) {
@@ -113580,6 +113656,7 @@ var init_expo_swift_host = __esm({
113580
113656
  init_swift_standins();
113581
113657
  init_swift_submit();
113582
113658
  init_swift_toolchain();
113659
+ init_turbo_codegen_intake();
113583
113660
  init_turbo_source();
113584
113661
  run12 = (0, import_node_util19.promisify)(import_node_child_process71.execFile);
113585
113662
  scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
@@ -127034,7 +127111,7 @@ var init_nitro_superset = __esm({
127034
127111
  init_nitroContract();
127035
127112
  init_swift_standin_digest();
127036
127113
  NITRO_SUPERSET_ENTRY_NAME = "superset";
127037
- NITRO_COMPILER_DIGEST = true ? "36fce173b160477b6b449e37c6203973648c41456da0875f9b607c4f4ca2dc64" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
127114
+ NITRO_COMPILER_DIGEST = true ? "744976c15724422db8f3bc8d1fdfdcf68c3f91b185210a50951930d2ea18c38e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
127038
127115
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
127039
127116
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
127040
127117
  published3 = /* @__PURE__ */ new Map();