peachsim 0.1.1716 → 0.1.1738

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 (282) hide show
  1. package/README.md +21 -3
  2. package/cli/app-bundle-resources.ts +2 -1
  3. package/cli/app-fonts.ts +4 -4
  4. package/cli/app-splash.ts +4 -4
  5. package/cli/app-stubs.ts +17 -0
  6. package/cli/command-registry.ts +1 -0
  7. package/cli/commands/control.ts +83 -822
  8. package/cli/commands/coverage-swift.ts +112 -4
  9. package/cli/commands/daemon.ts +8 -0
  10. package/cli/commands/detox.ts +3 -0
  11. package/cli/commands/doctor.ts +19 -2
  12. package/cli/commands/inspect/actions.ts +74 -14
  13. package/cli/commands/inspect/core.ts +5 -1
  14. package/cli/commands/inspect/settling.ts +5 -2
  15. package/cli/commands/inspect/wait-ready.ts +6 -0
  16. package/cli/commands/inspect.ts +48 -45
  17. package/cli/commands/kotlin.ts +12 -2
  18. package/cli/commands/package.ts +760 -0
  19. package/cli/commands/serve.ts +6 -0
  20. package/cli/commands/shell-url.ts +838 -0
  21. package/cli/commands/swift.ts +42 -102
  22. package/cli/commands/test.ts +20 -0
  23. package/cli/commands/upload.ts +1 -1
  24. package/cli/device-option.ts +1 -1
  25. package/cli/main.ts +13 -1
  26. package/cli/native-input.ts +199 -0
  27. package/cli/outbound-endpoints.ts +26 -1
  28. package/cli/packaged-app-launcher.ts +95 -0
  29. package/cli/scene-video.ts +36 -12
  30. package/detox/index.ts +196 -24
  31. package/dist-lib/agent-daemon-client.cjs +1 -1
  32. package/dist-lib/agent-events.cjs +1 -1
  33. package/dist-lib/attached-projects.cjs +5 -2
  34. package/dist-lib/auth/shared-session.cjs +5 -2
  35. package/dist-lib/backend-origin.cjs +1 -1
  36. package/dist-lib/beta.cjs +1 -1
  37. package/dist-lib/beta.mjs +1 -1
  38. package/dist-lib/bridge-constants.cjs +1 -1
  39. package/dist-lib/bridge-contract-input.cjs +1 -1
  40. package/dist-lib/bridge-contract-input.mjs +1 -1
  41. package/dist-lib/bridge-contract.cjs +1 -1
  42. package/dist-lib/bridge-contract.mjs +1 -1
  43. package/dist-lib/bundle-channel.cjs +39889 -31873
  44. package/dist-lib/capture-contract.cjs +1 -1
  45. package/dist-lib/capture-contract.mjs +1 -1
  46. package/dist-lib/cloud-contract.cjs +1 -1
  47. package/dist-lib/cloud-contract.mjs +1 -1
  48. package/dist-lib/cloud-test-args.cjs +1 -1
  49. package/dist-lib/cloud-test-args.mjs +1 -1
  50. package/dist-lib/cloud.cjs +1 -1
  51. package/dist-lib/cloud.mjs +1 -1
  52. package/dist-lib/config.cjs +1 -1
  53. package/dist-lib/config.mjs +1 -1
  54. package/dist-lib/detox/index.cjs +195 -63
  55. package/dist-lib/dev-bundle-resolution.cjs +14 -13
  56. package/dist-lib/expo-swift-bundle.cjs +18507 -11835
  57. package/dist-lib/expo-swift-metadata.cjs +4 -1
  58. package/dist-lib/expo-swift-metadata.mjs +3 -1
  59. package/dist-lib/home-paths.cjs +27 -3
  60. package/dist-lib/host/bridge-host.cjs +28373 -24090
  61. package/dist-lib/host/fetch-proxy-handler.cjs +235 -225
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  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 +915 -399
  67. package/dist-lib/jump-to-source-babel.cjs +1 -1
  68. package/dist-lib/jump-to-source-native.cjs +1 -1
  69. package/dist-lib/kotlin-host.cjs +335 -47
  70. package/dist-lib/menu.cjs +13 -1
  71. package/dist-lib/menu.mjs +13 -1
  72. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  73. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  74. package/dist-lib/metro-production-bundle.cjs +1 -1
  75. package/dist-lib/metro-production-bundle.mjs +1 -1
  76. package/dist-lib/metro.cjs +918 -411
  77. package/dist-lib/native-app-identity-project.cjs +703 -283
  78. package/dist-lib/native-app-identity-project.mjs +500 -87
  79. package/dist-lib/native-app-identity.cjs +13 -2
  80. package/dist-lib/native-app-identity.mjs +13 -2
  81. package/dist-lib/native-firebase-metadata.cjs +1 -1
  82. package/dist-lib/native-firebase-metadata.mjs +1 -1
  83. package/dist-lib/plist.cjs +1 -1
  84. package/dist-lib/plist.mjs +1 -1
  85. package/dist-lib/profiles.cjs +5 -2
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +28 -23
  88. package/dist-lib/public-origins-lib.json +418 -224
  89. package/dist-lib/react-native-host-modules.cjs +35 -2
  90. package/dist-lib/react-native-host-modules.mjs +35 -2
  91. package/dist-lib/reap-browser.cjs +12 -4
  92. package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
  93. package/dist-lib/sdk.cjs +17 -7
  94. package/dist-lib/sdk.mjs +16 -7
  95. package/dist-lib/skills.cjs +44825 -29141
  96. package/dist-lib/swift-compile.cjs +616 -400
  97. package/dist-lib/swift-compile.mjs +528 -315
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +1 -1
  100. package/dist-lib/swift-submit.cjs +2 -2
  101. package/dist-lib/swift-submit.mjs +2 -2
  102. package/dist-lib/swift-toolchain.cjs +105 -17
  103. package/dist-lib/swift.cjs +1 -1
  104. package/dist-lib/vite-swift.cjs +4660 -2252
  105. package/dist-lib/vite.cjs +248 -234
  106. package/dist-lib/worklet-executable.cjs +1 -1
  107. package/dist-lib/worklet-executable.mjs +1 -1
  108. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
  109. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
  110. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  111. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +9 -6
  112. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  113. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +11 -1
  114. package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -12
  115. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  116. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
  117. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  118. package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
  119. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  120. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
  121. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  122. package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
  123. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
  124. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
  126. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +36 -2
  127. package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
  128. package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
  129. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  130. package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
  131. package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
  132. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
  133. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  134. package/kotlin/README.md +3 -0
  135. package/kotlin/sdk.tar.gz +0 -0
  136. package/package.json +1 -1
  137. package/runtime-companion.json +1 -1
  138. package/scripts/dev-server-scanner.ts +12 -25
  139. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  140. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  141. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  142. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  143. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  144. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  145. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  146. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  147. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
  148. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
  149. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
  150. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
  151. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
  152. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
  153. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
  154. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
  155. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
  156. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
  157. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -1
  158. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
  159. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
  160. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
  161. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +711 -46
  162. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
  163. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
  164. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
  165. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
  166. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
  167. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
  168. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
  169. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
  170. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
  171. package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
  172. package/sdk/ios/usr/include/module.modulemap +1 -0
  173. package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
  174. package/sdk/ios/usr/include/os/signpost.h +414 -0
  175. package/sdk/ios/usr/include/os.modulemap +10 -0
  176. package/sdk/ios/usr/include/sys/cdefs.h +5 -0
  177. package/sdk/ios/usr/include/sys/ioccom.h +99 -0
  178. package/sdk/ios/usr/include/sys/syslog.h +236 -0
  179. package/sdk/ios/usr/include/syslog.h +24 -0
  180. package/sdk/ios/wasm/include/errno.h +4 -20
  181. package/sdk/ios/wasm/include/fcntl.h +4 -2
  182. package/sdk/ios/wasm/include/pthread.h +3 -0
  183. package/sdk/ios/wasm/include/setjmp.h +57 -0
  184. package/sdk/ios/wasm/include/stdio.h +24 -0
  185. package/sdk/ios/wasm/include/stdlib.h +32 -7
  186. package/sdk/ios/wasm/include/sys/file.h +7 -0
  187. package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
  188. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  189. package/sdk/ios/wasm/include/sys/syscall.h +9 -0
  190. package/sdk/ios/wasm/include/sys/time.h +10 -0
  191. package/sdk/ios/wasm/include/unistd.h +12 -3
  192. package/sdk/native-hashes.json +4 -3
  193. package/skills/contrast/SKILL.md +2 -1
  194. package/skills/peach-debug/SKILL.md +0 -1
  195. package/skills/peach-perf/SKILL.md +0 -1
  196. package/skills/peach-setup/SKILL.md +0 -1
  197. package/skills/peach-test/SKILL.md +7 -4
  198. package/skills/peach-visual/SKILL.md +0 -1
  199. package/src/admitted-mac-build.ts +3 -0
  200. package/src/android-app-identity.ts +18 -0
  201. package/src/android-autolinking.ts +1 -0
  202. package/src/android-bridge-packages.ts +279 -0
  203. package/src/android-root-module.ts +9 -9
  204. package/src/appPackageContract.ts +83 -0
  205. package/src/bridge-contract.ts +50 -0
  206. package/src/bundle-channel.mjs +41 -6
  207. package/src/cli-runtime.ts +9 -5
  208. package/src/dev-bundle-resolution.ts +7 -27
  209. package/src/dom-source-reference.ts +15 -0
  210. package/src/expo-discovery-cache.ts +134 -26
  211. package/src/expo-kotlin-host.ts +97 -26
  212. package/src/expo-manifest-body.ts +33 -0
  213. package/src/expo-native-workspace.ts +158 -38
  214. package/src/expo-swift-host.ts +350 -75
  215. package/src/expo-swift-ready.ts +5 -1
  216. package/src/expoKotlinContract.ts +12 -2
  217. package/src/expoSwiftContract.ts +10 -0
  218. package/src/generated/swift-c-predefines.json +1 -1
  219. package/src/home-paths.ts +41 -2
  220. package/src/host/app-package-handler.ts +47 -0
  221. package/src/host/bridge-host.ts +8 -0
  222. package/src/host/fetch-proxy-handler.ts +10 -0
  223. package/src/host/staged-host-files.ts +18 -0
  224. package/src/index.ts +3 -0
  225. package/src/kotlin-host.ts +225 -48
  226. package/src/kotlin-instance-source.ts +126 -0
  227. package/src/kotlinSdkContract.ts +2 -1
  228. package/src/menu.ts +14 -0
  229. package/src/native-app-identity-project.ts +7 -2
  230. package/src/native-app-identity.ts +11 -0
  231. package/src/native-firebase-config.ts +24 -1
  232. package/src/native-prebuilt.ts +154 -0
  233. package/src/nitro-adapter.lock.json +270 -270
  234. package/src/nitro-adapter.ts +56 -50
  235. package/src/nitro-bundle.ts +92 -74
  236. package/src/nitro-compile.ts +45 -14
  237. package/src/nitro-dependencies.ts +63 -46
  238. package/src/nitro-source.ts +64 -26
  239. package/src/nitroAdapterContract.ts +146 -98
  240. package/src/nitroContract.ts +71 -21
  241. package/src/react-native-bridge-modules.ts +70 -42
  242. package/src/react-native-host-modules.ts +34 -1
  243. package/src/reactNativeConfigurationContract.ts +14 -0
  244. package/src/reap-browser.ts +15 -3
  245. package/src/sdk.ts +5 -0
  246. package/src/settingsContract.ts +38 -1
  247. package/src/sim-client.ts +4 -1
  248. package/src/storageSnapshotContract.ts +32 -81
  249. package/src/swift-compile.ts +268 -89
  250. package/src/swift-coverage/indexdump.ts +22 -6
  251. package/src/swift-coverage/indexing.ts +4 -4
  252. package/src/swift-coverage/provenance.ts +1 -0
  253. package/src/swift-coverage/sdk.ts +104 -20
  254. package/src/swift-coverage/types.ts +34 -0
  255. package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
  256. package/src/swift-coverage/xcode-assets.ts +89 -131
  257. package/src/swift-coverage/xcode.ts +10 -2
  258. package/src/swift-cxx-reachable.ts +2 -1
  259. package/src/swift-distribution.lock.json +20 -16
  260. package/src/swift-host.ts +98 -22
  261. package/src/swift-icu.ts +1 -1
  262. package/src/swift-link-roots.ts +118 -0
  263. package/src/swift-objc-compile.ts +144 -22
  264. package/src/swift-objc-import.ts +6 -0
  265. package/src/swift-objc-standin.ts +2 -14
  266. package/src/swift-package-manifest.ts +14 -6
  267. package/src/swift-packages.ts +75 -11
  268. package/src/swift-pdf-raster.ts +1 -0
  269. package/src/swift-root-lock.ts +17 -1
  270. package/src/swift-source-pods.ts +2 -10
  271. package/src/swift-standin-emit.ts +597 -57
  272. package/src/swift-standins.ts +599 -56
  273. package/src/swift-submit.ts +7 -1
  274. package/src/swift-toolchain.ts +140 -17
  275. package/src/turbo-bundle.ts +81 -0
  276. package/src/turbo-codegen-intake.ts +91 -0
  277. package/src/turbo-compile.ts +120 -0
  278. package/src/turbo-runtime.lock.json +69 -0
  279. package/src/turbo-source.ts +754 -0
  280. package/src/vite-plugin-one.ts +17 -12
  281. package/src/vite-plugin.ts +28 -15
  282. package/src/xcode-project.ts +223 -22
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1716 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1738 | (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;
@@ -36,8 +36,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
 
38
38
  // <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
39
+ var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
39
40
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
40
41
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
42
+ define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "cc658cd5e5521e0d5cadf569f4f271523bee9d710d723479b30487a9e989757f", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "fd93887e807533ae1537c979faba3c7659e84654e8c197180ee48d27bd107612", "swift-coverage/xcode-assets.ts": "f674c68408df22bff2ac80c89467b6cf4018c7e4ada6f2408d7b5f98ee83289d", "swift-coverage/xcode-asset-symbols.ts": "b94c5836f6f11c400c93b931ed0a980b8067d84a5f7a1ee75f24d6bdbf46013d", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "b112ed694771c1df8d9f4dd86691ee83fc9302f05690fae9a5151d0623191b0b", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "d9170f454c21b88b10902e601998b42179b94a8a2018f51f92f9ddafdfcfd8f6", "swift-package.ts": "36c0beef4686796e700a479135c58b1680dc30f73e2b6107891898aa46db33b0", "swift-source-file.ts": "7653751b3edfd63479f733427b6767847de0cd2267715c14dc18d6e5233c3a91", "swift-toolchain.ts": "0e3911c0f285dff280b13730b765eac0423bd026d50d93994366d296ebb3386a", "home-paths.ts": "662171633e6d98202269b7f1f5e99ae15eedb8f1ac15254f5e47a1c5337cf308", "xcode-header-search.ts": "1cfadaf2b1b29fbd72899716fc2469b6b6ca39d6c2b61fee9927fb28668967c5", "xcode-project.ts": "64d7996165ac049f4baa8b04242d4550639c9c5de7d12f61ad0d05f58857d39d", "xcode-target-members.ts": "94e7daaf57b351aa716b2c49e39c5dec8db5377d938a4f16f2d88d9099813c35", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
41
43
  }
42
44
  });
43
45
 
