peachsim 0.1.1808 → 0.1.1812

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 (236) hide show
  1. package/README.md +4 -2
  2. package/cli/app-bundle-resources.ts +15 -2
  3. package/cli/cloud-box-artifact.ts +115 -0
  4. package/cli/cloud-client.ts +148 -76
  5. package/cli/cloud-dispatch.ts +4 -4
  6. package/cli/cloud-session.ts +60 -22
  7. package/cli/commands/box.ts +8 -2
  8. package/cli/commands/compat.ts +7 -4
  9. package/cli/commands/control.ts +69 -3
  10. package/cli/commands/coverage.ts +14 -4
  11. package/cli/commands/daemon.ts +41 -0
  12. package/cli/commands/no-bridge-hint.ts +9 -0
  13. package/cli/commands/package.ts +31 -56
  14. package/cli/commands/platform.ts +71 -60
  15. package/cli/commands/preview.ts +73 -24
  16. package/cli/commands/record.ts +10 -2
  17. package/cli/commands/screenshot.ts +17 -60
  18. package/cli/commands/setup.ts +3 -1
  19. package/cli/commands/three-mode.ts +22 -12
  20. package/cli/commands/upload.ts +2 -1
  21. package/cli/desktop-companion.ts +6 -1
  22. package/cli/drivers/desktop.ts +4 -1
  23. package/cli/main.ts +12 -2
  24. package/cli/metro-bundle-assets.ts +14 -4
  25. package/cli/outbound-endpoints.ts +7 -3
  26. package/cli/output-redaction.ts +38 -0
  27. package/cli/privacy.ts +2 -2
  28. package/cli/recording-access.ts +5 -0
  29. package/cli/remote-project-bundle.ts +83 -0
  30. package/cli/shell-init.ts +7 -11
  31. package/cli/telemetry.ts +41 -4
  32. package/cli/usage-error.ts +3 -0
  33. package/cli/ws-bridge.ts +42 -6
  34. package/dist-lib/agent-daemon-client.cjs +1 -1
  35. package/dist-lib/agent-events.cjs +1 -1
  36. package/dist-lib/attached-projects.cjs +1 -1
  37. package/dist-lib/auth/shared-session.cjs +1 -1
  38. package/dist-lib/backend-origin.cjs +1 -1
  39. package/dist-lib/beta.cjs +1 -1
  40. package/dist-lib/beta.mjs +1 -1
  41. package/dist-lib/bridge-constants.cjs +1 -1
  42. package/dist-lib/bridge-contract-input.cjs +1 -1
  43. package/dist-lib/bridge-contract-input.mjs +1 -1
  44. package/dist-lib/bridge-contract.cjs +1 -1
  45. package/dist-lib/bridge-contract.mjs +1 -1
  46. package/dist-lib/bundle-channel.cjs +42897 -40755
  47. package/dist-lib/capture-contract.cjs +7 -8
  48. package/dist-lib/capture-contract.mjs +7 -8
  49. package/dist-lib/cloud-contract.cjs +1 -1
  50. package/dist-lib/cloud-contract.mjs +1 -1
  51. package/dist-lib/cloud-test-args.cjs +1 -1
  52. package/dist-lib/cloud-test-args.mjs +1 -1
  53. package/dist-lib/cloud.cjs +1 -1
  54. package/dist-lib/cloud.mjs +1 -1
  55. package/dist-lib/config.cjs +1 -1
  56. package/dist-lib/config.mjs +1 -1
  57. package/dist-lib/detox/index.cjs +13 -7
  58. package/dist-lib/dev-bundle-resolution.cjs +10 -4
  59. package/dist-lib/expo-swift-bundle.cjs +15889 -15553
  60. package/dist-lib/expo-swift-metadata.cjs +2 -1
  61. package/dist-lib/expo-swift-metadata.mjs +2 -1
  62. package/dist-lib/home-paths.cjs +2 -33
  63. package/dist-lib/host/bridge-host.cjs +20891 -18714
  64. package/dist-lib/host/fetch-proxy-handler.cjs +10 -11
  65. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  66. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  67. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  68. package/dist-lib/host/websocket-proxy.cjs +1 -1
  69. package/dist-lib/index.cjs +620 -553
  70. package/dist-lib/jump-to-source-babel.cjs +1 -1
  71. package/dist-lib/jump-to-source-native.cjs +1 -1
  72. package/dist-lib/kotlin-host.cjs +1 -1
  73. package/dist-lib/menu.cjs +1 -1
  74. package/dist-lib/menu.mjs +1 -1
  75. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  76. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  77. package/dist-lib/metro-production-bundle.cjs +1 -1
  78. package/dist-lib/metro-production-bundle.mjs +1 -1
  79. package/dist-lib/metro.cjs +57 -28
  80. package/dist-lib/native-app-identity-project.cjs +47 -14
  81. package/dist-lib/native-app-identity-project.mjs +55 -20
  82. package/dist-lib/native-app-identity.cjs +1 -1
  83. package/dist-lib/native-app-identity.mjs +1 -1
  84. package/dist-lib/native-firebase-metadata.cjs +1 -1
  85. package/dist-lib/native-firebase-metadata.mjs +1 -1
  86. package/dist-lib/pdfium-raster.cjs +1 -1
  87. package/dist-lib/pdfium-raster.mjs +1 -1
  88. package/dist-lib/plist.cjs +1 -1
  89. package/dist-lib/plist.mjs +1 -1
  90. package/dist-lib/profiles.cjs +1 -1
  91. package/dist-lib/public-brand.cjs +1 -1
  92. package/dist-lib/public-origins-lib-esm.json +27 -26
  93. package/dist-lib/public-origins-lib.json +104 -81
  94. package/dist-lib/react-native-host-modules.cjs +1 -1
  95. package/dist-lib/react-native-host-modules.mjs +1 -1
  96. package/dist-lib/reap-browser.cjs +1 -1
  97. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  98. package/dist-lib/sdk.cjs +1 -1
  99. package/dist-lib/sdk.mjs +1 -1
  100. package/dist-lib/skills.cjs +30700 -24410
  101. package/dist-lib/swift-compile.cjs +336 -222
  102. package/dist-lib/swift-compile.mjs +378 -263
  103. package/dist-lib/swift-package.cjs +19 -7
  104. package/dist-lib/swift-package.mjs +16 -6
  105. package/dist-lib/swift-submit.cjs +1 -1
  106. package/dist-lib/swift-submit.mjs +1 -1
  107. package/dist-lib/swift-toolchain.cjs +49 -1
  108. package/dist-lib/swift.cjs +1 -1
  109. package/dist-lib/vite-swift.cjs +19213 -18937
  110. package/dist-lib/vite.cjs +11 -12
  111. package/dist-lib/worklet-executable.cjs +1 -1
  112. package/dist-lib/worklet-executable.mjs +1 -1
  113. package/dist-types/packages/peach-engine/src/engine/animated.d.ts +4 -0
  114. package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +1 -0
  115. package/dist-types/packages/peach-engine/src/engine/expo-manifest.d.ts +1 -0
  116. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -1
  117. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +1 -0
  118. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +8 -1
  119. package/dist-types/packages/peach-globals/src/electronBridgeContract.d.ts +2 -1
  120. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  121. package/kotlin/sdk.tar.gz +0 -0
  122. package/package.json +1 -1
  123. package/runtime-companion.json +1 -1
  124. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCall.h +1 -1
  125. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCallCenter.h +1 -1
  126. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h +1 -1
  127. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriber.h +1 -1
  128. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriberInfo.h +1 -1
  129. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h +1 -1
  130. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h +1 -1
  131. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExtensionItem.h +1 -1
  132. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/AVFoundation+MPNowPlayingInfoLanguageOptionAdditions.h +39 -0
  133. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/AVPlayerItem+MediaPlayerAdditions.h +26 -0
  134. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPContentItem.h +67 -0
  135. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPError.h +33 -0
  136. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaEntity.h +53 -0
  137. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItem.h +346 -0
  138. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItemCollection.h +42 -0
  139. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaLibrary.h +76 -0
  140. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPickerController.h +64 -0
  141. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPlayback.h +47 -0
  142. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPlaylist.h +82 -0
  143. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaQuery.h +120 -0
  144. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaQuerySection.h +26 -0
  145. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerController.h +444 -0
  146. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerViewController.h +43 -0
  147. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerApplicationController.h +47 -0
  148. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerController.h +147 -0
  149. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerQueueDescriptor.h +75 -0
  150. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h +197 -0
  151. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoLanguageOption.h +107 -0
  152. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingSession.h +89 -0
  153. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentDataSource.h +59 -0
  154. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentDelegate.h +64 -0
  155. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentManager.h +46 -0
  156. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentManagerContext.h +32 -0
  157. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommand.h +143 -0
  158. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommandCenter.h +66 -0
  159. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommandEvent.h +128 -0
  160. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteControlTypes.h +27 -0
  161. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPVolumeSettings.h +20 -0
  162. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPVolumeView.h +82 -0
  163. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayer.apinotes +74 -0
  164. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayer.h +40 -0
  165. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayerDefines.h +84 -0
  166. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/NSUserActivity+MediaPlayerAdditions.h +20 -0
  167. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Modules/module.modulemap +5 -0
  168. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityCustomRotor.h +2 -2
  169. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAction.h +1 -1
  170. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBackgroundConfiguration.h +1 -1
  171. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIButtonConfiguration.h +1 -1
  172. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIContextMenuConfiguration.h +1 -1
  173. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIContextMenuInteraction.h +1 -1
  174. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDeferredMenuElement.h +1 -1
  175. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenu.h +1 -1
  176. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPointerStyle.h +5 -5
  177. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISlider.h +1 -1
  178. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewController.h +12 -50
  179. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewControllerLayoutEnvironment.h +2 -8
  180. package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +62 -0
  181. package/sdk/ios/usr/include/dispatch.modulemap +22 -0
  182. package/sdk/ios/usr/include/module.modulemap +8 -3
  183. package/sdk/ios/usr/include/net/if.h +24 -0
  184. package/sdk/ios/usr/include/sys/time.h +1 -1
  185. package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +265 -0
  186. package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
  187. package/sdk/ios/wasm/include/fcntl.h +2 -0
  188. package/sdk/ios/wasm/include/pthread.h +3 -0
  189. package/sdk/ios/wasm/include/stdlib.h +2 -0
  190. package/sdk/ios/wasm/include/unistd.h +2 -2
  191. package/skills/contrast/SKILL.md +2 -2
  192. package/src/bundle-channel.mjs +9 -72
  193. package/src/capture-contract.ts +12 -9
  194. package/src/desktop-host-delivery.ts +16 -2
  195. package/src/dev-bundle-resolution.ts +12 -3
  196. package/src/expo-native-workspace.ts +113 -46
  197. package/src/expo-swift-host.ts +17 -12
  198. package/src/expo-swift-ready.ts +4 -1
  199. package/src/expoSwiftContract.ts +1 -0
  200. package/src/home-paths.ts +4 -48
  201. package/src/host/bridge-host.ts +1 -0
  202. package/src/installed-native-libraries.ts +2 -8
  203. package/src/metro-project-root.ts +2 -1
  204. package/src/native-bundles.ts +122 -0
  205. package/src/native-static-libraries.ts +65 -8
  206. package/src/nitro-adapter.lock.json +272 -272
  207. package/src/nitro-bundle.ts +2 -2
  208. package/src/nitro-compile.ts +68 -28
  209. package/src/nitro-source.ts +24 -6
  210. package/src/nitro-superset.lock.json +94 -34
  211. package/src/nitroContract.ts +3 -0
  212. package/src/podspec-sources.ts +1966 -0
  213. package/src/storageSnapshotContract.ts +40 -0
  214. package/src/swift-compile.ts +77 -26
  215. package/src/swift-design-time.ts +18 -1
  216. package/src/swift-distribution.lock.json +12 -12
  217. package/src/swift-distribution.ts +9 -6
  218. package/src/swift-host.ts +1 -2
  219. package/src/swift-link-roots.ts +13 -2
  220. package/src/swift-objc-compile.ts +12 -0
  221. package/src/swift-objc-standin.ts +321 -114
  222. package/src/swift-package-manifest.ts +4 -3
  223. package/src/swift-package.ts +31 -4
  224. package/src/swift-root-lock.ts +11 -0
  225. package/src/swift-shared-sdk.ts +10 -9
  226. package/src/swift-source-pods.ts +2 -2
  227. package/src/swift-standins.ts +40 -143
  228. package/src/swift-toolchain.ts +59 -0
  229. package/src/swift-wasm-prune.ts +53 -21
  230. package/src/turbo-bundle.ts +4 -5
  231. package/src/turbo-codegen-intake.ts +111 -108
  232. package/src/turbo-compile.ts +63 -33
  233. package/src/turbo-runtime.lock.json +22 -22
  234. package/src/turbo-source.ts +171 -76
  235. package/src/wasm-optimize.ts +31 -2
  236. package/src/xcode-project.ts +65 -15
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1808 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1812 | (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;
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
39
39
  var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
40
40
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
41
41
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
42
- define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "fdb8333fdb5d8346283e2397b0cd4b93b269ce7a5c34e15bbc2431b9e890f18a", "swift-package.ts": "400bc4d38dc6ccc74ed78b465fa81542b478fceb5b1163c22b8811869be16b6b", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "441845483a69f2eb87e2a8ce7a1594b16e82c2b69f87b6a9db80398dbe5955de", "home-paths.ts": "cc72e811854c4d9e288ad449b8b33aa7b82ece846ba5f7a9ddf252a3d39943ac", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "013514e30865026d985c52829483a5a5cf183dd39cc10df776fd759594e7d59b", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
42
+ define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "5bdd15dce967553923b0437502e56f70165424d2f22cdde0e2d7aacd618e27cc", "swift-package.ts": "80932fd45cd31e57871475180148f79f273719ac94d94deabce16dc138fdf387", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "ca9c37935257702de6c0377eaf2ddae141f2ef647326e8039ff8e7a0475ef2a0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "76e78ea9974671ff3b7e7a5d65e508306d8eadeb6b6bf859bd2ccc03f4ef6e72", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
43
43
  }
44
44
  });
45
45
 
@@ -150,7 +150,7 @@ function readDaemonLockfile() {
150
150
  const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
151
151
  const raw = buf.subarray(0, bytesRead).toString("utf8");
152
152
  const parsed = JSON.parse(raw);
153
- if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number" && (parsed.servedRuntimes === void 0 || Array.isArray(parsed.servedRuntimes) && parsed.servedRuntimes.every((version) => typeof version === "string"))) {
153
+ if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number" && (parsed.cliVersion === void 0 || typeof parsed.cliVersion === "string") && (parsed.servedRuntimes === void 0 || Array.isArray(parsed.servedRuntimes) && parsed.servedRuntimes.every((version) => typeof version === "string"))) {
154
154
  return parsed;
155
155
  }
156
156
  return null;
@@ -4388,25 +4388,25 @@ var init_browser = __esm({
4388
4388
  });
4389
4389
 
4390
4390
  // cli/commands/nodeRepoFileReader.ts
