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;
@@ -19698,13 +19698,13 @@ var init_swift_standin_digest = __esm({
19698
19698
  ];
19699
19699
  RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
19700
19700
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
19701
- STANDIN_SOURCE_DIGEST = true ? "4289873bce1ce2ab2636a7dfd38503815524abc6fd13e3bb62739b7395f65b20" : standinSourceDigest();
19701
+ STANDIN_SOURCE_DIGEST = true ? "cdf4a04b8b51e0280fcba42b7e2b6356a9ea69d0c483e1a08dc29a0dafbc3207" : standinSourceDigest();
19702
19702
  }
19703
19703
  });
19704
19704
 
19705
19705
  // src/expo-native-compiler-digest.ts
19706
19706
  function expoNativeCompilerDigestValue() {
19707
- return true ? "32e5f0f006289879151f5e79955eb059b1701f32206abe1b3134a47271cca666" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
19707
+ return true ? "dd69e490ecc79ee83e8cba98c4532818a62e9b0e93c21113e2d6c21ec60d8eee" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
19708
19708
  }
19709
19709
  var import_node_crypto18;
19710
19710
  var init_expo_native_compiler_digest = __esm({
@@ -70003,7 +70003,7 @@ var init_provenance = __esm({
70003
70003
  import_node_crypto51 = require("node:crypto");
70004
70004
  import_node_fs84 = require("node:fs");
70005
70005
  import_node_path85 = require("node:path");
70006
- 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_path85.join)(__sootsim_import_meta_dirname, ".."));
70006
+ 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_path85.join)(__sootsim_import_meta_dirname, ".."));
70007
70007
  }
70008
70008
  });
70009
70009
 
@@ -71133,6 +71133,92 @@ var init_xcode_assets = __esm({
71133
71133
  }
71134
71134
  });
71135
71135
 
71136
+ // src/swift-xcframework.ts
71137
+ function simulatorNativeLibrary(dir) {
71138
+ if (dir.endsWith(".framework")) {
71139
+ const name3 = import_node_path88.default.basename(dir, ".framework");
71140
+ return {
71141
+ name: name3,
71142
+ file: import_node_path88.default.join(dir, name3),
71143
+ slice: import_node_path88.default.dirname(dir),
71144
+ kind: "framework"
71145
+ };
71146
+ }
71147
+ if (!dir.endsWith(".xcframework")) return null;
71148
+ const info = parsePlistBytes(import_node_fs87.default.readFileSync(import_node_path88.default.join(dir, "Info.plist")));
71149
+ if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
71150
+ throw new Error(`${dir}: invalid XCFramework library declarations`);
71151
+ const matches = [];
71152
+ for (const entry of info.AvailableLibraries) {
71153
+ if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
71154
+ if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
71155
+ continue;
71156
+ if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
71157
+ throw new Error(`${dir}: invalid simulator library paths`);
71158
+ const archive = /\.a$/.test(entry.LibraryPath);
71159
+ const framework = /\.framework$/.test(entry.LibraryPath);
71160
+ if (!archive && !framework) continue;
71161
+ const slice = import_node_path88.default.resolve(dir, entry.LibraryIdentifier);
71162
+ const bundle = import_node_path88.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
71163
+ const bundleRelative = import_node_path88.default.relative(dir, bundle);
71164
+ if (bundleRelative.startsWith("..") || import_node_path88.default.isAbsolute(bundleRelative))
71165
+ throw new Error(`${dir}: library escapes its XCFramework`);
71166
+ let name3 = entry.LibraryPath;
71167
+ let file = bundle;
71168
+ if (framework) {
71169
+ name3 = import_node_path88.default.basename(bundle, ".framework");
71170
+ file = import_node_path88.default.join(bundle, name3);
71171
+ }
71172
+ const relative3 = import_node_path88.default.relative(dir, file);
71173
+ if (relative3.startsWith("..") || import_node_path88.default.isAbsolute(relative3))
71174
+ throw new Error(`${dir}: library escapes its XCFramework`);
71175
+ if (framework) {
71176
+ matches.push({ name: name3, file, slice, kind: "framework" });
71177
+ continue;
71178
+ }
71179
+ const headers = typeof entry.HeadersPath === "string" ? import_node_path88.default.resolve(slice, entry.HeadersPath) : void 0;
71180
+ if (headers && relativeInside(slice, headers) === null)
71181
+ throw new Error(`${dir}: headers escape their XCFramework slice`);
71182
+ matches.push({ name: name3, file, slice, kind: "archive", headers });
71183
+ }
71184
+ if (matches.length === 0) return null;
71185
+ if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
71186
+ return matches[0];
71187
+ }
71188
+ function isDynamicLibrary2(file) {
71189
+ const fd = import_node_fs87.default.openSync(file, "r");
71190
+ try {
71191
+ const read = (offset) => {
71192
+ const bytes = Buffer.alloc(16);
71193
+ import_node_fs87.default.readSync(fd, bytes, 0, 16, offset);
71194
+ return bytes;
71195
+ };
71196
+ let header = read(0);
71197
+ const universal = header.readUInt32BE(0);
71198
+ if (universal === 3405691582 || universal === 3405691583) {
71199
+ const arch = read(8);
71200
+ header = read(
71201
+ universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
71202
+ );
71203
+ }
71204
+ const magic = header.readUInt32LE(0);
71205
+ return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
71206
+ } finally {
71207
+ import_node_fs87.default.closeSync(fd);
71208
+ }
71209
+ }
71210
+ var import_node_fs87, import_node_path88;
71211
+ var init_swift_xcframework = __esm({
71212
+ "src/swift-xcframework.ts"() {
71213
+ "use strict";
71214
+ import_node_fs87 = __toESM(require("node:fs"), 1);
71215
+ import_node_path88 = __toESM(require("node:path"), 1);
71216
+ init_is_record();
71217
+ init_plist_bytes();
71218
+ init_swift_source_file();
71219
+ }
71220
+ });
71221
+
71136
71222
  // src/intent-definition/system-types.ts
71137
71223
  function systemIntentType(kind, name3) {
71138
71224
  const hashes = kind === "Enum" ? systemEnumHashes : systemObjectHashes;
@@ -72740,17 +72826,17 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
72740
72826
  throw new Error(`${definition2}: invalid intent code generation language ${language}`);
72741
72827
  if (prefix) identifier(prefix);
72742
72828
  if (module2) identifier(module2);
72743
- const source = import_node_fs87.default.readFileSync(definition2);
72829
+ const source = import_node_fs88.default.readFileSync(definition2);
72744
72830
  const key2 = (0, import_node_crypto54.createHash)("sha256").update(
72745
72831
  JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
72746
72832
  ).update("\0").update(source).digest("hex");
72747
- const cache = import_node_path88.default.join(derivedDirectory, "IntentDefinitions");
72748
- const output = import_node_path88.default.join(cache, key2);
72749
- const localization = definition2.split(import_node_path88.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
72750
- const compiledRelative = import_node_path88.default.join("Resources", localization, import_node_path88.default.basename(definition2));
72751
- const compiled = import_node_path88.default.join(output, compiledRelative);
72752
- const generated = import_node_path88.default.join(output, "Sources");
72753
- if (import_node_fs87.default.existsSync(compiled) && import_node_fs87.default.existsSync(generated)) return { compiled, generated };
72833
+ const cache = import_node_path89.default.join(derivedDirectory, "IntentDefinitions");
72834
+ const output = import_node_path89.default.join(cache, key2);
72835
+ const localization = definition2.split(import_node_path89.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
72836
+ const compiledRelative = import_node_path89.default.join("Resources", localization, import_node_path89.default.basename(definition2));
72837
+ const compiled = import_node_path89.default.join(output, compiledRelative);
72838
+ const generated = import_node_path89.default.join(output, "Sources");
72839
+ if (import_node_fs88.default.existsSync(compiled) && import_node_fs88.default.existsSync(generated)) return { compiled, generated };
72754
72840
  let metadata;
72755
72841
  let sources;
72756
72842
  try {
@@ -72760,34 +72846,34 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
72760
72846
  } catch (cause) {
72761
72847
  throw new Error(`could not compile intent definition ${definition2}`, { cause });
72762
72848
  }
72763
- import_node_fs87.default.mkdirSync(cache, { recursive: true });
72764
- const stage = import_node_fs87.default.mkdtempSync(import_node_path88.default.join(cache, ".compile-"));
72849
+ import_node_fs88.default.mkdirSync(cache, { recursive: true });
72850
+ const stage = import_node_fs88.default.mkdtempSync(import_node_path89.default.join(cache, ".compile-"));
72765
72851
  try {
72766
- const sourceDirectory = import_node_path88.default.join(stage, "Sources");
72767
- const resource = import_node_path88.default.join(stage, compiledRelative);
72768
- import_node_fs87.default.mkdirSync(sourceDirectory);
72769
- import_node_fs87.default.mkdirSync(import_node_path88.default.dirname(resource), { recursive: true });
72770
- import_node_fs87.default.writeFileSync(resource, metadata);
72852
+ const sourceDirectory = import_node_path89.default.join(stage, "Sources");
72853
+ const resource = import_node_path89.default.join(stage, compiledRelative);
72854
+ import_node_fs88.default.mkdirSync(sourceDirectory);
72855
+ import_node_fs88.default.mkdirSync(import_node_path89.default.dirname(resource), { recursive: true });
72856
+ import_node_fs88.default.writeFileSync(resource, metadata);
72771
72857
  for (const [file, contents2] of sources)
72772
- import_node_fs87.default.writeFileSync(import_node_path88.default.join(sourceDirectory, file), contents2);
72858
+ import_node_fs88.default.writeFileSync(import_node_path89.default.join(sourceDirectory, file), contents2);
72773
72859
  try {
72774
- import_node_fs87.default.renameSync(stage, output);
72860
+ import_node_fs88.default.renameSync(stage, output);
72775
72861
  } catch (error) {
72776
- if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !import_node_fs87.default.existsSync(compiled) || !import_node_fs87.default.existsSync(generated))
72862
+ if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !import_node_fs88.default.existsSync(compiled) || !import_node_fs88.default.existsSync(generated))
72777
72863
  throw error;
72778
72864
  }
72779
72865
  return { compiled, generated };
72780
72866
  } finally {
72781
- import_node_fs87.default.rmSync(stage, { recursive: true, force: true });
72867
+ import_node_fs88.default.rmSync(stage, { recursive: true, force: true });
72782
72868
  }
72783
72869
  }