@@ -762,7 +764,7 @@ var init_node_http_fetch = __esm({
762
764
  var runtime_companion_default;
763
765
  var init_runtime_companion = __esm({
764
766
  "runtime-companion.json"() {
765
- runtime_companion_default = { abi: 1, sha256: "a0dede25c849ecabd639fbb0a0c4edd8e62a34bf12090932dba19832f2369659", file: "node/cli-a0dede25c849ecabd639fbb0a0c4edd8e62a34bf12090932dba19832f2369659.cjs" };
767
+ runtime_companion_default = { abi: 1, sha256: "65f18da220835917c493afae338016e2e9c092419e67b12eb3fb00e389637557", file: "node/cli-65f18da220835917c493afae338016e2e9c092419e67b12eb3fb00e389637557.cjs" };
766
768
  }
767
769
  });
768
770
 
@@ -795,10 +797,13 @@ var init_src = __esm({
795
797
  });
796
798
 
797
799
  // src/home-paths.ts
800
+ function ambientHomeDir() {
801
+ return import_node_path7.default.join((0, import_node_os2.homedir)(), ".peach");
802
+ }
798
803
  function rnxHomeDir() {
799
804
  const override = process.env[PEACH_HOME_ENV];
800
805
  if (override && override.length > 0) return import_node_path7.default.resolve(override);
801
- return import_node_path7.default.join((0, import_node_os2.homedir)(), ".peach");
806
+ return ambientHomeDir();
802
807
  }
803
808
  function runtimesDir() {
804
809
  return import_node_path7.default.join(rnxHomeDir(), "runtimes");
@@ -812,8 +817,16 @@ function activeRuntimeFile() {
812
817
  function cacheDir() {
813
818
  return import_node_path7.default.join(rnxHomeDir(), "cache");
814
819
  }
820
+ function buildersRootEnv() {
821
+ const root = process.env[BUILDERS_ROOT_ENV]?.trim();
822
+ return root ? root : null;
823
+ }
824
+ function swiftCacheDir() {
825
+ const root = buildersRootEnv();
826
+ return root ? import_node_path7.default.join(root, "peach-cache") : cacheDir();
827
+ }
815
828
  function swiftPackageCacheOptions() {
816
- const root = import_node_path7.default.join(cacheDir(), "swiftpm");
829
+ const root = import_node_path7.default.join(swiftCacheDir(), "swiftpm");
817
830
  return ["cache", "config", "security"].flatMap((name2) => [
818
831
  `--${name2}-path`,
819
832
  import_node_path7.default.join(root, name2)
@@ -827,7 +840,7 @@ function readActiveRuntime() {
827
840
  return null;
828
841
  }
829
842
  }
830
- var import_node_fs7, import_node_os2, import_node_path7, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE_MAX_BYTES;
843
+ var import_node_fs7, import_node_os2, import_node_path7, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, BUILDERS_ROOT_ENV, DAEMON_LOCKFILE_MAX_BYTES;
831
844
  var init_home_paths = __esm({
832
845
  "src/home-paths.ts"() {
833
846
  "use strict";
@@ -837,6 +850,7 @@ var init_home_paths = __esm({
837
850
  import_node_path7 = __toESM(require("node:path"), 1);
838
851
  PEACH_HOME_ENV = "PEACH_HOME";
839
852
  ACTIVE_RUNTIME_FILE = "active";
853
+ BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
840
854
  DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
841
855
  }
842
856
  });
@@ -1081,7 +1095,8 @@ function verifyCliCompanion(root) {
1081
1095
  }
1082
1096
  function getCliRuntime() {
1083
1097
  if (loaded) return loaded.runtime;
1084
- const root = resolveDevCheckoutRuntimeAssetRoot() ?? resolveActiveRuntimeRoot();
1098
+ const monorepoRoot = findMonorepoRoot();
1099
+ const root = monorepoRoot ? (0, import_node_path8.join)(monorepoRoot, "public/sootsim") : resolveActiveRuntimeRoot();
1085
1100
  if (!root) throw new Error("No Peach runtime installed; run `peach runtime install`");
1086
1101
  verifyCliCompanion(root);
1087
1102
  const require2 = (0, import_node_module2.createRequire)(__sootsim_import_meta_url);
@@ -2754,22 +2769,22 @@ var init_kotlin_toolchain = __esm({
2754
2769
 
2755
2770
  // src/swift-source-file.ts
2756
2771
  function relativeInside(root, file) {
2757
- const relative3 = import_node_path16.default.relative(root, file);
2758
- return relative3 === ".." || relative3.startsWith(`..${import_node_path16.default.sep}`) || import_node_path16.default.isAbsolute(relative3) ? null : relative3;
2772
+ const relative3 = import_node_path17.default.relative(root, file);
2773
+ return relative3 === ".." || relative3.startsWith(`..${import_node_path17.default.sep}`) || import_node_path17.default.isAbsolute(relative3) ? null : relative3;
2759
2774
  }
2760
2775
  function packageInputPath(canonicalRoot, file) {
2761
- const canonicalFile = import_node_fs15.default.realpathSync(file);
2776
+ const canonicalFile = import_node_fs16.default.realpathSync(file);
2762
2777
  if (relativeInside(canonicalRoot, canonicalFile) === null) {
2763
2778
  throw new Error(`swift input escapes the selected package: ${file}`);
2764
2779
  }
2765
2780
  return canonicalFile;
2766
2781
  }
2767
2782
  function readPackageFile(root, file, maxBytes) {
2768
- const canonicalFile = packageInputPath(import_node_fs15.default.realpathSync(root), file);
2769
- const expected = import_node_fs15.default.statSync(canonicalFile);
2770
- const fd = import_node_fs15.default.openSync(canonicalFile, import_node_fs15.default.constants.O_RDONLY | import_node_fs15.default.constants.O_NOFOLLOW);
2783
+ const canonicalFile = packageInputPath(import_node_fs16.default.realpathSync(root), file);
2784
+ const expected = import_node_fs16.default.statSync(canonicalFile);
2785
+ const fd = import_node_fs16.default.openSync(canonicalFile, import_node_fs16.default.constants.O_RDONLY | import_node_fs16.default.constants.O_NOFOLLOW);
2771
2786
  try {
2772
- const stat = import_node_fs15.default.fstatSync(fd);
2787
+ const stat = import_node_fs16.default.fstatSync(fd);
2773
2788
  if (stat.dev !== expected.dev || stat.ino !== expected.ino) {
2774
2789
  throw new Error(`swift input changed while opening: ${file}`);
2775
2790
  }
@@ -2779,25 +2794,25 @@ function readPackageFile(root, file, maxBytes) {
2779
2794
  const bytes = Buffer.alloc(stat.size + 1);
2780
2795
  let offset = 0;
2781
2796
  while (offset < bytes.length) {
2782
- const count = import_node_fs15.default.readSync(fd, bytes, offset, bytes.length - offset, null);
2797
+ const count = import_node_fs16.default.readSync(fd, bytes, offset, bytes.length - offset, null);
2783
2798
  if (count === 0) break;
2784
2799
  offset += count;
2785
2800
  }
2786
- if (offset !== stat.size || import_node_fs15.default.fstatSync(fd).size !== stat.size) {
2801
+ if (offset !== stat.size || import_node_fs16.default.fstatSync(fd).size !== stat.size) {
2787
2802
  throw new Error(`swift input changed while reading: ${file}`);
2788
2803
  }
2789
2804
  return bytes.subarray(0, offset);
2790
2805
  } finally {
2791
- import_node_fs15.default.closeSync(fd);
2806
+ import_node_fs16.default.closeSync(fd);
2792
2807
  }
2793
2808
  }
2794
- var import_node_fs15, import_node_path16;
2809
+ var import_node_fs16, import_node_path17;
2795
2810
  var init_swift_source_file = __esm({
2796
2811
  "src/swift-source-file.ts"() {
2797
2812
  "use strict";
2798
2813
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2799
- import_node_fs15 = __toESM(require("node:fs"), 1);
2800
- import_node_path16 = __toESM(require("node:path"), 1);
2814
+ import_node_fs16 = __toESM(require("node:fs"), 1);
2815
+ import_node_path17 = __toESM(require("node:path"), 1);
2801
2816
  }
2802
2817
  });
2803
2818
 
@@ -2831,7 +2846,7 @@ var init_swift_submit = __esm({
2831
2846
  });
2832
2847
 
2833
2848
  // src/nitro-dependencies.ts
2834
- var import_node_child_process6, import_node_util3, run3;
2849
+ var import_node_child_process6, import_node_util3, run3, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_SHARED_DEPENDENCIES, RN_DEPENDENCIES;
2835
2850
  var init_nitro_dependencies = __esm({
2836
2851
  "src/nitro-dependencies.ts"() {
2837
2852
  "use strict";
@@ -2844,6 +2859,67 @@ var init_nitro_dependencies = __esm({
2844
2859
  init_swift_source_file();
2845
2860
  init_swift_submit();
2846
2861
  run3 = (0, import_node_util3.promisify)(import_node_child_process6.execFile);
2862
+ DOUBLE_CONVERSION_WASM32_BACKPORT = {
2863
+ upstreamCommit: "8857767d5b2f5a035321e3712e8cd0008840ba6b",
2864
+ originalSha256: "b495b11f7b61693486894f747add5b454894b8b3ca41aa1610d370ba16407ab7",
2865
+ derivedSha256: "642d9f83289672def295f6a0a4f8c94823c20c3186e2b1b9ec36b436cb366da8",
2866
+ before: " defined(__AARCH64EL__)\n",
2867
+ after: " defined(__AARCH64EL__) || defined(__wasm32__)\n"
2868
+ };
2869
+ RN_SHARED_DEPENDENCIES = [
2870
+ {
2871
+ name: "RCT-Folly",
2872
+ url: "https://github.com/facebook/folly/archive/v2024.11.18.00.tar.gz",
2873
+ sha256: "b2c6879ba8ba625218d1ab9eefcc1611a9003d05bc2cb1a38f3bae21892e5167",
2874
+ prefix: "folly-2024.11.18.00",
2875
+ headers: { from: "folly", to: "folly" }
2876
+ },
2877
+ {
2878
+ name: "boost",
2879
+ url: "https://github.com/react-native-community/boost-for-react-native/archive/v1.84.0.tar.gz",
2880
+ sha256: "954a04e9468dee21259937b83a2b21c3985cc96f91ee0152a34a7f0f752093e8",
2881
+ prefix: "boost-for-react-native-1.84.0",
2882
+ headers: { from: "boost", to: "boost" }
2883
+ },
2884
+ {
2885
+ // the podspec's prepare_command renames src to double-conversion.
2886
+ name: "DoubleConversion",
2887
+ url: "https://github.com/google/double-conversion/archive/v1.1.6.tar.gz",
2888
+ sha256: "6b850acd8e88515764472c52973277744a945f9a769a93968efc42efef64d67a",
2889
+ prefix: "double-conversion-1.1.6",
2890
+ headers: { from: "src", to: "double-conversion" },
2891
+ backport: { file: "src/utils.h", ...DOUBLE_CONVERSION_WASM32_BACKPORT }
2892
+ },
2893
+ {
2894
+ name: "fast_float",
2895
+ url: "https://github.com/fastfloat/fast_float/archive/v8.0.0.tar.gz",
2896
+ sha256: "f312f2dc34c61e665f4b132c0307d6f70ad9420185fa831911bc24408acf625d",
2897
+ prefix: "fast_float-8.0.0",
2898
+ headers: { from: "include/fast_float", to: "fast_float" }
2899
+ }
2900
+ ];
2901
+ RN_DEPENDENCIES = {
2902
+ "0.83.1": [
2903
+ ...RN_SHARED_DEPENDENCIES,
2904
+ {
2905
+ name: "fmt",
2906
+ url: "https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz",
2907
+ sha256: "6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f",
2908
+ prefix: "fmt-11.0.2",
2909
+ headers: { from: "include/fmt", to: "fmt" }
2910
+ }
2911
+ ],
2912
+ "0.88.0": [
2913
+ ...RN_SHARED_DEPENDENCIES,
2914
+ {
2915
+ name: "fmt",
2916
+ url: "https://github.com/fmtlib/fmt/archive/12.1.0.tar.gz",
2917
+ sha256: "ea7de4299689e12b6dddd392f9896f08fb0777ac7168897a244a6d6085043fea",
2918
+ prefix: "fmt-12.1.0",
2919
+ headers: { from: "include/fmt", to: "fmt" }
2920
+ }
2921
+ ]
2922
+ };
2847
2923
  }
2848
2924
  });
2849
2925
 
@@ -2855,19 +2931,19 @@ function readJson(root, relative3) {
2855
2931
  return JSON.parse(
2856
2932
  readPackageFile(
2857
2933
  root,
2858
- import_node_path17.default.join(root, relative3),
2934
+ import_node_path18.default.join(root, relative3),
2859
2935
  MAX_SWIFT_COMPILE_SOURCE_BYTES
2860
2936
  ).toString("utf8")
2861
2937
  );
2862
2938
  }
2863
2939
  function registrations(root) {
2864
- const directory = import_node_path17.default.join(root, "nitrogen/generated/ios");
2865
- const initializers = import_node_fs16.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
2940
+ const directory = import_node_path18.default.join(root, "nitrogen/generated/ios");
2941
+ const initializers = import_node_fs17.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
2866
2942
  if (initializers.length !== 1)
2867
2943
  throw new Error(`${root}: expected one generated Nitro iOS initializer`);
2868
2944
  const source = readPackageFile(
2869
2945
  root,
2870
- import_node_path17.default.join(directory, initializers[0]),
2946
+ import_node_path18.default.join(directory, initializers[0]),
2871
2947
  MAX_SWIFT_COMPILE_SOURCE_BYTES
2872
2948
  ).toString("utf8");
2873
2949
  const namespaces = [
@@ -2909,12 +2985,12 @@ function registrations(root) {
2909
2985
  return { namespace, swiftModule, classes, views: viewNames(root, classes) };
2910
2986
  }
2911
2987
  function viewNames(root, classes) {
2912
- const directory = import_node_path17.default.join(root, "nitrogen/generated/shared/json");
2913
- if (!import_node_fs16.default.existsSync(directory)) return /* @__PURE__ */ new Set();
2988
+ const directory = import_node_path18.default.join(root, "nitrogen/generated/shared/json");
2989
+ if (!import_node_fs17.default.existsSync(directory)) return /* @__PURE__ */ new Set();
2914
2990
  const views = /* @__PURE__ */ new Set();
2915
- for (const file of import_node_fs16.default.readdirSync(directory)) {
2991
+ for (const file of import_node_fs17.default.readdirSync(directory)) {
2916
2992
  if (!file.endsWith("Config.json")) continue;
2917
- const config = readJson(root, import_node_path17.default.join("nitrogen/generated/shared/json", file));
2993
+ const config = readJson(root, import_node_path18.default.join("nitrogen/generated/shared/json", file));
2918
2994
  const name2 = object(config) ? config.uiViewClassName : void 0;
2919
2995
  if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
2920
2996
  views.add(name2);
@@ -2922,22 +2998,22 @@ function viewNames(root, classes) {
2922
2998
  return views;
2923
2999
  }
2924
3000
  function hasNitroIosInitializer(root) {
2925
- const generated = import_node_path17.default.join(root, "nitrogen/generated/ios");
2926
- return import_node_fs16.default.existsSync(generated) && import_node_fs16.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
3001
+ const generated = import_node_path18.default.join(root, "nitrogen/generated/ios");
3002
+ return import_node_fs17.default.existsSync(generated) && import_node_fs17.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
2927
3003
  }
2928
3004
  function nitroRegisteredNames(root) {
2929
3005
  if (!hasNitroIosInitializer(root)) return null;
2930
3006
  const { classes, views } = registrations(root);
2931
3007
  return { names: classes.map(({ name: name2 }) => name2), views: [...views].sort() };
2932
3008
  }
2933
- var import_node_child_process7, import_node_fs16, import_node_path17, import_node_util4, run4;
3009
+ var import_node_child_process7, import_node_fs17, import_node_path18, import_node_util4, run4;
2934
3010
  var init_nitro_source = __esm({
2935
3011
  "src/nitro-source.ts"() {
2936
3012
  "use strict";
2937
3013
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2938
3014
  import_node_child_process7 = require("node:child_process");
2939
- import_node_fs16 = __toESM(require("node:fs"), 1);
2940
- import_node_path17 = __toESM(require("node:path"), 1);
3015
+ import_node_fs17 = __toESM(require("node:fs"), 1);
3016
+ import_node_path18 = __toESM(require("node:path"), 1);
2941
3017
  import_node_util4 = require("node:util");
2942
3018
  init_internal_child();
2943
3019
  init_nitro_dependencies();
@@ -5940,25 +6016,25 @@ var init_browser = __esm({
5940
6016
  });
5941
6017
 
5942
6018
  // cli/commands/nodeRepoFileReader.ts
5943
- var import_node_fs17, nodeRepoFileReader;
6019
+ var import_node_fs18, nodeRepoFileReader;
5944
6020
  var init_nodeRepoFileReader = __esm({
5945
6021
  "cli/commands/nodeRepoFileReader.ts"() {
5946
6022
  "use strict";
5947
6023
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5948
- import_node_fs17 = require("node:fs");
6024
+ import_node_fs18 = require("node:fs");
5949
6025
  nodeRepoFileReader = {
5950
- exists: import_node_fs17.existsSync,
5951
- readText: (filePath) => (0, import_node_fs17.readFileSync)(filePath, "utf8"),
5952
- entries: (directory) => (0, import_node_fs17.readdirSync)(directory, { withFileTypes: true }).map((entry) => ({
6026
+ exists: import_node_fs18.existsSync,
6027
+ readText: (filePath) => (0, import_node_fs18.readFileSync)(filePath, "utf8"),
6028
+ entries: (directory) => (0, import_node_fs18.readdirSync)(directory, { withFileTypes: true }).map((entry) => ({
5953
6029
  name: entry.name,
5954
6030
  directory: entry.isDirectory()
5955
6031
  })),
5956
- isDirectory: (filePath) => (0, import_node_fs17.statSync)(filePath).isDirectory(),
6032
+ isDirectory: (filePath) => (0, import_node_fs18.statSync)(filePath).isDirectory(),
5957
6033
  readMetadata(filePath) {
5958
6034
  try {
5959
- const info = (0, import_node_fs17.lstatSync)(filePath);
6035
+ const info = (0, import_node_fs18.lstatSync)(filePath);
5960
6036
  if (!info.isFile() || info.size > 4 * 1024 * 1024) return null;
5961
- return (0, import_node_fs17.readFileSync)(filePath, "utf8");
6037
+ return (0, import_node_fs18.readFileSync)(filePath, "utf8");
5962
6038
  } catch {
5963
6039
  return null;
5964
6040
  }
@@ -5981,7 +6057,7 @@ function scanRepository(root) {
5981
6057
  directories.push(next.dir);
5982
6058
  let handle;
5983
6059
  try {
5984
- handle = (0, import_node_fs18.opendirSync)(next.dir);
6060
+ handle = (0, import_node_fs19.opendirSync)(next.dir);
5985
6061
  } catch {
5986
6062
  unreadable++;
5987
6063
  continue;
@@ -5996,7 +6072,7 @@ function scanRepository(root) {
5996
6072
  truncated = true;
5997
6073
  continue;
5998
6074
  }
5999
- pending.push({ dir: (0, import_node_path18.join)(next.dir, entry.name), depth: next.depth + 1 });
6075
+ pending.push({ dir: (0, import_node_path19.join)(next.dir, entry.name), depth: next.depth + 1 });
6000
6076
  }
6001
6077
  } finally {
6002
6078
  handle.closeSync();
@@ -6026,7 +6102,7 @@ function readProjectJson(path21, files = nodeRepoFileReader) {
6026
6102
  }
6027
6103
  }
6028
6104
  function readProjectManifest(dir, files = nodeRepoFileReader) {
6029
- const parsed = readProjectJson((0, import_node_path18.join)(dir, "package.json"), files);
6105
+ const parsed = readProjectJson((0, import_node_path19.join)(dir, "package.json"), files);
6030
6106
  if (!parsed || typeof parsed !== "object") return null;
6031
6107
  const record = (value) => {
6032
6108
  if (!value || typeof value !== "object") return {};
@@ -6043,13 +6119,13 @@ function readProjectManifest(dir, files = nodeRepoFileReader) {
6043
6119
  devDependencies: record(metadataValue(parsed, "devDependencies"))
6044
6120
  };
6045
6121
  }
6046
- var import_node_fs18, import_node_path18, import_json52, REPORT_SKIP_DIRS, PODFILE_NEW_ARCH_MARK, PODFILE_NEW_ARCH_RUBY;
6122
+ var import_node_fs19, import_node_path19, import_json52, REPORT_SKIP_DIRS, PODFILE_NEW_ARCH_MARK, PODFILE_NEW_ARCH_RUBY;
6047
6123
  var init_detect = __esm({
6048
6124
  "cli/commands/detect.ts"() {
6049
6125
  "use strict";
6050
6126
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6051
- import_node_fs18 = require("node:fs");
6052
- import_node_path18 = require("node:path");
6127
+ import_node_fs19 = require("node:fs");
6128
+ import_node_path19 = require("node:path");
6053
6129
  import_json52 = __toESM(require_lib(), 1);
6054
6130
  init_browser();
6055
6131
  init_nodeRepoFileReader();
@@ -6184,7 +6260,7 @@ function resolveAppStubs(appDir, config, configDir) {
6184
6260
  const { modules, views, hybridObjects } = expandStubs(appDir, source);
6185
6261
  assertRegisteredHybridObjects(appDir, source, hybridObjects);
6186
6262
  for (const [name2, answer] of Object.entries(hybridObjects))
6187
- nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path19.resolve)(source.baseDir, answer) };
6263
+ nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path20.resolve)(source.baseDir, answer) };
6188
6264
  for (const [name2, stub] of Object.entries(modules))
6189
6265
  nativeModules[name2] = lowerStub(stub, source.baseDir);
6190
6266
  for (const [name2, stub] of Object.entries(views))
@@ -6249,10 +6325,10 @@ function assertRegisteredHybridObjects(appDir, source, hybridObjects) {
6249
6325
  );
6250
6326
  }
6251
6327
  function lowerStub(stub, baseDir) {
6252
- return stub === "noop" ? stub : { file: (0, import_node_path19.resolve)(baseDir, stub) };
6328
+ return stub === "noop" ? stub : { file: (0, import_node_path20.resolve)(baseDir, stub) };
6253
6329
  }
6254
6330
  function readPackageJson(dir) {
6255
- const text2 = readSmallFile((0, import_node_path19.join)(dir, "package.json"));
6331
+ const text2 = readSmallFile((0, import_node_path20.join)(dir, "package.json"));
6256
6332
  if (!text2) return null;
6257
6333
  try {
6258
6334
  const parsed = JSON.parse(text2);
@@ -6264,9 +6340,9 @@ function readPackageJson(dir) {
6264
6340
  function installedPackageDir(appDir, name2) {
6265
6341
  let current = appDir;
6266
6342
  while (true) {
6267
- const dir = (0, import_node_path19.join)(current, "node_modules", name2);
6268
- if ((0, import_node_fs19.existsSync)((0, import_node_path19.join)(dir, "package.json"))) return (0, import_node_fs19.realpathSync)(dir);
6269
- const parent = (0, import_node_path19.dirname)(current);
6343
+ const dir = (0, import_node_path20.join)(current, "node_modules", name2);
6344
+ if ((0, import_node_fs20.existsSync)((0, import_node_path20.join)(dir, "package.json"))) return (0, import_node_fs20.realpathSync)(dir);
6345
+ const parent = (0, import_node_path20.dirname)(current);
6270
6346
  if (parent === current) return null;
6271
6347
  current = parent;
6272
6348
  }
@@ -6321,6 +6397,18 @@ function sourceNativeRequests(file, text2, includeLegacy = false) {
6321
6397
  LogicalExpression(node) {
6322
6398
  if (node.operator === "&&") guard(node.left, node.right);
6323
6399
  },
6400
+ VariableDeclarator(node) {
6401
+ if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
6402
+ return;
6403
+ for (const property of node.id.properties) {
6404
+ if (property.type !== "Property") continue;
6405
+ const key = property.key;
6406
+ if (!property.computed && key.type === "Identifier")
6407
+ add("module", key.name, property.start, false);
6408
+ else if (key.type === "Literal" && typeof key.value === "string")
6409
+ add("module", key.value, property.start, false);
6410
+ }
6411
+ },
6324
6412
  CallExpression(node) {
6325
6413
  const first = node.arguments[0];
6326
6414
  if (first?.type !== "Literal" || typeof first.value !== "string") return;
@@ -6358,7 +6446,7 @@ function mergeRequests(previous, next) {
6358
6446
  function packageNativeRequests(dir) {
6359
6447
  const found = /* @__PURE__ */ new Map();
6360
6448
  const directories = scanRepository(dir).directories.filter((sub) => {
6361
- const segments = (0, import_node_path19.relative)(dir, sub).split("/");
6449
+ const segments = (0, import_node_path20.relative)(dir, sub).split("/");
6362
6450
  return !NATIVE_SOURCE_DIRS.has(segments[0]) && !segments.some((segment) => PACKAGE_SKIP_DIRS.has(segment));
6363
6451
  });
6364
6452
  let files = 0;
@@ -6366,7 +6454,7 @@ function packageNativeRequests(dir) {
6366
6454
  for (const name2 of listDir(sub)) {
6367
6455
  if (!SOURCE_FILE.test(name2) || name2.endsWith(".d.ts") || files >= 2e3) continue;
6368
6456
  files++;
6369
- const file = (0, import_node_path19.join)(sub, name2);
6457
+ const file = (0, import_node_path20.join)(sub, name2);
6370
6458
  const text2 = readSmallFile(file);
6371
6459
  if (!text2) continue;
6372
6460
  for (const { line: _line, ...request } of sourceNativeRequests(file, text2, true)) {
@@ -6484,27 +6572,27 @@ function wireSlotMigration(appDir, configPath, wire, kept = []) {
6484
6572
  }
6485
6573
  function listDir(dir) {
6486
6574
  try {
6487
- return (0, import_node_fs19.readdirSync)(dir);
6575
+ return (0, import_node_fs20.readdirSync)(dir);
6488
6576
  } catch {
6489
6577
  return [];
6490
6578
  }
6491
6579
  }
6492
6580
  function readSmallFile(file) {
6493
6581
  try {
6494
- return (0, import_node_fs19.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs19.readFileSync)(file, "utf8") : null;
6582
+ return (0, import_node_fs20.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs20.readFileSync)(file, "utf8") : null;
6495
6583
  } catch {
6496
6584
  return null;
6497
6585
  }
6498
6586
  }
6499
6587
  function hasNativeCode(dir, platform) {
6500
- const expoConfig = (0, import_node_path19.join)(dir, "expo-module.config.json");
6588
+ const expoConfig = (0, import_node_path20.join)(dir, "expo-module.config.json");
6501
6589
  const platforms = metadataValue(readProjectJson(expoConfig), "platforms");
6502
6590
  if (Array.isArray(platforms))
6503
6591
  return platforms.includes(platform) || platform === "ios" && platforms.includes("apple");
6504
- if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs19.existsSync)((0, import_node_path19.join)(dir, entry))))
6592
+ if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs20.existsSync)((0, import_node_path20.join)(dir, entry))))
6505
6593
  return true;
6506
6594
  if (listDir(dir).some((name2) => name2.endsWith(".podspec"))) return true;
6507
- const manifest = readSmallFile((0, import_node_path19.join)(dir, "package.json"));
6595
+ const manifest = readSmallFile((0, import_node_path20.join)(dir, "package.json"));
6508
6596
  return manifest !== null && manifest.includes('"codegenConfig"');
6509
6597
  }
6510
6598
  function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__PURE__ */ new Set(), includeLegacy = false, providers) {
@@ -6517,7 +6605,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6517
6605
  (excluded) => dir === excluded || dir.startsWith(`${excluded}/`)
6518
6606
  ))
6519
6607
  continue;
6520
- if ((0, import_node_fs19.existsSync)((0, import_node_path19.join)(dir, "expo-module.config.json"))) {
6608
+ if ((0, import_node_fs20.existsSync)((0, import_node_path20.join)(dir, "expo-module.config.json"))) {
6521
6609
  if (platform && !hasNativeCode(dir, platform)) {
6522
6610
  excludedModuleDirs.push(dir);
6523
6611
  continue;
@@ -6526,7 +6614,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6526
6614
  }
6527
6615
  for (const name2 of listDir(dir)) {
6528
6616
  if (SOURCE_FILE.test(name2) && !name2.endsWith(".d.ts"))
6529
- sourceFiles.push((0, import_node_path19.join)(dir, name2));
6617
+ sourceFiles.push((0, import_node_path20.join)(dir, name2));
6530
6618
  }
6531
6619
  }
6532
6620
  }
@@ -6536,7 +6624,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6536
6624
  scanRepository(dir).directories.flatMap(
6537
6625
  (sub) => listDir(sub).filter(
6538
6626
  (name2) => NATIVE_SOURCE_FILE.test(name2) && (!platform || (platform === "ios" ? name2.endsWith(".swift") : name2.endsWith(".kt")))
6539
- ).map((name2) => (0, import_node_path19.join)(sub, name2))
6627
+ ).map((name2) => (0, import_node_path20.join)(sub, name2))
6540
6628
  )
6541
6629
  ])
6542
6630
  );
@@ -6545,7 +6633,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6545
6633
  const known = owners.get(dir);
6546
6634
  if (known) return known;
6547
6635
  const name2 = readPackageJson(dir)?.name;
6548
- const parent = (0, import_node_path19.dirname)(dir);
6636
+ const parent = (0, import_node_path20.dirname)(dir);
6549
6637
  const result = typeof name2 === "string" ? name2 : parent === dir ? pkg.name ?? "app" : owner(parent);
6550
6638
  owners.set(dir, result);
6551
6639
  return result;
@@ -6559,15 +6647,15 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6559
6647
  return;
6560
6648
  }
6561
6649
  providers ??= dependencyNativeOwners(appDir, pkg);
6562
- const packageName = providers.get(key) ?? owner((0, import_node_path19.dirname)(file));
6650
+ const packageName = providers.get(key) ?? owner((0, import_node_path20.dirname)(file));
6563
6651
  if (knownPackages.has(packageName)) return;
6564
6652
  const moduleDir = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`)) ?? null;
6565
6653
  found.set(key, {
6566
6654
  kind,
6567
6655
  name: name2,
6568
6656
  package: packageName,
6569
- path: `${(0, import_node_path19.relative)(appDir, file)}:${line}`,
6570
- expoModule: moduleDir ? (0, import_node_path19.relative)(appDir, moduleDir) || "." : null,
6657
+ path: `${(0, import_node_path20.relative)(appDir, file)}:${line}`,
6658
+ expoModule: moduleDir ? (0, import_node_path20.relative)(appDir, moduleDir) || "." : null,
6571
6659
  optional,
6572
6660
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
6573
6661
  (path21) => path21.endsWith(".swift") && [...(readSmallFile(path21) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
@@ -6618,30 +6706,30 @@ function workspacePackageDirs(appDir, pkg) {
6618
6706
  for (const name2 of Object.keys({ ...pkg.dependencies, ...pkg.devDependencies })) {
6619
6707
  let current = appDir;
6620
6708
  while (true) {
6621
- const link = (0, import_node_path19.join)(current, "node_modules", name2);
6622
- if ((0, import_node_fs19.existsSync)(link)) {
6623
- if ((0, import_node_fs19.lstatSync)(link).isSymbolicLink()) {
6624
- const target = (0, import_node_fs19.realpathSync)(link);
6709
+ const link = (0, import_node_path20.join)(current, "node_modules", name2);
6710
+ if ((0, import_node_fs20.existsSync)(link)) {
6711
+ if ((0, import_node_fs20.lstatSync)(link).isSymbolicLink()) {
6712
+ const target = (0, import_node_fs20.realpathSync)(link);
6625
6713
  if (!target.split("/").includes("node_modules") && !target.startsWith(`${appDir}/`)) {
6626
6714
  dirs.add(target);
6627
6715
  }
6628
6716
  }
6629
6717
  break;
6630
6718
  }
6631
- const parent = (0, import_node_path19.dirname)(current);
6719
+ const parent = (0, import_node_path20.dirname)(current);
6632
6720
  if (parent === current) break;
6633
6721
  current = parent;
6634
6722
  }
6635
6723
  }
6636
6724
  return [...dirs];
6637
6725
  }
6638
- var import_node_fs19, import_node_path19, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
6726
+ var import_node_fs20, import_node_path20, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
6639
6727
  var init_app_stubs = __esm({
6640
6728
  "cli/app-stubs.ts"() {
6641
6729
  "use strict";
6642
6730
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6643
- import_node_fs19 = require("node:fs");
6644
- import_node_path19 = require("node:path");
6731
+ import_node_fs20 = require("node:fs");
6732
+ import_node_path20 = require("node:path");
6645
6733
  init_version_range();
6646
6734
  import_oxc_parser2 = require("oxc-parser");
6647
6735
  import_sucrase = require("sucrase");
@@ -6677,12 +6765,12 @@ function resolveFileEntries(entries, configDir) {
6677
6765
  return Object.fromEntries(
6678
6766
  Object.entries(entries).map(([name2, resolution]) => [
6679
6767
  name2,
6680
- resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path20.default.resolve(configDir, resolution.file) } : resolution
6768
+ resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path21.default.resolve(configDir, resolution.file) } : resolution
6681
6769
  ])
6682
6770
  );
6683
6771
  }
6684
6772
  function resolveConfigReplacementFiles(config, configPath) {
6685
- const configDir = import_node_path20.default.dirname(configPath);
6773
+ const configDir = import_node_path21.default.dirname(configPath);
6686
6774
  return {
6687
6775
  ...config,
6688
6776
  modules: resolveFileEntries(config.modules, configDir)
@@ -6698,7 +6786,7 @@ async function loadRNXAppStubs(project) {
6698
6786
  return resolveAppStubs(
6699
6787
  project.appDir,
6700
6788
  config,
6701
- project.configPath ? import_node_path20.default.dirname(project.configPath) : project.appDir
6789
+ project.configPath ? import_node_path21.default.dirname(project.configPath) : project.appDir
6702
6790
  );
6703
6791
  } catch (error) {
6704
6792
  const message = error instanceof Error ? error.message : String(error);
@@ -6717,7 +6805,7 @@ async function loadConfigFile(project) {
6717
6805
  [`${rnxPublicBrand.packageName}/config`]: config_exports
6718
6806
  }
6719
6807
  });
6720
- const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs20.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
6808
+ const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs21.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
6721
6809
  if (!isPeachConfig(loaded3)) {
6722
6810
  throw new Error("the default export must be a peach config object");
6723
6811
  }
@@ -6753,13 +6841,13 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
6753
6841
  const project = resolveAppProject(startDir);
6754
6842
  return { project, ...await loadRNXAppStubs(project) };
6755
6843
  }
6756
- var import_node_fs20, import_node_path20, import_jiti, WIRE_SLOTS;
6844
+ var import_node_fs21, import_node_path21, import_jiti, WIRE_SLOTS;
6757
6845
  var init_app_config = __esm({
6758
6846
  "cli/app-config.ts"() {
6759
6847
  "use strict";
6760
6848
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6761
- import_node_fs20 = require("node:fs");
6762
- import_node_path20 = __toESM(require("node:path"), 1);
6849
+ import_node_fs21 = require("node:fs");
6850
+ import_node_path21 = __toESM(require("node:path"), 1);
6763
6851
  import_jiti = require("jiti");
6764
6852
  init_config();
6765
6853
  init_config();
@@ -6856,14 +6944,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6856
6944
  const neededPackages = /* @__PURE__ */ new Set();
6857
6945
  const factories = [];
6858
6946
  const visit3 = (filePath) => {
6859
- const real = import_node_fs21.default.realpathSync(filePath);
6947
+ const real = import_node_fs22.default.realpathSync(filePath);
6860
6948
  const previous = files.get(real);
6861
6949
  if (previous !== void 0) return previous;
6862
6950
  const id = "peach-config-file:" + files.size;
6863
6951
  files.set(real, id);
6864
6952
  const compiled = compileReplacementModule({
6865
6953
  filePath: real,
6866
- source: import_node_fs21.default.readFileSync(real, "utf8"),
6954
+ source: import_node_fs22.default.readFileSync(real, "utf8"),
6867
6955
  runtimePackages,
6868
6956
  localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
6869
6957
  });
@@ -6887,7 +6975,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6887
6975
  if (!entries || typeof entries !== "object") continue;
6888
6976
  for (const resolution of Object.values(entries)) {
6889
6977
  if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
6890
- resolution.file = visit3(import_node_path21.default.resolve(resolution.file));
6978
+ resolution.file = visit3(import_node_path22.default.resolve(resolution.file));
6891
6979
  }
6892
6980
  }
6893
6981
  }
@@ -6911,13 +6999,13 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6911
6999
  const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
6912
7000
  return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
6913
7001
  }
6914
- var import_node_fs21, import_node_path21, import_sucrase2, import_terser;
7002
+ var import_node_fs22, import_node_path22, import_sucrase2, import_terser;
6915
7003
  var init_configured_bundle_producer = __esm({
6916
7004
  "src/configured-bundle-producer.ts"() {
6917
7005
  "use strict";
6918
7006
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6919
- import_node_fs21 = __toESM(require("node:fs"), 1);
6920
- import_node_path21 = __toESM(require("node:path"), 1);
7007
+ import_node_fs22 = __toESM(require("node:fs"), 1);
7008
+ import_node_path22 = __toESM(require("node:path"), 1);
6921
7009
  import_sucrase2 = require("sucrase");
6922
7010
  import_terser = require("terser");
6923
7011
  init_dependencies();
@@ -6940,7 +7028,7 @@ module.exports = __toCommonJS(metro_plugin_exports);
6940
7028
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6941
7029
  var import_fs4 = __toESM(require("fs"), 1);
6942
7030
  var import_module = require("module");
6943
- var import_node_crypto4 = require("node:crypto");
7031
+ var import_node_crypto5 = require("node:crypto");
6944
7032
  var import_path4 = __toESM(require("path"), 1);
6945
7033
  init_app_project();
6946
7034
 
@@ -7006,7 +7094,8 @@ async function resolveAndroidModules(appRoot) {
7006
7094
  {
7007
7095
  timeout: 3e4,
7008
7096
  maxBuffer: 8 * 1024 * 1024,
7009
- env: { ...process.env, [RNX_FORKED_SCRIPT_ENV]: "1" }
7097
+ env: { ...process.env, [RNX_FORKED_SCRIPT_ENV]: "1" },
7098
+ cwd: appRoot
7010
7099
  }
7011
7100
  );
7012
7101
  const resolved = JSON.parse(stdout);
@@ -7133,13 +7222,13 @@ function readModuleNamespace(moduleRoot, manifest) {
7133
7222
  function readModuleRootModuleName(moduleRoot) {
7134
7223
  const sourceSets = import_node_path3.default.join(moduleRoot, "src");
7135
7224
  const manifestFile = import_node_path3.default.join(sourceSets, "main/AndroidManifest.xml");
7136
- if (!import_node_fs3.default.existsSync(manifestFile)) return void 0;
7225
+ if (!import_node_fs3.default.existsSync(manifestFile)) return null;
7137
7226
  const document = parseXml(import_node_fs3.default.readFileSync(manifestFile, "utf8"), manifestFile);
7138
7227
  const manifest = document.children[0];
7139
7228
  const application = manifest?.children.find((child) => child.name === "application");
7140
- if (manifest?.name !== "manifest" || !application) return void 0;
7229
+ if (manifest?.name !== "manifest" || !application) return null;
7141
7230
  const launchers = launcherActivities(application);
7142
- if (launchers.length === 0) return void 0;
7231
+ if (launchers.length === 0) return null;
7143
7232
  for (const set2 of import_node_fs3.default.readdirSync(sourceSets, { withFileTypes: true })) {
7144
7233
  const file = import_node_path3.default.join(sourceSets, set2.name, "AndroidManifest.xml");
7145
7234
  if (!set2.isDirectory() || set2.name === "main" || !import_node_fs3.default.existsSync(file)) continue;
@@ -7171,10 +7260,7 @@ function readModuleRootModuleName(moduleRoot) {
7171
7260
  function readAndroidLauncherRootModuleName(projectRoot) {
7172
7261
  const androidRoot = import_node_path3.default.join(projectRoot, "android");
7173
7262
  if (!import_node_fs3.default.existsSync(androidRoot)) return void 0;
7174
- const names = import_node_fs3.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).flatMap((entry) => {
7175
- const name2 = readModuleRootModuleName(import_node_path3.default.join(androidRoot, entry.name));
7176
- return name2 === void 0 ? [] : [name2];
7177
- });
7263
+ const names = import_node_fs3.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path3.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
7178
7264
  return names.length === 1 ? names[0] : void 0;
7179
7265
  }
7180
7266
 
@@ -7270,6 +7356,7 @@ var import_path = __toESM(require("path"), 1);
7270
7356
 
7271
7357
  // ../peach-compat/src/lazy-stub-patterns.ts
7272
7358
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7359
+ init_version_range();
7273
7360
  var LAZY_STUB_PATTERNS = [
7274
7361
  "@10play/tentap-editor",
7275
7362
  "@adobe/react-native-aepcore",
@@ -7325,13 +7412,10 @@ var LAZY_STUB_PATTERNS = [
7325
7412
  "@shopify/checkout-sheet-kit",
7326
7413
  "@stream-io/video-react-native-sdk",
7327
7414
  "@stripe/stripe-identity-react-native",
7328
- "@stripe/stripe-react-native",
7329
- "@stripe/stripe-react-native/lib/typescript/src/types",
7330
7415
  "@stripe/stripe-terminal-react-native",
7331
7416
  "@supersami/rn-foreground-service",
7332
7417
  "@survicate/react-native-survicate",
7333
7418
  "@twilio/voice-react-native-sdk",
7334
- "@walletconnect/react-native-compat",
7335
7419
  "@xmartlabs/react-native-line",
7336
7420
  "@zoontek/react-native-navigation-bar",
7337
7421
  "clevertap-react-native",
@@ -7343,9 +7427,7 @@ var LAZY_STUB_PATTERNS = [
7343
7427
  "expo-modules-core",
7344
7428
  "expo-superwall",
7345
7429
  "freerasp-react-native",
7346
- "klaviyo-react-native-sdk",
7347
7430
  "llama.rn",
7348
- "mixpanel-react-native",
7349
7431
  "newrelic-react-native-agent",
7350
7432
  "realm",
7351
7433
  "react-native-a11y",
@@ -7357,7 +7439,6 @@ var LAZY_STUB_PATTERNS = [
7357
7439
  "react-native-android-location-enabler",
7358
7440
  "react-native-animateable-text",
7359
7441
  "react-native-app-clip",
7360
- "react-native-appsflyer",
7361
7442
  "react-native-avoid-softinput",
7362
7443
  "react-native-azure-auth",
7363
7444
  "react-native-background-actions",
@@ -7366,7 +7447,6 @@ var LAZY_STUB_PATTERNS = [
7366
7447
  "react-native-bluetooth-classic",
7367
7448
  "react-native-bluetooth-state-manager",
7368
7449
  "react-native-bottom-tabs",
7369
- "react-native-branch",
7370
7450
  "react-native-camera-kit",
7371
7451
  "react-native-change-icon",
7372
7452
  "react-native-charts-wrapper",
@@ -7404,7 +7484,6 @@ var LAZY_STUB_PATTERNS = [
7404
7484
  "react-native-moengage",
7405
7485
  "react-native-navigation-mode",
7406
7486
  "react-native-network-info",
7407
- "react-native-nitro-haptics",
7408
7487
  "react-native-otp-verify",
7409
7488
  "react-native-passkey",
7410
7489
  "react-native-payments",
@@ -7425,6 +7504,7 @@ var LAZY_STUB_PATTERNS = [
7425
7504
  "react-native-restart-newarch",
7426
7505
  "react-native-screenguard",
7427
7506
  "react-native-screens",
7507
+ "react-native-screens/components/Screen",
7428
7508
  "react-native-screenshot-prevent",
7429
7509
  "react-native-select-contact",
7430
7510
  "react-native-send-intent",
@@ -8296,7 +8376,6 @@ var NATIVE_STUB_PACKAGE_NAMES = [
8296
8376
  "@callstack/timezone-hermes-fix",
8297
8377
  "@candlefinance/faster-image",
8298
8378
  "@candlefinance/haptics",
8299
- "@clerk/expo",
8300
8379
  "@clerk/expo-passkeys",
8301
8380
  "@cometchat/chat-uikit-react-native",
8302
8381
  "@computools/react-native-dynamic-app-icon",
@@ -8332,6 +8411,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
8332
8411
  "@flyskywhy/react-native-gcanvas",
8333
8412
  "@fugood/react-native-audio-pcm-stream",
8334
8413
  "@fullstory/react-native",
8414
+ "@g4rb4g3/react-native-carplay",
8335
8415
  "@gabriel-sisjr/react-native-background-location",
8336
8416
  "@generac/react-native-local-network-permission",
8337
8417
  "@giphy/react-native-sdk",
@@ -8339,6 +8419,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
8339
8419
  "@goliapkg/sentori-react-native",
8340
8420
  "@google/react-native-make-payment",
8341
8421
  "@googlemaps/react-native-navigation-sdk",
8422
+ "@gutenye/ocr-react-native",
8342
8423
  "@haroldtran/react-native-pax",
8343
8424
  "@hot-updater/react-native",
8344
8425
  "@huymobile/react-native-sms-retriever-nitro-module",
@@ -8467,6 +8548,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
8467
8548
  "@rn-org/react-native-geofencing",
8468
8549
  "@rn-org/react-native-shortcuts",
8469
8550
  "@rnmapbox/maps",
8551
+ "@rntp/player",
8470
8552
  "@rnw-community/react-native-payments",
8471
8553
  "@rocket.chat/mobile-crypto",
8472
8554
  "@roman.sytnyk/blur-app-in-recents",
@@ -8944,6 +9026,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
8944
9026
  "react-native-nfc-manager",
8945
9027
  "react-native-nitro-ark",
8946
9028
  "react-native-nitro-audio-manager",
9029
+ "react-native-nitro-base64",
8947
9030
  "react-native-nitro-buffer",
8948
9031
  "react-native-nitro-cloud-uploader",
8949
9032
  "react-native-nitro-cookies",
@@ -9248,7 +9331,7 @@ var NATIVE_RUNTIME_PACKAGE_NAMES = [
9248
9331
  "@valora/react-native-keychain",
9249
9332
  "react-native-app-control",
9250
9333
  "react-native-blue-crypto",
9251
- "react-native-nitro-base64",
9334
+ "react-native-dynamic-theme",
9252
9335
  "react-native-nitro-gzip",
9253
9336
  "react-native-sectioned-slider"
9254
9337
  ];
@@ -9511,6 +9594,10 @@ var SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES = {
9511
9594
  specifier: "@peach-internal/expo-platform",
9512
9595
  packageName: "expo-modules-core/build/Platform.js"
9513
9596
  },
9597
+ expoLegacyEventEmitter: {
9598
+ specifier: "@peach-internal/expo-legacy-event-emitter",
9599
+ packageName: "expo-modules-core/build/LegacyEventEmitter.js"
9600
+ },
9514
9601
  expoSharedObjectHook: {
9515
9602
  specifier: "@peach-internal/expo-shared-object-hook",
9516
9603
  packageName: "expo-modules-core/build/hooks/useReleasingSharedObject.js"
@@ -11630,6 +11717,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11630
11717
  else proxyReq.end(nextBody);
11631
11718
  });
11632
11719
  const proxyRes = await send().finally(() => req.off("aborted", markAborted));
11720
+ upstreamAnswered = true;
11633
11721
  const status = proxyRes.statusCode ?? 502;
11634
11722
  const location = proxyRes.headers.location;
11635
11723
  const hopCookies = [...setCookies, ...proxyRes.headers["set-cookie"] ?? []];
@@ -11675,6 +11763,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11675
11763
  }
11676
11764
  await (0, import_promises3.pipeline)(proxyRes, res);
11677
11765
  };
11766
+ let upstreamAnswered = false;
11678
11767
  let body;
11679
11768
  try {
11680
11769
  if (req.method !== "GET" && req.method !== "HEAD") {
@@ -11689,6 +11778,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11689
11778
  await proxy(upstreamUrl, originalMethod, body, 0, []);
11690
11779
  } catch (err) {
11691
11780
  const norm = normalizeHostname(upstreamUrl.hostname);
11781
+ if (upstreamAnswered && !res.headersSent)
11782
+ console.error(`[peach] fetch proxy could not forward ${upstreamUrl.href}:`, err);
11692
11783
  if (!res.headersSent && isLoopbackHost(norm) && err?.code === "ECONNREFUSED") {
11693
11784
  const altHosts = norm === "::1" ? ["127.0.0.1"] : norm === "127.0.0.1" ? ["[::1]"] : ["[::1]", "127.0.0.1"];
11694
11785
  for (const altHost of altHosts) {
@@ -11716,6 +11807,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
11716
11807
  res.end();
11717
11808
  return;
11718
11809
  }
11810
+ if (!(err instanceof Error && "code" in err))
11811
+ console.error("[peach] fetch proxy failed:", err);
11719
11812
  if (req instanceof import_node_http2.Http2ServerRequest)
11720
11813
  req.stream.destroy(new Error("fetch proxy upstream failed", { cause: err }));
11721
11814
  else req.socket.destroy();
@@ -11848,6 +11941,13 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
11848
11941
  ...max === void 0 ? {} : { maxSdkVersion: Number(max) }
11849
11942
  });
11850
11943
  }
11944
+ let androidPhotoLibraryAddOnly;
11945
+ for (const element of application.children) {
11946
+ if (element.name !== "meta-data" || element.attributes[`${attribute}name`] !== "one.photoLibrary.addOnly")
11947
+ continue;
11948
+ if (/^(?:true|True|TRUE)$/.test(element.attributes[`${attribute}value`]?.trim() ?? ""))
11949
+ androidPhotoLibraryAddOnly = true;
11950
+ }
11851
11951
  let label = application.attributes[`${attribute}label`];
11852
11952
  let applicationName = null;
11853
11953
  if (label && !/\$\{|^[@?]/.test(label)) applicationName = label;
@@ -11886,7 +11986,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
11886
11986
  buildVersion,
11887
11987
  bundleIdentifier,
11888
11988
  platform: "android",
11889
- androidManifestPermissions
11989
+ androidManifestPermissions,
11990
+ ...androidPhotoLibraryAddOnly === void 0 ? {} : { androidPhotoLibraryAddOnly }
11890
11991
  };
11891
11992
  }
11892
11993
  function androidMergedResourceValuesDirectory(manifestFile) {
@@ -12079,7 +12180,7 @@ function parseOpenStepPlist(text2) {
12079
12180
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12080
12181
  var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
12081
12182
  var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
12082
- function xcodePathResolver(objects, projectDir, join6) {
12183
+ function xcodePathResolver(objects, projectDir, join7) {
12083
12184
  const parents = /* @__PURE__ */ new Map();
12084
12185
  for (const [id, entry] of Object.entries(objects)) {
12085
12186
  if (!isDict(entry)) continue;
@@ -12097,11 +12198,11 @@ function xcodePathResolver(objects, projectDir, join6) {
12097
12198
  const own = str(entry.path) ?? "";
12098
12199
  const tree = str(entry.sourceTree) ?? "<group>";
12099
12200
  if (tree === "<absolute>") result = own;
12100
- else if (tree === "SOURCE_ROOT") result = join6(projectDir, own);
12201
+ else if (tree === "SOURCE_ROOT") result = join7(projectDir, own);
12101
12202
  else if (tree === "<group>") {
12102
12203
  const parent = parents.get(id);
12103
12204
  const base = parent ? resolve4(parent) : projectDir;
12104
- if (base !== null) result = join6(base, own);
12205
+ if (base !== null) result = join7(base, own);
12105
12206
  }
12106
12207
  }
12107
12208
  paths.set(id, result);
@@ -12109,7 +12210,7 @@ function xcodePathResolver(objects, projectDir, join6) {
12109
12210
  };
12110
12211
  return resolve4;
12111
12212
  }
12112
- function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join6, visit3) {
12213
+ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join7, visit3) {
12113
12214
  const target = objects[targetId];
12114
12215
  if (!isDict(target)) return;
12115
12216
  for (const phaseId of list(target.buildPhases)) {
@@ -12145,7 +12246,7 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
12145
12246
  for (const relative3 of list(exception.membershipExceptions))
12146
12247
  exceptions.add(relative3);
12147
12248
  }
12148
- const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(join6(folder, relative3)));
12249
+ const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(join7(folder, relative3)));
12149
12250
  for (const file of members) {
12150
12251
  const relative3 = file.slice(prefix2.length);
12151
12252
  const excepted = [...exceptions].some(
@@ -12542,7 +12643,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12542
12643
  if (resourceUri) {
12543
12644
  if (!selectedTarget)
12544
12645
  throw new Error("native app icon target membership is unresolved");
12545
- const join6 = (base, own) => {
12646
+ const join7 = (base, own) => {
12546
12647
  const segments = [];
12547
12648
  for (const segment of `${base}/${own}`.split("/")) {
12548
12649
  if (segment === "" || segment === ".") continue;
@@ -12555,7 +12656,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12555
12656
  const project = Object.values(objects).find(
12556
12657
  (object2) => isRecord(object2) && object2.isa === "PBXProject"
12557
12658
  );
12558
- const projectDir = join6(
12659
+ const projectDir = join7(
12559
12660
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
12560
12661
  isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
12561
12662
  );
@@ -12563,7 +12664,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12563
12664
  visitXcodeTargetMembers(
12564
12665
  objects,
12565
12666
  selectedTarget.id,
12566
- xcodePathResolver(objects, projectDir, join6),
12667
+ xcodePathResolver(objects, projectDir, join7),
12567
12668
  (file) => {
12568
12669
  if (Object.hasOwn(files, file)) return [file];
12569
12670
  const prefix2 = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
@@ -12571,7 +12672,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12571
12672
  (path21) => path21.startsWith(prefix2) && !/(?:^|\/)\./.test(path21.slice(prefix2.length))
12572
12673
  );
12573
12674
  },
12574
- join6,
12675
+ join7,
12575
12676
  (file, kind) => {
12576
12677
  if (kind === "resource") resources.add(file);
12577
12678
  }
@@ -12665,26 +12766,221 @@ function extractNativeAppIdentityFromFiles(files, platform, parseInfoPlist, iosT
12665
12766
 
12666
12767
  // src/native-app-identity-project.ts
12667
12768
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12668
- var import_node_fs13 = __toESM(require("node:fs"), 1);
12769
+ var import_node_fs14 = __toESM(require("node:fs"), 1);
12669
12770
  var import_node_module3 = require("node:module");
12670
- var import_node_path14 = __toESM(require("node:path"), 1);
12771
+ var import_node_path15 = __toESM(require("node:path"), 1);
12671
12772
  init_is_record();
12672
12773
 
12673
12774
  // src/xcode-project.ts
12674
12775
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12675
12776
  var import_node_child_process3 = require("node:child_process");
12676
- var import_node_crypto3 = require("node:crypto");
12677
- var import_node_fs12 = __toESM(require("node:fs"), 1);
12678
- var import_node_path13 = __toESM(require("node:path"), 1);
12777
+ var import_node_crypto4 = require("node:crypto");
12778
+ var import_node_fs13 = __toESM(require("node:fs"), 1);
12779
+ var import_node_path14 = __toESM(require("node:path"), 1);
12679
12780
  var import_plist3 = __toESM(require("plist"), 1);
12680
12781
 
12681
12782
  // src/swift-coverage/xcode-assets.ts
12682
12783
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12683
- var assetSymbolSettingKeys = [
12684
- "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
12685
- "ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
12686
- "PRODUCT_BUNDLE_IDENTIFIER",
12687
- "TARGETED_DEVICE_FAMILY",
12784
+
12785
+ // src/swift-coverage/provenance.ts
12786
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12787
+ var import_node_crypto3 = require("node:crypto");
12788
+ var import_node_fs10 = require("node:fs");
12789
+ var import_node_path10 = require("node:path");
12790
+ var SWIFT_COVERAGE_DIGEST_SOURCES = [
12791
+ "swift-coverage/indexdump.ts",
12792
+ "swift-coverage/indexing.ts",
12793
+ "swift-coverage/types.ts",
12794
+ "swift-coverage/source.ts",
12795
+ "swift-coverage/package.ts",
12796
+ "swift-coverage/xcode.ts",
12797
+ "swift-coverage/xcode-assets.ts",
12798
+ "swift-coverage/xcode-asset-symbols.ts",
12799
+ "swift-coverage/xcode-bridging.ts",
12800
+ "swift-coverage/xcode-packages.ts",
12801
+ "swift-coverage/xcode-strings.ts",
12802
+ "swift-coverage/reader.ts",
12803
+ "swift-coverage/provenance.ts",
12804
+ "swift-package-manifest.ts",
12805
+ "swift-package.ts",
12806
+ "swift-source-file.ts",
12807
+ "swift-toolchain.ts",
12808
+ "home-paths.ts",
12809
+ "xcode-header-search.ts",
12810
+ "xcode-project.ts",
12811
+ "xcode-target-members.ts",
12812
+ "xcode-json-project.ts",
12813
+ "openstep-plist.ts"
12814
+ ];
12815
+ function swiftCoverageSourceDigests(srcDir) {
12816
+ return Object.fromEntries(
12817
+ SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
12818
+ file,
12819
+ (0, import_node_crypto3.createHash)("sha256").update((0, import_node_fs10.readFileSync)((0, import_node_path10.join)(srcDir, file))).digest("hex")
12820
+ ])
12821
+ );
12822
+ }
12823
+ var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path10.join)(__sootsim_import_meta_dirname, ".."));
12824
+
12825
+ // src/swift-coverage/xcode-asset-symbols.ts
12826
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12827
+ var silentTypes = /* @__PURE__ */ new Set([
12828
+ "appiconset",
12829
+ "brandassets",
12830
+ "dataset",
12831
+ "iconset",
12832
+ "iconstack",
12833
+ "iconstackgroup",
12834
+ "launchimage",
12835
+ "stickerpack",
12836
+ "stickersiconset",
12837
+ "textureset"
12838
+ ]);
12839
+ var stackTypes = /* @__PURE__ */ new Set(["imagestack", "solidimagestack"]);
12840
+ var unprovenTypes = /* @__PURE__ */ new Set([
12841
+ "arobject",
12842
+ "arreferenceimage",
12843
+ "arresourcegroup",
12844
+ "complicationset",
12845
+ "cubetextureset",
12846
+ "gcdashboardimage",
12847
+ "gcleaderboard",
12848
+ "gcleaderboardset",
12849
+ "glyphset",
12850
+ "iconbadgeset",
12851
+ "iconstacklayer",
12852
+ "imagestacklayer",
12853
+ "mipmapset",
12854
+ "modelset",
12855
+ "sidebariconset",
12856
+ "solidimagestacklayer",
12857
+ "sticker",
12858
+ "stickerframeset",
12859
+ "stickersequence"
12860
+ ]);
12861
+ var knownTypes = /* @__PURE__ */ new Set([
12862
+ "colorset",
12863
+ "imageset",
12864
+ "symbolset",
12865
+ "spriteatlas",
12866
+ ...silentTypes,
12867
+ ...stackTypes,
12868
+ ...unprovenTypes
12869
+ ]);
12870
+ var compressionTypes = [
12871
+ "automatic",
12872
+ "lossless",
12873
+ "lossy",
12874
+ "gpu-optimized-best",
12875
+ "gpu-optimized-smallest"
12876
+ ];
12877
+ var renditionRules = {
12878
+ appearances: "objects",
12879
+ locale: "string",
12880
+ platform: "string",
12881
+ resizing: "object",
12882
+ "alignment-insets": "object",
12883
+ "compression-type": compressionTypes,
12884
+ "display-gamut": ["sRGB", "display-P3"],
12885
+ "minimum-system-version": "string",
12886
+ "matching-style": "string",
12887
+ "template-rendering-intent": "string",
12888
+ size: "string",
12889
+ role: "string",
12890
+ orientation: "string",
12891
+ extent: "string"
12892
+ };
12893
+ var setRules = {
12894
+ localizable: "any",
12895
+ "auto-scaling": "string",
12896
+ "symbol-rendering-intent": "string",
12897
+ "provides-namespace": "any",
12898
+ "on-demand-resource-tags": "any",
12899
+ "template-rendering-intent": "string",
12900
+ "preserves-vector-representation": "any"
12901
+ };
12902
+ var inclusionRules = {
12903
+ idiom: "any",
12904
+ subtype: "any",
12905
+ unassigned: "any"
12906
+ };
12907
+ var rules = {
12908
+ // colors check none of the image traits
12909
+ colorset: {
12910
+ entry: {
12911
+ ...renditionRules,
12912
+ ...inclusionRules,
12913
+ color: "any",
12914
+ scale: "string",
12915
+ "language-direction": "string",
12916
+ "width-class": "string",
12917
+ "height-class": "string",
12918
+ memory: "string",
12919
+ "graphics-feature-set": "string",
12920
+ "screen-width": "string"
12921
+ },
12922
+ set: setRules
12923
+ },
12924
+ imageset: {
12925
+ entry: {
12926
+ ...renditionRules,
12927
+ ...inclusionRules,
12928
+ filename: "any",
12929
+ scale: ["1x", "2x", "3x"],
12930
+ "language-direction": ["left-to-right", "right-to-left"],
12931
+ "width-class": ["compact", "regular", "unspecified"],
12932
+ "height-class": ["compact", "regular"],
12933
+ memory: ["1GB", "2GB", "3GB", "4GB", "6GB", "8GB", "12GB", "16GB"],
12934
+ "graphics-feature-set": [
12935
+ ...Array.from({ length: 10 }, (_, i) => `apple${i + 1}`),
12936
+ "metal1v2",
12937
+ "metal2v2",
12938
+ "metal3v1",
12939
+ "metal3v2",
12940
+ "metal4v1"
12941
+ ],
12942
+ "screen-width": "string"
12943
+ },
12944
+ // an image whose vector flag is not a boolean is dropped
12945
+ set: {
12946
+ ...setRules,
12947
+ "preserves-vector-representation": "boolean",
12948
+ "compression-type": compressionTypes
12949
+ }
12950
+ },
12951
+ symbolset: {
12952
+ entry: { idiom: "any", filename: "any" },
12953
+ set: { "symbol-rendering-intent": "any" }
12954
+ }
12955
+ };
12956
+ var swiftKeywords = new Set(
12957
+ "precedencegroup associatedtype fileprivate fallthrough extension typealias subscript continue internal Protocol protocol operator rethrows private default public static switch return throws repeat struct deinit import guard while where false catch break defer super class inout throw func Type case else true Self self enum init nil var for let Any try if in do as is _".split(
12958
+ " "
12959
+ )
12960
+ );
12961
+ var nsColorConflicts = new Set(
12962
+ "unemphasizedSelectedContentBackgroundColor unemphasizedSelectedTextBackgroundColor controlAlternatingRowBackgroundColors alternatingContentBackgroundColors systemColorsDidChangeNotification alternateSelectedControlTextColor selectedContentBackgroundColor alternateSelectedControlColor secondarySelectedControlColor unemphasizedSelectedTextColor selectedTextBackgroundColor keyboardFocusIndicatorColor scrubberTexturedBackground controlLightHighlightColor selectedMenuItemTextColor underPageBackgroundColor disabledControlTextColor selectedControlTextColor controlBackgroundColor controlDarkShadowColor windowBackgroundColor selectedMenuItemColor controlHighlightColor quaternaryLabelColor selectedControlColor windowFrameTextColor placeholderTextColor textBackgroundColor secondaryLabelColor tertiaryLabelColor findHighlightColor controlAccentColor controlShadowColor currentControlTint selectedKnobColor selectedTextColor windowFrameColor controlTextColor headerTextColor scrollBarColor separatorColor highlightColor ignoresAlpha systemOrange systemPurple systemIndigo controlColor systemYellow systemGreen systemBrown headerColor shadowColor systemBlue systemPink systemTeal systemCyan labelColor systemMint systemGray systemRed knobColor gridColor linkColor textColor lightGray darkGray magenta orange purple yellow white black green brown clear blue cyan gray red".split(
12963
+ " "
12964
+ )
12965
+ );
12966
+ var uiColorConflicts = new Set(
12967
+ "secondarySystemGroupedBackground tertiarySystemGroupedBackground secondarySystemBackground tertiarySystemBackground groupTableViewBackground systemGroupedBackground quaternarySystemFill smallSystemFontSize secondarySystemFill tertiarySystemFill systemBackground quaternaryLabel opaqueSeparator placeholderText systemFontSize buttonFontSize secondaryLabel labelFontSize tertiaryLabel systemOrange systemPurple systemIndigo systemYellow systemGray2 systemGray3 systemGray4 systemGray5 systemGray6 systemGreen systemBrown systemBlue systemPink systemTeal systemFill systemCyan systemMint systemGray systemRed tintColor separator lightText lightGray darkText darkGray magenta orange purple yellow white black label green brown clear blue link cyan gray red".split(
12968
+ " "
12969
+ )
12970
+ );
12971
+ var colorConflicts = new Set(
12972
+ "transferRepresentation accentColor secondary primary orange purple indigo yellow white black green brown clear blue pink teal cyan mint gray red".split(
12973
+ " "
12974
+ )
12975
+ );
12976
+ var nsImageConflicts = new Set(
12977
+ "touchBarAudioOutputVolumeMediumTemplateName touchBarAudioOutputVolumeHighTemplateName touchBarAudioOutputVolumeOffTemplateName touchBarAudioOutputVolumeLowTemplateName touchBarTextJustifiedAlignTemplateName touchBarCommunicationVideoTemplateName touchBarCommunicationAudioTemplateName touchBarSkipAhead30SecondsTemplateName touchBarSkipAhead15SecondsTemplateName touchBarTextStrikethroughTemplateName touchBarSkipBack30SecondsTemplateName touchBarSkipBack15SecondsTemplateName stopProgressFreestandingTemplateName touchBarAudioOutputMuteTemplateName invalidDataFreestandingTemplateName touchBarEnterFullScreenTemplateName touchBarTextCenterAlignTemplateName touchBarAudioInputMuteTemplateName followLinkFreestandingTemplateName touchBarExitFullScreenTemplateName touchBarTextRightAlignTemplateName touchBarTextUnderlineTemplateName touchBarTextLeftAlignTemplateName touchBarOpenInBrowserTemplateName touchBarFolderMoveToTemplateName touchBarFolderCopyToTemplateName touchBarFastForwardTemplateName rightFacingTriangleTemplateName refreshFreestandingTemplateName touchBarRotateRightTemplateName touchBarRecordStartTemplateName touchBarSkipToStartTemplateName touchBarTextItalicTemplateName touchBarNewMessageTemplateName leftFacingTriangleTemplateName revealFreestandingTemplateName touchBarVolumeDownTemplateName touchBarRecordStopTemplateName touchBarRotateLeftTemplateName touchBarAudioInputTemplateName touchBarColorPickerStrokeName touchBarSkipAheadTemplateName touchBarSkipToEndTemplateName touchBarGoForwardTemplateName touchBarPlayPauseTemplateName touchBarQuickLookTemplateName touchBarAddDetailTemplateName touchBarUserGroupTemplateName touchBarNewFolderTemplateName touchBarBookmarksTemplateName touchBarSlideshowTemplateName statusPartiallyAvailableName touchBarPlayheadTemplateName touchBarDownloadTemplateName touchBarTextBoldTemplateName touchBarSkipBackTemplateName touchBarVolumeUpTemplateName touchBarTextListTemplateName touchBarIconViewTemplateName touchBarListViewTemplateName touchBarUserAddTemplateName touchBarComposeTemplateName touchBarRefreshTemplateName enterFullScreenTemplateName touchBarTagIconTemplateName touchBarGetInfoTemplateName touchBarSidebarTemplateName touchBarTextBoxTemplateName touchBarHistoryTemplateName touchBarColorPickerFillName touchBarColorPickerFontName touchBarRewindTemplateName menuMixedStateTemplateName touchBarDeleteTemplateName touchBarRemoveTemplateName touchBarSearchTemplateName touchBarGoBackTemplateName exitFullScreenTemplateName touchBarGoDownTemplateName touchBarFolderTemplateName touchBarShareTemplateName touchBarPauseTemplateName touchBarAlarmTemplateName lockUnlockedTemplateName touchBarMailTemplateName touchBarGoUpTemplateName touchBarUserTemplateName iChatTheaterTemplateName stopProgressTemplateName touchBarPlayTemplateName touchBarAddTemplateName menuOnStateTemplateName lockLockedTemplateName smartBadgeTemplateName columnViewTemplateName preferencesGeneralName statusUnavailableName goForwardTemplateName bluetoothTemplateName quickLookTemplateName bookmarksTemplateName slideshowTemplateName multipleDocumentsName iconViewTemplateName listViewTemplateName flowViewTemplateName imageUnfilteredTypes statusAvailableName refreshTemplateName goRightTemplateName applicationIconName folderBurnableName removeTemplateName goBackTemplateName actionTemplateName goLeftTemplateName shareTemplateName homeTemplateName pathTemplateName userAccountsName addTemplateName folderSmartName statusNoneName colorPanelName trashEmptyName fontPanelName trashFullName userGroupName userGuestName advancedName mobileMeName everyoneName computerName networkName cautionName bonjourName folderName imageTypes infoName userName".split(
12978
+ " "
12979
+ )
12980
+ );
12981
+
12982
+ // src/swift-coverage/xcode-assets.ts
12983
+ var unprovenAssetSettings = [
12688
12984
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
12689
12985
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
12690
12986
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_ERRORS",
@@ -12693,10 +12989,16 @@ var assetSymbolSettingKeys = [
12693
12989
  "ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH",
12694
12990
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_INDEX_PATH",
12695
12991
  "ASSETCATALOG_COMPILER_BUNDLE_IDENTIFIER",
12696
- "ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE",
12992
+ "ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
12993
+ ];
12994
+ var assetSymbolSettingKeys = [
12995
+ "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
12996
+ "ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
12997
+ "PRODUCT_BUNDLE_IDENTIFIER",
12998
+ "TARGETED_DEVICE_FAMILY",
12999
+ ...unprovenAssetSettings,
12697
13000
  "ASSETCATALOG_OTHER_FLAGS"
12698
13001
  ];
12699
- var unprovenAssetSettings = assetSymbolSettingKeys.slice(4).filter((key) => key !== "ASSETCATALOG_OTHER_FLAGS");
12700
13002
 
12701
13003
  // src/swift-package.ts
12702
13004
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -12744,19 +13046,19 @@ function swiftPackageIdentity(url) {
12744
13046
  // src/swift-package-manifest.ts
12745
13047
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12746
13048
  var import_node_child_process2 = require("node:child_process");
12747
- var import_node_fs11 = __toESM(require("node:fs"), 1);
13049
+ var import_node_fs12 = __toESM(require("node:fs"), 1);
12748
13050
  var import_node_os4 = __toESM(require("node:os"), 1);
12749
- var import_node_path11 = __toESM(require("node:path"), 1);
13051
+ var import_node_path12 = __toESM(require("node:path"), 1);
12750
13052
  init_home_paths();
12751
13053
 
12752
13054
  // src/swift-distribution.lock.json
12753
13055
  var swift_distribution_lock_default = {
12754
- id: "d2c6d715951f5e98",
12755
- release: "swift-6.4.0-RELEASE-custom-ecd2ad9d3fe59329",
12756
- wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-cbf01f4b",
12757
- wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-cbf01f4b.artifactbundle.tar.gz",
12758
- wasmSdkChecksum: "2243db65b12743d577fecc6aa27761363ccef470202f1fef2582e58750c0da4f",
12759
- source: "723697c8df030077d06e7e760259e494f6a1c5a8",
13056
+ id: "c1636d7b2e11fc76",
13057
+ release: "swift-6.4.0-RELEASE-custom-81b2c791c27276bf",
13058
+ wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-b26c1c1d",
13059
+ wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-b26c1c1d.artifactbundle.tar.gz",
13060
+ wasmSdkChecksum: "d3bec118d62c1015e0a2b30e0f09b8fab25613d0ac98e0dee31e68c5521bc747",
13061
+ source: "94f583e01ad78e91cc0908a829b83ab756ac6a12",
12760
13062
  targets: [
12761
13063
  "ImagePlayground",
12762
13064
  "QuickLookThumbnailing",
@@ -12767,6 +13069,7 @@ var swift_distribution_lock_default = {
12767
13069
  "GeoToolbox",
12768
13070
  "DataDetection",
12769
13071
  "Accessibility",
13072
+ "Accounts",
12770
13073
  "Contacts",
12771
13074
  "CoreML",
12772
13075
  "EventKit",
@@ -12796,6 +13099,7 @@ var swift_distribution_lock_default = {
12796
13099
  "PeachFoundation",
12797
13100
  "FoundationNetworking",
12798
13101
  "DeveloperToolsSupport",
13102
+ "CoreImageEnums",
12799
13103
  "SwiftUI",
12800
13104
  "DarwinRecords",
12801
13105
  "Darwin",
@@ -12905,6 +13209,7 @@ var swift_distribution_lock_default = {
12905
13209
  "FoundationModels",
12906
13210
  "CoreTransferable",
12907
13211
  "AudioToolbox",
13212
+ "MediaToolbox",
12908
13213
  "CoreAudioTypes",
12909
13214
  "AudioUnit",
12910
13215
  "Intents",
@@ -12927,11 +13232,13 @@ var swift_distribution_lock_default = {
12927
13232
  ],
12928
13233
  systemEnvironment: {
12929
13234
  scenePhase: ["string:active", "string:inactive", "string:background"],
12930
- colorScheme: ["string:light", "string:dark"],
12931
- semanticColors: ["object"],
12932
13235
  deviceModel: ["string"],
12933
13236
  systemName: ["string"],
12934
13237
  systemVersion: ["string"],
13238
+ screenMetrics: ["array"],
13239
+ colorScheme: ["string:light", "string:dark"],
13240
+ semanticColors: ["object"],
13241
+ imageAssets: ["object"],
12935
13242
  locale: ["string"],
12936
13243
  dynamicTypeSize: [
12937
13244
  "string:xSmall",
@@ -12947,51 +13254,88 @@ var swift_distribution_lock_default = {
12947
13254
  "string:accessibility4",
12948
13255
  "string:accessibility5"
12949
13256
  ],
12950
- accessibilityReduceMotion: ["bool"],
12951
13257
  horizontalSizeClass: ["string:compact", "string:regular"],
12952
13258
  verticalSizeClass: ["string:compact", "string:regular"],
12953
- imageAssets: ["object"]
13259
+ accessibilityReduceMotion: ["bool"]
12954
13260
  },
12955
13261
  hosts: {
12956
13262
  "darwin-arm64": {
12957
- sha256: "3b47173dfa25473dfc3c76e46b1203efdc7c2101eca02eb6c89692d66561e78e",
12958
- size: 81210958
13263
+ sha256: "80c62efc0a94a3cd8e6aa69c5fc4e6af3f2ceae1287623709e28dc9ae3a0761c",
13264
+ size: 89408081
12959
13265
  },
12960
13266
  "linux-x64": {
12961
- sha256: "d11f5fe29845064c390ec980c641c6a70b0199a7f5b6cd445ddc362ff5a2394f",
12962
- size: 81209921
13267
+ sha256: "373b6d83663204d3a5e185367695b0e93e60d4d7f501277fc5644e2928039c2a",
13268
+ size: 92125337
12963
13269
  },
12964
13270
  "linux-arm64": {
12965
- sha256: "df9ab4453985dbbaf335610f6ab62a15f6f63175869dd484f359b702f316dfac",
12966
- size: 81209987
13271
+ sha256: "86297691a209a83adda674d397ec26d5284e7c283c30f60b4dcd13329ded7b94",
13272
+ size: 91619555
12967
13273
  }
12968
13274
  }
12969
13275
  };
12970
13276
 
12971
13277
  // src/swift-toolchain.ts
12972
13278
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12973
- var import_node_fs10 = __toESM(require("node:fs"), 1);
13279
+ var import_node_fs11 = __toESM(require("node:fs"), 1);
12974
13280
  var import_node_os3 = __toESM(require("node:os"), 1);
12975
- var import_node_path10 = __toESM(require("node:path"), 1);
13281
+ var import_node_path11 = __toESM(require("node:path"), 1);
13282
+ var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
13283
+ var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
13284
+ var compilerArchives = {
13285
+ "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
13286
+ identity: "0b2d0a9011c88e66",
13287
+ hosts: {
13288
+ "darwin-arm64": {
13289
+ checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
13290
+ manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
13291
+ },
13292
+ "linux-x64": {
13293
+ checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
13294
+ manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
13295
+ },
13296
+ "linux-arm64": {
13297
+ checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
13298
+ manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
13299
+ }
13300
+ }
13301
+ },
13302
+ [SWIFT_HOST_COMPILER_RELEASE]: {
13303
+ identity: SWIFT_HOST_COMPILER_ID,
13304
+ hosts: {
13305
+ "darwin-arm64": {
13306
+ checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
13307
+ manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
13308
+ },
13309
+ "linux-x64": {
13310
+ checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
13311
+ manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
13312
+ },
13313
+ "linux-arm64": {
13314
+ checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
13315
+ manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
13316
+ }
13317
+ }
13318
+ }
13319
+ };
12976
13320
  function swiftToolchainBin(release) {
12977
13321
  if (process.platform === "darwin") {
12978
13322
  const dirs = [import_node_os3.default.homedir(), "/"].map(
12979
- (base) => import_node_path10.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
13323
+ (base) => import_node_path11.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
12980
13324
  );
12981
- return dirs.find((dir) => import_node_fs10.default.existsSync(import_node_path10.default.join(dir, "swift"))) ?? dirs[0];
13325
+ return dirs.find((dir) => import_node_fs11.default.existsSync(import_node_path11.default.join(dir, "swift"))) ?? dirs[0];
12982
13326
  }
12983
13327
  if (process.env.CONTRAST_SWIFT_TOOLCHAINS) {
12984
- return import_node_path10.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
13328
+ return import_node_path11.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
12985
13329
  }
12986
- const image = import_node_path10.default.join("/opt/swift", release, "usr/bin");
12987
- if (import_node_fs10.default.existsSync(import_node_path10.default.join(image, "swift"))) return image;
13330
+ const image = import_node_path11.default.join("/opt/swift", release, "usr/bin");
13331
+ if (import_node_fs11.default.existsSync(import_node_path11.default.join(image, "swift"))) return image;
12988
13332
  if (release.includes("-custom-"))
12989
- return import_node_path10.default.join(peachHome(), "swift", "toolchains", release, "usr/bin");
12990
- return (process.env.PATH ?? "").split(import_node_path10.default.delimiter).find((dir) => dir && import_node_fs10.default.existsSync(import_node_path10.default.join(dir, "swift"))) ?? image;
13333
+ return import_node_path11.default.join(peachHome(), "swift", "toolchains", release, "usr/bin");
13334
+ return (process.env.PATH ?? "").split(import_node_path11.default.delimiter).find((dir) => dir && import_node_fs11.default.existsSync(import_node_path11.default.join(dir, "swift"))) ?? image;
12991
13335
  }
12992
13336
  function peachHome() {
12993
13337
  const override = process.env.PEACH_HOME;
12994
- return override ? import_node_path10.default.resolve(override) : import_node_path10.default.join(import_node_os3.default.homedir(), ".peach");
13338
+ return override ? import_node_path11.default.resolve(override) : import_node_path11.default.join(import_node_os3.default.homedir(), ".peach");
12995
13339
  }
12996
13340
  var scratch;
12997
13341
  function swiftEnvironment(base = process.env) {
@@ -12999,18 +13343,23 @@ function swiftEnvironment(base = process.env) {
12999
13343
  return {
13000
13344
  ...base,
13001
13345
  TMPDIR: scratch.directory,
13002
- XDG_CONFIG_HOME: import_node_path10.default.join(scratch.home, ".config"),
13003
- XDG_CACHE_HOME: import_node_path10.default.join(scratch.home, ".cache"),
13004
- XDG_DATA_HOME: import_node_path10.default.join(scratch.home, ".local", "share"),
13346
+ XDG_CONFIG_HOME: import_node_path11.default.join(scratch.home, ".config"),
13347
+ XDG_CACHE_HOME: import_node_path11.default.join(scratch.home, ".cache"),
13348
+ XDG_DATA_HOME: import_node_path11.default.join(scratch.home, ".local", "share"),
13005
13349
  ...process.platform === "linux" ? { HOME: scratch.home } : {}
13006
13350
  };
13007
13351
  }
13008
13352
 
13009
13353
  // src/swift-package-manifest.ts
13010
13354
  function swiftCommand() {
13011
- return import_node_path11.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
13355
+ return import_node_path12.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
13356
+ }
13357
+ function swiftPackageFailure(error) {
13358
+ if (!(error instanceof Error)) return String(error);
13359
+ const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
13360
+ return stderr || error.message;
13012
13361
  }
13013
- var cacheDir2 = import_node_path11.default.join(cacheDir(), "swift-manifests");
13362
+ var cacheDir2 = import_node_path12.default.join(cacheDir(), "swift-manifests");
13014
13363
  var requirementClause = (item) => {
13015
13364
  const url = JSON.stringify(item.url);
13016
13365
  const requirement = item.requirement;
@@ -13050,9 +13399,9 @@ let package = Package(
13050
13399
  ]
13051
13400
  )
13052
13401
  `;
13053
- const dir = import_node_fs11.default.mkdtempSync(import_node_path11.default.join(import_node_os4.default.tmpdir(), "peach-resolve-"));
13402
+ const dir = import_node_fs12.default.mkdtempSync(import_node_path12.default.join(import_node_os4.default.tmpdir(), "peach-resolve-"));
13054
13403
  try {
13055
- import_node_fs11.default.writeFileSync(import_node_path11.default.join(dir, "Package.swift"), manifest);
13404
+ import_node_fs12.default.writeFileSync(import_node_path12.default.join(dir, "Package.swift"), manifest);
13056
13405
  try {
13057
13406
  (0, import_node_child_process2.execFileSync)(
13058
13407
  swiftCommand(),
@@ -13062,7 +13411,7 @@ let package = Package(
13062
13411
  "--package-path",
13063
13412
  dir,
13064
13413
  "--scratch-path",
13065
- import_node_path11.default.join(dir, ".build"),
13414
+ import_node_path12.default.join(dir, ".build"),
13066
13415
  "resolve"
13067
13416
  ],
13068
13417
  {
@@ -13073,24 +13422,24 @@ let package = Package(
13073
13422
  }
13074
13423
  );
13075
13424
  } catch (error) {
13076
- const stderr = error instanceof Error && "stderr" in error ? String(error.stderr).trim() : "";
13077
13425
  throw new Error(
13078
- `swiftpm could not resolve ${clauses.length} package requirements${stderr ? `: ${stderr}` : ""}`
13426
+ `swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
13427
+ { cause: error }
13079
13428
  );
13080
13429
  }
13081
- const resolved = import_node_path11.default.join(dir, "Package.resolved");
13082
- if (!import_node_fs11.default.existsSync(resolved))
13430
+ const resolved = import_node_path12.default.join(dir, "Package.resolved");
13431
+ if (!import_node_fs12.default.existsSync(resolved))
13083
13432
  throw new Error("swift package resolve wrote no Package.resolved");
13084
- import_node_fs11.default.mkdirSync(import_node_path11.default.dirname(destination), { recursive: true });
13085
- import_node_fs11.default.copyFileSync(resolved, destination);
13433
+ import_node_fs12.default.mkdirSync(import_node_path12.default.dirname(destination), { recursive: true });
13434
+ import_node_fs12.default.copyFileSync(resolved, destination);
13086
13435
  } finally {
13087
- import_node_fs11.default.rmSync(dir, { recursive: true, force: true });
13436
+ import_node_fs12.default.rmSync(dir, { recursive: true, force: true });
13088
13437
  }
13089
13438
  }
13090
13439
 
13091
13440
  // src/xcode-json-project.ts
13092
13441
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
13093
- var import_node_path12 = __toESM(require("node:path"), 1);
13442
+ var import_node_path13 = __toESM(require("node:path"), 1);
13094
13443
  var import_json5 = __toESM(require_lib(), 1);
13095
13444
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
13096
13445
  var text = (value) => typeof value === "string" ? value : void 0;
@@ -13148,7 +13497,7 @@ var PHASE_ISA = {
13148
13497
  function readXcodeJsonProject(xcodeproj, source) {
13149
13498
  const json = import_json5.default.parse(source);
13150
13499
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
13151
- const projectDir = import_node_path12.default.dirname(xcodeproj);
13500
+ const projectDir = import_node_path13.default.dirname(xcodeproj);
13152
13501
  const objects = {};
13153
13502
  let next = 0;
13154
13503
  const add = (entry, id) => {
@@ -13161,7 +13510,7 @@ function readXcodeJsonProject(xcodeproj, source) {
13161
13510
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
13162
13511
  if (base) {
13163
13512
  if (base[1] === "PROJECT")
13164
- return { sourceTree: "<absolute>", path: import_node_path12.default.join(projectDir, base[2]) };
13513
+ return { sourceTree: "<absolute>", path: import_node_path13.default.join(projectDir, base[2]) };
13165
13514
  if (base[1] === "PRODUCTS")
13166
13515
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
13167
13516
  return null;
@@ -13169,7 +13518,7 @@ function readXcodeJsonProject(xcodeproj, source) {
13169
13518
  const unescaped = raw.replaceAll("\\<", "<");
13170
13519
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
13171
13520
  if (unescaped.startsWith("~")) return null;
13172
- return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path12.default.join(groupDir, unescaped) };
13521
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path13.default.join(groupDir, unescaped) };
13173
13522
  };
13174
13523
  const memberships = [];
13175
13524
  const folders = [];
@@ -13180,7 +13529,7 @@ function readXcodeJsonProject(xcodeproj, source) {
13180
13529
  const kind = text(entry.kind) ?? "file-reference";
13181
13530
  const raw = text(entry.path) ?? "";
13182
13531
  const located = raw === "" ? null : locate(raw, parent.dir);
13183
- const name2 = text(entry.name) ?? import_node_path12.default.basename(raw);
13532
+ const name2 = text(entry.name) ?? import_node_path13.default.basename(raw);
13184
13533
  const node = { id: "", name: name2, dir: null, parent, children: [] };
13185
13534
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
13186
13535
  node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -13301,7 +13650,7 @@ function readXcodeJsonProject(xcodeproj, source) {
13301
13650
  if (!isObject(entry)) continue;
13302
13651
  const repository = text(entry.repository);
13303
13652
  const local = text(entry.path);
13304
- const name2 = local !== void 0 ? import_node_path12.default.basename(import_node_path12.default.resolve(import_node_path12.default.dirname(xcodeproj), local)) : import_node_path12.default.basename(repository ?? "").replace(/\.git$/, "");
13653
+ const name2 = local !== void 0 ? import_node_path13.default.basename(import_node_path13.default.resolve(import_node_path13.default.dirname(xcodeproj), local)) : import_node_path13.default.basename(repository ?? "").replace(/\.git$/, "");
13305
13654
  const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
13306
13655
  isa: "XCRemoteSwiftPackageReference",
13307
13656
  repositoryURL: repository ?? "",
@@ -13476,7 +13825,23 @@ function isJsonObject(value) {
13476
13825
 
13477
13826
  // src/xcode-project.ts
13478
13827
  var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
13828
+ var CXX_STANDARD_ALIASES = {
13829
+ "c++0x": "c++11",
13830
+ "gnu++0x": "gnu++11"
13831
+ };
13832
+ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
13833
+ "c++98",
13834
+ "gnu++98",
13835
+ "c++0x",
13836
+ "gnu++0x",
13837
+ "c++14",
13838
+ "gnu++14",
13839
+ "c++17",
13840
+ "gnu++17",
13841
+ "compiler-default"
13842
+ ]);
13479
13843
  var APPLICATION = "com.apple.product-type.application";
13844
+ var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
13480
13845
  var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
13481
13846
  "com.apple.product-type.framework",
13482
13847
  "com.apple.product-type.framework.static"
@@ -13494,28 +13859,28 @@ var CONDITIONS = {
13494
13859
  variant: "normal"
13495
13860
  };
13496
13861
  function walkFiles(dir) {
13497
- if (!import_node_fs12.default.existsSync(dir)) return [];
13862
+ if (!import_node_fs13.default.existsSync(dir)) return [];
13498
13863
  const out = [];
13499
- for (const entry of import_node_fs12.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
13864
+ for (const entry of import_node_fs13.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
13500
13865
  if (entry.name.startsWith(".")) continue;
13501
- const full = import_node_path13.default.join(dir, entry.name);
13866
+ const full = import_node_path14.default.join(dir, entry.name);
13502
13867
  if (entry.isDirectory()) out.push(...walkFiles(full));
13503
13868
  else if (entry.isFile()) out.push(full);
13504
13869
  }
13505
13870
  return out;
13506
13871
  }
13507
- var isDirectory = (dir) => import_node_fs12.default.existsSync(dir) && import_node_fs12.default.statSync(dir).isDirectory();
13872
+ var isDirectory = (dir) => import_node_fs13.default.existsSync(dir) && import_node_fs13.default.statSync(dir).isDirectory();
13508
13873
  function readXcconfig(file, read) {
13509
- if (read.includes(file) || !import_node_fs12.default.existsSync(file)) return {};
13874
+ if (read.includes(file) || !import_node_fs13.default.existsSync(file)) return {};
13510
13875
  read.push(file);
13511
13876
  const settings = {};
13512
- for (const raw of import_node_fs12.default.readFileSync(file, "utf8").split("\n")) {
13877
+ for (const raw of import_node_fs13.default.readFileSync(file, "utf8").split("\n")) {
13513
13878
  const line = raw.replace(/\/\/.*$/, "").trim();
13514
13879
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
13515
13880
  if (include) {
13516
13881
  Object.assign(
13517
13882
  settings,
13518
- readXcconfig(import_node_path13.default.resolve(import_node_path13.default.dirname(file), include[1]), read)
13883
+ readXcconfig(import_node_path14.default.resolve(import_node_path14.default.dirname(file), include[1]), read)
13519
13884
  );
13520
13885
  continue;
13521
13886
  }
@@ -13565,22 +13930,22 @@ function decodeXml(text2) {
13565
13930
  return text2.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
13566
13931
  }
13567
13932
  function workspaceReferences(workspace) {
13568
- const data = import_node_path13.default.join(workspace, "contents.xcworkspacedata");
13569
- if (!import_node_fs12.default.existsSync(data))
13933
+ const data = import_node_path14.default.join(workspace, "contents.xcworkspacedata");
13934
+ if (!import_node_fs13.default.existsSync(data))
13570
13935
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
13571
- const container = import_node_path13.default.dirname(workspace);
13936
+ const container = import_node_path14.default.dirname(workspace);
13572
13937
  const locate = (location, base) => {
13573
13938
  const colon = location.indexOf(":");
13574
13939
  const kind = location.slice(0, colon);
13575
13940
  const rest = location.slice(colon + 1);
13576
- if (kind === "group") return import_node_path13.default.resolve(base, rest);
13577
- if (kind === "container" || kind === "self") return import_node_path13.default.resolve(container, rest);
13578
- if (kind === "absolute") return import_node_path13.default.resolve(rest);
13579
- throw new Error(`${import_node_path13.default.basename(workspace)} has an unsupported location ${location}`);
13941
+ if (kind === "group") return import_node_path14.default.resolve(base, rest);
13942
+ if (kind === "container" || kind === "self") return import_node_path14.default.resolve(container, rest);
13943
+ if (kind === "absolute") return import_node_path14.default.resolve(rest);
13944
+ throw new Error(`${import_node_path14.default.basename(workspace)} has an unsupported location ${location}`);
13580
13945
  };
13581
13946
  const groups = [container];
13582
13947
  const references = [];
13583
- for (const [, closing, tag, attributes, selfClosing] of import_node_fs12.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
13948
+ for (const [, closing, tag, attributes, selfClosing] of import_node_fs13.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
13584
13949
  if (closing) {
13585
13950
  if (tag === "Group") groups.pop();
13586
13951
  continue;
@@ -13631,8 +13996,8 @@ function remotePackageRequirements(projects) {
13631
13996
  var loaded2 = /* @__PURE__ */ new Map();
13632
13997
  function xcodeProjectFile(xcodeproj) {
13633
13998
  for (const name2 of ["project.pbxproj", "project.xcproj"]) {
13634
- const file = import_node_path13.default.join(xcodeproj, name2);
13635
- if (import_node_fs12.default.existsSync(file)) return file;
13999
+ const file = import_node_path14.default.join(xcodeproj, name2);
14000
+ if (import_node_fs13.default.existsSync(file)) return file;
13636
14001
  }
13637
14002
  return null;
13638
14003
  }
@@ -13640,8 +14005,8 @@ function loadProject(xcodeproj) {
13640
14005
  const projectFile = xcodeProjectFile(xcodeproj);
13641
14006
  if (!projectFile)
13642
14007
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
13643
- const source = import_node_fs12.default.readFileSync(projectFile, "utf8");
13644
- const digest = (0, import_node_crypto3.createHash)("sha256").update(source).digest("hex");
14008
+ const source = import_node_fs13.default.readFileSync(projectFile, "utf8");
14009
+ const digest = (0, import_node_crypto4.createHash)("sha256").update(source).digest("hex");
13645
14010
  const cached = loaded2.get(projectFile);
13646
14011
  if (cached?.digest === digest) return cached.project;
13647
14012
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -13657,10 +14022,10 @@ function loadProject(xcodeproj) {
13657
14022
  if (!project || project.isa !== "PBXProject") {
13658
14023
  throw new Error(`${projectFile} has no PBXProject root`);
13659
14024
  }
13660
- const projectDir = import_node_fs12.default.realpathSync(
13661
- import_node_path13.default.resolve(import_node_path13.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
14025
+ const projectDir = import_node_fs13.default.realpathSync(
14026
+ import_node_path14.default.resolve(import_node_path14.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
13662
14027
  );
13663
- const resolvePath = xcodePathResolver(objects, projectDir, import_node_path13.default.join);
14028
+ const resolvePath = xcodePathResolver(objects, projectDir, import_node_path14.default.join);
13664
14029
  const result = {
13665
14030
  xcodeproj,
13666
14031
  projectFile,
@@ -13694,8 +14059,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
13694
14059
  const relative3 = str(config.baseConfigurationReferenceRelativePath);
13695
14060
  const own = isDict(config.buildSettings) ? config.buildSettings : {};
13696
14061
  const directory = anchor ? project.resolvePath(anchor) : null;
13697
- const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path13.default.resolve(directory, relative3) : null;
13698
- if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !import_node_fs12.default.existsSync(baseFile)))
14062
+ const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path14.default.resolve(directory, relative3) : null;
14063
+ if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !import_node_fs13.default.existsSync(baseFile)))
13699
14064
  throw new Error(
13700
14065
  `Unable to open base configuration reference file '${baseFile ?? base ?? relative3 ?? anchor}'`
13701
14066
  );
@@ -13751,7 +14116,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
13751
14116
  const derived = (key) => {
13752
14117
  if (key === "AppIdentifierPrefix" || key === "TeamIdentifierPrefix")
13753
14118
  return teamPrefix();
13754
- return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : process.env[key] ?? "";
14119
+ return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : options.environment?.[key] ?? process.env[key] ?? "";
13755
14120
  };
13756
14121
  return {
13757
14122
  get,
@@ -13773,27 +14138,27 @@ function settingList(value) {
13773
14138
  );
13774
14139
  return items2;
13775
14140
  }
13776
- function expandSearchPath(directory, rules) {
13777
- if (import_node_path13.default.basename(directory) !== "**") return [directory];
14141
+ function expandSearchPath(directory, rules2) {
14142
+ if (import_node_path14.default.basename(directory) !== "**") return [directory];
13778
14143
  const expanded = [];
13779
14144
  const seen = /* @__PURE__ */ new Set();
13780
- const queue = [import_node_path13.default.dirname(directory)];
14145
+ const queue = [import_node_path14.default.dirname(directory)];
13781
14146
  for (let at = 0; at < queue.length; at++) {
13782
14147
  const current = queue[at];
13783
14148
  let real;
13784
14149
  try {
13785
- real = import_node_fs12.default.realpathSync(current);
14150
+ real = import_node_fs13.default.realpathSync(current);
13786
14151
  } catch {
13787
14152
  continue;
13788
14153
  }
13789
- if (!import_node_fs12.default.statSync(real).isDirectory() || seen.has(real)) continue;
14154
+ if (!import_node_fs13.default.statSync(real).isDirectory() || seen.has(real)) continue;
13790
14155
  seen.add(real);
13791
14156
  expanded.push(current);
13792
- for (const entry of import_node_fs12.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
13793
- if (entry.isSymbolicLink() ? !rules.followLinks : !entry.isDirectory()) continue;
13794
- if (rules.excluded.some((pattern) => pattern.test(entry.name)) && !rules.included.some((pattern) => pattern.test(entry.name)))
14157
+ for (const entry of import_node_fs13.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
14158
+ if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
14159
+ if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
13795
14160
  continue;
13796
- queue.push(import_node_path13.default.join(current, entry.name));
14161
+ queue.push(import_node_path14.default.join(current, entry.name));
13797
14162
  }
13798
14163
  }
13799
14164
  return expanded;
@@ -13875,14 +14240,14 @@ function shellCopies(script, settings, projectDir) {
13875
14240
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
13876
14241
  return [];
13877
14242
  copies.push({
13878
- from: import_node_path13.default.resolve(projectDir, operands[0]),
13879
- to: import_node_path13.default.resolve(projectDir, operands[1])
14243
+ from: import_node_path14.default.resolve(projectDir, operands[0]),
14244
+ to: import_node_path14.default.resolve(projectDir, operands[1])
13880
14245
  });
13881
14246
  }
13882
14247
  return copies;
13883
14248
  }
13884
14249
  function fileListEntries(file, absolute) {
13885
- return import_node_fs12.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
14250
+ return import_node_fs13.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
13886
14251
  }
13887
14252
  function targetMembers(ref, settings, options, settingKeys, projectInputs) {
13888
14253
  const { project, target, id: targetId } = ref;
@@ -13895,7 +14260,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
13895
14260
  const copiedFiles = [];
13896
14261
  let generatedInfoPlist = false;
13897
14262
  const declaredInfoPlist = settings("INFOPLIST_FILE");
13898
- const infoPlistOutput = declaredInfoPlist ? import_node_path13.default.resolve(project.projectDir, declaredInfoPlist) : null;
14263
+ const infoPlistOutput = declaredInfoPlist ? import_node_path14.default.resolve(project.projectDir, declaredInfoPlist) : null;
13899
14264
  const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
13900
14265
  for (const phaseId of list(target.buildPhases)) {
13901
14266
  const phase = project.object(phaseId);
@@ -13904,7 +14269,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
13904
14269
  copiedFiles.push(
13905
14270
  ...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
13906
14271
  );
13907
- const absolute = (raw) => import_node_path13.default.resolve(project.projectDir, expand(raw, settings));
14272
+ const absolute = (raw) => import_node_path14.default.resolve(project.projectDir, expand(raw, settings));
13908
14273
  const inputs = list(phase.inputPaths).map(absolute);
13909
14274
  const outputs = list(phase.outputPaths).map(absolute);
13910
14275
  const fileLists = /* @__PURE__ */ new Map();
@@ -13913,7 +14278,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
13913
14278
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
13914
14279
  ).map((raw) => {
13915
14280
  const file = absolute(raw);
13916
- if (!import_node_fs12.default.existsSync(file)) {
14281
+ if (!import_node_fs13.default.existsSync(file)) {
13917
14282
  return { file, entries: [] };
13918
14283
  }
13919
14284
  return { file, entries: fileListEntries(file, absolute) };
@@ -13934,13 +14299,13 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
13934
14299
  ...fileLists.get("OUTPUT").map((item) => item.file)
13935
14300
  ];
13936
14301
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
13937
- for (const file of inputFiles) if (import_node_fs12.default.existsSync(file)) projectInputs.add(file);
14302
+ for (const file of inputFiles) if (import_node_fs13.default.existsSync(file)) projectInputs.add(file);
13938
14303
  }
13939
14304
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
13940
- const phaseDir = import_node_path13.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
14305
+ const phaseDir = import_node_path14.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
13941
14306
  for (const lists of fileLists.values())
13942
14307
  for (const { file } of lists)
13943
- if (!import_node_fs12.default.existsSync(file))
14308
+ if (!import_node_fs13.default.existsSync(file))
13944
14309
  throw new Error(
13945
14310
  `${targetName}: Run Script "${script}" missing file list ${file}`
13946
14311
  );
@@ -13959,34 +14324,34 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
13959
14324
  const lists = fileLists.get(kind);
13960
14325
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
13961
14326
  lists.forEach((_item, index) => {
13962
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path13.default.join(
14327
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path14.default.join(
13963
14328
  phaseDir,
13964
14329
  `${kind}-${index}.xcfilelist`
13965
14330
  );
13966
14331
  });
13967
14332
  }
13968
- const signature = (0, import_node_crypto3.createHash)("sha256").update(
14333
+ const signature = (0, import_node_crypto4.createHash)("sha256").update(
13969
14334
  JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
13970
14335
  );
13971
14336
  for (const file of inputFiles) {
13972
14337
  signature.update(file);
13973
- if (import_node_fs12.default.existsSync(file)) {
13974
- const stat = import_node_fs12.default.statSync(file);
14338
+ if (import_node_fs13.default.existsSync(file)) {
14339
+ const stat = import_node_fs13.default.statSync(file);
13975
14340
  signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
13976
14341
  } else signature.update("missing");
13977
14342
  }
13978
14343
  const stamp = signature.digest("hex");
13979
14344
  const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
13980
- if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs12.default.existsSync(file)))
14345
+ if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs13.default.existsSync(file)))
13981
14346
  continue;
13982
- import_node_fs12.default.mkdirSync(phaseDir, { recursive: true });
13983
- import_node_fs12.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
13984
- import_node_fs12.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
14347
+ import_node_fs13.default.mkdirSync(phaseDir, { recursive: true });
14348
+ import_node_fs13.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
14349
+ import_node_fs13.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
13985
14350
  for (const output of allOutputs)
13986
- import_node_fs12.default.mkdirSync(import_node_path13.default.dirname(output), { recursive: true });
14351
+ import_node_fs13.default.mkdirSync(import_node_path14.default.dirname(output), { recursive: true });
13987
14352
  for (const [kind, lists] of fileLists)
13988
14353
  lists.forEach((item, index) => {
13989
- import_node_fs12.default.writeFileSync(
14354
+ import_node_fs13.default.writeFileSync(
13990
14355
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
13991
14356
  `${item.entries.join("\n")}
13992
14357
  `
@@ -14012,7 +14377,7 @@ ${output}`
14012
14377
  );
14013
14378
  }
14014
14379
  const missing2 = allOutputs.filter(
14015
- (file) => file === infoPlistOutput && !import_node_fs12.default.existsSync(file)
14380
+ (file) => file === infoPlistOutput && !import_node_fs13.default.existsSync(file)
14016
14381
  );
14017
14382
  if (missing2.length > 0)
14018
14383
  throw new Error(
@@ -14025,8 +14390,8 @@ ${output}`
14025
14390
  project.objects,
14026
14391
  targetId,
14027
14392
  project.resolvePath,
14028
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs12.default.existsSync(file) ? [file] : [],
14029
- import_node_path13.default.join,
14393
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs13.default.existsSync(file) ? [file] : [],
14394
+ import_node_path14.default.join,
14030
14395
  (file, kind) => {
14031
14396
  if (kind === "header") {
14032
14397
  headers.add(file);
@@ -14036,9 +14401,9 @@ ${output}`
14036
14401
  resources.add(file);
14037
14402
  return;
14038
14403
  }
14039
- if (!import_node_fs12.default.existsSync(file)) {
14404
+ if (!import_node_fs13.default.existsSync(file)) {
14040
14405
  if (options.requireSources === false) return;
14041
- const script = scriptForOutput.get(import_node_path13.default.normalize(file));
14406
+ const script = scriptForOutput.get(import_node_path14.default.normalize(file));
14042
14407
  throw new Error(
14043
14408
  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}`
14044
14409
  );
@@ -14049,8 +14414,8 @@ ${output}`
14049
14414
  );
14050
14415
  for (const [file] of scriptForOutput) {
14051
14416
  if (sources.has(file) || allSources.has(file)) continue;
14052
- if (!import_node_fs12.default.existsSync(file)) continue;
14053
- const canonical = import_node_fs12.default.realpathSync(file);
14417
+ if (!import_node_fs13.default.existsSync(file)) continue;
14418
+ const canonical = import_node_fs13.default.realpathSync(file);
14054
14419
  if (sources.has(canonical) || allSources.has(canonical)) continue;
14055
14420
  allSources.add(canonical);
14056
14421
  sources.add(canonical);
@@ -14067,37 +14432,37 @@ ${output}`
14067
14432
  function commonAncestor(dirs) {
14068
14433
  let common = dirs[0];
14069
14434
  for (const dir of dirs) {
14070
- while (common !== import_node_path13.default.dirname(common) && import_node_path13.default.relative(common, dir).startsWith(".."))
14071
- common = import_node_path13.default.dirname(common);
14435
+ while (common !== import_node_path14.default.dirname(common) && import_node_path14.default.relative(common, dir).startsWith(".."))
14436
+ common = import_node_path14.default.dirname(common);
14072
14437
  }
14073
14438
  return common;
14074
14439
  }
14075
- var isPodsProject = (xcodeproj) => import_node_path13.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path13.default.basename(import_node_path13.default.dirname(xcodeproj)) === "Pods";
14440
+ var isPodsProject = (xcodeproj) => import_node_path14.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path14.default.basename(import_node_path14.default.dirname(xcodeproj)) === "Pods";
14076
14441
  function installedPodsSandbox(pods) {
14077
- const podfileLock = import_node_path13.default.join(import_node_path13.default.dirname(pods), "Podfile.lock");
14078
- const manifestLock = import_node_path13.default.join(pods, "Manifest.lock");
14079
- if (!import_node_fs12.default.existsSync(podfileLock))
14442
+ const podfileLock = import_node_path14.default.join(import_node_path14.default.dirname(pods), "Podfile.lock");
14443
+ const manifestLock = import_node_path14.default.join(pods, "Manifest.lock");
14444
+ if (!import_node_fs13.default.existsSync(podfileLock))
14080
14445
  throw new Error(
14081
- `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path13.default.dirname(pods)}`
14446
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path14.default.dirname(pods)}`
14082
14447
  );
14083
- if (!import_node_fs12.default.existsSync(manifestLock) || !import_node_fs12.default.readFileSync(manifestLock).equals(import_node_fs12.default.readFileSync(podfileLock)))
14448
+ if (!import_node_fs13.default.existsSync(manifestLock) || !import_node_fs13.default.readFileSync(manifestLock).equals(import_node_fs13.default.readFileSync(podfileLock)))
14084
14449
  throw new Error(
14085
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path13.default.dirname(pods)}`
14450
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path14.default.dirname(pods)}`
14086
14451
  );
14087
14452
  const specChecksums = {};
14088
- const lines = import_node_fs12.default.readFileSync(manifestLock, "utf8").split("\n");
14453
+ const lines = import_node_fs13.default.readFileSync(manifestLock, "utf8").split("\n");
14089
14454
  const start = lines.indexOf("SPEC CHECKSUMS:");
14090
14455
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
14091
14456
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
14092
14457
  if (!entry) break;
14093
14458
  specChecksums[entry[1]] = entry[2];
14094
14459
  }
14095
- const specs = import_node_path13.default.join(pods, "Local Podspecs");
14460
+ const specs = import_node_path14.default.join(pods, "Local Podspecs");
14096
14461
  return {
14097
14462
  podfileLock,
14098
14463
  manifestLock,
14099
14464
  specChecksums,
14100
- localPodspecs: isDirectory(specs) ? import_node_fs12.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path13.default.join(specs, name2)) : []
14465
+ localPodspecs: isDirectory(specs) ? import_node_fs13.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path14.default.join(specs, name2)) : []
14101
14466
  };
14102
14467
  }
14103
14468
  function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
@@ -14109,14 +14474,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
14109
14474
  if (!xcodeProjectFile(xcodeproj)) {
14110
14475
  if (installedPods && isPodsProject(xcodeproj))
14111
14476
  throw new Error(
14112
- `${import_node_path13.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path13.default.dirname(import_node_path13.default.dirname(xcodeproj))}`
14477
+ `${import_node_path14.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path14.default.dirname(import_node_path14.default.dirname(xcodeproj))}`
14113
14478
  );
14114
14479
  return;
14115
14480
  }
14116
- const key = import_node_fs12.default.realpathSync(xcodeproj);
14117
- if (projectAt.has(key) || !installedPods && key.split(import_node_path13.default.sep).includes("Pods"))
14481
+ const key = import_node_fs13.default.realpathSync(xcodeproj);
14482
+ if (projectAt.has(key) || !installedPods && key.split(import_node_path14.default.sep).includes("Pods"))
14118
14483
  return;
14119
- if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path13.default.dirname(key));
14484
+ if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path14.default.dirname(key));
14120
14485
  const project = loadProject(key);
14121
14486
  projectAt.set(key, project);
14122
14487
  projects.push(project);
@@ -14132,12 +14497,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
14132
14497
  for (const reference of listed)
14133
14498
  if (reference.endsWith(".xcodeproj")) addProject(reference);
14134
14499
  if (projects.length === 0) {
14135
- throw new Error(`${import_node_path13.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
14500
+ throw new Error(`${import_node_path14.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
14136
14501
  }
14137
- const podfile = import_node_path13.default.join(import_node_path13.default.dirname(xcodeprojOrWorkspace), "Podfile");
14138
- if (installedPods && !cocoapods && import_node_fs12.default.existsSync(podfile))
14502
+ const podfile = import_node_path14.default.join(import_node_path14.default.dirname(xcodeprojOrWorkspace), "Podfile");
14503
+ if (installedPods && !cocoapods && import_node_fs13.default.existsSync(podfile))
14139
14504
  throw new Error(
14140
- `${podfile} is not installed into ${import_node_path13.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path13.default.dirname(podfile)} and open the workspace it writes`
14505
+ `${podfile} is not installed into ${import_node_path14.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path14.default.dirname(podfile)} and open the workspace it writes`
14141
14506
  );
14142
14507
  return { listed, projects, projectAt, cocoapods };
14143
14508
  }
@@ -14173,7 +14538,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
14173
14538
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
14174
14539
  }
14175
14540
  function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
14176
- const xcodeprojOrWorkspace = import_node_fs12.default.realpathSync(input);
14541
+ const xcodeprojOrWorkspace = import_node_fs13.default.realpathSync(input);
14177
14542
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
14178
14543
  const { listed, projects, projectAt, cocoapods } = workspaceProjects(
14179
14544
  xcodeprojOrWorkspace,
@@ -14182,7 +14547,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14182
14547
  const allTargets = projects.flatMap(projectTargets);
14183
14548
  const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
14184
14549
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
14185
- const container = import_node_path13.default.basename(xcodeprojOrWorkspace);
14550
+ const container = import_node_path14.default.basename(xcodeprojOrWorkspace);
14186
14551
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
14187
14552
  if (named.length !== 1) {
14188
14553
  throw new Error(
@@ -14195,15 +14560,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14195
14560
  for (const ref of allTargets) {
14196
14561
  const product = ref.project.object(str(ref.target.productReference));
14197
14562
  const file = str(product?.path);
14198
- if (file && !byProduct.has(import_node_path13.default.basename(file)))
14199
- byProduct.set(import_node_path13.default.basename(file), ref);
14563
+ if (file && !byProduct.has(import_node_path14.default.basename(file)))
14564
+ byProduct.set(import_node_path14.default.basename(file), ref);
14200
14565
  }
14201
14566
  const proxied = (project, proxyId) => {
14202
14567
  const proxy = project.object(proxyId);
14203
14568
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
14204
14569
  const portal = str(proxy.containerPortal);
14205
14570
  const portalPath = project.resolvePath(portal ?? "");
14206
- const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs12.default.existsSync(portalPath) ? projectAt.get(import_node_fs12.default.realpathSync(portalPath)) : void 0;
14571
+ const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs13.default.existsSync(portalPath) ? projectAt.get(import_node_fs13.default.realpathSync(portalPath)) : void 0;
14207
14572
  const remote = str(proxy.remoteGlobalIDString);
14208
14573
  if (!owner || !remote) return void 0;
14209
14574
  return projectTargets(owner).find(
@@ -14224,12 +14589,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14224
14589
  if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
14225
14590
  for (const buildFileId of list(phase.files)) {
14226
14591
  const file = project.object(str(project.object(buildFileId)?.fileRef));
14227
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path13.default.basename(str(file.path) ?? "")) : void 0;
14592
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path14.default.basename(str(file.path) ?? "")) : void 0;
14228
14593
  if (resolved) found.push(resolved);
14229
14594
  }
14230
14595
  }
14231
14596
  return found.filter(
14232
- (candidate) => candidate.target.isa === "PBXAggregateTarget" || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
14597
+ (candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
14233
14598
  );
14234
14599
  };
14235
14600
  const order = [];
@@ -14273,8 +14638,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14273
14638
  ref.project.objects,
14274
14639
  ref.id,
14275
14640
  ref.project.resolvePath,
14276
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs12.default.existsSync(file) ? [file] : [],
14277
- import_node_path13.default.join,
14641
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs13.default.existsSync(file) ? [file] : [],
14642
+ import_node_path14.default.join,
14278
14643
  (file, kind) => {
14279
14644
  if (kind === "header") found.push(file);
14280
14645
  }
@@ -14290,12 +14655,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14290
14655
  for (const ref of projectTargets(project)) {
14291
14656
  const product = productName(ref);
14292
14657
  for (const { file, visibility } of headerPhase(ref)) {
14293
- const name2 = import_node_path13.default.basename(file);
14658
+ const name2 = import_node_path14.default.basename(file);
14294
14659
  if (!entries.has(name2))
14295
14660
  entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
14296
14661
  }
14297
14662
  for (const file of synchronizedHeaders(ref)) {
14298
- const name2 = import_node_path13.default.basename(file);
14663
+ const name2 = import_node_path14.default.basename(file);
14299
14664
  if (!entries.has(name2)) entries.set(name2, file);
14300
14665
  }
14301
14666
  }
@@ -14305,7 +14670,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14305
14670
  if (folder === null) continue;
14306
14671
  for (const file of walkFiles(folder)) {
14307
14672
  if (!HEADER_FILE.test(file)) continue;
14308
- const name2 = import_node_path13.default.basename(file);
14673
+ const name2 = import_node_path14.default.basename(file);
14309
14674
  if (!entries.has(name2)) entries.set(name2, file);
14310
14675
  }
14311
14676
  }
@@ -14313,18 +14678,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14313
14678
  for (const id of Object.keys(project.objects)) {
14314
14679
  if (project.object(id)?.isa !== "PBXFileReference") continue;
14315
14680
  const file = project.resolvePath(id);
14316
- if (file && HEADER_FILE.test(file) && !entries.has(import_node_path13.default.basename(file)))
14317
- entries.set(import_node_path13.default.basename(file), file);
14681
+ if (file && HEADER_FILE.test(file) && !entries.has(import_node_path14.default.basename(file)))
14682
+ entries.set(import_node_path14.default.basename(file), file);
14318
14683
  }
14319
14684
  const map2 = [...entries];
14320
14685
  projectHeaderMaps.set(project, map2);
14321
14686
  return map2;
14322
14687
  };
14323
14688
  const xcconfigs = /* @__PURE__ */ new Set();
14324
- const buildDir = (project) => import_node_path13.default.join(project.projectDir, ".build/peach-xcode/Build");
14689
+ const buildDir = (project) => import_node_path14.default.join(project.projectDir, ".build/peach-xcode/Build");
14325
14690
  const podsBuild = {
14326
- SYMROOT: import_node_path13.default.join(buildDir(app.project), "Products"),
14327
- OBJROOT: import_node_path13.default.join(buildDir(app.project), "Intermediates.noindex")
14691
+ SYMROOT: import_node_path14.default.join(buildDir(app.project), "Products"),
14692
+ OBJROOT: import_node_path14.default.join(buildDir(app.project), "Intermediates.noindex")
14328
14693
  };
14329
14694
  const moduleTarget = (ref) => {
14330
14695
  const name2 = str(ref.target.name) ?? ref.id;
@@ -14339,18 +14704,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14339
14704
  TARGET_NAME: name2,
14340
14705
  TARGETNAME: "$(TARGET_NAME)",
14341
14706
  PROJECT: "$(PROJECT_NAME)",
14342
- PROJECT_NAME: import_node_path13.default.basename(ref.project.xcodeproj, ".xcodeproj"),
14707
+ PROJECT_NAME: import_node_path14.default.basename(ref.project.xcodeproj, ".xcodeproj"),
14343
14708
  PROJECT_FILE_PATH: ref.project.xcodeproj,
14344
14709
  SRCROOT: ref.project.projectDir,
14345
14710
  SOURCE_ROOT: ref.project.projectDir,
14346
14711
  PROJECT_DIR: ref.project.projectDir,
14347
- SYMROOT: import_node_path13.default.join(buildDir(ref.project), "Products"),
14712
+ SYMROOT: import_node_path14.default.join(buildDir(ref.project), "Products"),
14348
14713
  BUILD_DIR: "$(SYMROOT)",
14349
14714
  BUILD_ROOT: "$(SYMROOT)",
14350
- OBJROOT: import_node_path13.default.join(buildDir(ref.project), "Intermediates.noindex"),
14715
+ OBJROOT: import_node_path14.default.join(buildDir(ref.project), "Intermediates.noindex"),
14351
14716
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
14352
14717
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
14353
14718
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
14719
+ UNLOCALIZED_RESOURCES_FOLDER_PATH: str(ref.project.object(str(ref.target.productReference))?.path) ?? "",
14354
14720
  PROJECT_TEMP_DIR: "$(OBJROOT)/$(PROJECT_NAME).build",
14355
14721
  CONFIGURATION_TEMP_DIR: "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
14356
14722
  TARGET_TEMP_DIR: "$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME).build",
@@ -14358,6 +14724,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14358
14724
  TEMP_FILES_DIR: "$(TEMP_DIR)",
14359
14725
  TEMP_FILE_DIR: "$(TEMP_DIR)",
14360
14726
  TEMP_ROOT: "$(OBJROOT)",
14727
+ OBJECT_FILE_DIR: "$(TARGET_TEMP_DIR)/Objects",
14728
+ // the per-variant object directory carries no arch: xcode defines
14729
+ // OBJECT_FILE_DIR_normal as OBJECT_FILE_DIR-normal, and the target
14730
+ // appends $(CURRENT_ARCH) itself for the per-arch directory.
14731
+ OBJECT_FILE_DIR_normal: "$(OBJECT_FILE_DIR)-normal",
14361
14732
  DERIVED_FILE_DIR: "$(TARGET_TEMP_DIR)/DerivedSources",
14362
14733
  DERIVED_FILES_DIR: "$(DERIVED_FILE_DIR)",
14363
14734
  DERIVED_SOURCES_DIR: "$(DERIVED_FILE_DIR)",
@@ -14381,7 +14752,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14381
14752
  xcconfigs
14382
14753
  );
14383
14754
  const searchRules = recursiveSearchRules(settings2);
14384
- const absolute = (file) => import_node_path13.default.resolve(ref.project.projectDir, file);
14755
+ const absolute = (file) => import_node_path14.default.resolve(ref.project.projectDir, file);
14385
14756
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
14386
14757
  const product = settings2("PRODUCT_NAME");
14387
14758
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -14412,7 +14783,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14412
14783
  `${name2}: Swift compatibility header phase has no Swift producer sources`
14413
14784
  );
14414
14785
  const building = options.prepareGeneratedSources && options.requireSources !== false;
14415
- const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path13.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
14786
+ const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path14.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
14416
14787
  if (versioning) {
14417
14788
  const version = settings2("CURRENT_PROJECT_VERSION");
14418
14789
  const custom = [
@@ -14425,7 +14796,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14425
14796
  ].filter((key) => settings2(key));
14426
14797
  if (custom.length)
14427
14798
  throw new Error(
14428
- `${name2}: Xcode generates ${import_node_path13.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
14799
+ `${name2}: Xcode generates ${import_node_path14.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
14429
14800
  );
14430
14801
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
14431
14802
  const [major, minor] = version.split(".");
@@ -14438,9 +14809,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14438
14809
  ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
14439
14810
  ""
14440
14811
  ].join("\n");
14441
- if (!import_node_fs12.default.existsSync(versioning) || import_node_fs12.default.readFileSync(versioning, "utf8") !== unit) {
14442
- import_node_fs12.default.mkdirSync(import_node_path13.default.dirname(versioning), { recursive: true });
14443
- import_node_fs12.default.writeFileSync(versioning, unit);
14812
+ if (!import_node_fs13.default.existsSync(versioning) || import_node_fs13.default.readFileSync(versioning, "utf8") !== unit) {
14813
+ import_node_fs13.default.mkdirSync(import_node_path14.default.dirname(versioning), { recursive: true });
14814
+ import_node_fs13.default.writeFileSync(versioning, unit);
14444
14815
  }
14445
14816
  allSources.push(versioning);
14446
14817
  }
@@ -14459,7 +14830,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14459
14830
  const headerFiles = headerPhase(ref);
14460
14831
  const ownHeaders = /* @__PURE__ */ new Map();
14461
14832
  for (const { file, visibility } of headerFiles) {
14462
- const name3 = import_node_path13.default.basename(file);
14833
+ const name3 = import_node_path14.default.basename(file);
14463
14834
  const published = visibility !== "Project";
14464
14835
  if (!ownHeaders.has(name3))
14465
14836
  ownHeaders.set(name3, published ? `${product}/${name3}` : file);
@@ -14467,7 +14838,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14467
14838
  ownHeaders.set(`${product}/${name3}`, file);
14468
14839
  }
14469
14840
  for (const file of synchronizedHeaders(ref)) {
14470
- const name3 = import_node_path13.default.basename(file);
14841
+ const name3 = import_node_path14.default.basename(file);
14471
14842
  if (ownHeaders.has(name3)) continue;
14472
14843
  ownHeaders.set(name3, file);
14473
14844
  const qualified = `${product}/${name3}`;
@@ -14479,16 +14850,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14479
14850
  const otherProduct = productName(other);
14480
14851
  for (const { file, visibility } of headerPhase(other)) {
14481
14852
  if (visibility === "Project") continue;
14482
- const key = `${otherProduct}/${import_node_path13.default.basename(file)}`;
14853
+ const key = `${otherProduct}/${import_node_path14.default.basename(file)}`;
14483
14854
  if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
14484
14855
  }
14485
14856
  }
14486
- const wrapper = import_node_path13.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
14857
+ const wrapper = import_node_path14.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
14487
14858
  const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
14488
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path13.default.relative(import_node_path13.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path13.default.sep)[0] !== ".." && import_node_fs12.default.existsSync(moduleMap) ? import_node_fs12.default.readdirSync(import_node_path13.default.dirname(moduleMap)).flatMap((entry) => {
14859
+ const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path14.default.join(import_node_path14.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
14860
+ const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs13.default.existsSync(moduleMap) && import_node_fs13.default.existsSync(frameworkUmbrella) ? {
14861
+ framework: true,
14862
+ moduleMap,
14863
+ umbrella: frameworkUmbrella,
14864
+ outputModuleMap: import_node_path14.default.join(wrapper, "Modules", "module.modulemap"),
14865
+ outputUmbrella: import_node_path14.default.join(
14866
+ wrapper,
14867
+ "Headers",
14868
+ import_node_path14.default.basename(frameworkUmbrella)
14869
+ ),
14870
+ outputHeader: import_node_path14.default.join(
14871
+ wrapper,
14872
+ "Headers",
14873
+ settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
14874
+ )
14875
+ } : null;
14876
+ const swiftCompatibility = compatibility ? {
14877
+ framework: false,
14878
+ moduleMap: compatibility.moduleMap,
14879
+ umbrella: compatibility.umbrella,
14880
+ outputModuleMap: compatibility.outputModuleMap,
14881
+ outputUmbrella: compatibility.outputUmbrella,
14882
+ outputHeader: compatibility.outputHeader
14883
+ } : frameworkCompatibility;
14884
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path14.default.relative(import_node_path14.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path14.default.sep)[0] !== ".." && import_node_fs13.default.existsSync(moduleMap) ? import_node_fs13.default.readdirSync(import_node_path14.default.dirname(moduleMap)).flatMap((entry) => {
14489
14885
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
14490
- const file = import_node_path13.default.join(import_node_path13.default.dirname(moduleMap), entry);
14491
- return import_node_fs12.default.existsSync(file) ? [file] : [];
14886
+ const file = import_node_path14.default.join(import_node_path14.default.dirname(moduleMap), entry);
14887
+ return import_node_fs13.default.existsSync(file) ? [file] : [];
14492
14888
  }) : [];
14493
14889
  const fileFlags = {};
14494
14890
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -14506,6 +14902,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14506
14902
  );
14507
14903
  }
14508
14904
  }
14905
+ const cStandard = settings2("GCC_C_LANGUAGE_STANDARD");
14906
+ const cxxStandard = settings2("CLANG_CXX_LANGUAGE_STANDARD");
14509
14907
  return {
14510
14908
  settings: settings2,
14511
14909
  keys,
@@ -14531,13 +14929,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14531
14929
  swift: {
14532
14930
  flags: settingList(settings2("OTHER_SWIFT_FLAGS")),
14533
14931
  includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
14534
- compatibility: compatibility ? {
14535
- moduleMap: compatibility.moduleMap,
14536
- umbrella: compatibility.umbrella,
14537
- outputModuleMap: compatibility.outputModuleMap,
14538
- outputUmbrella: compatibility.outputUmbrella,
14539
- outputHeader: compatibility.outputHeader
14540
- } : null
14932
+ compatibility: swiftCompatibility
14541
14933
  }
14542
14934
  } : {},
14543
14935
  ...native ? {
@@ -14553,7 +14945,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14553
14945
  ...headers,
14554
14946
  ...Object.keys(ref.project.objects).flatMap((id) => {
14555
14947
  const file = ref.project.resolvePath(id);
14556
- return file && HEADER_FILE.test(file) && import_node_fs12.default.existsSync(file) ? [file] : [];
14948
+ return file && HEADER_FILE.test(file) && import_node_fs13.default.existsSync(file) ? [file] : [];
14557
14949
  })
14558
14950
  ])
14559
14951
  ],
@@ -14562,15 +14954,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14562
14954
  // xcode searches its products' include directory before
14563
14955
  // HEADER_SEARCH_PATHS and the target's derived sources after.
14564
14956
  headerSearchPaths: [
14565
- import_node_path13.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
14957
+ import_node_path14.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
14566
14958
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
14567
14959
  (raw) => expandSearchPath(absolute(raw), searchRules)
14568
14960
  ),
14569
- import_node_path13.default.join(
14961
+ import_node_path14.default.join(
14570
14962
  `${settings2("DERIVED_FILE_DIR")}-normal`,
14571
14963
  settings2("CURRENT_ARCH")
14572
14964
  ),
14573
- import_node_path13.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
14965
+ import_node_path14.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
14574
14966
  settings2("DERIVED_FILE_DIR")
14575
14967
  ],
14576
14968
  userHeaderSearchPaths: settingList(
@@ -14587,14 +14979,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14587
14979
  settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
14588
14980
  ...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
14589
14981
  ...settings2("CLANG_ENABLE_MODULES") === "YES" ? ["-fmodules"] : [],
14590
- ...settings2("GCC_C_LANGUAGE_STANDARD") ? [`-std=${settings2("GCC_C_LANGUAGE_STANDARD")}`] : [],
14982
+ ...cStandard && cStandard !== "compiler-default" ? [`-std=${cStandard}`] : [],
14591
14983
  ...settingList(settings2("GCC_PREPROCESSOR_DEFINITIONS")).map(
14592
14984
  (value) => `-D${value}`
14593
14985
  ),
14594
14986
  ...settingList(settings2("OTHER_CFLAGS"))
14595
14987
  ],
14596
14988
  cxxFlags: [
14597
- ...settings2("CLANG_CXX_LANGUAGE_STANDARD") ? [`-std=${settings2("CLANG_CXX_LANGUAGE_STANDARD")}`] : [],
14989
+ ...cxxStandard && cxxStandard !== "compiler-default" ? [`-std=${CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard}`] : [],
14990
+ // clang.xcspec's hidden CLANG_DISABLE_CXX_MODULES (default
14991
+ // YES) keeps c++ and objective-c++ units out of modules when
14992
+ // modules are on or the standard is c++20 or later.
14993
+ ...settings2("CLANG_DISABLE_CXX_MODULES") !== "NO" && (settings2("CLANG_ENABLE_MODULES") === "YES" || !PRE_CXX20_STANDARDS.has(cxxStandard || "compiler-default")) ? ["-fno-cxx-modules"] : [],
14598
14994
  ...settingList(settings2("OTHER_CPLUSPLUSFLAGS"))
14599
14995
  ],
14600
14996
  fileFlags,
@@ -14610,16 +15006,42 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14610
15006
  ...headerFiles.flatMap(
14611
15007
  ({ file, visibility }) => visibility === "Project" ? [] : [
14612
15008
  [
14613
- import_node_path13.default.join(
15009
+ import_node_path14.default.join(
14614
15010
  wrapper,
14615
15011
  visibility === "Public" ? "Headers" : "PrivateHeaders",
14616
- import_node_path13.default.basename(file)
15012
+ import_node_path14.default.basename(file)
14617
15013
  ),
14618
15014
  file
14619
15015
  ]
14620
15016
  ]
14621
15017
  ),
14622
- ...moduleMap ? [[import_node_path13.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
15018
+ // a copy files phase into the products directory, as
15019
+ // cocoapods writes for each header_mappings_dir folder.
15020
+ ...list(ref.target.buildPhases).flatMap((phaseId) => {
15021
+ const phase = ref.project.object(phaseId);
15022
+ if (phase?.isa !== "PBXCopyFilesBuildPhase" || str(phase.dstSubfolderSpec) !== "16")
15023
+ return [];
15024
+ const destination = expand(
15025
+ str(phase.dstPath) ?? "",
15026
+ (name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path14.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path14.default.join(wrapper, "PrivateHeaders") : settings2(name3)
15027
+ );
15028
+ return list(phase.files).flatMap((id) => {
15029
+ const file = ref.project.resolvePath(
15030
+ str(ref.project.object(id)?.fileRef) ?? ""
15031
+ );
15032
+ return file && HEADER_FILE.test(file) ? [
15033
+ [
15034
+ import_node_path14.default.resolve(
15035
+ settings2("BUILT_PRODUCTS_DIR"),
15036
+ destination,
15037
+ import_node_path14.default.basename(file)
15038
+ ),
15039
+ file
15040
+ ]
15041
+ ] : [];
15042
+ });
15043
+ }),
15044
+ ...moduleMap ? [[import_node_path14.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
14623
15045
  ]) : Object.fromEntries(podHeaders.map((file) => [file, file]))
14624
15046
  }
14625
15047
  } : {}
@@ -14628,29 +15050,94 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14628
15050
  };
14629
15051
  const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
14630
15052
  const { settings, keys: settingKeys, module: module2 } = builtTargets.at(-1);
14631
- const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => ref.target.isa === "PBXNativeTarget").map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
15053
+ const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
14632
15054
  const frameworks = frameworkTargets.map(({ framework }) => framework);
14633
15055
  const podSourceDirs = frameworkTargets.flatMap(
14634
- ({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path13.default.dirname(file)).filter((dir) => import_node_fs12.default.existsSync(dir)) : []
15056
+ ({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path14.default.dirname(file)).filter((dir) => import_node_fs13.default.existsSync(dir)) : []
14635
15057
  );
14636
- const expandValue = (value) => {
14637
- if (typeof value === "string") return expand(value, settings);
14638
- if (Array.isArray(value)) return value.map(expandValue);
15058
+ const expandValue = (value, settings2) => {
15059
+ if (typeof value === "string") return expand(value, settings2);
15060
+ if (Array.isArray(value)) return value.map((item) => expandValue(item, settings2));
14639
15061
  if (typeof value === "object" && !(value instanceof Date) && !Buffer.isBuffer(value)) {
14640
15062
  return Object.fromEntries(
14641
- Object.entries(value).map(([key, value2]) => [key, expandValue(value2)])
15063
+ Object.entries(value).map(([key, value2]) => [key, expandValue(value2, settings2)])
14642
15064
  );
14643
15065
  }
14644
15066
  return value;
14645
15067
  };
14646
- const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path13.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
15068
+ const resourceProducts = [];
15069
+ const bundleTargets = builtTargets.filter(
15070
+ ({ ref }) => ref.target.productType === RESOURCE_BUNDLE
15071
+ );
15072
+ for (const owner of options.installedPods ? builtTargets : []) {
15073
+ for (const phaseId of list(owner.ref.target.buildPhases)) {
15074
+ const phase = owner.ref.project.object(phaseId);
15075
+ if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
15076
+ continue;
15077
+ const absolute = (raw) => import_node_path14.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
15078
+ const entries = (paths) => paths.flatMap((raw) => {
15079
+ const file = absolute(raw);
15080
+ xcconfigs.add(file);
15081
+ return fileListEntries(file, absolute);
15082
+ });
15083
+ const inputs = entries(list(phase.inputFileListPaths)).filter(
15084
+ (file) => file.endsWith(".bundle")
15085
+ );
15086
+ const outputs = entries(list(phase.outputFileListPaths)).filter(
15087
+ (file) => file.endsWith(".bundle")
15088
+ );
15089
+ if (inputs.length !== outputs.length)
15090
+ throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
15091
+ const destinationRoot = import_node_path14.default.join(
15092
+ owner.settings("TARGET_BUILD_DIR"),
15093
+ owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
15094
+ );
15095
+ for (const [index, input2] of inputs.entries()) {
15096
+ const product = bundleTargets.find((target) => {
15097
+ const file = str(
15098
+ target.ref.project.object(str(target.ref.target.productReference))?.path
15099
+ );
15100
+ return file && import_node_path14.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
15101
+ });
15102
+ if (!product)
15103
+ throw new Error(
15104
+ `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
15105
+ );
15106
+ const destination = import_node_path14.default.relative(destinationRoot, outputs[index]);
15107
+ if (destination === ".." || destination.startsWith(`..${import_node_path14.default.sep}`) || import_node_path14.default.isAbsolute(destination) || import_node_path14.default.basename(input2) !== import_node_path14.default.basename(destination))
15108
+ throw new Error(
15109
+ `${owner.module.name}: invalid resource bundle copy destination`
15110
+ );
15111
+ const infoFile = import_node_path14.default.resolve(
15112
+ product.ref.project.projectDir,
15113
+ product.settings("INFOPLIST_FILE")
15114
+ );
15115
+ xcconfigs.add(infoFile);
15116
+ const parsed = import_plist3.default.parse(import_node_fs13.default.readFileSync(infoFile, "utf8"));
15117
+ const infoPlist = import_plist3.default.build(expandValue(parsed, product.settings));
15118
+ const prefix2 = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
15119
+ const bundlePath = prefix2 + destination.split(import_node_path14.default.sep).join("/");
15120
+ if (resourceProducts.some((resource) => resource.path === bundlePath))
15121
+ throw new Error(
15122
+ `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
15123
+ );
15124
+ resourceProducts.push({
15125
+ path: bundlePath,
15126
+ resources: product.module.resources,
15127
+ infoPlist
15128
+ });
15129
+ }
15130
+ }
15131
+ }
15132
+ const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path14.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
14647
15133
  const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
14648
- const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs12.default.readFileSync(infoPlistFile, "utf8")) : {};
15134
+ const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs13.default.readFileSync(infoPlistFile, "utf8")) : {};
14649
15135
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
14650
15136
  throw new Error(`${module2.name} Info.plist must contain a dictionary`);
14651
15137
  }
14652
15138
  const info = {};
14653
- for (const [key, value] of Object.entries(sourceInfo)) info[key] = expandValue(value);
15139
+ for (const [key, value] of Object.entries(sourceInfo))
15140
+ info[key] = expandValue(value, settings);
14654
15141
  for (const key of settingKeys) {
14655
15142
  if (!key.startsWith("INFOPLIST_KEY_") || key.endsWith("_Generation")) continue;
14656
15143
  const value = settings(key);
@@ -14673,7 +15160,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14673
15160
  };
14674
15161
  }
14675
15162
  const localPackageDirs = [
14676
- ...listed.filter((reference) => import_node_fs12.default.existsSync(import_node_path13.default.join(reference, "Package.swift"))),
15163
+ ...listed.filter((reference) => import_node_fs13.default.existsSync(import_node_path14.default.join(reference, "Package.swift"))),
14677
15164
  ...projects.flatMap(
14678
15165
  (project) => Object.entries(project.objects).flatMap(([id, entry]) => {
14679
15166
  if (!isDict(entry)) return [];
@@ -14683,19 +15170,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14683
15170
  const packages = [];
14684
15171
  while (pending.length > 0) {
14685
15172
  const dir = pending.pop();
14686
- if (import_node_fs12.default.existsSync(import_node_path13.default.join(dir, "Package.swift"))) {
15173
+ if (import_node_fs13.default.existsSync(import_node_path14.default.join(dir, "Package.swift"))) {
14687
15174
  packages.push(dir);
14688
15175
  continue;
14689
15176
  }
14690
15177
  if (!isDirectory(dir)) continue;
14691
- for (const child of import_node_fs12.default.readdirSync(dir, { withFileTypes: true }))
15178
+ for (const child of import_node_fs13.default.readdirSync(dir, { withFileTypes: true }))
14692
15179
  if (child.isDirectory() && !child.name.startsWith("."))
14693
- pending.push(import_node_path13.default.join(dir, child.name));
15180
+ pending.push(import_node_path14.default.join(dir, child.name));
14694
15181
  }
14695
15182
  return packages;
14696
15183
  }
14697
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path13.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
14698
- return candidate && import_node_fs12.default.existsSync(import_node_path13.default.join(candidate, "Package.swift")) ? [candidate] : [];
15184
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path14.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
15185
+ return candidate && import_node_fs13.default.existsSync(import_node_path14.default.join(candidate, "Package.swift")) ? [candidate] : [];
14699
15186
  })
14700
15187
  )
14701
15188
  ];
@@ -14716,12 +15203,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14716
15203
  const linkedProductKeys = /* @__PURE__ */ new Set();
14717
15204
  const binaryFrameworks = /* @__PURE__ */ new Map();
14718
15205
  for (const { ref, settings: settings2 } of builtTargets) {
14719
- const absolute = (raw) => import_node_path13.default.resolve(ref.project.projectDir, expand(raw, settings2));
15206
+ const absolute = (raw) => import_node_path14.default.resolve(ref.project.projectDir, expand(raw, settings2));
14720
15207
  for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
14721
15208
  const dir = absolute(raw);
14722
- const modulemap = import_node_path13.default.join(dir, "module.modulemap");
14723
- if (!import_node_fs12.default.existsSync(modulemap)) continue;
14724
- const name2 = moduleMapName(import_node_fs12.default.readFileSync(modulemap, "utf8"));
15209
+ const modulemap = import_node_path14.default.join(dir, "module.modulemap");
15210
+ if (!import_node_fs13.default.existsSync(modulemap)) continue;
15211
+ const name2 = moduleMapName(import_node_fs13.default.readFileSync(modulemap, "utf8"));
14725
15212
  if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, dir);
14726
15213
  }
14727
15214
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -14730,7 +15217,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14730
15217
  const inputs = list(phase.inputPaths).map(absolute);
14731
15218
  for (const raw of list(phase.inputFileListPaths)) {
14732
15219
  const file = absolute(raw);
14733
- if (!import_node_fs12.default.existsSync(file)) continue;
15220
+ if (!import_node_fs13.default.existsSync(file)) continue;
14734
15221
  xcconfigs.add(file);
14735
15222
  inputs.push(...fileListEntries(file, absolute));
14736
15223
  }
@@ -14769,7 +15256,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14769
15256
  product,
14770
15257
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
14771
15258
  kind: "local",
14772
- dir: import_node_path13.default.resolve(
15259
+ dir: import_node_path14.default.resolve(
14773
15260
  project.projectDir,
14774
15261
  str(reference.relativePath) ?? ""
14775
15262
  )
@@ -14792,11 +15279,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14792
15279
  const fileId = str(project.object(buildFileId)?.fileRef);
14793
15280
  const file = project.object(fileId);
14794
15281
  const tree = str(file?.sourceTree);
14795
- const name2 = /([^/]+)\.(xc)?framework$/.exec(str(file?.path) ?? "")?.[1];
15282
+ const rawPath = str(file?.path) ?? "";
15283
+ const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
14796
15284
  if (file?.isa !== "PBXFileReference" || !name2) continue;
14797
- if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR")
15285
+ if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
15286
+ // however it is rooted: xcode links -framework <name> from the sdk
15287
+ // and a stale group-relative path to it contributes nothing.
15288
+ /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
15289
+ byProduct.has(import_node_path14.default.basename(rawPath)))
14798
15290
  continue;
14799
15291
  const resolved = fileId ? project.resolvePath(fileId) : null;
15292
+ if (fileId && resolved !== null && !import_node_fs13.default.existsSync(resolved))
15293
+ throw new Error(
15294
+ `${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
15295
+ );
14800
15296
  if (!binaryFrameworks.get(name2)) binaryFrameworks.set(name2, resolved);
14801
15297
  }
14802
15298
  }
@@ -14811,18 +15307,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14811
15307
  }
14812
15308
  for (const built of builtTargets)
14813
15309
  built.module.packageProducts = productsByTarget.get(built.ref) ?? [];
14814
- const resolvedFile = import_node_path13.default.join(
14815
- workspace ?? import_node_path13.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
15310
+ const resolvedFile = import_node_path14.default.join(
15311
+ workspace ?? import_node_path14.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
14816
15312
  "xcshareddata",
14817
15313
  "swiftpm",
14818
15314
  "Package.resolved"
14819
15315
  );
14820
- let packageResolved = import_node_fs12.default.existsSync(resolvedFile) ? [import_node_fs12.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path13.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs12.default.existsSync(file)).map((file) => import_node_fs12.default.realpathSync(file)).sort();
15316
+ let packageResolved = import_node_fs13.default.existsSync(resolvedFile) ? [import_node_fs13.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path14.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs13.default.existsSync(file)).map((file) => import_node_fs13.default.realpathSync(file)).sort();
14821
15317
  if (packageResolved.length === 0) {
14822
15318
  const requirements = remotePackageRequirements(projects);
14823
15319
  if (requirements.length > 0) {
14824
15320
  resolveSwiftPackageRequirements(requirements, resolvedFile);
14825
- packageResolved = [import_node_fs12.default.realpathSync(resolvedFile)];
15321
+ packageResolved = [import_node_fs13.default.realpathSync(resolvedFile)];
14826
15322
  }
14827
15323
  }
14828
15324
  const used = order.map((ref) => ref.project);
@@ -14830,14 +15326,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14830
15326
  ...module2,
14831
15327
  rootDir: commonAncestor(
14832
15328
  [
14833
- workspace ? import_node_path13.default.dirname(workspace) : app.project.projectDir,
15329
+ workspace ? import_node_path14.default.dirname(workspace) : app.project.projectDir,
14834
15330
  ...used.map((project) => project.projectDir),
14835
15331
  ...localPackageDirs,
14836
15332
  ...linkedProducts.flatMap(
14837
- ({ source }) => source.kind === "local" && import_node_fs12.default.existsSync(source.dir) ? [source.dir] : []
15333
+ ({ source }) => source.kind === "local" && import_node_fs13.default.existsSync(source.dir) ? [source.dir] : []
14838
15334
  ),
14839
15335
  ...new Set(podSourceDirs)
14840
- ].map((dir) => import_node_fs12.default.realpathSync(dir))
15336
+ ].map((dir) => import_node_fs13.default.realpathSync(dir))
14841
15337
  ),
14842
15338
  projectFiles: [
14843
15339
  .../* @__PURE__ */ new Set([
@@ -14850,10 +15346,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
14850
15346
  appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
14851
15347
  infoPlist: infoPlistPending ? null : import_plist3.default.build(info),
14852
15348
  infoPlistFile,
15349
+ developmentRegion: str(app.project.project.developmentRegion) ?? "en",
14853
15350
  frameworks,
15351
+ resourceProducts,
14854
15352
  linkedProducts,
14855
15353
  localPackageDirs: [
14856
- ...new Set(localPackageDirs.map((dir) => import_node_fs12.default.realpathSync(dir)))
15354
+ ...new Set(localPackageDirs.map((dir) => import_node_fs13.default.realpathSync(dir)))
14857
15355
  ].sort(),
14858
15356
  binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
14859
15357
  packageResolved,
@@ -14932,7 +15430,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
14932
15430
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
14933
15431
  const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
14934
15432
  const rootModuleName = readRootModuleName(
14935
- app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) && import_node_fs13.default.existsSync(file)).map((file) => import_node_fs13.default.readFileSync(file, "utf8"))
15433
+ app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) && import_node_fs14.default.existsSync(file)).map((file) => import_node_fs14.default.readFileSync(file, "utf8"))
14936
15434
  );
14937
15435
  return {
14938
15436
  applicationName,
@@ -14953,7 +15451,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
14953
15451
  googleSignIn: readGoogleSignInConfiguration(
14954
15452
  dictionary,
14955
15453
  Object.fromEntries(
14956
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs13.default.readFileSync(file, "utf8"))])
15454
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs14.default.readFileSync(file, "utf8"))])
14957
15455
  )
14958
15456
  ),
14959
15457
  supportedInterfaceOrientations,
@@ -14962,11 +15460,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
14962
15460
  alternateIconNames: [...alternateIconNames],
14963
15461
  appIconArtwork: resolveNativeAppIconArtwork(
14964
15462
  app.resources,
14965
- (file) => import_node_fs13.default.readFileSync(file, "utf8"),
15463
+ (file) => import_node_fs14.default.readFileSync(file, "utf8"),
14966
15464
  (file) => {
14967
- const extension = import_node_path14.default.extname(file).toLowerCase();
15465
+ const extension = import_node_path15.default.extname(file).toLowerCase();
14968
15466
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
14969
- return `data:${contentType};base64,${import_node_fs13.default.readFileSync(file).toString("base64")}`;
15467
+ return `data:${contentType};base64,${import_node_fs14.default.readFileSync(file).toString("base64")}`;
14970
15468
  },
14971
15469
  icons,
14972
15470
  app.appIconName,
@@ -14986,10 +15484,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
14986
15484
  }
14987
15485
  var NativeAppTargetSelectionError = class extends Error {
14988
15486
  };
14989
- function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest) {
15487
+ function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
14990
15488
  const read = selectNativeAppIdentityReader(platform, {
14991
15489
  android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
14992
- ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget)
15490
+ ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment)
14993
15491
  });
14994
15492
  return read ? read() : null;
14995
15493
  }
@@ -14997,22 +15495,22 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
14997
15495
  const read = selectNativeAppIdentityReader(platform, {
14998
15496
  android: () => null,
14999
15497
  ios: () => {
15000
- const iosRoot = import_node_path14.default.join(projectRoot, "ios");
15001
- if (!import_node_fs13.default.existsSync(iosRoot)) return null;
15498
+ const iosRoot = import_node_path15.default.join(projectRoot, "ios");
15499
+ if (!import_node_fs14.default.existsSync(iosRoot)) return null;
15002
15500
  const files = {};
15003
- for (const entry of import_node_fs13.default.readdirSync(iosRoot, { withFileTypes: true })) {
15501
+ for (const entry of import_node_fs14.default.readdirSync(iosRoot, { withFileTypes: true })) {
15004
15502
  if (entry.name === "Pods") continue;
15005
15503
  if (entry.isDirectory()) {
15006
15504
  const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
15007
15505
  for (const name2 of names) {
15008
15506
  const relative3 = `ios/${entry.name}/${name2}`;
15009
- const file = import_node_path14.default.join(projectRoot, relative3);
15010
- if (import_node_fs13.default.existsSync(file)) files[relative3] = import_node_fs13.default.readFileSync(file, "utf8");
15507
+ const file = import_node_path15.default.join(projectRoot, relative3);
15508
+ if (import_node_fs14.default.existsSync(file)) files[relative3] = import_node_fs14.default.readFileSync(file, "utf8");
15011
15509
  }
15012
15510
  } else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
15013
15511
  const relative3 = `ios/${entry.name}`;
15014
- const file = import_node_path14.default.join(projectRoot, relative3);
15015
- if (import_node_fs13.default.existsSync(file)) files[relative3] = import_node_fs13.default.readFileSync(file, "utf8");
15512
+ const file = import_node_path15.default.join(projectRoot, relative3);
15513
+ if (import_node_fs14.default.existsSync(file)) files[relative3] = import_node_fs14.default.readFileSync(file, "utf8");
15016
15514
  }
15017
15515
  }
15018
15516
  return extractNativeAppIdentityFromFiles(files, "ios", parseInfoPlist, iosTarget);
@@ -15023,41 +15521,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
15023
15521
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
15024
15522
  const files = {};
15025
15523
  if (androidMergedManifest) {
15026
- const file = import_node_path14.default.resolve(projectRoot, androidMergedManifest);
15027
- if (!import_node_fs13.default.existsSync(file)) return null;
15028
- files[androidMergedManifest] = import_node_fs13.default.readFileSync(file, "utf8");
15524
+ const file = import_node_path15.default.resolve(projectRoot, androidMergedManifest);
15525
+ if (!import_node_fs14.default.existsSync(file)) return null;
15526
+ files[androidMergedManifest] = import_node_fs14.default.readFileSync(file, "utf8");
15029
15527
  } else {
15030
- const androidRoot = import_node_path14.default.join(projectRoot, "android");
15031
- if (!import_node_fs13.default.existsSync(androidRoot)) return null;
15528
+ const androidRoot = import_node_path15.default.join(projectRoot, "android");
15529
+ if (!import_node_fs14.default.existsSync(androidRoot)) return null;
15032
15530
  const collect = (directory) => {
15033
- for (const entry of import_node_fs13.default.readdirSync(directory, { withFileTypes: true })) {
15034
- const file = import_node_path14.default.join(directory, entry.name);
15531
+ for (const entry of import_node_fs14.default.readdirSync(directory, { withFileTypes: true })) {
15532
+ const file = import_node_path15.default.join(directory, entry.name);
15035
15533
  if (entry.isDirectory()) collect(file);
15036
15534
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
15037
- files[import_node_path14.default.relative(projectRoot, file).split(import_node_path14.default.sep).join("/")] = import_node_fs13.default.readFileSync(file, "utf8");
15535
+ files[import_node_path15.default.relative(projectRoot, file).split(import_node_path15.default.sep).join("/")] = import_node_fs14.default.readFileSync(file, "utf8");
15038
15536
  }
15039
15537
  };
15040
- for (const module2 of import_node_fs13.default.readdirSync(androidRoot, { withFileTypes: true })) {
15538
+ for (const module2 of import_node_fs14.default.readdirSync(androidRoot, { withFileTypes: true })) {
15041
15539
  if (!module2.isDirectory()) continue;
15042
- const outputs = import_node_path14.default.join(
15540
+ const outputs = import_node_path15.default.join(
15043
15541
  androidRoot,
15044
15542
  module2.name,
15045
15543
  "build/intermediates/merged_manifests"
15046
15544
  );
15047
- if (import_node_fs13.default.existsSync(outputs)) collect(outputs);
15545
+ if (import_node_fs14.default.existsSync(outputs)) collect(outputs);
15048
15546
  }
15049
15547
  }
15050
15548
  for (const manifest of Object.keys(files)) {
15051
15549
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
15052
15550
  if (!resourceDirectory) continue;
15053
- const absolute = import_node_path14.default.resolve(projectRoot, resourceDirectory);
15054
- if (!import_node_fs13.default.existsSync(absolute)) continue;
15055
- for (const entry of import_node_fs13.default.readdirSync(absolute, { withFileTypes: true })) {
15551
+ const absolute = import_node_path15.default.resolve(projectRoot, resourceDirectory);
15552
+ if (!import_node_fs14.default.existsSync(absolute)) continue;
15553
+ for (const entry of import_node_fs14.default.readdirSync(absolute, { withFileTypes: true })) {
15056
15554
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
15057
- for (const resource of import_node_fs13.default.readdirSync(import_node_path14.default.join(absolute, entry.name))) {
15555
+ for (const resource of import_node_fs14.default.readdirSync(import_node_path15.default.join(absolute, entry.name))) {
15058
15556
  if (!resource.endsWith(".xml")) continue;
15059
15557
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
15060
- files[file] = import_node_fs13.default.readFileSync(import_node_path14.default.resolve(projectRoot, file), "utf8");
15558
+ files[file] = import_node_fs14.default.readFileSync(import_node_path15.default.resolve(projectRoot, file), "utf8");
15061
15559
  }
15062
15560
  }
15063
15561
  }
@@ -15070,11 +15568,11 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
15070
15568
  androidMergedManifest
15071
15569
  );
15072
15570
  }
15073
- function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
15074
- const app = readIosAppTarget(projectRoot, iosTarget);
15571
+ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment) {
15572
+ const app = readIosAppTarget(projectRoot, iosTarget, environment);
15075
15573
  if (!app) return null;
15076
15574
  const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
15077
- const projectManifestPath = import_node_path14.default.join(projectRoot, "package.json");
15575
+ const projectManifestPath = import_node_path15.default.join(projectRoot, "package.json");
15078
15576
  const projectRequire = (0, import_node_module3.createRequire)(projectManifestPath);
15079
15577
  let reanimatedManifestPath;
15080
15578
  try {
@@ -15088,22 +15586,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
15088
15586
  throw error;
15089
15587
  }
15090
15588
  const installedManifest = JSON.parse(
15091
- import_node_fs13.default.readFileSync(reanimatedManifestPath, "utf8")
15589
+ import_node_fs14.default.readFileSync(reanimatedManifestPath, "utf8")
15092
15590
  );
15093
15591
  const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
15094
15592
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
15095
15593
  if (Number.parseInt(installedVersion, 10) < 4) return identity;
15096
15594
  const defaults = JSON.parse(
15097
- import_node_fs13.default.readFileSync(
15098
- import_node_path14.default.join(
15099
- import_node_path14.default.dirname(reanimatedManifestPath),
15595
+ import_node_fs14.default.readFileSync(
15596
+ import_node_path15.default.join(
15597
+ import_node_path15.default.dirname(reanimatedManifestPath),
15100
15598
  "src/featureFlags/staticFlags.json"
15101
15599
  ),
15102
15600
  "utf8"
15103
15601
  )
15104
15602
  );
15105
15603
  if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
15106
- const manifest = JSON.parse(import_node_fs13.default.readFileSync(projectManifestPath, "utf8"));
15604
+ const manifest = JSON.parse(import_node_fs14.default.readFileSync(projectManifestPath, "utf8"));
15107
15605
  const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
15108
15606
  const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
15109
15607
  if (overrides !== void 0 && !isRecord(overrides)) {
@@ -15125,10 +15623,10 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
15125
15623
  }
15126
15624
  return { ...identity, reanimatedStaticFeatureFlags: flags };
15127
15625
  }
15128
- function readIosAppTarget(projectRoot, iosTarget) {
15129
- const iosRoot = import_node_path14.default.join(projectRoot, "ios");
15130
- if (!import_node_fs13.default.existsSync(iosRoot)) return null;
15131
- const projects = import_node_fs13.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
15626
+ function readIosAppTarget(projectRoot, iosTarget, environment) {
15627
+ const iosRoot = import_node_path15.default.join(projectRoot, "ios");
15628
+ if (!import_node_fs14.default.existsSync(iosRoot)) return null;
15629
+ const projects = import_node_fs14.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
15132
15630
  if (projects.length === 0) return null;
15133
15631
  if (projects.length > 1 && !iosTarget) {
15134
15632
  throw new NativeAppTargetSelectionError(
@@ -15138,7 +15636,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
15138
15636
  let project = projects[0];
15139
15637
  if (iosTarget && projects.length > 1) {
15140
15638
  const matches = projects.filter(
15141
- (entry) => listXcodeAppTargets(import_node_path14.default.join(iosRoot, entry.name), {
15639
+ (entry) => listXcodeAppTargets(import_node_path15.default.join(iosRoot, entry.name), {
15142
15640
  requireSources: false
15143
15641
  }).includes(iosTarget)
15144
15642
  );
@@ -15152,7 +15650,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
15152
15650
  }
15153
15651
  project = matches[0];
15154
15652
  }
15155
- const xcodeproj = import_node_path14.default.join(iosRoot, project.name);
15653
+ const xcodeproj = import_node_path15.default.join(iosRoot, project.name);
15156
15654
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
15157
15655
  if (!iosTarget && appTargets.length > 1) {
15158
15656
  throw new NativeAppTargetSelectionError(
@@ -15161,33 +15659,42 @@ function readIosAppTarget(projectRoot, iosTarget) {
15161
15659
  }
15162
15660
  return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
15163
15661
  requireSources: false,
15164
- prepareGeneratedSources: true
15662
+ prepareGeneratedSources: true,
15663
+ environment
15165
15664
  });
15166
15665
  }
15167
15666
 
15168
15667
  // src/native-firebase-config.ts
15169
15668
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15170
15669
  var import_node_child_process4 = require("node:child_process");
15171
- var import_node_fs14 = __toESM(require("node:fs"), 1);
15670
+ var import_node_fs15 = __toESM(require("node:fs"), 1);
15172
15671
  var import_node_os5 = __toESM(require("node:os"), 1);
15173
- var import_node_path15 = __toESM(require("node:path"), 1);
15672
+ var import_node_path16 = __toESM(require("node:path"), 1);
15174
15673
  init_is_record();
15175
15674
  var EXPO_CONFIG_SCRIPT = `const { createRequire } = require('node:module');
15176
15675
  const { writeFileSync } = require('node:fs');
15177
15676
  const { join } = require('node:path');
15178
15677
  const root = process.argv[1];
15179
- const { getConfig } = createRequire(join(root, 'package.json'))('@expo/config');
15678
+ const projectRequire = createRequire(join(root, 'package.json'));
15679
+ const expoRequire = createRequire(projectRequire.resolve('expo/package.json'));
15680
+ const { getConfig } = expoRequire('@expo/config');
15681
+ let expoEnv = null;
15682
+ try { expoEnv = createRequire(expoRequire.resolve('@expo/cli/package.json'))('@expo/env'); } catch {}
15683
+ if (expoEnv) {
15684
+ process.env.NODE_ENV ||= 'development';
15685
+ expoEnv.load(root, { silent: true });
15686
+ }
15180
15687
  const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true }).exp);
15181
15688
  if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
15182
15689
  writeFileSync(process.argv[2], result, { mode: 0o600 });`;
15183
15690
  function hasExpoConfig(projectRoot) {
15184
- const appJsonPath = import_node_path15.default.join(projectRoot, "app.json");
15185
- const appJson = import_node_fs14.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs14.default.readFileSync(appJsonPath, "utf8")) : null;
15691
+ const appJsonPath = import_node_path16.default.join(projectRoot, "app.json");
15692
+ const appJson = import_node_fs15.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs15.default.readFileSync(appJsonPath, "utf8")) : null;
15186
15693
  const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
15187
15694
  (value) => isRecord(value) && typeof value.googleServicesFile === "string"
15188
15695
  ));
15189
15696
  return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
15190
- (name2) => import_node_fs14.default.existsSync(import_node_path15.default.join(projectRoot, name2))
15697
+ (name2) => import_node_fs15.default.existsSync(import_node_path16.default.join(projectRoot, name2))
15191
15698
  );
15192
15699
  }
15193
15700
  function expoConfigArgs(projectRoot, resultPath) {
@@ -15195,22 +15702,22 @@ function expoConfigArgs(projectRoot, resultPath) {
15195
15702
  "--input-type=commonjs",
15196
15703
  "-e",
15197
15704
  EXPO_CONFIG_SCRIPT,
15198
- import_node_path15.default.resolve(projectRoot),
15705
+ import_node_path16.default.resolve(projectRoot),
15199
15706
  resultPath
15200
15707
  ];
15201
15708
  }
15202
15709
  function readExpoConfigResult(resultPath, status, stderr) {
15203
15710
  if (status !== 0)
15204
15711
  throw new Error(stderr || "Expo native configuration evaluation failed.");
15205
- const resolved = JSON.parse(import_node_fs14.default.readFileSync(resultPath, "utf8"));
15712
+ const resolved = JSON.parse(import_node_fs15.default.readFileSync(resultPath, "utf8"));
15206
15713
  if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
15207
15714
  return resolved;
15208
15715
  }
15209
- var resultDirectory = () => import_node_fs14.default.mkdtempSync(import_node_path15.default.join(import_node_os5.default.tmpdir(), "peach-expo-config-"));
15716
+ var resultDirectory = () => import_node_fs15.default.mkdtempSync(import_node_path16.default.join(import_node_os5.default.tmpdir(), "peach-expo-config-"));
15210
15717
  function readExpoConfig(projectRoot) {
15211
15718
  if (!hasExpoConfig(projectRoot)) return {};
15212
15719
  const directory = resultDirectory();
15213
- const resultPath = import_node_path15.default.join(directory, "config.json");
15720
+ const resultPath = import_node_path16.default.join(directory, "config.json");
15214
15721
  try {
15215
15722
  const child = (0, import_node_child_process4.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
15216
15723
  cwd: projectRoot,
@@ -15222,7 +15729,7 @@ function readExpoConfig(projectRoot) {
15222
15729
  if (child.error) throw child.error;
15223
15730
  return readExpoConfigResult(resultPath, child.status, child.stderr);
15224
15731
  } finally {
15225
- import_node_fs14.default.rmSync(directory, { recursive: true, force: true });
15732
+ import_node_fs15.default.rmSync(directory, { recursive: true, force: true });
15226
15733
  }
15227
15734
  }
15228
15735
  function evaluateFirebaseGuard(header, resources) {
@@ -15244,7 +15751,7 @@ function evaluateFirebaseGuard(header, resources) {
15244
15751
  }
15245
15752
  clauses.push(condition.slice(start).trim());
15246
15753
  const sources = resources.filter(
15247
- (file) => import_node_path15.default.basename(file) === "GoogleService-Info.plist"
15754
+ (file) => import_node_path16.default.basename(file) === "GoogleService-Info.plist"
15248
15755
  );
15249
15756
  const bound = /* @__PURE__ */ new Map();
15250
15757
  for (const clause of clauses) {
@@ -15260,7 +15767,7 @@ function evaluateFirebaseGuard(header, resources) {
15260
15767
  const dictionary = /^let\s+(\w+)\s*=\s*NSDictionary\s*\(\s*contentsOfFile:\s*(\w+)\s*\)$/.exec(clause);
15261
15768
  if (dictionary && typeof bound.get(dictionary[2]) === "string") {
15262
15769
  const parsed = parsePlistSource(
15263
- import_node_fs14.default.readFileSync(String(bound.get(dictionary[2])), "utf8")
15770
+ import_node_fs15.default.readFileSync(String(bound.get(dictionary[2])), "utf8")
15264
15771
  );
15265
15772
  if (!isRecord(parsed)) return false;
15266
15773
  bound.set(dictionary[1], parsed);
@@ -15342,7 +15849,7 @@ function findDefaultConfigureCall(body, sources) {
15342
15849
  const [, type, name2] = call;
15343
15850
  for (const file of sources) {
15344
15851
  if (!file.endsWith(".swift")) continue;
15345
- const source = blankSwiftObjcLiterals(import_node_fs14.default.readFileSync(file, "utf8"));
15852
+ const source = blankSwiftObjcLiterals(import_node_fs15.default.readFileSync(file, "utf8"));
15346
15853
  const declaration = new RegExp(
15347
15854
  `\\b(?:enum|struct|class)\\s+${type}\\b[^{]*\\{`
15348
15855
  ).exec(source);
@@ -15364,10 +15871,10 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
15364
15871
  prepareGeneratedSources
15365
15872
  });
15366
15873
  const delegates = app.allSources.filter(
15367
- (file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path15.default.basename(file))
15874
+ (file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path16.default.basename(file))
15368
15875
  );
15369
15876
  const defaultConfigured = delegates.some((file) => {
15370
- const raw = import_node_fs14.default.readFileSync(file, "utf8");
15877
+ const raw = import_node_fs15.default.readFileSync(file, "utf8");
15371
15878
  const source = blankSwiftObjcLiterals(raw);
15372
15879
  const launch = /(?:\bfunc\s+application\s*\([\s\S]*?didFinishLaunchingWithOptions[\s\S]*?\)\s*->\s*Bool|^-\s*\(BOOL\)\s*application\s*:[\s\S]*?didFinishLaunchingWithOptions[^{]*)\s*\{/m.exec(
15373
15880
  source
@@ -15432,17 +15939,17 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
15432
15939
  return guarded;
15433
15940
  });
15434
15941
  if (!defaultConfigured) return null;
15435
- const bundle = import_node_path15.default.join(
15942
+ const bundle = import_node_path16.default.join(
15436
15943
  app.settings("BUILT_PRODUCTS_DIR"),
15437
15944
  app.settings("WRAPPER_NAME") || `${app.settings("PRODUCT_NAME")}.app`
15438
15945
  );
15439
15946
  const staged = app.copiedFiles.filter(
15440
- ({ from, to }) => to === import_node_path15.default.join(bundle, "GoogleService-Info.plist") && import_node_fs14.default.existsSync(from)
15441
- ).map(({ from }) => import_node_fs14.default.realpathSync(from));
15947
+ ({ from, to }) => to === import_node_path16.default.join(bundle, "GoogleService-Info.plist") && import_node_fs15.default.existsSync(from)
15948
+ ).map(({ from }) => import_node_fs15.default.realpathSync(from));
15442
15949
  const resources = [
15443
15950
  .../* @__PURE__ */ new Set([
15444
15951
  ...app.resources.filter(
15445
- (file) => /^GoogleService-Info\.plist$/.test(import_node_path15.default.basename(file))
15952
+ (file) => /^GoogleService-Info\.plist$/.test(import_node_path16.default.basename(file))
15446
15953
  ),
15447
15954
  ...staged
15448
15955
  ])
@@ -15451,21 +15958,21 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
15451
15958
  throw new Error(
15452
15959
  "native Firebase default initialization requires one GoogleService-Info.plist build resource"
15453
15960
  );
15454
- return import_node_path15.default.relative(import_node_fs14.default.realpathSync(projectRoot), resources[0]);
15961
+ return import_node_path16.default.relative(import_node_fs15.default.realpathSync(projectRoot), resources[0]);
15455
15962
  }
15456
15963
  function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], iosTarget, config = readExpoConfig(projectRoot), prepareGeneratedSources = false) {
15457
15964
  const result = {};
15458
15965
  const ios = config.ios;
15459
15966
  if (platforms.includes("ios") && (!isRecord(ios) || typeof ios.googleServicesFile !== "string")) {
15460
- const iosRoot = import_node_path15.default.join(projectRoot, "ios");
15461
- if (import_node_fs14.default.existsSync(iosRoot)) {
15462
- const projects = import_node_fs14.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
15967
+ const iosRoot = import_node_path16.default.join(projectRoot, "ios");
15968
+ if (import_node_fs15.default.existsSync(iosRoot)) {
15969
+ const projects = import_node_fs15.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
15463
15970
  if (projects.length > 1)
15464
15971
  throw new Error(
15465
15972
  `native Firebase configuration requires a selected Xcode project; set withPeach's iosTarget to an app target in one of: ${projects.map((entry) => entry.name).join(", ")}`
15466
15973
  );
15467
15974
  if (projects.length === 1) {
15468
- const xcodeproj = import_node_path15.default.join(iosRoot, projects[0].name);
15975
+ const xcodeproj = import_node_path16.default.join(iosRoot, projects[0].name);
15469
15976
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
15470
15977
  const bundleId = isRecord(ios) && typeof ios.bundleIdentifier === "string" ? ios.bundleIdentifier : null;
15471
15978
  const matching = bundleId ? appTargets.filter(
@@ -15497,8 +16004,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
15497
16004
  const native = config[platform];
15498
16005
  if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
15499
16006
  try {
15500
- const source = import_node_fs14.default.readFileSync(
15501
- import_node_path15.default.resolve(projectRoot, native.googleServicesFile),
16007
+ const source = import_node_fs15.default.readFileSync(
16008
+ import_node_path16.default.resolve(projectRoot, native.googleServicesFile),
15502
16009
  "utf8"
15503
16010
  );
15504
16011
  const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
@@ -15766,7 +16273,7 @@ function withPeach(config, options = {}) {
15766
16273
  const configuredBundleUrl = "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
15767
16274
  const cfgServer = config.server;
15768
16275
  const port = resolveMetroPort(cfgServer);
15769
- const metroServerId = (0, import_node_crypto4.randomUUID)();
16276
+ const metroServerId = (0, import_node_crypto5.randomUUID)();
15770
16277
  const bundleUrl = tagRnxBundleForPlugin(
15771
16278
  configuredBundleUrl,
15772
16279
  `http://localhost:${port}`,