4391
- var import_node_fs4, nodeRepoFileReader;
4391
+ var import_node_fs5, nodeRepoFileReader;
4392
4392
  var init_nodeRepoFileReader = __esm({
4393
4393
  "cli/commands/nodeRepoFileReader.ts"() {
4394
4394
  "use strict";
4395
4395
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4396
- import_node_fs4 = require("node:fs");
4396
+ import_node_fs5 = require("node:fs");
4397
4397
  nodeRepoFileReader = {
4398
- exists: import_node_fs4.existsSync,
4399
- readText: (filePath) => (0, import_node_fs4.readFileSync)(filePath, "utf8"),
4400
- entries: (directory) => (0, import_node_fs4.readdirSync)(directory, { withFileTypes: true }).map((entry) => ({
4398
+ exists: import_node_fs5.existsSync,
4399
+ readText: (filePath) => (0, import_node_fs5.readFileSync)(filePath, "utf8"),
4400
+ entries: (directory) => (0, import_node_fs5.readdirSync)(directory, { withFileTypes: true }).map((entry) => ({
4401
4401
  name: entry.name,
4402
4402
  directory: entry.isDirectory()
4403
4403
  })),
4404
- isDirectory: (filePath) => (0, import_node_fs4.statSync)(filePath).isDirectory(),
4404
+ isDirectory: (filePath) => (0, import_node_fs5.statSync)(filePath).isDirectory(),
4405
4405
  readMetadata(filePath) {
4406
4406
  try {
4407
- const info = (0, import_node_fs4.lstatSync)(filePath);
4407
+ const info = (0, import_node_fs5.lstatSync)(filePath);
4408
4408
  if (!info.isFile() || info.size > 4 * 1024 * 1024) return null;
4409
- return (0, import_node_fs4.readFileSync)(filePath, "utf8");
4409
+ return (0, import_node_fs5.readFileSync)(filePath, "utf8");
4410
4410
  } catch {
4411
4411
  return null;
4412
4412
  }
@@ -4429,7 +4429,7 @@ function scanRepository(root) {
4429
4429
  directories.push(next.dir);
4430
4430
  let handle;
4431
4431
  try {
4432
- handle = (0, import_node_fs5.opendirSync)(next.dir);
4432
+ handle = (0, import_node_fs6.opendirSync)(next.dir);
4433
4433
  } catch {
4434
4434
  unreadable++;
4435
4435
  continue;
@@ -4444,7 +4444,7 @@ function scanRepository(root) {
4444
4444
  truncated = true;
4445
4445
  continue;
4446
4446
  }
4447
- pending.push({ dir: (0, import_node_path4.join)(next.dir, entry.name), depth: next.depth + 1 });
4447
+ pending.push({ dir: (0, import_node_path5.join)(next.dir, entry.name), depth: next.depth + 1 });
4448
4448
  }
4449
4449
  } finally {
4450
4450
  handle.closeSync();
@@ -4474,7 +4474,7 @@ function readProjectJson(path30, files = nodeRepoFileReader) {
4474
4474
  }
4475
4475
  }
4476
4476
  function readProjectManifest(dir, files = nodeRepoFileReader) {
4477
- const parsed = readProjectJson((0, import_node_path4.join)(dir, "package.json"), files);
4477
+ const parsed = readProjectJson((0, import_node_path5.join)(dir, "package.json"), files);
4478
4478
  if (!parsed || typeof parsed !== "object") return null;
4479
4479
  const record = (value) => {
4480
4480
  if (!value || typeof value !== "object") return {};
@@ -4491,13 +4491,13 @@ function readProjectManifest(dir, files = nodeRepoFileReader) {
4491
4491
  devDependencies: record(metadataValue(parsed, "devDependencies"))
4492
4492
  };
4493
4493
  }
4494
- var import_node_fs5, import_node_path4, import_json5, REPORT_SKIP_DIRS, PODFILE_NEW_ARCH_MARK, PODFILE_NEW_ARCH_RUBY;
4494
+ var import_node_fs6, import_node_path5, import_json5, REPORT_SKIP_DIRS, PODFILE_NEW_ARCH_MARK, PODFILE_NEW_ARCH_RUBY;
4495
4495
  var init_detect = __esm({
4496
4496
  "cli/commands/detect.ts"() {
4497
4497
  "use strict";
4498
4498
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4499
- import_node_fs5 = require("node:fs");
4500
- import_node_path4 = require("node:path");
4499
+ import_node_fs6 = require("node:fs");
4500
+ import_node_path5 = require("node:path");
4501
4501
  import_json5 = __toESM(require_lib(), 1);
4502
4502
  init_browser();
4503
4503
  init_nodeRepoFileReader();
@@ -5116,7 +5116,7 @@ function normalize(p) {
5116
5116
  if (trailingSlash) joined += "/";
5117
5117
  return absolute ? "/" + joined : joined;
5118
5118
  }
5119
- function join5(...parts) {
5119
+ function join6(...parts) {
5120
5120
  const present = parts.filter((part) => part.length > 0);
5121
5121
  if (present.length === 0) return ".";
5122
5122
  return normalize(present.join("/"));
@@ -5137,7 +5137,7 @@ function resolve3(...parts) {
5137
5137
  const normalized = normalizeSegments(resolved.split("/"), false).join("/");
5138
5138
  return normalized.length > 0 ? "/" + normalized : "/";
5139
5139
  }
5140
- function dirname4(p) {
5140
+ function dirname5(p) {
5141
5141
  const idx = p.lastIndexOf("/");
5142
5142
  if (idx < 0) return ".";
5143
5143
  if (idx === 0) return "/";
@@ -5180,9 +5180,9 @@ var init_posixPath = __esm({
5180
5180
  delimiter,
5181
5181
  isAbsolute: isAbsolute2,
5182
5182
  normalize,
5183
- join: join5,
5183
+ join: join6,
5184
5184
  resolve: resolve3,
5185
- dirname: dirname4,
5185
+ dirname: dirname5,
5186
5186
  basename: basename3,
5187
5187
  extname,
5188
5188
  relative
@@ -5423,16 +5423,16 @@ function sendJavaScript(req, res, source) {
5423
5423
  res.end(req.method === "HEAD" ? void 0 : source);
5424
5424
  }
5425
5425
  function resolveReplacementModuleFile(fromFile, specifier) {
5426
- const base = import_node_path11.default.resolve(import_node_path11.default.dirname(fromFile), specifier);
5426
+ const base = import_node_path12.default.resolve(import_node_path12.default.dirname(fromFile), specifier);
5427
5427
  const candidates = [
5428
5428
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
5429
- (ext) => ext === import_node_path11.default.extname(base).toLowerCase()
5429
+ (ext) => ext === import_node_path12.default.extname(base).toLowerCase()
5430
5430
  ) ? [base] : [],
5431
5431
  ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => base + ext),
5432
- ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path11.default.join(base, `index${ext}`))
5432
+ ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path12.default.join(base, `index${ext}`))
5433
5433
  ];
5434
5434
  const found = candidates.find(
5435
- (candidate) => (0, import_node_fs11.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
5435
+ (candidate) => (0, import_node_fs12.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
5436
5436
  );
5437
5437
  if (!found) {
5438
5438
  throw new Error(
@@ -5443,8 +5443,8 @@ function resolveReplacementModuleFile(fromFile, specifier) {
5443
5443
  }
5444
5444
  function isInsideAny(roots, file) {
5445
5445
  return roots.some((root) => {
5446
- const relative3 = import_node_path11.default.relative(root, file);
5447
- return !relative3.startsWith("..") && !import_node_path11.default.isAbsolute(relative3);
5446
+ const relative3 = import_node_path12.default.relative(root, file);
5447
+ return !relative3.startsWith("..") && !import_node_path12.default.isAbsolute(relative3);
5448
5448
  });
5449
5449
  }
5450
5450
  function isReplacementModuleRequestUrl(rawUrl) {
@@ -5493,19 +5493,19 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
5493
5493
  res.end("missing path param");
5494
5494
  return true;
5495
5495
  }
5496
- const extension = import_node_path11.default.extname(targetPath).toLowerCase();
5496
+ const extension = import_node_path12.default.extname(targetPath).toLowerCase();
5497
5497
  if (!REPLACEMENT_MODULE_EXTENSIONS.some((allowed) => allowed === extension)) {
5498
5498
  res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
5499
5499
  res.end(`replacement files must be ${REPLACEMENT_MODULE_EXTENSIONS.join(", ")}`);
5500
5500
  return true;
5501
5501
  }
5502
- if (!import_node_path11.default.isAbsolute(targetPath)) {
5502
+ if (!import_node_path12.default.isAbsolute(targetPath)) {
5503
5503
  res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
5504
5504
  res.end("replacement file path must be absolute");
5505
5505
  return true;
5506
5506
  }
5507
5507
  const runtimePackages = new Set(url.searchParams.getAll("runtimePackage"));
5508
- const servedRoots = options.servedRoots?.map((root) => import_node_path11.default.resolve(root));
5508
+ const servedRoots = options.servedRoots?.map((root) => import_node_path12.default.resolve(root));
5509
5509
  if (servedRoots && !isInsideAny(servedRoots, targetPath)) {
5510
5510
  res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
5511
5511
  res.end("replacement file must be inside a folder the bundler serves");
@@ -5557,14 +5557,14 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
5557
5557
  }
5558
5558
  return true;
5559
5559
  }
5560
- var import_node_fs11, import_promises5, import_node_path11, REPLACEMENT_MODULE_ROUTE;
5560
+ var import_node_fs12, import_promises5, import_node_path12, REPLACEMENT_MODULE_ROUTE;
5561
5561
  var init_replacement_module_handler = __esm({
5562
5562
  "src/host/replacement-module-handler.ts"() {
5563
5563
  "use strict";
5564
5564
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5565
- import_node_fs11 = require("node:fs");
5565
+ import_node_fs12 = require("node:fs");
5566
5566
  import_promises5 = __toESM(require("node:fs/promises"), 1);
5567
- import_node_path11 = __toESM(require("node:path"), 1);
5567
+ import_node_path12 = __toESM(require("node:path"), 1);
5568
5568
  init_replacementModule();
5569
5569
  init_backend_origin();
5570
5570
  REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
@@ -5583,22 +5583,22 @@ var init_forked_script_contract = __esm({
5583
5583
 
5584
5584
  // src/swift-source-file.ts
5585
5585
  function relativeInside(root, file) {
5586
- const relative3 = import_node_path12.default.relative(root, file);
5587
- return relative3 === ".." || relative3.startsWith(`..${import_node_path12.default.sep}`) || import_node_path12.default.isAbsolute(relative3) ? null : relative3;
5586
+ const relative3 = import_node_path13.default.relative(root, file);
5587
+ return relative3 === ".." || relative3.startsWith(`..${import_node_path13.default.sep}`) || import_node_path13.default.isAbsolute(relative3) ? null : relative3;
5588
5588
  }
5589
5589
  function packageInputPath(canonicalRoot, file) {
5590
- const canonicalFile = import_node_fs12.default.realpathSync(file);
5590
+ const canonicalFile = import_node_fs13.default.realpathSync(file);
5591
5591
  if (relativeInside(canonicalRoot, canonicalFile) === null) {
5592
5592
  throw new Error(`swift input escapes the selected package: ${file}`);
5593
5593
  }
5594
5594
  return canonicalFile;
5595
5595
  }
5596
5596
  function readPackageFile(root, file, maxBytes) {
5597
- const canonicalFile = packageInputPath(import_node_fs12.default.realpathSync(root), file);
5598
- const expected = import_node_fs12.default.statSync(canonicalFile);
5599
- const fd = import_node_fs12.default.openSync(canonicalFile, import_node_fs12.default.constants.O_RDONLY | import_node_fs12.default.constants.O_NOFOLLOW);
5597
+ const canonicalFile = packageInputPath(import_node_fs13.default.realpathSync(root), file);
5598
+ const expected = import_node_fs13.default.statSync(canonicalFile);
5599
+ const fd = import_node_fs13.default.openSync(canonicalFile, import_node_fs13.default.constants.O_RDONLY | import_node_fs13.default.constants.O_NOFOLLOW);
5600
5600
  try {
5601
- const stat = import_node_fs12.default.fstatSync(fd);
5601
+ const stat = import_node_fs13.default.fstatSync(fd);
5602
5602
  if (stat.dev !== expected.dev || stat.ino !== expected.ino) {
5603
5603
  throw new Error(`swift input changed while opening: ${file}`);
5604
5604
  }
@@ -5608,25 +5608,25 @@ function readPackageFile(root, file, maxBytes) {
5608
5608
  const bytes = Buffer.alloc(stat.size + 1);
5609
5609
  let offset = 0;
5610
5610
  while (offset < bytes.length) {
5611
- const count = import_node_fs12.default.readSync(fd, bytes, offset, bytes.length - offset, null);
5611
+ const count = import_node_fs13.default.readSync(fd, bytes, offset, bytes.length - offset, null);
5612
5612
  if (count === 0) break;
5613
5613
  offset += count;
5614
5614
  }
5615
- if (offset !== stat.size || import_node_fs12.default.fstatSync(fd).size !== stat.size) {
5615
+ if (offset !== stat.size || import_node_fs13.default.fstatSync(fd).size !== stat.size) {
5616
5616
  throw new Error(`swift input changed while reading: ${file}`);
5617
5617
  }
5618
5618
  return bytes.subarray(0, offset);
5619
5619
  } finally {
5620
- import_node_fs12.default.closeSync(fd);
5620
+ import_node_fs13.default.closeSync(fd);
5621
5621
  }
5622
5622
  }
5623
- var import_node_fs12, import_node_path12;
5623
+ var import_node_fs13, import_node_path13;
5624
5624
  var init_swift_source_file = __esm({
5625
5625
  "src/swift-source-file.ts"() {
5626
5626
  "use strict";
5627
5627
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5628
- import_node_fs12 = __toESM(require("node:fs"), 1);
5629
- import_node_path12 = __toESM(require("node:path"), 1);
5628
+ import_node_fs13 = __toESM(require("node:fs"), 1);
5629
+ import_node_path13 = __toESM(require("node:path"), 1);
5630
5630
  }
5631
5631
  });
5632
5632
 
@@ -5672,9 +5672,9 @@ var init_swift_submit = __esm({
5672
5672
  // cli/app-project.ts
5673
5673
  function firstNamedFile(dir, names) {
5674
5674
  for (const name2 of names) {
5675
- const candidate = import_node_path14.default.join(dir, name2);
5675
+ const candidate = import_node_path15.default.join(dir, name2);
5676
5676
  try {
5677
- if (import_node_fs14.default.statSync(candidate).isFile()) return candidate;
5677
+ if (import_node_fs15.default.statSync(candidate).isFile()) return candidate;
5678
5678
  } catch {
5679
5679
  }
5680
5680
  }
@@ -5687,25 +5687,25 @@ function findRNXAppConfig(dir) {
5687
5687
  return firstNamedFile(dir, PEACH_APP_CONFIG_NAMES);
5688
5688
  }
5689
5689
  function resolveAppProject(projectRoot) {
5690
- const appDir = import_node_path14.default.resolve(projectRoot);
5690
+ const appDir = import_node_path15.default.resolve(projectRoot);
5691
5691
  try {
5692
- if (!import_node_fs14.default.statSync(appDir).isDirectory()) return null;
5692
+ if (!import_node_fs15.default.statSync(appDir).isDirectory()) return null;
5693
5693
  } catch {
5694
5694
  return null;
5695
5695
  }
5696
5696
  const configPath = findRNXAppConfig(appDir);
5697
- if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs14.default.existsSync(import_node_path14.default.join(appDir, "package.json"))) {
5697
+ if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs15.default.existsSync(import_node_path15.default.join(appDir, "package.json"))) {
5698
5698
  return null;
5699
5699
  }
5700
5700
  return { appDir, configPath };
5701
5701
  }
5702
- var import_node_fs14, import_node_path14, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFIG_NAMES;
5702
+ var import_node_fs15, import_node_path15, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFIG_NAMES;
5703
5703
  var init_app_project = __esm({
5704
5704
  "cli/app-project.ts"() {
5705
5705
  "use strict";
5706
5706
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5707
- import_node_fs14 = __toESM(require("node:fs"), 1);
5708
- import_node_path14 = __toESM(require("node:path"), 1);
5707
+ import_node_fs15 = __toESM(require("node:fs"), 1);
5708
+ import_node_path15 = __toESM(require("node:path"), 1);
5709
5709
  EXPO_APP_CONFIG_NAMES = [
5710
5710
  "app.config.js",
5711
5711
  "app.config.ts",
@@ -5827,19 +5827,19 @@ function readJson(root, relative3) {
5827
5827
  return JSON.parse(
5828
5828
  readPackageFile(
5829
5829
  root,
5830
- import_node_path28.default.join(root, relative3),
5830
+ import_node_path29.default.join(root, relative3),
5831
5831
  MAX_SWIFT_COMPILE_SOURCE_BYTES
5832
5832
  ).toString("utf8")
5833
5833
  );
5834
5834
  }
5835
5835
  function registrations(root) {
5836
- const directory = import_node_path28.default.join(root, "nitrogen/generated/ios");
5837
- const initializers = import_node_fs25.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
5836
+ const directory = import_node_path29.default.join(root, "nitrogen/generated/ios");
5837
+ const initializers = import_node_fs26.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
5838
5838
  if (initializers.length !== 1)
5839
5839
  throw new Error(`${root}: expected one generated Nitro iOS initializer`);
5840
5840
  const source = readPackageFile(
5841
5841
  root,
5842
- import_node_path28.default.join(directory, initializers[0]),
5842
+ import_node_path29.default.join(directory, initializers[0]),
5843
5843
  MAX_SWIFT_COMPILE_SOURCE_BYTES
5844
5844
  ).toString("utf8");
5845
5845
  const namespaces = [
@@ -5902,18 +5902,18 @@ function registrations(root) {
5902
5902
  if (new Set(classes.map(({ name: name2 }) => name2)).size !== classes.length)
5903
5903
  throw new Error(`${root}: duplicate generated Nitro iOS registration`);
5904
5904
  classes.sort((a, b) => a.name.localeCompare(b.name));
5905
- const ios = import_node_path28.default.join(root, "ios");
5906
- if (swiftModule === null && import_node_fs25.default.existsSync(ios) && import_node_fs25.default.readdirSync(ios, { recursive: true, encoding: "utf8" }).some((file) => file.endsWith(".swift") && !file.startsWith("Tests")))
5905
+ const ios = import_node_path29.default.join(root, "ios");
5906
+ if (swiftModule === null && import_node_fs26.default.existsSync(ios) && import_node_fs26.default.readdirSync(ios, { recursive: true, encoding: "utf8" }).some((file) => file.endsWith(".swift") && !file.startsWith("Tests")))
5907
5907
  swiftModule = initializers[0].slice(0, -"Autolinking.mm".length);
5908
5908
  return { namespace, swiftModule, classes, views: viewNames(root, classes) };
5909
5909
  }
5910
5910
  function viewNames(root, classes) {
5911
- const directory = import_node_path28.default.join(root, "nitrogen/generated/shared/json");
5912
- if (!import_node_fs25.default.existsSync(directory)) return /* @__PURE__ */ new Set();
5911
+ const directory = import_node_path29.default.join(root, "nitrogen/generated/shared/json");
5912
+ if (!import_node_fs26.default.existsSync(directory)) return /* @__PURE__ */ new Set();
5913
5913
  const views = /* @__PURE__ */ new Set();
5914
- for (const file of import_node_fs25.default.readdirSync(directory)) {
5914
+ for (const file of import_node_fs26.default.readdirSync(directory)) {
5915
5915
  if (!file.endsWith("Config.json")) continue;
5916
- const config = readJson(root, import_node_path28.default.join("nitrogen/generated/shared/json", file));
5916
+ const config = readJson(root, import_node_path29.default.join("nitrogen/generated/shared/json", file));
5917
5917
  const name2 = object(config) ? config.uiViewClassName : void 0;
5918
5918
  if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
5919
5919
  views.add(name2);
@@ -5921,22 +5921,22 @@ function viewNames(root, classes) {
5921
5921
  return views;
5922
5922
  }
5923
5923
  function hasNitroIosInitializer(root) {
5924
- const generated = import_node_path28.default.join(root, "nitrogen/generated/ios");
5925
- return import_node_fs25.default.existsSync(generated) && import_node_fs25.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
5924
+ const generated = import_node_path29.default.join(root, "nitrogen/generated/ios");
5925
+ return import_node_fs26.default.existsSync(generated) && import_node_fs26.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
5926
5926
  }
5927
5927
  function nitroRegisteredNames(root) {
5928
5928
  if (!hasNitroIosInitializer(root)) return null;
5929
5929
  const { classes, views } = registrations(root);
5930
5930
  return { names: classes.map(({ name: name2 }) => name2), views: [...views].sort() };
5931
5931
  }
5932
- var import_node_child_process11, import_node_fs25, import_node_path28, import_node_util7, run6;
5932
+ var import_node_child_process11, import_node_fs26, import_node_path29, import_node_util7, run6;
5933
5933
  var init_nitro_source = __esm({
5934
5934
  "src/nitro-source.ts"() {
5935
5935
  "use strict";
5936
5936
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5937
5937
  import_node_child_process11 = require("node:child_process");
5938
- import_node_fs25 = __toESM(require("node:fs"), 1);
5939
- import_node_path28 = __toESM(require("node:path"), 1);
5938
+ import_node_fs26 = __toESM(require("node:fs"), 1);
5939
+ import_node_path29 = __toESM(require("node:path"), 1);
5940
5940
  import_node_util7 = require("node:util");
5941
5941
  init_forked_script_contract();
5942
5942
  init_nitro_dependencies();
@@ -6062,7 +6062,7 @@ function resolveAppStubs(appDir, config, configDir) {
6062
6062
  const { modules, views, hybridObjects } = expandStubs(appDir, source);
6063
6063
  assertRegisteredHybridObjects(appDir, source, hybridObjects);
6064
6064
  for (const [name2, answer] of Object.entries(hybridObjects))
6065
- nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path29.resolve)(source.baseDir, answer) };
6065
+ nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path30.resolve)(source.baseDir, answer) };
6066
6066
  for (const [name2, stub] of Object.entries(modules))
6067
6067
  nativeModules[name2] = lowerStub(stub, source.baseDir);
6068
6068
  for (const [name2, stub] of Object.entries(views))
@@ -6127,10 +6127,10 @@ function assertRegisteredHybridObjects(appDir, source, hybridObjects) {
6127
6127
  );
6128
6128
  }
6129
6129
  function lowerStub(stub, baseDir) {
6130
- return stub === "noop" ? stub : { file: (0, import_node_path29.resolve)(baseDir, stub) };
6130
+ return stub === "noop" ? stub : { file: (0, import_node_path30.resolve)(baseDir, stub) };
6131
6131
  }
6132
6132
  function readPackageJson(dir) {
6133
- const text2 = readSmallFile((0, import_node_path29.join)(dir, "package.json"));
6133
+ const text2 = readSmallFile((0, import_node_path30.join)(dir, "package.json"));
6134
6134
  if (!text2) return null;
6135
6135
  try {
6136
6136
  const parsed = JSON.parse(text2);
@@ -6142,9 +6142,9 @@ function readPackageJson(dir) {
6142
6142
  function installedPackageDir(appDir, name2) {
6143
6143
  let current = appDir;
6144
6144
  while (true) {
6145
- const dir = (0, import_node_path29.join)(current, "node_modules", name2);
6146
- if ((0, import_node_fs26.existsSync)((0, import_node_path29.join)(dir, "package.json"))) return (0, import_node_fs26.realpathSync)(dir);
6147
- const parent = (0, import_node_path29.dirname)(current);
6145
+ const dir = (0, import_node_path30.join)(current, "node_modules", name2);
6146
+ if ((0, import_node_fs27.existsSync)((0, import_node_path30.join)(dir, "package.json"))) return (0, import_node_fs27.realpathSync)(dir);
6147
+ const parent = (0, import_node_path30.dirname)(current);
6148
6148
  if (parent === current) return null;
6149
6149
  current = parent;
6150
6150
  }
@@ -6248,7 +6248,7 @@ function mergeRequests(previous, next) {
6248
6248
  function packageNativeRequests(dir) {
6249
6249
  const found = /* @__PURE__ */ new Map();
6250
6250
  const directories = scanRepository(dir).directories.filter((sub) => {
6251
- const segments = (0, import_node_path29.relative)(dir, sub).split("/");
6251
+ const segments = (0, import_node_path30.relative)(dir, sub).split("/");
6252
6252
  return !NATIVE_SOURCE_DIRS.has(segments[0]) && !segments.some((segment) => PACKAGE_SKIP_DIRS.has(segment));
6253
6253
  });
6254
6254
  let files = 0;
@@ -6256,7 +6256,7 @@ function packageNativeRequests(dir) {
6256
6256
  for (const name2 of listDir(sub)) {
6257
6257
  if (!SOURCE_FILE.test(name2) || name2.endsWith(".d.ts") || files >= 2e3) continue;
6258
6258
  files++;
6259
- const file = (0, import_node_path29.join)(sub, name2);
6259
+ const file = (0, import_node_path30.join)(sub, name2);
6260
6260
  const text2 = readSmallFile(file);
6261
6261
  if (!text2) continue;
6262
6262
  for (const { line: _line, ...request } of sourceNativeRequests(file, text2, true)) {
@@ -6374,27 +6374,27 @@ function wireSlotMigration(appDir, configPath, wire, kept = []) {
6374
6374
  }
6375
6375
  function listDir(dir) {
6376
6376
  try {
6377
- return (0, import_node_fs26.readdirSync)(dir);
6377
+ return (0, import_node_fs27.readdirSync)(dir);
6378
6378
  } catch {
6379
6379
  return [];
6380
6380
  }
6381
6381
  }
6382
6382
  function readSmallFile(file) {
6383
6383
  try {
6384
- return (0, import_node_fs26.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs26.readFileSync)(file, "utf8") : null;
6384
+ return (0, import_node_fs27.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs27.readFileSync)(file, "utf8") : null;
6385
6385
  } catch {
6386
6386
  return null;
6387
6387
  }
6388
6388
  }
6389
6389
  function hasNativeCode(dir, platform) {
6390
- const expoConfig = (0, import_node_path29.join)(dir, "expo-module.config.json");
6390
+ const expoConfig = (0, import_node_path30.join)(dir, "expo-module.config.json");
6391
6391
  const platforms = metadataValue(readProjectJson(expoConfig), "platforms");
6392
6392
  if (Array.isArray(platforms))
6393
6393
  return platforms.includes(platform) || platform === "ios" && platforms.includes("apple");
6394
- if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs26.existsSync)((0, import_node_path29.join)(dir, entry))))
6394
+ if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs27.existsSync)((0, import_node_path30.join)(dir, entry))))
6395
6395
  return true;
6396
6396
  if (listDir(dir).some((name2) => name2.endsWith(".podspec"))) return true;
6397
- const manifest = readSmallFile((0, import_node_path29.join)(dir, "package.json"));
6397
+ const manifest = readSmallFile((0, import_node_path30.join)(dir, "package.json"));
6398
6398
  return manifest !== null && manifest.includes('"codegenConfig"');
6399
6399
  }
6400
6400
  function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__PURE__ */ new Set(), includeLegacy = false, providers) {
@@ -6407,7 +6407,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6407
6407
  (excluded) => dir === excluded || dir.startsWith(`${excluded}/`)
6408
6408
  ))
6409
6409
  continue;
6410
- if ((0, import_node_fs26.existsSync)((0, import_node_path29.join)(dir, "expo-module.config.json"))) {
6410
+ if ((0, import_node_fs27.existsSync)((0, import_node_path30.join)(dir, "expo-module.config.json"))) {
6411
6411
  if (platform && !hasNativeCode(dir, platform)) {
6412
6412
  excludedModuleDirs.push(dir);
6413
6413
  continue;
@@ -6416,7 +6416,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6416
6416
  }
6417
6417
  for (const name2 of listDir(dir)) {
6418
6418
  if (SOURCE_FILE.test(name2) && !name2.endsWith(".d.ts"))
6419
- sourceFiles.push((0, import_node_path29.join)(dir, name2));
6419
+ sourceFiles.push((0, import_node_path30.join)(dir, name2));
6420
6420
  }
6421
6421
  }
6422
6422
  }
@@ -6426,7 +6426,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6426
6426
  scanRepository(dir).directories.flatMap(
6427
6427
  (sub) => listDir(sub).filter(
6428
6428
  (name2) => NATIVE_SOURCE_FILE.test(name2) && (!platform || (platform === "ios" ? name2.endsWith(".swift") : name2.endsWith(".kt")))
6429
- ).map((name2) => (0, import_node_path29.join)(sub, name2))
6429
+ ).map((name2) => (0, import_node_path30.join)(sub, name2))
6430
6430
  )
6431
6431
  ])
6432
6432
  );
@@ -6435,7 +6435,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6435
6435
  const known = owners.get(dir);
6436
6436
  if (known) return known;
6437
6437
  const name2 = readPackageJson(dir)?.name;
6438
- const parent = (0, import_node_path29.dirname)(dir);
6438
+ const parent = (0, import_node_path30.dirname)(dir);
6439
6439
  const result = typeof name2 === "string" ? name2 : parent === dir ? pkg.name ?? "app" : owner(parent);
6440
6440
  owners.set(dir, result);
6441
6441
  return result;
@@ -6449,22 +6449,22 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6449
6449
  else {
6450
6450
  const moduleDir2 = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`));
6451
6451
  if (moduleDir2 && (file.endsWith(".swift") || !known.expoModule)) {
6452
- known.expoModule = (0, import_node_path29.relative)(appDir, moduleDir2) || ".";
6452
+ known.expoModule = (0, import_node_path30.relative)(appDir, moduleDir2) || ".";
6453
6453
  known.swift = file.endsWith(".swift");
6454
6454
  }
6455
6455
  }
6456
6456
  return;
6457
6457
  }
6458
6458
  providers ??= dependencyNativeOwners(appDir, pkg);
6459
- const packageName = providers.get(key) ?? owner((0, import_node_path29.dirname)(file));
6459
+ const packageName = providers.get(key) ?? owner((0, import_node_path30.dirname)(file));
6460
6460
  if (knownPackages.has(packageName)) return;
6461
6461
  const moduleDir = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`)) ?? null;
6462
6462
  found.set(key, {
6463
6463
  kind,
6464
6464
  name: name2,
6465
6465
  package: packageName,
6466
- path: `${(0, import_node_path29.relative)(appDir, file)}:${line}`,
6467
- expoModule: moduleDir ? (0, import_node_path29.relative)(appDir, moduleDir) || "." : null,
6466
+ path: `${(0, import_node_path30.relative)(appDir, file)}:${line}`,
6467
+ expoModule: moduleDir ? (0, import_node_path30.relative)(appDir, moduleDir) || "." : null,
6468
6468
  optional,
6469
6469
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
6470
6470
  (path30) => path30.endsWith(".swift") && [...(readSmallFile(path30) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
@@ -6515,30 +6515,30 @@ function workspacePackageDirs(appDir, pkg) {
6515
6515
  for (const name2 of Object.keys({ ...pkg.dependencies, ...pkg.devDependencies })) {
6516
6516
  let current = appDir;
6517
6517
  while (true) {
6518
- const link = (0, import_node_path29.join)(current, "node_modules", name2);
6519
- if ((0, import_node_fs26.existsSync)(link)) {
6520
- if ((0, import_node_fs26.lstatSync)(link).isSymbolicLink()) {
6521
- const target = (0, import_node_fs26.realpathSync)(link);
6518
+ const link = (0, import_node_path30.join)(current, "node_modules", name2);
6519
+ if ((0, import_node_fs27.existsSync)(link)) {
6520
+ if ((0, import_node_fs27.lstatSync)(link).isSymbolicLink()) {
6521
+ const target = (0, import_node_fs27.realpathSync)(link);
6522
6522
  if (!target.split("/").includes("node_modules") && !target.startsWith(`${appDir}/`)) {
6523
6523
  dirs.add(target);
6524
6524
  }
6525
6525
  }
6526
6526
  break;
6527
6527
  }
6528
- const parent = (0, import_node_path29.dirname)(current);
6528
+ const parent = (0, import_node_path30.dirname)(current);
6529
6529
  if (parent === current) break;
6530
6530
  current = parent;
6531
6531
  }
6532
6532
  }
6533
6533
  return [...dirs];
6534
6534
  }
6535
- var import_node_fs26, import_node_path29, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
6535
+ var import_node_fs27, import_node_path30, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
6536
6536
  var init_app_stubs = __esm({
6537
6537
  "cli/app-stubs.ts"() {
6538
6538
  "use strict";
6539
6539
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6540
- import_node_fs26 = require("node:fs");
6541
- import_node_path29 = require("node:path");
6540
+ import_node_fs27 = require("node:fs");
6541
+ import_node_path30 = require("node:path");
6542
6542
  init_version_range();
6543
6543
  import_oxc_parser2 = require("oxc-parser");
6544
6544
  import_sucrase = require("sucrase");
@@ -6574,12 +6574,12 @@ function resolveFileEntries(entries, configDir) {
6574
6574
  return Object.fromEntries(
6575
6575
  Object.entries(entries).map(([name2, resolution]) => [
6576
6576
  name2,
6577
- resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path30.default.resolve(configDir, resolution.file) } : resolution
6577
+ resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path31.default.resolve(configDir, resolution.file) } : resolution
6578
6578
  ])
6579
6579
  );
6580
6580
  }
6581
6581
  function resolveConfigReplacementFiles(config, configPath) {
6582
- const configDir = import_node_path30.default.dirname(configPath);
6582
+ const configDir = import_node_path31.default.dirname(configPath);
6583
6583
  return {
6584
6584
  ...config,
6585
6585
  modules: resolveFileEntries(config.modules, configDir)
@@ -6595,7 +6595,7 @@ async function loadRNXAppStubs(project) {
6595
6595
  return resolveAppStubs(
6596
6596
  project.appDir,
6597
6597
  config,
6598
- project.configPath ? import_node_path30.default.dirname(project.configPath) : project.appDir
6598
+ project.configPath ? import_node_path31.default.dirname(project.configPath) : project.appDir
6599
6599
  );
6600
6600
  } catch (error) {
6601
6601
  const message = error instanceof Error ? error.message : String(error);
@@ -6614,7 +6614,7 @@ async function loadConfigFile(project) {
6614
6614
  [`${rnxPublicBrand.packageName}/config`]: config_exports
6615
6615
  }
6616
6616
  });
6617
- const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs27.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
6617
+ const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs28.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
6618
6618
  if (!isPeachConfig(loaded3)) {
6619
6619
  throw new Error("the default export must be a peach config object");
6620
6620
  }
@@ -6650,13 +6650,13 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
6650
6650
  const project = resolveAppProject(startDir);
6651
6651
  return { project, ...await loadRNXAppStubs(project) };
6652
6652
  }
6653
- var import_node_fs27, import_node_path30, import_jiti, WIRE_SLOTS;
6653
+ var import_node_fs28, import_node_path31, import_jiti, WIRE_SLOTS;
6654
6654
  var init_app_config = __esm({
6655
6655
  "cli/app-config.ts"() {
6656
6656
  "use strict";
6657
6657
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6658
- import_node_fs27 = require("node:fs");
6659
- import_node_path30 = __toESM(require("node:path"), 1);
6658
+ import_node_fs28 = require("node:fs");
6659
+ import_node_path31 = __toESM(require("node:path"), 1);
6660
6660
  import_jiti = require("jiti");
6661
6661
  init_config();
6662
6662
  init_config();
@@ -6756,14 +6756,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6756
6756
  const neededPackages = /* @__PURE__ */ new Set();
6757
6757
  const factories = [];
6758
6758
  const visit3 = (filePath) => {
6759
- const real = import_node_fs28.default.realpathSync(filePath);
6759
+ const real = import_node_fs29.default.realpathSync(filePath);
6760
6760
  const previous = files.get(real);
6761
6761
  if (previous !== void 0) return previous;
6762
6762
  const id = "peach-config-file:" + files.size;
6763
6763
  files.set(real, id);
6764
6764
  const compiled = compileReplacementModule({
6765
6765
  filePath: real,
6766
- source: import_node_fs28.default.readFileSync(real, "utf8"),
6766
+ source: import_node_fs29.default.readFileSync(real, "utf8"),
6767
6767
  runtimePackages,
6768
6768
  localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
6769
6769
  });
@@ -6787,7 +6787,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6787
6787
  if (!entries || typeof entries !== "object") continue;
6788
6788
  for (const resolution of Object.values(entries)) {
6789
6789
  if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
6790
- resolution.file = visit3(import_node_path31.default.resolve(resolution.file));
6790
+ resolution.file = visit3(import_node_path32.default.resolve(resolution.file));
6791
6791
  }
6792
6792
  }
6793
6793
  }
@@ -6811,13 +6811,13 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6811
6811
  const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
6812
6812
  return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
6813
6813
  }
6814
- var import_node_fs28, import_node_path31, import_sucrase2, import_terser, PREFIX_START, PREFIX_END;
6814
+ var import_node_fs29, import_node_path32, import_sucrase2, import_terser, PREFIX_START, PREFIX_END;
6815
6815
  var init_configured_bundle_producer = __esm({
6816
6816
  "src/configured-bundle-producer.ts"() {
6817
6817
  "use strict";
6818
6818
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6819
- import_node_fs28 = __toESM(require("node:fs"), 1);
6820
- import_node_path31 = __toESM(require("node:path"), 1);
6819
+ import_node_fs29 = __toESM(require("node:fs"), 1);
6820
+ import_node_path32 = __toESM(require("node:path"), 1);
6821
6821
  import_sucrase2 = require("sucrase");
6822
6822
  import_terser = require("terser");
6823
6823
  init_dependencies();
@@ -6865,7 +6865,7 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6865
6865
 
6866
6866
  // cli/cloud-client.ts
6867
6867
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6868
- var import_node_crypto3 = require("node:crypto");
6868
+ var import_node_crypto4 = require("node:crypto");
6869
6869
 
6870
6870
  // src/androidAutolinkingContract.ts
6871
6871
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -6901,7 +6901,7 @@ var import_node_module = require("node:module");
6901
6901
  var import_node_path2 = require("node:path");
6902
6902
 
6903
6903
  // runtime-companion.json
6904
- var runtime_companion_default = { abi: 1, sha256: "b75c5cdfbd95172e0c2434d6acfda5bc5940f1960123f07cdee4ad9a17b274f3", file: "node/cli-b75c5cdfbd95172e0c2434d6acfda5bc5940f1960123f07cdee4ad9a17b274f3.cjs" };
6904
+ var runtime_companion_default = { abi: 1, sha256: "77c8e261af4f0a75c45389b7605abcb681d900495f128191f81464492ffadda7", file: "node/cli-77c8e261af4f0a75c45389b7605abcb681d900495f128191f81464492ffadda7.cjs" };
6905
6905
 
6906
6906
  // src/runtime-assets.ts
6907
6907
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -7366,7 +7366,11 @@ var CHOOSE_ACCOUNT_HINT = "this sign-in belongs to several accounts; run `peach
7366
7366
 
7367
7367
  // cli/cloud-session.ts
7368
7368
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7369
+ var import_node_crypto3 = require("node:crypto");
7370
+ var import_node_fs4 = require("node:fs");
7371
+ var import_node_path4 = require("node:path");
7369
7372
  init_backend_origin();
7373
+ init_home_paths();
7370
7374
  init_is_record();
7371
7375
  var CLOUD_SESSION_VERSION = 3;
7372
7376
  var MAX_ENCODED_SESSION_BYTES = 32 * 1024;
@@ -7500,9 +7504,37 @@ function parseCloudSession(encoded) {
7500
7504
  throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
7501
7505
  }
7502
7506
  }
7503
- function readCloudSession(environment = process.env) {
7504
- const encoded = environment[PEACH_CLOUD_SESSION_ENV];
7505
- return encoded?.trim() ? parseCloudSession(encoded) : null;
7507
+ var PROJECT_MARKERS = [
7508
+ "package.json",
7509
+ "Package.swift",
7510
+ "settings.gradle",
7511
+ "settings.gradle.kts",
7512
+ ".git"
7513
+ ];
7514
+ function projectSessionFile() {
7515
+ const cwd = (0, import_node_fs4.realpathSync)(process.cwd());
7516
+ let dir = cwd;
7517
+ while (!PROJECT_MARKERS.some((marker) => (0, import_node_fs4.existsSync)((0, import_node_path4.join)(dir, marker)))) {
7518
+ const parent = (0, import_node_path4.dirname)(dir);
7519
+ if (parent === dir) {
7520
+ dir = cwd;
7521
+ break;
7522
+ }
7523
+ dir = parent;
7524
+ }
7525
+ const key = (0, import_node_crypto3.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
7526
+ return (0, import_node_path4.join)(rnxHomeDir(), "remote-sessions", `${key}.json`);
7527
+ }
7528
+ function readCloudSession() {
7529
+ const encoded = process.env[PEACH_CLOUD_SESSION_ENV];
7530
+ if (encoded?.trim()) return parseCloudSession(encoded);
7531
+ const file = projectSessionFile();
7532
+ if (!(0, import_node_fs4.existsSync)(file)) return null;
7533
+ const saved = JSON.parse((0, import_node_fs4.readFileSync)(file, "utf8"));
7534
+ if (!isRecord(saved) || typeof saved.session !== "string") {
7535
+ throw new Error(`the saved remote simulator in ${file} is invalid`);
7536
+ }
7537
+ return parseCloudSession(saved.session);
7506
7538
  }
7507
7539
 
7508
7540
  // cli/cloud-client.ts
@@ -7531,8 +7563,9 @@ var ACCOUNT_CHOICE_REFUSALS = /* @__PURE__ */ new Set([
7531
7563
  function responseError(status, text2) {
7532
7564
  const parsed = text2 ? failureSentence(text2) : null;
7533
7565
  const sentence = parsed && ACCOUNT_CHOICE_REFUSALS.has(parsed) ? CHOOSE_ACCOUNT_HINT : parsed;
7566
+ const hint = parsed?.endsWith(" requires the debug scope") ? "; this command needs debug access, which a remote simulator does not grant, so run it against a local sim" : "";
7534
7567
  return new Error(
7535
- `remote simulator request failed (${status})${sentence ? `: ${sentence}` : text2.trim() ? `: ${text2.trim()}` : ""}`
7568
+ `remote simulator request failed (${status})${sentence ? `: ${sentence}${hint}` : text2.trim() ? `: ${text2.trim()}` : ""}`
7536
7569
  );
7537
7570
  }
7538
7571
  function resolveCloudSessionForParsed(parsed) {
@@ -7579,7 +7612,7 @@ var CloudBridge = class {
7579
7612
  async send(command, options) {
7580
7613
  const timeoutMs = options?.timeoutMs ?? this.explicitTimeoutMs ?? options?.defaultTimeoutMs;
7581
7614
  const body = {
7582
- id: (0, import_node_crypto3.randomUUID)(),
7615
+ id: (0, import_node_crypto4.randomUUID)(),
7583
7616
  claimId: this.session.claimId,
7584
7617
  command: cloudCommand(command)
7585
7618
  };
@@ -7651,7 +7684,7 @@ var CloudBoxBridge = class {
7651
7684
  plane = "cloud";
7652
7685
  async send(command, options) {
7653
7686
  const timeoutMs = options?.timeoutMs ?? this.explicitTimeoutMs ?? options?.defaultTimeoutMs;
7654
- const id = (0, import_node_crypto3.randomUUID)();
7687
+ const id = (0, import_node_crypto4.randomUUID)();
7655
7688
  const payload = {};
7656
7689
  for (const [key, value] of Object.entries(command)) {
7657
7690
  if (key !== "id" && key !== "simId") payload[key] = value;
@@ -8113,8 +8146,8 @@ function isOpenPending() {
8113
8146
 
8114
8147
  // cli/ws-bridge.ts
8115
8148
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8116
- var import_node_fs7 = __toESM(require("node:fs"), 1);
8117
- var import_node_path6 = __toESM(require("node:path"), 1);
8149
+ var import_node_fs8 = __toESM(require("node:fs"), 1);
8150
+ var import_node_path7 = __toESM(require("node:path"), 1);
8118
8151
  var import_ws = require("ws");
8119
8152
 
8120
8153
  // src/bridge-constants.ts
@@ -8196,11 +8229,11 @@ init_home_paths();
8196
8229
  // cli/pause-aware-timeout.ts
8197
8230
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8198
8231
  var import_node_child_process = require("node:child_process");
8199
- var import_node_fs6 = require("node:fs");
8232
+ var import_node_fs7 = require("node:fs");
8200
8233
  var import_node_os2 = __toESM(require("node:os"), 1);
8201
- var import_node_path5 = __toESM(require("node:path"), 1);
8202
- var LEDGER_PATH = import_node_path5.default.join(
8203
- process.env.TM_HOME || import_node_path5.default.join(import_node_os2.default.homedir(), ".team-machine"),
8234
+ var import_node_path6 = __toESM(require("node:path"), 1);
8235
+ var LEDGER_PATH = import_node_path6.default.join(
8236
+ process.env.TM_HOME || import_node_path6.default.join(import_node_os2.default.homedir(), ".team-machine"),
8204
8237
  "governor-pauses.json"
8205
8238
  );
8206
8239
  var TICK_MS = 500;
@@ -8210,7 +8243,7 @@ var pollDueAt = 0;
8210
8243
  function pausedPids() {
8211
8244
  try {
8212
8245
  const ledger = JSON.parse(
8213
- (0, import_node_fs6.readFileSync)(LEDGER_PATH, "utf8")
8246
+ (0, import_node_fs7.readFileSync)(LEDGER_PATH, "utf8")
8214
8247
  );
8215
8248
  return Object.values(ledger).flatMap((procs) => procs.map((proc) => proc.pid));
8216
8249
  } catch {
@@ -8291,17 +8324,17 @@ function liveDevBridgeLockfiles() {
8291
8324
  return readDevBridgeLockfiles().filter((lockfile) => isDevBridgeLockfileFresh(lockfile));
8292
8325
  }
8293
8326
  function checkoutRoot(cwd) {
8294
- let current = import_node_path6.default.resolve(cwd);
8327
+ let current = import_node_path7.default.resolve(cwd);
8295
8328
  while (true) {
8296
- if (import_node_fs7.default.existsSync(import_node_path6.default.join(current, ".git"))) return current;
8297
- const parent = import_node_path6.default.dirname(current);
8329
+ if (import_node_fs8.default.existsSync(import_node_path7.default.join(current, ".git"))) return current;
8330
+ const parent = import_node_path7.default.dirname(current);
8298
8331
  if (parent === current) return null;
8299
8332
  current = parent;
8300
8333
  }
8301
8334
  }
8302
8335
  function pathContains(parent, child) {
8303
- const relative3 = import_node_path6.default.relative(parent, child);
8304
- return relative3 === "" || relative3 !== ".." && !relative3.startsWith(`..${import_node_path6.default.sep}`) && !import_node_path6.default.isAbsolute(relative3);
8336
+ const relative3 = import_node_path7.default.relative(parent, child);
8337
+ return relative3 === "" || relative3 !== ".." && !relative3.startsWith(`..${import_node_path7.default.sep}`) && !import_node_path7.default.isAbsolute(relative3);
8305
8338
  }
8306
8339
  function resolveDefaultDevBridgeLockfile() {
8307
8340
  const lockfiles = liveDevBridgeLockfiles();
@@ -8426,6 +8459,12 @@ var BridgeSimLockedError = class extends Error {
8426
8459
  this.lock = lock;
8427
8460
  }
8428
8461
  };
8462
+ var BridgeHandshakeTimeoutError = class extends Error {
8463
+ constructor(message) {
8464
+ super(message);
8465
+ this.name = "BridgeHandshakeTimeoutError";
8466
+ }
8467
+ };
8429
8468
  function describeSimIdSource(source) {
8430
8469
  if (source === "flag") return "via --sim";
8431
8470
  if (source === "saved") return "saved via `peach use`";
@@ -8499,7 +8538,7 @@ function createBridge(wsPort, opts = {}) {
8499
8538
  const ready = new Promise((resolve5, reject) => {
8500
8539
  const handshakeTimer = setTimeout(() => {
8501
8540
  reject(
8502
- new Error(
8541
+ new BridgeHandshakeTimeoutError(
8503
8542
  `${bridgeWsUrl(wsPort)} accepted the connection but did not complete the websocket handshake within ${commandTimeoutMs / 1e3}s; is it a peach bridge?`
8504
8543
  )
8505
8544
  );
@@ -11535,8 +11574,7 @@ function rasterLayerFrame(node) {
11535
11574
  height: node.layout.height
11536
11575
  };
11537
11576
  }
11538
- var RNX_SELECTION_PIXEL_RATIO = 3;
11539
- function selectRnxRasterNodeIds(tree2) {
11577
+ function selectRnxRasterNodeIds(tree2, pixelRatio) {
11540
11578
  const nodesById = new Map(tree2.nodes.map((node) => [node.nodeId, node]));
11541
11579
  const maxLayerArea = tree2.width * tree2.height * 0.25;
11542
11580
  const eligible = /* @__PURE__ */ new Map();
@@ -11589,10 +11627,10 @@ function selectRnxRasterNodeIds(tree2) {
11589
11627
  while (picked.length > 0) {
11590
11628
  const fits = fitRnxCaptureRegions(
11591
11629
  rnxRasterRegionRequests(tree2, selection),
11592
- RNX_SELECTION_PIXEL_RATIO,
11630
+ pixelRatio,
11593
11631
  {
11594
- pixelWidth: Math.round(tree2.width * RNX_SELECTION_PIXEL_RATIO),
11595
- pixelHeight: Math.round(tree2.height * RNX_SELECTION_PIXEL_RATIO)
11632
+ pixelWidth: Math.round(tree2.width * pixelRatio),
11633
+ pixelHeight: Math.round(tree2.height * pixelRatio)
11596
11634
  }
11597
11635
  );
11598
11636
  if (fits) break;
@@ -11663,7 +11701,7 @@ function liquidGlassPaintOutset(glass, frame) {
11663
11701
  }
11664
11702
  return outset;
11665
11703
  }
11666
- function rnxCaptureRasterRegions(capture) {
11704
+ function rnxCaptureRasterRegions(capture, pixelRatio) {
11667
11705
  const tree2 = {
11668
11706
  width: capture.tree.viewport.width,
11669
11707
  height: capture.tree.viewport.height,
@@ -11680,7 +11718,7 @@ function rnxCaptureRasterRegions(capture) {
11680
11718
  visibleFrame: node.layout.visibleFrame
11681
11719
  }))
11682
11720
  };
11683
- const selection = selectRnxRasterNodeIds(tree2);
11721
+ const selection = selectRnxRasterNodeIds(tree2, pixelRatio);
11684
11722
  return rnxRasterRegionRequests(tree2, selection);
11685
11723
  }
11686
11724
  function rnxRasterRegionRequests(tree2, selection) {
@@ -11873,7 +11911,7 @@ function isRnxCaptureRegionAtlas(value) {
11873
11911
  // src/vite-plugin-one.ts
11874
11912
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11875
11913
  var import_fs6 = __toESM(require("fs"), 1);
11876
- var import_node_crypto6 = require("node:crypto");
11914
+ var import_node_crypto7 = require("node:crypto");
11877
11915
  var import_node_http3 = __toESM(require("node:http"), 1);
11878
11916
  var import_node_https2 = __toESM(require("node:https"), 1);
11879
11917
  var import_node_url2 = require("node:url");
@@ -11884,9 +11922,9 @@ var import_ws2 = require("ws");
11884
11922
  // src/dev-server-open.ts
11885
11923
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11886
11924
  var import_node_child_process2 = require("node:child_process");
11887
- var import_node_crypto4 = require("node:crypto");
11888
- var import_node_fs8 = __toESM(require("node:fs"), 1);
11889
- var import_node_path7 = __toESM(require("node:path"), 1);
11925
+ var import_node_crypto5 = require("node:crypto");
11926
+ var import_node_fs9 = __toESM(require("node:fs"), 1);
11927
+ var import_node_path8 = __toESM(require("node:path"), 1);
11890
11928
  function resolveRnxDesktopAppName(open, projectRoot) {
11891
11929
  if (!open) return null;
11892
11930
  if (typeof open === "object") {
@@ -11894,8 +11932,8 @@ function resolveRnxDesktopAppName(open, projectRoot) {
11894
11932
  if (!appName) throw new Error("peach: open.appName must not be empty");
11895
11933
  return appName;
11896
11934
  }
11897
- const packageJsonPath = import_node_path7.default.join(projectRoot, "package.json");
11898
- const packageJson = JSON.parse(import_node_fs8.default.readFileSync(packageJsonPath, "utf8"));
11935
+ const packageJsonPath = import_node_path8.default.join(projectRoot, "package.json");
11936
+ const packageJson = JSON.parse(import_node_fs9.default.readFileSync(packageJsonPath, "utf8"));
11899
11937
  const packageName = packageJson && typeof packageJson === "object" ? Reflect.get(packageJson, "name") : void 0;
11900
11938
  if (typeof packageName !== "string" || !packageName.trim()) {
11901
11939
  throw new Error(`peach: ${packageJsonPath} must declare a package name`);
@@ -11909,7 +11947,7 @@ function tagRnxBundleForPlugin(bundleUrl, replacementOrigin, replacementToken, p
11909
11947
  url.searchParams.set("rnxAppName", appName);
11910
11948
  url.searchParams.set(
11911
11949
  "rnxProjectId",
11912
- (0, import_node_crypto4.createHash)("sha256").update(import_node_fs8.default.realpathSync(projectRoot)).digest("hex").slice(0, 32)
11950
+ (0, import_node_crypto5.createHash)("sha256").update(import_node_fs9.default.realpathSync(projectRoot)).digest("hex").slice(0, 32)
11913
11951
  );
11914
11952
  }
11915
11953
  url.searchParams.set("rnxReplacementOrigin", replacementOrigin);
@@ -12037,7 +12075,6 @@ var LAZY_STUB_PATTERNS = [
12037
12075
  "clevertap-react-native",
12038
12076
  "expo-dynamic-app-icon",
12039
12077
  "expo-health-connect",
12040
- "expo-in-app-updates",
12041
12078
  "expo-mesh-gradient",
12042
12079
  "expo-modules-core",
12043
12080
  "expo-superwall",
@@ -12056,7 +12093,6 @@ var LAZY_STUB_PATTERNS = [
12056
12093
  "react-native-app-clip",
12057
12094
  "react-native-avoid-softinput",
12058
12095
  "react-native-azure-auth",
12059
- "react-native-background-actions",
12060
12096
  "react-native-bare-kit",
12061
12097
  "react-native-bluetooth-classic",
12062
12098
  "react-native-bluetooth-state-manager",
@@ -12742,6 +12778,7 @@ var LIGHT_NATIVE_PACKAGE_NAMES = [
12742
12778
  "react-native-installed-app-checker",
12743
12779
  "react-native-is-detox",
12744
12780
  "react-native-is-keyboard-connected",
12781
+ "react-native-is-maestro",
12745
12782
  "react-native-keyboard-input",
12746
12783
  "react-native-khipu",
12747
12784
  "react-native-klarna-inapp-sdk",
@@ -14787,12 +14824,6 @@ var COMPAT_STUBS = {
14787
14824
  runtimeTier: "none",
14788
14825
  buildResolvers: ["vite"]
14789
14826
  },
14790
- expoInAppUpdates: {
14791
- specifier: "expo-in-app-updates",
14792
- stubFile: "noop-sdks-extra/expo-in-app-updates.ts",
14793
- runtimeTier: "none",
14794
- buildResolvers: ["vite"]
14795
- },
14796
14827
  expoSuperwall: {
14797
14828
  specifier: "expo-superwall",
14798
14829
  stubFile: "noop-sdks-extra/expo-superwall.ts",
@@ -14815,8 +14846,8 @@ var COMPAT_STUBS = {
14815
14846
 
14816
14847
  // src/installed-native-build-options.ts
14817
14848
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
14818
- var import_node_fs9 = __toESM(require("node:fs"), 1);
14819
- var import_node_path8 = __toESM(require("node:path"), 1);
14849
+ var import_node_fs10 = __toESM(require("node:fs"), 1);
14850
+ var import_node_path9 = __toESM(require("node:path"), 1);
14820
14851
  init_version_range();
14821
14852
  var RIVE_PACKAGE = "@rive-app/react-native";
14822
14853
  var RIVE_05 = [">=0.5.0 <0.6.0"];
@@ -14825,10 +14856,10 @@ function missing(error) {
14825
14856
  }
14826
14857
  function answerSync(step) {
14827
14858
  try {
14828
- if (step.type === "realpath") return import_node_fs9.default.realpathSync(step.path);
14829
- if (step.type === "read") return import_node_fs9.default.readFileSync(step.path, "utf8");
14830
- if (step.type === "isDirectory") return import_node_fs9.default.statSync(step.path).isDirectory();
14831
- return import_node_fs9.default.readdirSync(step.path, { withFileTypes: true }).map((entry) => ({
14859
+ if (step.type === "realpath") return import_node_fs10.default.realpathSync(step.path);
14860
+ if (step.type === "read") return import_node_fs10.default.readFileSync(step.path, "utf8");
14861
+ if (step.type === "isDirectory") return import_node_fs10.default.statSync(step.path).isDirectory();
14862
+ return import_node_fs10.default.readdirSync(step.path, { withFileTypes: true }).map((entry) => ({
14832
14863
  name: entry.name,
14833
14864
  directory: entry.isDirectory(),
14834
14865
  symbolicLink: entry.isSymbolicLink()
@@ -14840,11 +14871,11 @@ function answerSync(step) {
14840
14871
  }
14841
14872
  async function answerAsync(step) {
14842
14873
  try {
14843
- if (step.type === "realpath") return await import_node_fs9.default.promises.realpath(step.path);
14844
- if (step.type === "read") return await import_node_fs9.default.promises.readFile(step.path, "utf8");
14874
+ if (step.type === "realpath") return await import_node_fs10.default.promises.realpath(step.path);
14875
+ if (step.type === "read") return await import_node_fs10.default.promises.readFile(step.path, "utf8");
14845
14876
  if (step.type === "isDirectory")
14846
- return (await import_node_fs9.default.promises.stat(step.path)).isDirectory();
14847
- return (await import_node_fs9.default.promises.readdir(step.path, { withFileTypes: true })).map(
14877
+ return (await import_node_fs10.default.promises.stat(step.path)).isDirectory();
14878
+ return (await import_node_fs10.default.promises.readdir(step.path, { withFileTypes: true })).map(
14848
14879
  (entry) => ({
14849
14880
  name: entry.name,
14850
14881
  directory: entry.isDirectory(),
@@ -14877,7 +14908,7 @@ function* rubyFiles(directory, seen, iosRoot = false) {
14877
14908
  const files = [];
14878
14909
  for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
14879
14910
  if (iosRoot && (entry.name === "Pods" || entry.name === "build")) continue;
14880
- const target = import_node_path8.default.join(directory, entry.name);
14911
+ const target = import_node_path9.default.join(directory, entry.name);
14881
14912
  let isDirectory2 = entry.directory;
14882
14913
  if (entry.symbolicLink)
14883
14914
  isDirectory2 = (yield { type: "isDirectory", path: target }) === true;
@@ -14890,8 +14921,8 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
14890
14921
  if (!needsRiveOptions(versions)) return {};
14891
14922
  if (environment.USE_RIVE_LEGACY === "1" || environment.USE_RIVE_LEGACY === "true")
14892
14923
  return { [RIVE_PACKAGE]: { USE_RIVE_LEGACY: true } };
14893
- const ios = import_node_path8.default.join(projectRoot, "ios");
14894
- const podfile = import_node_path8.default.join(ios, "Podfile");
14924
+ const ios = import_node_path9.default.join(projectRoot, "ios");
14925
+ const podfile = import_node_path9.default.join(ios, "Podfile");
14895
14926
  const files = [podfile, ...yield* rubyFiles(ios, /* @__PURE__ */ new Set(), true)];
14896
14927
  let value = false;
14897
14928
  let assigned = false;
@@ -15163,9 +15194,9 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15163
15194
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15164
15195
  var import_child_process2 = require("child_process");
15165
15196
  var import_promises = require("fs/promises");
15166
- var import_node_fs10 = require("node:fs");
15197
+ var import_node_fs11 = require("node:fs");
15167
15198
  var import_node_os3 = require("node:os");
15168
- var import_node_path9 = require("node:path");
15199
+ var import_node_path10 = require("node:path");
15169
15200
  init_backend_origin();
15170
15201
  init_config();
15171
15202
 
@@ -15281,6 +15312,12 @@ async function fetchDevManifest(baseUrl, pageOrigin, options = {}) {
15281
15312
  }
15282
15313
  }
15283
15314
  }
15315
+ async function metroRequestFailure(request, url, response) {
15316
+ const detail = (await response.text()).trim().slice(0, 2e3);
15317
+ return new Error(
15318
+ `Metro ${request} request failed: HTTP ${response.status} at ${url}/${detail ? `: ${detail}` : ""}`
15319
+ );
15320
+ }
15284
15321
 
15285
15322
  // src/kotlinDiscoveryContract.ts
15286
15323
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -15315,8 +15352,8 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15315
15352
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15316
15353
 
15317
15354
  // scripts/dev-server-scanner.ts
15318
- var LISTENER_LOCK_PATH = (0, import_node_path9.join)((0, import_node_os3.tmpdir)(), "peach-listener-scan.lock");
15319
- var LISTENER_RESULT_PATH = (0, import_node_path9.join)((0, import_node_os3.tmpdir)(), "peach-listener-scan.result");
15355
+ var LISTENER_LOCK_PATH = (0, import_node_path10.join)((0, import_node_os3.tmpdir)(), "peach-listener-scan.lock");
15356
+ var LISTENER_RESULT_PATH = (0, import_node_path10.join)((0, import_node_os3.tmpdir)(), "peach-listener-scan.result");
15320
15357
  var LISTENER_LOCK_STALE_MS = 25e3;
15321
15358
  var LISTENER_LOCK_WAIT_MS = 8e3;
15322
15359
  function sleep2(ms) {
@@ -15334,8 +15371,8 @@ function pidIsAlive(pid) {
15334
15371
  }
15335
15372
  function readLockOwner() {
15336
15373
  try {
15337
- const raw = (0, import_node_fs10.readFileSync)(LISTENER_LOCK_PATH, "utf8");
15338
- const mtimeMs = (0, import_node_fs10.statSync)(LISTENER_LOCK_PATH).mtimeMs;
15374
+ const raw = (0, import_node_fs11.readFileSync)(LISTENER_LOCK_PATH, "utf8");
15375
+ const mtimeMs = (0, import_node_fs11.statSync)(LISTENER_LOCK_PATH).mtimeMs;
15339
15376
  const pid = Number(raw.split("-")[0]);
15340
15377
  return { raw, pid: Number.isInteger(pid) ? pid : -1, mtimeMs };
15341
15378
  } catch {
@@ -15348,15 +15385,15 @@ function lockIsAbandoned(owner) {
15348
15385
  }
15349
15386
  function clearLock(raw) {
15350
15387
  try {
15351
- if ((0, import_node_fs10.readFileSync)(LISTENER_LOCK_PATH, "utf8") !== raw) return;
15352
- (0, import_node_fs10.unlinkSync)(LISTENER_LOCK_PATH);
15388
+ if ((0, import_node_fs11.readFileSync)(LISTENER_LOCK_PATH, "utf8") !== raw) return;
15389
+ (0, import_node_fs11.unlinkSync)(LISTENER_LOCK_PATH);
15353
15390
  } catch {
15354
15391
  }
15355
15392
  }
15356
15393
  function readResult() {
15357
15394
  try {
15358
15395
  const parsed = JSON.parse(
15359
- (0, import_node_fs10.readFileSync)(LISTENER_RESULT_PATH, "utf8")
15396
+ (0, import_node_fs11.readFileSync)(LISTENER_RESULT_PATH, "utf8")
15360
15397
  );
15361
15398
  if (!parsed || typeof parsed.token !== "string" || typeof parsed.key !== "string")
15362
15399
  return null;
@@ -15367,8 +15404,8 @@ function readResult() {
15367
15404
  }
15368
15405
  function publishResult(payload) {
15369
15406
  const tmp = `${LISTENER_RESULT_PATH}.${process.pid}.tmp`;
15370
- (0, import_node_fs10.writeFileSync)(tmp, JSON.stringify(payload));
15371
- (0, import_node_fs10.renameSync)(tmp, LISTENER_RESULT_PATH);
15407
+ (0, import_node_fs11.writeFileSync)(tmp, JSON.stringify(payload));
15408
+ (0, import_node_fs11.renameSync)(tmp, LISTENER_RESULT_PATH);
15372
15409
  }
15373
15410
  function throwPublished(payload) {
15374
15411
  throw Object.assign(new Error(payload.message || "listener scan failed"), {
@@ -15411,7 +15448,7 @@ async function withListenerLock(key, body) {
15411
15448
  for (; ; ) {
15412
15449
  let fd = null;
15413
15450
  try {
15414
- fd = (0, import_node_fs10.openSync)(LISTENER_LOCK_PATH, "wx");
15451
+ fd = (0, import_node_fs11.openSync)(LISTENER_LOCK_PATH, "wx");
15415
15452
  } catch (error) {
15416
15453
  const code = error instanceof Error && "code" in error ? error.code : "";
15417
15454
  if (code !== "EEXIST") throw error;
@@ -15420,7 +15457,7 @@ async function withListenerLock(key, body) {
15420
15457
  if (owner) clearLock(owner.raw);
15421
15458
  else {
15422
15459
  try {
15423
- (0, import_node_fs10.unlinkSync)(LISTENER_LOCK_PATH);
15460
+ (0, import_node_fs11.unlinkSync)(LISTENER_LOCK_PATH);
15424
15461
  } catch {
15425
15462
  }
15426
15463
  }
@@ -15436,7 +15473,7 @@ async function withListenerLock(key, body) {
15436
15473
  }
15437
15474
  if (fd === null) continue;
15438
15475
  try {
15439
- (0, import_node_fs10.writeSync)(fd, token);
15476
+ (0, import_node_fs11.writeSync)(fd, token);
15440
15477
  try {
15441
15478
  const value = await body();
15442
15479
  publishResult({ token, key, ok: true, value });
@@ -15453,7 +15490,7 @@ async function withListenerLock(key, body) {
15453
15490
  }
15454
15491
  } finally {
15455
15492
  try {
15456
- (0, import_node_fs10.closeSync)(fd);
15493
+ (0, import_node_fs11.closeSync)(fd);
15457
15494
  } catch {
15458
15495
  }
15459
15496
  clearLock(token);
@@ -15787,7 +15824,7 @@ async function resolveMetroProjectRoot(bundleUrl, manifestProjectRoot, options =
15787
15824
  }
15788
15825
  if (typeof root === "string" && root.length > 0) return root;
15789
15826
  } else if (res.status !== 404 && res.status !== 405) {
15790
- throw new Error(`Metro project root request failed: HTTP ${res.status} at ${origin}/`);
15827
+ throw await metroRequestFailure("project root", origin, res);
15791
15828
  }
15792
15829
  if (servedManifest || !metroRunning) return null;
15793
15830
  const port = Number(new URL(origin).port);
@@ -15934,7 +15971,7 @@ var import_promises2 = require("node:dns/promises");
15934
15971
 
15935
15972
  // src/host/network-policy.ts
15936
15973
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15937
- var import_node_path10 = require("node:path");
15974
+ var import_node_path11 = require("node:path");
15938
15975
  var import_node_url = require("node:url");
15939
15976
  var NETWORK_POLICY_TIMEOUT_MS = 1e4;
15940
15977
  var NetworkPolicyDeniedError = class extends Error {
@@ -15987,7 +16024,7 @@ function createNetworkAuthorizer(policy) {
15987
16024
  };
15988
16025
  }
15989
16026
  async function loadNetworkPolicy(file) {
15990
- if (!(0, import_node_path10.isAbsolute)(file)) {
16027
+ if (!(0, import_node_path11.isAbsolute)(file)) {
15991
16028
  throw new Error(`PEACH_NETWORK_POLICY must be an absolute path: ${file}`);
15992
16029
  }
15993
16030
  const loaded3 = await import(
@@ -16523,10 +16560,10 @@ function readOneNativeAppAccent(entryConfig) {
16523
16560
  // src/one-widget-metadata.ts
16524
16561
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
16525
16562
  var import_node_child_process3 = require("node:child_process");
16526
- var import_node_crypto5 = require("node:crypto");
16527
- var import_node_fs13 = __toESM(require("node:fs"), 1);
16563
+ var import_node_crypto6 = require("node:crypto");
16564
+ var import_node_fs14 = __toESM(require("node:fs"), 1);
16528
16565
  var import_node_module2 = require("node:module");
16529
- var import_node_path13 = __toESM(require("node:path"), 1);
16566
+ var import_node_path14 = __toESM(require("node:path"), 1);
16530
16567
  var import_node_util = require("node:util");
16531
16568
  init_forked_script_contract();
16532
16569
  init_is_record();
@@ -16552,8 +16589,8 @@ fs.writeFileSync(process.argv[2], JSON.stringify({
16552
16589
  function configStamp(files) {
16553
16590
  return JSON.stringify(
16554
16591
  files.map((file) => {
16555
- if (!import_node_fs13.default.existsSync(file)) return [file, null];
16556
- const stat = import_node_fs13.default.statSync(file);
16592
+ if (!import_node_fs14.default.existsSync(file)) return [file, null];
16593
+ const stat = import_node_fs14.default.statSync(file);
16557
16594
  return [file, stat.mtimeMs, stat.ctimeMs, stat.size];
16558
16595
  })
16559
16596
  );
@@ -16564,13 +16601,13 @@ async function readConfig(root) {
16564
16601
  const reading = reads.get(root);
16565
16602
  if (reading) return reading;
16566
16603
  const promise = (async () => {
16567
- (0, import_node_module2.createRequire)(import_node_path13.default.join(root, "package.json")).resolve("one/vite");
16568
- const cache = import_node_path13.default.join(root, "node_modules/.cache/peach-widget-config");
16569
- import_node_fs13.default.mkdirSync(cache, { recursive: true });
16570
- const directory = import_node_fs13.default.mkdtempSync(import_node_path13.default.join(cache, "read-"));
16571
- const script = import_node_path13.default.join(directory, "read.mjs");
16572
- const result = import_node_path13.default.join(directory, "result.json");
16573
- import_node_fs13.default.writeFileSync(script, CONFIG_CHILD);
16604
+ (0, import_node_module2.createRequire)(import_node_path14.default.join(root, "package.json")).resolve("one/vite");
16605
+ const cache = import_node_path14.default.join(root, "node_modules/.cache/peach-widget-config");
16606
+ import_node_fs14.default.mkdirSync(cache, { recursive: true });
16607
+ const directory = import_node_fs14.default.mkdtempSync(import_node_path14.default.join(cache, "read-"));
16608
+ const script = import_node_path14.default.join(directory, "read.mjs");
16609
+ const result = import_node_path14.default.join(directory, "result.json");
16610
+ import_node_fs14.default.writeFileSync(script, CONFIG_CHILD);
16574
16611
  try {
16575
16612
  await run(process.execPath, [script, result], {
16576
16613
  cwd: root,
@@ -16578,7 +16615,7 @@ async function readConfig(root) {
16578
16615
  timeout: 3e4,
16579
16616
  maxBuffer: 1024 * 1024
16580
16617
  });
16581
- const value = JSON.parse(import_node_fs13.default.readFileSync(result, "utf8"));
16618
+ const value = JSON.parse(import_node_fs14.default.readFileSync(result, "utf8"));
16582
16619
  if (!isRecord(value) || !Array.isArray(value.watched) || !value.watched.every((file) => typeof file === "string"))
16583
16620
  throw new Error("One config loader returned invalid dependencies");
16584
16621
  if (!Array.isArray(value.urlSchemes) || !value.urlSchemes.every(
@@ -16601,8 +16638,8 @@ async function readConfig(root) {
16601
16638
  }
16602
16639
  const watched = [
16603
16640
  .../* @__PURE__ */ new Set([
16604
- import_node_path13.default.join(root, "package.json"),
16605
- ...value.watched.map((file) => import_node_path13.default.resolve(root, file))
16641
+ import_node_path14.default.join(root, "package.json"),
16642
+ ...value.watched.map((file) => import_node_path14.default.resolve(root, file))
16606
16643
  ])
16607
16644
  ];
16608
16645
  const loaded3 = {
@@ -16614,7 +16651,7 @@ async function readConfig(root) {
16614
16651
  configs.set(root, loaded3);
16615
16652
  return loaded3;
16616
16653
  } finally {
16617
- import_node_fs13.default.rmSync(directory, { recursive: true, force: true });
16654
+ import_node_fs14.default.rmSync(directory, { recursive: true, force: true });
16618
16655
  }
16619
16656
  })();
16620
16657
  reads.set(root, promise);
@@ -16635,13 +16672,13 @@ function declaredFamilies(source) {
16635
16672
  return home;
16636
16673
  }
16637
16674
  async function readOneWidgetSources(appRoot) {
16638
- const root = import_node_fs13.default.realpathSync(appRoot);
16675
+ const root = import_node_fs14.default.realpathSync(appRoot);
16639
16676
  const config = await readConfig(root);
16640
16677
  if (!config.widget) return null;
16641
16678
  const widget = config.widget;
16642
16679
  const sourceFiles = {
16643
- "OneWidget.swift": import_node_path13.default.join(root, "ios/OneWidgets/OneWidget.swift"),
16644
- "OneWidgetContract.swift": import_node_path13.default.join(
16680
+ "OneWidget.swift": import_node_path14.default.join(root, "ios/OneWidgets/OneWidget.swift"),
16681
+ "OneWidgetContract.swift": import_node_path14.default.join(
16645
16682
  root,
16646
16683
  "ios",
16647
16684
  widget.appName,
@@ -16651,14 +16688,14 @@ async function readOneWidgetSources(appRoot) {
16651
16688
  const files = /* @__PURE__ */ new Map();
16652
16689
  const sources = {};
16653
16690
  for (const [name2, file] of Object.entries(sourceFiles)) {
16654
- if (!import_node_fs13.default.existsSync(file))
16691
+ if (!import_node_fs14.default.existsSync(file))
16655
16692
  throw new Error(`missing One widget prebuild source ${file}; run one prebuild`);
16656
16693
  const bytes = readPackageFile(root, file, MAX_SWIFT_COMPILE_SOURCE_BYTES);
16657
16694
  const text2 = bytes.toString("utf8");
16658
16695
  if (!Buffer.from(text2).equals(bytes))
16659
16696
  throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
16660
16697
  files.set(name2, text2);
16661
- sources[import_node_path13.default.relative(root, file).split(import_node_path13.default.sep).join("/")] = (0, import_node_crypto5.createHash)("sha256").update(bytes).digest("hex");
16698
+ sources[import_node_path14.default.relative(root, file).split(import_node_path14.default.sep).join("/")] = (0, import_node_crypto6.createHash)("sha256").update(bytes).digest("hex");
16662
16699
  }
16663
16700
  const contract = files.get("OneWidgetContract.swift") ?? "";
16664
16701
  const source = files.get("OneWidget.swift") ?? "";
@@ -16682,7 +16719,7 @@ async function configuredOneWidget(appRoot, bundleUrl) {
16682
16719
  return {
16683
16720
  metadata: source.widget,
16684
16721
  projectRoot: source.root,
16685
- appIdentity: (0, import_node_crypto5.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
16722
+ appIdentity: (0, import_node_crypto6.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
16686
16723
  bundleUrl,
16687
16724
  packageUrl: new URL(`${SWIFT_PACKAGE_PATH}OneWidgets`, bundleUrl).href,
16688
16725
  urlSchemes: source.urlSchemes
@@ -17055,7 +17092,7 @@ function peachPlugin(options = {}) {
17055
17092
  });
17056
17093
  const bundleUrl = options.bundleUrl || "/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false";
17057
17094
  const appName = resolveRnxDesktopAppName(options.open, server.config.root);
17058
- const replacementToken = (0, import_node_crypto6.randomUUID)();
17095
+ const replacementToken = (0, import_node_crypto7.randomUUID)();
17059
17096
  const bundleForOrigin = (origin) => {
17060
17097
  const fullBundleUrl = new URL(bundleUrl, `${origin}/`).toString();
17061
17098
  return tagRnxBundleForPlugin(
@@ -17202,23 +17239,23 @@ function peachPlugin(options = {}) {
17202
17239
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17203
17240
  var import_fs7 = __toESM(require("fs"), 1);
17204
17241
  var import_module2 = require("module");
17205
- var import_node_crypto11 = require("node:crypto");
17242
+ var import_node_crypto12 = require("node:crypto");
17206
17243
  var import_path6 = __toESM(require("path"), 1);
17207
17244
  init_app_project();
17208
17245
 
17209
17246
  // src/android-autolinking.ts
17210
17247
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17211
17248
  var import_node_child_process4 = require("node:child_process");
17212
- var import_node_fs15 = __toESM(require("node:fs"), 1);
17249
+ var import_node_fs16 = __toESM(require("node:fs"), 1);
17213
17250
  var import_node_module3 = require("node:module");
17214
- var import_node_path15 = __toESM(require("node:path"), 1);
17251
+ var import_node_path16 = __toESM(require("node:path"), 1);
17215
17252
  var import_node_util2 = require("node:util");
17216
17253
  init_forked_script_contract();
17217
17254
  init_is_record();
17218
17255
  var run2 = (0, import_node_util2.promisify)(import_node_child_process4.execFile);
17219
17256
  var resolving = /* @__PURE__ */ new Map();
17220
17257
  async function resolveExpoAndroidAutolinking(appRoot) {
17221
- const root = import_node_fs15.default.realpathSync(appRoot);
17258
+ const root = import_node_fs16.default.realpathSync(appRoot);
17222
17259
  const existing = resolving.get(root);
17223
17260
  if (existing) return existing;
17224
17261
  const pending = resolveAndroidModules(root);
@@ -17232,7 +17269,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
17232
17269
  async function resolveAndroidModules(appRoot) {
17233
17270
  let autolinker;
17234
17271
  try {
17235
- autolinker = (0, import_node_module3.createRequire)(import_node_path15.default.join(appRoot, "package.json")).resolve(
17272
+ autolinker = (0, import_node_module3.createRequire)(import_node_path16.default.join(appRoot, "package.json")).resolve(
17236
17273
  "expo-modules-autolinking/package.json"
17237
17274
  );
17238
17275
  } catch (error) {
@@ -17242,7 +17279,7 @@ async function resolveAndroidModules(appRoot) {
17242
17279
  const { stdout } = await run2(
17243
17280
  process.execPath,
17244
17281
  [
17245
- import_node_path15.default.join(import_node_path15.default.dirname(autolinker), "bin/expo-modules-autolinking.js"),
17282
+ import_node_path16.default.join(import_node_path16.default.dirname(autolinker), "bin/expo-modules-autolinking.js"),
17246
17283
  "resolve",
17247
17284
  "--platform",
17248
17285
  "android",
@@ -17271,8 +17308,8 @@ async function collectAndroidAutolinkedPackages(appRoot) {
17271
17308
 
17272
17309
  // src/android-root-module.ts
17273
17310
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17274
- var import_node_fs16 = __toESM(require("node:fs"), 1);
17275
- var import_node_path16 = __toESM(require("node:path"), 1);
17311
+ var import_node_fs17 = __toESM(require("node:fs"), 1);
17312
+ var import_node_path17 = __toESM(require("node:path"), 1);
17276
17313
 
17277
17314
  // src/android-xml.ts
17278
17315
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -17369,29 +17406,29 @@ function launcherActivities(application) {
17369
17406
  function readModuleNamespace(moduleRoot, manifest) {
17370
17407
  if (manifest.attributes.package) return manifest.attributes.package;
17371
17408
  for (const name2 of ["build.gradle", "build.gradle.kts"]) {
17372
- const file = import_node_path16.default.join(moduleRoot, name2);
17373
- if (!import_node_fs16.default.existsSync(file)) continue;
17409
+ const file = import_node_path17.default.join(moduleRoot, name2);
17410
+ if (!import_node_fs17.default.existsSync(file)) continue;
17374
17411
  const match = /\bnamespace\s*=?\s*["']([\w.]+)["']/.exec(
17375
- import_node_fs16.default.readFileSync(file, "utf8")
17412
+ import_node_fs17.default.readFileSync(file, "utf8")
17376
17413
  );
17377
17414
  if (match) return match[1];
17378
17415
  }
17379
17416
  return void 0;
17380
17417
  }
17381
17418
  function readModuleRootModuleName(moduleRoot) {
17382
- const sourceSets = import_node_path16.default.join(moduleRoot, "src");
17383
- const manifestFile = import_node_path16.default.join(sourceSets, "main/AndroidManifest.xml");
17384
- if (!import_node_fs16.default.existsSync(manifestFile)) return null;
17385
- const document = parseXml(import_node_fs16.default.readFileSync(manifestFile, "utf8"), manifestFile);
17419
+ const sourceSets = import_node_path17.default.join(moduleRoot, "src");
17420
+ const manifestFile = import_node_path17.default.join(sourceSets, "main/AndroidManifest.xml");
17421
+ if (!import_node_fs17.default.existsSync(manifestFile)) return null;
17422
+ const document = parseXml(import_node_fs17.default.readFileSync(manifestFile, "utf8"), manifestFile);
17386
17423
  const manifest = document.children[0];
17387
17424
  const application = manifest?.children.find((child) => child.name === "application");
17388
17425
  if (manifest?.name !== "manifest" || !application) return null;
17389
17426
  const launchers = launcherActivities(application);
17390
17427
  if (launchers.length === 0) return null;
17391
- for (const set2 of import_node_fs16.default.readdirSync(sourceSets, { withFileTypes: true })) {
17392
- const file = import_node_path16.default.join(sourceSets, set2.name, "AndroidManifest.xml");
17393
- if (!set2.isDirectory() || set2.name === "main" || !import_node_fs16.default.existsSync(file)) continue;
17394
- if (import_node_fs16.default.readFileSync(file, "utf8").includes("<activity")) return void 0;
17428
+ for (const set2 of import_node_fs17.default.readdirSync(sourceSets, { withFileTypes: true })) {
17429
+ const file = import_node_path17.default.join(sourceSets, set2.name, "AndroidManifest.xml");
17430
+ if (!set2.isDirectory() || set2.name === "main" || !import_node_fs17.default.existsSync(file)) continue;
17431
+ if (import_node_fs17.default.readFileSync(file, "utf8").includes("<activity")) return void 0;
17395
17432
  }
17396
17433
  const launcher = launchers[0];
17397
17434
  const enabled = launcher.attributes["android:enabled"];
@@ -17403,23 +17440,23 @@ function readModuleRootModuleName(moduleRoot) {
17403
17440
  const qualified = declared.startsWith(".") ? namespace && `${namespace}${declared}` : declared.includes(".") ? declared : namespace && `${namespace}.${declared}`;
17404
17441
  if (!qualified || qualified.includes("$")) return void 0;
17405
17442
  const relative3 = qualified.split(".").join("/");
17406
- const files = import_node_fs16.default.readdirSync(sourceSets, { withFileTypes: true }).filter((set2) => set2.isDirectory()).flatMap(
17443
+ const files = import_node_fs17.default.readdirSync(sourceSets, { withFileTypes: true }).filter((set2) => set2.isDirectory()).flatMap(
17407
17444
  (set2) => ["java", "kotlin"].flatMap(
17408
17445
  (language) => ["kt", "java"].map(
17409
- (extension) => import_node_path16.default.join(sourceSets, set2.name, language, `${relative3}.${extension}`)
17446
+ (extension) => import_node_path17.default.join(sourceSets, set2.name, language, `${relative3}.${extension}`)
17410
17447
  )
17411
17448
  )
17412
- ).filter((file) => import_node_fs16.default.existsSync(file));
17449
+ ).filter((file) => import_node_fs17.default.existsSync(file));
17413
17450
  if (files.length !== 1) return void 0;
17414
17451
  return readAndroidRootModuleFromActivitySource(
17415
- import_node_fs16.default.readFileSync(files[0], "utf8"),
17452
+ import_node_fs17.default.readFileSync(files[0], "utf8"),
17416
17453
  qualified.slice(qualified.lastIndexOf(".") + 1)
17417
17454
  );
17418
17455
  }
17419
17456
  function readAndroidLauncherRootModuleName(projectRoot) {
17420
- const androidRoot = import_node_path16.default.join(projectRoot, "android");
17421
- if (!import_node_fs16.default.existsSync(androidRoot)) return void 0;
17422
- const names = import_node_fs16.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path16.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
17457
+ const androidRoot = import_node_path17.default.join(projectRoot, "android");
17458
+ if (!import_node_fs17.default.existsSync(androidRoot)) return void 0;
17459
+ const names = import_node_fs17.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path17.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
17423
17460
  return names.length === 1 ? names[0] : void 0;
17424
17461
  }
17425
17462
 
@@ -17745,7 +17782,7 @@ function parseOpenStepPlist(text2) {
17745
17782
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17746
17783
  var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
17747
17784
  var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
17748
- function xcodePathResolver(objects, projectDir, join8) {
17785
+ function xcodePathResolver(objects, projectDir, join9) {
17749
17786
  const parents = /* @__PURE__ */ new Map();
17750
17787
  for (const [id, entry] of Object.entries(objects)) {
17751
17788
  if (!isDict(entry)) continue;
@@ -17763,11 +17800,11 @@ function xcodePathResolver(objects, projectDir, join8) {
17763
17800
  const own = str(entry.path) ?? "";
17764
17801
  const tree2 = str(entry.sourceTree) ?? "<group>";
17765
17802
  if (tree2 === "<absolute>") result = own;
17766
- else if (tree2 === "SOURCE_ROOT") result = join8(projectDir, own);
17803
+ else if (tree2 === "SOURCE_ROOT") result = join9(projectDir, own);
17767
17804
  else if (tree2 === "<group>") {
17768
17805
  const parent = parents.get(id);
17769
17806
  const base = parent ? resolve5(parent) : projectDir;
17770
- if (base !== null) result = join8(base, own);
17807
+ if (base !== null) result = join9(base, own);
17771
17808
  }
17772
17809
  }
17773
17810
  paths.set(id, result);
@@ -17789,7 +17826,7 @@ function xcodeTargetMemberVisitor(objects) {
17789
17826
  if (isDict(group) && group.isa === "PBXFileSystemSynchronizedRootGroup")
17790
17827
  synchronizedGroups.push({ id, group });
17791
17828
  }
17792
- return (targetId, resolvePath, filesUnder, join8, visit3) => {
17829
+ return (targetId, resolvePath, filesUnder, join9, visit3) => {
17793
17830
  const target = objects[targetId];
17794
17831
  if (!isDict(target)) return;
17795
17832
  for (const phaseId of list(target.buildPhases)) {
@@ -17824,7 +17861,7 @@ function xcodeTargetMemberVisitor(objects) {
17824
17861
  for (const relative3 of list(exception.membershipExceptions))
17825
17862
  exceptions.add(relative3);
17826
17863
  }
17827
- const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(join8(folder, relative3)));
17864
+ const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(join9(folder, relative3)));
17828
17865
  for (const file of members) {
17829
17866
  const relative3 = file.slice(prefix2.length);
17830
17867
  const excepted = [...exceptions].some(
@@ -18222,7 +18259,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18222
18259
  if (resourceUri) {
18223
18260
  if (!selectedTarget)
18224
18261
  throw new Error("native app icon target membership is unresolved");
18225
- const join8 = (base, own) => {
18262
+ const join9 = (base, own) => {
18226
18263
  const segments = [];
18227
18264
  for (const segment of `${base}/${own}`.split("/")) {
18228
18265
  if (segment === "" || segment === ".") continue;
@@ -18235,14 +18272,14 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18235
18272
  const project = Object.values(objects).find(
18236
18273
  (object2) => isRecord(object2) && object2.isa === "PBXProject"
18237
18274
  );
18238
- const projectDir = join8(
18275
+ const projectDir = join9(
18239
18276
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
18240
18277
  isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
18241
18278
  );
18242
18279
  const paths = Object.keys(files);
18243
18280
  xcodeTargetMemberVisitor(objects)(
18244
18281
  selectedTarget.id,
18245
- xcodePathResolver(objects, projectDir, join8),
18282
+ xcodePathResolver(objects, projectDir, join9),
18246
18283
  (file) => {
18247
18284
  if (Object.hasOwn(files, file)) return [file];
18248
18285
  const prefix2 = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
@@ -18250,7 +18287,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
18250
18287
  (path30) => path30.startsWith(prefix2) && !/(?:^|\/)\./.test(path30.slice(prefix2.length))
18251
18288
  );
18252
18289
  },
18253
- join8,
18290
+ join9,
18254
18291
  (file, kind) => {
18255
18292
  if (kind === "resource") resources.add(file);
18256
18293
  }
@@ -18344,26 +18381,27 @@ function extractNativeAppIdentityFromFiles(files, platform, parseInfoPlist, iosT
18344
18381
 
18345
18382
  // src/native-app-identity-project.ts
18346
18383
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18347
- var import_node_fs23 = __toESM(require("node:fs"), 1);
18384
+ var import_node_fs24 = __toESM(require("node:fs"), 1);
18348
18385
  var import_node_module4 = require("node:module");
18349
- var import_node_path26 = __toESM(require("node:path"), 1);
18386
+ var import_node_path27 = __toESM(require("node:path"), 1);
18350
18387
  init_is_record();
18351
18388
 
18352
18389
  // src/swift-objc-standin.ts
18353
18390
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18354
- var import_node_crypto7 = require("node:crypto");
18391
+ var import_node_crypto8 = require("node:crypto");
18392
+ init_is_record();
18355
18393
 
18356
18394
  // src/swift-objc-platform.ts
18357
18395
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18358
18396
 
18359
18397
  // src/swift-toolchain.ts
18360
18398
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18361
- var import_node_fs17 = __toESM(require("node:fs"), 1);
18362
- var import_node_path17 = __toESM(require("node:path"), 1);
18399
+ var import_node_fs18 = __toESM(require("node:fs"), 1);
18400
+ var import_node_path18 = __toESM(require("node:path"), 1);
18363
18401
  function peachsimPackageRoot() {
18364
18402
  let dir = __sootsim_import_meta_dirname;
18365
- while (!import_node_fs17.default.existsSync(import_node_path17.default.join(dir, "package.json")) && dir !== import_node_path17.default.dirname(dir))
18366
- dir = import_node_path17.default.dirname(dir);
18403
+ while (!import_node_fs18.default.existsSync(import_node_path18.default.join(dir, "package.json")) && dir !== import_node_path18.default.dirname(dir))
18404
+ dir = import_node_path18.default.dirname(dir);
18367
18405
  return dir;
18368
18406
  }
18369
18407
  var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
@@ -18505,6 +18543,23 @@ var compilerArchives = {
18505
18543
  }
18506
18544
  }
18507
18545
  },
18546
+ "swift-6.4.0-RELEASE-custom-a560ff35bf882b5c": {
18547
+ identity: "a560ff35bf882b5c",
18548
+ hosts: {
18549
+ "darwin-arm64": {
18550
+ checksum: "ec20a41851ac558fe663d78def6b93d0d47c5a0cb69688ee270fd85de637a522",
18551
+ manifest: "253e891527d2213f54eace768b902de89de5e9495a3c5f4018de1985516bd553"
18552
+ },
18553
+ "linux-x64": {
18554
+ checksum: "f0126a2e63d275895036d02d75a901070da0343dbf03bf17342e10cb6f893dee",
18555
+ manifest: "6f951cc4071dd0d6054d85711a7c5fe272273658847831b477a8b24be7254ca0"
18556
+ },
18557
+ "linux-arm64": {
18558
+ checksum: "315fa766559a6e69bfd10dcddf40e04c91155f0db3047d210d74ac87652fb7e6",
18559
+ manifest: "b6f62fca2ec37593e274ee5bac474f21ffc5db14cd82f492ccbc774f8e9b75d8"
18560
+ }
18561
+ }
18562
+ },
18508
18563
  [SWIFT_HOST_COMPILER_RELEASE]: {
18509
18564
  identity: SWIFT_HOST_COMPILER_ID,
18510
18565
  hosts: {
@@ -18526,18 +18581,18 @@ var compilerArchives = {
18526
18581
 
18527
18582
  // src/swift-objc-sdk.ts
18528
18583
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18529
- var import_node_path19 = __toESM(require("node:path"), 1);
18584
+ var import_node_path20 = __toESM(require("node:path"), 1);
18530
18585
 
18531
18586
  // src/swift-objc-sdk-tree.ts
18532
18587
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18533
- var import_node_fs18 = require("node:fs");
18534
- var import_node_path18 = __toESM(require("node:path"), 1);
18588
+ var import_node_fs19 = require("node:fs");
18589
+ var import_node_path19 = __toESM(require("node:path"), 1);
18535
18590
  function readIosSdkTree(root) {
18536
- return (0, import_node_fs18.readdirSync)(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => {
18537
- const file = import_node_path18.default.join(entry.parentPath, entry.name);
18591
+ return (0, import_node_fs19.readdirSync)(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => {
18592
+ const file = import_node_path19.default.join(entry.parentPath, entry.name);
18538
18593
  return [
18539
- import_node_path18.default.relative(root, file).split(import_node_path18.default.sep).join("/"),
18540
- (0, import_node_fs18.readFileSync)(file, "utf8")
18594
+ import_node_path19.default.relative(root, file).split(import_node_path19.default.sep).join("/"),
18595
+ (0, import_node_fs19.readFileSync)(file, "utf8")
18541
18596
  ];
18542
18597
  }).sort(([a], [b]) => a < b ? -1 : 1);
18543
18598
  }
@@ -18545,7 +18600,7 @@ function readIosSdkTree(root) {
18545
18600
  // src/swift-objc-sdk.ts
18546
18601
  var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
18547
18602
  var OVERLAY_PATH = /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/;
18548
- var tree = typeof __PEACH_BUNDLED_IOS_SDK__ === "undefined" ? readIosSdkTree(import_node_path19.default.join(peachsimPackageRoot(), "sdk", "ios")) : Object.entries(__PEACH_BUNDLED_IOS_SDK__).sort(([a], [b]) => a < b ? -1 : 1);
18603
+ var tree = typeof __PEACH_BUNDLED_IOS_SDK__ === "undefined" ? readIosSdkTree(import_node_path20.default.join(peachsimPackageRoot(), "sdk", "ios")) : Object.entries(__PEACH_BUNDLED_IOS_SDK__).sort(([a], [b]) => a < b ? -1 : 1);
18549
18604
  var IOS_SDK_HEADERS = {};
18550
18605
  var IOS_SDK_OVERLAYS = {};
18551
18606
  for (const [file, text2] of tree) {
@@ -18603,6 +18658,9 @@ function moduleMapName(text2) {
18603
18658
  return index < 0 ? void 0 : tokens[index + 1];
18604
18659
  }
18605
18660
 
18661
+ // src/swift-standin-emit.ts
18662
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18663
+
18606
18664
  // src/swift-objc-standin.ts
18607
18665
  var NATIVE_GRAPH_SDK_VERSION = "27.1";
18608
18666
  var WASI_EMULATION = [
@@ -18618,7 +18676,7 @@ var NATIVE_GRAPH_INPUTS = {
18618
18676
  compiler: "Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)",
18619
18677
  target: IOS_SDK_TARGET
18620
18678
  };
18621
- var NATIVE_GRAPH_ID = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
18679
+ var NATIVE_GRAPH_ID = (0, import_node_crypto8.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
18622
18680
  function stripExternalSourceMarks(text2) {
18623
18681
  return text2.split("\n").map(
18624
18682
  (line) => line.startsWith("#define PEACH_SWIFT_CLASS(") ? line : line.replace(/PEACH_SWIFT_CLASS\(\w+\)\s*/g, "")
@@ -18638,39 +18696,39 @@ ${text2}`
18638
18696
  );
18639
18697
  return [...headers, ...overlays].sort(([a], [b]) => a < b ? -1 : 1);
18640
18698
  }
18641
- var IOS_SDK_ID = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
18699
+ var IOS_SDK_ID = (0, import_node_crypto8.createHash)("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
18642
18700
 
18643
18701
  // src/xcode-project.ts
18644
18702
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18645
18703
  var import_node_child_process7 = require("node:child_process");
18646
- var import_node_crypto10 = require("node:crypto");
18647
- var import_node_fs22 = __toESM(require("node:fs"), 1);
18648
- var import_node_path25 = __toESM(require("node:path"), 1);
18704
+ var import_node_crypto11 = require("node:crypto");
18705
+ var import_node_fs23 = __toESM(require("node:fs"), 1);
18706
+ var import_node_path26 = __toESM(require("node:path"), 1);
18649
18707
  var import_plist3 = __toESM(require("plist"), 1);
18650
18708
  init_is_record();
18651
18709
 
18652
18710
  // src/prepared-xcode-phases.ts
18653
18711
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18654
- var import_node_crypto8 = require("node:crypto");
18655
- var import_node_fs19 = __toESM(require("node:fs"), 1);
18656
- var import_node_path20 = __toESM(require("node:path"), 1);
18712
+ var import_node_crypto9 = require("node:crypto");
18713
+ var import_node_fs20 = __toESM(require("node:fs"), 1);
18714
+ var import_node_path21 = __toESM(require("node:path"), 1);
18657
18715
  var workspaces = /* @__PURE__ */ new Map();
18658
18716
  var recording;
18659
18717
  function relativeFile(root, file) {
18660
- const relative3 = import_node_path20.default.relative(root, file);
18661
- if (!relative3 || relative3 === ".." || relative3.startsWith(`..${import_node_path20.default.sep}`) || import_node_path20.default.isAbsolute(relative3))
18718
+ const relative3 = import_node_path21.default.relative(root, file);
18719
+ if (!relative3 || relative3 === ".." || relative3.startsWith(`..${import_node_path21.default.sep}`) || import_node_path21.default.isAbsolute(relative3))
18662
18720
  throw new Error(`prepared Xcode output is outside its workspace: ${file}`);
18663
- return relative3.split(import_node_path20.default.sep).join("/");
18721
+ return relative3.split(import_node_path21.default.sep).join("/");
18664
18722
  }
18665
18723
  function output(root, file) {
18666
18724
  const relative3 = relativeFile(root, file);
18667
- const stat = import_node_fs19.default.statSync(file, { throwIfNoEntry: false });
18725
+ const stat = import_node_fs20.default.statSync(file, { throwIfNoEntry: false });
18668
18726
  if (!stat) return { path: relative3, sha256: null };
18669
18727
  if (!stat.isFile()) throw new Error(`prepared Xcode output is not a file: ${file}`);
18670
- relativeFile(root, import_node_fs19.default.realpathSync(file));
18671
- const bytes = import_node_fs19.default.readFileSync(file);
18728
+ relativeFile(root, import_node_fs20.default.realpathSync(file));
18729
+ const bytes = import_node_fs20.default.readFileSync(file);
18672
18730
  const prefix2 = Buffer.from(root);
18673
- const hash = (0, import_node_crypto8.createHash)("sha256");
18731
+ const hash = (0, import_node_crypto9.createHash)("sha256");
18674
18732
  let offset = 0;
18675
18733
  for (let index = bytes.indexOf(prefix2); index !== -1; index = bytes.indexOf(prefix2, offset)) {
18676
18734
  hash.update(bytes.subarray(offset, index)).update("\0workspace\0");
@@ -18684,8 +18742,8 @@ function output(root, file) {
18684
18742
  }
18685
18743
  function preparedXcodePhase(project, target, phase, configuration, outputs, recorded) {
18686
18744
  const root = recording?.root ?? [...workspaces.keys()].find((root2) => {
18687
- const relative3 = import_node_path20.default.relative(root2, project);
18688
- return relative3 !== ".." && !relative3.startsWith(`..${import_node_path20.default.sep}`) && !import_node_path20.default.isAbsolute(relative3);
18745
+ const relative3 = import_node_path21.default.relative(root2, project);
18746
+ return relative3 !== ".." && !relative3.startsWith(`..${import_node_path21.default.sep}`) && !import_node_path21.default.isAbsolute(relative3);
18689
18747
  });
18690
18748
  if (!root) return false;
18691
18749
  const entry = {
@@ -18721,10 +18779,10 @@ function preparedXcodePhase(project, target, phase, configuration, outputs, reco
18721
18779
 
18722
18780
  // src/swift-binary-modules.ts
18723
18781
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18724
- var import_node_fs20 = __toESM(require("node:fs"), 1);
18725
- var import_node_path21 = __toESM(require("node:path"), 1);
18782
+ var import_node_fs21 = __toESM(require("node:fs"), 1);
18783
+ var import_node_path22 = __toESM(require("node:path"), 1);
18726
18784
  init_home_paths();
18727
- var cacheDir2 = import_node_path21.default.join(cacheDir(), "swift-binary-modules");
18785
+ var cacheDir2 = import_node_path22.default.join(cacheDir(), "swift-binary-modules");
18728
18786
  function frameworkModules(paths) {
18729
18787
  const modules = /* @__PURE__ */ new Set();
18730
18788
  for (const file of paths) {
@@ -18734,21 +18792,21 @@ function frameworkModules(paths) {
18734
18792
  return [...modules].sort();
18735
18793
  }
18736
18794
  function localSwiftBinaryModules(dir) {
18737
- if (!import_node_fs20.default.existsSync(dir)) return [];
18738
- const slices = import_node_fs20.default.readdirSync(dir, { withFileTypes: true }).filter((slice) => slice.isDirectory());
18795
+ if (!import_node_fs21.default.existsSync(dir)) return [];
18796
+ const slices = import_node_fs21.default.readdirSync(dir, { withFileTypes: true }).filter((slice) => slice.isDirectory());
18739
18797
  const frameworks = frameworkModules(
18740
18798
  slices.flatMap(
18741
- (slice) => import_node_fs20.default.readdirSync(import_node_path21.default.join(dir, slice.name)).map((entry) => `${slice.name}/${entry}`)
18799
+ (slice) => import_node_fs21.default.readdirSync(import_node_path22.default.join(dir, slice.name)).map((entry) => `${slice.name}/${entry}`)
18742
18800
  )
18743
18801
  );
18744
18802
  if (frameworks.length > 0) return frameworks;
18745
18803
  const modules = /* @__PURE__ */ new Set();
18746
18804
  for (const slice of slices) {
18747
- const headers = import_node_path21.default.join(dir, slice.name, "Headers");
18748
- if (!import_node_fs20.default.existsSync(headers)) continue;
18749
- for (const file of import_node_fs20.default.readdirSync(headers, { recursive: true, encoding: "utf8" })) {
18750
- if (import_node_path21.default.basename(file) !== "module.modulemap") continue;
18751
- const module2 = moduleMapName(import_node_fs20.default.readFileSync(import_node_path21.default.join(headers, file), "utf8"));
18805
+ const headers = import_node_path22.default.join(dir, slice.name, "Headers");
18806
+ if (!import_node_fs21.default.existsSync(headers)) continue;
18807
+ for (const file of import_node_fs21.default.readdirSync(headers, { recursive: true, encoding: "utf8" })) {
18808
+ if (import_node_path22.default.basename(file) !== "module.modulemap") continue;
18809
+ const module2 = moduleMapName(import_node_fs21.default.readFileSync(import_node_path22.default.join(headers, file), "utf8"));
18752
18810
  if (module2) modules.add(module2);
18753
18811
  }
18754
18812
  }
@@ -18760,9 +18818,9 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18760
18818
 
18761
18819
  // src/swift-coverage/provenance.ts
18762
18820
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18763
- var import_node_crypto9 = require("node:crypto");
18764
- var import_node_fs21 = require("node:fs");
18765
- var import_node_path22 = require("node:path");
18821
+ var import_node_crypto10 = require("node:crypto");
18822
+ var import_node_fs22 = require("node:fs");
18823
+ var import_node_path23 = require("node:path");
18766
18824
  var SWIFT_COVERAGE_DIGEST_SOURCES = [
18767
18825
  "swift-coverage/indexdump.ts",
18768
18826
  "swift-coverage/indexing.ts",
@@ -18792,11 +18850,11 @@ function swiftCoverageSourceDigests(srcDir) {
18792
18850
  return Object.fromEntries(
18793
18851
  SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
18794
18852
  file,
18795
- (0, import_node_crypto9.createHash)("sha256").update((0, import_node_fs21.readFileSync)((0, import_node_path22.join)(srcDir, file))).digest("hex")
18853
+ (0, import_node_crypto10.createHash)("sha256").update((0, import_node_fs22.readFileSync)((0, import_node_path23.join)(srcDir, file))).digest("hex")
18796
18854
  ])
18797
18855
  );
18798
18856
  }
18799
- var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path22.join)(__sootsim_import_meta_dirname, ".."));
18857
+ var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path23.join)(__sootsim_import_meta_dirname, ".."));
18800
18858
 
18801
18859
  // src/swift-coverage/xcode-asset-symbols.ts
18802
18860
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -18983,7 +19041,7 @@ var assetSymbolSettingKeys = [
18983
19041
  // src/swift-package-manifest.ts
18984
19042
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18985
19043
  var import_node_child_process6 = require("node:child_process");
18986
- var import_node_path23 = __toESM(require("node:path"), 1);
19044
+ var import_node_path24 = __toESM(require("node:path"), 1);
18987
19045
  var import_node_util4 = require("node:util");
18988
19046
  init_home_paths();
18989
19047
 
@@ -19026,9 +19084,6 @@ var import_node_os4 = __toESM(require("node:os"), 1);
19026
19084
  // src/admitted-mac-build.ts
19027
19085
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19028
19086
 
19029
- // src/swift-compile.ts
19030
- init_home_paths();
19031
-
19032
19087
  // src/retired-cache-directory.ts
19033
19088
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19034
19089
 
@@ -19046,7 +19101,6 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19046
19101
 
19047
19102
  // src/swift-shared-sdk.ts
19048
19103
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19049
- init_home_paths();
19050
19104
 
19051
19105
  // src/swift-design-time.ts
19052
19106
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -19213,7 +19267,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
19213
19267
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
19214
19268
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
19215
19269
  ).join("");
19216
- var compilerSourceDigest = true ? "c30b94c39ef2c57dd0f163385e565e0340acb99365cc16c5091e712d04e7fe68" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
19270
+ var compilerSourceDigest = true ? "c1407efb75c18328e37b50abfe396dce388c41563443b4c3a1485a800114a92c" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
19217
19271
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
19218
19272
  "CFAllocator",
19219
19273
  "CFArray",
@@ -19239,12 +19293,12 @@ var rootLocks = host[ROOT_LOCKS] ??= /* @__PURE__ */ new Map();
19239
19293
  var SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
19240
19294
 
19241
19295
  // src/swift-package-manifest.ts
19242
- var cacheDir3 = import_node_path23.default.join(cacheDir(), "swift-manifests");
19296
+ var cacheDir3 = import_node_path24.default.join(cacheDir(), "swift-manifests");
19243
19297
  var execFileAsync = (0, import_node_util4.promisify)(import_node_child_process6.execFile);
19244
19298
 
19245
19299
  // src/xcode-json-project.ts
19246
19300
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19247
- var import_node_path24 = __toESM(require("node:path"), 1);
19301
+ var import_node_path25 = __toESM(require("node:path"), 1);
19248
19302
  var import_json52 = __toESM(require_lib(), 1);
19249
19303
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
19250
19304
  var text = (value) => typeof value === "string" ? value : void 0;
@@ -19302,7 +19356,7 @@ var PHASE_ISA = {
19302
19356
  function readXcodeJsonProject(xcodeproj, source) {
19303
19357
  const json = import_json52.default.parse(source);
19304
19358
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
19305
- const projectDir = import_node_path24.default.dirname(xcodeproj);
19359
+ const projectDir = import_node_path25.default.dirname(xcodeproj);
19306
19360
  const objects = {};
19307
19361
  let next = 0;
19308
19362
  const add = (entry, id) => {
@@ -19315,7 +19369,7 @@ function readXcodeJsonProject(xcodeproj, source) {
19315
19369
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
19316
19370
  if (base) {
19317
19371
  if (base[1] === "PROJECT")
19318
- return { sourceTree: "<absolute>", path: import_node_path24.default.join(projectDir, base[2]) };
19372
+ return { sourceTree: "<absolute>", path: import_node_path25.default.join(projectDir, base[2]) };
19319
19373
  if (base[1] === "PRODUCTS")
19320
19374
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
19321
19375
  return null;
@@ -19323,7 +19377,7 @@ function readXcodeJsonProject(xcodeproj, source) {
19323
19377
  const unescaped = raw.replaceAll("\\<", "<");
19324
19378
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
19325
19379
  if (unescaped.startsWith("~")) return null;
19326
- return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path24.default.join(groupDir, unescaped) };
19380
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path25.default.join(groupDir, unescaped) };
19327
19381
  };
19328
19382
  const memberships = [];
19329
19383
  const folders = [];
@@ -19334,7 +19388,7 @@ function readXcodeJsonProject(xcodeproj, source) {
19334
19388
  const kind = text(entry.kind) ?? "file-reference";
19335
19389
  const raw = text(entry.path) ?? "";
19336
19390
  const located = raw === "" ? null : locate(raw, parent.dir);
19337
- const name2 = text(entry.name) ?? import_node_path24.default.basename(raw);
19391
+ const name2 = text(entry.name) ?? import_node_path25.default.basename(raw);
19338
19392
  const node = { id: "", name: name2, dir: null, parent, children: [] };
19339
19393
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
19340
19394
  node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -19455,7 +19509,7 @@ function readXcodeJsonProject(xcodeproj, source) {
19455
19509
  if (!isObject(entry)) continue;
19456
19510
  const repository = text(entry.repository);
19457
19511
  const local = text(entry.path);
19458
- const name2 = local !== void 0 ? import_node_path24.default.basename(import_node_path24.default.resolve(import_node_path24.default.dirname(xcodeproj), local)) : import_node_path24.default.basename(repository ?? "").replace(/\.git$/, "");
19512
+ const name2 = local !== void 0 ? import_node_path25.default.basename(import_node_path25.default.resolve(import_node_path25.default.dirname(xcodeproj), local)) : import_node_path25.default.basename(repository ?? "").replace(/\.git$/, "");
19459
19513
  const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
19460
19514
  isa: "XCRemoteSwiftPackageReference",
19461
19515
  repositoryURL: repository ?? "",
@@ -19665,28 +19719,28 @@ var CONDITIONS = {
19665
19719
  variant: "normal"
19666
19720
  };
19667
19721
  function walkFiles(dir) {
19668
- if (!import_node_fs22.default.existsSync(dir)) return [];
19722
+ if (!import_node_fs23.default.existsSync(dir)) return [];
19669
19723
  const out = [];
19670
- for (const entry of import_node_fs22.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
19724
+ for (const entry of import_node_fs23.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
19671
19725
  if (entry.name.startsWith(".")) continue;
19672
- const full = import_node_path25.default.join(dir, entry.name);
19726
+ const full = import_node_path26.default.join(dir, entry.name);
19673
19727
  if (entry.isDirectory()) out.push(...walkFiles(full));
19674
19728
  else if (entry.isFile()) out.push(full);
19675
19729
  }
19676
19730
  return out;
19677
19731
  }
19678
- var isDirectory = (dir) => import_node_fs22.default.existsSync(dir) && import_node_fs22.default.statSync(dir).isDirectory();
19732
+ var isDirectory = (dir) => import_node_fs23.default.existsSync(dir) && import_node_fs23.default.statSync(dir).isDirectory();
19679
19733
  function readXcconfig(file, read) {
19680
- if (read.includes(file) || !import_node_fs22.default.existsSync(file)) return {};
19734
+ if (read.includes(file) || !import_node_fs23.default.existsSync(file)) return {};
19681
19735
  read.push(file);
19682
19736
  const settings = {};
19683
- for (const raw of import_node_fs22.default.readFileSync(file, "utf8").split("\n")) {
19737
+ for (const raw of import_node_fs23.default.readFileSync(file, "utf8").split("\n")) {
19684
19738
  const line = raw.replace(/\/\/.*$/, "").trim();
19685
19739
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
19686
19740
  if (include) {
19687
19741
  Object.assign(
19688
19742
  settings,
19689
- readXcconfig(import_node_path25.default.resolve(import_node_path25.default.dirname(file), include[1]), read)
19743
+ readXcconfig(import_node_path26.default.resolve(import_node_path26.default.dirname(file), include[1]), read)
19690
19744
  );
19691
19745
  continue;
19692
19746
  }
@@ -19736,22 +19790,22 @@ function decodeXml(text2) {
19736
19790
  return text2.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
19737
19791
  }
19738
19792
  function workspaceReferences(workspace) {
19739
- const data = import_node_path25.default.join(workspace, "contents.xcworkspacedata");
19740
- if (!import_node_fs22.default.existsSync(data))
19793
+ const data = import_node_path26.default.join(workspace, "contents.xcworkspacedata");
19794
+ if (!import_node_fs23.default.existsSync(data))
19741
19795
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
19742
- const container = import_node_path25.default.dirname(workspace);
19796
+ const container = import_node_path26.default.dirname(workspace);
19743
19797
  const locate = (location, base) => {
19744
19798
  const colon = location.indexOf(":");
19745
19799
  const kind = location.slice(0, colon);
19746
19800
  const rest = location.slice(colon + 1);
19747
- if (kind === "group") return import_node_path25.default.resolve(base, rest);
19748
- if (kind === "container" || kind === "self") return import_node_path25.default.resolve(container, rest);
19749
- if (kind === "absolute") return import_node_path25.default.resolve(rest);
19750
- throw new Error(`${import_node_path25.default.basename(workspace)} has an unsupported location ${location}`);
19801
+ if (kind === "group") return import_node_path26.default.resolve(base, rest);
19802
+ if (kind === "container" || kind === "self") return import_node_path26.default.resolve(container, rest);
19803
+ if (kind === "absolute") return import_node_path26.default.resolve(rest);
19804
+ throw new Error(`${import_node_path26.default.basename(workspace)} has an unsupported location ${location}`);
19751
19805
  };
19752
19806
  const groups = [container];
19753
19807
  const references = [];
19754
- for (const [, closing, tag, attributes, selfClosing] of import_node_fs22.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
19808
+ for (const [, closing, tag, attributes, selfClosing] of import_node_fs23.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
19755
19809
  if (closing) {
19756
19810
  if (tag === "Group") groups.pop();
19757
19811
  continue;
@@ -19802,8 +19856,8 @@ function remotePackageRequirements(projects) {
19802
19856
  var loaded2 = /* @__PURE__ */ new Map();
19803
19857
  function xcodeProjectFile(xcodeproj) {
19804
19858
  for (const name2 of ["project.pbxproj", "project.xcproj"]) {
19805
- const file = import_node_path25.default.join(xcodeproj, name2);
19806
- if (import_node_fs22.default.existsSync(file)) return file;
19859
+ const file = import_node_path26.default.join(xcodeproj, name2);
19860
+ if (import_node_fs23.default.existsSync(file)) return file;
19807
19861
  }
19808
19862
  return null;
19809
19863
  }
@@ -19811,8 +19865,8 @@ function loadProject(xcodeproj) {
19811
19865
  const projectFile = xcodeProjectFile(xcodeproj);
19812
19866
  if (!projectFile)
19813
19867
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
19814
- const source = import_node_fs22.default.readFileSync(projectFile, "utf8");
19815
- const digest = (0, import_node_crypto10.createHash)("sha256").update(source).digest("hex");
19868
+ const source = import_node_fs23.default.readFileSync(projectFile, "utf8");
19869
+ const digest = (0, import_node_crypto11.createHash)("sha256").update(source).digest("hex");
19816
19870
  const cached2 = loaded2.get(projectFile);
19817
19871
  if (cached2?.digest === digest) return cached2.project;
19818
19872
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -19828,10 +19882,10 @@ function loadProject(xcodeproj) {
19828
19882
  if (!project || project.isa !== "PBXProject") {
19829
19883
  throw new Error(`${projectFile} has no PBXProject root`);
19830
19884
  }
19831
- const projectDir = import_node_fs22.default.realpathSync(
19832
- import_node_path25.default.resolve(import_node_path25.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
19885
+ const projectDir = import_node_fs23.default.realpathSync(
19886
+ import_node_path26.default.resolve(import_node_path26.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
19833
19887
  );
19834
- const resolvePath = xcodePathResolver(objects, projectDir, import_node_path25.default.join);
19888
+ const resolvePath = xcodePathResolver(objects, projectDir, import_node_path26.default.join);
19835
19889
  const result = {
19836
19890
  xcodeproj,
19837
19891
  projectFile,
@@ -19855,10 +19909,12 @@ function defaultConfiguration(project) {
19855
19909
  function targetSettings(ref, configuration, builtins, options = {}, overrides = {}) {
19856
19910
  const { project, target } = ref;
19857
19911
  const xcconfigs = [];
19858
- const level = (listId) => {
19912
+ const selected = (listId) => {
19859
19913
  const configList = project.object(listId);
19860
19914
  const configs2 = list(configList?.buildConfigurations).map(project.object);
19861
- const config = configs2.find((entry) => entry?.name === configuration) ?? configs2.find((entry) => entry?.name === str(configList?.defaultConfigurationName));
19915
+ return configs2.find((entry) => entry?.name === configuration) ?? configs2.find((entry) => entry?.name === str(configList?.defaultConfigurationName));
19916
+ };
19917
+ const level = (config) => {
19862
19918
  if (!config) return [];
19863
19919
  const name2 = str(config.name) ?? configuration;
19864
19920
  const base = str(config.baseConfigurationReference);
@@ -19866,8 +19922,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
19866
19922
  const relative3 = str(config.baseConfigurationReferenceRelativePath);
19867
19923
  const own = isDict(config.buildSettings) ? config.buildSettings : {};
19868
19924
  const directory = anchor ? project.resolvePath(anchor) : null;
19869
- const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path25.default.resolve(directory, relative3) : null;
19870
- if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !import_node_fs22.default.existsSync(baseFile)))
19925
+ const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path26.default.resolve(directory, relative3) : null;
19926
+ if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !import_node_fs23.default.existsSync(baseFile)))
19871
19927
  throw new Error(
19872
19928
  `Unable to open base configuration reference file '${baseFile ?? base ?? relative3 ?? anchor}'`
19873
19929
  );
@@ -19886,10 +19942,11 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
19886
19942
  )
19887
19943
  ];
19888
19944
  };
19945
+ const targetConfig = selected(str(target.buildConfigurationList));
19889
19946
  const levels = [
19890
- { ...builtins, CONFIGURATION: configuration },
19891
- ...level(str(project.project.buildConfigurationList)),
19892
- ...level(str(target.buildConfigurationList)),
19947
+ { ...builtins, CONFIGURATION: str(targetConfig?.name) ?? configuration },
19948
+ ...level(selected(str(project.project.buildConfigurationList))),
19949
+ ...level(targetConfig),
19893
19950
  overrides
19894
19951
  ];
19895
19952
  const resolving2 = /* @__PURE__ */ new Set();
@@ -19959,26 +20016,26 @@ function scriptCommand(shell, script) {
19959
20016
  return [executable, ...args, "-c", script];
19960
20017
  }
19961
20018
  function expandSearchPath(directory, rules2) {
19962
- if (import_node_path25.default.basename(directory) !== "**") return [directory];
20019
+ if (import_node_path26.default.basename(directory) !== "**") return [directory];
19963
20020
  const expanded = [];
19964
20021
  const seen = /* @__PURE__ */ new Set();
19965
- const queue = [import_node_path25.default.dirname(directory)];
20022
+ const queue = [import_node_path26.default.dirname(directory)];
19966
20023
  for (let at = 0; at < queue.length; at++) {
19967
20024
  const current = queue[at];
19968
20025
  let real;
19969
20026
  try {
19970
- real = import_node_fs22.default.realpathSync(current);
20027
+ real = import_node_fs23.default.realpathSync(current);
19971
20028
  } catch {
19972
20029
  continue;
19973
20030
  }
19974
- if (!import_node_fs22.default.statSync(real).isDirectory() || seen.has(real)) continue;
20031
+ if (!import_node_fs23.default.statSync(real).isDirectory() || seen.has(real)) continue;
19975
20032
  seen.add(real);
19976
20033
  expanded.push(current);
19977
- for (const entry of import_node_fs22.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
20034
+ for (const entry of import_node_fs23.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
19978
20035
  if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
19979
20036
  if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
19980
20037
  continue;
19981
- queue.push(import_node_path25.default.join(current, entry.name));
20038
+ queue.push(import_node_path26.default.join(current, entry.name));
19982
20039
  }
19983
20040
  }
19984
20041
  return expanded;
@@ -20049,7 +20106,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
20049
20106
  for (const token of tokens) {
20050
20107
  if (token.startsWith("-")) break;
20051
20108
  const file = resolve5(token);
20052
- if (file?.endsWith(".xcassets")) catalogs.push(import_node_path25.default.resolve(projectDir, file));
20109
+ if (file?.endsWith(".xcassets")) catalogs.push(import_node_path26.default.resolve(projectDir, file));
20053
20110
  }
20054
20111
  }
20055
20112
  return catalogs;
@@ -20094,14 +20151,14 @@ function shellCopies(script, settings, projectDir) {
20094
20151
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
20095
20152
  return [];
20096
20153
  copies.push({
20097
- from: import_node_path25.default.resolve(projectDir, operands[0]),
20098
- to: import_node_path25.default.resolve(projectDir, operands[1])
20154
+ from: import_node_path26.default.resolve(projectDir, operands[0]),
20155
+ to: import_node_path26.default.resolve(projectDir, operands[1])
20099
20156
  });
20100
20157
  }
20101
20158
  return copies;
20102
20159
  }
20103
20160
  function fileListEntries(file, absolute) {
20104
- return import_node_fs22.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
20161
+ return import_node_fs23.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
20105
20162
  }
20106
20163
  function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20107
20164
  const { project, target, id: targetId } = ref;
@@ -20114,7 +20171,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20114
20171
  const copiedFiles = [];
20115
20172
  let generatedInfoPlist = false;
20116
20173
  const declaredInfoPlist = settings("INFOPLIST_FILE");
20117
- const infoPlistOutput = declaredInfoPlist ? import_node_path25.default.resolve(project.projectDir, declaredInfoPlist) : null;
20174
+ const infoPlistOutput = declaredInfoPlist ? import_node_path26.default.resolve(project.projectDir, declaredInfoPlist) : null;
20118
20175
  const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
20119
20176
  for (const phaseId of list(target.buildPhases)) {
20120
20177
  const phase = project.object(phaseId);
@@ -20129,7 +20186,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20129
20186
  copiedFiles.push(
20130
20187
  ...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
20131
20188
  );
20132
- const absolute = (raw) => import_node_path25.default.resolve(project.projectDir, expand(raw, settings));
20189
+ const absolute = (raw) => import_node_path26.default.resolve(project.projectDir, expand(raw, settings));
20133
20190
  const inputs = list(phase.inputPaths).map(absolute);
20134
20191
  const outputs = list(phase.outputPaths).map(absolute);
20135
20192
  const fileLists = /* @__PURE__ */ new Map();
@@ -20138,7 +20195,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20138
20195
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
20139
20196
  ).map((raw) => {
20140
20197
  const file = absolute(raw);
20141
- if (!import_node_fs22.default.existsSync(file)) {
20198
+ if (!import_node_fs23.default.existsSync(file)) {
20142
20199
  return { file, entries: [] };
20143
20200
  }
20144
20201
  return { file, entries: fileListEntries(file, absolute) };
@@ -20159,7 +20216,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20159
20216
  ...fileLists.get("OUTPUT").map((item) => item.file)
20160
20217
  ];
20161
20218
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
20162
- for (const file of inputFiles) if (import_node_fs22.default.existsSync(file)) projectInputs.add(file);
20219
+ for (const file of inputFiles) if (import_node_fs23.default.existsSync(file)) projectInputs.add(file);
20163
20220
  }
20164
20221
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
20165
20222
  const configuration = settings("CONFIGURATION");
@@ -20172,10 +20229,10 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20172
20229
  false
20173
20230
  ))
20174
20231
  continue;
20175
- const phaseDir = import_node_path25.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
20232
+ const phaseDir = import_node_path26.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
20176
20233
  for (const lists of fileLists.values())
20177
20234
  for (const { file } of lists)
20178
- if (!import_node_fs22.default.existsSync(file))
20235
+ if (!import_node_fs23.default.existsSync(file))
20179
20236
  throw new Error(
20180
20237
  `${targetName}: Run Script "${script}" missing file list ${file}`
20181
20238
  );
@@ -20194,25 +20251,25 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20194
20251
  const lists = fileLists.get(kind);
20195
20252
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
20196
20253
  lists.forEach((_item, index) => {
20197
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path25.default.join(
20254
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path26.default.join(
20198
20255
  phaseDir,
20199
20256
  `${kind}-${index}.xcfilelist`
20200
20257
  );
20201
20258
  });
20202
20259
  }
20203
- const signature = (0, import_node_crypto10.createHash)("sha256").update(
20260
+ const signature = (0, import_node_crypto11.createHash)("sha256").update(
20204
20261
  JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
20205
20262
  );
20206
20263
  for (const file of inputFiles) {
20207
20264
  signature.update(file);
20208
- if (import_node_fs22.default.existsSync(file)) {
20209
- const stat = import_node_fs22.default.statSync(file);
20265
+ if (import_node_fs23.default.existsSync(file)) {
20266
+ const stat = import_node_fs23.default.statSync(file);
20210
20267
  signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
20211
20268
  } else signature.update("missing");
20212
20269
  }
20213
20270
  const stamp = signature.digest("hex");
20214
20271
  const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
20215
- if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs22.default.existsSync(file))) {
20272
+ if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs23.default.existsSync(file))) {
20216
20273
  preparedXcodePhase(
20217
20274
  project.projectFile,
20218
20275
  targetId,
@@ -20223,14 +20280,14 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
20223
20280
  );
20224
20281
  continue;
20225
20282
  }
20226
- import_node_fs22.default.mkdirSync(phaseDir, { recursive: true });
20227
- import_node_fs22.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
20228
- import_node_fs22.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
20283
+ import_node_fs23.default.mkdirSync(phaseDir, { recursive: true });
20284
+ import_node_fs23.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
20285
+ import_node_fs23.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
20229
20286
  for (const output2 of allOutputs)
20230
- import_node_fs22.default.mkdirSync(import_node_path25.default.dirname(output2), { recursive: true });
20287
+ import_node_fs23.default.mkdirSync(import_node_path26.default.dirname(output2), { recursive: true });
20231
20288
  for (const [kind, lists] of fileLists)
20232
20289
  lists.forEach((item, index) => {
20233
- import_node_fs22.default.writeFileSync(
20290
+ import_node_fs23.default.writeFileSync(
20234
20291
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
20235
20292
  `${item.entries.join("\n")}
20236
20293
  `
@@ -20257,7 +20314,7 @@ ${output2}`
20257
20314
  );
20258
20315
  }
20259
20316
  const missing2 = allOutputs.filter(
20260
- (file) => file === infoPlistOutput && !import_node_fs22.default.existsSync(file)
20317
+ (file) => file === infoPlistOutput && !import_node_fs23.default.existsSync(file)
20261
20318
  );
20262
20319
  if (missing2.length > 0)
20263
20320
  throw new Error(
@@ -20277,8 +20334,8 @@ ${output2}`
20277
20334
  project.visitMembers(
20278
20335
  targetId,
20279
20336
  project.resolvePath,
20280
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs22.default.existsSync(file) ? [file] : [],
20281
- import_node_path25.default.join,
20337
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs23.default.existsSync(file) ? [file] : [],
20338
+ import_node_path26.default.join,
20282
20339
  (file, kind) => {
20283
20340
  if (kind === "header") {
20284
20341
  headers.add(file);
@@ -20288,9 +20345,9 @@ ${output2}`
20288
20345
  resources.add(file);
20289
20346
  return;
20290
20347
  }
20291
- if (!import_node_fs22.default.existsSync(file)) {
20348
+ if (!import_node_fs23.default.existsSync(file)) {
20292
20349
  if (options.requireSources === false) return;
20293
- const script = scriptForOutput.get(import_node_path25.default.normalize(file));
20350
+ const script = scriptForOutput.get(import_node_path26.default.normalize(file));
20294
20351
  throw new Error(
20295
20352
  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}`
20296
20353
  );
@@ -20311,37 +20368,37 @@ ${output2}`
20311
20368
  function commonAncestor(dirs) {
20312
20369
  let common = dirs[0];
20313
20370
  for (const dir of dirs) {
20314
- while (common !== import_node_path25.default.dirname(common) && import_node_path25.default.relative(common, dir).startsWith(".."))
20315
- common = import_node_path25.default.dirname(common);
20371
+ while (common !== import_node_path26.default.dirname(common) && import_node_path26.default.relative(common, dir).startsWith(".."))
20372
+ common = import_node_path26.default.dirname(common);
20316
20373
  }
20317
20374
  return common;
20318
20375
  }
20319
- var isPodsProject = (xcodeproj) => import_node_path25.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path25.default.basename(import_node_path25.default.dirname(xcodeproj)) === "Pods";
20376
+ var isPodsProject = (xcodeproj) => import_node_path26.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path26.default.basename(import_node_path26.default.dirname(xcodeproj)) === "Pods";
20320
20377
  function installedPodsSandbox(pods) {
20321
- const podfileLock = import_node_path25.default.join(import_node_path25.default.dirname(pods), "Podfile.lock");
20322
- const manifestLock = import_node_path25.default.join(pods, "Manifest.lock");
20323
- if (!import_node_fs22.default.existsSync(podfileLock))
20378
+ const podfileLock = import_node_path26.default.join(import_node_path26.default.dirname(pods), "Podfile.lock");
20379
+ const manifestLock = import_node_path26.default.join(pods, "Manifest.lock");
20380
+ if (!import_node_fs23.default.existsSync(podfileLock))
20324
20381
  throw new Error(
20325
- `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path25.default.dirname(pods)}`
20382
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path26.default.dirname(pods)}`
20326
20383
  );
20327
- if (!import_node_fs22.default.existsSync(manifestLock) || !import_node_fs22.default.readFileSync(manifestLock).equals(import_node_fs22.default.readFileSync(podfileLock)))
20384
+ if (!import_node_fs23.default.existsSync(manifestLock) || !import_node_fs23.default.readFileSync(manifestLock).equals(import_node_fs23.default.readFileSync(podfileLock)))
20328
20385
  throw new Error(
20329
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path25.default.dirname(pods)}`
20386
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path26.default.dirname(pods)}`
20330
20387
  );
20331
20388
  const specChecksums = {};
20332
- const lines = import_node_fs22.default.readFileSync(manifestLock, "utf8").split("\n");
20389
+ const lines = import_node_fs23.default.readFileSync(manifestLock, "utf8").split("\n");
20333
20390
  const start = lines.indexOf("SPEC CHECKSUMS:");
20334
20391
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
20335
20392
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
20336
20393
  if (!entry) break;
20337
20394
  specChecksums[entry[1]] = entry[2];
20338
20395
  }
20339
- const specs = import_node_path25.default.join(pods, "Local Podspecs");
20396
+ const specs = import_node_path26.default.join(pods, "Local Podspecs");
20340
20397
  return {
20341
20398
  podfileLock,
20342
20399
  manifestLock,
20343
20400
  specChecksums,
20344
- localPodspecs: isDirectory(specs) ? import_node_fs22.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path25.default.join(specs, name2)) : []
20401
+ localPodspecs: isDirectory(specs) ? import_node_fs23.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path26.default.join(specs, name2)) : []
20345
20402
  };
20346
20403
  }
20347
20404
  function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
@@ -20353,14 +20410,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
20353
20410
  if (!xcodeProjectFile(xcodeproj)) {
20354
20411
  if (installedPods && isPodsProject(xcodeproj))
20355
20412
  throw new Error(
20356
- `${import_node_path25.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path25.default.dirname(import_node_path25.default.dirname(xcodeproj))}`
20413
+ `${import_node_path26.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path26.default.dirname(import_node_path26.default.dirname(xcodeproj))}`
20357
20414
  );
20358
20415
  return;
20359
20416
  }
20360
- const key = import_node_fs22.default.realpathSync(xcodeproj);
20361
- if (projectAt.has(key) || !installedPods && key.split(import_node_path25.default.sep).includes("Pods"))
20417
+ const key = import_node_fs23.default.realpathSync(xcodeproj);
20418
+ if (projectAt.has(key) || !installedPods && key.split(import_node_path26.default.sep).includes("Pods"))
20362
20419
  return;
20363
- if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path25.default.dirname(key));
20420
+ if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path26.default.dirname(key));
20364
20421
  const project = loadProject(key);
20365
20422
  projectAt.set(key, project);
20366
20423
  projects.push(project);
@@ -20376,12 +20433,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
20376
20433
  for (const reference of listed)
20377
20434
  if (reference.endsWith(".xcodeproj")) addProject(reference);
20378
20435
  if (projects.length === 0) {
20379
- throw new Error(`${import_node_path25.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
20436
+ throw new Error(`${import_node_path26.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
20380
20437
  }
20381
- const podfile = import_node_path25.default.join(import_node_path25.default.dirname(xcodeprojOrWorkspace), "Podfile");
20382
- if (installedPods && !cocoapods && import_node_fs22.default.existsSync(podfile))
20438
+ const podfile = import_node_path26.default.join(import_node_path26.default.dirname(xcodeprojOrWorkspace), "Podfile");
20439
+ if (installedPods && !cocoapods && import_node_fs23.default.existsSync(podfile))
20383
20440
  throw new Error(
20384
- `${podfile} is not installed into ${import_node_path25.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path25.default.dirname(podfile)} and open the workspace it writes`
20441
+ `${podfile} is not installed into ${import_node_path26.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path26.default.dirname(podfile)} and open the workspace it writes`
20385
20442
  );
20386
20443
  return { listed, projects, projectAt, cocoapods };
20387
20444
  }
@@ -20417,7 +20474,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
20417
20474
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
20418
20475
  }
20419
20476
  function defaultXcodeAppTarget(xcodeproj) {
20420
- const project = loadProject(import_node_fs22.default.realpathSync(xcodeproj));
20477
+ const project = loadProject(import_node_fs23.default.realpathSync(xcodeproj));
20421
20478
  for (const [id, target] of Object.entries(project.objects)) {
20422
20479
  if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
20423
20480
  if (isIosAppTarget({ project, id, target }, { requireSources: false }))
@@ -20425,30 +20482,30 @@ function defaultXcodeAppTarget(xcodeproj) {
20425
20482
  }
20426
20483
  }
20427
20484
  function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
20428
- const container = import_node_fs22.default.realpathSync(xcodeprojOrWorkspace);
20485
+ const container = import_node_fs23.default.realpathSync(xcodeprojOrWorkspace);
20429
20486
  const { projects } = workspaceProjects(container);
20430
20487
  const containers = [
20431
20488
  .../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
20432
20489
  ];
20433
20490
  const found = containers.flatMap(
20434
20491
  (dir) => [
20435
- import_node_path25.default.join(dir, "xcshareddata"),
20436
- ...isDirectory(import_node_path25.default.join(dir, "xcuserdata")) ? import_node_fs22.default.readdirSync(import_node_path25.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path25.default.join(dir, "xcuserdata", user)) : []
20492
+ import_node_path26.default.join(dir, "xcshareddata"),
20493
+ ...isDirectory(import_node_path26.default.join(dir, "xcuserdata")) ? import_node_fs23.default.readdirSync(import_node_path26.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path26.default.join(dir, "xcuserdata", user)) : []
20437
20494
  ].map((data) => ({
20438
20495
  dir,
20439
- file: import_node_path25.default.join(data, "xcschemes", `${scheme}.xcscheme`)
20496
+ file: import_node_path26.default.join(data, "xcschemes", `${scheme}.xcscheme`)
20440
20497
  }))
20441
- ).find((candidate) => import_node_fs22.default.existsSync(candidate.file));
20498
+ ).find((candidate) => import_node_fs23.default.existsSync(candidate.file));
20442
20499
  if (!found) {
20443
20500
  const known = containers.flatMap(
20444
- (dir) => import_node_fs22.default.existsSync(import_node_path25.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs22.default.readdirSync(import_node_path25.default.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
20501
+ (dir) => import_node_fs23.default.existsSync(import_node_path26.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs23.default.readdirSync(import_node_path26.default.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
20445
20502
  );
20446
20503
  throw new Error(
20447
- `${import_node_path25.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
20504
+ `${import_node_path26.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
20448
20505
  );
20449
20506
  }
20450
20507
  const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
20451
- import_node_fs22.default.readFileSync(found.file, "utf8")
20508
+ import_node_fs23.default.readFileSync(found.file, "utf8")
20452
20509
  );
20453
20510
  const attribute = (text2, name3) => {
20454
20511
  const value = new RegExp(`\\b${name3}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
@@ -20461,12 +20518,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
20461
20518
  if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
20462
20519
  throw new Error(`scheme ${scheme} runs no application target`);
20463
20520
  }
20464
- const projectPath = import_node_path25.default.resolve(
20465
- import_node_path25.default.dirname(found.dir),
20521
+ const projectPath = import_node_path26.default.resolve(
20522
+ import_node_path26.default.dirname(found.dir),
20466
20523
  referenced.slice("container:".length)
20467
20524
  );
20468
20525
  const project = projects.find(
20469
- (candidate) => import_node_fs22.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs22.default.realpathSync(projectPath)
20526
+ (candidate) => import_node_fs23.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs23.default.realpathSync(projectPath)
20470
20527
  );
20471
20528
  const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
20472
20529
  const name2 = target && str(target.target.name);
@@ -20476,9 +20533,9 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
20476
20533
  var NativeAppTargetSelectionError = class extends Error {
20477
20534
  };
20478
20535
  function selectIosAppTarget(projectRoot, iosTarget) {
20479
- const nested = import_node_path25.default.join(projectRoot, "ios");
20480
- const iosRoot = import_node_fs22.default.existsSync(nested) ? nested : projectRoot;
20481
- const projects = import_node_fs22.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
20536
+ const nested = import_node_path26.default.join(projectRoot, "ios");
20537
+ const iosRoot = import_node_fs23.default.existsSync(nested) ? nested : projectRoot;
20538
+ const projects = import_node_fs23.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
20482
20539
  if (projects.length === 0) return null;
20483
20540
  if (projects.length > 1 && !iosTarget) {
20484
20541
  throw new NativeAppTargetSelectionError(
@@ -20488,7 +20545,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20488
20545
  let project = projects[0];
20489
20546
  if (iosTarget && projects.length > 1) {
20490
20547
  const matches = projects.filter(
20491
- (entry) => listXcodeAppTargets(import_node_path25.default.join(iosRoot, entry.name), {
20548
+ (entry) => listXcodeAppTargets(import_node_path26.default.join(iosRoot, entry.name), {
20492
20549
  requireSources: false
20493
20550
  }).includes(iosTarget)
20494
20551
  );
@@ -20500,19 +20557,19 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20500
20557
  );
20501
20558
  project = matches[0];
20502
20559
  }
20503
- const xcodeproj = import_node_path25.default.join(iosRoot, project.name);
20560
+ const xcodeproj = import_node_path26.default.join(iosRoot, project.name);
20504
20561
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
20505
20562
  let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
20506
20563
  if (!target) throw new Error("native app identity has no iOS application target");
20507
20564
  if (!iosTarget) {
20508
20565
  const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
20509
- const container = import_node_fs22.default.existsSync(workspace) ? workspace : xcodeproj;
20566
+ const container = import_node_fs23.default.existsSync(workspace) ? workspace : xcodeproj;
20510
20567
  const hasScheme = [container, xcodeproj].some((dir) => {
20511
- if (import_node_fs22.default.existsSync(import_node_path25.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
20568
+ if (import_node_fs23.default.existsSync(import_node_path26.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
20512
20569
  return true;
20513
- const users = import_node_path25.default.join(dir, "xcuserdata");
20514
- return import_node_fs22.default.existsSync(users) && import_node_fs22.default.readdirSync(users).some(
20515
- (user) => import_node_fs22.default.existsSync(import_node_path25.default.join(users, user, "xcschemes", `${target}.xcscheme`))
20570
+ const users = import_node_path26.default.join(dir, "xcuserdata");
20571
+ return import_node_fs23.default.existsSync(users) && import_node_fs23.default.readdirSync(users).some(
20572
+ (user) => import_node_fs23.default.existsSync(import_node_path26.default.join(users, user, "xcschemes", `${target}.xcscheme`))
20516
20573
  );
20517
20574
  });
20518
20575
  if (hasScheme) target = readXcodeScheme(container, target).target;
@@ -20521,8 +20578,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20521
20578
  throw new Error(`native app identity has no application target ${target}`);
20522
20579
  return { xcodeproj, target };
20523
20580
  }
20524
- var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path25.default.join(
20525
- xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path25.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
20581
+ var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path26.default.join(
20582
+ xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path26.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
20526
20583
  "xcshareddata",
20527
20584
  "swiftpm",
20528
20585
  "Package.resolved"
@@ -20537,7 +20594,7 @@ var SwiftPackageResolutionRequired = class extends Error {
20537
20594
  }
20538
20595
  };
20539
20596
  function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
20540
- const xcodeprojOrWorkspace = import_node_fs22.default.realpathSync(input);
20597
+ const xcodeprojOrWorkspace = import_node_fs23.default.realpathSync(input);
20541
20598
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
20542
20599
  const { listed, projects, projectAt, cocoapods } = workspaceProjects(
20543
20600
  xcodeprojOrWorkspace,
@@ -20546,28 +20603,36 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20546
20603
  const allTargets = projects.flatMap(projectTargets);
20547
20604
  const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
20548
20605
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
20549
- const container = import_node_path25.default.basename(xcodeprojOrWorkspace);
20606
+ const container = import_node_path26.default.basename(xcodeprojOrWorkspace);
20550
20607
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
20551
20608
  if (named.length !== 1) {
20609
+ if (appTargets.length === 0)
20610
+ throw new Error(
20611
+ `${container} has no application targets; open a project or workspace that contains one`
20612
+ );
20552
20613
  throw new Error(
20553
- targetName && named.length === 0 ? `${container} has no application target ${targetName}; it has ${appTargetNames.join(", ") || "none"}` : targetName ? `${container} has ${named.length} application targets named ${targetName}; open its .xcodeproj` : `${container} has ${appTargetNames.length} application targets (${appTargetNames.join(", ") || "none"}); pass --target`
20614
+ targetName && named.length === 0 ? `${container} has no application target ${targetName}; it has ${appTargetNames.join(", ") || "none"}` : targetName ? `${container} has ${named.length} application targets named ${targetName}; open its .xcodeproj` : `${container} has ${appTargetNames.length} application targets (${appTargetNames.join(", ")}); pass --target`
20554
20615
  );
20555
20616
  }
20556
20617
  const app = named[0];
20557
- const configuration = configurationName ?? defaultConfiguration(app.project);
20618
+ const appConfigs = app.project.object(str(app.target.buildConfigurationList));
20619
+ const appConfigNames = list(appConfigs?.buildConfigurations).flatMap(
20620
+ (id) => str(app.project.object(id)?.name) ?? []
20621
+ );
20622
+ const configuration = configurationName === void 0 ? defaultConfiguration(app.project) : appConfigNames.includes(configurationName) ? configurationName : str(appConfigs?.defaultConfigurationName) ?? configurationName;
20558
20623
  const byProduct = /* @__PURE__ */ new Map();
20559
20624
  for (const ref of allTargets) {
20560
20625
  const product = ref.project.object(str(ref.target.productReference));
20561
20626
  const file = str(product?.path);
20562
- if (file && !byProduct.has(import_node_path25.default.basename(file)))
20563
- byProduct.set(import_node_path25.default.basename(file), ref);
20627
+ if (file && !byProduct.has(import_node_path26.default.basename(file)))
20628
+ byProduct.set(import_node_path26.default.basename(file), ref);
20564
20629
  }
20565
20630
  const proxied = (project, proxyId) => {
20566
20631
  const proxy = project.object(proxyId);
20567
20632
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
20568
20633
  const portal = str(proxy.containerPortal);
20569
20634
  const portalPath = project.resolvePath(portal ?? "");
20570
- const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs22.default.existsSync(portalPath) ? projectAt.get(import_node_fs22.default.realpathSync(portalPath)) : void 0;
20635
+ const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs23.default.existsSync(portalPath) ? projectAt.get(import_node_fs23.default.realpathSync(portalPath)) : void 0;
20571
20636
  const remote = str(proxy.remoteGlobalIDString);
20572
20637
  if (!owner || !remote) return void 0;
20573
20638
  return projectTargets(owner).find(
@@ -20591,7 +20656,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20591
20656
  const buildFile = project.object(buildFileId);
20592
20657
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
20593
20658
  const file = project.object(str(buildFile.fileRef));
20594
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path25.default.basename(str(file.path) ?? "")) : void 0;
20659
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path26.default.basename(str(file.path) ?? "")) : void 0;
20595
20660
  if (resolved) found.push(resolved);
20596
20661
  }
20597
20662
  }
@@ -20648,8 +20713,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20648
20713
  ref.project.visitMembers(
20649
20714
  ref.id,
20650
20715
  ref.project.resolvePath,
20651
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs22.default.existsSync(file) ? [file] : [],
20652
- import_node_path25.default.join,
20716
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs23.default.existsSync(file) ? [file] : [],
20717
+ import_node_path26.default.join,
20653
20718
  (file, kind) => {
20654
20719
  if (kind === "header") found.push(file);
20655
20720
  }
@@ -20665,12 +20730,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20665
20730
  for (const ref of projectTargets(project)) {
20666
20731
  const product = productName(ref);
20667
20732
  for (const { file, visibility } of headerPhase(ref)) {
20668
- const name2 = import_node_path25.default.basename(file);
20733
+ const name2 = import_node_path26.default.basename(file);
20669
20734
  if (!entries.has(name2))
20670
20735
  entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
20671
20736
  }
20672
20737
  for (const file of synchronizedHeaders(ref)) {
20673
- const name2 = import_node_path25.default.basename(file);
20738
+ const name2 = import_node_path26.default.basename(file);
20674
20739
  if (!entries.has(name2)) entries.set(name2, file);
20675
20740
  }
20676
20741
  }
@@ -20680,7 +20745,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20680
20745
  if (folder === null) continue;
20681
20746
  for (const file of walkFiles(folder)) {
20682
20747
  if (!HEADER_FILE.test(file)) continue;
20683
- const name2 = import_node_path25.default.basename(file);
20748
+ const name2 = import_node_path26.default.basename(file);
20684
20749
  if (!entries.has(name2)) entries.set(name2, file);
20685
20750
  }
20686
20751
  }
@@ -20688,18 +20753,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20688
20753
  for (const id of Object.keys(project.objects)) {
20689
20754
  if (project.object(id)?.isa !== "PBXFileReference") continue;
20690
20755
  const file = project.resolvePath(id);
20691
- if (file && HEADER_FILE.test(file) && !entries.has(import_node_path25.default.basename(file)))
20692
- entries.set(import_node_path25.default.basename(file), file);
20756
+ if (file && HEADER_FILE.test(file) && !entries.has(import_node_path26.default.basename(file)))
20757
+ entries.set(import_node_path26.default.basename(file), file);
20693
20758
  }
20694
20759
  const map2 = [...entries];
20695
20760
  projectHeaderMaps.set(project, map2);
20696
20761
  return map2;
20697
20762
  };
20698
20763
  const xcconfigs = /* @__PURE__ */ new Set();
20699
- const buildDir = (project) => import_node_path25.default.join(project.projectDir, ".build/peach-xcode/Build");
20700
- const podsBuild = {
20701
- SYMROOT: import_node_path25.default.join(buildDir(app.project), "Products"),
20702
- OBJROOT: import_node_path25.default.join(buildDir(app.project), "Intermediates.noindex")
20764
+ const buildDir = (project) => import_node_path26.default.join(project.projectDir, ".build/peach-xcode/Build");
20765
+ const workspaceBuild = {
20766
+ SYMROOT: import_node_path26.default.join(buildDir(app.project), "Products"),
20767
+ OBJROOT: import_node_path26.default.join(buildDir(app.project), "Intermediates.noindex")
20703
20768
  };
20704
20769
  const moduleTarget = (ref) => {
20705
20770
  const name2 = str(ref.target.name) ?? ref.id;
@@ -20714,15 +20779,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20714
20779
  TARGET_NAME: name2,
20715
20780
  TARGETNAME: "$(TARGET_NAME)",
20716
20781
  PROJECT: "$(PROJECT_NAME)",
20717
- PROJECT_NAME: import_node_path25.default.basename(ref.project.xcodeproj, ".xcodeproj"),
20782
+ PROJECT_NAME: import_node_path26.default.basename(ref.project.xcodeproj, ".xcodeproj"),
20718
20783
  PROJECT_FILE_PATH: ref.project.xcodeproj,
20719
20784
  SRCROOT: ref.project.projectDir,
20720
20785
  SOURCE_ROOT: ref.project.projectDir,
20721
20786
  PROJECT_DIR: ref.project.projectDir,
20722
- SYMROOT: import_node_path25.default.join(buildDir(ref.project), "Products"),
20787
+ SYMROOT: import_node_path26.default.join(buildDir(ref.project), "Products"),
20723
20788
  BUILD_DIR: "$(SYMROOT)",
20724
20789
  BUILD_ROOT: "$(SYMROOT)",
20725
- OBJROOT: import_node_path25.default.join(buildDir(ref.project), "Intermediates.noindex"),
20790
+ OBJROOT: import_node_path26.default.join(buildDir(ref.project), "Intermediates.noindex"),
20726
20791
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
20727
20792
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
20728
20793
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
@@ -20752,7 +20817,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20752
20817
  DEVELOPMENT_LANGUAGE: str(ref.project.project.developmentRegion) ?? "en"
20753
20818
  },
20754
20819
  options,
20755
- isPodsProject(ref.project.xcodeproj) ? podsBuild : {}
20820
+ workspaceBuild
20756
20821
  );
20757
20822
  for (const file of read) xcconfigs.add(file);
20758
20823
  const swiftVersion = Number.parseFloat(settings2("SWIFT_VERSION") || "5");
@@ -20764,7 +20829,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20764
20829
  xcconfigs
20765
20830
  );
20766
20831
  const searchRules = recursiveSearchRules(settings2);
20767
- const absolute = (file) => import_node_path25.default.resolve(ref.project.projectDir, file);
20832
+ const absolute = (file) => import_node_path26.default.resolve(ref.project.projectDir, file);
20768
20833
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
20769
20834
  const product = settings2("PRODUCT_NAME");
20770
20835
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -20795,7 +20860,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20795
20860
  `${name2}: Swift compatibility header phase has no Swift producer sources`
20796
20861
  );
20797
20862
  const building = options.prepareGeneratedSources && options.requireSources !== false;
20798
- const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path25.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
20863
+ const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path26.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
20799
20864
  if (versioning) {
20800
20865
  const version = settings2("CURRENT_PROJECT_VERSION");
20801
20866
  const custom = [
@@ -20808,7 +20873,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20808
20873
  ].filter((key) => settings2(key));
20809
20874
  if (custom.length)
20810
20875
  throw new Error(
20811
- `${name2}: Xcode generates ${import_node_path25.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
20876
+ `${name2}: Xcode generates ${import_node_path26.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
20812
20877
  );
20813
20878
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
20814
20879
  const [major, minor] = version.split(".");
@@ -20821,9 +20886,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20821
20886
  ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
20822
20887
  ""
20823
20888
  ].join("\n");
20824
- if (!import_node_fs22.default.existsSync(versioning) || import_node_fs22.default.readFileSync(versioning, "utf8") !== unit) {
20825
- import_node_fs22.default.mkdirSync(import_node_path25.default.dirname(versioning), { recursive: true });
20826
- import_node_fs22.default.writeFileSync(versioning, unit);
20889
+ if (!import_node_fs23.default.existsSync(versioning) || import_node_fs23.default.readFileSync(versioning, "utf8") !== unit) {
20890
+ import_node_fs23.default.mkdirSync(import_node_path26.default.dirname(versioning), { recursive: true });
20891
+ import_node_fs23.default.writeFileSync(versioning, unit);
20827
20892
  }
20828
20893
  allSources.push(versioning);
20829
20894
  }
@@ -20842,7 +20907,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20842
20907
  const headerFiles = headerPhase(ref);
20843
20908
  const ownHeaders = /* @__PURE__ */ new Map();
20844
20909
  for (const { file, visibility } of headerFiles) {
20845
- const name3 = import_node_path25.default.basename(file);
20910
+ const name3 = import_node_path26.default.basename(file);
20846
20911
  const published = visibility !== "Project";
20847
20912
  if (!ownHeaders.has(name3))
20848
20913
  ownHeaders.set(name3, published ? `${product}/${name3}` : file);
@@ -20850,7 +20915,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20850
20915
  ownHeaders.set(`${product}/${name3}`, file);
20851
20916
  }
20852
20917
  for (const file of synchronizedHeaders(ref)) {
20853
- const name3 = import_node_path25.default.basename(file);
20918
+ const name3 = import_node_path26.default.basename(file);
20854
20919
  if (ownHeaders.has(name3)) continue;
20855
20920
  ownHeaders.set(name3, file);
20856
20921
  const qualified = `${product}/${name3}`;
@@ -20862,24 +20927,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20862
20927
  const otherProduct = productName(other);
20863
20928
  for (const { file, visibility } of headerPhase(other)) {
20864
20929
  if (visibility === "Project") continue;
20865
- const key = `${otherProduct}/${import_node_path25.default.basename(file)}`;
20930
+ const key = `${otherProduct}/${import_node_path26.default.basename(file)}`;
20866
20931
  if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
20867
20932
  }
20868
20933
  }
20869
- const wrapper = import_node_path25.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
20934
+ const wrapper = import_node_path26.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
20870
20935
  const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
20871
- const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path25.default.join(import_node_path25.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
20872
- const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs22.default.existsSync(moduleMap) && import_node_fs22.default.existsSync(frameworkUmbrella) ? {
20936
+ const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path26.default.join(import_node_path26.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
20937
+ const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs23.default.existsSync(moduleMap) && import_node_fs23.default.existsSync(frameworkUmbrella) ? {
20873
20938
  framework: true,
20874
20939
  moduleMap,
20875
20940
  umbrella: frameworkUmbrella,
20876
- outputModuleMap: import_node_path25.default.join(wrapper, "Modules", "module.modulemap"),
20877
- outputUmbrella: import_node_path25.default.join(
20941
+ outputModuleMap: import_node_path26.default.join(wrapper, "Modules", "module.modulemap"),
20942
+ outputUmbrella: import_node_path26.default.join(
20878
20943
  wrapper,
20879
20944
  "Headers",
20880
- import_node_path25.default.basename(frameworkUmbrella)
20945
+ import_node_path26.default.basename(frameworkUmbrella)
20881
20946
  ),
20882
- outputHeader: import_node_path25.default.join(
20947
+ outputHeader: import_node_path26.default.join(
20883
20948
  wrapper,
20884
20949
  "Headers",
20885
20950
  settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
@@ -20893,10 +20958,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20893
20958
  outputUmbrella: compatibility.outputUmbrella,
20894
20959
  outputHeader: compatibility.outputHeader
20895
20960
  } : frameworkCompatibility;
20896
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path25.default.relative(import_node_path25.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path25.default.sep)[0] !== ".." && import_node_fs22.default.existsSync(moduleMap) ? import_node_fs22.default.readdirSync(import_node_path25.default.dirname(moduleMap)).flatMap((entry) => {
20961
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path26.default.relative(import_node_path26.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path26.default.sep)[0] !== ".." && import_node_fs23.default.existsSync(moduleMap) ? import_node_fs23.default.readdirSync(import_node_path26.default.dirname(moduleMap)).flatMap((entry) => {
20897
20962
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
20898
- const file = import_node_path25.default.join(import_node_path25.default.dirname(moduleMap), entry);
20899
- return import_node_fs22.default.existsSync(file) ? [file] : [];
20963
+ const file = import_node_path26.default.join(import_node_path26.default.dirname(moduleMap), entry);
20964
+ return import_node_fs23.default.existsSync(file) ? [file] : [];
20900
20965
  }) : [];
20901
20966
  const fileFlags = {};
20902
20967
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -20960,21 +21025,23 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20960
21025
  ),
20961
21026
  ...podHeaders.filter((file) => HEADER_FILE.test(file))
20962
21027
  ],
20963
- headers,
21028
+ headers: [
21029
+ .../* @__PURE__ */ new Set([...headers, ...headerFiles.map(({ file }) => file)])
21030
+ ],
20964
21031
  prefixHeader: settings2("GCC_PREFIX_HEADER") ? absolute(settings2("GCC_PREFIX_HEADER")) : null,
20965
21032
  bridgingHeader: settings2("SWIFT_OBJC_BRIDGING_HEADER") ? absolute(settings2("SWIFT_OBJC_BRIDGING_HEADER")) : null,
20966
21033
  // xcode searches its products' include directory before
20967
21034
  // HEADER_SEARCH_PATHS and the target's derived sources after.
20968
21035
  headerSearchPaths: [
20969
- import_node_path25.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
21036
+ import_node_path26.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
20970
21037
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
20971
21038
  (raw) => expandSearchPath(absolute(raw), searchRules)
20972
21039
  ),
20973
- import_node_path25.default.join(
21040
+ import_node_path26.default.join(
20974
21041
  `${settings2("DERIVED_FILE_DIR")}-normal`,
20975
21042
  settings2("CURRENT_ARCH")
20976
21043
  ),
20977
- import_node_path25.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
21044
+ import_node_path26.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
20978
21045
  settings2("DERIVED_FILE_DIR")
20979
21046
  ],
20980
21047
  userHeaderSearchPaths: settingList(
@@ -21024,10 +21091,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21024
21091
  ...headerFiles.flatMap(
21025
21092
  ({ file, visibility }) => visibility === "Project" ? [] : [
21026
21093
  [
21027
- import_node_path25.default.join(
21094
+ import_node_path26.default.join(
21028
21095
  wrapper,
21029
21096
  visibility === "Public" ? "Headers" : "PrivateHeaders",
21030
- import_node_path25.default.basename(file)
21097
+ import_node_path26.default.basename(file)
21031
21098
  ),
21032
21099
  file
21033
21100
  ]
@@ -21041,7 +21108,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21041
21108
  return [];
21042
21109
  const destination = expand(
21043
21110
  str(phase.dstPath) ?? "",
21044
- (name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path25.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path25.default.join(wrapper, "PrivateHeaders") : settings2(name3)
21111
+ (name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path26.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path26.default.join(wrapper, "PrivateHeaders") : settings2(name3)
21045
21112
  );
21046
21113
  return list(phase.files).flatMap((id) => {
21047
21114
  const file = ref.project.resolvePath(
@@ -21049,17 +21116,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21049
21116
  );
21050
21117
  return file && HEADER_FILE.test(file) ? [
21051
21118
  [
21052
- import_node_path25.default.resolve(
21119
+ import_node_path26.default.resolve(
21053
21120
  settings2("BUILT_PRODUCTS_DIR"),
21054
21121
  destination,
21055
- import_node_path25.default.basename(file)
21122
+ import_node_path26.default.basename(file)
21056
21123
  ),
21057
21124
  file
21058
21125
  ]
21059
21126
  ] : [];
21060
21127
  });
21061
21128
  }),
21062
- ...moduleMap ? [[import_node_path25.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
21129
+ ...moduleMap ? [[import_node_path26.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
21063
21130
  ]) : Object.fromEntries([
21064
21131
  ...podHeaders.map((file) => [file, file]),
21065
21132
  ...moduleMap ? [[moduleMap, moduleMap]] : []
@@ -21091,7 +21158,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21091
21158
  const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
21092
21159
  const frameworks = frameworkTargets.map(({ framework }) => framework);
21093
21160
  const podSourceDirs = builtTargets.slice(0, -1).flatMap(
21094
- ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path25.default.dirname(file)).filter((dir) => import_node_fs22.default.existsSync(dir)) : []
21161
+ ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path26.default.dirname(file)).filter((dir) => import_node_fs23.default.existsSync(dir)) : []
21095
21162
  );
21096
21163
  const expandValue = (value, settings2) => {
21097
21164
  if (typeof value === "string") return expand(value, settings2);
@@ -21107,12 +21174,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21107
21174
  const bundleTargets = builtTargets.filter(
21108
21175
  ({ ref }) => ref.target.productType === RESOURCE_BUNDLE
21109
21176
  );
21110
- for (const owner of options.installedPods ? selectedTargets : []) {
21177
+ for (const owner of options.installedPods ? builtTargets : []) {
21111
21178
  for (const phaseId of list(owner.ref.target.buildPhases)) {
21112
21179
  const phase = owner.ref.project.object(phaseId);
21113
21180
  if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
21114
21181
  continue;
21115
- const absolute = (raw) => import_node_path25.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
21182
+ const absolute = (raw) => import_node_path26.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
21116
21183
  const entries = (paths) => paths.flatMap((raw) => {
21117
21184
  const file = absolute(raw);
21118
21185
  xcconfigs.add(file);
@@ -21128,7 +21195,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21128
21195
  ].filter((file) => file.endsWith(".bundle"));
21129
21196
  if (inputs.length !== outputs.length)
21130
21197
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
21131
- const destinationRoot = import_node_path25.default.join(
21198
+ const destinationRoot = import_node_path26.default.join(
21132
21199
  owner.settings("TARGET_BUILD_DIR"),
21133
21200
  owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
21134
21201
  );
@@ -21137,24 +21204,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21137
21204
  const file = str(
21138
21205
  target.ref.project.object(str(target.ref.target.productReference))?.path
21139
21206
  );
21140
- return file && import_node_path25.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
21207
+ return file && import_node_path26.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
21141
21208
  });
21142
21209
  if (!product && !isDirectory(input2))
21143
21210
  throw new Error(
21144
21211
  `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
21145
21212
  );
21146
- const destination = import_node_path25.default.relative(destinationRoot, outputs[index]);
21147
- if (destination === ".." || destination.startsWith(`..${import_node_path25.default.sep}`) || import_node_path25.default.isAbsolute(destination) || import_node_path25.default.basename(input2) !== import_node_path25.default.basename(destination))
21213
+ const destination = import_node_path26.default.relative(destinationRoot, outputs[index]);
21214
+ if (destination === ".." || destination.startsWith(`..${import_node_path26.default.sep}`) || import_node_path26.default.isAbsolute(destination) || import_node_path26.default.basename(input2) !== import_node_path26.default.basename(destination))
21148
21215
  throw new Error(
21149
21216
  `${owner.module.name}: invalid resource bundle copy destination`
21150
21217
  );
21151
- const infoFile = product ? import_node_path25.default.resolve(
21218
+ const infoFile = product ? import_node_path26.default.resolve(
21152
21219
  product.ref.project.projectDir,
21153
21220
  product.settings("INFOPLIST_FILE")
21154
21221
  ) : null;
21155
21222
  if (infoFile) xcconfigs.add(infoFile);
21156
21223
  const prefix2 = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
21157
- const bundlePath = prefix2 + destination.split(import_node_path25.default.sep).join("/");
21224
+ const bundlePath = prefix2 + destination.split(import_node_path26.default.sep).join("/");
21158
21225
  if (resourceProducts.some((resource) => resource.path === bundlePath))
21159
21226
  throw new Error(
21160
21227
  `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
@@ -21165,21 +21232,21 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21165
21232
  resources: product.module.resources,
21166
21233
  infoPlist: import_plist3.default.build(
21167
21234
  expandValue(
21168
- import_plist3.default.parse(import_node_fs22.default.readFileSync(infoFile, "utf8")),
21235
+ import_plist3.default.parse(import_node_fs23.default.readFileSync(infoFile, "utf8")),
21169
21236
  product.settings
21170
21237
  )
21171
21238
  )
21172
21239
  } : {
21173
- resources: import_node_fs22.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path25.default.join(entry.parentPath, entry.name)).sort(),
21240
+ resources: import_node_fs23.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path26.default.join(entry.parentPath, entry.name)).sort(),
21174
21241
  sourceRoot: input2
21175
21242
  }
21176
21243
  });
21177
21244
  }
21178
21245
  }
21179
21246
  }
21180
- const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path25.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
21247
+ const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path26.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
21181
21248
  const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
21182
- const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs22.default.readFileSync(infoPlistFile, "utf8")) : {};
21249
+ const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs23.default.readFileSync(infoPlistFile, "utf8")) : {};
21183
21250
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
21184
21251
  throw new Error(`${module2.name} Info.plist must contain a dictionary`);
21185
21252
  }
@@ -21225,7 +21292,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21225
21292
  };
21226
21293
  }
21227
21294
  const localPackageDirs = [
21228
- ...listed.filter((reference) => import_node_fs22.default.existsSync(import_node_path25.default.join(reference, "Package.swift"))),
21295
+ ...listed.filter((reference) => import_node_fs23.default.existsSync(import_node_path26.default.join(reference, "Package.swift"))),
21229
21296
  ...projects.flatMap(
21230
21297
  (project) => Object.entries(project.objects).flatMap(([id, entry]) => {
21231
21298
  if (!isDict(entry)) return [];
@@ -21235,19 +21302,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21235
21302
  const packages = [];
21236
21303
  while (pending.length > 0) {
21237
21304
  const dir = pending.pop();
21238
- if (import_node_fs22.default.existsSync(import_node_path25.default.join(dir, "Package.swift"))) {
21305
+ if (import_node_fs23.default.existsSync(import_node_path26.default.join(dir, "Package.swift"))) {
21239
21306
  packages.push(dir);
21240
21307
  continue;
21241
21308
  }
21242
21309
  if (!isDirectory(dir)) continue;
21243
- for (const child of import_node_fs22.default.readdirSync(dir, { withFileTypes: true }))
21310
+ for (const child of import_node_fs23.default.readdirSync(dir, { withFileTypes: true }))
21244
21311
  if (child.isDirectory() && !child.name.startsWith("."))
21245
- pending.push(import_node_path25.default.join(dir, child.name));
21312
+ pending.push(import_node_path26.default.join(dir, child.name));
21246
21313
  }
21247
21314
  return packages;
21248
21315
  }
21249
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path25.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
21250
- return candidate && import_node_fs22.default.existsSync(import_node_path25.default.join(candidate, "Package.swift")) ? [candidate] : [];
21316
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path26.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
21317
+ return candidate && import_node_fs23.default.existsSync(import_node_path26.default.join(candidate, "Package.swift")) ? [candidate] : [];
21251
21318
  })
21252
21319
  )
21253
21320
  ];
@@ -21270,7 +21337,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21270
21337
  const searchedFrameworks = /* @__PURE__ */ new Map();
21271
21338
  const frameworkSearchDirectories = /* @__PURE__ */ new Set();
21272
21339
  for (const { ref, settings: settings2 } of builtTargets) {
21273
- const absolute = (raw) => import_node_path25.default.resolve(ref.project.projectDir, expand(raw, settings2));
21340
+ const absolute = (raw) => import_node_path26.default.resolve(ref.project.projectDir, expand(raw, settings2));
21274
21341
  const requested = options.nativeModules;
21275
21342
  const includeBinary = (name2, dir) => {
21276
21343
  if (!requested || nativeTargets.has(ref) || requested.includes(name2) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
@@ -21282,14 +21349,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21282
21349
  for (const directory of expandSearchPath(absolute(raw), searchRules)) {
21283
21350
  if (frameworkSearchDirectories.has(directory)) continue;
21284
21351
  frameworkSearchDirectories.add(directory);
21285
- if (!import_node_fs22.default.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
21352
+ if (!import_node_fs23.default.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
21286
21353
  continue;
21287
- for (const entry of import_node_fs22.default.readdirSync(directory, { withFileTypes: true })) {
21354
+ for (const entry of import_node_fs23.default.readdirSync(directory, { withFileTypes: true })) {
21288
21355
  const name2 = /^(.+)\.framework$/.exec(entry.name)?.[1];
21289
21356
  if (!name2 || byProduct.has(entry.name) || searchedFrameworks.has(name2))
21290
21357
  continue;
21291
- const file = import_node_path25.default.join(directory, entry.name);
21292
- if (import_node_fs22.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
21358
+ const file = import_node_path26.default.join(directory, entry.name);
21359
+ if (import_node_fs23.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
21293
21360
  searchedFrameworks.set(name2, file);
21294
21361
  }
21295
21362
  }
@@ -21297,9 +21364,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21297
21364
  }
21298
21365
  for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
21299
21366
  const dir = absolute(raw);
21300
- const modulemap = import_node_path25.default.join(dir, "module.modulemap");
21301
- if (!import_node_fs22.default.existsSync(modulemap)) continue;
21302
- const name2 = moduleMapName(import_node_fs22.default.readFileSync(modulemap, "utf8"));
21367
+ const modulemap = import_node_path26.default.join(dir, "module.modulemap");
21368
+ if (!import_node_fs23.default.existsSync(modulemap)) continue;
21369
+ const name2 = moduleMapName(import_node_fs23.default.readFileSync(modulemap, "utf8"));
21303
21370
  if (name2 && !binaryFrameworks.has(name2)) includeBinary(name2, dir);
21304
21371
  }
21305
21372
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -21308,7 +21375,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21308
21375
  const inputs = list(phase.inputPaths).map(absolute);
21309
21376
  for (const raw of list(phase.inputFileListPaths)) {
21310
21377
  const file = absolute(raw);
21311
- if (!import_node_fs22.default.existsSync(file)) continue;
21378
+ if (!import_node_fs23.default.existsSync(file)) continue;
21312
21379
  xcconfigs.add(file);
21313
21380
  inputs.push(...fileListEntries(file, absolute));
21314
21381
  }
@@ -21357,7 +21424,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21357
21424
  product,
21358
21425
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
21359
21426
  kind: "local",
21360
- dir: import_node_path25.default.resolve(
21427
+ dir: import_node_path26.default.resolve(
21361
21428
  project.projectDir,
21362
21429
  str(reference.relativePath) ?? ""
21363
21430
  )
@@ -21390,10 +21457,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21390
21457
  // however it is rooted: xcode links -framework <name> from the sdk
21391
21458
  // and a stale group-relative path to it contributes nothing.
21392
21459
  /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
21393
- byProduct.has(import_node_path25.default.basename(rawPath)))
21460
+ byProduct.has(import_node_path26.default.basename(rawPath)))
21394
21461
  continue;
21395
21462
  const resolved = fileId ? project.resolvePath(fileId) : null;
21396
- if (fileId && resolved !== null && !import_node_fs22.default.existsSync(resolved))
21463
+ if (fileId && resolved !== null && !import_node_fs23.default.existsSync(resolved))
21397
21464
  throw new Error(
21398
21465
  `${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
21399
21466
  );
@@ -21416,7 +21483,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21416
21483
  ({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
21417
21484
  );
21418
21485
  const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
21419
- let packageResolved = import_node_fs22.default.existsSync(resolvedFile) ? [import_node_fs22.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path25.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs22.default.existsSync(file)).map((file) => import_node_fs22.default.realpathSync(file)).sort();
21486
+ let packageResolved = import_node_fs23.default.existsSync(resolvedFile) ? [import_node_fs23.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path26.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs23.default.existsSync(file)).map((file) => import_node_fs23.default.realpathSync(file)).sort();
21420
21487
  if (packageResolved.length === 0) {
21421
21488
  const requirements = remotePackageRequirements(projects);
21422
21489
  if (requirements.length > 0) {
@@ -21442,14 +21509,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21442
21509
  } : {},
21443
21510
  rootDir: commonAncestor(
21444
21511
  [
21445
- workspace ? import_node_path25.default.dirname(workspace) : app.project.projectDir,
21512
+ workspace ? import_node_path26.default.dirname(workspace) : app.project.projectDir,
21446
21513
  ...used.map((project) => project.projectDir),
21447
21514
  ...localPackageDirs,
21448
21515
  ...linkedProducts.flatMap(
21449
- ({ source }) => source.kind === "local" && import_node_fs22.default.existsSync(source.dir) ? [source.dir] : []
21516
+ ({ source }) => source.kind === "local" && import_node_fs23.default.existsSync(source.dir) ? [source.dir] : []
21450
21517
  ),
21451
21518
  ...new Set(podSourceDirs)
21452
- ].map((dir) => import_node_fs22.default.realpathSync(dir))
21519
+ ].map((dir) => import_node_fs23.default.realpathSync(dir))
21453
21520
  ),
21454
21521
  projectFiles: [
21455
21522
  .../* @__PURE__ */ new Set([
@@ -21468,7 +21535,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
21468
21535
  resourceProducts,
21469
21536
  linkedProducts,
21470
21537
  localPackageDirs: [
21471
- ...new Set(localPackageDirs.map((dir) => import_node_fs22.default.realpathSync(dir)))
21538
+ ...new Set(localPackageDirs.map((dir) => import_node_fs23.default.realpathSync(dir)))
21472
21539
  ].sort(),
21473
21540
  binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
21474
21541
  packageResolved,
@@ -21558,7 +21625,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
21558
21625
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
21559
21626
  const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
21560
21627
  const rootModuleName = readRootModuleName(
21561
- app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs23.default.existsSync(file)).map((file) => import_node_fs23.default.readFileSync(file, "utf8"))
21628
+ app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs24.default.existsSync(file)).map((file) => import_node_fs24.default.readFileSync(file, "utf8"))
21562
21629
  );
21563
21630
  return stampNativeBuildSdk({
21564
21631
  applicationName,
@@ -21579,7 +21646,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
21579
21646
  googleSignIn: readGoogleSignInConfiguration(
21580
21647
  dictionary,
21581
21648
  Object.fromEntries(
21582
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs23.default.readFileSync(file, "utf8"))])
21649
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs24.default.readFileSync(file, "utf8"))])
21583
21650
  )
21584
21651
  ),
21585
21652
  supportedInterfaceOrientations,
@@ -21588,11 +21655,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
21588
21655
  alternateIconNames: [...alternateIconNames],
21589
21656
  appIconArtwork: resolveNativeAppIconArtwork(
21590
21657
  app.resources,
21591
- (file) => import_node_fs23.default.readFileSync(file, "utf8"),
21658
+ (file) => import_node_fs24.default.readFileSync(file, "utf8"),
21592
21659
  (file) => {
21593
- const extension = import_node_path26.default.extname(file).toLowerCase();
21660
+ const extension = import_node_path27.default.extname(file).toLowerCase();
21594
21661
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
21595
- return `data:${contentType};base64,${import_node_fs23.default.readFileSync(file).toString("base64")}`;
21662
+ return `data:${contentType};base64,${import_node_fs24.default.readFileSync(file).toString("base64")}`;
21596
21663
  },
21597
21664
  icons,
21598
21665
  app.appIconName,
@@ -21621,23 +21688,23 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
21621
21688
  const read = selectNativeAppIdentityReader(platform, {
21622
21689
  android: () => null,
21623
21690
  ios: () => {
21624
- const nested = import_node_path26.default.join(projectRoot, "ios");
21625
- const iosRoot = import_node_fs23.default.existsSync(nested) ? nested : projectRoot;
21691
+ const nested = import_node_path27.default.join(projectRoot, "ios");
21692
+ const iosRoot = import_node_fs24.default.existsSync(nested) ? nested : projectRoot;
21626
21693
  const prefix2 = iosRoot === nested ? "ios/" : "";
21627
21694
  const files = {};
21628
- for (const entry of import_node_fs23.default.readdirSync(iosRoot, { withFileTypes: true })) {
21695
+ for (const entry of import_node_fs24.default.readdirSync(iosRoot, { withFileTypes: true })) {
21629
21696
  if (entry.name === "Pods") continue;
21630
21697
  if (entry.isDirectory()) {
21631
21698
  const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
21632
21699
  for (const name2 of names) {
21633
21700
  const relative3 = `${prefix2}${entry.name}/${name2}`;
21634
- const file = import_node_path26.default.join(projectRoot, relative3);
21635
- if (import_node_fs23.default.existsSync(file)) files[relative3] = import_node_fs23.default.readFileSync(file, "utf8");
21701
+ const file = import_node_path27.default.join(projectRoot, relative3);
21702
+ if (import_node_fs24.default.existsSync(file)) files[relative3] = import_node_fs24.default.readFileSync(file, "utf8");
21636
21703
  }
21637
21704
  } else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
21638
21705
  const relative3 = `${prefix2}${entry.name}`;
21639
- const file = import_node_path26.default.join(projectRoot, relative3);
21640
- if (import_node_fs23.default.existsSync(file)) files[relative3] = import_node_fs23.default.readFileSync(file, "utf8");
21706
+ const file = import_node_path27.default.join(projectRoot, relative3);
21707
+ if (import_node_fs24.default.existsSync(file)) files[relative3] = import_node_fs24.default.readFileSync(file, "utf8");
21641
21708
  }
21642
21709
  }
21643
21710
  const identity = extractNativeAppIdentityFromFiles(
@@ -21654,41 +21721,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
21654
21721
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
21655
21722
  const files = {};
21656
21723
  if (androidMergedManifest) {
21657
- const file = import_node_path26.default.resolve(projectRoot, androidMergedManifest);
21658
- if (!import_node_fs23.default.existsSync(file)) return null;
21659
- files[androidMergedManifest] = import_node_fs23.default.readFileSync(file, "utf8");
21724
+ const file = import_node_path27.default.resolve(projectRoot, androidMergedManifest);
21725
+ if (!import_node_fs24.default.existsSync(file)) return null;
21726
+ files[androidMergedManifest] = import_node_fs24.default.readFileSync(file, "utf8");
21660
21727
  } else {
21661
- const androidRoot = import_node_path26.default.join(projectRoot, "android");
21662
- if (!import_node_fs23.default.existsSync(androidRoot)) return null;
21728
+ const androidRoot = import_node_path27.default.join(projectRoot, "android");
21729
+ if (!import_node_fs24.default.existsSync(androidRoot)) return null;
21663
21730
  const collect = (directory) => {
21664
- for (const entry of import_node_fs23.default.readdirSync(directory, { withFileTypes: true })) {
21665
- const file = import_node_path26.default.join(directory, entry.name);
21731
+ for (const entry of import_node_fs24.default.readdirSync(directory, { withFileTypes: true })) {
21732
+ const file = import_node_path27.default.join(directory, entry.name);
21666
21733
  if (entry.isDirectory()) collect(file);
21667
21734
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
21668
- files[import_node_path26.default.relative(projectRoot, file).split(import_node_path26.default.sep).join("/")] = import_node_fs23.default.readFileSync(file, "utf8");
21735
+ files[import_node_path27.default.relative(projectRoot, file).split(import_node_path27.default.sep).join("/")] = import_node_fs24.default.readFileSync(file, "utf8");
21669
21736
  }
21670
21737
  };
21671
- for (const module2 of import_node_fs23.default.readdirSync(androidRoot, { withFileTypes: true })) {
21738
+ for (const module2 of import_node_fs24.default.readdirSync(androidRoot, { withFileTypes: true })) {
21672
21739
  if (!module2.isDirectory()) continue;
21673
- const outputs = import_node_path26.default.join(
21740
+ const outputs = import_node_path27.default.join(
21674
21741
  androidRoot,
21675
21742
  module2.name,
21676
21743
  "build/intermediates/merged_manifests"
21677
21744
  );
21678
- if (import_node_fs23.default.existsSync(outputs)) collect(outputs);
21745
+ if (import_node_fs24.default.existsSync(outputs)) collect(outputs);
21679
21746
  }
21680
21747
  }
21681
21748
  for (const manifest of Object.keys(files)) {
21682
21749
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
21683
21750
  if (!resourceDirectory) continue;
21684
- const absolute = import_node_path26.default.resolve(projectRoot, resourceDirectory);
21685
- if (!import_node_fs23.default.existsSync(absolute)) continue;
21686
- for (const entry of import_node_fs23.default.readdirSync(absolute, { withFileTypes: true })) {
21751
+ const absolute = import_node_path27.default.resolve(projectRoot, resourceDirectory);
21752
+ if (!import_node_fs24.default.existsSync(absolute)) continue;
21753
+ for (const entry of import_node_fs24.default.readdirSync(absolute, { withFileTypes: true })) {
21687
21754
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
21688
- for (const resource of import_node_fs23.default.readdirSync(import_node_path26.default.join(absolute, entry.name))) {
21755
+ for (const resource of import_node_fs24.default.readdirSync(import_node_path27.default.join(absolute, entry.name))) {
21689
21756
  if (!resource.endsWith(".xml")) continue;
21690
21757
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
21691
- files[file] = import_node_fs23.default.readFileSync(import_node_path26.default.resolve(projectRoot, file), "utf8");
21758
+ files[file] = import_node_fs24.default.readFileSync(import_node_path27.default.resolve(projectRoot, file), "utf8");
21692
21759
  }
21693
21760
  }
21694
21761
  }
@@ -21705,7 +21772,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
21705
21772
  const app = readIosAppTarget(projectRoot, iosTarget, environment);
21706
21773
  if (!app) return null;
21707
21774
  const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
21708
- const projectManifestPath = import_node_path26.default.join(projectRoot, "package.json");
21775
+ const projectManifestPath = import_node_path27.default.join(projectRoot, "package.json");
21709
21776
  const projectRequire = (0, import_node_module4.createRequire)(projectManifestPath);
21710
21777
  let reanimatedManifestPath;
21711
21778
  try {
@@ -21719,22 +21786,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
21719
21786
  throw error;
21720
21787
  }
21721
21788
  const installedManifest = JSON.parse(
21722
- import_node_fs23.default.readFileSync(reanimatedManifestPath, "utf8")
21789
+ import_node_fs24.default.readFileSync(reanimatedManifestPath, "utf8")
21723
21790
  );
21724
21791
  const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
21725
21792
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
21726
21793
  if (Number.parseInt(installedVersion, 10) < 4) return identity;
21727
21794
  const defaults = JSON.parse(
21728
- import_node_fs23.default.readFileSync(
21729
- import_node_path26.default.join(
21730
- import_node_path26.default.dirname(reanimatedManifestPath),
21795
+ import_node_fs24.default.readFileSync(
21796
+ import_node_path27.default.join(
21797
+ import_node_path27.default.dirname(reanimatedManifestPath),
21731
21798
  "src/featureFlags/staticFlags.json"
21732
21799
  ),
21733
21800
  "utf8"
21734
21801
  )
21735
21802
  );
21736
21803
  if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
21737
- const manifest = JSON.parse(import_node_fs23.default.readFileSync(projectManifestPath, "utf8"));
21804
+ const manifest = JSON.parse(import_node_fs24.default.readFileSync(projectManifestPath, "utf8"));
21738
21805
  const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
21739
21806
  const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
21740
21807
  if (overrides !== void 0 && !isRecord(overrides)) {
@@ -21769,9 +21836,9 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
21769
21836
  // src/native-firebase-config.ts
21770
21837
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21771
21838
  var import_node_child_process8 = require("node:child_process");
21772
- var import_node_fs24 = __toESM(require("node:fs"), 1);
21839
+ var import_node_fs25 = __toESM(require("node:fs"), 1);
21773
21840
  var import_node_os5 = __toESM(require("node:os"), 1);
21774
- var import_node_path27 = __toESM(require("node:path"), 1);
21841
+ var import_node_path28 = __toESM(require("node:path"), 1);
21775
21842
  init_is_record();
21776
21843
  var EXPO_CONFIG_SCRIPT = `const { createRequire } = require('node:module');
21777
21844
  const { writeFileSync } = require('node:fs');
@@ -21790,13 +21857,13 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
21790
21857
  if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
21791
21858
  writeFileSync(process.argv[2], result, { mode: 0o600 });`;
21792
21859
  function hasExpoConfig(projectRoot) {
21793
- const appJsonPath = import_node_path27.default.join(projectRoot, "app.json");
21794
- const appJson = import_node_fs24.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs24.default.readFileSync(appJsonPath, "utf8")) : null;
21860
+ const appJsonPath = import_node_path28.default.join(projectRoot, "app.json");
21861
+ const appJson = import_node_fs25.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs25.default.readFileSync(appJsonPath, "utf8")) : null;
21795
21862
  const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
21796
21863
  (value) => isRecord(value) && typeof value.googleServicesFile === "string"
21797
21864
  ));
21798
21865
  return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
21799
- (name2) => import_node_fs24.default.existsSync(import_node_path27.default.join(projectRoot, name2))
21866
+ (name2) => import_node_fs25.default.existsSync(import_node_path28.default.join(projectRoot, name2))
21800
21867
  );
21801
21868
  }
21802
21869
  function expoConfigArgs(projectRoot, resultPath) {
@@ -21804,22 +21871,22 @@ function expoConfigArgs(projectRoot, resultPath) {
21804
21871
  "--input-type=commonjs",
21805
21872
  "-e",
21806
21873
  EXPO_CONFIG_SCRIPT,
21807
- import_node_path27.default.resolve(projectRoot),
21874
+ import_node_path28.default.resolve(projectRoot),
21808
21875
  resultPath
21809
21876
  ];
21810
21877
  }
21811
21878
  function readExpoConfigResult(resultPath, status, stderr) {
21812
21879
  if (status !== 0)
21813
21880
  throw new Error(stderr || "Expo native configuration evaluation failed.");
21814
- const resolved = JSON.parse(import_node_fs24.default.readFileSync(resultPath, "utf8"));
21881
+ const resolved = JSON.parse(import_node_fs25.default.readFileSync(resultPath, "utf8"));
21815
21882
  if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
21816
21883
  return resolved;
21817
21884
  }
21818
- var resultDirectory = () => import_node_fs24.default.mkdtempSync(import_node_path27.default.join(import_node_os5.default.tmpdir(), "peach-expo-config-"));
21885
+ var resultDirectory = () => import_node_fs25.default.mkdtempSync(import_node_path28.default.join(import_node_os5.default.tmpdir(), "peach-expo-config-"));
21819
21886
  function readExpoConfig(projectRoot) {
21820
21887
  if (!hasExpoConfig(projectRoot)) return {};
21821
21888
  const directory = resultDirectory();
21822
- const resultPath = import_node_path27.default.join(directory, "config.json");
21889
+ const resultPath = import_node_path28.default.join(directory, "config.json");
21823
21890
  try {
21824
21891
  const child = (0, import_node_child_process8.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
21825
21892
  cwd: projectRoot,
@@ -21831,7 +21898,7 @@ function readExpoConfig(projectRoot) {
21831
21898
  if (child.error) throw child.error;
21832
21899
  return readExpoConfigResult(resultPath, child.status, child.stderr);
21833
21900
  } finally {
21834
- import_node_fs24.default.rmSync(directory, { recursive: true, force: true });
21901
+ import_node_fs25.default.rmSync(directory, { recursive: true, force: true });
21835
21902
  }
21836
21903
  }
21837
21904
  function evaluateFirebaseGuard(header, resources) {
@@ -21853,7 +21920,7 @@ function evaluateFirebaseGuard(header, resources) {
21853
21920
  }
21854
21921
  clauses.push(condition.slice(start).trim());
21855
21922
  const sources = resources.filter(
21856
- (file) => import_node_path27.default.basename(file) === "GoogleService-Info.plist"
21923
+ (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
21857
21924
  );
21858
21925
  const bound = /* @__PURE__ */ new Map();
21859
21926
  for (const clause of clauses) {
@@ -21869,7 +21936,7 @@ function evaluateFirebaseGuard(header, resources) {
21869
21936
  const dictionary = /^let\s+(\w+)\s*=\s*NSDictionary\s*\(\s*contentsOfFile:\s*(\w+)\s*\)$/.exec(clause);
21870
21937
  if (dictionary && typeof bound.get(dictionary[2]) === "string") {
21871
21938
  const parsed = parsePlistSource(
21872
- import_node_fs24.default.readFileSync(String(bound.get(dictionary[2])), "utf8")
21939
+ import_node_fs25.default.readFileSync(String(bound.get(dictionary[2])), "utf8")
21873
21940
  );
21874
21941
  if (!isRecord(parsed)) return false;
21875
21942
  bound.set(dictionary[1], parsed);
@@ -21951,7 +22018,7 @@ function findDefaultConfigureCall(body, sources) {
21951
22018
  const [, type, name2] = call;
21952
22019
  for (const file of sources) {
21953
22020
  if (!file.endsWith(".swift")) continue;
21954
- const source = blankSwiftObjcLiterals(import_node_fs24.default.readFileSync(file, "utf8"));
22021
+ const source = blankSwiftObjcLiterals(import_node_fs25.default.readFileSync(file, "utf8"));
21955
22022
  const declaration = new RegExp(
21956
22023
  `\\b(?:enum|struct|class)\\s+${type}\\b[^{]*\\{`
21957
22024
  ).exec(source);
@@ -21973,10 +22040,10 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
21973
22040
  prepareGeneratedSources
21974
22041
  });
21975
22042
  const delegates = app.allSources.filter(
21976
- (file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path27.default.basename(file))
22043
+ (file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path28.default.basename(file))
21977
22044
  );
21978
22045
  const defaultConfigured = delegates.some((file) => {
21979
- const raw = import_node_fs24.default.readFileSync(file, "utf8");
22046
+ const raw = import_node_fs25.default.readFileSync(file, "utf8");
21980
22047
  const source = blankSwiftObjcLiterals(raw);
21981
22048
  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(
21982
22049
  source
@@ -22041,17 +22108,17 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
22041
22108
  return guarded;
22042
22109
  });
22043
22110
  if (!defaultConfigured) return null;
22044
- const bundle = import_node_path27.default.join(
22111
+ const bundle = import_node_path28.default.join(
22045
22112
  app.settings("BUILT_PRODUCTS_DIR"),
22046
22113
  app.settings("WRAPPER_NAME") || `${app.settings("PRODUCT_NAME")}.app`
22047
22114
  );
22048
22115
  const staged = app.copiedFiles.filter(
22049
- ({ from, to }) => to === import_node_path27.default.join(bundle, "GoogleService-Info.plist") && import_node_fs24.default.existsSync(from)
22050
- ).map(({ from }) => import_node_fs24.default.realpathSync(from));
22116
+ ({ from, to }) => to === import_node_path28.default.join(bundle, "GoogleService-Info.plist") && import_node_fs25.default.existsSync(from)
22117
+ ).map(({ from }) => import_node_fs25.default.realpathSync(from));
22051
22118
  const resources = [
22052
22119
  .../* @__PURE__ */ new Set([
22053
22120
  ...app.resources.filter(
22054
- (file) => /^GoogleService-Info\.plist$/.test(import_node_path27.default.basename(file))
22121
+ (file) => /^GoogleService-Info\.plist$/.test(import_node_path28.default.basename(file))
22055
22122
  ),
22056
22123
  ...staged
22057
22124
  ])
@@ -22060,7 +22127,7 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
22060
22127
  throw new Error(
22061
22128
  "native Firebase default initialization requires one GoogleService-Info.plist build resource"
22062
22129
  );
22063
- return import_node_path27.default.relative(import_node_fs24.default.realpathSync(projectRoot), resources[0]);
22130
+ return import_node_path28.default.relative(import_node_fs25.default.realpathSync(projectRoot), resources[0]);
22064
22131
  }
22065
22132
  function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], iosTarget, config = readExpoConfig(projectRoot), prepareGeneratedSources = false) {
22066
22133
  const result = {};
@@ -22081,8 +22148,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
22081
22148
  const native = config[platform];
22082
22149
  if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
22083
22150
  try {
22084
- const source = import_node_fs24.default.readFileSync(
22085
- import_node_path27.default.resolve(projectRoot, native.googleServicesFile),
22151
+ const source = import_node_fs25.default.readFileSync(
22152
+ import_node_path28.default.resolve(projectRoot, native.googleServicesFile),
22086
22153
  "utf8"
22087
22154
  );
22088
22155
  const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
@@ -22347,7 +22414,7 @@ function withPeach(config, options = {}) {
22347
22414
  const configuredBundleUrl = "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
22348
22415
  const cfgServer = config.server;
22349
22416
  const port = resolveMetroPort(cfgServer);
22350
- const metroServerId = (0, import_node_crypto11.randomUUID)();
22417
+ const metroServerId = (0, import_node_crypto12.randomUUID)();
22351
22418
  const bundleUrl = tagRnxBundleForPlugin(
22352
22419
  configuredBundleUrl,
22353
22420
  `http://localhost:${port}`,