72784
- var import_node_crypto54, import_node_fs87, import_node_path88, intentCompilerRevision;
72870
+ var import_node_crypto54, import_node_fs88, import_node_path89, intentCompilerRevision;
72785
72871
  var init_xcode_intents = __esm({
72786
72872
  "src/xcode-intents.ts"() {
72787
72873
  "use strict";
72788
72874
  import_node_crypto54 = require("node:crypto");
72789
- import_node_fs87 = __toESM(require("node:fs"), 1);
72790
- import_node_path88 = __toESM(require("node:path"), 1);
72875
+ import_node_fs88 = __toESM(require("node:fs"), 1);
72876
+ import_node_path89 = __toESM(require("node:path"), 1);
72791
72877
  init_fields();
72792
72878
  init_metadata();
72793
72879
  init_plist_reader();
@@ -72843,7 +72929,7 @@ function remoteVersionRequirement(entry) {
72843
72929
  function readXcodeJsonProject(xcodeproj, source) {
72844
72930
  const json = Bun.JSON5.parse(source);
72845
72931
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
72846
- const projectDir = import_node_path89.default.dirname(xcodeproj);
72932
+ const projectDir = import_node_path90.default.dirname(xcodeproj);
72847
72933
  const objects = {};
72848
72934
  let next = 0;
72849
72935
  const add = (entry, id) => {
@@ -72856,7 +72942,7 @@ function readXcodeJsonProject(xcodeproj, source) {
72856
72942
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw2);
72857
72943
  if (base) {
72858
72944
  if (base[1] === "PROJECT")
72859
- return { sourceTree: "<absolute>", path: import_node_path89.default.join(projectDir, base[2]) };
72945
+ return { sourceTree: "<absolute>", path: import_node_path90.default.join(projectDir, base[2]) };
72860
72946
  if (base[1] === "PRODUCTS")
72861
72947
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
72862
72948
  return null;
@@ -72864,7 +72950,7 @@ function readXcodeJsonProject(xcodeproj, source) {
72864
72950
  const unescaped = raw2.replaceAll("\\<", "<");
72865
72951
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
72866
72952
  if (unescaped.startsWith("~")) return null;
72867
- return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path89.default.join(groupDir, unescaped) };
72953
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path90.default.join(groupDir, unescaped) };
72868
72954
  };
72869
72955
  const memberships = [];
72870
72956
  const folders = [];
@@ -72875,7 +72961,7 @@ function readXcodeJsonProject(xcodeproj, source) {
72875
72961
  const kind = text6(entry.kind) ?? "file-reference";
72876
72962
  const raw2 = text6(entry.path) ?? "";
72877
72963
  const located = raw2 === "" ? null : locate(raw2, parent.dir);
72878
- const name3 = text6(entry.name) ?? import_node_path89.default.basename(raw2);
72964
+ const name3 = text6(entry.name) ?? import_node_path90.default.basename(raw2);
72879
72965
  const node = { id: "", name: name3, dir: null, parent, children: [] };
72880
72966
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
72881
72967
  node.dir = raw2 === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -72996,7 +73082,7 @@ function readXcodeJsonProject(xcodeproj, source) {
72996
73082
  if (!isObject(entry)) continue;
72997
73083
  const repository = text6(entry.repository);
72998
73084
  const local = text6(entry.path);
72999
- const name3 = local !== void 0 ? import_node_path89.default.basename(import_node_path89.default.resolve(import_node_path89.default.dirname(xcodeproj), local)) : import_node_path89.default.basename(repository ?? "").replace(/\.git$/, "");
73085
+ const name3 = local !== void 0 ? import_node_path90.default.basename(import_node_path90.default.resolve(import_node_path90.default.dirname(xcodeproj), local)) : import_node_path90.default.basename(repository ?? "").replace(/\.git$/, "");
73000
73086
  const id = text6(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
73001
73087
  isa: "XCRemoteSwiftPackageReference",
73002
73088
  repositoryURL: repository ?? "",
@@ -73168,11 +73254,11 @@ function readXcodeJsonProject(xcodeproj, source) {
73168
73254
  function isJsonObject(value) {
73169
73255
  return typeof value === "object" && value !== null && !Array.isArray(value);
73170
73256
  }
73171
- var import_node_path89, isObject, text6, items, PHASE_ISA;
73257
+ var import_node_path90, isObject, text6, items, PHASE_ISA;
73172
73258
  var init_xcode_json_project = __esm({
73173
73259
  "src/xcode-json-project.ts"() {
73174
73260
  "use strict";
73175
- import_node_path89 = __toESM(require("node:path"), 1);
73261
+ import_node_path90 = __toESM(require("node:path"), 1);
73176
73262
  isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
73177
73263
  text6 = (value) => typeof value === "string" ? value : void 0;
73178
73264
  items = (value) => Array.isArray(value) ? value : [];
@@ -73254,27 +73340,27 @@ var init_xcode_swift_features = __esm({
73254
73340
 
73255
73341
  // src/xcode-project.ts
73256
73342
  function walkFiles(dir) {
73257
- if (!import_node_fs88.default.existsSync(dir)) return [];
73343
+ if (!import_node_fs89.default.existsSync(dir)) return [];
73258
73344
  const out = [];
73259
- for (const entry of import_node_fs88.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
73345
+ for (const entry of import_node_fs89.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
73260
73346
  if (entry.name.startsWith(".")) continue;
73261
- const full = import_node_path90.default.join(dir, entry.name);
73347
+ const full = import_node_path91.default.join(dir, entry.name);
73262
73348
  if (entry.isDirectory()) out.push(...walkFiles(full));
73263
73349
  else if (entry.isFile()) out.push(full);
73264
73350
  }
73265
73351
  return out;
73266
73352
  }
73267
73353
  function readXcconfig(file, read) {
73268
- if (read.includes(file) || !import_node_fs88.default.existsSync(file)) return {};
73354
+ if (read.includes(file) || !import_node_fs89.default.existsSync(file)) return {};
73269
73355
  read.push(file);
73270
73356
  const settings = {};
73271
- for (const raw2 of import_node_fs88.default.readFileSync(file, "utf8").split("\n")) {
73357
+ for (const raw2 of import_node_fs89.default.readFileSync(file, "utf8").split("\n")) {
73272
73358
  const line = raw2.replace(/\/\/.*$/, "").trim();
73273
73359
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
73274
73360
  if (include) {
73275
73361
  Object.assign(
73276
73362
  settings,
73277
- readXcconfig(import_node_path90.default.resolve(import_node_path90.default.dirname(file), include[1]), read)
73363
+ readXcconfig(import_node_path91.default.resolve(import_node_path91.default.dirname(file), include[1]), read)
73278
73364
  );
73279
73365
  continue;
73280
73366
  }
@@ -73319,8 +73405,8 @@ function applyOperator(value, operator) {
73319
73405
  return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
73320
73406
  case "standardizepath":
73321
73407
  if (value === ".") return value;
73322
- if (import_node_path90.default.posix.isAbsolute(value))
73323
- return import_node_path90.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
73408
+ if (import_node_path91.default.posix.isAbsolute(value))
73409
+ return import_node_path91.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
73324
73410
  return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
73325
73411
  }
73326
73412
  throw new Error(`unsupported build setting operator :${operator}`);
@@ -73329,22 +73415,22 @@ function decodeXml(text7) {
73329
73415
  return text7.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
73330
73416
  }
73331
73417
  function workspaceReferences(workspace) {
73332
- const data = import_node_path90.default.join(workspace, "contents.xcworkspacedata");
73333
- if (!import_node_fs88.default.existsSync(data))
73418
+ const data = import_node_path91.default.join(workspace, "contents.xcworkspacedata");
73419
+ if (!import_node_fs89.default.existsSync(data))
73334
73420
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
73335
- const container = import_node_path90.default.dirname(workspace);
73421
+ const container = import_node_path91.default.dirname(workspace);
73336
73422
  const locate = (location, base) => {
73337
73423
  const colon = location.indexOf(":");
73338
73424
  const kind = location.slice(0, colon);
73339
73425
  const rest = location.slice(colon + 1);
73340
- if (kind === "group") return import_node_path90.default.resolve(base, rest);
73341
- if (kind === "container" || kind === "self") return import_node_path90.default.resolve(container, rest);
73342
- if (kind === "absolute") return import_node_path90.default.resolve(rest);
73343
- throw new Error(`${import_node_path90.default.basename(workspace)} has an unsupported location ${location}`);
73426
+ if (kind === "group") return import_node_path91.default.resolve(base, rest);
73427
+ if (kind === "container" || kind === "self") return import_node_path91.default.resolve(container, rest);
73428
+ if (kind === "absolute") return import_node_path91.default.resolve(rest);
73429
+ throw new Error(`${import_node_path91.default.basename(workspace)} has an unsupported location ${location}`);
73344
73430
  };
73345
73431
  const groups = [container];
73346
73432
  const references = [];
73347
- for (const [, closing, tag, attributes, selfClosing] of import_node_fs88.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
73433
+ for (const [, closing, tag, attributes, selfClosing] of import_node_fs89.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
73348
73434
  if (closing) {
73349
73435
  if (tag === "Group") groups.pop();
73350
73436
  continue;
@@ -73358,29 +73444,29 @@ function workspaceReferences(workspace) {
73358
73444
  return references;
73359
73445
  }
73360
73446
  function enclosingXcodeWorkspace(xcodeproj) {
73361
- const project2 = import_node_fs88.default.realpathSync.native(xcodeproj);
73362
- for (let dir = import_node_path90.default.dirname(project2); ; dir = import_node_path90.default.dirname(dir)) {
73363
- for (const name3 of import_node_fs88.default.readdirSync(dir).sort()) {
73447
+ const project2 = import_node_fs89.default.realpathSync.native(xcodeproj);
73448
+ for (let dir = import_node_path91.default.dirname(project2); ; dir = import_node_path91.default.dirname(dir)) {
73449
+ for (const name3 of import_node_fs89.default.readdirSync(dir).sort()) {
73364
73450
  if (!name3.endsWith(".xcworkspace")) continue;
73365
- const workspace = import_node_path90.default.join(dir, name3);
73366
- if (!import_node_fs88.default.existsSync(import_node_path90.default.join(workspace, "contents.xcworkspacedata"))) continue;
73451
+ const workspace = import_node_path91.default.join(dir, name3);
73452
+ if (!import_node_fs89.default.existsSync(import_node_path91.default.join(workspace, "contents.xcworkspacedata"))) continue;
73367
73453
  if (workspaceReferences(workspace).some(
73368
- (reference) => import_node_fs88.default.existsSync(reference) && import_node_fs88.default.realpathSync.native(reference) === project2
73454
+ (reference) => import_node_fs89.default.existsSync(reference) && import_node_fs89.default.realpathSync.native(reference) === project2
73369
73455
  ))
73370
73456
  return workspace;
73371
73457
  }
73372
- if (import_node_fs88.default.existsSync(import_node_path90.default.join(dir, ".git")) || import_node_path90.default.dirname(dir) === dir) return null;
73458
+ if (import_node_fs89.default.existsSync(import_node_path91.default.join(dir, ".git")) || import_node_path91.default.dirname(dir) === dir) return null;
73373
73459
  }
73374
73460
  }
73375
73461
  function findXcodeProject(input) {
73376
- const resolved = import_node_path90.default.resolve(input);
73462
+ const resolved = import_node_path91.default.resolve(input);
73377
73463
  if (resolved.endsWith(".xcworkspace")) {
73378
- return import_node_path90.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path90.default.dirname(resolved) : resolved;
73464
+ return import_node_path91.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path91.default.dirname(resolved) : resolved;
73379
73465
  }
73380
73466
  if (resolved.endsWith(".xcodeproj")) return resolved;
73381
73467
  if (!isDirectory3(resolved)) return null;
73382
73468
  for (const extension of [".xcworkspace", ".xcodeproj"]) {
73383
- const found = import_node_fs88.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
73469
+ const found = import_node_fs89.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
73384
73470
  if (found.length > 1) {
73385
73471
  if (extension === ".xcworkspace") {
73386
73472
  const selected = selectXcodeWorkspace(resolved, found);
@@ -73390,14 +73476,14 @@ function findXcodeProject(input) {
73390
73476
  `${resolved} holds ${found.length} ${extension} bundles (${found.join(", ")}); pass one`
73391
73477
  );
73392
73478
  }
73393
- if (found.length === 1) return import_node_path90.default.join(resolved, found[0]);
73479
+ if (found.length === 1) return import_node_path91.default.join(resolved, found[0]);
73394
73480
  }
73395
73481
  return null;
73396
73482
  }
73397
73483
  function sameXcodeProject(reference, xcodeproj) {
73398
- if (import_node_path90.default.normalize(reference) === import_node_path90.default.normalize(xcodeproj)) return true;
73484
+ if (import_node_path91.default.normalize(reference) === import_node_path91.default.normalize(xcodeproj)) return true;
73399
73485
  try {
73400
- return import_node_fs88.default.existsSync(reference) && import_node_fs88.default.existsSync(xcodeproj) && import_node_fs88.default.realpathSync.native(reference) === import_node_fs88.default.realpathSync.native(xcodeproj);
73486
+ return import_node_fs89.default.existsSync(reference) && import_node_fs89.default.existsSync(xcodeproj) && import_node_fs89.default.realpathSync.native(reference) === import_node_fs89.default.realpathSync.native(xcodeproj);
73401
73487
  } catch {
73402
73488
  return false;
73403
73489
  }
@@ -73405,38 +73491,38 @@ function sameXcodeProject(reference, xcodeproj) {
73405
73491
  function selectXcodeWorkspace(directory2, workspaces) {
73406
73492
  const sorted2 = [...workspaces].sort();
73407
73493
  if (sorted2.length === 0) return null;
73408
- if (sorted2.length === 1) return import_node_path90.default.join(directory2, sorted2[0]);
73409
- const xcodeprojs = import_node_fs88.default.readdirSync(directory2).filter((name3) => name3.endsWith(".xcodeproj")).sort();
73494
+ if (sorted2.length === 1) return import_node_path91.default.join(directory2, sorted2[0]);
73495
+ const xcodeprojs = import_node_fs89.default.readdirSync(directory2).filter((name3) => name3.endsWith(".xcodeproj")).sort();
73410
73496
  if (xcodeprojs.length !== 1) return null;
73411
- const app = import_node_path90.default.join(directory2, xcodeprojs[0]);
73497
+ const app = import_node_path91.default.join(directory2, xcodeprojs[0]);
73412
73498
  const referencing = sorted2.filter((workspace) => {
73413
73499
  try {
73414
- return workspaceReferences(import_node_path90.default.join(directory2, workspace)).some(
73500
+ return workspaceReferences(import_node_path91.default.join(directory2, workspace)).some(
73415
73501
  (reference) => sameXcodeProject(reference, app)
73416
73502
  );
73417
73503
  } catch {
73418
73504
  return false;
73419
73505
  }
73420
73506
  });
73421
- if (referencing.length === 1) return import_node_path90.default.join(directory2, referencing[0]);
73507
+ if (referencing.length === 1) return import_node_path91.default.join(directory2, referencing[0]);
73422
73508
  if (referencing.length === 0) return null;
73423
- const own2 = `${import_node_path90.default.basename(app, ".xcodeproj")}.xcworkspace`;
73509
+ const own2 = `${import_node_path91.default.basename(app, ".xcodeproj")}.xcworkspace`;
73424
73510
  const named = referencing.filter((workspace) => workspace === own2);
73425
- return named.length === 1 ? import_node_path90.default.join(directory2, named[0]) : null;
73511
+ return named.length === 1 ? import_node_path91.default.join(directory2, named[0]) : null;
73426
73512
  }
73427
73513
  function installedXcodeWorkspace(projectRoot) {
73428
- const ios = import_node_path90.default.join(projectRoot, "ios");
73429
- if (!import_node_fs88.default.existsSync(ios)) return null;
73514
+ const ios = import_node_path91.default.join(projectRoot, "ios");
73515
+ if (!import_node_fs89.default.existsSync(ios)) return null;
73430
73516
  return selectXcodeWorkspace(
73431
73517
  ios,
73432
- import_node_fs88.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
73518
+ import_node_fs89.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
73433
73519
  );
73434
73520
  }
73435
73521
  function requireInstalledXcodeWorkspace(projectRoot, needed) {
73436
73522
  const workspace = installedXcodeWorkspace(projectRoot);
73437
73523
  if (!workspace)
73438
73524
  throw new Error(
73439
- `${needed} needs an installed pod workspace in ${import_node_path90.default.join(projectRoot, "ios")}`
73525
+ `${needed} needs an installed pod workspace in ${import_node_path91.default.join(projectRoot, "ios")}`
73440
73526
  );
73441
73527
  return workspace;
73442
73528
  }
@@ -73477,8 +73563,8 @@ function remotePackageRequirements(projects2) {
73477
73563
  }
73478
73564
  function xcodeProjectFile(xcodeproj) {
73479
73565
  for (const name3 of ["project.pbxproj", "project.xcproj"]) {
73480
- const file = import_node_path90.default.join(xcodeproj, name3);
73481
- if (import_node_fs88.default.existsSync(file)) return file;
73566
+ const file = import_node_path91.default.join(xcodeproj, name3);
73567
+ if (import_node_fs89.default.existsSync(file)) return file;
73482
73568
  }
73483
73569
  return null;
73484
73570
  }
@@ -73486,7 +73572,7 @@ function loadProject(xcodeproj) {
73486
73572
  const projectFile = xcodeProjectFile(xcodeproj);
73487
73573
  if (!projectFile)
73488
73574
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
73489
- const source = import_node_fs88.default.readFileSync(projectFile, "utf8");
73575
+ const source = import_node_fs89.default.readFileSync(projectFile, "utf8");
73490
73576
  const digest2 = (0, import_node_crypto55.createHash)("sha256").update(source).digest("hex");
73491
73577
  const cached2 = loaded2.get(projectFile);
73492
73578
  if (cached2?.digest === digest2) return cached2.project;
@@ -73503,10 +73589,10 @@ function loadProject(xcodeproj) {
73503
73589
  if (!project2 || project2.isa !== "PBXProject") {
73504
73590
  throw new Error(`${projectFile} has no PBXProject root`);
73505
73591
  }
73506
- const projectDir = import_node_fs88.default.realpathSync.native(
73507
- import_node_path90.default.resolve(import_node_path90.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
73592
+ const projectDir = import_node_fs89.default.realpathSync.native(
73593
+ import_node_path91.default.resolve(import_node_path91.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
73508
73594
  );
73509
- const resolvePath = xcodePathResolver(objects, projectDir, import_node_path90.default.join);
73595
+ const resolvePath = xcodePathResolver(objects, projectDir, import_node_path91.default.join);
73510
73596
  const result = {
73511
73597
  xcodeproj,
73512
73598
  projectFile,
@@ -73537,9 +73623,9 @@ function xcodeInstallationIdentity() {
73537
73623
  if (process.platform !== "darwin") return null;
73538
73624
  const selected = process.env.DEVELOPER_DIR || selectedDeveloperDir(true);
73539
73625
  if (!selected) return null;
73540
- const directory2 = import_node_path90.default.extname(selected) === ".app" ? import_node_path90.default.join(selected, "Contents", "Developer") : selected;
73626
+ const directory2 = import_node_path91.default.extname(selected) === ".app" ? import_node_path91.default.join(selected, "Contents", "Developer") : selected;
73541
73627
  const versionFile = `${directory2}/../version.plist`;
73542
- const version2 = import_node_fs88.default.existsSync(versionFile) ? (0, import_node_crypto55.createHash)("sha256").update(import_node_fs88.default.readFileSync(versionFile)).digest("hex") : null;
73628
+ const version2 = import_node_fs89.default.existsSync(versionFile) ? (0, import_node_crypto55.createHash)("sha256").update(import_node_fs89.default.readFileSync(versionFile)).digest("hex") : null;
73543
73629
  return { directory: directory2, version: version2 };
73544
73630
  }
73545
73631
  function defaultConfiguration(project2) {
@@ -73559,7 +73645,7 @@ function expandValue(value, settings) {
73559
73645
  return value;
73560
73646
  }
73561
73647
  function processedInfoPlist(name3, file, settings, settingKeys) {
73562
- const source = file ? parsePlist(import_node_fs88.default.readFileSync(file, "utf8")) : {};
73648
+ const source = file ? parsePlist(import_node_fs89.default.readFileSync(file, "utf8")) : {};
73563
73649
  if (!source || typeof source !== "object" || Array.isArray(source) || source instanceof Date || Buffer.isBuffer(source))
73564
73650
  throw new Error(`${name3} Info.plist must contain a dictionary`);
73565
73651
  const info = {};
@@ -73599,8 +73685,8 @@ function targetSettings(ref, configuration, builtins, options2 = {}, overrides =
73599
73685
  const relative3 = str2(config.baseConfigurationReferenceRelativePath);
73600
73686
  const own2 = isDict(config.buildSettings) ? config.buildSettings : {};
73601
73687
  const directory2 = anchor ? project2.resolvePath(anchor) : null;
73602
- const baseFile = base ? project2.resolvePath(base) : directory2 && relative3 ? import_node_path90.default.resolve(directory2, relative3) : null;
73603
- if ((options2.requireSources !== false || options2.installedPods) && (base || anchor || relative3) && (!baseFile || !import_node_fs88.default.existsSync(baseFile)))
73688
+ const baseFile = base ? project2.resolvePath(base) : directory2 && relative3 ? import_node_path91.default.resolve(directory2, relative3) : null;
73689
+ if ((options2.requireSources !== false || options2.installedPods) && (base || anchor || relative3) && (!baseFile || !import_node_fs89.default.existsSync(baseFile)))
73604
73690
  throw new Error(
73605
73691
  `Unable to open base configuration reference file '${baseFile ?? base ?? relative3 ?? anchor}'`
73606
73692
  );
@@ -73694,10 +73780,10 @@ function hostMacroPluginFlags(flags) {
73694
73780
  if (flags[index - 1] !== "-load-plugin-executable") return flag;
73695
73781
  const separator = flag.lastIndexOf("#");
73696
73782
  if (separator < 0) return flag;
73697
- const root = import_node_path90.default.dirname(import_node_path90.default.dirname(flag.slice(0, separator)));
73698
- const manifest = import_node_path90.default.join(root, "package.json");
73699
- if (!import_node_fs88.default.existsSync(manifest)) return flag;
73700
- const pkg = JSON.parse(import_node_fs88.default.readFileSync(manifest, "utf8"));
73783
+ const root = import_node_path91.default.dirname(import_node_path91.default.dirname(flag.slice(0, separator)));
73784
+ const manifest = import_node_path91.default.join(root, "package.json");
73785
+ if (!import_node_fs89.default.existsSync(manifest)) return flag;
73786
+ const pkg = JSON.parse(import_node_fs89.default.readFileSync(manifest, "utf8"));
73701
73787
  if (!isRecord(pkg) || pkg.name !== "expo-modules-macros") return flag;
73702
73788
  const macros = (0, import_node_module8.createRequire)(manifest)(root);
73703
73789
  if (!isRecord(macros) || typeof macros.getScannerBinaryPath !== "function")
@@ -73715,26 +73801,26 @@ function scriptCommand(shell, script) {
73715
73801
  return [executable, ...args, "-c", script];
73716
73802
  }
73717
73803
  function expandSearchPath(directory2, rules2) {
73718
- if (import_node_path90.default.basename(directory2) !== "**") return [directory2];
73804
+ if (import_node_path91.default.basename(directory2) !== "**") return [directory2];
73719
73805
  const expanded = [];
73720
73806
  const seen = /* @__PURE__ */ new Set();
73721
- const queue = [import_node_path90.default.dirname(directory2)];
73807
+ const queue = [import_node_path91.default.dirname(directory2)];
73722
73808
  for (let at = 0; at < queue.length; at++) {
73723
73809
  const current2 = queue[at];
73724
73810
  let real;
73725
73811
  try {
73726
- real = import_node_fs88.default.realpathSync.native(current2);
73812
+ real = import_node_fs89.default.realpathSync.native(current2);
73727
73813
  } catch {
73728
73814
  continue;
73729
73815
  }
73730
- if (!import_node_fs88.default.statSync(real).isDirectory() || seen.has(real)) continue;
73816
+ if (!import_node_fs89.default.statSync(real).isDirectory() || seen.has(real)) continue;
73731
73817
  seen.add(real);
73732
73818
  expanded.push(current2);
73733
- for (const entry of import_node_fs88.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
73819
+ for (const entry of import_node_fs89.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
73734
73820
  if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
73735
73821
  if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
73736
73822
  continue;
73737
- queue.push(import_node_path90.default.join(current2, entry.name));
73823
+ queue.push(import_node_path91.default.join(current2, entry.name));
73738
73824
  }
73739
73825
  }
73740
73826
  return expanded;
@@ -73745,7 +73831,7 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
73745
73831
  const rules2 = recursiveSearchRules(settings);
73746
73832
  const directories = new Set(
73747
73833
  settingList(settings("LIBRARY_SEARCH_PATHS")).flatMap(
73748
- (raw2) => expandSearchPath(import_node_path90.default.resolve(projectDir, expand(raw2, settings)), rules2)
73834
+ (raw2) => expandSearchPath(import_node_path91.default.resolve(projectDir, expand(raw2, settings)), rules2)
73749
73835
  )
73750
73836
  );
73751
73837
  const resolved = [];
@@ -73758,18 +73844,18 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
73758
73844
  }
73759
73845
  let archive;
73760
73846
  for (const directory2 of directories) {
73761
- const file = (extension) => import_node_path90.default.join(directory2, `lib${name3}.${extension}`);
73847
+ const file = (extension) => import_node_path91.default.join(directory2, `lib${name3}.${extension}`);
73762
73848
  const dylib = file("dylib");
73763
- const parent = import_node_path90.default.dirname(dylib);
73849
+ const parent = import_node_path91.default.dirname(dylib);
73764
73850
  let present = libraryDirectories.get(parent);
73765
73851
  if (present === void 0) {
73766
- present = import_node_fs88.default.existsSync(parent);
73852
+ present = import_node_fs89.default.existsSync(parent);
73767
73853
  libraryDirectories.set(parent, present);
73768
73854
  }
73769
73855
  if (!present) continue;
73770
- if (import_node_fs88.default.existsSync(dylib) || import_node_fs88.default.existsSync(file("tbd"))) break;
73856
+ if (import_node_fs89.default.existsSync(dylib) || import_node_fs89.default.existsSync(file("tbd"))) break;
73771
73857
  const staticLibrary = file("a");
73772
- if (!import_node_fs88.default.existsSync(staticLibrary)) continue;
73858
+ if (!import_node_fs89.default.existsSync(staticLibrary)) continue;
73773
73859
  archive = staticLibrary;
73774
73860
  break;
73775
73861
  }
@@ -73866,7 +73952,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
73866
73952
  for (const token of tokens2) {
73867
73953
  if (token.startsWith("-")) break;
73868
73954
  const file = resolve3(token);
73869
- if (file?.endsWith(".xcassets")) catalogs.push(import_node_path90.default.resolve(projectDir, file));
73955
+ if (file?.endsWith(".xcassets")) catalogs.push(import_node_path91.default.resolve(projectDir, file));
73870
73956
  }
73871
73957
  }
73872
73958
  return catalogs;
@@ -73911,14 +73997,14 @@ function shellCopies(script, settings, projectDir) {
73911
73997
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
73912
73998
  return [];
73913
73999
  copies.push({
73914
- from: import_node_path90.default.resolve(projectDir, operands[0]),
73915
- to: import_node_path90.default.resolve(projectDir, operands[1])
74000
+ from: import_node_path91.default.resolve(projectDir, operands[0]),
74001
+ to: import_node_path91.default.resolve(projectDir, operands[1])
73916
74002
  });
73917
74003
  }
73918
74004
  return copies;
73919
74005
  }
73920
74006
  function fileListEntries(file, absolute) {
73921
- return import_node_fs88.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
74007
+ return import_node_fs89.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
73922
74008
  }
73923
74009
  function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
73924
74010
  const { project: project2, target, id: targetId } = ref;
@@ -73932,17 +74018,17 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
73932
74018
  const copiedFiles = [];
73933
74019
  let generatedInfoPlist = false;
73934
74020
  const declaredInfoPlist = settings("INFOPLIST_FILE");
73935
- const infoPlistOutput = declaredInfoPlist ? import_node_path90.default.resolve(project2.projectDir, declaredInfoPlist) : null;
74021
+ const infoPlistOutput = declaredInfoPlist ? import_node_path91.default.resolve(project2.projectDir, declaredInfoPlist) : null;
73936
74022
  const isPreparedOutput = (file) => file === infoPlistOutput || options2.requireSources !== false && file.endsWith(".swift");
73937
74023
  let absentSources = false;
73938
74024
  if (options2.prepareGeneratedSources === true && options2.requireSources !== false)
73939
74025
  project2.visitMembers(
73940
74026
  targetId,
73941
- xcodePathResolver(project2.objects, project2.projectDir, import_node_path90.default.join, settings),
73942
- (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs88.default.existsSync(file) ? [file] : [],
73943
- import_node_path90.default.join,
74027
+ xcodePathResolver(project2.objects, project2.projectDir, import_node_path91.default.join, settings),
74028
+ (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs89.default.existsSync(file) ? [file] : [],
74029
+ import_node_path91.default.join,
73944
74030
  (file, kind) => {
73945
- if (kind !== "header" && kind !== "resource" && !import_node_fs88.default.existsSync(file))
74031
+ if (kind !== "header" && kind !== "resource" && !import_node_fs89.default.existsSync(file))
73946
74032
  absentSources = true;
73947
74033
  }
73948
74034
  );
@@ -73961,7 +74047,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
73961
74047
  copiedFiles.push(
73962
74048
  ...shellCopies(str2(phase.shellScript) ?? "", settings, project2.projectDir)
73963
74049
  );
73964
- const absolute = (raw2) => import_node_path90.default.resolve(project2.projectDir, expand(raw2, settings));
74050
+ const absolute = (raw2) => import_node_path91.default.resolve(project2.projectDir, expand(raw2, settings));
73965
74051
  const inputs2 = list(phase.inputPaths).map(absolute);
73966
74052
  const outputs = list(phase.outputPaths).map(absolute);
73967
74053
  const fileLists = /* @__PURE__ */ new Map();
@@ -73970,7 +74056,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
73970
74056
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
73971
74057
  ).map((raw2) => {
73972
74058
  const file = absolute(raw2);
73973
- if (!import_node_fs88.default.existsSync(file)) {
74059
+ if (!import_node_fs89.default.existsSync(file)) {
73974
74060
  return { file, entries: [] };
73975
74061
  }
73976
74062
  return { file, entries: fileListEntries(file, absolute) };
@@ -73991,14 +74077,14 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
73991
74077
  ...fileLists.get("OUTPUT").map((item) => item.file)
73992
74078
  ];
73993
74079
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
73994
- for (const file of inputFiles) if (import_node_fs88.default.existsSync(file)) projectInputs.add(file);
74080
+ for (const file of inputFiles) if (import_node_fs89.default.existsSync(file)) projectInputs.add(file);
73995
74081
  }
73996
74082
  const undeclaredGenerator = absentSources && beforeSources && allOutputs.length === 0 && str2(phase.runOnlyForDeploymentPostprocessing) !== "1";
73997
74083
  if (options2.prepareGeneratedSources === true && (allOutputs.some(isPreparedOutput) || undeclaredGenerator)) {
73998
- const phaseDir = import_node_path90.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
74084
+ const phaseDir = import_node_path91.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
73999
74085
  for (const lists of fileLists.values())
74000
74086
  for (const { file } of lists)
74001
- if (!import_node_fs88.default.existsSync(file))
74087
+ if (!import_node_fs89.default.existsSync(file))
74002
74088
  throw new Error(
74003
74089
  `${targetName}: Run Script "${script}" missing file list ${file}`
74004
74090
  );
@@ -74017,7 +74103,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
74017
74103
  const lists = fileLists.get(kind);
74018
74104
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
74019
74105
  lists.forEach((_item, index) => {
74020
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path90.default.join(
74106
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path91.default.join(
74021
74107
  phaseDir,
74022
74108
  `${kind}-${index}.xcfilelist`
74023
74109
  );
@@ -74028,22 +74114,22 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
74028
74114
  );
74029
74115
  for (const file of inputFiles) {
74030
74116
  signature2.update(file);
74031
- if (import_node_fs88.default.existsSync(file)) {
74032
- const stat = import_node_fs88.default.statSync(file);
74117
+ if (import_node_fs89.default.existsSync(file)) {
74118
+ const stat = import_node_fs89.default.statSync(file);
74033
74119
  signature2.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
74034
74120
  } else signature2.update("missing");
74035
74121
  }
74036
74122
  const stamp = signature2.digest("hex");
74037
74123
  const key2 = `${project2.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
74038
- if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs88.default.existsSync(file)))
74124
+ if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs89.default.existsSync(file)))
74039
74125
  continue;
74040
- import_node_fs88.default.mkdirSync(phaseDir, { recursive: true });
74126
+ import_node_fs89.default.mkdirSync(phaseDir, { recursive: true });
74041
74127
  if (process.platform === "linux") {
74042
74128
  const bin = swiftToolchainBin(
74043
74129
  privateSwiftRelease() ?? swiftNativePin().distribution.release
74044
74130
  );
74045
- const startup = import_node_path90.default.join(phaseDir, "peach-tools.sh");
74046
- import_node_fs88.default.writeFileSync(
74131
+ const startup = import_node_path91.default.join(phaseDir, "peach-tools.sh");
74132
+ import_node_fs89.default.writeFileSync(
74047
74133
  startup,
74048
74134
  'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
74049
74135
  );
@@ -74052,15 +74138,15 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
74052
74138
  env.PEACH_PHASE_TOOLCHAIN = bin;
74053
74139
  env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
74054
74140
  env.BASH_ENV = startup;
74055
- env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path90.default.delimiter);
74141
+ env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path91.default.delimiter);
74056
74142
  }
74057
- import_node_fs88.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
74058
- import_node_fs88.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
74143
+ import_node_fs89.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
74144
+ import_node_fs89.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
74059
74145
  for (const output of allOutputs)
74060
- import_node_fs88.default.mkdirSync(import_node_path90.default.dirname(output), { recursive: true });
74146
+ import_node_fs89.default.mkdirSync(import_node_path91.default.dirname(output), { recursive: true });
74061
74147
  for (const [kind, lists] of fileLists)
74062
74148
  lists.forEach((item, index) => {
74063
- import_node_fs88.default.writeFileSync(
74149
+ import_node_fs89.default.writeFileSync(
74064
74150
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
74065
74151
  `${item.entries.join("\n")}
74066
74152
  `
@@ -74068,9 +74154,9 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
74068
74154
  });
74069
74155
  const rawScript = str2(phase.shellScript) ?? "";
74070
74156
  if (rawScript.includes("generate-modules-provider")) {
74071
- const preloadPath = import_node_path90.default.join(phaseDir, "expo-scan-timeout.cjs");
74072
- import_node_fs88.default.mkdirSync(phaseDir, { recursive: true });
74073
- import_node_fs88.default.writeFileSync(
74157
+ const preloadPath = import_node_path91.default.join(phaseDir, "expo-scan-timeout.cjs");
74158
+ import_node_fs89.default.mkdirSync(phaseDir, { recursive: true });
74159
+ import_node_fs89.default.writeFileSync(
74074
74160
  preloadPath,
74075
74161
  [
74076
74162
  "const cp = require('node:child_process');",
@@ -74108,7 +74194,7 @@ ${output}`
74108
74194
  );
74109
74195
  }
74110
74196
  const missing = allOutputs.filter(
74111
- (file) => file === infoPlistOutput && !import_node_fs88.default.existsSync(file)
74197
+ (file) => file === infoPlistOutput && !import_node_fs89.default.existsSync(file)
74112
74198
  );
74113
74199
  if (missing.length > 0)
74114
74200
  throw new Error(
@@ -74119,9 +74205,9 @@ ${output}`
74119
74205
  }
74120
74206
  project2.visitMembers(
74121
74207
  targetId,
74122
- xcodePathResolver(project2.objects, project2.projectDir, import_node_path90.default.join, settings),
74123
- (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs88.default.existsSync(file) ? [file] : [],
74124
- import_node_path90.default.join,
74208
+ xcodePathResolver(project2.objects, project2.projectDir, import_node_path91.default.join, settings),
74209
+ (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs89.default.existsSync(file) ? [file] : [],
74210
+ import_node_path91.default.join,
74125
74211
  (file, kind, bundleName) => {
74126
74212
  if (kind === "header") {
74127
74213
  headers.add(file);
@@ -74132,9 +74218,9 @@ ${output}`
74132
74218
  if (bundleName) resourceNames[file] = bundleName;
74133
74219
  return;
74134
74220
  }
74135
- if (!import_node_fs88.default.existsSync(file)) {
74221
+ if (!import_node_fs89.default.existsSync(file)) {
74136
74222
  if (options2.requireSources === false) return;
74137
- const script = scriptForOutput.get(import_node_path90.default.normalize(file));
74223
+ const script = scriptForOutput.get(import_node_path91.default.normalize(file));
74138
74224
  throw new Error(
74139
74225
  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}`
74140
74226
  );
@@ -74145,21 +74231,21 @@ ${output}`
74145
74231
  );
74146
74232
  if (options2.prepareGeneratedSources && options2.requireSources !== false) {
74147
74233
  const interfaceFiles = [...resources].filter(
74148
- (file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path90.default.sep).some((part) => part.endsWith(".bundle"))
74234
+ (file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path91.default.sep).some((part) => part.endsWith(".bundle"))
74149
74235
  );
74150
74236
  let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
74151
- if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs88.default.existsSync(infoPlistOutput)) {
74152
- const info = parsePlist(import_node_fs88.default.readFileSync(infoPlistOutput, "utf8"));
74237
+ if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs89.default.existsSync(infoPlistOutput)) {
74238
+ const info = parsePlist(import_node_fs89.default.readFileSync(infoPlistOutput, "utf8"));
74153
74239
  const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
74154
74240
  if (typeof declared === "string") launchName = expand(declared, settings);
74155
74241
  }
74156
74242
  const interfaceOutputs = /* @__PURE__ */ new Set();
74157
74243
  for (const file of interfaceFiles) {
74158
- const localization = file.split(import_node_path90.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
74244
+ const localization = file.split(import_node_path91.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
74159
74245
  const isStoryboard = file.endsWith(".storyboard");
74160
74246
  const extension = isStoryboard ? ".storyboardc" : ".nib";
74161
- const name3 = import_node_path90.default.basename(file, import_node_path90.default.extname(file));
74162
- const output = import_node_path90.default.join(
74247
+ const name3 = import_node_path91.default.basename(file, import_node_path91.default.extname(file));
74248
+ const output = import_node_path91.default.join(
74163
74249
  settings("DERIVED_FILE_DIR"),
74164
74250
  "InterfaceBuilder",
74165
74251
  localization,
@@ -74178,10 +74264,10 @@ ${output}`
74178
74264
  const inputs2 = JSON.stringify([
74179
74265
  1,
74180
74266
  args,
74181
- (0, import_node_crypto55.createHash)("sha256").update(import_node_fs88.default.readFileSync(file)).digest("hex")
74267
+ (0, import_node_crypto55.createHash)("sha256").update(import_node_fs89.default.readFileSync(file)).digest("hex")
74182
74268
  ]);
74183
74269
  const developer = settings("DEVELOPER_DIR");
74184
- const cached2 = import_node_fs88.default.existsSync(output) && import_node_fs88.default.existsSync(stamp) ? import_node_fs88.default.readFileSync(stamp, "utf8").split("\n") : [];
74270
+ const cached2 = import_node_fs89.default.existsSync(output) && import_node_fs89.default.existsSync(stamp) ? import_node_fs89.default.readFileSync(stamp, "utf8").split("\n") : [];
74185
74271
  projectInputs.add(file);
74186
74272
  resources.delete(file);
74187
74273
  if (cached2[0] !== inputs2 || process.platform === "darwin" && cached2[1] !== developer) {
@@ -74191,15 +74277,15 @@ ${output}`
74191
74277
  `${targetName}: Interface Builder compilation requires macOS and Xcode`
74192
74278
  );
74193
74279
  }
74194
- import_node_fs88.default.rmSync(output, { recursive: true, force: true });
74195
- import_node_fs88.default.rmSync(stamp, { force: true });
74196
- import_node_fs88.default.mkdirSync(import_node_path90.default.dirname(output), { recursive: true });
74280
+ import_node_fs89.default.rmSync(output, { recursive: true, force: true });
74281
+ import_node_fs89.default.rmSync(stamp, { force: true });
74282
+ import_node_fs89.default.mkdirSync(import_node_path91.default.dirname(output), { recursive: true });
74197
74283
  (0, import_node_child_process45.execFileSync)("xcrun", ["ibtool", "--compile", output, file, ...args], {
74198
74284
  cwd: project2.projectDir,
74199
74285
  stdio: ["ignore", "pipe", "pipe"],
74200
74286
  timeout: runScriptTimeoutMs
74201
74287
  });
74202
- import_node_fs88.default.writeFileSync(stamp, `${inputs2}
74288
+ import_node_fs89.default.writeFileSync(stamp, `${inputs2}
74203
74289
  ${developer}
74204
74290
  `);
74205
74291
  }
@@ -74241,33 +74327,33 @@ ${developer}
74241
74327
  function commonAncestor(dirs) {
74242
74328
  let common2 = dirs[0];
74243
74329
  for (const dir of dirs) {
74244
- while (common2 !== import_node_path90.default.dirname(common2) && import_node_path90.default.relative(common2, dir).startsWith(".."))
74245
- common2 = import_node_path90.default.dirname(common2);
74330
+ while (common2 !== import_node_path91.default.dirname(common2) && import_node_path91.default.relative(common2, dir).startsWith(".."))
74331
+ common2 = import_node_path91.default.dirname(common2);
74246
74332
  }
74247
74333
  return common2;
74248
74334
  }
74249
74335
  function installedPodsSandbox(pods) {
74250
- const podfileLock = import_node_path90.default.join(import_node_path90.default.dirname(pods), "Podfile.lock");
74251
- const manifestLock = import_node_path90.default.join(pods, "Manifest.lock");
74252
- if (!import_node_fs88.default.existsSync(podfileLock))
74336
+ const podfileLock = import_node_path91.default.join(import_node_path91.default.dirname(pods), "Podfile.lock");
74337
+ const manifestLock = import_node_path91.default.join(pods, "Manifest.lock");
74338
+ if (!import_node_fs89.default.existsSync(podfileLock))
74253
74339
  throw new Error(
74254
- `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path90.default.dirname(pods)}`
74340
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path91.default.dirname(pods)}`
74255
74341
  );
74256
- if (!import_node_fs88.default.existsSync(manifestLock) || !import_node_fs88.default.readFileSync(manifestLock).equals(import_node_fs88.default.readFileSync(podfileLock)))
74342
+ if (!import_node_fs89.default.existsSync(manifestLock) || !import_node_fs89.default.readFileSync(manifestLock).equals(import_node_fs89.default.readFileSync(podfileLock)))
74257
74343
  throw new Error(
74258
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path90.default.dirname(pods)}`
74344
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path91.default.dirname(pods)}`
74259
74345
  );
74260
74346
  const specChecksums = {};
74261
- const lines = import_node_fs88.default.readFileSync(manifestLock, "utf8").split("\n");
74347
+ const lines = import_node_fs89.default.readFileSync(manifestLock, "utf8").split("\n");
74262
74348
  const start = lines.indexOf("SPEC CHECKSUMS:");
74263
74349
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
74264
74350
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
74265
74351
  if (!entry) break;
74266
74352
  specChecksums[entry[1]] = entry[2];
74267
74353
  }
74268
- const specs = import_node_path90.default.join(pods, "Local Podspecs");
74269
- const generated = import_node_path90.default.join(pods, POD_GRAPH_SPECIFICATIONS);
74270
- if (import_node_fs88.default.existsSync(generated))
74354
+ const specs = import_node_path91.default.join(pods, "Local Podspecs");
74355
+ const generated = import_node_path91.default.join(pods, POD_GRAPH_SPECIFICATIONS);
74356
+ if (import_node_fs89.default.existsSync(generated))
74271
74357
  return {
74272
74358
  podfileLock,
74273
74359
  manifestLock,
@@ -74275,15 +74361,15 @@ function installedPodsSandbox(pods) {
74275
74361
  localPodspecs: readPodGraphSpecifications(generated),
74276
74362
  specificationFiles: [generated]
74277
74363
  };
74278
- const specificationFiles = isDirectory3(specs) ? import_node_fs88.default.readdirSync(specs).filter((name3) => name3.endsWith(".podspec.json")).sort().map((name3) => import_node_path90.default.join(specs, name3)) : [];
74364
+ const specificationFiles = isDirectory3(specs) ? import_node_fs89.default.readdirSync(specs).filter((name3) => name3.endsWith(".podspec.json")).sort().map((name3) => import_node_path91.default.join(specs, name3)) : [];
74279
74365
  return {
74280
74366
  podfileLock,
74281
74367
  manifestLock,
74282
74368
  specChecksums,
74283
74369
  localPodspecs: new Map(
74284
74370
  specificationFiles.map((file) => [
74285
- import_node_path90.default.basename(file, ".podspec.json"),
74286
- import_node_fs88.default.readFileSync(file, "utf8")
74371
+ import_node_path91.default.basename(file, ".podspec.json"),
74372
+ import_node_fs89.default.readFileSync(file, "utf8")
74287
74373
  ])
74288
74374
  ),
74289
74375
  specificationFiles
@@ -74298,14 +74384,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
74298
74384
  if (!xcodeProjectFile(xcodeproj)) {
74299
74385
  if (installedPods && isPodsProject(xcodeproj))
74300
74386
  throw new Error(
74301
- `${import_node_path90.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path90.default.dirname(import_node_path90.default.dirname(xcodeproj))}`
74387
+ `${import_node_path91.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path91.default.dirname(import_node_path91.default.dirname(xcodeproj))}`
74302
74388
  );
74303
74389
  return;
74304
74390
  }
74305
- const key2 = import_node_fs88.default.realpathSync.native(xcodeproj);
74306
- if (projectAt.has(key2) || !installedPods && key2.split(import_node_path90.default.sep).includes("Pods"))
74391
+ const key2 = import_node_fs89.default.realpathSync.native(xcodeproj);
74392
+ if (projectAt.has(key2) || !installedPods && key2.split(import_node_path91.default.sep).includes("Pods"))
74307
74393
  return;
74308
- if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path90.default.dirname(key2));
74394
+ if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path91.default.dirname(key2));
74309
74395
  const project2 = loadProject(key2);
74310
74396
  projectAt.set(key2, project2);
74311
74397
  projects2.push(project2);
@@ -74321,12 +74407,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
74321
74407
  for (const reference of listed)
74322
74408
  if (reference.endsWith(".xcodeproj")) addProject(reference);
74323
74409
  if (projects2.length === 0) {
74324
- throw new Error(`${import_node_path90.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
74410
+ throw new Error(`${import_node_path91.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
74325
74411
  }
74326
- const podfile = import_node_path90.default.join(import_node_path90.default.dirname(xcodeprojOrWorkspace), "Podfile");
74327
- if (installedPods && !cocoapods && import_node_fs88.default.existsSync(podfile))
74412
+ const podfile = import_node_path91.default.join(import_node_path91.default.dirname(xcodeprojOrWorkspace), "Podfile");
74413
+ if (installedPods && !cocoapods && import_node_fs89.default.existsSync(podfile))
74328
74414
  throw new Error(
74329
- `${podfile} is not installed into ${import_node_path90.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path90.default.dirname(podfile)} and open the workspace it writes`
74415
+ `${podfile} is not installed into ${import_node_path91.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path91.default.dirname(podfile)} and open the workspace it writes`
74330
74416
  );
74331
74417
  return { listed, projects: projects2, projectAt, cocoapods };
74332
74418
  }
@@ -74363,7 +74449,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options2 = {}) {
74363
74449
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options2)).map((ref) => str2(ref.target.name) ?? ref.id);
74364
74450
  }
74365
74451
  function defaultXcodeAppTarget(xcodeproj) {
74366
- const project2 = loadProject(import_node_fs88.default.realpathSync.native(xcodeproj));
74452
+ const project2 = loadProject(import_node_fs89.default.realpathSync.native(xcodeproj));
74367
74453
  for (const [id, target] of Object.entries(project2.objects)) {
74368
74454
  if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
74369
74455
  if (isIosAppTarget({ project: project2, id, target }, { requireSources: false }))
@@ -74371,30 +74457,30 @@ function defaultXcodeAppTarget(xcodeproj) {
74371
74457
  }
74372
74458
  }
74373
74459
  function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
74374
- const container = import_node_fs88.default.realpathSync.native(xcodeprojOrWorkspace);
74460
+ const container = import_node_fs89.default.realpathSync.native(xcodeprojOrWorkspace);
74375
74461
  const { projects: projects2 } = workspaceProjects(container);
74376
74462
  const containers = [
74377
74463
  .../* @__PURE__ */ new Set([container, ...projects2.map((project3) => project3.xcodeproj)])
74378
74464
  ];
74379
74465
  const found = containers.flatMap(
74380
74466
  (dir) => [
74381
- import_node_path90.default.join(dir, "xcshareddata"),
74382
- ...isDirectory3(import_node_path90.default.join(dir, "xcuserdata")) ? import_node_fs88.default.readdirSync(import_node_path90.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path90.default.join(dir, "xcuserdata", user)) : []
74467
+ import_node_path91.default.join(dir, "xcshareddata"),
74468
+ ...isDirectory3(import_node_path91.default.join(dir, "xcuserdata")) ? import_node_fs89.default.readdirSync(import_node_path91.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path91.default.join(dir, "xcuserdata", user)) : []
74383
74469
  ].map((data) => ({
74384
74470
  dir,
74385
- file: import_node_path90.default.join(data, "xcschemes", `${scheme}.xcscheme`)
74471
+ file: import_node_path91.default.join(data, "xcschemes", `${scheme}.xcscheme`)
74386
74472
  }))
74387
- ).find((candidate) => import_node_fs88.default.existsSync(candidate.file));
74473
+ ).find((candidate) => import_node_fs89.default.existsSync(candidate.file));
74388
74474
  if (!found) {
74389
74475
  const known = containers.flatMap(
74390
- (dir) => import_node_fs88.default.existsSync(import_node_path90.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs88.default.readdirSync(import_node_path90.default.join(dir, "xcshareddata", "xcschemes")).filter((name4) => name4.endsWith(".xcscheme")).map((name4) => name4.slice(0, -".xcscheme".length)).sort() : []
74476
+ (dir) => import_node_fs89.default.existsSync(import_node_path91.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs89.default.readdirSync(import_node_path91.default.join(dir, "xcshareddata", "xcschemes")).filter((name4) => name4.endsWith(".xcscheme")).map((name4) => name4.slice(0, -".xcscheme".length)).sort() : []
74391
74477
  );
74392
74478
  throw new Error(
74393
- `${import_node_path90.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
74479
+ `${import_node_path91.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
74394
74480
  );
74395
74481
  }
74396
74482
  const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
74397
- import_node_fs88.default.readFileSync(found.file, "utf8")
74483
+ import_node_fs89.default.readFileSync(found.file, "utf8")
74398
74484
  );
74399
74485
  const attribute2 = (text7, name4) => {
74400
74486
  const value = new RegExp(`\\b${name4}\\s*=\\s*"([^"]*)"`).exec(text7)?.[1];
@@ -74407,12 +74493,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
74407
74493
  if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
74408
74494
  throw new Error(`scheme ${scheme} runs no application target`);
74409
74495
  }
74410
- const projectPath = import_node_path90.default.resolve(
74411
- import_node_path90.default.dirname(found.dir),
74496
+ const projectPath = import_node_path91.default.resolve(
74497
+ import_node_path91.default.dirname(found.dir),
74412
74498
  referenced.slice("container:".length)
74413
74499
  );
74414
74500
  const project2 = projects2.find(
74415
- (candidate) => import_node_fs88.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs88.default.realpathSync.native(projectPath)
74501
+ (candidate) => import_node_fs89.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs89.default.realpathSync.native(projectPath)
74416
74502
  );
74417
74503
  const target = project2 && projectTargets(project2).find((ref) => ref.id === blueprint);
74418
74504
  const name3 = target && str2(target.target.name);
@@ -74430,26 +74516,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
74430
74516
  return { target: name3, configuration };
74431
74517
  }
74432
74518
  function selectIosAppTarget(projectRoot, iosTarget) {
74433
- const nested = import_node_path90.default.join(projectRoot, "ios");
74434
- const iosRoot = import_node_fs88.default.existsSync(nested) ? nested : projectRoot;
74435
- const entries2 = import_node_fs88.default.readdirSync(iosRoot, { withFileTypes: true });
74519
+ const nested = import_node_path91.default.join(projectRoot, "ios");
74520
+ const iosRoot = import_node_fs89.default.existsSync(nested) ? nested : projectRoot;
74521
+ const entries2 = import_node_fs89.default.readdirSync(iosRoot, { withFileTypes: true });
74436
74522
  const projects2 = (entries2.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
74437
- xcodeproj: import_node_path90.default.join(iosRoot, entry.name),
74523
+ xcodeproj: import_node_path91.default.join(iosRoot, entry.name),
74438
74524
  workspace: null
74439
74525
  })) : entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
74440
- const workspace = import_node_path90.default.join(iosRoot, entry.name);
74526
+ const workspace = import_node_path91.default.join(iosRoot, entry.name);
74441
74527
  return workspaceReferences(workspace).map((xcodeproj2) => ({
74442
74528
  xcodeproj: xcodeproj2,
74443
74529
  workspace
74444
74530
  }));
74445
74531
  }).filter(
74446
- ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path90.default.sep).includes("Pods") && import_node_fs88.default.existsSync(xcodeproj2)
74532
+ ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path91.default.sep).includes("Pods") && import_node_fs89.default.existsSync(xcodeproj2)
74447
74533
  ).filter(
74448
74534
  ({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
74449
74535
  )).map(({ xcodeproj: xcodeproj2, workspace }) => ({
74450
74536
  xcodeproj: xcodeproj2,
74451
74537
  workspace,
74452
- name: import_node_path90.default.basename(xcodeproj2)
74538
+ name: import_node_path91.default.basename(xcodeproj2)
74453
74539
  }));
74454
74540
  if (projects2.length === 0) return null;
74455
74541
  if (projects2.length > 1 && !iosTarget) {
@@ -74488,13 +74574,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
74488
74574
  if (!target) throw new Error("native app identity has no iOS application target");
74489
74575
  if (!iosTarget) {
74490
74576
  const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
74491
- const container = import_node_fs88.default.existsSync(workspace) ? workspace : xcodeproj;
74577
+ const container = import_node_fs89.default.existsSync(workspace) ? workspace : xcodeproj;
74492
74578
  const hasScheme = [container, xcodeproj].some((dir) => {
74493
- if (import_node_fs88.default.existsSync(import_node_path90.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
74579
+ if (import_node_fs89.default.existsSync(import_node_path91.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
74494
74580
  return true;
74495
- const users = import_node_path90.default.join(dir, "xcuserdata");
74496
- return import_node_fs88.default.existsSync(users) && import_node_fs88.default.readdirSync(users).some(
74497
- (user) => import_node_fs88.default.existsSync(import_node_path90.default.join(users, user, "xcschemes", `${target}.xcscheme`))
74581
+ const users = import_node_path91.default.join(dir, "xcuserdata");
74582
+ return import_node_fs89.default.existsSync(users) && import_node_fs89.default.readdirSync(users).some(
74583
+ (user) => import_node_fs89.default.existsSync(import_node_path91.default.join(users, user, "xcschemes", `${target}.xcscheme`))
74498
74584
  );
74499
74585
  });
74500
74586
  if (hasScheme) target = readXcodeScheme(container, target).target;
@@ -74506,7 +74592,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
74506
74592
  return { xcodeproj, target, workspace: project2.workspace };
74507
74593
  }
74508
74594
  async function resolveXcodeSwiftPackages(input, signal, target, configuration) {
74509
- if (import_node_fs88.default.existsSync(workspaceResolvedFile(import_node_fs88.default.realpathSync.native(input)))) return;
74595
+ if (import_node_fs89.default.existsSync(workspaceResolvedFile(import_node_fs89.default.realpathSync.native(input)))) return;
74510
74596
  try {
74511
74597
  readXcodeAppTarget(input, target, configuration, {
74512
74598
  installedPods: true,
@@ -74525,7 +74611,7 @@ async function resolveXcodeSwiftPackages(input, signal, target, configuration) {
74525
74611
  function readXcodeAppTarget(input, targetName, configurationName, options2 = {}) {
74526
74612
  if (isBazelPackage(input))
74527
74613
  return readBazelAppTarget(input, targetName, configurationName, options2);
74528
- const xcodeprojOrWorkspace = import_node_fs88.default.realpathSync.native(input);
74614
+ const xcodeprojOrWorkspace = import_node_fs89.default.realpathSync.native(input);
74529
74615
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
74530
74616
  const { listed, projects: projects2, projectAt, cocoapods } = workspaceProjects(
74531
74617
  xcodeprojOrWorkspace,
@@ -74536,7 +74622,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74536
74622
  (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
74537
74623
  );
74538
74624
  const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
74539
- const container = import_node_path90.default.basename(xcodeprojOrWorkspace);
74625
+ const container = import_node_path91.default.basename(xcodeprojOrWorkspace);
74540
74626
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
74541
74627
  if (named.length !== 1) {
74542
74628
  if (options2.frameworkMachOType)
@@ -74565,15 +74651,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74565
74651
  for (const ref of allTargets) {
74566
74652
  const product = ref.project.object(str2(ref.target.productReference));
74567
74653
  const file = str2(product?.path);
74568
- if (file && !byProduct.has(import_node_path90.default.basename(file)))
74569
- byProduct.set(import_node_path90.default.basename(file), ref);
74654
+ if (file && !byProduct.has(import_node_path91.default.basename(file)))
74655
+ byProduct.set(import_node_path91.default.basename(file), ref);
74570
74656
  }
74571
74657
  const proxied = (project2, proxyId) => {
74572
74658
  const proxy = project2.object(proxyId);
74573
74659
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
74574
74660
  const portal = str2(proxy.containerPortal);
74575
74661
  const portalPath = project2.resolvePath(portal ?? "");
74576
- const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath && import_node_fs88.default.existsSync(portalPath) ? projectAt.get(import_node_fs88.default.realpathSync.native(portalPath)) : void 0;
74662
+ const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath && import_node_fs89.default.existsSync(portalPath) ? projectAt.get(import_node_fs89.default.realpathSync.native(portalPath)) : void 0;
74577
74663
  const remote = str2(proxy.remoteGlobalIDString);
74578
74664
  if (!owner || !remote) return void 0;
74579
74665
  return projectTargets(owner).find(
@@ -74590,7 +74676,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74590
74676
  const buildFile = project2.object(buildFileId);
74591
74677
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
74592
74678
  const file = project2.object(str2(buildFile.fileRef));
74593
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path90.default.basename(str2(file.path) ?? "")) : void 0;
74679
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path91.default.basename(str2(file.path) ?? "")) : void 0;
74594
74680
  if (resolved)
74595
74681
  found.push({
74596
74682
  target: resolved,
@@ -74671,7 +74757,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74671
74757
  const otherProduct = productName(other);
74672
74758
  for (const { file, visibility } of headerPhase(other)) {
74673
74759
  if (visibility === "Project") continue;
74674
- const key2 = `${otherProduct}/${import_node_path90.default.basename(file)}`;
74760
+ const key2 = `${otherProduct}/${import_node_path91.default.basename(file)}`;
74675
74761
  if (!headers.has(key2)) headers.set(key2, file);
74676
74762
  }
74677
74763
  }
@@ -74701,8 +74787,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74701
74787
  ref.project.visitMembers(
74702
74788
  ref.id,
74703
74789
  ref.project.resolvePath,
74704
- (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs88.default.existsSync(file) ? [file] : [],
74705
- import_node_path90.default.join,
74790
+ (file) => isDirectory3(file) ? walkFiles(file) : import_node_fs89.default.existsSync(file) ? [file] : [],
74791
+ import_node_path91.default.join,
74706
74792
  (file, kind) => {
74707
74793
  if (kind === "header") found.push(file);
74708
74794
  }
@@ -74718,12 +74804,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74718
74804
  for (const ref of projectTargets(project2)) {
74719
74805
  const product = productName(ref);
74720
74806
  for (const { file, visibility } of headerPhase(ref)) {
74721
- const name3 = import_node_path90.default.basename(file);
74807
+ const name3 = import_node_path91.default.basename(file);
74722
74808
  if (!entries2.has(name3))
74723
74809
  entries2.set(name3, visibility !== "Project" ? `${product}/${name3}` : file);
74724
74810
  }
74725
74811
  for (const file of synchronizedHeaders(ref)) {
74726
- const name3 = import_node_path90.default.basename(file);
74812
+ const name3 = import_node_path91.default.basename(file);
74727
74813
  if (!entries2.has(name3)) entries2.set(name3, file);
74728
74814
  }
74729
74815
  }
@@ -74733,7 +74819,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74733
74819
  if (folder === null) continue;
74734
74820
  for (const file of walkFiles(folder)) {
74735
74821
  if (!HEADER_FILE.test(file)) continue;
74736
- const name3 = import_node_path90.default.basename(file);
74822
+ const name3 = import_node_path91.default.basename(file);
74737
74823
  if (!entries2.has(name3)) entries2.set(name3, file);
74738
74824
  }
74739
74825
  }
@@ -74741,18 +74827,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74741
74827
  for (const id of Object.keys(project2.objects)) {
74742
74828
  if (project2.object(id)?.isa !== "PBXFileReference") continue;
74743
74829
  const file = project2.resolvePath(id);
74744
- if (file && HEADER_FILE.test(file) && !entries2.has(import_node_path90.default.basename(file)))
74745
- entries2.set(import_node_path90.default.basename(file), file);
74830
+ if (file && HEADER_FILE.test(file) && !entries2.has(import_node_path91.default.basename(file)))
74831
+ entries2.set(import_node_path91.default.basename(file), file);
74746
74832
  }
74747
74833
  const map2 = [...entries2];
74748
74834
  projectHeaderMaps.set(project2, map2);
74749
74835
  return map2;
74750
74836
  };
74751
74837
  const xcconfigs = /* @__PURE__ */ new Set();
74752
- const buildDir = (project2) => import_node_path90.default.join(project2.projectDir, ".build/peach-xcode/Build");
74838
+ const buildDir = (project2) => import_node_path91.default.join(project2.projectDir, ".build/peach-xcode/Build");
74753
74839
  const workspaceBuild = {
74754
- SYMROOT: import_node_path90.default.join(buildDir(app.project), "Products"),
74755
- OBJROOT: import_node_path90.default.join(buildDir(app.project), "Intermediates.noindex")
74840
+ SYMROOT: import_node_path91.default.join(buildDir(app.project), "Products"),
74841
+ OBJROOT: import_node_path91.default.join(buildDir(app.project), "Intermediates.noindex")
74756
74842
  };
74757
74843
  const moduleTarget = (ref) => {
74758
74844
  const name3 = str2(ref.target.name) ?? ref.id;
@@ -74768,16 +74854,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74768
74854
  TARGET_NAME: name3,
74769
74855
  TARGETNAME: "$(TARGET_NAME)",
74770
74856
  PROJECT: "$(PROJECT_NAME)",
74771
- PROJECT_NAME: import_node_path90.default.basename(ref.project.xcodeproj, ".xcodeproj"),
74857
+ PROJECT_NAME: import_node_path91.default.basename(ref.project.xcodeproj, ".xcodeproj"),
74772
74858
  PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
74773
74859
  PROJECT_FILE_PATH: ref.project.xcodeproj,
74774
74860
  SRCROOT: ref.project.projectDir,
74775
74861
  SOURCE_ROOT: ref.project.projectDir,
74776
74862
  PROJECT_DIR: ref.project.projectDir,
74777
- SYMROOT: import_node_path90.default.join(buildDir(ref.project), "Products"),
74863
+ SYMROOT: import_node_path91.default.join(buildDir(ref.project), "Products"),
74778
74864
  BUILD_DIR: "$(SYMROOT)",
74779
74865
  BUILD_ROOT: "$(SYMROOT)",
74780
- OBJROOT: import_node_path90.default.join(buildDir(ref.project), "Intermediates.noindex"),
74866
+ OBJROOT: import_node_path91.default.join(buildDir(ref.project), "Intermediates.noindex"),
74781
74867
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
74782
74868
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
74783
74869
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
@@ -74826,7 +74912,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74826
74912
  xcconfigs
74827
74913
  );
74828
74914
  const searchRules = recursiveSearchRules(settings2);
74829
- const absolute = (file) => import_node_path90.default.resolve(ref.project.projectDir, file);
74915
+ const absolute = (file) => import_node_path91.default.resolve(ref.project.projectDir, file);
74830
74916
  const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
74831
74917
  const product = settings2("PRODUCT_NAME");
74832
74918
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -74857,7 +74943,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74857
74943
  `${name3}: Swift compatibility header phase has no Swift producer sources`
74858
74944
  );
74859
74945
  const building2 = options2.prepareGeneratedSources && options2.requireSources !== false;
74860
- const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path90.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
74946
+ const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path91.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
74861
74947
  if (versioning) {
74862
74948
  const version2 = settings2("CURRENT_PROJECT_VERSION");
74863
74949
  const custom = [
@@ -74870,7 +74956,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74870
74956
  ].filter((key2) => settings2(key2));
74871
74957
  if (custom.length)
74872
74958
  throw new Error(
74873
- `${name3}: Xcode generates ${import_node_path90.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
74959
+ `${name3}: Xcode generates ${import_node_path91.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
74874
74960
  );
74875
74961
  const symbol2 = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
74876
74962
  const [major, minor] = version2.split(".");
@@ -74883,9 +74969,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74883
74969
  ` const double ${symbol2}VersionNumber __attribute__ ((used)) = (double)${number3};`,
74884
74970
  ""
74885
74971
  ].join("\n");
74886
- if (!import_node_fs88.default.existsSync(versioning) || import_node_fs88.default.readFileSync(versioning, "utf8") !== unit2) {
74887
- import_node_fs88.default.mkdirSync(import_node_path90.default.dirname(versioning), { recursive: true });
74888
- import_node_fs88.default.writeFileSync(versioning, unit2);
74972
+ if (!import_node_fs89.default.existsSync(versioning) || import_node_fs89.default.readFileSync(versioning, "utf8") !== unit2) {
74973
+ import_node_fs89.default.mkdirSync(import_node_path91.default.dirname(versioning), { recursive: true });
74974
+ import_node_fs89.default.writeFileSync(versioning, unit2);
74889
74975
  }
74890
74976
  allSources.push(versioning);
74891
74977
  }
@@ -74904,7 +74990,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74904
74990
  const headerFiles3 = headerPhase(ref);
74905
74991
  const ownHeaders = /* @__PURE__ */ new Map();
74906
74992
  for (const { file, visibility } of headerFiles3) {
74907
- const name4 = import_node_path90.default.basename(file);
74993
+ const name4 = import_node_path91.default.basename(file);
74908
74994
  const published3 = visibility !== "Project";
74909
74995
  if (!ownHeaders.has(name4))
74910
74996
  ownHeaders.set(name4, published3 ? `${product}/${name4}` : file);
@@ -74912,35 +74998,35 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74912
74998
  ownHeaders.set(`${product}/${name4}`, file);
74913
74999
  }
74914
75000
  for (const file of synchronizedHeaders(ref)) {
74915
- const name4 = import_node_path90.default.basename(file);
75001
+ const name4 = import_node_path91.default.basename(file);
74916
75002
  if (ownHeaders.has(name4)) continue;
74917
75003
  ownHeaders.set(name4, file);
74918
75004
  const qualified2 = `${product}/${name4}`;
74919
75005
  if (!ownHeaders.has(qualified2)) ownHeaders.set(qualified2, file);
74920
75006
  }
74921
75007
  const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
74922
- const wrapper = import_node_path90.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
74923
- const publicHeaders = import_node_path90.default.resolve(
75008
+ const wrapper = import_node_path91.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
75009
+ const publicHeaders = import_node_path91.default.resolve(
74924
75010
  settings2("BUILT_PRODUCTS_DIR"),
74925
- settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path90.default.join(wrapper, "Headers")
75011
+ settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path91.default.join(wrapper, "Headers")
74926
75012
  );
74927
- const privateHeaders = import_node_path90.default.resolve(
75013
+ const privateHeaders = import_node_path91.default.resolve(
74928
75014
  settings2("BUILT_PRODUCTS_DIR"),
74929
- settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path90.default.join(wrapper, "PrivateHeaders")
75015
+ settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path91.default.join(wrapper, "PrivateHeaders")
74930
75016
  );
74931
75017
  const moduleMap2 = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
74932
- const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ? import_node_path90.default.join(import_node_path90.default.dirname(moduleMap2), `${moduleName}-umbrella.h`) : null;
74933
- const frameworkCompatibility = frameworkUmbrella && moduleMap2 && import_node_fs88.default.existsSync(moduleMap2) && import_node_fs88.default.existsSync(frameworkUmbrella) ? {
75018
+ const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ? import_node_path91.default.join(import_node_path91.default.dirname(moduleMap2), `${moduleName}-umbrella.h`) : null;
75019
+ const frameworkCompatibility = frameworkUmbrella && moduleMap2 && import_node_fs89.default.existsSync(moduleMap2) && import_node_fs89.default.existsSync(frameworkUmbrella) ? {
74934
75020
  framework: true,
74935
75021
  moduleMap: moduleMap2,
74936
75022
  umbrella: frameworkUmbrella,
74937
- outputModuleMap: import_node_path90.default.join(wrapper, "Modules", "module.modulemap"),
74938
- outputUmbrella: import_node_path90.default.join(
75023
+ outputModuleMap: import_node_path91.default.join(wrapper, "Modules", "module.modulemap"),
75024
+ outputUmbrella: import_node_path91.default.join(
74939
75025
  wrapper,
74940
75026
  "Headers",
74941
- import_node_path90.default.basename(frameworkUmbrella)
75027
+ import_node_path91.default.basename(frameworkUmbrella)
74942
75028
  ),
74943
- outputHeader: import_node_path90.default.join(
75029
+ outputHeader: import_node_path91.default.join(
74944
75030
  wrapper,
74945
75031
  "Headers",
74946
75032
  settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
@@ -74954,10 +75040,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
74954
75040
  outputUmbrella: compatibility.outputUmbrella,
74955
75041
  outputHeader: compatibility.outputHeader
74956
75042
  } : frameworkCompatibility;
74957
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 && import_node_path90.default.relative(import_node_path90.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap2).split(import_node_path90.default.sep)[0] !== ".." && import_node_fs88.default.existsSync(moduleMap2) ? import_node_fs88.default.readdirSync(import_node_path90.default.dirname(moduleMap2)).flatMap((entry) => {
75043
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 && import_node_path91.default.relative(import_node_path91.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap2).split(import_node_path91.default.sep)[0] !== ".." && import_node_fs89.default.existsSync(moduleMap2) ? import_node_fs89.default.readdirSync(import_node_path91.default.dirname(moduleMap2)).flatMap((entry) => {
74958
75044
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
74959
- const file = import_node_path90.default.join(import_node_path90.default.dirname(moduleMap2), entry);
74960
- return import_node_fs88.default.existsSync(file) ? [file] : [];
75045
+ const file = import_node_path91.default.join(import_node_path91.default.dirname(moduleMap2), entry);
75046
+ return import_node_fs89.default.existsSync(file) ? [file] : [];
74961
75047
  }) : [];
74962
75048
  const fileFlags = {};
74963
75049
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -75043,15 +75129,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75043
75129
  // xcode searches its products' include directory before
75044
75130
  // HEADER_SEARCH_PATHS and the target's derived sources after.
75045
75131
  headerSearchPaths: [
75046
- import_node_path90.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
75132
+ import_node_path91.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
75047
75133
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
75048
75134
  (raw2) => expandSearchPath(absolute(raw2), searchRules)
75049
75135
  ),
75050
- import_node_path90.default.join(
75136
+ import_node_path91.default.join(
75051
75137
  `${settings2("DERIVED_FILE_DIR")}-normal`,
75052
75138
  settings2("CURRENT_ARCH")
75053
75139
  ),
75054
- import_node_path90.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
75140
+ import_node_path91.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
75055
75141
  settings2("DERIVED_FILE_DIR")
75056
75142
  ],
75057
75143
  userHeaderSearchPaths: settingList(
@@ -75101,9 +75187,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75101
75187
  ...headerFiles3.flatMap(
75102
75188
  ({ file, visibility }) => visibility === "Project" ? [] : [
75103
75189
  [
75104
- import_node_path90.default.join(
75190
+ import_node_path91.default.join(
75105
75191
  visibility === "Public" ? publicHeaders : privateHeaders,
75106
- import_node_path90.default.basename(file)
75192
+ import_node_path91.default.basename(file)
75107
75193
  ),
75108
75194
  file
75109
75195
  ]
@@ -75125,17 +75211,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75125
75211
  );
75126
75212
  return file && HEADER_FILE.test(file) ? [
75127
75213
  [
75128
- import_node_path90.default.resolve(
75214
+ import_node_path91.default.resolve(
75129
75215
  settings2("BUILT_PRODUCTS_DIR"),
75130
75216
  destination,
75131
- import_node_path90.default.basename(file)
75217
+ import_node_path91.default.basename(file)
75132
75218
  ),
75133
75219
  file
75134
75220
  ]
75135
75221
  ] : [];
75136
75222
  });
75137
75223
  }),
75138
- ...moduleMap2 ? [[import_node_path90.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
75224
+ ...moduleMap2 ? [[import_node_path91.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
75139
75225
  ]) : Object.fromEntries([
75140
75226
  ...podHeaders.map((file) => [file, file]),
75141
75227
  ...moduleMap2 ? [[moduleMap2, moduleMap2]] : []
@@ -75146,6 +75232,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75146
75232
  };
75147
75233
  };
75148
75234
  const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
75235
+ const xcframeworkCopies = builtTargets.flatMap(
75236
+ ({ ref, settings: settings2 }) => list(ref.target.buildPhases).flatMap((phaseId) => {
75237
+ const phase = ref.project.object(phaseId);
75238
+ if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy XCFrameworks")
75239
+ return [];
75240
+ const absolute = (raw2) => import_node_path91.default.resolve(ref.project.projectDir, expand(raw2, settings2));
75241
+ const files2 = (paths, lists) => [
75242
+ ...list(paths).map(absolute),
75243
+ ...list(lists).flatMap((raw2) => {
75244
+ const file = absolute(raw2);
75245
+ if (!import_node_fs89.default.existsSync(file)) return [];
75246
+ xcconfigs.add(file);
75247
+ return fileListEntries(file, absolute);
75248
+ })
75249
+ ];
75250
+ const destinations = new Set(
75251
+ files2(phase.outputPaths, phase.outputFileListPaths).map(
75252
+ (file) => import_node_path91.default.dirname(file)
75253
+ )
75254
+ );
75255
+ const slices = files2(phase.inputPaths, phase.inputFileListPaths).flatMap(
75256
+ (file) => file.endsWith(".xcframework") && import_node_fs89.default.existsSync(file) ? [simulatorNativeLibrary(file)?.slice ?? []].flat() : []
75257
+ );
75258
+ return destinations.size === 1 && slices.length > 0 ? [{ destination: [...destinations][0], slices }] : [];
75259
+ })
75260
+ );
75261
+ const copiedSearchPath = (directory2) => {
75262
+ for (const { destination, slices } of xcframeworkCopies) {
75263
+ const rest = relativeInside(destination, directory2);
75264
+ if (rest === null) continue;
75265
+ const found = slices.map((slice) => import_node_path91.default.join(slice, rest)).filter((candidate) => isDirectory3(candidate));
75266
+ if (found.length) return found;
75267
+ }
75268
+ return [directory2];
75269
+ };
75270
+ if (xcframeworkCopies.length)
75271
+ for (const { module: module3 } of builtTargets) {
75272
+ const objc = module3.objc;
75273
+ if (!objc) continue;
75274
+ objc.headerSearchPaths = objc.headerSearchPaths.flatMap(copiedSearchPath);
75275
+ objc.userHeaderSearchPaths = objc.userHeaderSearchPaths.flatMap(copiedSearchPath);
75276
+ objc.frameworkSearchPaths = objc.frameworkSearchPaths.flatMap(copiedSearchPath);
75277
+ }
75149
75278
  for (const { ref, module: module3, settings: settings2 } of builtTargets)
75150
75279
  module3.targetDependencies = [
75151
75280
  .../* @__PURE__ */ new Set([
@@ -75174,7 +75303,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75174
75303
  const generate = settings2("GENERATE_INFOPLIST_FILE") === "YES";
75175
75304
  if (!FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") || !plistSetting && !generate || module3.generatedInfoPlist && !options2.prepareGeneratedSources)
75176
75305
  return { ref, framework: module3 };
75177
- const file = plistSetting ? import_node_path90.default.resolve(ref.project.projectDir, plistSetting) : null;
75306
+ const file = plistSetting ? import_node_path91.default.resolve(ref.project.projectDir, plistSetting) : null;
75178
75307
  if (file) xcconfigs.add(file);
75179
75308
  const info2 = processedInfoPlist(module3.name, file, productSettings2, keys);
75180
75309
  if (generate) {
@@ -75190,7 +75319,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75190
75319
  });
75191
75320
  const frameworks = frameworkTargets.map(({ framework }) => framework);
75192
75321
  const podSourceDirs = builtTargets.slice(0, -1).flatMap(
75193
- ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path90.default.dirname(file)).filter((dir) => import_node_fs88.default.existsSync(dir)) : []
75322
+ ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path91.default.dirname(file)).filter((dir) => import_node_fs89.default.existsSync(dir)) : []
75194
75323
  );
75195
75324
  const resourceProducts = [];
75196
75325
  const bundleTargets = builtTargets.filter(
@@ -75201,7 +75330,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75201
75330
  const phase = owner.ref.project.object(phaseId);
75202
75331
  if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
75203
75332
  continue;
75204
- const absolute = (raw2) => import_node_path90.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
75333
+ const absolute = (raw2) => import_node_path91.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
75205
75334
  const entries2 = (paths) => paths.flatMap((raw2) => {
75206
75335
  const file = absolute(raw2);
75207
75336
  xcconfigs.add(file);
@@ -75217,7 +75346,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75217
75346
  ].filter((file) => file.endsWith(".bundle"));
75218
75347
  if (inputs2.length !== outputs.length)
75219
75348
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
75220
- const destinationRoot = import_node_path90.default.join(
75349
+ const destinationRoot = import_node_path91.default.join(
75221
75350
  owner.settings("TARGET_BUILD_DIR"),
75222
75351
  owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
75223
75352
  );
@@ -75226,24 +75355,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75226
75355
  const file = str2(
75227
75356
  target.ref.project.object(str2(target.ref.target.productReference))?.path
75228
75357
  );
75229
- return file && import_node_path90.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
75358
+ return file && import_node_path91.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
75230
75359
  });
75231
75360
  if (!product && !isDirectory3(input2))
75232
75361
  throw new Error(
75233
75362
  `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
75234
75363
  );
75235
- const destination = import_node_path90.default.relative(destinationRoot, outputs[index]);
75236
- if (destination === ".." || destination.startsWith(`..${import_node_path90.default.sep}`) || import_node_path90.default.isAbsolute(destination) || import_node_path90.default.basename(input2) !== import_node_path90.default.basename(destination))
75364
+ const destination = import_node_path91.default.relative(destinationRoot, outputs[index]);
75365
+ if (destination === ".." || destination.startsWith(`..${import_node_path91.default.sep}`) || import_node_path91.default.isAbsolute(destination) || import_node_path91.default.basename(input2) !== import_node_path91.default.basename(destination))
75237
75366
  throw new Error(
75238
75367
  `${owner.module.name}: invalid resource bundle copy destination`
75239
75368
  );
75240
- const infoFile = product ? import_node_path90.default.resolve(
75369
+ const infoFile = product ? import_node_path91.default.resolve(
75241
75370
  product.ref.project.projectDir,
75242
75371
  product.settings("INFOPLIST_FILE")
75243
75372
  ) : null;
75244
75373
  if (infoFile) xcconfigs.add(infoFile);
75245
75374
  const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
75246
- const bundlePath = prefix + destination.split(import_node_path90.default.sep).join("/");
75375
+ const bundlePath = prefix + destination.split(import_node_path91.default.sep).join("/");
75247
75376
  if (resourceProducts.some((resource) => resource.path === bundlePath))
75248
75377
  throw new Error(
75249
75378
  `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
@@ -75254,20 +75383,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75254
75383
  resources: product.module.resources,
75255
75384
  infoPlist: buildPlist(
75256
75385
  expandValue(
75257
- parsePlist(import_node_fs88.default.readFileSync(infoFile, "utf8")),
75386
+ parsePlist(import_node_fs89.default.readFileSync(infoFile, "utf8")),
75258
75387
  product.productSettings
75259
75388
  )
75260
75389
  )
75261
75390
  } : {
75262
- resources: import_node_fs88.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path90.default.join(entry.parentPath, entry.name)).sort(),
75391
+ resources: import_node_fs89.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path91.default.join(entry.parentPath, entry.name)).sort(),
75263
75392
  sourceRoot: input2
75264
75393
  }
75265
75394
  });
75266
75395
  }
75267
75396
  }
75268
75397
  }
75269
- const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path90.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
75270
- const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path90.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
75398
+ const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path91.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
75399
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path91.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
75271
75400
  const infoPlistPending = module2.generatedInfoPlist && !options2.prepareGeneratedSources;
75272
75401
  const info = processedInfoPlist(
75273
75402
  module2.name,
@@ -75276,7 +75405,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75276
75405
  settingKeys
75277
75406
  );
75278
75407
  const bundleIdentifier = productSettings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
75279
- const entitlements = entitlementsFile ? parsePlist(import_node_fs88.default.readFileSync(entitlementsFile, "utf8")) : void 0;
75408
+ const entitlements = entitlementsFile ? parsePlist(import_node_fs89.default.readFileSync(entitlementsFile, "utf8")) : void 0;
75280
75409
  const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
75281
75410
  entitlements,
75282
75411
  (value) => expand(value, (key2) => {
@@ -75314,7 +75443,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75314
75443
  };
75315
75444
  }
75316
75445
  const localPackageDirs = [
75317
- ...listed.filter((reference) => import_node_fs88.default.existsSync(import_node_path90.default.join(reference, "Package.swift"))),
75446
+ ...listed.filter((reference) => import_node_fs89.default.existsSync(import_node_path91.default.join(reference, "Package.swift"))),
75318
75447
  ...projects2.flatMap(
75319
75448
  (project2) => Object.entries(project2.objects).flatMap(([id, entry]) => {
75320
75449
  if (!isDict(entry)) return [];
@@ -75324,19 +75453,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75324
75453
  const packages = [];
75325
75454
  while (pending.length > 0) {
75326
75455
  const dir = pending.pop();
75327
- if (import_node_fs88.default.existsSync(import_node_path90.default.join(dir, "Package.swift"))) {
75456
+ if (import_node_fs89.default.existsSync(import_node_path91.default.join(dir, "Package.swift"))) {
75328
75457
  packages.push(dir);
75329
75458
  continue;
75330
75459
  }
75331
75460
  if (!isDirectory3(dir)) continue;
75332
- for (const child of import_node_fs88.default.readdirSync(dir, { withFileTypes: true }))
75461
+ for (const child of import_node_fs89.default.readdirSync(dir, { withFileTypes: true }))
75333
75462
  if (child.isDirectory() && !child.name.startsWith("."))
75334
- pending.push(import_node_path90.default.join(dir, child.name));
75463
+ pending.push(import_node_path91.default.join(dir, child.name));
75335
75464
  }
75336
75465
  return packages;
75337
75466
  }
75338
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path90.default.resolve(project2.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project2.resolvePath(id) : null;
75339
- return candidate && import_node_fs88.default.existsSync(import_node_path90.default.join(candidate, "Package.swift")) ? [candidate] : [];
75467
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path91.default.resolve(project2.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project2.resolvePath(id) : null;
75468
+ return candidate && import_node_fs89.default.existsSync(import_node_path91.default.join(candidate, "Package.swift")) ? [candidate] : [];
75340
75469
  })
75341
75470
  )
75342
75471
  ];
@@ -75366,7 +75495,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75366
75495
  if ((flag === "-framework" || flag === "-weak_framework") && name3)
75367
75496
  sdkFrameworks.add(name3);
75368
75497
  });
75369
- const absolute = (raw2) => import_node_path90.default.resolve(ref.project.projectDir, expand(raw2, settings2));
75498
+ const absolute = (raw2) => import_node_path91.default.resolve(ref.project.projectDir, expand(raw2, settings2));
75370
75499
  const requested = options2.nativeModules;
75371
75500
  const includeBinary = (name3, dir) => {
75372
75501
  if (!requested || nativeTargets2.has(ref) || requested.includes(name3) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
@@ -75378,14 +75507,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75378
75507
  for (const directory2 of expandSearchPath(absolute(raw2), searchRules)) {
75379
75508
  if (frameworkSearchDirectories.has(directory2)) continue;
75380
75509
  frameworkSearchDirectories.add(directory2);
75381
- if (!import_node_fs88.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
75510
+ if (!import_node_fs89.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
75382
75511
  continue;
75383
- for (const entry of import_node_fs88.default.readdirSync(directory2, { withFileTypes: true })) {
75512
+ for (const entry of import_node_fs89.default.readdirSync(directory2, { withFileTypes: true })) {
75384
75513
  const name3 = /^(.+)\.framework$/.exec(entry.name)?.[1];
75385
75514
  if (!name3 || byProduct.has(entry.name) || searchedFrameworks.has(name3))
75386
75515
  continue;
75387
- const file = import_node_path90.default.join(directory2, entry.name);
75388
- if (import_node_fs88.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
75516
+ const file = import_node_path91.default.join(directory2, entry.name);
75517
+ if (import_node_fs89.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
75389
75518
  searchedFrameworks.set(name3, file);
75390
75519
  }
75391
75520
  }
@@ -75393,9 +75522,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75393
75522
  }
75394
75523
  for (const raw2 of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
75395
75524
  const dir = absolute(raw2);
75396
- const modulemap = import_node_path90.default.join(dir, "module.modulemap");
75397
- if (!import_node_fs88.default.existsSync(modulemap)) continue;
75398
- const name3 = moduleMapName(import_node_fs88.default.readFileSync(modulemap, "utf8"));
75525
+ const modulemap = import_node_path91.default.join(dir, "module.modulemap");
75526
+ if (!import_node_fs89.default.existsSync(modulemap)) continue;
75527
+ const name3 = moduleMapName(import_node_fs89.default.readFileSync(modulemap, "utf8"));
75399
75528
  if (name3 && !binaryFrameworks.has(name3)) includeBinary(name3, dir);
75400
75529
  }
75401
75530
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -75404,7 +75533,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75404
75533
  const inputs2 = list(phase.inputPaths).map(absolute);
75405
75534
  for (const raw2 of list(phase.inputFileListPaths)) {
75406
75535
  const file = absolute(raw2);
75407
- if (!import_node_fs88.default.existsSync(file)) continue;
75536
+ if (!import_node_fs89.default.existsSync(file)) continue;
75408
75537
  xcconfigs.add(file);
75409
75538
  inputs2.push(...fileListEntries(file, absolute));
75410
75539
  }
@@ -75469,7 +75598,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75469
75598
  ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
75470
75599
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
75471
75600
  kind: "local",
75472
- dir: import_node_path90.default.resolve(
75601
+ dir: import_node_path91.default.resolve(
75473
75602
  project2.projectDir,
75474
75603
  str2(reference.relativePath) ?? ""
75475
75604
  )
@@ -75503,14 +75632,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75503
75632
  continue;
75504
75633
  }
75505
75634
  if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
75506
- byProduct.has(import_node_path90.default.basename(rawPath)))
75635
+ byProduct.has(import_node_path91.default.basename(rawPath)))
75507
75636
  continue;
75508
75637
  const resolved = fileId ? project2.resolvePath(fileId) : null;
75509
- if (fileId && resolved !== null && !import_node_fs88.default.existsSync(resolved)) {
75510
- const parts = resolved.split(import_node_path90.default.sep);
75638
+ if (fileId && resolved !== null && !import_node_fs89.default.existsSync(resolved)) {
75639
+ const parts = resolved.split(import_node_path91.default.sep);
75511
75640
  const pods = parts.lastIndexOf("Pods");
75512
- const sandbox = parts.slice(0, pods + 1).join(import_node_path90.default.sep);
75513
- if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs88.default.existsSync(import_node_path90.default.join(import_node_path90.default.dirname(sandbox), "Podfile")))
75641
+ const sandbox = parts.slice(0, pods + 1).join(import_node_path91.default.sep);
75642
+ if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs89.default.existsSync(import_node_path91.default.join(import_node_path91.default.dirname(sandbox), "Podfile")))
75514
75643
  continue;
75515
75644
  if (!ios_sdk_frameworks_default.frameworks.includes(name3))
75516
75645
  throw new Error(
@@ -75538,7 +75667,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75538
75667
  ({ product }) => !options2.nativeModules || nativeTargets2.has(built2.ref) || options2.nativeModules.includes(product)
75539
75668
  );
75540
75669
  const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
75541
- let packageResolved = import_node_fs88.default.existsSync(resolvedFile) ? [import_node_fs88.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path90.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs88.default.existsSync(file)).map((file) => import_node_fs88.default.realpathSync.native(file)).sort();
75670
+ let packageResolved = import_node_fs89.default.existsSync(resolvedFile) ? [import_node_fs89.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path91.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs89.default.existsSync(file)).map((file) => import_node_fs89.default.realpathSync.native(file)).sort();
75542
75671
  if (packageResolved.length === 0) {
75543
75672
  const requirements = remotePackageRequirements(projects2);
75544
75673
  if (requirements.length > 0) {
@@ -75594,19 +75723,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75594
75723
  } : {},
75595
75724
  rootDir: commonAncestor(
75596
75725
  [
75597
- workspace ? import_node_path90.default.dirname(workspace) : app.project.projectDir,
75726
+ workspace ? import_node_path91.default.dirname(workspace) : app.project.projectDir,
75598
75727
  ...used.map((project2) => project2.projectDir),
75599
75728
  ...localPackageDirs,
75600
75729
  ...linkedProducts.flatMap(
75601
- ({ source }) => source.kind === "local" && import_node_fs88.default.existsSync(source.dir) ? [source.dir] : []
75730
+ ({ source }) => source.kind === "local" && import_node_fs89.default.existsSync(source.dir) ? [source.dir] : []
75602
75731
  ),
75603
75732
  ...new Set(podSourceDirs),
75604
75733
  // a target's own files may sit beside the project, such as an asset
75605
75734
  // catalog one folder up, and xcode builds them from there
75606
75735
  ...new Set(
75607
- [...module2.allSources, ...module2.resources].filter((file) => import_node_fs88.default.existsSync(file)).map((file) => import_node_path90.default.dirname(file))
75736
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs89.default.existsSync(file)).map((file) => import_node_path91.default.dirname(file))
75608
75737
  )
75609
- ].map((dir) => import_node_fs88.default.realpathSync.native(dir))
75738
+ ].map((dir) => import_node_fs89.default.realpathSync.native(dir))
75610
75739
  ),
75611
75740
  projectFiles: [
75612
75741
  .../* @__PURE__ */ new Set([
@@ -75632,7 +75761,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75632
75761
  resourceProducts,
75633
75762
  linkedProducts,
75634
75763
  localPackageDirs: [
75635
- ...new Set(localPackageDirs.map((dir) => import_node_fs88.default.realpathSync.native(dir)))
75764
+ ...new Set(localPackageDirs.map((dir) => import_node_fs89.default.realpathSync.native(dir)))
75636
75765
  ].sort(),
75637
75766
  binaryFrameworks: [...binaryFrameworks].map(([name3, file]) => ({ name: name3, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
75638
75767
  sdkFrameworks: [...sdkFrameworks].filter(
@@ -75645,15 +75774,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
75645
75774
  cocoapods
75646
75775
  };
75647
75776
  }
75648
- var import_node_child_process45, import_node_crypto55, import_node_fs88, import_node_module8, import_node_path90, 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, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
75777
+ var import_node_child_process45, import_node_crypto55, import_node_fs89, import_node_module8, import_node_path91, 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, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
75649
75778
  var init_xcode_project = __esm({
75650
75779
  "src/xcode-project.ts"() {
75651
75780
  "use strict";
75652
75781
  import_node_child_process45 = require("node:child_process");
75653
75782
  import_node_crypto55 = require("node:crypto");
75654
- import_node_fs88 = __toESM(require("node:fs"), 1);
75783
+ import_node_fs89 = __toESM(require("node:fs"), 1);
75655
75784
  import_node_module8 = require("node:module");
75656
- import_node_path90 = __toESM(require("node:path"), 1);
75785
+ import_node_path91 = __toESM(require("node:path"), 1);
75657
75786
  init_bazel_project();
75658
75787
  init_ios_sdk_frameworks();
75659
75788
  init_is_record();
@@ -75665,7 +75794,9 @@ var init_xcode_project = __esm({
75665
75794
  init_swift_distribution();
75666
75795
  init_swift_native_pin();
75667
75796
  init_swift_package();
75797
+ init_swift_source_file();
75668
75798
  init_swift_toolchain();
75799
+ init_swift_xcframework();
75669
75800
  init_xcode_intents();
75670
75801
  init_xcode_json_project();
75671
75802
  init_xcode_swift_features();
@@ -75718,15 +75849,15 @@ var init_xcode_project = __esm({
75718
75849
  arch: "arm64",
75719
75850
  variant: "normal"
75720
75851
  };
75721
- isDirectory3 = (dir) => import_node_fs88.default.existsSync(dir) && import_node_fs88.default.statSync(dir).isDirectory();
75852
+ isDirectory3 = (dir) => import_node_fs89.default.existsSync(dir) && import_node_fs89.default.statSync(dir).isDirectory();
75722
75853
  loaded2 = /* @__PURE__ */ new Map();
75723
75854
  preparedSourcePhases = /* @__PURE__ */ new Map();
75724
- isPodsProject = (xcodeproj) => import_node_path90.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path90.default.basename(import_node_path90.default.dirname(xcodeproj)) === "Pods";
75855
+ isPodsProject = (xcodeproj) => import_node_path91.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path91.default.basename(import_node_path91.default.dirname(xcodeproj)) === "Pods";
75725
75856
  targetRefs = /* @__PURE__ */ new WeakMap();
75726
75857
  NativeAppTargetSelectionError = class extends Error {
75727
75858
  };
75728
- workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path90.default.join(
75729
- xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path90.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
75859
+ workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path91.default.join(
75860
+ xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path91.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
75730
75861
  "xcshareddata",
75731
75862
  "swiftpm",
75732
75863
  "Package.resolved"
@@ -75762,7 +75893,7 @@ function workspacePackageManager(root, declared, excluded) {
75762
75893
  { manager: "yarn", files: ["yarn.lock"] },
75763
75894
  { manager: "npm", files: ["package-lock.json"] }
75764
75895
  ].filter(
75765
- ({ files: files2 }) => files2.some((file) => !excluded(file) && import_node_fs89.default.existsSync(import_node_path91.default.join(root, file)))
75896
+ ({ files: files2 }) => files2.some((file) => !excluded(file) && import_node_fs90.default.existsSync(import_node_path92.default.join(root, file)))
75766
75897
  );
75767
75898
  if (locks.length !== 1) return manager;
75768
75899
  const lockedManager = locks[0].manager;
@@ -75776,9 +75907,9 @@ function pinnedNodeVersion(root, manifest) {
75776
75907
  return exactVersionFile(root, ".nvmrc") ?? exactVersionFile(root, ".node-version");
75777
75908
  }
75778
75909
  function exactVersionFile(root, name3) {
75779
- const file = import_node_path91.default.join(root, name3);
75780
- if (!import_node_fs89.default.existsSync(file)) return null;
75781
- const version2 = import_node_fs89.default.readFileSync(file, "utf8").trim().replace(/^v/, "");
75910
+ const file = import_node_path92.default.join(root, name3);
75911
+ if (!import_node_fs90.default.existsSync(file)) return null;
75912
+ const version2 = import_node_fs90.default.readFileSync(file, "utf8").trim().replace(/^v/, "");
75782
75913
  return EXACT_VERSION.test(version2) ? version2 : null;
75783
75914
  }
75784
75915
  async function hashExpoWorkspace(app, signal) {
@@ -75790,15 +75921,15 @@ async function hashExpoSourceWorkspace(app, signal) {
75790
75921
  return { root, hash };
75791
75922
  }
75792
75923
  function pnpmStoreArgs(root) {
75793
- const modules = import_node_path91.default.join(root, "node_modules", ".modules.yaml");
75794
- if (!import_node_fs89.default.existsSync(modules)) return [];
75924
+ const modules = import_node_path92.default.join(root, "node_modules", ".modules.yaml");
75925
+ if (!import_node_fs90.default.existsSync(modules)) return [];
75795
75926
  const store = /^\s*"?storeDir"?:\s*["']?([^"'\n,]+)/m.exec(
75796
- import_node_fs89.default.readFileSync(modules, "utf8")
75927
+ import_node_fs90.default.readFileSync(modules, "utf8")
75797
75928
  );
75798
75929
  return store ? ["--store-dir", store[1]] : [];
75799
75930
  }
75800
75931
  function linkedPackageDirectories(root, app) {
75801
- const appRelative = import_node_path91.default.relative(root, app);
75932
+ const appRelative = import_node_path92.default.relative(root, app);
75802
75933
  return localPackageDirectories(root, app).filter(
75803
75934
  (directory2) => directory2 !== "" && directory2 !== appRelative
75804
75935
  );
@@ -75806,11 +75937,11 @@ function linkedPackageDirectories(root, app) {
75806
75937
  function localPackageDirectories(root, app) {
75807
75938
  const directories = /* @__PURE__ */ new Set();
75808
75939
  const visit3 = (directory2) => {
75809
- const relative3 = import_node_path91.default.relative(root, directory2);
75940
+ const relative3 = import_node_path92.default.relative(root, directory2);
75810
75941
  if (directories.has(relative3)) return;
75811
75942
  directories.add(relative3);
75812
75943
  const manifest = JSON.parse(
75813
- import_node_fs89.default.readFileSync(import_node_path91.default.join(directory2, "package.json"), "utf8")
75944
+ import_node_fs90.default.readFileSync(import_node_path92.default.join(directory2, "package.json"), "utf8")
75814
75945
  );
75815
75946
  for (const name3 of Object.keys({
75816
75947
  ...manifest.dependencies,
@@ -75818,12 +75949,12 @@ function localPackageDirectories(root, app) {
75818
75949
  ...manifest.peerDependencies,
75819
75950
  ...manifest.optionalDependencies
75820
75951
  })) {
75821
- for (let at = directory2; ; at = import_node_path91.default.dirname(at)) {
75822
- const link = import_node_path91.default.join(at, "node_modules", name3);
75823
- if (import_node_fs89.default.existsSync(link)) {
75824
- const target = import_node_fs89.default.realpathSync(link);
75825
- const within2 = import_node_path91.default.relative(root, target);
75826
- if (!within2.startsWith("..") && !within2.split(import_node_path91.default.sep).includes("node_modules") && import_node_fs89.default.existsSync(import_node_path91.default.join(target, "package.json")))
75952
+ for (let at = directory2; ; at = import_node_path92.default.dirname(at)) {
75953
+ const link = import_node_path92.default.join(at, "node_modules", name3);
75954
+ if (import_node_fs90.default.existsSync(link)) {
75955
+ const target = import_node_fs90.default.realpathSync(link);
75956
+ const within2 = import_node_path92.default.relative(root, target);
75957
+ if (!within2.startsWith("..") && !within2.split(import_node_path92.default.sep).includes("node_modules") && import_node_fs90.default.existsSync(import_node_path92.default.join(target, "package.json")))
75827
75958
  visit3(target);
75828
75959
  break;
75829
75960
  }
@@ -75835,7 +75966,7 @@ function localPackageDirectories(root, app) {
75835
75966
  return [...directories];
75836
75967
  }
75837
75968
  async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, podsEnvironment = reactNativePodsEnvironment()) {
75838
- app = import_node_fs89.default.realpathSync(app);
75969
+ app = import_node_fs90.default.realpathSync(app);
75839
75970
  const key2 = JSON.stringify([app, everyByte, sourceOnly, podsEnvironment]);
75840
75971
  let pending = hashing.get(key2);
75841
75972
  if (!pending) {
@@ -75855,22 +75986,22 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
75855
75986
  sourceOnly,
75856
75987
  linkedPackageDirectories(root, app)
75857
75988
  );
75858
- const appRelative = import_node_path91.default.relative(root, app);
75859
- const manifest = JSON.parse(import_node_fs89.default.readFileSync(import_node_path91.default.join(root, "package.json"), "utf8"));
75989
+ const appRelative = import_node_path92.default.relative(root, app);
75990
+ const manifest = JSON.parse(import_node_fs90.default.readFileSync(import_node_path92.default.join(root, "package.json"), "utf8"));
75860
75991
  const hash = (0, import_node_crypto56.createHash)("sha256");
75861
75992
  const native = (0, import_node_crypto56.createHash)("sha256");
75862
75993
  const nativeDirectories = localPackageDirectories(root, app);
75863
75994
  const versionFree = new Set(
75864
75995
  nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
75865
- (directory2) => !import_node_fs89.default.readdirSync(import_node_path91.default.join(root, directory2)).some((name3) => NATIVE_PACKAGE_ENTRY.test(name3))
75866
- ).map((directory2) => directory2.split(import_node_path91.default.sep).join("/"))
75996
+ (directory2) => !import_node_fs90.default.readdirSync(import_node_path92.default.join(root, directory2)).some((name3) => NATIVE_PACKAGE_ENTRY.test(name3))
75997
+ ).map((directory2) => directory2.split(import_node_path92.default.sep).join("/"))
75867
75998
  );
75868
75999
  const versioned = new Set(
75869
- nativeDirectories.map((directory2) => directory2.split(import_node_path91.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
76000
+ nativeDirectories.map((directory2) => directory2.split(import_node_path92.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
75870
76001
  );
75871
76002
  const nativeConfigBytes = (posix, bytes) => {
75872
- const directory2 = import_node_path91.default.posix.dirname(posix);
75873
- if (import_node_path91.default.posix.basename(posix) === "package.json" && versionFree.has(directory2)) {
76003
+ const directory2 = import_node_path92.default.posix.dirname(posix);
76004
+ if (import_node_path92.default.posix.basename(posix) === "package.json" && versionFree.has(directory2)) {
75874
76005
  const { version: _version, ...manifest2 } = JSON.parse(bytes.toString("utf8"));
75875
76006
  return JSON.stringify(manifest2);
75876
76007
  }
@@ -75884,21 +76015,21 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
75884
76015
  return !(workspaces && entry && !versioned.has(entry) && /^ {6}"version": "[^"]*",$/.test(line));
75885
76016
  }).join("\n");
75886
76017
  };
75887
- const steersNative = (relative3) => !relative3.includes(import_node_path91.default.sep) || relative3.startsWith(`patches${import_node_path91.default.sep}`) || relative3.startsWith(import_node_path91.default.join("scripts", "lib", "expo-plugins") + import_node_path91.default.sep) || nativeDirectories.some(
75888
- (directory2) => directory2 === "" || relative3 === directory2 || relative3.startsWith(directory2 + import_node_path91.default.sep)
76018
+ const steersNative = (relative3) => !relative3.includes(import_node_path92.default.sep) || relative3.startsWith(`patches${import_node_path92.default.sep}`) || relative3.startsWith(import_node_path92.default.join("scripts", "lib", "expo-plugins") + import_node_path92.default.sep) || nativeDirectories.some(
76019
+ (directory2) => directory2 === "" || relative3 === directory2 || relative3.startsWith(directory2 + import_node_path92.default.sep)
75889
76020
  );
75890
76021
  const steps = [];
75891
76022
  const unread = [];
75892
76023
  const walk4 = (directory2) => {
75893
- const entries2 = import_node_fs89.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
76024
+ const entries2 = import_node_fs90.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
75894
76025
  for (const entry of entries2) {
75895
- const file = import_node_path91.default.join(directory2, entry.name);
75896
- const relative3 = import_node_path91.default.relative(root, file);
76026
+ const file = import_node_path92.default.join(directory2, entry.name);
76027
+ const relative3 = import_node_path92.default.relative(root, file);
75897
76028
  if (excluded(relative3, entry.isDirectory())) continue;
75898
76029
  const firstStep = steps.length;
75899
76030
  steps.push(() => hash.update(`${relative3}\0`));
75900
76031
  if (entry.isSymbolicLink()) {
75901
- const link = `link\0${import_node_fs89.default.readlinkSync(file)}\0`;
76032
+ const link = `link\0${import_node_fs90.default.readlinkSync(file)}\0`;
75902
76033
  steps.push(() => {
75903
76034
  hash.update(link);
75904
76035
  if (steersNative(relative3)) native.update(`${relative3}\0${link}`);
@@ -75908,9 +76039,9 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
75908
76039
  walk4(file);
75909
76040
  if (sourceOnly && steps.length === firstStep + 2) steps.length = firstStep;
75910
76041
  } else if (entry.isFile()) {
75911
- const posix = relative3.split(import_node_path91.default.sep).join("/");
76042
+ const posix = relative3.split(import_node_path92.default.sep).join("/");
75912
76043
  if (NATIVE_CONFIG_FILE.test(posix)) {
75913
- const bytes = import_node_fs89.default.readFileSync(file);
76044
+ const bytes = import_node_fs90.default.readFileSync(file);
75914
76045
  steps.push(() => {
75915
76046
  if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
75916
76047
  if (steersNative(relative3))
@@ -75919,7 +76050,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
75919
76050
  continue;
75920
76051
  }
75921
76052
  if (everyByte) {
75922
- const stat = import_node_fs89.default.statSync(file);
76053
+ const stat = import_node_fs90.default.statSync(file);
75923
76054
  const known = fileDigests.get(file);
75924
76055
  const content = known?.ino === stat.ino && known.size === stat.size && known.mtimeMs === stat.mtimeMs && known.ctimeMs === stat.ctimeMs ? known : {
75925
76056
  ino: stat.ino,
@@ -75940,7 +76071,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
75940
76071
  for (let start = 0; start < unread.length; start += 32) {
75941
76072
  await Promise.all(
75942
76073
  unread.slice(start, start + 32).map(async ({ file, content }) => {
75943
- const bytes = await import_node_fs89.default.promises.readFile(file);
76074
+ const bytes = await import_node_fs90.default.promises.readFile(file);
75944
76075
  content.size = bytes.length;
75945
76076
  content.digest = (0, import_node_crypto56.createHash)("sha256").update(bytes).digest("hex");
75946
76077
  fileDigests.set(file, content);
@@ -75987,13 +76118,13 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
75987
76118
  const retire = (directory2, used) => withSwiftRootLock(
75988
76119
  directory2,
75989
76120
  async () => {
75990
- const retired = import_node_path91.default.join(
76121
+ const retired = import_node_path92.default.join(
75991
76122
  parent,
75992
- `${RETIRED_PREFIX2}${process.pid}-${import_node_path91.default.basename(directory2)}`
76123
+ `${RETIRED_PREFIX2}${process.pid}-${import_node_path92.default.basename(directory2)}`
75993
76124
  );
75994
- if (import_node_fs89.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
76125
+ if (import_node_fs90.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
75995
76126
  try {
75996
- import_node_fs89.default.renameSync(directory2, retired);
76127
+ import_node_fs90.default.renameSync(directory2, retired);
75997
76128
  } catch (error) {
75998
76129
  if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
75999
76130
  throw error;
@@ -76004,15 +76135,15 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
76004
76135
  false
76005
76136
  );
76006
76137
  const complete = [];
76007
- for (const name3 of import_node_fs89.default.readdirSync(parent)) {
76008
- const directory2 = import_node_path91.default.join(parent, name3);
76138
+ for (const name3 of import_node_fs90.default.readdirSync(parent)) {
76139
+ const directory2 = import_node_path92.default.join(parent, name3);
76009
76140
  if (name3.startsWith(RETIRED_PREFIX2)) {
76010
76141
  reapRetiredCacheDirectory(parent, name3);
76011
76142
  continue;
76012
76143
  }
76013
- const used = import_node_fs89.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
76144
+ const used = import_node_fs90.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
76014
76145
  if (directory2 === keep || used === void 0) continue;
76015
- if (import_node_fs89.default.existsSync(import_node_path91.default.join(directory2, ".peach-complete")) || import_node_fs89.default.existsSync(import_node_path91.default.join(directory2, ".peach-project-complete")))
76146
+ if (import_node_fs90.default.existsSync(import_node_path92.default.join(directory2, ".peach-complete")) || import_node_fs90.default.existsSync(import_node_path92.default.join(directory2, ".peach-project-complete")))
76016
76147
  complete.push({ directory: directory2, used });
76017
76148
  else if (Date.now() - used > ABANDONED_WORKSPACE_MS) await retire(directory2, used);
76018
76149
  }
@@ -76021,38 +76152,38 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
76021
76152
  }
76022
76153
  function syncChangedFiles(root, work, appRelative, excluded, installed) {
76023
76154
  const copyIfNewer = (file, relative3, newerOnly) => {
76024
- const source = import_node_fs89.default.statSync(file);
76025
- const target = import_node_path91.default.join(work, relative3);
76026
- const existing = import_node_fs89.default.statSync(target, { throwIfNoEntry: false });
76155
+ const source = import_node_fs90.default.statSync(file);
76156
+ const target = import_node_path92.default.join(work, relative3);
76157
+ const existing = import_node_fs90.default.statSync(target, { throwIfNoEntry: false });
76027
76158
  if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
76028
76159
  return;
76029
- import_node_fs89.default.mkdirSync(import_node_path91.default.dirname(target), { recursive: true });
76160
+ import_node_fs90.default.mkdirSync(import_node_path92.default.dirname(target), { recursive: true });
76030
76161
  const staged = `${target}.${process.pid}.peach-sync`;
76031
- import_node_fs89.default.copyFileSync(file, staged);
76032
- import_node_fs89.default.utimesSync(staged, source.atime, source.mtime);
76033
- import_node_fs89.default.renameSync(staged, target);
76162
+ import_node_fs90.default.copyFileSync(file, staged);
76163
+ import_node_fs90.default.utimesSync(staged, source.atime, source.mtime);
76164
+ import_node_fs90.default.renameSync(staged, target);
76034
76165
  };
76035
76166
  const walkInstalled = (directory2) => {
76036
- for (const entry of import_node_fs89.default.readdirSync(directory2, { withFileTypes: true })) {
76037
- const file = import_node_path91.default.join(directory2, entry.name);
76167
+ for (const entry of import_node_fs90.default.readdirSync(directory2, { withFileTypes: true })) {
76168
+ const file = import_node_path92.default.join(directory2, entry.name);
76038
76169
  if (entry.isDirectory()) walkInstalled(file);
76039
- else if (entry.isFile()) copyIfNewer(file, import_node_path91.default.relative(root, file), true);
76170
+ else if (entry.isFile()) copyIfNewer(file, import_node_path92.default.relative(root, file), true);
76040
76171
  }
76041
76172
  };
76042
- const sourceIos = import_node_fs89.default.existsSync(import_node_path91.default.join(root, appRelative, "ios", "Podfile"));
76173
+ const sourceIos = import_node_fs90.default.existsSync(import_node_path92.default.join(root, appRelative, "ios", "Podfile"));
76043
76174
  const walk4 = (directory2) => {
76044
- for (const entry of import_node_fs89.default.readdirSync(directory2, { withFileTypes: true })) {
76045
- const file = import_node_path91.default.join(directory2, entry.name);
76046
- const relative3 = import_node_path91.default.relative(root, file);
76047
- if (installed && entry.name === "node_modules" && entry.isDirectory() && import_node_fs89.default.existsSync(import_node_path91.default.join(work, relative3))) {
76175
+ for (const entry of import_node_fs90.default.readdirSync(directory2, { withFileTypes: true })) {
76176
+ const file = import_node_path92.default.join(directory2, entry.name);
76177
+ const relative3 = import_node_path92.default.relative(root, file);
76178
+ if (installed && entry.name === "node_modules" && entry.isDirectory() && import_node_fs90.default.existsSync(import_node_path92.default.join(work, relative3))) {
76048
76179
  walkInstalled(file);
76049
76180
  continue;
76050
76181
  }
76051
- if (excluded(relative3, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative3 === import_node_path91.default.join(appRelative, "ios"))
76182
+ if (excluded(relative3, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative3 === import_node_path92.default.join(appRelative, "ios"))
76052
76183
  continue;
76053
76184
  if (entry.isDirectory()) walk4(file);
76054
76185
  else if (entry.isFile()) {
76055
- if (NATIVE_CONFIG_FILE.test(relative3.split(import_node_path91.default.sep).join("/"))) continue;
76186
+ if (NATIVE_CONFIG_FILE.test(relative3.split(import_node_path92.default.sep).join("/"))) continue;
76056
76187
  copyIfNewer(file, relative3, false);
76057
76188
  }
76058
76189
  }
@@ -76063,10 +76194,10 @@ function watchRoot(root) {
76063
76194
  const existing = watches.get(root);
76064
76195
  if (existing) return existing;
76065
76196
  const watch = { edits: 0 };
76066
- const watcher = import_node_fs89.default.watch(root, { recursive: true }, (_event, filename) => {
76067
- const parts = filename?.split(import_node_path91.default.sep) ?? [];
76197
+ const watcher = import_node_fs90.default.watch(root, { recursive: true }, (_event, filename) => {
76198
+ const parts = filename?.split(import_node_path92.default.sep) ?? [];
76068
76199
  const { excluded } = watch;
76069
- if (excluded && parts.some((_, index) => excluded(parts.slice(0, index + 1).join(import_node_path91.default.sep))))
76200
+ if (excluded && parts.some((_, index) => excluded(parts.slice(0, index + 1).join(import_node_path92.default.sep))))
76070
76201
  return;
76071
76202
  if (filename && watch.ignoredLater?.(filename)) return;
76072
76203
  watch.edits += 1;
@@ -76082,8 +76213,8 @@ function watchRoot(root) {
76082
76213
  }
76083
76214
  async function prepareExpoNativeWorkspace(app, signal, target) {
76084
76215
  const prepared = await prepare2(app, "workspace", signal);
76085
- const ios = import_node_path91.default.join(prepared.app, "ios");
76086
- const workspaces = import_node_fs89.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
76216
+ const ios = import_node_path92.default.join(prepared.app, "ios");
76217
+ const workspaces = import_node_fs90.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
76087
76218
  const workspace = selectXcodeWorkspace(ios, workspaces);
76088
76219
  if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`);
76089
76220
  await resolveXcodeSwiftPackages(workspace, signal, target);
@@ -76100,13 +76231,13 @@ function prepareExpoNativeProject(app, signal, dependencies = "lockfile") {
76100
76231
  );
76101
76232
  }
76102
76233
  function prepare2(app, stage, signal) {
76103
- app = import_node_fs89.default.realpathSync(app);
76234
+ app = import_node_fs90.default.realpathSync(app);
76104
76235
  const podsEnvironment = reactNativePodsEnvironment();
76105
76236
  const key2 = `${app}\0${stage}\0${JSON.stringify(podsEnvironment)}`;
76106
76237
  const last = current.get(key2);
76107
- if (last && last.watch.edits === last.edits && (import_node_fs89.default.existsSync(import_node_path91.default.join(last.result.work, ".peach-complete")) || stage !== "workspace" && import_node_fs89.default.existsSync(import_node_path91.default.join(last.result.work, ".peach-project-complete")))) {
76238
+ if (last && last.watch.edits === last.edits && (import_node_fs90.default.existsSync(import_node_path92.default.join(last.result.work, ".peach-complete")) || stage !== "workspace" && import_node_fs90.default.existsSync(import_node_path92.default.join(last.result.work, ".peach-project-complete")))) {
76108
76239
  const now = /* @__PURE__ */ new Date();
76109
- import_node_fs89.default.utimesSync(last.result.work, now, now);
76240
+ import_node_fs90.default.utimesSync(last.result.work, now, now);
76110
76241
  return Promise.resolve(last.result);
76111
76242
  }
76112
76243
  let shared = preparing.get(key2);
@@ -76129,25 +76260,25 @@ function prepare2(app, stage, signal) {
76129
76260
  }
76130
76261
  async function copyInstalledWorkspace(root, destination, excluded) {
76131
76262
  const installed = [];
76132
- await import_node_fs89.default.promises.cp(root, destination, {
76263
+ await import_node_fs90.default.promises.cp(root, destination, {
76133
76264
  recursive: true,
76134
- mode: import_node_fs89.default.constants.COPYFILE_FICLONE,
76265
+ mode: import_node_fs90.default.constants.COPYFILE_FICLONE,
76135
76266
  preserveTimestamps: true,
76136
76267
  verbatimSymlinks: true,
76137
76268
  filter: (source) => {
76138
- const relative3 = import_node_path91.default.relative(root, source);
76139
- if (import_node_path91.default.basename(source) === "node_modules") installed.push(relative3);
76269
+ const relative3 = import_node_path92.default.relative(root, source);
76270
+ if (import_node_path92.default.basename(source) === "node_modules") installed.push(relative3);
76140
76271
  return !excluded(relative3);
76141
76272
  }
76142
76273
  });
76143
76274
  const entries2 = installed.flatMap((relative3) => {
76144
- const source = import_node_path91.default.join(root, relative3);
76145
- if (import_node_fs89.default.lstatSync(source).isSymbolicLink()) {
76146
- import_node_fs89.default.symlinkSync(import_node_fs89.default.readlinkSync(source), import_node_path91.default.join(destination, relative3));
76275
+ const source = import_node_path92.default.join(root, relative3);
76276
+ if (import_node_fs90.default.lstatSync(source).isSymbolicLink()) {
76277
+ import_node_fs90.default.symlinkSync(import_node_fs90.default.readlinkSync(source), import_node_path92.default.join(destination, relative3));
76147
76278
  return [];
76148
76279
  }
76149
- import_node_fs89.default.mkdirSync(import_node_path91.default.join(destination, relative3));
76150
- return import_node_fs89.default.readdirSync(source).filter((name3) => name3 !== ".cache").map((name3) => import_node_path91.default.join(relative3, name3));
76280
+ import_node_fs90.default.mkdirSync(import_node_path92.default.join(destination, relative3));
76281
+ return import_node_fs90.default.readdirSync(source).filter((name3) => name3 !== ".cache").map((name3) => import_node_path92.default.join(relative3, name3));
76151
76282
  });
76152
76283
  if (process.platform === "darwin") {
76153
76284
  await new Promise((resolve3, reject) => {
@@ -76159,8 +76290,8 @@ async function copyInstalledWorkspace(root, destination, excluded) {
76159
76290
  );
76160
76291
  child.stdin?.end(
76161
76292
  entries2.flatMap((relative3) => [
76162
- import_node_path91.default.join(root, relative3),
76163
- import_node_path91.default.join(destination, relative3)
76293
+ import_node_path92.default.join(root, relative3),
76294
+ import_node_path92.default.join(destination, relative3)
76164
76295
  ]).join("\0")
76165
76296
  );
76166
76297
  });
@@ -76173,32 +76304,32 @@ async function copyInstalledWorkspace(root, destination, excluded) {
76173
76304
  "-R",
76174
76305
  "-p",
76175
76306
  "--reflink=auto",
76176
- import_node_path91.default.join(root, relative3),
76177
- import_node_path91.default.join(destination, relative3)
76307
+ import_node_path92.default.join(root, relative3),
76308
+ import_node_path92.default.join(destination, relative3)
76178
76309
  ]);
76179
76310
  return clone();
76180
76311
  };
76181
76312
  await Promise.all(Array.from({ length: 8 }, clone));
76182
76313
  }
76183
76314
  function nativeWorkspacesDir(root) {
76184
- const device = import_node_fs89.default.statSync(root).dev;
76315
+ const device = import_node_fs90.default.statSync(root).dev;
76185
76316
  for (const cache of [
76186
76317
  sharedCacheDir(cacheDir()),
76187
76318
  cacheDir(),
76188
- import_node_path91.default.join(import_node_os19.default.homedir(), ".peach-cache")
76319
+ import_node_path92.default.join(import_node_os19.default.homedir(), ".peach-cache")
76189
76320
  ]) {
76190
76321
  let existing = cache;
76191
- while (!import_node_fs89.default.existsSync(existing)) existing = import_node_path91.default.dirname(existing);
76192
- if (import_node_fs89.default.statSync(existing).dev === device)
76193
- return import_node_path91.default.join(cache, "expo-native-workspaces");
76194
- }
76195
- let mount = import_node_fs89.default.realpathSync(root);
76196
- while (import_node_path91.default.dirname(mount) !== mount && import_node_fs89.default.statSync(import_node_path91.default.dirname(mount)).dev === device)
76197
- mount = import_node_path91.default.dirname(mount);
76198
- const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp", import_node_fs89.default.realpathSync(import_node_os19.default.tmpdir())]);
76322
+ while (!import_node_fs90.default.existsSync(existing)) existing = import_node_path92.default.dirname(existing);
76323
+ if (import_node_fs90.default.statSync(existing).dev === device)
76324
+ return import_node_path92.default.join(cache, "expo-native-workspaces");
76325
+ }
76326
+ let mount = import_node_fs90.default.realpathSync(root);
76327
+ while (import_node_path92.default.dirname(mount) !== mount && import_node_fs90.default.statSync(import_node_path92.default.dirname(mount)).dev === device)
76328
+ mount = import_node_path92.default.dirname(mount);
76329
+ const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp", import_node_fs90.default.realpathSync(import_node_os19.default.tmpdir())]);
76199
76330
  if (tmpRoots.has(mount))
76200
- return import_node_path91.default.join(sharedCacheDir(cacheDir()), "expo-native-workspaces");
76201
- return import_node_path91.default.join(mount, ".peach-cache", "expo-native-workspaces");
76331
+ return import_node_path92.default.join(sharedCacheDir(cacheDir()), "expo-native-workspaces");
76332
+ return import_node_path92.default.join(mount, ".peach-cache", "expo-native-workspaces");
76202
76333
  }
76203
76334
  function preparedExpoWorkspacesDir(app) {
76204
76335
  return nativeWorkspacesDir(findWorkspaceRoot(app));
@@ -76212,7 +76343,7 @@ function trackedSourceEntries(root, work) {
76212
76343
  if (listed.status !== 0) return [];
76213
76344
  return listed.stdout.toString("utf8").split("\0").filter((entry) => {
76214
76345
  const tab = entry.indexOf(" ");
76215
- return tab > 0 && import_node_fs89.default.existsSync(import_node_path91.default.join(work, entry.slice(tab + 1)));
76346
+ return tab > 0 && import_node_fs90.default.existsSync(import_node_path92.default.join(work, entry.slice(tab + 1)));
76216
76347
  });
76217
76348
  }
76218
76349
  function initializeWorkspaceGit(root, work) {
@@ -76261,42 +76392,42 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76261
76392
  );
76262
76393
  watch.excluded = excluded;
76263
76394
  watch.ignoredLater = await untrackedIgnored(root, linkedPackageDirectories(root, app));
76264
- const manifest = JSON.parse(import_node_fs89.default.readFileSync(import_node_path91.default.join(root, "package.json"), "utf8"));
76265
- const appManifest = JSON.parse(import_node_fs89.default.readFileSync(import_node_path91.default.join(app, "package.json"), "utf8"));
76266
- const work = import_node_path91.default.join(
76395
+ const manifest = JSON.parse(import_node_fs90.default.readFileSync(import_node_path92.default.join(root, "package.json"), "utf8"));
76396
+ const appManifest = JSON.parse(import_node_fs90.default.readFileSync(import_node_path92.default.join(app, "package.json"), "utf8"));
76397
+ const work = import_node_path92.default.join(
76267
76398
  nativeWorkspacesDir(root),
76268
76399
  stage === "installed-project" ? `${nativeHash}-installed` : nativeHash
76269
76400
  );
76270
76401
  report(`hashed ${root}`);
76271
76402
  const result = await withSwiftRootLock(work, async (lease) => {
76272
- const marker = import_node_path91.default.join(work, ".peach-complete");
76273
- const projectMarker = import_node_path91.default.join(work, ".peach-project-complete");
76274
- const preparedApp = import_node_path91.default.join(work, appRelative);
76275
- const projectReady = import_node_fs89.default.existsSync(marker) || import_node_fs89.default.existsSync(projectMarker);
76403
+ const marker = import_node_path92.default.join(work, ".peach-complete");
76404
+ const projectMarker = import_node_path92.default.join(work, ".peach-project-complete");
76405
+ const preparedApp = import_node_path92.default.join(work, appRelative);
76406
+ const projectReady = import_node_fs90.default.existsSync(marker) || import_node_fs90.default.existsSync(projectMarker);
76276
76407
  if (projectReady) {
76277
76408
  syncChangedFiles(
76278
76409
  root,
76279
76410
  work,
76280
76411
  appRelative,
76281
76412
  excluded,
76282
- stage === "workspace" && !import_node_fs89.default.existsSync(marker)
76413
+ stage === "workspace" && !import_node_fs90.default.existsSync(marker)
76283
76414
  );
76284
76415
  report(`reusing prepared workspace ${work}`);
76285
76416
  }
76286
76417
  if (!projectReady) {
76287
76418
  const partial = `${work}.${process.pid}.partial`;
76288
- await import_node_fs89.default.promises.rm(partial, { recursive: true, force: true });
76289
- await import_node_fs89.default.promises.rm(work, { recursive: true, force: true });
76290
- import_node_fs89.default.mkdirSync(import_node_path91.default.dirname(work), { recursive: true });
76419
+ await import_node_fs90.default.promises.rm(partial, { recursive: true, force: true });
76420
+ await import_node_fs90.default.promises.rm(work, { recursive: true, force: true });
76421
+ import_node_fs90.default.mkdirSync(import_node_path92.default.dirname(work), { recursive: true });
76291
76422
  report("copying workspace");
76292
76423
  await copyInstalledWorkspace(root, partial, excluded);
76293
- import_node_fs89.default.renameSync(partial, work);
76424
+ import_node_fs90.default.renameSync(partial, work);
76294
76425
  initializeWorkspaceGit(root, work);
76295
76426
  report("copied workspace");
76296
76427
  }
76297
- if (projectReady && (stage !== "workspace" || import_node_fs89.default.existsSync(marker))) {
76428
+ if (projectReady && (stage !== "workspace" || import_node_fs90.default.existsSync(marker))) {
76298
76429
  const now2 = /* @__PURE__ */ new Date();
76299
- import_node_fs89.default.utimesSync(work, now2, now2);
76430
+ import_node_fs90.default.utimesSync(work, now2, now2);
76300
76431
  return { app: preparedApp, work };
76301
76432
  }
76302
76433
  const trustedConfigs = /* @__PURE__ */ new Set();
@@ -76308,10 +76439,10 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76308
76439
  if (result2.status !== 0) continue;
76309
76440
  const configs = JSON.parse(result2.stdout);
76310
76441
  for (const config of configs) {
76311
- const relative3 = import_node_path91.default.relative(root, config.path);
76312
- if (relative3.startsWith("..") || import_node_path91.default.isAbsolute(relative3)) continue;
76313
- const copy = import_node_path91.default.join(work, relative3);
76314
- if (import_node_fs89.default.existsSync(copy) && import_node_fs89.default.readFileSync(config.path).equals(import_node_fs89.default.readFileSync(copy)))
76442
+ const relative3 = import_node_path92.default.relative(root, config.path);
76443
+ if (relative3.startsWith("..") || import_node_path92.default.isAbsolute(relative3)) continue;
76444
+ const copy = import_node_path92.default.join(work, relative3);
76445
+ if (import_node_fs90.default.existsSync(copy) && import_node_fs90.default.readFileSync(config.path).equals(import_node_fs90.default.readFileSync(copy)))
76315
76446
  trustedConfigs.add(copy);
76316
76447
  }
76317
76448
  }
@@ -76319,7 +76450,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76319
76450
  MISE_TRUSTED_CONFIG_PATHS: [
76320
76451
  process.env.MISE_TRUSTED_CONFIG_PATHS,
76321
76452
  ...trustedConfigs
76322
- ].filter(Boolean).join(import_node_path91.default.delimiter)
76453
+ ].filter(Boolean).join(import_node_path92.default.delimiter)
76323
76454
  };
76324
76455
  const run12 = (command, args, cwd, env = {}, admit = true) => {
76325
76456
  const admitted = admit && teamMachineInstalled();
@@ -76337,8 +76468,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76337
76468
  const nodeVersion = pinnedNodeVersion(root, manifest);
76338
76469
  const pinnedBun = manager.startsWith("bun@");
76339
76470
  const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, ...pinnedBun ? [manager] : [], "--"] : [];
76340
- const bunPrefix = import_node_path91.default.join(cacheDir(), "package-managers", manager);
76341
- const bunExecutable = import_node_path91.default.join(bunPrefix, "node_modules/.bin/bun");
76471
+ const bunPrefix = import_node_path92.default.join(cacheDir(), "package-managers", manager);
76472
+ const bunExecutable = import_node_path92.default.join(bunPrefix, "node_modules/.bin/bun");
76342
76473
  const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
76343
76474
  "npx",
76344
76475
  "--yes",
@@ -76353,7 +76484,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76353
76484
  );
76354
76485
  const installEnv = {
76355
76486
  npm_config_ignore_scripts: "false",
76356
- ...pinnedBun && !nodeVersion ? { PATH: [import_node_path91.default.dirname(bunExecutable), process.env.PATH].join(import_node_path91.default.delimiter) } : {}
76487
+ ...pinnedBun && !nodeVersion ? { PATH: [import_node_path92.default.dirname(bunExecutable), process.env.PATH].join(import_node_path92.default.delimiter) } : {}
76357
76488
  };
76358
76489
  const execute = async (args, cwd, env = {}) => {
76359
76490
  const command = [...prefix, ...args];
@@ -76379,7 +76510,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76379
76510
  );
76380
76511
  }
76381
76512
  }
76382
- if (install[0] === "npm" && import_node_fs89.default.existsSync(import_node_path91.default.join(work, "package-lock.json"))) {
76513
+ if (install[0] === "npm" && import_node_fs90.default.existsSync(import_node_path92.default.join(work, "package-lock.json"))) {
76383
76514
  report("checking npm lockfile");
76384
76515
  const check2 = [
76385
76516
  ...prefix,
@@ -76407,9 +76538,9 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76407
76538
  report,
76408
76539
  oneSdkPrepared
76409
76540
  );
76410
- import_node_fs89.default.writeFileSync(projectMarker, "complete\n");
76541
+ import_node_fs90.default.writeFileSync(projectMarker, "complete\n");
76411
76542
  }
76412
- if (stage === "workspace" && !import_node_fs89.default.existsSync(marker)) {
76543
+ if (stage === "workspace" && !import_node_fs90.default.existsSync(marker)) {
76413
76544
  await prepareNativeProject(
76414
76545
  preparedApp,
76415
76546
  work,
@@ -76419,14 +76550,14 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
76419
76550
  report,
76420
76551
  oneSdkPrepared
76421
76552
  );
76422
- import_node_fs89.default.writeFileSync(marker, "complete\n");
76553
+ import_node_fs90.default.writeFileSync(marker, "complete\n");
76423
76554
  }
76424
76555
  const now = /* @__PURE__ */ new Date();
76425
- import_node_fs89.default.utimesSync(work, now, now);
76556
+ import_node_fs90.default.utimesSync(work, now, now);
76426
76557
  return { app: preparedApp, work };
76427
76558
  });
76428
76559
  if (stage === "workspace") readInstalledPodspecs(app, result.app);
76429
- await pruneExpoNativeWorkspaces(import_node_path91.default.dirname(work), work);
76560
+ await pruneExpoNativeWorkspaces(import_node_path92.default.dirname(work), work);
76430
76561
  current.set(key2, { watch, edits, result });
76431
76562
  return result;
76432
76563
  }
@@ -76434,20 +76565,20 @@ function declaresNativeDependency(manifest, name3) {
76434
76565
  return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
76435
76566
  }
76436
76567
  async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
76437
- const appRequire = (0, import_node_module9.createRequire)(import_node_path91.default.join(app, "package.json"));
76568
+ const appRequire = (0, import_node_module9.createRequire)(import_node_path92.default.join(app, "package.json"));
76438
76569
  const sourcePodEnv = {
76439
76570
  EXPO_USE_PRECOMPILED_MODULES: "0",
76440
76571
  ONE_PREBUILT_IOS: "0",
76441
76572
  RCT_NEW_ARCH_ENABLED: process.env.RCT_NEW_ARCH_ENABLED ?? "1"
76442
76573
  };
76443
76574
  const declares = (name3) => declaresNativeDependency(manifest, name3);
76444
- if (!import_node_fs89.default.existsSync(import_node_path91.default.join(app, "ios", "Podfile"))) {
76575
+ if (!import_node_fs90.default.existsSync(import_node_path92.default.join(app, "ios", "Podfile"))) {
76445
76576
  if (!declares("expo") && !declares("one"))
76446
76577
  throw new Error(
76447
76578
  `${app} has no ios/Podfile and declares neither expo nor one, so peach cannot generate an iOS project for it`
76448
76579
  );
76449
76580
  const prebuild = declares("expo") ? [appRequire.resolve("expo/bin/cli"), "prebuild"] : [
76450
- import_node_path91.default.join(import_node_path91.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
76581
+ import_node_path92.default.join(import_node_path92.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
76451
76582
  "prebuild"
76452
76583
  ];
76453
76584
  await execute(
@@ -76483,25 +76614,25 @@ async function prepareNativeProject(app, workspace, manifest, stage, execute, re
76483
76614
  function stageCachedQuickCryptoOpenSsl(app) {
76484
76615
  const root = findWorkspaceRoot(app);
76485
76616
  let packageDir = null;
76486
- for (let at = app; ; at = import_node_path91.default.dirname(at)) {
76487
- const candidate = import_node_path91.default.join(at, "node_modules", "react-native-quick-crypto");
76488
- if (import_node_fs89.default.existsSync(import_node_path91.default.join(candidate, "QuickCrypto.podspec"))) {
76617
+ for (let at = app; ; at = import_node_path92.default.dirname(at)) {
76618
+ const candidate = import_node_path92.default.join(at, "node_modules", "react-native-quick-crypto");
76619
+ if (import_node_fs90.default.existsSync(import_node_path92.default.join(candidate, "QuickCrypto.podspec"))) {
76489
76620
  packageDir = candidate;
76490
76621
  break;
76491
76622
  }
76492
- if (at === root || import_node_path91.default.dirname(at) === at) break;
76623
+ if (at === root || import_node_path92.default.dirname(at) === at) break;
76493
76624
  }
76494
76625
  if (!packageDir) return;
76495
- const opensslDir = import_node_path91.default.join(packageDir, "ios", "openssl");
76496
- if (import_node_fs89.default.existsSync(import_node_path91.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
76497
- const podspec = import_node_fs89.default.readFileSync(import_node_path91.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
76626
+ const opensslDir = import_node_path92.default.join(packageDir, "ios", "openssl");
76627
+ if (import_node_fs90.default.existsSync(import_node_path92.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
76628
+ const podspec = import_node_fs90.default.readFileSync(import_node_path92.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
76498
76629
  const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
76499
76630
  if (!sha2565) return;
76500
- const archive = import_node_path91.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
76501
- if (!import_node_fs89.default.existsSync(archive) || (0, import_node_crypto56.createHash)("sha256").update(import_node_fs89.default.readFileSync(archive)).digest("hex") !== sha2565)
76631
+ const archive = import_node_path92.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
76632
+ if (!import_node_fs90.default.existsSync(archive) || (0, import_node_crypto56.createHash)("sha256").update(import_node_fs90.default.readFileSync(archive)).digest("hex") !== sha2565)
76502
76633
  return;
76503
- import_node_fs89.default.rmSync(opensslDir, { recursive: true, force: true });
76504
- import_node_fs89.default.mkdirSync(opensslDir, { recursive: true });
76634
+ import_node_fs90.default.rmSync(opensslDir, { recursive: true, force: true });
76635
+ import_node_fs90.default.mkdirSync(opensslDir, { recursive: true });
76505
76636
  (0, import_node_child_process46.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
76506
76637
  }
76507
76638
  async function runAdmitted(lease, command, args, cwd, extraEnv, admitted) {
@@ -76536,16 +76667,16 @@ ${failedOutputLine(command, cwd, bytes)}`
76536
76667
  });
76537
76668
  });
76538
76669
  }
76539
- var import_node_child_process46, import_node_crypto56, import_node_fs89, import_node_module9, import_node_os19, import_node_path91, 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;
76670
+ var import_node_child_process46, import_node_crypto56, import_node_fs90, import_node_module9, import_node_os19, import_node_path92, 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;
76540
76671
  var init_expo_native_workspace = __esm({
76541
76672
  "src/expo-native-workspace.ts"() {
76542
76673
  "use strict";
76543
76674
  import_node_child_process46 = require("node:child_process");
76544
76675
  import_node_crypto56 = require("node:crypto");
76545
- import_node_fs89 = __toESM(require("node:fs"), 1);
76676
+ import_node_fs90 = __toESM(require("node:fs"), 1);
76546
76677
  import_node_module9 = require("node:module");
76547
76678
  import_node_os19 = __toESM(require("node:os"), 1);
76548
- import_node_path91 = __toESM(require("node:path"), 1);
76679
+ import_node_path92 = __toESM(require("node:path"), 1);
76549
76680
  import_node_util13 = require("node:util");
76550
76681
  init_detect();
76551
76682
  init_admitted_mac_build();
@@ -76633,7 +76764,7 @@ async function expoDiscoveryKey(options2) {
76633
76764
  return { key: key2, root };
76634
76765
  }
76635
76766
  function expoDiscoveryCacheDir() {
76636
- return import_node_path92.default.join(sharedCacheDir(import_node_path92.default.join(ambientHomeDir(), "cache")), "expo-discovery");
76767
+ return import_node_path93.default.join(sharedCacheDir(import_node_path93.default.join(ambientHomeDir(), "cache")), "expo-discovery");
76637
76768
  }
76638
76769
  function vanished2(error) {
76639
76770
  return error instanceof Error && "code" in error && error.code === "ENOENT";
@@ -76641,25 +76772,25 @@ function vanished2(error) {
76641
76772
  function renew(file) {
76642
76773
  const now = /* @__PURE__ */ new Date();
76643
76774
  try {
76644
- import_node_fs90.default.utimesSync(file, now, now);
76775
+ import_node_fs91.default.utimesSync(file, now, now);
76645
76776
  } catch (error) {
76646
76777
  if (!vanished2(error)) throw error;
76647
76778
  }
76648
76779
  }
76649
76780
  function expireDiscovery(dir, keep) {
76650
76781
  const sweep = (parent, expiry) => {
76651
- if (!import_node_fs90.default.existsSync(parent)) return;
76652
- for (const name3 of import_node_fs90.default.readdirSync(parent)) {
76782
+ if (!import_node_fs91.default.existsSync(parent)) return;
76783
+ for (const name3 of import_node_fs91.default.readdirSync(parent)) {
76653
76784
  if (!expiry(name3)) continue;
76654
- const file = import_node_path92.default.join(parent, name3);
76655
- const modified = import_node_fs90.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
76785
+ const file = import_node_path93.default.join(parent, name3);
76786
+ const modified = import_node_fs91.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
76656
76787
  if (modified === void 0 || file === keep) continue;
76657
76788
  const limit = name3.endsWith(".tmp") ? ORPHAN_TEMPORARY_MS : EXPIRY_MS;
76658
- if (Date.now() - modified > limit) import_node_fs90.default.rmSync(file, { force: true });
76789
+ if (Date.now() - modified > limit) import_node_fs91.default.rmSync(file, { force: true });
76659
76790
  }
76660
76791
  };
76661
76792
  sweep(dir, (name3) => name3.endsWith(".json") || name3.endsWith(".tmp"));
76662
- sweep(import_node_path92.default.join(dir, "blobs"), () => true);
76793
+ sweep(import_node_path93.default.join(dir, "blobs"), () => true);
76663
76794
  }
76664
76795
  function isExpoSwiftSourceUnit(value) {
76665
76796
  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");
@@ -76669,9 +76800,9 @@ function isStoredUnit(value) {
76669
76800
  }
76670
76801
  function readExpoDiscovery(key2) {
76671
76802
  let parsed2;
76672
- const record5 = import_node_path92.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
76803
+ const record5 = import_node_path93.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
76673
76804
  try {
76674
- parsed2 = JSON.parse(import_node_fs90.default.readFileSync(record5, "utf8"));
76805
+ parsed2 = JSON.parse(import_node_fs91.default.readFileSync(record5, "utf8"));
76675
76806
  } catch {
76676
76807
  return void 0;
76677
76808
  }
@@ -76698,8 +76829,8 @@ function readExpoDiscovery(key2) {
76698
76829
  if (!Array.isArray(parsed2.units) || !parsed2.units.every(isBodyOffset))
76699
76830
  return void 0;
76700
76831
  if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
76701
- const archive = import_node_path92.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
76702
- const bytes = import_node_fs90.default.readFileSync(archive);
76832
+ const archive = import_node_path93.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
76833
+ const bytes = import_node_fs91.default.readFileSync(archive);
76703
76834
  if ((0, import_node_crypto57.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
76704
76835
  return void 0;
76705
76836
  const bodies = (0, import_node_zlib6.zstdDecompressSync)(bytes);
@@ -76754,13 +76885,13 @@ function readExpoDiscovery(key2) {
76754
76885
  }
76755
76886
  }
76756
76887
  function fileHashesPath() {
76757
- return import_node_path92.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
76888
+ return import_node_path93.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
76758
76889
  }
76759
76890
  function stampedFileHash(file) {
76760
76891
  if (!fileHashesLoaded) {
76761
76892
  fileHashesLoaded = true;
76762
76893
  try {
76763
- const saved = JSON.parse(import_node_fs90.default.readFileSync(fileHashesPath(), "utf8"));
76894
+ const saved = JSON.parse(import_node_fs91.default.readFileSync(fileHashesPath(), "utf8"));
76764
76895
  if (isRecord(saved)) {
76765
76896
  for (const [entry, value] of Object.entries(saved))
76766
76897
  if (Array.isArray(value) && typeof value[0] === "string" && typeof value[1] === "string")
@@ -76770,11 +76901,11 @@ function stampedFileHash(file) {
76770
76901
  fileHashes.clear();
76771
76902
  }
76772
76903
  }
76773
- const stat = import_node_fs90.default.statSync(file, { bigint: true });
76904
+ const stat = import_node_fs91.default.statSync(file, { bigint: true });
76774
76905
  const stamp = [stat.dev, stat.ino, stat.size, stat.mtimeNs, stat.ctimeNs].join(":");
76775
76906
  const cached2 = fileHashes.get(file);
76776
76907
  if (cached2?.stamp === stamp) return cached2.checksum;
76777
- const checksum = (0, import_node_crypto57.createHash)("sha256").update(import_node_fs90.default.readFileSync(file)).digest("hex");
76908
+ const checksum = (0, import_node_crypto57.createHash)("sha256").update(import_node_fs91.default.readFileSync(file)).digest("hex");
76778
76909
  fileHashes.set(file, { stamp, checksum });
76779
76910
  fileHashesChanged = true;
76780
76911
  return checksum;
@@ -76785,18 +76916,18 @@ function saveFileHashes() {
76785
76916
  const target = fileHashesPath();
76786
76917
  const temporary = `${target}.${process.pid}.${(0, import_node_crypto57.randomUUID)()}.tmp`;
76787
76918
  try {
76788
- import_node_fs90.default.mkdirSync(import_node_path92.default.dirname(target), { recursive: true });
76789
- import_node_fs90.default.writeFileSync(
76919
+ import_node_fs91.default.mkdirSync(import_node_path93.default.dirname(target), { recursive: true });
76920
+ import_node_fs91.default.writeFileSync(
76790
76921
  temporary,
76791
76922
  JSON.stringify(
76792
76923
  Object.fromEntries(
76793
- [...fileHashes].filter(([entry]) => import_node_fs90.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
76924
+ [...fileHashes].filter(([entry]) => import_node_fs91.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
76794
76925
  )
76795
76926
  )
76796
76927
  );
76797
- import_node_fs90.default.renameSync(temporary, target);
76928
+ import_node_fs91.default.renameSync(temporary, target);
76798
76929
  } catch {
76799
- import_node_fs90.default.rmSync(temporary, { force: true });
76930
+ import_node_fs91.default.rmSync(temporary, { force: true });
76800
76931
  }
76801
76932
  }
76802
76933
  function treeDigest(directory2, signal) {
@@ -76804,14 +76935,14 @@ function treeDigest(directory2, signal) {
76804
76935
  const seen = /* @__PURE__ */ new Set();
76805
76936
  const walk4 = (dir) => {
76806
76937
  signal?.throwIfAborted();
76807
- const canonical = import_node_fs90.default.realpathSync(dir);
76938
+ const canonical = import_node_fs91.default.realpathSync(dir);
76808
76939
  if (seen.has(canonical)) return;
76809
76940
  seen.add(canonical);
76810
- for (const child of import_node_fs90.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
76811
- const file = import_node_path92.default.join(dir, child.name);
76812
- const relative3 = import_node_path92.default.relative(directory2, file);
76941
+ for (const child of import_node_fs91.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
76942
+ const file = import_node_path93.default.join(dir, child.name);
76943
+ const relative3 = import_node_path93.default.relative(directory2, file);
76813
76944
  if (child.isSymbolicLink()) {
76814
- entries2.set(relative3, `link\0${import_node_fs90.default.readlinkSync(file)}`);
76945
+ entries2.set(relative3, `link\0${import_node_fs91.default.readlinkSync(file)}`);
76815
76946
  } else if (child.isDirectory()) {
76816
76947
  walk4(file);
76817
76948
  } else if (child.isFile()) {
@@ -76825,7 +76956,7 @@ function treeDigest(directory2, signal) {
76825
76956
  function frameworkDigest(directory2, signal) {
76826
76957
  let root;
76827
76958
  try {
76828
- root = import_node_fs90.default.realpathSync(directory2);
76959
+ root = import_node_fs91.default.realpathSync(directory2);
76829
76960
  } catch (error) {
76830
76961
  if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
76831
76962
  return MISSING_TREE;
@@ -76834,8 +76965,8 @@ function frameworkDigest(directory2, signal) {
76834
76965
  const entries2 = treeDigest(directory2, signal);
76835
76966
  for (const [relative3, value] of entries2) {
76836
76967
  if (!value.startsWith("link\0")) continue;
76837
- const target = import_node_fs90.default.realpathSync(import_node_path92.default.join(directory2, relative3));
76838
- if (target !== root && !target.startsWith(`${root}${import_node_path92.default.sep}`))
76968
+ const target = import_node_fs91.default.realpathSync(import_node_path93.default.join(directory2, relative3));
76969
+ if (target !== root && !target.startsWith(`${root}${import_node_path93.default.sep}`))
76839
76970
  throw new Error(`framework link escapes its tree: ${relative3}`);
76840
76971
  }
76841
76972
  return (0, import_node_crypto57.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
@@ -76853,8 +76984,8 @@ function rewritePreparedPaths(options2) {
76853
76984
  let preparedBytes;
76854
76985
  let sourceBytes;
76855
76986
  try {
76856
- preparedBytes = import_node_fs90.default.readFileSync(preparedFile);
76857
- sourceBytes = import_node_fs90.default.readFileSync(sourceFile);
76987
+ preparedBytes = import_node_fs91.default.readFileSync(preparedFile);
76988
+ sourceBytes = import_node_fs91.default.readFileSync(sourceFile);
76858
76989
  } catch {
76859
76990
  return null;
76860
76991
  }
@@ -76884,7 +77015,7 @@ function rewritePreparedPaths(options2) {
76884
77015
  return match;
76885
77016
  const separator = value.lastIndexOf("#");
76886
77017
  const preparedFile = value.slice(0, separator);
76887
- if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path92.default.sep}`)) {
77018
+ if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path93.default.sep}`)) {
76888
77019
  refusedPlugin = true;
76889
77020
  return match;
76890
77021
  }
@@ -76932,22 +77063,22 @@ function rewritePreparedPaths(options2) {
76932
77063
  frameworkDependencies[sourceDir] = sourceDigest;
76933
77064
  let portableDir = sourceDir;
76934
77065
  if (preparedDigest !== sourceDigest) {
76935
- const parent = import_node_path92.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
76936
- portableDir = import_node_path92.default.join(parent, import_node_path92.default.basename(dir));
76937
- if (!import_node_fs90.default.existsSync(portableDir)) {
76938
- import_node_fs90.default.mkdirSync(parent, { recursive: true });
76939
- const tmp = import_node_path92.default.join(parent, `.${process.pid}.${(0, import_node_crypto57.randomUUID)()}.tmp`);
77066
+ const parent = import_node_path93.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
77067
+ portableDir = import_node_path93.default.join(parent, import_node_path93.default.basename(dir));
77068
+ if (!import_node_fs91.default.existsSync(portableDir)) {
77069
+ import_node_fs91.default.mkdirSync(parent, { recursive: true });
77070
+ const tmp = import_node_path93.default.join(parent, `.${process.pid}.${(0, import_node_crypto57.randomUUID)()}.tmp`);
76940
77071
  try {
76941
- import_node_fs90.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
77072
+ import_node_fs91.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
76942
77073
  if (frameworkDigest(tmp, signal) !== preparedDigest)
76943
77074
  return { refuse: `framework changed while copying: ${dir}` };
76944
77075
  try {
76945
- import_node_fs90.default.renameSync(tmp, portableDir);
77076
+ import_node_fs91.default.renameSync(tmp, portableDir);
76946
77077
  } catch (error) {
76947
- if (!import_node_fs90.default.existsSync(portableDir)) throw error;
77078
+ if (!import_node_fs91.default.existsSync(portableDir)) throw error;
76948
77079
  }
76949
77080
  } finally {
76950
- import_node_fs90.default.rmSync(tmp, { recursive: true, force: true });
77081
+ import_node_fs91.default.rmSync(tmp, { recursive: true, force: true });
76951
77082
  }
76952
77083
  }
76953
77084
  if (frameworkDigest(portableDir, signal) !== preparedDigest)
@@ -76964,10 +77095,10 @@ function rewritePreparedPaths(options2) {
76964
77095
  function writeExpoDiscovery(options2) {
76965
77096
  try {
76966
77097
  const dir = expoDiscoveryCacheDir();
76967
- import_node_fs90.default.mkdirSync(dir, { recursive: true });
76968
- const tmp = import_node_path92.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto57.randomUUID)()}.tmp`);
77098
+ import_node_fs91.default.mkdirSync(dir, { recursive: true });
77099
+ const tmp = import_node_path93.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto57.randomUUID)()}.tmp`);
76969
77100
  if (options2.units === null) {
76970
- import_node_fs90.default.writeFileSync(
77101
+ import_node_fs91.default.writeFileSync(
76971
77102
  tmp,
76972
77103
  JSON.stringify({
76973
77104
  format: FORMAT,
@@ -76977,11 +77108,11 @@ function writeExpoDiscovery(options2) {
76977
77108
  frameworks: {}
76978
77109
  })
76979
77110
  );
76980
- import_node_fs90.default.renameSync(tmp, import_node_path92.default.join(dir, `${options2.key}.json`));
76981
- expireDiscovery(dir, import_node_path92.default.join(dir, `${options2.key}.json`));
77111
+ import_node_fs91.default.renameSync(tmp, import_node_path93.default.join(dir, `${options2.key}.json`));
77112
+ expireDiscovery(dir, import_node_path93.default.join(dir, `${options2.key}.json`));
76982
77113
  return null;
76983
77114
  }
76984
- const preparedRoot = import_node_fs90.default.realpathSync(options2.preparedRoot);
77115
+ const preparedRoot = import_node_fs91.default.realpathSync(options2.preparedRoot);
76985
77116
  const rewritten = rewritePreparedPaths({
76986
77117
  units: options2.units,
76987
77118
  sourceRoot: options2.sourceRoot,
@@ -76989,8 +77120,8 @@ function writeExpoDiscovery(options2) {
76989
77120
  signal: options2.signal
76990
77121
  });
76991
77122
  if ("refuse" in rewritten) return rewritten.refuse;
76992
- const blobDir = import_node_path92.default.join(dir, "blobs");
76993
- import_node_fs90.default.mkdirSync(blobDir, { recursive: true });
77123
+ const blobDir = import_node_path93.default.join(dir, "blobs");
77124
+ import_node_fs91.default.mkdirSync(blobDir, { recursive: true });
76994
77125
  const seen = /* @__PURE__ */ new Map();
76995
77126
  const chunks = [];
76996
77127
  let size2 = 0;
@@ -77029,14 +77160,14 @@ function writeExpoDiscovery(options2) {
77029
77160
  );
77030
77161
  const contents2 = (0, import_node_zlib6.zstdCompressSync)(Buffer.concat(chunks, size2));
77031
77162
  const archive = (0, import_node_crypto57.createHash)("sha256").update(contents2).digest("hex");
77032
- const temporary = import_node_path92.default.join(blobDir, "." + (0, import_node_crypto57.randomUUID)() + ".tmp");
77163
+ const temporary = import_node_path93.default.join(blobDir, "." + (0, import_node_crypto57.randomUUID)() + ".tmp");
77033
77164
  try {
77034
- import_node_fs90.default.writeFileSync(temporary, contents2);
77035
- import_node_fs90.default.renameSync(temporary, import_node_path92.default.join(blobDir, `${archive}.zst`));
77165
+ import_node_fs91.default.writeFileSync(temporary, contents2);
77166
+ import_node_fs91.default.renameSync(temporary, import_node_path93.default.join(blobDir, `${archive}.zst`));
77036
77167
  } finally {
77037
- import_node_fs90.default.rmSync(temporary, { force: true });
77168
+ import_node_fs91.default.rmSync(temporary, { force: true });
77038
77169
  }
77039
- import_node_fs90.default.writeFileSync(
77170
+ import_node_fs91.default.writeFileSync(
77040
77171
  tmp,
77041
77172
  JSON.stringify({
77042
77173
  format: FORMAT,
@@ -77047,8 +77178,8 @@ function writeExpoDiscovery(options2) {
77047
77178
  frameworks: rewritten.frameworks
77048
77179
  })
77049
77180
  );
77050
- import_node_fs90.default.renameSync(tmp, import_node_path92.default.join(dir, `${options2.key}.json`));
77051
- expireDiscovery(dir, import_node_path92.default.join(dir, `${options2.key}.json`));
77181
+ import_node_fs91.default.renameSync(tmp, import_node_path93.default.join(dir, `${options2.key}.json`));
77182
+ expireDiscovery(dir, import_node_path93.default.join(dir, `${options2.key}.json`));
77052
77183
  saveFileHashes();
77053
77184
  return rewritten.units;
77054
77185
  } catch (error) {
@@ -77056,13 +77187,13 @@ function writeExpoDiscovery(options2) {
77056
77187
  return error instanceof Error ? error.message : String(error);
77057
77188
  }
77058
77189
  }
77059
- var import_node_crypto57, import_node_fs90, import_node_path92, import_node_zlib6, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
77190
+ var import_node_crypto57, import_node_fs91, import_node_path93, import_node_zlib6, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
77060
77191
  var init_expo_discovery_cache = __esm({
77061
77192
  "src/expo-discovery-cache.ts"() {
77062
77193
  "use strict";
77063
77194
  import_node_crypto57 = require("node:crypto");
77064
- import_node_fs90 = __toESM(require("node:fs"), 1);
77065
- import_node_path92 = __toESM(require("node:path"), 1);
77195
+ import_node_fs91 = __toESM(require("node:fs"), 1);
77196
+ import_node_path93 = __toESM(require("node:path"), 1);
77066
77197
  import_node_zlib6 = require("node:zlib");
77067
77198
  init_expo_eager_seam_contract();
77068
77199
  init_answeredNativePackages();
@@ -77216,7 +77347,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
77216
77347
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary3.RTCAppGroupIdentifier);
77217
77348
  const screenShareExtensionBundleId = typeof dictionary3.ScreenShareExtensionBundleId === "string" ? dictionary3.ScreenShareExtensionBundleId : void 0;
77218
77349
  const rootModuleName = readRootModuleName(
77219
- app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs91.default.existsSync(file)).map((file) => import_node_fs91.default.readFileSync(file, "utf8"))
77350
+ app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs92.default.existsSync(file)).map((file) => import_node_fs92.default.readFileSync(file, "utf8"))
77220
77351
  );
77221
77352
  const identity2 = {
77222
77353
  ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
@@ -77240,7 +77371,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
77240
77371
  googleSignIn: readGoogleSignInConfiguration(
77241
77372
  dictionary3,
77242
77373
  Object.fromEntries(
77243
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(import_node_fs91.default.readFileSync(file), parseInfoPlist)])
77374
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(import_node_fs92.default.readFileSync(file), parseInfoPlist)])
77244
77375
  )
77245
77376
  ),
77246
77377
  supportedInterfaceOrientations,
@@ -77250,11 +77381,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
77250
77381
  bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
77251
77382
  appIconArtwork: resolveNativeAppIconArtwork(
77252
77383
  app.resources,
77253
- (file) => import_node_fs91.default.readFileSync(file, "utf8"),
77384
+ (file) => import_node_fs92.default.readFileSync(file, "utf8"),
77254
77385
  (file) => {
77255
- const extension = import_node_path93.default.extname(file).toLowerCase();
77386
+ const extension = import_node_path94.default.extname(file).toLowerCase();
77256
77387
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
77257
- return `data:${contentType};base64,${import_node_fs91.default.readFileSync(file).toString("base64")}`;
77388
+ return `data:${contentType};base64,${import_node_fs92.default.readFileSync(file).toString("base64")}`;
77258
77389
  },
77259
77390
  icons,
77260
77391
  app.appIconName,
@@ -77283,13 +77414,13 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
77283
77414
  environment
77284
77415
  });
77285
77416
  }
77286
- var import_node_fs91, import_node_module10, import_node_path93, SDK_BEFORE_SCENE_REQUIREMENT;
77417
+ var import_node_fs92, import_node_module10, import_node_path94, SDK_BEFORE_SCENE_REQUIREMENT;
77287
77418
  var init_native_app_identity_project = __esm({
77288
77419
  "src/native-app-identity-project.ts"() {
77289
77420
  "use strict";
77290
- import_node_fs91 = __toESM(require("node:fs"), 1);
77421
+ import_node_fs92 = __toESM(require("node:fs"), 1);
77291
77422
  import_node_module10 = require("node:module");
77292
- import_node_path93 = __toESM(require("node:path"), 1);
77423
+ import_node_path94 = __toESM(require("node:path"), 1);
77293
77424
  init_android_app_identity();
77294
77425
  init_is_record();
77295
77426
  init_native_app_identity();
@@ -77305,8 +77436,8 @@ var init_native_app_identity_project = __esm({
77305
77436
 
77306
77437
  // src/native-firebase-config.ts
77307
77438
  function hasExpoConfig(projectRoot) {
77308
- const packagePath = import_node_path94.default.join(projectRoot, "package.json");
77309
- const manifest = import_node_fs92.default.existsSync(packagePath) ? JSON.parse(import_node_fs92.default.readFileSync(packagePath, "utf8")) : null;
77439
+ const packagePath = import_node_path95.default.join(projectRoot, "package.json");
77440
+ const manifest = import_node_fs93.default.existsSync(packagePath) ? JSON.parse(import_node_fs93.default.readFileSync(packagePath, "utf8")) : null;
77310
77441
  if (isRecord(manifest)) {
77311
77442
  const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
77312
77443
  isRecord
@@ -77314,13 +77445,13 @@ function hasExpoConfig(projectRoot) {
77314
77445
  if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
77315
77446
  return false;
77316
77447
  }
77317
- const appJsonPath = import_node_path94.default.join(projectRoot, "app.json");
77318
- const appJson = import_node_fs92.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs92.default.readFileSync(appJsonPath, "utf8")) : null;
77448
+ const appJsonPath = import_node_path95.default.join(projectRoot, "app.json");
77449
+ const appJson = import_node_fs93.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs93.default.readFileSync(appJsonPath, "utf8")) : null;
77319
77450
  const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
77320
77451
  (value) => isRecord(value) && typeof value.googleServicesFile === "string"
77321
77452
  ));
77322
77453
  return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
77323
- (name3) => import_node_fs92.default.existsSync(import_node_path94.default.join(projectRoot, name3))
77454
+ (name3) => import_node_fs93.default.existsSync(import_node_path95.default.join(projectRoot, name3))
77324
77455
  );
77325
77456
  }
77326
77457
  function expoConfigArgs(projectRoot, resultPath) {
@@ -77328,7 +77459,7 @@ function expoConfigArgs(projectRoot, resultPath) {
77328
77459
  "--input-type=commonjs",
77329
77460
  "-e",
77330
77461
  EXPO_CONFIG_SCRIPT,
77331
- import_node_path94.default.resolve(projectRoot),
77462
+ import_node_path95.default.resolve(projectRoot),
77332
77463
  resultPath
77333
77464
  ];
77334
77465
  }
@@ -77341,14 +77472,14 @@ function readExpoConfigResult(resultPath, status, signal, stderr) {
77341
77472
  throw new Error(
77342
77473
  stderr || (signal ? `Expo native configuration evaluation was killed by ${signal}.` : "Expo native configuration evaluation failed.")
77343
77474
  );
77344
- const resolved = JSON.parse(import_node_fs92.default.readFileSync(resultPath, "utf8"));
77475
+ const resolved = JSON.parse(import_node_fs93.default.readFileSync(resultPath, "utf8"));
77345
77476
  if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
77346
77477
  return resolved;
77347
77478
  }
77348
77479
  async function readExpoConfigAsync(projectRoot) {
77349
77480
  if (!hasExpoConfig(projectRoot)) return {};
77350
77481
  const directory2 = resultDirectory();
77351
- const resultPath = import_node_path94.default.join(directory2, "config.json");
77482
+ const resultPath = import_node_path95.default.join(directory2, "config.json");
77352
77483
  try {
77353
77484
  const child = (0, import_node_child_process47.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
77354
77485
  cwd: projectRoot,
@@ -77368,18 +77499,18 @@ async function readExpoConfigAsync(projectRoot) {
77368
77499
  );
77369
77500
  return readExpoConfigResult(resultPath, status, signal, stderr);
77370
77501
  } finally {
77371
- import_node_fs92.default.rmSync(directory2, { recursive: true, force: true });
77502
+ import_node_fs93.default.rmSync(directory2, { recursive: true, force: true });
77372
77503
  }
77373
77504
  }
77374
- var import_node_child_process47, import_node_fs92, import_node_module11, import_node_os20, import_node_path94, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
77505
+ var import_node_child_process47, import_node_fs93, import_node_module11, import_node_os20, import_node_path95, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
77375
77506
  var init_native_firebase_config = __esm({
77376
77507
  "src/native-firebase-config.ts"() {
77377
77508
  "use strict";
77378
77509
  import_node_child_process47 = require("node:child_process");
77379
- import_node_fs92 = __toESM(require("node:fs"), 1);
77510
+ import_node_fs93 = __toESM(require("node:fs"), 1);
77380
77511
  import_node_module11 = require("node:module");
77381
77512
  import_node_os20 = __toESM(require("node:os"), 1);
77382
- import_node_path94 = __toESM(require("node:path"), 1);
77513
+ import_node_path95 = __toESM(require("node:path"), 1);
77383
77514
  init_is_record();
77384
77515
  init_plist();
77385
77516
  init_xcode_project();
@@ -77400,7 +77531,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
77400
77531
  if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
77401
77532
  writeFileSync(process.argv[2], result, { mode: 0o600 });`;
77402
77533
  EXPO_CONFIG_TIMEOUT_MS = 3e4;
77403
- resultDirectory = () => import_node_fs92.default.mkdtempSync(import_node_path94.default.join(import_node_os20.default.tmpdir(), "peach-expo-config-"));
77534
+ resultDirectory = () => import_node_fs93.default.mkdtempSync(import_node_path95.default.join(import_node_os20.default.tmpdir(), "peach-expo-config-"));
77404
77535
  }
77405
77536
  });
77406
77537
 
@@ -77502,12 +77633,12 @@ var init_nitroContract = __esm({
77502
77633
  function hashPackageTree(root, options2) {
77503
77634
  const files2 = [];
77504
77635
  const walk4 = (directory2, relative3) => {
77505
- for (const entry of (0, import_node_fs93.readdirSync)(directory2, { withFileTypes: true }).sort(
77636
+ for (const entry of (0, import_node_fs94.readdirSync)(directory2, { withFileTypes: true }).sort(
77506
77637
  (a, b) => options2.compareNames(a.name, b.name)
77507
77638
  )) {
77508
77639
  if (entry.name === "node_modules") continue;
77509
77640
  const path121 = `${relative3}${entry.name}`;
77510
- if (entry.isDirectory()) walk4((0, import_node_path95.join)(directory2, entry.name), `${path121}/`);
77641
+ if (entry.isDirectory()) walk4((0, import_node_path96.join)(directory2, entry.name), `${path121}/`);
77511
77642
  else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path121);
77512
77643
  }
77513
77644
  };
@@ -77516,7 +77647,7 @@ function hashPackageTree(root, options2) {
77516
77647
  return (async () => {
77517
77648
  for (let start = 0; start < files2.length; start += READ_AHEAD) {
77518
77649
  const batch = files2.slice(start, start + READ_AHEAD);
77519
- const bytes = await Promise.all(batch.map((file) => (0, import_promises8.readFile)((0, import_node_path95.join)(root, file))));
77650
+ const bytes = await Promise.all(batch.map((file) => (0, import_promises8.readFile)((0, import_node_path96.join)(root, file))));
77520
77651
  batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
77521
77652
  }
77522
77653
  return hash.digest("hex");
@@ -77527,14 +77658,14 @@ function packageTreeDigest(root) {
77527
77658
  compareNames: (left, right) => left.localeCompare(right)
77528
77659
  });
77529
77660
  }
77530
- var import_node_crypto58, import_node_fs93, import_promises8, import_node_path95, READ_AHEAD;
77661
+ var import_node_crypto58, import_node_fs94, import_promises8, import_node_path96, READ_AHEAD;
77531
77662
  var init_package_tree_digest = __esm({
77532
77663
  "src/package-tree-digest.ts"() {
77533
77664
  "use strict";
77534
77665
  import_node_crypto58 = require("node:crypto");
77535
- import_node_fs93 = require("node:fs");
77666
+ import_node_fs94 = require("node:fs");
77536
77667
  import_promises8 = require("node:fs/promises");
77537
- import_node_path95 = require("node:path");
77668
+ import_node_path96 = require("node:path");
77538
77669
  READ_AHEAD = 64;
77539
77670
  }
77540
77671
  });
@@ -77560,16 +77691,16 @@ function packageRootOf(appRoot, file) {
77560
77691
  if (parts[0] !== "node_modules") return null;
77561
77692
  const at = parts.lastIndexOf("node_modules") + 1;
77562
77693
  const end = at + (parts[at]?.startsWith("@") ? 2 : 1);
77563
- return parts.length > end ? import_node_path96.default.join(appRoot, ...parts.slice(0, end)) : null;
77694
+ return parts.length > end ? import_node_path97.default.join(appRoot, ...parts.slice(0, end)) : null;
77564
77695
  }
77565
77696
  async function expoNativeInputs(appRoot) {
77566
- appRoot = import_node_fs94.default.realpathSync(appRoot);
77567
- if (findXcodeProject(import_node_path96.default.join(appRoot, "ios"))) return null;
77568
- const appRequire = (0, import_node_module12.createRequire)(import_node_path96.default.join(appRoot, "package.json"));
77697
+ appRoot = import_node_fs95.default.realpathSync(appRoot);
77698
+ if (findXcodeProject(import_node_path97.default.join(appRoot, "ios"))) return null;
77699
+ const appRequire = (0, import_node_module12.createRequire)(import_node_path97.default.join(appRoot, "package.json"));
77569
77700
  let fingerprintEntry;
77570
77701
  try {
77571
77702
  fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
77572
- paths: [import_node_path96.default.dirname(appRequire.resolve("expo/package.json"))]
77703
+ paths: [import_node_path97.default.dirname(appRequire.resolve("expo/package.json"))]
77573
77704
  });
77574
77705
  } catch {
77575
77706
  return null;
@@ -77595,7 +77726,7 @@ async function expoNativeInputs(appRoot) {
77595
77726
  const root = (source.type === "package" || source.type === "dir") && source.filePath ? packageRootOf(appRoot, source.filePath) : null;
77596
77727
  if (!root) continue;
77597
77728
  const manifest = JSON.parse(
77598
- import_node_fs94.default.readFileSync(import_node_path96.default.join(root, "package.json"), "utf8")
77729
+ import_node_fs95.default.readFileSync(import_node_path97.default.join(root, "package.json"), "utf8")
77599
77730
  );
77600
77731
  if (!isRecord(manifest) || typeof manifest.name !== "string")
77601
77732
  throw new Error(`${root}: package has no name`);
@@ -77603,7 +77734,7 @@ async function expoNativeInputs(appRoot) {
77603
77734
  }
77604
77735
  packages.set(
77605
77736
  "react-native",
77606
- import_node_path96.default.dirname(appRequire.resolve("react-native/package.json"))
77737
+ import_node_path97.default.dirname(appRequire.resolve("react-native/package.json"))
77607
77738
  );
77608
77739
  return {
77609
77740
  inputs: {
@@ -77664,7 +77795,7 @@ function readExpoNativeEntry(value) {
77664
77795
  };
77665
77796
  }
77666
77797
  async function answer(appRoot) {
77667
- if (findXcodeProject(import_node_path96.default.join(appRoot, "ios"))) return null;
77798
+ if (findXcodeProject(import_node_path97.default.join(appRoot, "ios"))) return null;
77668
77799
  const [source, config] = await Promise.all([
77669
77800
  hashExpoSourceWorkspace(appRoot),
77670
77801
  readExpoConfigAsync(appRoot)
@@ -77694,7 +77825,7 @@ async function lookup(appRoot) {
77694
77825
  }
77695
77826
  function prebuiltExpoNative(appRoot, iosTarget) {
77696
77827
  if (iosTarget !== void 0) return Promise.resolve(null);
77697
- const root = import_node_fs94.default.realpathSync(appRoot);
77828
+ const root = import_node_fs95.default.realpathSync(appRoot);
77698
77829
  let pending = lookups.get(root);
77699
77830
  if (!pending) {
77700
77831
  pending = answer(root).finally(() => lookups.delete(root));
@@ -77704,20 +77835,20 @@ function prebuiltExpoNative(appRoot, iosTarget) {
77704
77835
  }
77705
77836
  async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
77706
77837
  const prepared = await prepareExpoNativeProject(
77707
- import_node_fs94.default.realpathSync(appRoot),
77838
+ import_node_fs95.default.realpathSync(appRoot),
77708
77839
  signal,
77709
77840
  dependencies
77710
77841
  );
77711
- const ios = import_node_path96.default.join(prepared.app, "ios");
77712
- const projects2 = import_node_fs94.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcodeproj"));
77842
+ const ios = import_node_path97.default.join(prepared.app, "ios");
77843
+ const projects2 = import_node_fs95.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcodeproj"));
77713
77844
  if (projects2.length !== 1) throw new Error(`expected one Xcode project in ${ios}`);
77714
- return readXcodeAppTarget(import_node_path96.default.join(ios, projects2[0]), void 0, "Debug", {
77845
+ return readXcodeAppTarget(import_node_path97.default.join(ios, projects2[0]), void 0, "Debug", {
77715
77846
  requireSources: false
77716
77847
  });
77717
77848
  }
77718
77849
  function servedExpoSwift(appRoot, entry, app) {
77719
77850
  if (!entry.expoSwift) return null;
77720
- const rootId = `${(0, import_node_crypto59.createHash)("sha256").update(import_node_fs94.default.realpathSync(appRoot)).digest("hex")}/Expo`;
77851
+ const rootId = `${(0, import_node_crypto59.createHash)("sha256").update(import_node_fs95.default.realpathSync(appRoot)).digest("hex")}/Expo`;
77721
77852
  if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
77722
77853
  const installed = installedInfoPlist(app.infoPlist, entry.infoPlist);
77723
77854
  const infoPlist2 = Buffer.from(installed).toString("base64");
@@ -77745,14 +77876,14 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
77745
77876
  await prebuiltAppTarget(appRoot, signal, "installed")
77746
77877
  );
77747
77878
  }
77748
- var import_node_crypto59, import_node_fs94, import_node_module12, import_node_path96, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
77879
+ var import_node_crypto59, import_node_fs95, import_node_module12, import_node_path97, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
77749
77880
  var init_expo_native_prebuilt = __esm({
77750
77881
  "src/expo-native-prebuilt.ts"() {
77751
77882
  "use strict";
77752
77883
  import_node_crypto59 = require("node:crypto");
77753
- import_node_fs94 = __toESM(require("node:fs"), 1);
77884
+ import_node_fs95 = __toESM(require("node:fs"), 1);
77754
77885
  import_node_module12 = require("node:module");
77755
- import_node_path96 = __toESM(require("node:path"), 1);
77886
+ import_node_path97 = __toESM(require("node:path"), 1);
77756
77887
  import_node_util14 = require("node:util");
77757
77888
  init_answeredNativePackages();
77758
77889
  init_expo_native_compiler_digest();
@@ -77790,8 +77921,8 @@ var init_nativePreparationContract = __esm({
77790
77921
 
77791
77922
  // src/native-preparation.ts
77792
77923
  function ignoredChange(relative3) {
77793
- const parts = relative3.split(import_node_path97.default.sep);
77794
- return relative3 === import_node_path97.default.join(".git", "index") || parts.includes(".cache") || parts.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
77924
+ const parts = relative3.split(import_node_path98.default.sep);
77925
+ return relative3 === import_node_path98.default.join(".git", "index") || parts.includes(".cache") || parts.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
77795
77926
  relative3
77796
77927
  );
77797
77928
  }
@@ -77813,7 +77944,7 @@ function watchNativeInputs(root) {
77813
77944
  }
77814
77945
  const inputs2 = { expiry, revision: (0, import_node_crypto60.randomUUID)() };
77815
77946
  const watch = (directory2, recursive, name3) => {
77816
- const watcher = import_node_fs95.default.watch(
77947
+ const watcher = import_node_fs96.default.watch(
77817
77948
  directory2,
77818
77949
  { recursive, persistent: false },
77819
77950
  (_event, file) => {
@@ -77826,17 +77957,17 @@ function watchNativeInputs(root) {
77826
77957
  const scan3 = (directory2, watchRoot2) => {
77827
77958
  if (visited.has(directory2)) return;
77828
77959
  visited.add(directory2);
77829
- for (const entry of import_node_fs95.default.readdirSync(directory2, { withFileTypes: true })) {
77830
- const file = import_node_path97.default.join(directory2, entry.name);
77831
- if (ignoredChange(import_node_path97.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
77960
+ for (const entry of import_node_fs96.default.readdirSync(directory2, { withFileTypes: true })) {
77961
+ const file = import_node_path98.default.join(directory2, entry.name);
77962
+ if (ignoredChange(import_node_path98.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
77832
77963
  if (entry.isDirectory()) scan3(file, watchRoot2);
77833
77964
  if (!entry.isSymbolicLink()) continue;
77834
- const target = import_node_path97.default.resolve(directory2, import_node_fs95.default.readlinkSync(file));
77835
- if (target === workspace || target.startsWith(workspace + import_node_path97.default.sep)) continue;
77836
- const real = import_node_fs95.default.realpathSync(file);
77965
+ const target = import_node_path98.default.resolve(directory2, import_node_fs96.default.readlinkSync(file));
77966
+ if (target === workspace || target.startsWith(workspace + import_node_path98.default.sep)) continue;
77967
+ const real = import_node_fs96.default.realpathSync(file);
77837
77968
  if (visited.has(real)) continue;
77838
- watch(import_node_path97.default.dirname(real), false, import_node_path97.default.basename(real));
77839
- if (import_node_fs95.default.statSync(real).isDirectory()) {
77969
+ watch(import_node_path98.default.dirname(real), false, import_node_path98.default.basename(real));
77970
+ if (import_node_fs96.default.statSync(real).isDirectory()) {
77840
77971
  watch(real, true);
77841
77972
  scan3(real, real);
77842
77973
  } else visited.add(real);
@@ -77852,13 +77983,13 @@ function watchNativeInputs(root) {
77852
77983
  watchedInputs.set(workspace, inputs2);
77853
77984
  return inputs2;
77854
77985
  }
77855
- var import_node_crypto60, import_node_fs95, import_node_path97, import_node_timers, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
77986
+ var import_node_crypto60, import_node_fs96, import_node_path98, import_node_timers, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
77856
77987
  var init_native_preparation = __esm({
77857
77988
  "src/native-preparation.ts"() {
77858
77989
  "use strict";
77859
77990
  import_node_crypto60 = require("node:crypto");
77860
- import_node_fs95 = __toESM(require("node:fs"), 1);
77861
- import_node_path97 = __toESM(require("node:path"), 1);
77991
+ import_node_fs96 = __toESM(require("node:fs"), 1);
77992
+ import_node_path98 = __toESM(require("node:path"), 1);
77862
77993
  import_node_timers = require("node:timers");
77863
77994
  init_nativePreparationContract();
77864
77995
  init_runtime_assets();
@@ -77922,87 +78053,6 @@ var init_native_preparation = __esm({
77922
78053
  }
77923
78054
  });
77924
78055
 
77925
- // src/swift-xcframework.ts
77926
- function simulatorNativeLibrary(dir) {
77927
- if (dir.endsWith(".framework")) {
77928
- const name3 = import_node_path98.default.basename(dir, ".framework");
77929
- return { name: name3, file: import_node_path98.default.join(dir, name3), kind: "framework" };
77930
- }
77931
- if (!dir.endsWith(".xcframework")) return null;
77932
- const info = parsePlistBytes(import_node_fs96.default.readFileSync(import_node_path98.default.join(dir, "Info.plist")));
77933
- if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
77934
- throw new Error(`${dir}: invalid XCFramework library declarations`);
77935
- const matches = [];
77936
- for (const entry of info.AvailableLibraries) {
77937
- if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
77938
- if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
77939
- continue;
77940
- if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
77941
- throw new Error(`${dir}: invalid simulator library paths`);
77942
- const archive = /\.a$/.test(entry.LibraryPath);
77943
- const framework = /\.framework$/.test(entry.LibraryPath);
77944
- if (!archive && !framework) continue;
77945
- const bundle = import_node_path98.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
77946
- const bundleRelative = import_node_path98.default.relative(dir, bundle);
77947
- if (bundleRelative.startsWith("..") || import_node_path98.default.isAbsolute(bundleRelative))
77948
- throw new Error(`${dir}: library escapes its XCFramework`);
77949
- let name3 = entry.LibraryPath;
77950
- let file = bundle;
77951
- if (framework) {
77952
- name3 = import_node_path98.default.basename(bundle, ".framework");
77953
- file = import_node_path98.default.join(bundle, name3);
77954
- }
77955
- const relative3 = import_node_path98.default.relative(dir, file);
77956
- if (relative3.startsWith("..") || import_node_path98.default.isAbsolute(relative3))
77957
- throw new Error(`${dir}: library escapes its XCFramework`);
77958
- if (framework) {
77959
- matches.push({ name: name3, file, kind: "framework" });
77960
- continue;
77961
- }
77962
- const slice = import_node_path98.default.resolve(dir, entry.LibraryIdentifier);
77963
- const headers = typeof entry.HeadersPath === "string" ? import_node_path98.default.resolve(slice, entry.HeadersPath) : void 0;
77964
- if (headers && relativeInside(slice, headers) === null)
77965
- throw new Error(`${dir}: headers escape their XCFramework slice`);
77966
- matches.push({ name: name3, file, kind: "archive", headers });
77967
- }
77968
- if (matches.length === 0) return null;
77969
- if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
77970
- return matches[0];
77971
- }
77972
- function isDynamicLibrary2(file) {
77973
- const fd = import_node_fs96.default.openSync(file, "r");
77974
- try {
77975
- const read = (offset) => {
77976
- const bytes = Buffer.alloc(16);
77977
- import_node_fs96.default.readSync(fd, bytes, 0, 16, offset);
77978
- return bytes;
77979
- };
77980
- let header = read(0);
77981
- const universal = header.readUInt32BE(0);
77982
- if (universal === 3405691582 || universal === 3405691583) {
77983
- const arch = read(8);
77984
- header = read(
77985
- universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
77986
- );
77987
- }
77988
- const magic = header.readUInt32LE(0);
77989
- return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
77990
- } finally {
77991
- import_node_fs96.default.closeSync(fd);
77992
- }
77993
- }
77994
- var import_node_fs96, import_node_path98;
77995
- var init_swift_xcframework = __esm({
77996
- "src/swift-xcframework.ts"() {
77997
- "use strict";
77998
- import_node_fs96 = __toESM(require("node:fs"), 1);
77999
- import_node_path98 = __toESM(require("node:path"), 1);
78000
- init_is_record();
78001
- init_plist_bytes();
78002
- init_swift_source_file();
78003
- }
78004
- });
78005
-
78006
78056
  // src/native-static-libraries.ts
78007
78057
  function nonmodularFrameworkLibraries(directories, moduleRoot) {
78008
78058
  return [
@@ -96714,7 +96764,7 @@ var init_installed_native_libraries = __esm({
96714
96764
  // src/turbo-codegen-intake.ts
96715
96765
  function installedRendererDependencyGlobs(reactNativeRoot, appRoot) {
96716
96766
  return Object.fromEntries(
96717
- ["RCT-Folly", "DoubleConversion", "fmt"].map((name3) => {
96767
+ RENDERER_DEPENDENCY_PODS.map((name3) => {
96718
96768
  const spec = loadPodspec(
96719
96769
  import_node_path122.default.join(reactNativeRoot, "third-party-podspecs", `${name3}.podspec`),
96720
96770
  appRoot
@@ -96832,7 +96882,7 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
96832
96882
  files: hashTree(generatedRoot)
96833
96883
  };
96834
96884
  }
96835
- var import_node_child_process62, import_node_crypto74, import_node_fs120, import_node_module15, import_node_path122, import_node_util16, run10, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
96885
+ var import_node_child_process62, import_node_crypto74, import_node_fs120, import_node_module15, import_node_path122, import_node_util16, run10, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
96836
96886
  var init_turbo_codegen_intake = __esm({
96837
96887
  "src/turbo-codegen-intake.ts"() {
96838
96888
  "use strict";
@@ -96847,6 +96897,7 @@ var init_turbo_codegen_intake = __esm({
96847
96897
  init_nitro_source();
96848
96898
  init_podspec_sources();
96849
96899
  run10 = (0, import_node_util16.promisify)(import_node_child_process62.execFile);
96900
+ RENDERER_DEPENDENCY_PODS = ["RCT-Folly", "DoubleConversion", "fmt"];
96850
96901
  RENDERER_PODS = /* @__PURE__ */ new Set([
96851
96902
  "React-Fabric",
96852
96903
  "React-FabricComponents",
@@ -102465,7 +102516,7 @@ var init_react_native_core = __esm({
102465
102516
  init_swift_distribution();
102466
102517
  init_swift_package();
102467
102518
  init_swiftContract();
102468
- recipe = true ? "d54320ef52f1a201f825b780998684f9460a3c75c115b7dadf4789e14ec7f639" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
102519
+ recipe = true ? "db2c81d6628055a561c22667b098e4686f9d8924ffb229c4c7d9e15a25182502" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
102469
102520
  strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
102470
102521
  building = /* @__PURE__ */ new Map();
102471
102522
  }
@@ -103044,6 +103095,8 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
103044
103095
  return originals.some((file) => import_node_fs126.default.realpathSync(file).startsWith(reactNativeRoot)) ? [target.name] : [];
103045
103096
  })
103046
103097
  );
103098
+ for (const name3 of RENDERER_DEPENDENCY_PODS)
103099
+ if (targetByName.has(name3)) reactTargets.add(name3);
103047
103100
  for (const [file, source] of Object.entries(installed.sourcePaths)) {
103048
103101
  if (!file.endsWith(".swift") || !import_node_fs126.default.realpathSync(source).startsWith(reactNativeRoot))
103049
103102
  continue;
@@ -104800,8 +104853,8 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
104800
104853
  return prepared;
104801
104854
  }
104802
104855
  }
104803
- const link = async (linked2) => {
104804
- const packagePath = expoSwiftPackage(key2, "linked-app");
104856
+ const link = async (linked2, name3 = "linked-app") => {
104857
+ const packagePath = expoSwiftPackage(key2, name3);
104805
104858
  preparePackage2(linked2, packagePath);
104806
104859
  signal.throwIfAborted();
104807
104860
  const stamp = sourceContentStamp(packagePath, module2.root);
@@ -104859,35 +104912,24 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
104859
104912
  error instanceof SwiftMissingModulesError ? [...message.matchAll(/^ (\S+)/gm)].map((match) => match[1]) : []
104860
104913
  );
104861
104914
  return pool.filter(
104862
- (unit2) => [...Object.keys(unit2.files), ...expoUnitAppPaths(unit2)].some(
104915
+ (unit2) => [
104916
+ ...Object.keys(unit2.files),
104917
+ ...expoUnitAppPaths(unit2),
104918
+ ...(unit2.nativeTargets ?? []).flatMap(
104919
+ (native) => [native.bridgingHeader, native.prefixHeader].filter(
104920
+ (file) => file !== null
104921
+ )
104922
+ )
104923
+ ].some(
104863
104924
  (name3) => nativeCopies.includes(name3) || errorFiles.some((file) => file === name3 || file.endsWith(`/${name3}`))
104864
104925
  ) || Object.values(unit2.files).some(
104865
104926
  (source) => swiftImportNames(source).some((name3) => missing.has(name3))
104866
104927
  )
104867
104928
  );
104868
104929
  };
104869
- let checked = candidates;
104870
104930
  linked = [];
104871
- let rest = candidates;
104872
- let failure2 = linkError;
104873
- for (; ; ) {
104874
- const named = namedBy(failure2, rest);
104875
- if (named.length === 0 || named.length === rest.length) break;
104876
- rest = rest.filter((unit2) => !named.includes(unit2));
104877
- report(`linking ${rest.length} namespaces the diagnostic does not name`);
104878
- try {
104879
- artifact = await link(rest);
104880
- linked = rest;
104881
- checked = candidates.filter((unit2) => !rest.includes(unit2));
104882
- break;
104883
- } catch (error) {
104884
- signal.throwIfAborted();
104885
- if (error instanceof ExpoSwiftLinkRefusal) throw error;
104886
- failure2 = error;
104887
- }
104888
- }
104889
- const linkedWithoutChecks = linked.length;
104890
- for (const unit2 of checked) {
104931
+ let isolatedArtifact;
104932
+ const check2 = async (unit2) => {
104891
104933
  signal.throwIfAborted();
104892
104934
  const packagePath = expoSwiftPackage(key2, unit2.moduleId);
104893
104935
  preparePackage2([unit2], packagePath);
@@ -104937,9 +104979,43 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
104937
104979
  unitErrors.length ? unitErrors.join("\n") : diagnostic
104938
104980
  );
104939
104981
  }
104940
- }
104982
+ };
104983
+ const isolate = async (group, failure2) => {
104984
+ const named = namedBy(failure2, group);
104985
+ if (group !== candidates)
104986
+ report(
104987
+ `${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"}`
104988
+ );
104989
+ const half = Math.ceil(group.length / 2);
104990
+ const parts = named.length > 0 && named.length < group.length ? [
104991
+ ...named.map((unit2) => [unit2]),
104992
+ group.filter((unit2) => !named.includes(unit2))
104993
+ ] : [group.slice(0, half), group.slice(half)];
104994
+ for (const part of parts) {
104995
+ signal.throwIfAborted();
104996
+ if (part.length === 0) continue;
104997
+ if (part.length === 1) {
104998
+ await check2(part[0]);
104999
+ continue;
105000
+ }
105001
+ const name3 = (0, import_node_crypto79.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
105002
+ report(`linking ${part.length} namespaces to isolate failures`);
105003
+ try {
105004
+ const built2 = await link(part, `isolate-${name3}`);
105005
+ linked.push(...part);
105006
+ isolatedArtifact = { units: part, artifact: built2 };
105007
+ } catch (error) {
105008
+ signal.throwIfAborted();
105009
+ if (error instanceof ExpoSwiftLinkRefusal) throw error;
105010
+ await isolate(part, error);
105011
+ }
105012
+ }
105013
+ };
105014
+ await isolate(candidates, linkError);
104941
105015
  if (linked.length === candidates.length) throw linkError;
104942
- if (linked.length > linkedWithoutChecks) {
105016
+ if (isolatedArtifact?.units.length === linked.length)
105017
+ artifact = isolatedArtifact.artifact;
105018
+ else if (linked.length) {
104943
105019
  try {
104944
105020
  artifact = await link(linked);
104945
105021
  } catch (error) {
@@ -105036,6 +105112,7 @@ var init_expo_swift_host = __esm({
105036
105112
  init_swift_standins();
105037
105113
  init_swift_submit();
105038
105114
  init_swift_toolchain();
105115
+ init_turbo_codegen_intake();
105039
105116
  init_turbo_source();
105040
105117
  run11 = (0, import_node_util18.promisify)(import_node_child_process65.execFile);
105041
105118
  scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
@@ -105198,7 +105275,7 @@ var init_nitro_superset = __esm({
105198
105275
  init_nitroContract();
105199
105276
  init_swift_standin_digest();
105200
105277
  NITRO_SUPERSET_ENTRY_NAME = "superset";
105201
- NITRO_COMPILER_DIGEST = true ? "36fce173b160477b6b449e37c6203973648c41456da0875f9b607c4f4ca2dc64" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
105278
+ NITRO_COMPILER_DIGEST = true ? "744976c15724422db8f3bc8d1fdfdcf68c3f91b185210a50951930d2ea18c38e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
105202
105279
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
105203
105280
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
105204
105281
  published2 = /* @__PURE__ */ new Map();