peachsim 0.1.1716 → 0.1.1738

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/README.md +21 -3
  2. package/cli/app-bundle-resources.ts +2 -1
  3. package/cli/app-fonts.ts +4 -4
  4. package/cli/app-splash.ts +4 -4
  5. package/cli/app-stubs.ts +17 -0
  6. package/cli/command-registry.ts +1 -0
  7. package/cli/commands/control.ts +83 -822
  8. package/cli/commands/coverage-swift.ts +112 -4
  9. package/cli/commands/daemon.ts +8 -0
  10. package/cli/commands/detox.ts +3 -0
  11. package/cli/commands/doctor.ts +19 -2
  12. package/cli/commands/inspect/actions.ts +74 -14
  13. package/cli/commands/inspect/core.ts +5 -1
  14. package/cli/commands/inspect/settling.ts +5 -2
  15. package/cli/commands/inspect/wait-ready.ts +6 -0
  16. package/cli/commands/inspect.ts +48 -45
  17. package/cli/commands/kotlin.ts +12 -2
  18. package/cli/commands/package.ts +760 -0
  19. package/cli/commands/serve.ts +6 -0
  20. package/cli/commands/shell-url.ts +838 -0
  21. package/cli/commands/swift.ts +42 -102
  22. package/cli/commands/test.ts +20 -0
  23. package/cli/commands/upload.ts +1 -1
  24. package/cli/device-option.ts +1 -1
  25. package/cli/main.ts +13 -1
  26. package/cli/native-input.ts +199 -0
  27. package/cli/outbound-endpoints.ts +26 -1
  28. package/cli/packaged-app-launcher.ts +95 -0
  29. package/cli/scene-video.ts +36 -12
  30. package/detox/index.ts +196 -24
  31. package/dist-lib/agent-daemon-client.cjs +1 -1
  32. package/dist-lib/agent-events.cjs +1 -1
  33. package/dist-lib/attached-projects.cjs +5 -2
  34. package/dist-lib/auth/shared-session.cjs +5 -2
  35. package/dist-lib/backend-origin.cjs +1 -1
  36. package/dist-lib/beta.cjs +1 -1
  37. package/dist-lib/beta.mjs +1 -1
  38. package/dist-lib/bridge-constants.cjs +1 -1
  39. package/dist-lib/bridge-contract-input.cjs +1 -1
  40. package/dist-lib/bridge-contract-input.mjs +1 -1
  41. package/dist-lib/bridge-contract.cjs +1 -1
  42. package/dist-lib/bridge-contract.mjs +1 -1
  43. package/dist-lib/bundle-channel.cjs +39889 -31873
  44. package/dist-lib/capture-contract.cjs +1 -1
  45. package/dist-lib/capture-contract.mjs +1 -1
  46. package/dist-lib/cloud-contract.cjs +1 -1
  47. package/dist-lib/cloud-contract.mjs +1 -1
  48. package/dist-lib/cloud-test-args.cjs +1 -1
  49. package/dist-lib/cloud-test-args.mjs +1 -1
  50. package/dist-lib/cloud.cjs +1 -1
  51. package/dist-lib/cloud.mjs +1 -1
  52. package/dist-lib/config.cjs +1 -1
  53. package/dist-lib/config.mjs +1 -1
  54. package/dist-lib/detox/index.cjs +195 -63
  55. package/dist-lib/dev-bundle-resolution.cjs +14 -13
  56. package/dist-lib/expo-swift-bundle.cjs +18507 -11835
  57. package/dist-lib/expo-swift-metadata.cjs +4 -1
  58. package/dist-lib/expo-swift-metadata.mjs +3 -1
  59. package/dist-lib/home-paths.cjs +27 -3
  60. package/dist-lib/host/bridge-host.cjs +28373 -24090
  61. package/dist-lib/host/fetch-proxy-handler.cjs +235 -225
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +915 -399
  67. package/dist-lib/jump-to-source-babel.cjs +1 -1
  68. package/dist-lib/jump-to-source-native.cjs +1 -1
  69. package/dist-lib/kotlin-host.cjs +335 -47
  70. package/dist-lib/menu.cjs +13 -1
  71. package/dist-lib/menu.mjs +13 -1
  72. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  73. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  74. package/dist-lib/metro-production-bundle.cjs +1 -1
  75. package/dist-lib/metro-production-bundle.mjs +1 -1
  76. package/dist-lib/metro.cjs +918 -411
  77. package/dist-lib/native-app-identity-project.cjs +703 -283
  78. package/dist-lib/native-app-identity-project.mjs +500 -87
  79. package/dist-lib/native-app-identity.cjs +13 -2
  80. package/dist-lib/native-app-identity.mjs +13 -2
  81. package/dist-lib/native-firebase-metadata.cjs +1 -1
  82. package/dist-lib/native-firebase-metadata.mjs +1 -1
  83. package/dist-lib/plist.cjs +1 -1
  84. package/dist-lib/plist.mjs +1 -1
  85. package/dist-lib/profiles.cjs +5 -2
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +28 -23
  88. package/dist-lib/public-origins-lib.json +418 -224
  89. package/dist-lib/react-native-host-modules.cjs +35 -2
  90. package/dist-lib/react-native-host-modules.mjs +35 -2
  91. package/dist-lib/reap-browser.cjs +12 -4
  92. package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
  93. package/dist-lib/sdk.cjs +17 -7
  94. package/dist-lib/sdk.mjs +16 -7
  95. package/dist-lib/skills.cjs +44825 -29141
  96. package/dist-lib/swift-compile.cjs +616 -400
  97. package/dist-lib/swift-compile.mjs +528 -315
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +1 -1
  100. package/dist-lib/swift-submit.cjs +2 -2
  101. package/dist-lib/swift-submit.mjs +2 -2
  102. package/dist-lib/swift-toolchain.cjs +105 -17
  103. package/dist-lib/swift.cjs +1 -1
  104. package/dist-lib/vite-swift.cjs +4660 -2252
  105. package/dist-lib/vite.cjs +248 -234
  106. package/dist-lib/worklet-executable.cjs +1 -1
  107. package/dist-lib/worklet-executable.mjs +1 -1
  108. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
  109. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
  110. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  111. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +9 -6
  112. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  113. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +11 -1
  114. package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -12
  115. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  116. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
  117. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  118. package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
  119. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  120. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
  121. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  122. package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
  123. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
  124. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
  126. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +36 -2
  127. package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
  128. package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
  129. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  130. package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
  131. package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
  132. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
  133. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  134. package/kotlin/README.md +3 -0
  135. package/kotlin/sdk.tar.gz +0 -0
  136. package/package.json +1 -1
  137. package/runtime-companion.json +1 -1
  138. package/scripts/dev-server-scanner.ts +12 -25
  139. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  140. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  141. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  142. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  143. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  144. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  145. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  146. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  147. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
  148. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
  149. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
  150. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
  151. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
  152. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
  153. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
  154. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
  155. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
  156. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
  157. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -1
  158. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
  159. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
  160. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
  161. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +711 -46
  162. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
  163. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
  164. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
  165. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
  166. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
  167. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
  168. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
  169. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
  170. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
  171. package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
  172. package/sdk/ios/usr/include/module.modulemap +1 -0
  173. package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
  174. package/sdk/ios/usr/include/os/signpost.h +414 -0
  175. package/sdk/ios/usr/include/os.modulemap +10 -0
  176. package/sdk/ios/usr/include/sys/cdefs.h +5 -0
  177. package/sdk/ios/usr/include/sys/ioccom.h +99 -0
  178. package/sdk/ios/usr/include/sys/syslog.h +236 -0
  179. package/sdk/ios/usr/include/syslog.h +24 -0
  180. package/sdk/ios/wasm/include/errno.h +4 -20
  181. package/sdk/ios/wasm/include/fcntl.h +4 -2
  182. package/sdk/ios/wasm/include/pthread.h +3 -0
  183. package/sdk/ios/wasm/include/setjmp.h +57 -0
  184. package/sdk/ios/wasm/include/stdio.h +24 -0
  185. package/sdk/ios/wasm/include/stdlib.h +32 -7
  186. package/sdk/ios/wasm/include/sys/file.h +7 -0
  187. package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
  188. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  189. package/sdk/ios/wasm/include/sys/syscall.h +9 -0
  190. package/sdk/ios/wasm/include/sys/time.h +10 -0
  191. package/sdk/ios/wasm/include/unistd.h +12 -3
  192. package/sdk/native-hashes.json +4 -3
  193. package/skills/contrast/SKILL.md +2 -1
  194. package/skills/peach-debug/SKILL.md +0 -1
  195. package/skills/peach-perf/SKILL.md +0 -1
  196. package/skills/peach-setup/SKILL.md +0 -1
  197. package/skills/peach-test/SKILL.md +7 -4
  198. package/skills/peach-visual/SKILL.md +0 -1
  199. package/src/admitted-mac-build.ts +3 -0
  200. package/src/android-app-identity.ts +18 -0
  201. package/src/android-autolinking.ts +1 -0
  202. package/src/android-bridge-packages.ts +279 -0
  203. package/src/android-root-module.ts +9 -9
  204. package/src/appPackageContract.ts +83 -0
  205. package/src/bridge-contract.ts +50 -0
  206. package/src/bundle-channel.mjs +41 -6
  207. package/src/cli-runtime.ts +9 -5
  208. package/src/dev-bundle-resolution.ts +7 -27
  209. package/src/dom-source-reference.ts +15 -0
  210. package/src/expo-discovery-cache.ts +134 -26
  211. package/src/expo-kotlin-host.ts +97 -26
  212. package/src/expo-manifest-body.ts +33 -0
  213. package/src/expo-native-workspace.ts +158 -38
  214. package/src/expo-swift-host.ts +350 -75
  215. package/src/expo-swift-ready.ts +5 -1
  216. package/src/expoKotlinContract.ts +12 -2
  217. package/src/expoSwiftContract.ts +10 -0
  218. package/src/generated/swift-c-predefines.json +1 -1
  219. package/src/home-paths.ts +41 -2
  220. package/src/host/app-package-handler.ts +47 -0
  221. package/src/host/bridge-host.ts +8 -0
  222. package/src/host/fetch-proxy-handler.ts +10 -0
  223. package/src/host/staged-host-files.ts +18 -0
  224. package/src/index.ts +3 -0
  225. package/src/kotlin-host.ts +225 -48
  226. package/src/kotlin-instance-source.ts +126 -0
  227. package/src/kotlinSdkContract.ts +2 -1
  228. package/src/menu.ts +14 -0
  229. package/src/native-app-identity-project.ts +7 -2
  230. package/src/native-app-identity.ts +11 -0
  231. package/src/native-firebase-config.ts +24 -1
  232. package/src/native-prebuilt.ts +154 -0
  233. package/src/nitro-adapter.lock.json +270 -270
  234. package/src/nitro-adapter.ts +56 -50
  235. package/src/nitro-bundle.ts +92 -74
  236. package/src/nitro-compile.ts +45 -14
  237. package/src/nitro-dependencies.ts +63 -46
  238. package/src/nitro-source.ts +64 -26
  239. package/src/nitroAdapterContract.ts +146 -98
  240. package/src/nitroContract.ts +71 -21
  241. package/src/react-native-bridge-modules.ts +70 -42
  242. package/src/react-native-host-modules.ts +34 -1
  243. package/src/reactNativeConfigurationContract.ts +14 -0
  244. package/src/reap-browser.ts +15 -3
  245. package/src/sdk.ts +5 -0
  246. package/src/settingsContract.ts +38 -1
  247. package/src/sim-client.ts +4 -1
  248. package/src/storageSnapshotContract.ts +32 -81
  249. package/src/swift-compile.ts +268 -89
  250. package/src/swift-coverage/indexdump.ts +22 -6
  251. package/src/swift-coverage/indexing.ts +4 -4
  252. package/src/swift-coverage/provenance.ts +1 -0
  253. package/src/swift-coverage/sdk.ts +104 -20
  254. package/src/swift-coverage/types.ts +34 -0
  255. package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
  256. package/src/swift-coverage/xcode-assets.ts +89 -131
  257. package/src/swift-coverage/xcode.ts +10 -2
  258. package/src/swift-cxx-reachable.ts +2 -1
  259. package/src/swift-distribution.lock.json +20 -16
  260. package/src/swift-host.ts +98 -22
  261. package/src/swift-icu.ts +1 -1
  262. package/src/swift-link-roots.ts +118 -0
  263. package/src/swift-objc-compile.ts +144 -22
  264. package/src/swift-objc-import.ts +6 -0
  265. package/src/swift-objc-standin.ts +2 -14
  266. package/src/swift-package-manifest.ts +14 -6
  267. package/src/swift-packages.ts +75 -11
  268. package/src/swift-pdf-raster.ts +1 -0
  269. package/src/swift-root-lock.ts +17 -1
  270. package/src/swift-source-pods.ts +2 -10
  271. package/src/swift-standin-emit.ts +597 -57
  272. package/src/swift-standins.ts +599 -56
  273. package/src/swift-submit.ts +7 -1
  274. package/src/swift-toolchain.ts +140 -17
  275. package/src/turbo-bundle.ts +81 -0
  276. package/src/turbo-codegen-intake.ts +91 -0
  277. package/src/turbo-compile.ts +120 -0
  278. package/src/turbo-runtime.lock.json +69 -0
  279. package/src/turbo-source.ts +754 -0
  280. package/src/vite-plugin-one.ts +17 -12
  281. package/src/vite-plugin.ts +28 -15
  282. package/src/xcode-project.ts +223 -22
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1716 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1738 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -36,8 +36,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
 
38
38
  // <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
39
+ var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
39
40
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
40
41
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
42
+ define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "cc658cd5e5521e0d5cadf569f4f271523bee9d710d723479b30487a9e989757f", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "fd93887e807533ae1537c979faba3c7659e84654e8c197180ee48d27bd107612", "swift-coverage/xcode-assets.ts": "f674c68408df22bff2ac80c89467b6cf4018c7e4ada6f2408d7b5f98ee83289d", "swift-coverage/xcode-asset-symbols.ts": "b94c5836f6f11c400c93b931ed0a980b8067d84a5f7a1ee75f24d6bdbf46013d", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "b112ed694771c1df8d9f4dd86691ee83fc9302f05690fae9a5151d0623191b0b", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "d9170f454c21b88b10902e601998b42179b94a8a2018f51f92f9ddafdfcfd8f6", "swift-package.ts": "36c0beef4686796e700a479135c58b1680dc30f73e2b6107891898aa46db33b0", "swift-source-file.ts": "7653751b3edfd63479f733427b6767847de0cd2267715c14dc18d6e5233c3a91", "swift-toolchain.ts": "0e3911c0f285dff280b13730b765eac0423bd026d50d93994366d296ebb3386a", "home-paths.ts": "662171633e6d98202269b7f1f5e99ae15eedb8f1ac15254f5e47a1c5337cf308", "xcode-header-search.ts": "1cfadaf2b1b29fbd72899716fc2469b6b6ca39d6c2b61fee9927fb28668967c5", "xcode-project.ts": "64d7996165ac049f4baa8b04242d4550639c9c5de7d12f61ad0d05f58857d39d", "xcode-target-members.ts": "94e7daaf57b351aa716b2c49e39c5dec8db5377d938a4f16f2d88d9099813c35", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
41
43
  }
42
44
  });
43
45
 
@@ -1169,9 +1171,9 @@ __export(native_app_identity_project_exports, {
1169
1171
  });
1170
1172
  module.exports = __toCommonJS(native_app_identity_project_exports);
1171
1173
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1172
- var import_node_fs4 = __toESM(require("node:fs"), 1);
1174
+ var import_node_fs5 = __toESM(require("node:fs"), 1);
1173
1175
  var import_node_module = require("node:module");
1174
- var import_node_path6 = __toESM(require("node:path"), 1);
1176
+ var import_node_path7 = __toESM(require("node:path"), 1);
1175
1177
 
1176
1178
  // src/android-app-identity.ts
1177
1179
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -1308,6 +1310,13 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
1308
1310
  ...max === void 0 ? {} : { maxSdkVersion: Number(max) }
1309
1311
  });
1310
1312
  }
1313
+ let androidPhotoLibraryAddOnly;
1314
+ for (const element of application.children) {
1315
+ if (element.name !== "meta-data" || element.attributes[`${attribute}name`] !== "one.photoLibrary.addOnly")
1316
+ continue;
1317
+ if (/^(?:true|True|TRUE)$/.test(element.attributes[`${attribute}value`]?.trim() ?? ""))
1318
+ androidPhotoLibraryAddOnly = true;
1319
+ }
1311
1320
  let label = application.attributes[`${attribute}label`];
1312
1321
  let applicationName = null;
1313
1322
  if (label && !/\$\{|^[@?]/.test(label)) applicationName = label;
@@ -1346,7 +1355,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
1346
1355
  buildVersion,
1347
1356
  bundleIdentifier,
1348
1357
  platform: "android",
1349
- androidManifestPermissions
1358
+ androidManifestPermissions,
1359
+ ...androidPhotoLibraryAddOnly === void 0 ? {} : { androidPhotoLibraryAddOnly }
1350
1360
  };
1351
1361
  }
1352
1362
  function androidMergedResourceValuesDirectory(manifestFile) {
@@ -1550,7 +1560,7 @@ function parseOpenStepPlist(text2) {
1550
1560
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1551
1561
  var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
1552
1562
  var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
1553
- function xcodePathResolver(objects, projectDir, join) {
1563
+ function xcodePathResolver(objects, projectDir, join2) {
1554
1564
  const parents = /* @__PURE__ */ new Map();
1555
1565
  for (const [id, entry] of Object.entries(objects)) {
1556
1566
  if (!isDict(entry)) continue;
@@ -1568,11 +1578,11 @@ function xcodePathResolver(objects, projectDir, join) {
1568
1578
  const own = str(entry.path) ?? "";
1569
1579
  const tree = str(entry.sourceTree) ?? "<group>";
1570
1580
  if (tree === "<absolute>") result = own;
1571
- else if (tree === "SOURCE_ROOT") result = join(projectDir, own);
1581
+ else if (tree === "SOURCE_ROOT") result = join2(projectDir, own);
1572
1582
  else if (tree === "<group>") {
1573
1583
  const parent = parents.get(id);
1574
1584
  const base = parent ? resolve(parent) : projectDir;
1575
- if (base !== null) result = join(base, own);
1585
+ if (base !== null) result = join2(base, own);
1576
1586
  }
1577
1587
  }
1578
1588
  paths.set(id, result);
@@ -1580,7 +1590,7 @@ function xcodePathResolver(objects, projectDir, join) {
1580
1590
  };
1581
1591
  return resolve;
1582
1592
  }
1583
- function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join, visit) {
1593
+ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join2, visit) {
1584
1594
  const target = objects[targetId];
1585
1595
  if (!isDict(target)) return;
1586
1596
  for (const phaseId of list(target.buildPhases)) {
@@ -1616,7 +1626,7 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
1616
1626
  for (const relative of list(exception.membershipExceptions))
1617
1627
  exceptions.add(relative);
1618
1628
  }
1619
- const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative) => filesUnder(join(folder, relative)));
1629
+ const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative) => filesUnder(join2(folder, relative)));
1620
1630
  for (const file of members) {
1621
1631
  const relative = file.slice(prefix.length);
1622
1632
  const excepted = [...exceptions].some(
@@ -1992,7 +2002,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
1992
2002
  if (resourceUri) {
1993
2003
  if (!selectedTarget)
1994
2004
  throw new Error("native app icon target membership is unresolved");
1995
- const join = (base, own) => {
2005
+ const join2 = (base, own) => {
1996
2006
  const segments = [];
1997
2007
  for (const segment of `${base}/${own}`.split("/")) {
1998
2008
  if (segment === "" || segment === ".") continue;
@@ -2005,7 +2015,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2005
2015
  const project = Object.values(objects).find(
2006
2016
  (object) => isRecord(object) && object.isa === "PBXProject"
2007
2017
  );
2008
- const projectDir = join(
2018
+ const projectDir = join2(
2009
2019
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
2010
2020
  isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
2011
2021
  );
@@ -2013,7 +2023,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2013
2023
  visitXcodeTargetMembers(
2014
2024
  objects,
2015
2025
  selectedTarget.id,
2016
- xcodePathResolver(objects, projectDir, join),
2026
+ xcodePathResolver(objects, projectDir, join2),
2017
2027
  (file) => {
2018
2028
  if (Object.hasOwn(files, file)) return [file];
2019
2029
  const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
@@ -2021,7 +2031,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2021
2031
  (path7) => path7.startsWith(prefix) && !/(?:^|\/)\./.test(path7.slice(prefix.length))
2022
2032
  );
2023
2033
  },
2024
- join,
2034
+ join2,
2025
2035
  (file, kind) => {
2026
2036
  if (kind === "resource") resources.add(file);
2027
2037
  }
@@ -2123,18 +2133,213 @@ function parsePlistSource(source) {
2123
2133
  // src/xcode-project.ts
2124
2134
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2125
2135
  var import_node_child_process2 = require("node:child_process");
2126
- var import_node_crypto = require("node:crypto");
2127
- var import_node_fs3 = __toESM(require("node:fs"), 1);
2128
- var import_node_path5 = __toESM(require("node:path"), 1);
2136
+ var import_node_crypto2 = require("node:crypto");
2137
+ var import_node_fs4 = __toESM(require("node:fs"), 1);
2138
+ var import_node_path6 = __toESM(require("node:path"), 1);
2129
2139
  var import_plist2 = __toESM(require("plist"), 1);
2130
2140
 
2131
2141
  // src/swift-coverage/xcode-assets.ts
2132
2142
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2133
- var assetSymbolSettingKeys = [
2134
- "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
2135
- "ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
2136
- "PRODUCT_BUNDLE_IDENTIFIER",
2137
- "TARGETED_DEVICE_FAMILY",
2143
+
2144
+ // src/swift-coverage/provenance.ts
2145
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2146
+ var import_node_crypto = require("node:crypto");
2147
+ var import_node_fs = require("node:fs");
2148
+ var import_node_path = require("node:path");
2149
+ var SWIFT_COVERAGE_DIGEST_SOURCES = [
2150
+ "swift-coverage/indexdump.ts",
2151
+ "swift-coverage/indexing.ts",
2152
+ "swift-coverage/types.ts",
2153
+ "swift-coverage/source.ts",
2154
+ "swift-coverage/package.ts",
2155
+ "swift-coverage/xcode.ts",
2156
+ "swift-coverage/xcode-assets.ts",
2157
+ "swift-coverage/xcode-asset-symbols.ts",
2158
+ "swift-coverage/xcode-bridging.ts",
2159
+ "swift-coverage/xcode-packages.ts",
2160
+ "swift-coverage/xcode-strings.ts",
2161
+ "swift-coverage/reader.ts",
2162
+ "swift-coverage/provenance.ts",
2163
+ "swift-package-manifest.ts",
2164
+ "swift-package.ts",
2165
+ "swift-source-file.ts",
2166
+ "swift-toolchain.ts",
2167
+ "home-paths.ts",
2168
+ "xcode-header-search.ts",
2169
+ "xcode-project.ts",
2170
+ "xcode-target-members.ts",
2171
+ "xcode-json-project.ts",
2172
+ "openstep-plist.ts"
2173
+ ];
2174
+ function swiftCoverageSourceDigests(srcDir) {
2175
+ return Object.fromEntries(
2176
+ SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
2177
+ file,
2178
+ (0, import_node_crypto.createHash)("sha256").update((0, import_node_fs.readFileSync)((0, import_node_path.join)(srcDir, file))).digest("hex")
2179
+ ])
2180
+ );
2181
+ }
2182
+ var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
2183
+
2184
+ // src/swift-coverage/xcode-asset-symbols.ts
2185
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2186
+ var silentTypes = /* @__PURE__ */ new Set([
2187
+ "appiconset",
2188
+ "brandassets",
2189
+ "dataset",
2190
+ "iconset",
2191
+ "iconstack",
2192
+ "iconstackgroup",
2193
+ "launchimage",
2194
+ "stickerpack",
2195
+ "stickersiconset",
2196
+ "textureset"
2197
+ ]);
2198
+ var stackTypes = /* @__PURE__ */ new Set(["imagestack", "solidimagestack"]);
2199
+ var unprovenTypes = /* @__PURE__ */ new Set([
2200
+ "arobject",
2201
+ "arreferenceimage",
2202
+ "arresourcegroup",
2203
+ "complicationset",
2204
+ "cubetextureset",
2205
+ "gcdashboardimage",
2206
+ "gcleaderboard",
2207
+ "gcleaderboardset",
2208
+ "glyphset",
2209
+ "iconbadgeset",
2210
+ "iconstacklayer",
2211
+ "imagestacklayer",
2212
+ "mipmapset",
2213
+ "modelset",
2214
+ "sidebariconset",
2215
+ "solidimagestacklayer",
2216
+ "sticker",
2217
+ "stickerframeset",
2218
+ "stickersequence"
2219
+ ]);
2220
+ var knownTypes = /* @__PURE__ */ new Set([
2221
+ "colorset",
2222
+ "imageset",
2223
+ "symbolset",
2224
+ "spriteatlas",
2225
+ ...silentTypes,
2226
+ ...stackTypes,
2227
+ ...unprovenTypes
2228
+ ]);
2229
+ var compressionTypes = [
2230
+ "automatic",
2231
+ "lossless",
2232
+ "lossy",
2233
+ "gpu-optimized-best",
2234
+ "gpu-optimized-smallest"
2235
+ ];
2236
+ var renditionRules = {
2237
+ appearances: "objects",
2238
+ locale: "string",
2239
+ platform: "string",
2240
+ resizing: "object",
2241
+ "alignment-insets": "object",
2242
+ "compression-type": compressionTypes,
2243
+ "display-gamut": ["sRGB", "display-P3"],
2244
+ "minimum-system-version": "string",
2245
+ "matching-style": "string",
2246
+ "template-rendering-intent": "string",
2247
+ size: "string",
2248
+ role: "string",
2249
+ orientation: "string",
2250
+ extent: "string"
2251
+ };
2252
+ var setRules = {
2253
+ localizable: "any",
2254
+ "auto-scaling": "string",
2255
+ "symbol-rendering-intent": "string",
2256
+ "provides-namespace": "any",
2257
+ "on-demand-resource-tags": "any",
2258
+ "template-rendering-intent": "string",
2259
+ "preserves-vector-representation": "any"
2260
+ };
2261
+ var inclusionRules = {
2262
+ idiom: "any",
2263
+ subtype: "any",
2264
+ unassigned: "any"
2265
+ };
2266
+ var rules = {
2267
+ // colors check none of the image traits
2268
+ colorset: {
2269
+ entry: {
2270
+ ...renditionRules,
2271
+ ...inclusionRules,
2272
+ color: "any",
2273
+ scale: "string",
2274
+ "language-direction": "string",
2275
+ "width-class": "string",
2276
+ "height-class": "string",
2277
+ memory: "string",
2278
+ "graphics-feature-set": "string",
2279
+ "screen-width": "string"
2280
+ },
2281
+ set: setRules
2282
+ },
2283
+ imageset: {
2284
+ entry: {
2285
+ ...renditionRules,
2286
+ ...inclusionRules,
2287
+ filename: "any",
2288
+ scale: ["1x", "2x", "3x"],
2289
+ "language-direction": ["left-to-right", "right-to-left"],
2290
+ "width-class": ["compact", "regular", "unspecified"],
2291
+ "height-class": ["compact", "regular"],
2292
+ memory: ["1GB", "2GB", "3GB", "4GB", "6GB", "8GB", "12GB", "16GB"],
2293
+ "graphics-feature-set": [
2294
+ ...Array.from({ length: 10 }, (_, i) => `apple${i + 1}`),
2295
+ "metal1v2",
2296
+ "metal2v2",
2297
+ "metal3v1",
2298
+ "metal3v2",
2299
+ "metal4v1"
2300
+ ],
2301
+ "screen-width": "string"
2302
+ },
2303
+ // an image whose vector flag is not a boolean is dropped
2304
+ set: {
2305
+ ...setRules,
2306
+ "preserves-vector-representation": "boolean",
2307
+ "compression-type": compressionTypes
2308
+ }
2309
+ },
2310
+ symbolset: {
2311
+ entry: { idiom: "any", filename: "any" },
2312
+ set: { "symbol-rendering-intent": "any" }
2313
+ }
2314
+ };
2315
+ var swiftKeywords = new Set(
2316
+ "precedencegroup associatedtype fileprivate fallthrough extension typealias subscript continue internal Protocol protocol operator rethrows private default public static switch return throws repeat struct deinit import guard while where false catch break defer super class inout throw func Type case else true Self self enum init nil var for let Any try if in do as is _".split(
2317
+ " "
2318
+ )
2319
+ );
2320
+ var nsColorConflicts = new Set(
2321
+ "unemphasizedSelectedContentBackgroundColor unemphasizedSelectedTextBackgroundColor controlAlternatingRowBackgroundColors alternatingContentBackgroundColors systemColorsDidChangeNotification alternateSelectedControlTextColor selectedContentBackgroundColor alternateSelectedControlColor secondarySelectedControlColor unemphasizedSelectedTextColor selectedTextBackgroundColor keyboardFocusIndicatorColor scrubberTexturedBackground controlLightHighlightColor selectedMenuItemTextColor underPageBackgroundColor disabledControlTextColor selectedControlTextColor controlBackgroundColor controlDarkShadowColor windowBackgroundColor selectedMenuItemColor controlHighlightColor quaternaryLabelColor selectedControlColor windowFrameTextColor placeholderTextColor textBackgroundColor secondaryLabelColor tertiaryLabelColor findHighlightColor controlAccentColor controlShadowColor currentControlTint selectedKnobColor selectedTextColor windowFrameColor controlTextColor headerTextColor scrollBarColor separatorColor highlightColor ignoresAlpha systemOrange systemPurple systemIndigo controlColor systemYellow systemGreen systemBrown headerColor shadowColor systemBlue systemPink systemTeal systemCyan labelColor systemMint systemGray systemRed knobColor gridColor linkColor textColor lightGray darkGray magenta orange purple yellow white black green brown clear blue cyan gray red".split(
2322
+ " "
2323
+ )
2324
+ );
2325
+ var uiColorConflicts = new Set(
2326
+ "secondarySystemGroupedBackground tertiarySystemGroupedBackground secondarySystemBackground tertiarySystemBackground groupTableViewBackground systemGroupedBackground quaternarySystemFill smallSystemFontSize secondarySystemFill tertiarySystemFill systemBackground quaternaryLabel opaqueSeparator placeholderText systemFontSize buttonFontSize secondaryLabel labelFontSize tertiaryLabel systemOrange systemPurple systemIndigo systemYellow systemGray2 systemGray3 systemGray4 systemGray5 systemGray6 systemGreen systemBrown systemBlue systemPink systemTeal systemFill systemCyan systemMint systemGray systemRed tintColor separator lightText lightGray darkText darkGray magenta orange purple yellow white black label green brown clear blue link cyan gray red".split(
2327
+ " "
2328
+ )
2329
+ );
2330
+ var colorConflicts = new Set(
2331
+ "transferRepresentation accentColor secondary primary orange purple indigo yellow white black green brown clear blue pink teal cyan mint gray red".split(
2332
+ " "
2333
+ )
2334
+ );
2335
+ var nsImageConflicts = new Set(
2336
+ "touchBarAudioOutputVolumeMediumTemplateName touchBarAudioOutputVolumeHighTemplateName touchBarAudioOutputVolumeOffTemplateName touchBarAudioOutputVolumeLowTemplateName touchBarTextJustifiedAlignTemplateName touchBarCommunicationVideoTemplateName touchBarCommunicationAudioTemplateName touchBarSkipAhead30SecondsTemplateName touchBarSkipAhead15SecondsTemplateName touchBarTextStrikethroughTemplateName touchBarSkipBack30SecondsTemplateName touchBarSkipBack15SecondsTemplateName stopProgressFreestandingTemplateName touchBarAudioOutputMuteTemplateName invalidDataFreestandingTemplateName touchBarEnterFullScreenTemplateName touchBarTextCenterAlignTemplateName touchBarAudioInputMuteTemplateName followLinkFreestandingTemplateName touchBarExitFullScreenTemplateName touchBarTextRightAlignTemplateName touchBarTextUnderlineTemplateName touchBarTextLeftAlignTemplateName touchBarOpenInBrowserTemplateName touchBarFolderMoveToTemplateName touchBarFolderCopyToTemplateName touchBarFastForwardTemplateName rightFacingTriangleTemplateName refreshFreestandingTemplateName touchBarRotateRightTemplateName touchBarRecordStartTemplateName touchBarSkipToStartTemplateName touchBarTextItalicTemplateName touchBarNewMessageTemplateName leftFacingTriangleTemplateName revealFreestandingTemplateName touchBarVolumeDownTemplateName touchBarRecordStopTemplateName touchBarRotateLeftTemplateName touchBarAudioInputTemplateName touchBarColorPickerStrokeName touchBarSkipAheadTemplateName touchBarSkipToEndTemplateName touchBarGoForwardTemplateName touchBarPlayPauseTemplateName touchBarQuickLookTemplateName touchBarAddDetailTemplateName touchBarUserGroupTemplateName touchBarNewFolderTemplateName touchBarBookmarksTemplateName touchBarSlideshowTemplateName statusPartiallyAvailableName touchBarPlayheadTemplateName touchBarDownloadTemplateName touchBarTextBoldTemplateName touchBarSkipBackTemplateName touchBarVolumeUpTemplateName touchBarTextListTemplateName touchBarIconViewTemplateName touchBarListViewTemplateName touchBarUserAddTemplateName touchBarComposeTemplateName touchBarRefreshTemplateName enterFullScreenTemplateName touchBarTagIconTemplateName touchBarGetInfoTemplateName touchBarSidebarTemplateName touchBarTextBoxTemplateName touchBarHistoryTemplateName touchBarColorPickerFillName touchBarColorPickerFontName touchBarRewindTemplateName menuMixedStateTemplateName touchBarDeleteTemplateName touchBarRemoveTemplateName touchBarSearchTemplateName touchBarGoBackTemplateName exitFullScreenTemplateName touchBarGoDownTemplateName touchBarFolderTemplateName touchBarShareTemplateName touchBarPauseTemplateName touchBarAlarmTemplateName lockUnlockedTemplateName touchBarMailTemplateName touchBarGoUpTemplateName touchBarUserTemplateName iChatTheaterTemplateName stopProgressTemplateName touchBarPlayTemplateName touchBarAddTemplateName menuOnStateTemplateName lockLockedTemplateName smartBadgeTemplateName columnViewTemplateName preferencesGeneralName statusUnavailableName goForwardTemplateName bluetoothTemplateName quickLookTemplateName bookmarksTemplateName slideshowTemplateName multipleDocumentsName iconViewTemplateName listViewTemplateName flowViewTemplateName imageUnfilteredTypes statusAvailableName refreshTemplateName goRightTemplateName applicationIconName folderBurnableName removeTemplateName goBackTemplateName actionTemplateName goLeftTemplateName shareTemplateName homeTemplateName pathTemplateName userAccountsName addTemplateName folderSmartName statusNoneName colorPanelName trashEmptyName fontPanelName trashFullName userGroupName userGuestName advancedName mobileMeName everyoneName computerName networkName cautionName bonjourName folderName imageTypes infoName userName".split(
2337
+ " "
2338
+ )
2339
+ );
2340
+
2341
+ // src/swift-coverage/xcode-assets.ts
2342
+ var unprovenAssetSettings = [
2138
2343
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
2139
2344
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
2140
2345
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_ERRORS",
@@ -2143,10 +2348,16 @@ var assetSymbolSettingKeys = [
2143
2348
  "ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH",
2144
2349
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_INDEX_PATH",
2145
2350
  "ASSETCATALOG_COMPILER_BUNDLE_IDENTIFIER",
2146
- "ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE",
2351
+ "ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
2352
+ ];
2353
+ var assetSymbolSettingKeys = [
2354
+ "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
2355
+ "ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
2356
+ "PRODUCT_BUNDLE_IDENTIFIER",
2357
+ "TARGETED_DEVICE_FAMILY",
2358
+ ...unprovenAssetSettings,
2147
2359
  "ASSETCATALOG_OTHER_FLAGS"
2148
2360
  ];
2149
- var unprovenAssetSettings = assetSymbolSettingKeys.slice(4).filter((key) => key !== "ASSETCATALOG_OTHER_FLAGS");
2150
2361
 
2151
2362
  // src/swift-package.ts
2152
2363
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -2194,40 +2405,52 @@ function swiftPackageIdentity(url) {
2194
2405
  // src/swift-package-manifest.ts
2195
2406
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2196
2407
  var import_node_child_process = require("node:child_process");
2197
- var import_node_fs2 = __toESM(require("node:fs"), 1);
2408
+ var import_node_fs3 = __toESM(require("node:fs"), 1);
2198
2409
  var import_node_os3 = __toESM(require("node:os"), 1);
2199
- var import_node_path3 = __toESM(require("node:path"), 1);
2410
+ var import_node_path4 = __toESM(require("node:path"), 1);
2200
2411
 
2201
2412
  // src/home-paths.ts
2202
2413
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2203
2414
  var import_node_os = require("node:os");
2204
- var import_node_path = __toESM(require("node:path"), 1);
2415
+ var import_node_path2 = __toESM(require("node:path"), 1);
2205
2416
  var PEACH_HOME_ENV = "PEACH_HOME";
2417
+ function ambientHomeDir() {
2418
+ return import_node_path2.default.join((0, import_node_os.homedir)(), ".peach");
2419
+ }
2206
2420
  function rnxHomeDir() {
2207
2421
  const override = process.env[PEACH_HOME_ENV];
2208
- if (override && override.length > 0) return import_node_path.default.resolve(override);
2209
- return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
2422
+ if (override && override.length > 0) return import_node_path2.default.resolve(override);
2423
+ return ambientHomeDir();
2210
2424
  }
2211
2425
  function cacheDir() {
2212
- return import_node_path.default.join(rnxHomeDir(), "cache");
2426
+ return import_node_path2.default.join(rnxHomeDir(), "cache");
2427
+ }
2428
+ var BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
2429
+ function buildersRootEnv() {
2430
+ const root = process.env[BUILDERS_ROOT_ENV]?.trim();
2431
+ return root ? root : null;
2432
+ }
2433
+ function swiftCacheDir() {
2434
+ const root = buildersRootEnv();
2435
+ return root ? import_node_path2.default.join(root, "peach-cache") : cacheDir();
2213
2436
  }
2214
2437
  function swiftPackageCacheOptions() {
2215
- const root = import_node_path.default.join(cacheDir(), "swiftpm");
2438
+ const root = import_node_path2.default.join(swiftCacheDir(), "swiftpm");
2216
2439
  return ["cache", "config", "security"].flatMap((name) => [
2217
2440
  `--${name}-path`,
2218
- import_node_path.default.join(root, name)
2441
+ import_node_path2.default.join(root, name)
2219
2442
  ]);
2220
2443
  }
2221
2444
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
2222
2445
 
2223
2446
  // src/swift-distribution.lock.json
2224
2447
  var swift_distribution_lock_default = {
2225
- id: "d2c6d715951f5e98",
2226
- release: "swift-6.4.0-RELEASE-custom-ecd2ad9d3fe59329",
2227
- wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-cbf01f4b",
2228
- wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-cbf01f4b.artifactbundle.tar.gz",
2229
- wasmSdkChecksum: "2243db65b12743d577fecc6aa27761363ccef470202f1fef2582e58750c0da4f",
2230
- source: "723697c8df030077d06e7e760259e494f6a1c5a8",
2448
+ id: "c1636d7b2e11fc76",
2449
+ release: "swift-6.4.0-RELEASE-custom-81b2c791c27276bf",
2450
+ wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-b26c1c1d",
2451
+ wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-b26c1c1d.artifactbundle.tar.gz",
2452
+ wasmSdkChecksum: "d3bec118d62c1015e0a2b30e0f09b8fab25613d0ac98e0dee31e68c5521bc747",
2453
+ source: "94f583e01ad78e91cc0908a829b83ab756ac6a12",
2231
2454
  targets: [
2232
2455
  "ImagePlayground",
2233
2456
  "QuickLookThumbnailing",
@@ -2238,6 +2461,7 @@ var swift_distribution_lock_default = {
2238
2461
  "GeoToolbox",
2239
2462
  "DataDetection",
2240
2463
  "Accessibility",
2464
+ "Accounts",
2241
2465
  "Contacts",
2242
2466
  "CoreML",
2243
2467
  "EventKit",
@@ -2267,6 +2491,7 @@ var swift_distribution_lock_default = {
2267
2491
  "PeachFoundation",
2268
2492
  "FoundationNetworking",
2269
2493
  "DeveloperToolsSupport",
2494
+ "CoreImageEnums",
2270
2495
  "SwiftUI",
2271
2496
  "DarwinRecords",
2272
2497
  "Darwin",
@@ -2376,6 +2601,7 @@ var swift_distribution_lock_default = {
2376
2601
  "FoundationModels",
2377
2602
  "CoreTransferable",
2378
2603
  "AudioToolbox",
2604
+ "MediaToolbox",
2379
2605
  "CoreAudioTypes",
2380
2606
  "AudioUnit",
2381
2607
  "Intents",
@@ -2398,11 +2624,13 @@ var swift_distribution_lock_default = {
2398
2624
  ],
2399
2625
  systemEnvironment: {
2400
2626
  scenePhase: ["string:active", "string:inactive", "string:background"],
2401
- colorScheme: ["string:light", "string:dark"],
2402
- semanticColors: ["object"],
2403
2627
  deviceModel: ["string"],
2404
2628
  systemName: ["string"],
2405
2629
  systemVersion: ["string"],
2630
+ screenMetrics: ["array"],
2631
+ colorScheme: ["string:light", "string:dark"],
2632
+ semanticColors: ["object"],
2633
+ imageAssets: ["object"],
2406
2634
  locale: ["string"],
2407
2635
  dynamicTypeSize: [
2408
2636
  "string:xSmall",
@@ -2418,51 +2646,88 @@ var swift_distribution_lock_default = {
2418
2646
  "string:accessibility4",
2419
2647
  "string:accessibility5"
2420
2648
  ],
2421
- accessibilityReduceMotion: ["bool"],
2422
2649
  horizontalSizeClass: ["string:compact", "string:regular"],
2423
2650
  verticalSizeClass: ["string:compact", "string:regular"],
2424
- imageAssets: ["object"]
2651
+ accessibilityReduceMotion: ["bool"]
2425
2652
  },
2426
2653
  hosts: {
2427
2654
  "darwin-arm64": {
2428
- sha256: "3b47173dfa25473dfc3c76e46b1203efdc7c2101eca02eb6c89692d66561e78e",
2429
- size: 81210958
2655
+ sha256: "80c62efc0a94a3cd8e6aa69c5fc4e6af3f2ceae1287623709e28dc9ae3a0761c",
2656
+ size: 89408081
2430
2657
  },
2431
2658
  "linux-x64": {
2432
- sha256: "d11f5fe29845064c390ec980c641c6a70b0199a7f5b6cd445ddc362ff5a2394f",
2433
- size: 81209921
2659
+ sha256: "373b6d83663204d3a5e185367695b0e93e60d4d7f501277fc5644e2928039c2a",
2660
+ size: 92125337
2434
2661
  },
2435
2662
  "linux-arm64": {
2436
- sha256: "df9ab4453985dbbaf335610f6ab62a15f6f63175869dd484f359b702f316dfac",
2437
- size: 81209987
2663
+ sha256: "86297691a209a83adda674d397ec26d5284e7c283c30f60b4dcd13329ded7b94",
2664
+ size: 91619555
2438
2665
  }
2439
2666
  }
2440
2667
  };
2441
2668
 
2442
2669
  // src/swift-toolchain.ts
2443
2670
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2444
- var import_node_fs = __toESM(require("node:fs"), 1);
2671
+ var import_node_fs2 = __toESM(require("node:fs"), 1);
2445
2672
  var import_node_os2 = __toESM(require("node:os"), 1);
2446
- var import_node_path2 = __toESM(require("node:path"), 1);
2673
+ var import_node_path3 = __toESM(require("node:path"), 1);
2674
+ var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
2675
+ var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
2676
+ var compilerArchives = {
2677
+ "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
2678
+ identity: "0b2d0a9011c88e66",
2679
+ hosts: {
2680
+ "darwin-arm64": {
2681
+ checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
2682
+ manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
2683
+ },
2684
+ "linux-x64": {
2685
+ checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
2686
+ manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
2687
+ },
2688
+ "linux-arm64": {
2689
+ checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
2690
+ manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
2691
+ }
2692
+ }
2693
+ },
2694
+ [SWIFT_HOST_COMPILER_RELEASE]: {
2695
+ identity: SWIFT_HOST_COMPILER_ID,
2696
+ hosts: {
2697
+ "darwin-arm64": {
2698
+ checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
2699
+ manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
2700
+ },
2701
+ "linux-x64": {
2702
+ checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
2703
+ manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
2704
+ },
2705
+ "linux-arm64": {
2706
+ checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
2707
+ manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
2708
+ }
2709
+ }
2710
+ }
2711
+ };
2447
2712
  function swiftToolchainBin(release) {
2448
2713
  if (process.platform === "darwin") {
2449
2714
  const dirs = [import_node_os2.default.homedir(), "/"].map(
2450
- (base) => import_node_path2.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
2715
+ (base) => import_node_path3.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
2451
2716
  );
2452
- return dirs.find((dir) => import_node_fs.default.existsSync(import_node_path2.default.join(dir, "swift"))) ?? dirs[0];
2717
+ return dirs.find((dir) => import_node_fs2.default.existsSync(import_node_path3.default.join(dir, "swift"))) ?? dirs[0];
2453
2718
  }
2454
2719
  if (process.env.CONTRAST_SWIFT_TOOLCHAINS) {
2455
- return import_node_path2.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
2720
+ return import_node_path3.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
2456
2721
  }
2457
- const image = import_node_path2.default.join("/opt/swift", release, "usr/bin");
2458
- if (import_node_fs.default.existsSync(import_node_path2.default.join(image, "swift"))) return image;
2722
+ const image = import_node_path3.default.join("/opt/swift", release, "usr/bin");
2723
+ if (import_node_fs2.default.existsSync(import_node_path3.default.join(image, "swift"))) return image;
2459
2724
  if (release.includes("-custom-"))
2460
- return import_node_path2.default.join(peachHome(), "swift", "toolchains", release, "usr/bin");
2461
- return (process.env.PATH ?? "").split(import_node_path2.default.delimiter).find((dir) => dir && import_node_fs.default.existsSync(import_node_path2.default.join(dir, "swift"))) ?? image;
2725
+ return import_node_path3.default.join(peachHome(), "swift", "toolchains", release, "usr/bin");
2726
+ return (process.env.PATH ?? "").split(import_node_path3.default.delimiter).find((dir) => dir && import_node_fs2.default.existsSync(import_node_path3.default.join(dir, "swift"))) ?? image;
2462
2727
  }
2463
2728
  function peachHome() {
2464
2729
  const override = process.env.PEACH_HOME;
2465
- return override ? import_node_path2.default.resolve(override) : import_node_path2.default.join(import_node_os2.default.homedir(), ".peach");
2730
+ return override ? import_node_path3.default.resolve(override) : import_node_path3.default.join(import_node_os2.default.homedir(), ".peach");
2466
2731
  }
2467
2732
  var scratch;
2468
2733
  function swiftEnvironment(base = process.env) {
@@ -2470,18 +2735,23 @@ function swiftEnvironment(base = process.env) {
2470
2735
  return {
2471
2736
  ...base,
2472
2737
  TMPDIR: scratch.directory,
2473
- XDG_CONFIG_HOME: import_node_path2.default.join(scratch.home, ".config"),
2474
- XDG_CACHE_HOME: import_node_path2.default.join(scratch.home, ".cache"),
2475
- XDG_DATA_HOME: import_node_path2.default.join(scratch.home, ".local", "share"),
2738
+ XDG_CONFIG_HOME: import_node_path3.default.join(scratch.home, ".config"),
2739
+ XDG_CACHE_HOME: import_node_path3.default.join(scratch.home, ".cache"),
2740
+ XDG_DATA_HOME: import_node_path3.default.join(scratch.home, ".local", "share"),
2476
2741
  ...process.platform === "linux" ? { HOME: scratch.home } : {}
2477
2742
  };
2478
2743
  }
2479
2744
 
2480
2745
  // src/swift-package-manifest.ts
2481
2746
  function swiftCommand() {
2482
- return import_node_path3.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
2747
+ return import_node_path4.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
2748
+ }
2749
+ function swiftPackageFailure(error) {
2750
+ if (!(error instanceof Error)) return String(error);
2751
+ const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
2752
+ return stderr || error.message;
2483
2753
  }
2484
- var cacheDir2 = import_node_path3.default.join(cacheDir(), "swift-manifests");
2754
+ var cacheDir2 = import_node_path4.default.join(cacheDir(), "swift-manifests");
2485
2755
  var requirementClause = (item) => {
2486
2756
  const url = JSON.stringify(item.url);
2487
2757
  const requirement = item.requirement;
@@ -2521,9 +2791,9 @@ let package = Package(
2521
2791
  ]
2522
2792
  )
2523
2793
  `;
2524
- const dir = import_node_fs2.default.mkdtempSync(import_node_path3.default.join(import_node_os3.default.tmpdir(), "peach-resolve-"));
2794
+ const dir = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(import_node_os3.default.tmpdir(), "peach-resolve-"));
2525
2795
  try {
2526
- import_node_fs2.default.writeFileSync(import_node_path3.default.join(dir, "Package.swift"), manifest);
2796
+ import_node_fs3.default.writeFileSync(import_node_path4.default.join(dir, "Package.swift"), manifest);
2527
2797
  try {
2528
2798
  (0, import_node_child_process.execFileSync)(
2529
2799
  swiftCommand(),
@@ -2533,7 +2803,7 @@ let package = Package(
2533
2803
  "--package-path",
2534
2804
  dir,
2535
2805
  "--scratch-path",
2536
- import_node_path3.default.join(dir, ".build"),
2806
+ import_node_path4.default.join(dir, ".build"),
2537
2807
  "resolve"
2538
2808
  ],
2539
2809
  {
@@ -2544,24 +2814,24 @@ let package = Package(
2544
2814
  }
2545
2815
  );
2546
2816
  } catch (error) {
2547
- const stderr = error instanceof Error && "stderr" in error ? String(error.stderr).trim() : "";
2548
2817
  throw new Error(
2549
- `swiftpm could not resolve ${clauses.length} package requirements${stderr ? `: ${stderr}` : ""}`
2818
+ `swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
2819
+ { cause: error }
2550
2820
  );
2551
2821
  }
2552
- const resolved = import_node_path3.default.join(dir, "Package.resolved");
2553
- if (!import_node_fs2.default.existsSync(resolved))
2822
+ const resolved = import_node_path4.default.join(dir, "Package.resolved");
2823
+ if (!import_node_fs3.default.existsSync(resolved))
2554
2824
  throw new Error("swift package resolve wrote no Package.resolved");
2555
- import_node_fs2.default.mkdirSync(import_node_path3.default.dirname(destination), { recursive: true });
2556
- import_node_fs2.default.copyFileSync(resolved, destination);
2825
+ import_node_fs3.default.mkdirSync(import_node_path4.default.dirname(destination), { recursive: true });
2826
+ import_node_fs3.default.copyFileSync(resolved, destination);
2557
2827
  } finally {
2558
- import_node_fs2.default.rmSync(dir, { recursive: true, force: true });
2828
+ import_node_fs3.default.rmSync(dir, { recursive: true, force: true });
2559
2829
  }
2560
2830
  }
2561
2831
 
2562
2832
  // src/xcode-json-project.ts
2563
2833
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2564
- var import_node_path4 = __toESM(require("node:path"), 1);
2834
+ var import_node_path5 = __toESM(require("node:path"), 1);
2565
2835
  var import_json5 = __toESM(require_lib(), 1);
2566
2836
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
2567
2837
  var text = (value) => typeof value === "string" ? value : void 0;
@@ -2619,7 +2889,7 @@ var PHASE_ISA = {
2619
2889
  function readXcodeJsonProject(xcodeproj, source) {
2620
2890
  const json = import_json5.default.parse(source);
2621
2891
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
2622
- const projectDir = import_node_path4.default.dirname(xcodeproj);
2892
+ const projectDir = import_node_path5.default.dirname(xcodeproj);
2623
2893
  const objects = {};
2624
2894
  let next = 0;
2625
2895
  const add = (entry, id) => {
@@ -2632,7 +2902,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2632
2902
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
2633
2903
  if (base) {
2634
2904
  if (base[1] === "PROJECT")
2635
- return { sourceTree: "<absolute>", path: import_node_path4.default.join(projectDir, base[2]) };
2905
+ return { sourceTree: "<absolute>", path: import_node_path5.default.join(projectDir, base[2]) };
2636
2906
  if (base[1] === "PRODUCTS")
2637
2907
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
2638
2908
  return null;
@@ -2640,7 +2910,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2640
2910
  const unescaped = raw.replaceAll("\\<", "<");
2641
2911
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
2642
2912
  if (unescaped.startsWith("~")) return null;
2643
- return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path4.default.join(groupDir, unescaped) };
2913
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path5.default.join(groupDir, unescaped) };
2644
2914
  };
2645
2915
  const memberships = [];
2646
2916
  const folders = [];
@@ -2651,7 +2921,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2651
2921
  const kind = text(entry.kind) ?? "file-reference";
2652
2922
  const raw = text(entry.path) ?? "";
2653
2923
  const located = raw === "" ? null : locate(raw, parent.dir);
2654
- const name = text(entry.name) ?? import_node_path4.default.basename(raw);
2924
+ const name = text(entry.name) ?? import_node_path5.default.basename(raw);
2655
2925
  const node = { id: "", name, dir: null, parent, children: [] };
2656
2926
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
2657
2927
  node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -2772,7 +3042,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2772
3042
  if (!isObject(entry)) continue;
2773
3043
  const repository = text(entry.repository);
2774
3044
  const local = text(entry.path);
2775
- const name = local !== void 0 ? import_node_path4.default.basename(import_node_path4.default.resolve(import_node_path4.default.dirname(xcodeproj), local)) : import_node_path4.default.basename(repository ?? "").replace(/\.git$/, "");
3045
+ const name = local !== void 0 ? import_node_path5.default.basename(import_node_path5.default.resolve(import_node_path5.default.dirname(xcodeproj), local)) : import_node_path5.default.basename(repository ?? "").replace(/\.git$/, "");
2776
3046
  const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
2777
3047
  isa: "XCRemoteSwiftPackageReference",
2778
3048
  repositoryURL: repository ?? "",
@@ -2947,7 +3217,23 @@ function isJsonObject(value) {
2947
3217
 
2948
3218
  // src/xcode-project.ts
2949
3219
  var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
3220
+ var CXX_STANDARD_ALIASES = {
3221
+ "c++0x": "c++11",
3222
+ "gnu++0x": "gnu++11"
3223
+ };
3224
+ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
3225
+ "c++98",
3226
+ "gnu++98",
3227
+ "c++0x",
3228
+ "gnu++0x",
3229
+ "c++14",
3230
+ "gnu++14",
3231
+ "c++17",
3232
+ "gnu++17",
3233
+ "compiler-default"
3234
+ ]);
2950
3235
  var APPLICATION = "com.apple.product-type.application";
3236
+ var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
2951
3237
  var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
2952
3238
  "com.apple.product-type.framework",
2953
3239
  "com.apple.product-type.framework.static"
@@ -2965,28 +3251,28 @@ var CONDITIONS = {
2965
3251
  variant: "normal"
2966
3252
  };
2967
3253
  function walkFiles(dir) {
2968
- if (!import_node_fs3.default.existsSync(dir)) return [];
3254
+ if (!import_node_fs4.default.existsSync(dir)) return [];
2969
3255
  const out = [];
2970
- for (const entry of import_node_fs3.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
3256
+ for (const entry of import_node_fs4.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
2971
3257
  if (entry.name.startsWith(".")) continue;
2972
- const full = import_node_path5.default.join(dir, entry.name);
3258
+ const full = import_node_path6.default.join(dir, entry.name);
2973
3259
  if (entry.isDirectory()) out.push(...walkFiles(full));
2974
3260
  else if (entry.isFile()) out.push(full);
2975
3261
  }
2976
3262
  return out;
2977
3263
  }
2978
- var isDirectory = (dir) => import_node_fs3.default.existsSync(dir) && import_node_fs3.default.statSync(dir).isDirectory();
3264
+ var isDirectory = (dir) => import_node_fs4.default.existsSync(dir) && import_node_fs4.default.statSync(dir).isDirectory();
2979
3265
  function readXcconfig(file, read) {
2980
- if (read.includes(file) || !import_node_fs3.default.existsSync(file)) return {};
3266
+ if (read.includes(file) || !import_node_fs4.default.existsSync(file)) return {};
2981
3267
  read.push(file);
2982
3268
  const settings = {};
2983
- for (const raw of import_node_fs3.default.readFileSync(file, "utf8").split("\n")) {
3269
+ for (const raw of import_node_fs4.default.readFileSync(file, "utf8").split("\n")) {
2984
3270
  const line = raw.replace(/\/\/.*$/, "").trim();
2985
3271
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
2986
3272
  if (include) {
2987
3273
  Object.assign(
2988
3274
  settings,
2989
- readXcconfig(import_node_path5.default.resolve(import_node_path5.default.dirname(file), include[1]), read)
3275
+ readXcconfig(import_node_path6.default.resolve(import_node_path6.default.dirname(file), include[1]), read)
2990
3276
  );
2991
3277
  continue;
2992
3278
  }
@@ -3036,22 +3322,22 @@ function decodeXml(text2) {
3036
3322
  return text2.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
3037
3323
  }
3038
3324
  function workspaceReferences(workspace) {
3039
- const data = import_node_path5.default.join(workspace, "contents.xcworkspacedata");
3040
- if (!import_node_fs3.default.existsSync(data))
3325
+ const data = import_node_path6.default.join(workspace, "contents.xcworkspacedata");
3326
+ if (!import_node_fs4.default.existsSync(data))
3041
3327
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
3042
- const container = import_node_path5.default.dirname(workspace);
3328
+ const container = import_node_path6.default.dirname(workspace);
3043
3329
  const locate = (location, base) => {
3044
3330
  const colon = location.indexOf(":");
3045
3331
  const kind = location.slice(0, colon);
3046
3332
  const rest = location.slice(colon + 1);
3047
- if (kind === "group") return import_node_path5.default.resolve(base, rest);
3048
- if (kind === "container" || kind === "self") return import_node_path5.default.resolve(container, rest);
3049
- if (kind === "absolute") return import_node_path5.default.resolve(rest);
3050
- throw new Error(`${import_node_path5.default.basename(workspace)} has an unsupported location ${location}`);
3333
+ if (kind === "group") return import_node_path6.default.resolve(base, rest);
3334
+ if (kind === "container" || kind === "self") return import_node_path6.default.resolve(container, rest);
3335
+ if (kind === "absolute") return import_node_path6.default.resolve(rest);
3336
+ throw new Error(`${import_node_path6.default.basename(workspace)} has an unsupported location ${location}`);
3051
3337
  };
3052
3338
  const groups = [container];
3053
3339
  const references = [];
3054
- for (const [, closing, tag, attributes, selfClosing] of import_node_fs3.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
3340
+ for (const [, closing, tag, attributes, selfClosing] of import_node_fs4.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
3055
3341
  if (closing) {
3056
3342
  if (tag === "Group") groups.pop();
3057
3343
  continue;
@@ -3102,8 +3388,8 @@ function remotePackageRequirements(projects) {
3102
3388
  var loaded = /* @__PURE__ */ new Map();
3103
3389
  function xcodeProjectFile(xcodeproj) {
3104
3390
  for (const name of ["project.pbxproj", "project.xcproj"]) {
3105
- const file = import_node_path5.default.join(xcodeproj, name);
3106
- if (import_node_fs3.default.existsSync(file)) return file;
3391
+ const file = import_node_path6.default.join(xcodeproj, name);
3392
+ if (import_node_fs4.default.existsSync(file)) return file;
3107
3393
  }
3108
3394
  return null;
3109
3395
  }
@@ -3111,8 +3397,8 @@ function loadProject(xcodeproj) {
3111
3397
  const projectFile = xcodeProjectFile(xcodeproj);
3112
3398
  if (!projectFile)
3113
3399
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
3114
- const source = import_node_fs3.default.readFileSync(projectFile, "utf8");
3115
- const digest = (0, import_node_crypto.createHash)("sha256").update(source).digest("hex");
3400
+ const source = import_node_fs4.default.readFileSync(projectFile, "utf8");
3401
+ const digest = (0, import_node_crypto2.createHash)("sha256").update(source).digest("hex");
3116
3402
  const cached = loaded.get(projectFile);
3117
3403
  if (cached?.digest === digest) return cached.project;
3118
3404
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -3128,10 +3414,10 @@ function loadProject(xcodeproj) {
3128
3414
  if (!project || project.isa !== "PBXProject") {
3129
3415
  throw new Error(`${projectFile} has no PBXProject root`);
3130
3416
  }
3131
- const projectDir = import_node_fs3.default.realpathSync(
3132
- import_node_path5.default.resolve(import_node_path5.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
3417
+ const projectDir = import_node_fs4.default.realpathSync(
3418
+ import_node_path6.default.resolve(import_node_path6.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
3133
3419
  );
3134
- const resolvePath = xcodePathResolver(objects, projectDir, import_node_path5.default.join);
3420
+ const resolvePath = xcodePathResolver(objects, projectDir, import_node_path6.default.join);
3135
3421
  const result = {
3136
3422
  xcodeproj,
3137
3423
  projectFile,
@@ -3165,8 +3451,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
3165
3451
  const relative = str(config.baseConfigurationReferenceRelativePath);
3166
3452
  const own = isDict(config.buildSettings) ? config.buildSettings : {};
3167
3453
  const directory = anchor ? project.resolvePath(anchor) : null;
3168
- const baseFile = base ? project.resolvePath(base) : directory && relative ? import_node_path5.default.resolve(directory, relative) : null;
3169
- if (options.requireSources !== false && (base || anchor || relative) && (!baseFile || !import_node_fs3.default.existsSync(baseFile)))
3454
+ const baseFile = base ? project.resolvePath(base) : directory && relative ? import_node_path6.default.resolve(directory, relative) : null;
3455
+ if (options.requireSources !== false && (base || anchor || relative) && (!baseFile || !import_node_fs4.default.existsSync(baseFile)))
3170
3456
  throw new Error(
3171
3457
  `Unable to open base configuration reference file '${baseFile ?? base ?? relative ?? anchor}'`
3172
3458
  );
@@ -3222,7 +3508,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
3222
3508
  const derived = (key) => {
3223
3509
  if (key === "AppIdentifierPrefix" || key === "TeamIdentifierPrefix")
3224
3510
  return teamPrefix();
3225
- return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : process.env[key] ?? "";
3511
+ return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : options.environment?.[key] ?? process.env[key] ?? "";
3226
3512
  };
3227
3513
  return {
3228
3514
  get,
@@ -3244,27 +3530,27 @@ function settingList(value) {
3244
3530
  );
3245
3531
  return items2;
3246
3532
  }
3247
- function expandSearchPath(directory, rules) {
3248
- if (import_node_path5.default.basename(directory) !== "**") return [directory];
3533
+ function expandSearchPath(directory, rules2) {
3534
+ if (import_node_path6.default.basename(directory) !== "**") return [directory];
3249
3535
  const expanded = [];
3250
3536
  const seen = /* @__PURE__ */ new Set();
3251
- const queue = [import_node_path5.default.dirname(directory)];
3537
+ const queue = [import_node_path6.default.dirname(directory)];
3252
3538
  for (let at = 0; at < queue.length; at++) {
3253
3539
  const current = queue[at];
3254
3540
  let real;
3255
3541
  try {
3256
- real = import_node_fs3.default.realpathSync(current);
3542
+ real = import_node_fs4.default.realpathSync(current);
3257
3543
  } catch {
3258
3544
  continue;
3259
3545
  }
3260
- if (!import_node_fs3.default.statSync(real).isDirectory() || seen.has(real)) continue;
3546
+ if (!import_node_fs4.default.statSync(real).isDirectory() || seen.has(real)) continue;
3261
3547
  seen.add(real);
3262
3548
  expanded.push(current);
3263
- for (const entry of import_node_fs3.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
3264
- if (entry.isSymbolicLink() ? !rules.followLinks : !entry.isDirectory()) continue;
3265
- if (rules.excluded.some((pattern) => pattern.test(entry.name)) && !rules.included.some((pattern) => pattern.test(entry.name)))
3549
+ for (const entry of import_node_fs4.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
3550
+ if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
3551
+ if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
3266
3552
  continue;
3267
- queue.push(import_node_path5.default.join(current, entry.name));
3553
+ queue.push(import_node_path6.default.join(current, entry.name));
3268
3554
  }
3269
3555
  }
3270
3556
  return expanded;
@@ -3346,14 +3632,14 @@ function shellCopies(script, settings, projectDir) {
3346
3632
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
3347
3633
  return [];
3348
3634
  copies.push({
3349
- from: import_node_path5.default.resolve(projectDir, operands[0]),
3350
- to: import_node_path5.default.resolve(projectDir, operands[1])
3635
+ from: import_node_path6.default.resolve(projectDir, operands[0]),
3636
+ to: import_node_path6.default.resolve(projectDir, operands[1])
3351
3637
  });
3352
3638
  }
3353
3639
  return copies;
3354
3640
  }
3355
3641
  function fileListEntries(file, absolute) {
3356
- return import_node_fs3.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
3642
+ return import_node_fs4.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
3357
3643
  }
3358
3644
  function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3359
3645
  const { project, target, id: targetId } = ref;
@@ -3366,7 +3652,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3366
3652
  const copiedFiles = [];
3367
3653
  let generatedInfoPlist = false;
3368
3654
  const declaredInfoPlist = settings("INFOPLIST_FILE");
3369
- const infoPlistOutput = declaredInfoPlist ? import_node_path5.default.resolve(project.projectDir, declaredInfoPlist) : null;
3655
+ const infoPlistOutput = declaredInfoPlist ? import_node_path6.default.resolve(project.projectDir, declaredInfoPlist) : null;
3370
3656
  const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
3371
3657
  for (const phaseId of list(target.buildPhases)) {
3372
3658
  const phase = project.object(phaseId);
@@ -3375,7 +3661,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3375
3661
  copiedFiles.push(
3376
3662
  ...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
3377
3663
  );
3378
- const absolute = (raw) => import_node_path5.default.resolve(project.projectDir, expand(raw, settings));
3664
+ const absolute = (raw) => import_node_path6.default.resolve(project.projectDir, expand(raw, settings));
3379
3665
  const inputs = list(phase.inputPaths).map(absolute);
3380
3666
  const outputs = list(phase.outputPaths).map(absolute);
3381
3667
  const fileLists = /* @__PURE__ */ new Map();
@@ -3384,7 +3670,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3384
3670
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
3385
3671
  ).map((raw) => {
3386
3672
  const file = absolute(raw);
3387
- if (!import_node_fs3.default.existsSync(file)) {
3673
+ if (!import_node_fs4.default.existsSync(file)) {
3388
3674
  return { file, entries: [] };
3389
3675
  }
3390
3676
  return { file, entries: fileListEntries(file, absolute) };
@@ -3405,13 +3691,13 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3405
3691
  ...fileLists.get("OUTPUT").map((item) => item.file)
3406
3692
  ];
3407
3693
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
3408
- for (const file of inputFiles) if (import_node_fs3.default.existsSync(file)) projectInputs.add(file);
3694
+ for (const file of inputFiles) if (import_node_fs4.default.existsSync(file)) projectInputs.add(file);
3409
3695
  }
3410
3696
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
3411
- const phaseDir = import_node_path5.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
3697
+ const phaseDir = import_node_path6.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
3412
3698
  for (const lists of fileLists.values())
3413
3699
  for (const { file } of lists)
3414
- if (!import_node_fs3.default.existsSync(file))
3700
+ if (!import_node_fs4.default.existsSync(file))
3415
3701
  throw new Error(
3416
3702
  `${targetName}: Run Script "${script}" missing file list ${file}`
3417
3703
  );
@@ -3430,34 +3716,34 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3430
3716
  const lists = fileLists.get(kind);
3431
3717
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
3432
3718
  lists.forEach((_item, index) => {
3433
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path5.default.join(
3719
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path6.default.join(
3434
3720
  phaseDir,
3435
3721
  `${kind}-${index}.xcfilelist`
3436
3722
  );
3437
3723
  });
3438
3724
  }
3439
- const signature = (0, import_node_crypto.createHash)("sha256").update(
3725
+ const signature = (0, import_node_crypto2.createHash)("sha256").update(
3440
3726
  JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
3441
3727
  );
3442
3728
  for (const file of inputFiles) {
3443
3729
  signature.update(file);
3444
- if (import_node_fs3.default.existsSync(file)) {
3445
- const stat = import_node_fs3.default.statSync(file);
3730
+ if (import_node_fs4.default.existsSync(file)) {
3731
+ const stat = import_node_fs4.default.statSync(file);
3446
3732
  signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
3447
3733
  } else signature.update("missing");
3448
3734
  }
3449
3735
  const stamp = signature.digest("hex");
3450
3736
  const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
3451
- if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs3.default.existsSync(file)))
3737
+ if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs4.default.existsSync(file)))
3452
3738
  continue;
3453
- import_node_fs3.default.mkdirSync(phaseDir, { recursive: true });
3454
- import_node_fs3.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
3455
- import_node_fs3.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
3739
+ import_node_fs4.default.mkdirSync(phaseDir, { recursive: true });
3740
+ import_node_fs4.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
3741
+ import_node_fs4.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
3456
3742
  for (const output of allOutputs)
3457
- import_node_fs3.default.mkdirSync(import_node_path5.default.dirname(output), { recursive: true });
3743
+ import_node_fs4.default.mkdirSync(import_node_path6.default.dirname(output), { recursive: true });
3458
3744
  for (const [kind, lists] of fileLists)
3459
3745
  lists.forEach((item, index) => {
3460
- import_node_fs3.default.writeFileSync(
3746
+ import_node_fs4.default.writeFileSync(
3461
3747
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
3462
3748
  `${item.entries.join("\n")}
3463
3749
  `
@@ -3483,7 +3769,7 @@ ${output}`
3483
3769
  );
3484
3770
  }
3485
3771
  const missing = allOutputs.filter(
3486
- (file) => file === infoPlistOutput && !import_node_fs3.default.existsSync(file)
3772
+ (file) => file === infoPlistOutput && !import_node_fs4.default.existsSync(file)
3487
3773
  );
3488
3774
  if (missing.length > 0)
3489
3775
  throw new Error(
@@ -3496,8 +3782,8 @@ ${output}`
3496
3782
  project.objects,
3497
3783
  targetId,
3498
3784
  project.resolvePath,
3499
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs3.default.existsSync(file) ? [file] : [],
3500
- import_node_path5.default.join,
3785
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs4.default.existsSync(file) ? [file] : [],
3786
+ import_node_path6.default.join,
3501
3787
  (file, kind) => {
3502
3788
  if (kind === "header") {
3503
3789
  headers.add(file);
@@ -3507,9 +3793,9 @@ ${output}`
3507
3793
  resources.add(file);
3508
3794
  return;
3509
3795
  }
3510
- if (!import_node_fs3.default.existsSync(file)) {
3796
+ if (!import_node_fs4.default.existsSync(file)) {
3511
3797
  if (options.requireSources === false) return;
3512
- const script = scriptForOutput.get(import_node_path5.default.normalize(file));
3798
+ const script = scriptForOutput.get(import_node_path6.default.normalize(file));
3513
3799
  throw new Error(
3514
3800
  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}`
3515
3801
  );
@@ -3520,8 +3806,8 @@ ${output}`
3520
3806
  );
3521
3807
  for (const [file] of scriptForOutput) {
3522
3808
  if (sources.has(file) || allSources.has(file)) continue;
3523
- if (!import_node_fs3.default.existsSync(file)) continue;
3524
- const canonical = import_node_fs3.default.realpathSync(file);
3809
+ if (!import_node_fs4.default.existsSync(file)) continue;
3810
+ const canonical = import_node_fs4.default.realpathSync(file);
3525
3811
  if (sources.has(canonical) || allSources.has(canonical)) continue;
3526
3812
  allSources.add(canonical);
3527
3813
  sources.add(canonical);
@@ -3538,37 +3824,37 @@ ${output}`
3538
3824
  function commonAncestor(dirs) {
3539
3825
  let common = dirs[0];
3540
3826
  for (const dir of dirs) {
3541
- while (common !== import_node_path5.default.dirname(common) && import_node_path5.default.relative(common, dir).startsWith(".."))
3542
- common = import_node_path5.default.dirname(common);
3827
+ while (common !== import_node_path6.default.dirname(common) && import_node_path6.default.relative(common, dir).startsWith(".."))
3828
+ common = import_node_path6.default.dirname(common);
3543
3829
  }
3544
3830
  return common;
3545
3831
  }
3546
- var isPodsProject = (xcodeproj) => import_node_path5.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path5.default.basename(import_node_path5.default.dirname(xcodeproj)) === "Pods";
3832
+ var isPodsProject = (xcodeproj) => import_node_path6.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path6.default.basename(import_node_path6.default.dirname(xcodeproj)) === "Pods";
3547
3833
  function installedPodsSandbox(pods) {
3548
- const podfileLock = import_node_path5.default.join(import_node_path5.default.dirname(pods), "Podfile.lock");
3549
- const manifestLock = import_node_path5.default.join(pods, "Manifest.lock");
3550
- if (!import_node_fs3.default.existsSync(podfileLock))
3834
+ const podfileLock = import_node_path6.default.join(import_node_path6.default.dirname(pods), "Podfile.lock");
3835
+ const manifestLock = import_node_path6.default.join(pods, "Manifest.lock");
3836
+ if (!import_node_fs4.default.existsSync(podfileLock))
3551
3837
  throw new Error(
3552
- `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path5.default.dirname(pods)}`
3838
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path6.default.dirname(pods)}`
3553
3839
  );
3554
- if (!import_node_fs3.default.existsSync(manifestLock) || !import_node_fs3.default.readFileSync(manifestLock).equals(import_node_fs3.default.readFileSync(podfileLock)))
3840
+ if (!import_node_fs4.default.existsSync(manifestLock) || !import_node_fs4.default.readFileSync(manifestLock).equals(import_node_fs4.default.readFileSync(podfileLock)))
3555
3841
  throw new Error(
3556
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path5.default.dirname(pods)}`
3842
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path6.default.dirname(pods)}`
3557
3843
  );
3558
3844
  const specChecksums = {};
3559
- const lines = import_node_fs3.default.readFileSync(manifestLock, "utf8").split("\n");
3845
+ const lines = import_node_fs4.default.readFileSync(manifestLock, "utf8").split("\n");
3560
3846
  const start = lines.indexOf("SPEC CHECKSUMS:");
3561
3847
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
3562
3848
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
3563
3849
  if (!entry) break;
3564
3850
  specChecksums[entry[1]] = entry[2];
3565
3851
  }
3566
- const specs = import_node_path5.default.join(pods, "Local Podspecs");
3852
+ const specs = import_node_path6.default.join(pods, "Local Podspecs");
3567
3853
  return {
3568
3854
  podfileLock,
3569
3855
  manifestLock,
3570
3856
  specChecksums,
3571
- localPodspecs: isDirectory(specs) ? import_node_fs3.default.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => import_node_path5.default.join(specs, name)) : []
3857
+ localPodspecs: isDirectory(specs) ? import_node_fs4.default.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => import_node_path6.default.join(specs, name)) : []
3572
3858
  };
3573
3859
  }
3574
3860
  function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
@@ -3580,14 +3866,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
3580
3866
  if (!xcodeProjectFile(xcodeproj)) {
3581
3867
  if (installedPods && isPodsProject(xcodeproj))
3582
3868
  throw new Error(
3583
- `${import_node_path5.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path5.default.dirname(import_node_path5.default.dirname(xcodeproj))}`
3869
+ `${import_node_path6.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path6.default.dirname(import_node_path6.default.dirname(xcodeproj))}`
3584
3870
  );
3585
3871
  return;
3586
3872
  }
3587
- const key = import_node_fs3.default.realpathSync(xcodeproj);
3588
- if (projectAt.has(key) || !installedPods && key.split(import_node_path5.default.sep).includes("Pods"))
3873
+ const key = import_node_fs4.default.realpathSync(xcodeproj);
3874
+ if (projectAt.has(key) || !installedPods && key.split(import_node_path6.default.sep).includes("Pods"))
3589
3875
  return;
3590
- if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path5.default.dirname(key));
3876
+ if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path6.default.dirname(key));
3591
3877
  const project = loadProject(key);
3592
3878
  projectAt.set(key, project);
3593
3879
  projects.push(project);
@@ -3603,12 +3889,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
3603
3889
  for (const reference of listed)
3604
3890
  if (reference.endsWith(".xcodeproj")) addProject(reference);
3605
3891
  if (projects.length === 0) {
3606
- throw new Error(`${import_node_path5.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
3892
+ throw new Error(`${import_node_path6.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
3607
3893
  }
3608
- const podfile = import_node_path5.default.join(import_node_path5.default.dirname(xcodeprojOrWorkspace), "Podfile");
3609
- if (installedPods && !cocoapods && import_node_fs3.default.existsSync(podfile))
3894
+ const podfile = import_node_path6.default.join(import_node_path6.default.dirname(xcodeprojOrWorkspace), "Podfile");
3895
+ if (installedPods && !cocoapods && import_node_fs4.default.existsSync(podfile))
3610
3896
  throw new Error(
3611
- `${podfile} is not installed into ${import_node_path5.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path5.default.dirname(podfile)} and open the workspace it writes`
3897
+ `${podfile} is not installed into ${import_node_path6.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path6.default.dirname(podfile)} and open the workspace it writes`
3612
3898
  );
3613
3899
  return { listed, projects, projectAt, cocoapods };
3614
3900
  }
@@ -3644,7 +3930,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
3644
3930
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
3645
3931
  }
3646
3932
  function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
3647
- const xcodeprojOrWorkspace = import_node_fs3.default.realpathSync(input);
3933
+ const xcodeprojOrWorkspace = import_node_fs4.default.realpathSync(input);
3648
3934
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
3649
3935
  const { listed, projects, projectAt, cocoapods } = workspaceProjects(
3650
3936
  xcodeprojOrWorkspace,
@@ -3653,7 +3939,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3653
3939
  const allTargets = projects.flatMap(projectTargets);
3654
3940
  const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
3655
3941
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
3656
- const container = import_node_path5.default.basename(xcodeprojOrWorkspace);
3942
+ const container = import_node_path6.default.basename(xcodeprojOrWorkspace);
3657
3943
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
3658
3944
  if (named.length !== 1) {
3659
3945
  throw new Error(
@@ -3666,15 +3952,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3666
3952
  for (const ref of allTargets) {
3667
3953
  const product = ref.project.object(str(ref.target.productReference));
3668
3954
  const file = str(product?.path);
3669
- if (file && !byProduct.has(import_node_path5.default.basename(file)))
3670
- byProduct.set(import_node_path5.default.basename(file), ref);
3955
+ if (file && !byProduct.has(import_node_path6.default.basename(file)))
3956
+ byProduct.set(import_node_path6.default.basename(file), ref);
3671
3957
  }
3672
3958
  const proxied = (project, proxyId) => {
3673
3959
  const proxy = project.object(proxyId);
3674
3960
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
3675
3961
  const portal = str(proxy.containerPortal);
3676
3962
  const portalPath = project.resolvePath(portal ?? "");
3677
- const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs3.default.existsSync(portalPath) ? projectAt.get(import_node_fs3.default.realpathSync(portalPath)) : void 0;
3963
+ const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs4.default.existsSync(portalPath) ? projectAt.get(import_node_fs4.default.realpathSync(portalPath)) : void 0;
3678
3964
  const remote = str(proxy.remoteGlobalIDString);
3679
3965
  if (!owner || !remote) return void 0;
3680
3966
  return projectTargets(owner).find(
@@ -3695,12 +3981,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3695
3981
  if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
3696
3982
  for (const buildFileId of list(phase.files)) {
3697
3983
  const file = project.object(str(project.object(buildFileId)?.fileRef));
3698
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path5.default.basename(str(file.path) ?? "")) : void 0;
3984
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path6.default.basename(str(file.path) ?? "")) : void 0;
3699
3985
  if (resolved) found.push(resolved);
3700
3986
  }
3701
3987
  }
3702
3988
  return found.filter(
3703
- (candidate) => candidate.target.isa === "PBXAggregateTarget" || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
3989
+ (candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
3704
3990
  );
3705
3991
  };
3706
3992
  const order = [];
@@ -3744,8 +4030,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3744
4030
  ref.project.objects,
3745
4031
  ref.id,
3746
4032
  ref.project.resolvePath,
3747
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs3.default.existsSync(file) ? [file] : [],
3748
- import_node_path5.default.join,
4033
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs4.default.existsSync(file) ? [file] : [],
4034
+ import_node_path6.default.join,
3749
4035
  (file, kind) => {
3750
4036
  if (kind === "header") found.push(file);
3751
4037
  }
@@ -3761,12 +4047,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3761
4047
  for (const ref of projectTargets(project)) {
3762
4048
  const product = productName(ref);
3763
4049
  for (const { file, visibility } of headerPhase(ref)) {
3764
- const name = import_node_path5.default.basename(file);
4050
+ const name = import_node_path6.default.basename(file);
3765
4051
  if (!entries.has(name))
3766
4052
  entries.set(name, visibility !== "Project" ? `${product}/${name}` : file);
3767
4053
  }
3768
4054
  for (const file of synchronizedHeaders(ref)) {
3769
- const name = import_node_path5.default.basename(file);
4055
+ const name = import_node_path6.default.basename(file);
3770
4056
  if (!entries.has(name)) entries.set(name, file);
3771
4057
  }
3772
4058
  }
@@ -3776,7 +4062,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3776
4062
  if (folder === null) continue;
3777
4063
  for (const file of walkFiles(folder)) {
3778
4064
  if (!HEADER_FILE.test(file)) continue;
3779
- const name = import_node_path5.default.basename(file);
4065
+ const name = import_node_path6.default.basename(file);
3780
4066
  if (!entries.has(name)) entries.set(name, file);
3781
4067
  }
3782
4068
  }
@@ -3784,18 +4070,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3784
4070
  for (const id of Object.keys(project.objects)) {
3785
4071
  if (project.object(id)?.isa !== "PBXFileReference") continue;
3786
4072
  const file = project.resolvePath(id);
3787
- if (file && HEADER_FILE.test(file) && !entries.has(import_node_path5.default.basename(file)))
3788
- entries.set(import_node_path5.default.basename(file), file);
4073
+ if (file && HEADER_FILE.test(file) && !entries.has(import_node_path6.default.basename(file)))
4074
+ entries.set(import_node_path6.default.basename(file), file);
3789
4075
  }
3790
4076
  const map = [...entries];
3791
4077
  projectHeaderMaps.set(project, map);
3792
4078
  return map;
3793
4079
  };
3794
4080
  const xcconfigs = /* @__PURE__ */ new Set();
3795
- const buildDir = (project) => import_node_path5.default.join(project.projectDir, ".build/peach-xcode/Build");
4081
+ const buildDir = (project) => import_node_path6.default.join(project.projectDir, ".build/peach-xcode/Build");
3796
4082
  const podsBuild = {
3797
- SYMROOT: import_node_path5.default.join(buildDir(app.project), "Products"),
3798
- OBJROOT: import_node_path5.default.join(buildDir(app.project), "Intermediates.noindex")
4083
+ SYMROOT: import_node_path6.default.join(buildDir(app.project), "Products"),
4084
+ OBJROOT: import_node_path6.default.join(buildDir(app.project), "Intermediates.noindex")
3799
4085
  };
3800
4086
  const moduleTarget = (ref) => {
3801
4087
  const name = str(ref.target.name) ?? ref.id;
@@ -3810,18 +4096,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3810
4096
  TARGET_NAME: name,
3811
4097
  TARGETNAME: "$(TARGET_NAME)",
3812
4098
  PROJECT: "$(PROJECT_NAME)",
3813
- PROJECT_NAME: import_node_path5.default.basename(ref.project.xcodeproj, ".xcodeproj"),
4099
+ PROJECT_NAME: import_node_path6.default.basename(ref.project.xcodeproj, ".xcodeproj"),
3814
4100
  PROJECT_FILE_PATH: ref.project.xcodeproj,
3815
4101
  SRCROOT: ref.project.projectDir,
3816
4102
  SOURCE_ROOT: ref.project.projectDir,
3817
4103
  PROJECT_DIR: ref.project.projectDir,
3818
- SYMROOT: import_node_path5.default.join(buildDir(ref.project), "Products"),
4104
+ SYMROOT: import_node_path6.default.join(buildDir(ref.project), "Products"),
3819
4105
  BUILD_DIR: "$(SYMROOT)",
3820
4106
  BUILD_ROOT: "$(SYMROOT)",
3821
- OBJROOT: import_node_path5.default.join(buildDir(ref.project), "Intermediates.noindex"),
4107
+ OBJROOT: import_node_path6.default.join(buildDir(ref.project), "Intermediates.noindex"),
3822
4108
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
3823
4109
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
3824
4110
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
4111
+ UNLOCALIZED_RESOURCES_FOLDER_PATH: str(ref.project.object(str(ref.target.productReference))?.path) ?? "",
3825
4112
  PROJECT_TEMP_DIR: "$(OBJROOT)/$(PROJECT_NAME).build",
3826
4113
  CONFIGURATION_TEMP_DIR: "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
3827
4114
  TARGET_TEMP_DIR: "$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME).build",
@@ -3829,6 +4116,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3829
4116
  TEMP_FILES_DIR: "$(TEMP_DIR)",
3830
4117
  TEMP_FILE_DIR: "$(TEMP_DIR)",
3831
4118
  TEMP_ROOT: "$(OBJROOT)",
4119
+ OBJECT_FILE_DIR: "$(TARGET_TEMP_DIR)/Objects",
4120
+ // the per-variant object directory carries no arch: xcode defines
4121
+ // OBJECT_FILE_DIR_normal as OBJECT_FILE_DIR-normal, and the target
4122
+ // appends $(CURRENT_ARCH) itself for the per-arch directory.
4123
+ OBJECT_FILE_DIR_normal: "$(OBJECT_FILE_DIR)-normal",
3832
4124
  DERIVED_FILE_DIR: "$(TARGET_TEMP_DIR)/DerivedSources",
3833
4125
  DERIVED_FILES_DIR: "$(DERIVED_FILE_DIR)",
3834
4126
  DERIVED_SOURCES_DIR: "$(DERIVED_FILE_DIR)",
@@ -3852,7 +4144,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3852
4144
  xcconfigs
3853
4145
  );
3854
4146
  const searchRules = recursiveSearchRules(settings2);
3855
- const absolute = (file) => import_node_path5.default.resolve(ref.project.projectDir, file);
4147
+ const absolute = (file) => import_node_path6.default.resolve(ref.project.projectDir, file);
3856
4148
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
3857
4149
  const product = settings2("PRODUCT_NAME");
3858
4150
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -3883,7 +4175,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3883
4175
  `${name}: Swift compatibility header phase has no Swift producer sources`
3884
4176
  );
3885
4177
  const building = options.prepareGeneratedSources && options.requireSources !== false;
3886
- const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path5.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
4178
+ const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path6.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
3887
4179
  if (versioning) {
3888
4180
  const version = settings2("CURRENT_PROJECT_VERSION");
3889
4181
  const custom = [
@@ -3896,7 +4188,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3896
4188
  ].filter((key) => settings2(key));
3897
4189
  if (custom.length)
3898
4190
  throw new Error(
3899
- `${name}: Xcode generates ${import_node_path5.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
4191
+ `${name}: Xcode generates ${import_node_path6.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
3900
4192
  );
3901
4193
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
3902
4194
  const [major, minor] = version.split(".");
@@ -3909,9 +4201,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3909
4201
  ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
3910
4202
  ""
3911
4203
  ].join("\n");
3912
- if (!import_node_fs3.default.existsSync(versioning) || import_node_fs3.default.readFileSync(versioning, "utf8") !== unit) {
3913
- import_node_fs3.default.mkdirSync(import_node_path5.default.dirname(versioning), { recursive: true });
3914
- import_node_fs3.default.writeFileSync(versioning, unit);
4204
+ if (!import_node_fs4.default.existsSync(versioning) || import_node_fs4.default.readFileSync(versioning, "utf8") !== unit) {
4205
+ import_node_fs4.default.mkdirSync(import_node_path6.default.dirname(versioning), { recursive: true });
4206
+ import_node_fs4.default.writeFileSync(versioning, unit);
3915
4207
  }
3916
4208
  allSources.push(versioning);
3917
4209
  }
@@ -3930,7 +4222,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3930
4222
  const headerFiles = headerPhase(ref);
3931
4223
  const ownHeaders = /* @__PURE__ */ new Map();
3932
4224
  for (const { file, visibility } of headerFiles) {
3933
- const name2 = import_node_path5.default.basename(file);
4225
+ const name2 = import_node_path6.default.basename(file);
3934
4226
  const published = visibility !== "Project";
3935
4227
  if (!ownHeaders.has(name2))
3936
4228
  ownHeaders.set(name2, published ? `${product}/${name2}` : file);
@@ -3938,7 +4230,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3938
4230
  ownHeaders.set(`${product}/${name2}`, file);
3939
4231
  }
3940
4232
  for (const file of synchronizedHeaders(ref)) {
3941
- const name2 = import_node_path5.default.basename(file);
4233
+ const name2 = import_node_path6.default.basename(file);
3942
4234
  if (ownHeaders.has(name2)) continue;
3943
4235
  ownHeaders.set(name2, file);
3944
4236
  const qualified = `${product}/${name2}`;
@@ -3950,16 +4242,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3950
4242
  const otherProduct = productName(other);
3951
4243
  for (const { file, visibility } of headerPhase(other)) {
3952
4244
  if (visibility === "Project") continue;
3953
- const key = `${otherProduct}/${import_node_path5.default.basename(file)}`;
4245
+ const key = `${otherProduct}/${import_node_path6.default.basename(file)}`;
3954
4246
  if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
3955
4247
  }
3956
4248
  }
3957
- const wrapper = import_node_path5.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
4249
+ const wrapper = import_node_path6.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
3958
4250
  const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
3959
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path5.default.relative(import_node_path5.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path5.default.sep)[0] !== ".." && import_node_fs3.default.existsSync(moduleMap) ? import_node_fs3.default.readdirSync(import_node_path5.default.dirname(moduleMap)).flatMap((entry) => {
4251
+ const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path6.default.join(import_node_path6.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
4252
+ const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs4.default.existsSync(moduleMap) && import_node_fs4.default.existsSync(frameworkUmbrella) ? {
4253
+ framework: true,
4254
+ moduleMap,
4255
+ umbrella: frameworkUmbrella,
4256
+ outputModuleMap: import_node_path6.default.join(wrapper, "Modules", "module.modulemap"),
4257
+ outputUmbrella: import_node_path6.default.join(
4258
+ wrapper,
4259
+ "Headers",
4260
+ import_node_path6.default.basename(frameworkUmbrella)
4261
+ ),
4262
+ outputHeader: import_node_path6.default.join(
4263
+ wrapper,
4264
+ "Headers",
4265
+ settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
4266
+ )
4267
+ } : null;
4268
+ const swiftCompatibility = compatibility ? {
4269
+ framework: false,
4270
+ moduleMap: compatibility.moduleMap,
4271
+ umbrella: compatibility.umbrella,
4272
+ outputModuleMap: compatibility.outputModuleMap,
4273
+ outputUmbrella: compatibility.outputUmbrella,
4274
+ outputHeader: compatibility.outputHeader
4275
+ } : frameworkCompatibility;
4276
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path6.default.relative(import_node_path6.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path6.default.sep)[0] !== ".." && import_node_fs4.default.existsSync(moduleMap) ? import_node_fs4.default.readdirSync(import_node_path6.default.dirname(moduleMap)).flatMap((entry) => {
3960
4277
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
3961
- const file = import_node_path5.default.join(import_node_path5.default.dirname(moduleMap), entry);
3962
- return import_node_fs3.default.existsSync(file) ? [file] : [];
4278
+ const file = import_node_path6.default.join(import_node_path6.default.dirname(moduleMap), entry);
4279
+ return import_node_fs4.default.existsSync(file) ? [file] : [];
3963
4280
  }) : [];
3964
4281
  const fileFlags = {};
3965
4282
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -3977,6 +4294,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
3977
4294
  );
3978
4295
  }
3979
4296
  }
4297
+ const cStandard = settings2("GCC_C_LANGUAGE_STANDARD");
4298
+ const cxxStandard = settings2("CLANG_CXX_LANGUAGE_STANDARD");
3980
4299
  return {
3981
4300
  settings: settings2,
3982
4301
  keys,
@@ -4002,13 +4321,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4002
4321
  swift: {
4003
4322
  flags: settingList(settings2("OTHER_SWIFT_FLAGS")),
4004
4323
  includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
4005
- compatibility: compatibility ? {
4006
- moduleMap: compatibility.moduleMap,
4007
- umbrella: compatibility.umbrella,
4008
- outputModuleMap: compatibility.outputModuleMap,
4009
- outputUmbrella: compatibility.outputUmbrella,
4010
- outputHeader: compatibility.outputHeader
4011
- } : null
4324
+ compatibility: swiftCompatibility
4012
4325
  }
4013
4326
  } : {},
4014
4327
  ...native ? {
@@ -4024,7 +4337,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4024
4337
  ...headers,
4025
4338
  ...Object.keys(ref.project.objects).flatMap((id) => {
4026
4339
  const file = ref.project.resolvePath(id);
4027
- return file && HEADER_FILE.test(file) && import_node_fs3.default.existsSync(file) ? [file] : [];
4340
+ return file && HEADER_FILE.test(file) && import_node_fs4.default.existsSync(file) ? [file] : [];
4028
4341
  })
4029
4342
  ])
4030
4343
  ],
@@ -4033,15 +4346,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4033
4346
  // xcode searches its products' include directory before
4034
4347
  // HEADER_SEARCH_PATHS and the target's derived sources after.
4035
4348
  headerSearchPaths: [
4036
- import_node_path5.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
4349
+ import_node_path6.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
4037
4350
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
4038
4351
  (raw) => expandSearchPath(absolute(raw), searchRules)
4039
4352
  ),
4040
- import_node_path5.default.join(
4353
+ import_node_path6.default.join(
4041
4354
  `${settings2("DERIVED_FILE_DIR")}-normal`,
4042
4355
  settings2("CURRENT_ARCH")
4043
4356
  ),
4044
- import_node_path5.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
4357
+ import_node_path6.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
4045
4358
  settings2("DERIVED_FILE_DIR")
4046
4359
  ],
4047
4360
  userHeaderSearchPaths: settingList(
@@ -4058,14 +4371,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4058
4371
  settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
4059
4372
  ...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
4060
4373
  ...settings2("CLANG_ENABLE_MODULES") === "YES" ? ["-fmodules"] : [],
4061
- ...settings2("GCC_C_LANGUAGE_STANDARD") ? [`-std=${settings2("GCC_C_LANGUAGE_STANDARD")}`] : [],
4374
+ ...cStandard && cStandard !== "compiler-default" ? [`-std=${cStandard}`] : [],
4062
4375
  ...settingList(settings2("GCC_PREPROCESSOR_DEFINITIONS")).map(
4063
4376
  (value) => `-D${value}`
4064
4377
  ),
4065
4378
  ...settingList(settings2("OTHER_CFLAGS"))
4066
4379
  ],
4067
4380
  cxxFlags: [
4068
- ...settings2("CLANG_CXX_LANGUAGE_STANDARD") ? [`-std=${settings2("CLANG_CXX_LANGUAGE_STANDARD")}`] : [],
4381
+ ...cxxStandard && cxxStandard !== "compiler-default" ? [`-std=${CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard}`] : [],
4382
+ // clang.xcspec's hidden CLANG_DISABLE_CXX_MODULES (default
4383
+ // YES) keeps c++ and objective-c++ units out of modules when
4384
+ // modules are on or the standard is c++20 or later.
4385
+ ...settings2("CLANG_DISABLE_CXX_MODULES") !== "NO" && (settings2("CLANG_ENABLE_MODULES") === "YES" || !PRE_CXX20_STANDARDS.has(cxxStandard || "compiler-default")) ? ["-fno-cxx-modules"] : [],
4069
4386
  ...settingList(settings2("OTHER_CPLUSPLUSFLAGS"))
4070
4387
  ],
4071
4388
  fileFlags,
@@ -4081,16 +4398,42 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4081
4398
  ...headerFiles.flatMap(
4082
4399
  ({ file, visibility }) => visibility === "Project" ? [] : [
4083
4400
  [
4084
- import_node_path5.default.join(
4401
+ import_node_path6.default.join(
4085
4402
  wrapper,
4086
4403
  visibility === "Public" ? "Headers" : "PrivateHeaders",
4087
- import_node_path5.default.basename(file)
4404
+ import_node_path6.default.basename(file)
4088
4405
  ),
4089
4406
  file
4090
4407
  ]
4091
4408
  ]
4092
4409
  ),
4093
- ...moduleMap ? [[import_node_path5.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
4410
+ // a copy files phase into the products directory, as
4411
+ // cocoapods writes for each header_mappings_dir folder.
4412
+ ...list(ref.target.buildPhases).flatMap((phaseId) => {
4413
+ const phase = ref.project.object(phaseId);
4414
+ if (phase?.isa !== "PBXCopyFilesBuildPhase" || str(phase.dstSubfolderSpec) !== "16")
4415
+ return [];
4416
+ const destination = expand(
4417
+ str(phase.dstPath) ?? "",
4418
+ (name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path6.default.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path6.default.join(wrapper, "PrivateHeaders") : settings2(name2)
4419
+ );
4420
+ return list(phase.files).flatMap((id) => {
4421
+ const file = ref.project.resolvePath(
4422
+ str(ref.project.object(id)?.fileRef) ?? ""
4423
+ );
4424
+ return file && HEADER_FILE.test(file) ? [
4425
+ [
4426
+ import_node_path6.default.resolve(
4427
+ settings2("BUILT_PRODUCTS_DIR"),
4428
+ destination,
4429
+ import_node_path6.default.basename(file)
4430
+ ),
4431
+ file
4432
+ ]
4433
+ ] : [];
4434
+ });
4435
+ }),
4436
+ ...moduleMap ? [[import_node_path6.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
4094
4437
  ]) : Object.fromEntries(podHeaders.map((file) => [file, file]))
4095
4438
  }
4096
4439
  } : {}
@@ -4099,29 +4442,94 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4099
4442
  };
4100
4443
  const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
4101
4444
  const { settings, keys: settingKeys, module: module2 } = builtTargets.at(-1);
4102
- const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => ref.target.isa === "PBXNativeTarget").map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
4445
+ const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
4103
4446
  const frameworks = frameworkTargets.map(({ framework }) => framework);
4104
4447
  const podSourceDirs = frameworkTargets.flatMap(
4105
- ({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path5.default.dirname(file)).filter((dir) => import_node_fs3.default.existsSync(dir)) : []
4448
+ ({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path6.default.dirname(file)).filter((dir) => import_node_fs4.default.existsSync(dir)) : []
4106
4449
  );
4107
- const expandValue = (value) => {
4108
- if (typeof value === "string") return expand(value, settings);
4109
- if (Array.isArray(value)) return value.map(expandValue);
4450
+ const expandValue = (value, settings2) => {
4451
+ if (typeof value === "string") return expand(value, settings2);
4452
+ if (Array.isArray(value)) return value.map((item) => expandValue(item, settings2));
4110
4453
  if (typeof value === "object" && !(value instanceof Date) && !Buffer.isBuffer(value)) {
4111
4454
  return Object.fromEntries(
4112
- Object.entries(value).map(([key, value2]) => [key, expandValue(value2)])
4455
+ Object.entries(value).map(([key, value2]) => [key, expandValue(value2, settings2)])
4113
4456
  );
4114
4457
  }
4115
4458
  return value;
4116
4459
  };
4117
- const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path5.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
4460
+ const resourceProducts = [];
4461
+ const bundleTargets = builtTargets.filter(
4462
+ ({ ref }) => ref.target.productType === RESOURCE_BUNDLE
4463
+ );
4464
+ for (const owner of options.installedPods ? builtTargets : []) {
4465
+ for (const phaseId of list(owner.ref.target.buildPhases)) {
4466
+ const phase = owner.ref.project.object(phaseId);
4467
+ if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
4468
+ continue;
4469
+ const absolute = (raw) => import_node_path6.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
4470
+ const entries = (paths) => paths.flatMap((raw) => {
4471
+ const file = absolute(raw);
4472
+ xcconfigs.add(file);
4473
+ return fileListEntries(file, absolute);
4474
+ });
4475
+ const inputs = entries(list(phase.inputFileListPaths)).filter(
4476
+ (file) => file.endsWith(".bundle")
4477
+ );
4478
+ const outputs = entries(list(phase.outputFileListPaths)).filter(
4479
+ (file) => file.endsWith(".bundle")
4480
+ );
4481
+ if (inputs.length !== outputs.length)
4482
+ throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
4483
+ const destinationRoot = import_node_path6.default.join(
4484
+ owner.settings("TARGET_BUILD_DIR"),
4485
+ owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
4486
+ );
4487
+ for (const [index, input2] of inputs.entries()) {
4488
+ const product = bundleTargets.find((target) => {
4489
+ const file = str(
4490
+ target.ref.project.object(str(target.ref.target.productReference))?.path
4491
+ );
4492
+ return file && import_node_path6.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
4493
+ });
4494
+ if (!product)
4495
+ throw new Error(
4496
+ `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
4497
+ );
4498
+ const destination = import_node_path6.default.relative(destinationRoot, outputs[index]);
4499
+ if (destination === ".." || destination.startsWith(`..${import_node_path6.default.sep}`) || import_node_path6.default.isAbsolute(destination) || import_node_path6.default.basename(input2) !== import_node_path6.default.basename(destination))
4500
+ throw new Error(
4501
+ `${owner.module.name}: invalid resource bundle copy destination`
4502
+ );
4503
+ const infoFile = import_node_path6.default.resolve(
4504
+ product.ref.project.projectDir,
4505
+ product.settings("INFOPLIST_FILE")
4506
+ );
4507
+ xcconfigs.add(infoFile);
4508
+ const parsed = import_plist2.default.parse(import_node_fs4.default.readFileSync(infoFile, "utf8"));
4509
+ const infoPlist = import_plist2.default.build(expandValue(parsed, product.settings));
4510
+ const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
4511
+ const bundlePath = prefix + destination.split(import_node_path6.default.sep).join("/");
4512
+ if (resourceProducts.some((resource) => resource.path === bundlePath))
4513
+ throw new Error(
4514
+ `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
4515
+ );
4516
+ resourceProducts.push({
4517
+ path: bundlePath,
4518
+ resources: product.module.resources,
4519
+ infoPlist
4520
+ });
4521
+ }
4522
+ }
4523
+ }
4524
+ const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path6.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
4118
4525
  const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
4119
- const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist2.default.parse(import_node_fs3.default.readFileSync(infoPlistFile, "utf8")) : {};
4526
+ const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist2.default.parse(import_node_fs4.default.readFileSync(infoPlistFile, "utf8")) : {};
4120
4527
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
4121
4528
  throw new Error(`${module2.name} Info.plist must contain a dictionary`);
4122
4529
  }
4123
4530
  const info = {};
4124
- for (const [key, value] of Object.entries(sourceInfo)) info[key] = expandValue(value);
4531
+ for (const [key, value] of Object.entries(sourceInfo))
4532
+ info[key] = expandValue(value, settings);
4125
4533
  for (const key of settingKeys) {
4126
4534
  if (!key.startsWith("INFOPLIST_KEY_") || key.endsWith("_Generation")) continue;
4127
4535
  const value = settings(key);
@@ -4144,7 +4552,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4144
4552
  };
4145
4553
  }
4146
4554
  const localPackageDirs = [
4147
- ...listed.filter((reference) => import_node_fs3.default.existsSync(import_node_path5.default.join(reference, "Package.swift"))),
4555
+ ...listed.filter((reference) => import_node_fs4.default.existsSync(import_node_path6.default.join(reference, "Package.swift"))),
4148
4556
  ...projects.flatMap(
4149
4557
  (project) => Object.entries(project.objects).flatMap(([id, entry]) => {
4150
4558
  if (!isDict(entry)) return [];
@@ -4154,19 +4562,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4154
4562
  const packages = [];
4155
4563
  while (pending.length > 0) {
4156
4564
  const dir = pending.pop();
4157
- if (import_node_fs3.default.existsSync(import_node_path5.default.join(dir, "Package.swift"))) {
4565
+ if (import_node_fs4.default.existsSync(import_node_path6.default.join(dir, "Package.swift"))) {
4158
4566
  packages.push(dir);
4159
4567
  continue;
4160
4568
  }
4161
4569
  if (!isDirectory(dir)) continue;
4162
- for (const child of import_node_fs3.default.readdirSync(dir, { withFileTypes: true }))
4570
+ for (const child of import_node_fs4.default.readdirSync(dir, { withFileTypes: true }))
4163
4571
  if (child.isDirectory() && !child.name.startsWith("."))
4164
- pending.push(import_node_path5.default.join(dir, child.name));
4572
+ pending.push(import_node_path6.default.join(dir, child.name));
4165
4573
  }
4166
4574
  return packages;
4167
4575
  }
4168
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path5.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
4169
- return candidate && import_node_fs3.default.existsSync(import_node_path5.default.join(candidate, "Package.swift")) ? [candidate] : [];
4576
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path6.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
4577
+ return candidate && import_node_fs4.default.existsSync(import_node_path6.default.join(candidate, "Package.swift")) ? [candidate] : [];
4170
4578
  })
4171
4579
  )
4172
4580
  ];
@@ -4187,12 +4595,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4187
4595
  const linkedProductKeys = /* @__PURE__ */ new Set();
4188
4596
  const binaryFrameworks = /* @__PURE__ */ new Map();
4189
4597
  for (const { ref, settings: settings2 } of builtTargets) {
4190
- const absolute = (raw) => import_node_path5.default.resolve(ref.project.projectDir, expand(raw, settings2));
4598
+ const absolute = (raw) => import_node_path6.default.resolve(ref.project.projectDir, expand(raw, settings2));
4191
4599
  for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
4192
4600
  const dir = absolute(raw);
4193
- const modulemap = import_node_path5.default.join(dir, "module.modulemap");
4194
- if (!import_node_fs3.default.existsSync(modulemap)) continue;
4195
- const name = moduleMapName(import_node_fs3.default.readFileSync(modulemap, "utf8"));
4601
+ const modulemap = import_node_path6.default.join(dir, "module.modulemap");
4602
+ if (!import_node_fs4.default.existsSync(modulemap)) continue;
4603
+ const name = moduleMapName(import_node_fs4.default.readFileSync(modulemap, "utf8"));
4196
4604
  if (name && !binaryFrameworks.has(name)) binaryFrameworks.set(name, dir);
4197
4605
  }
4198
4606
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -4201,7 +4609,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4201
4609
  const inputs = list(phase.inputPaths).map(absolute);
4202
4610
  for (const raw of list(phase.inputFileListPaths)) {
4203
4611
  const file = absolute(raw);
4204
- if (!import_node_fs3.default.existsSync(file)) continue;
4612
+ if (!import_node_fs4.default.existsSync(file)) continue;
4205
4613
  xcconfigs.add(file);
4206
4614
  inputs.push(...fileListEntries(file, absolute));
4207
4615
  }
@@ -4240,7 +4648,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4240
4648
  product,
4241
4649
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
4242
4650
  kind: "local",
4243
- dir: import_node_path5.default.resolve(
4651
+ dir: import_node_path6.default.resolve(
4244
4652
  project.projectDir,
4245
4653
  str(reference.relativePath) ?? ""
4246
4654
  )
@@ -4263,11 +4671,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4263
4671
  const fileId = str(project.object(buildFileId)?.fileRef);
4264
4672
  const file = project.object(fileId);
4265
4673
  const tree = str(file?.sourceTree);
4266
- const name = /([^/]+)\.(xc)?framework$/.exec(str(file?.path) ?? "")?.[1];
4674
+ const rawPath = str(file?.path) ?? "";
4675
+ const name = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
4267
4676
  if (file?.isa !== "PBXFileReference" || !name) continue;
4268
- if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR")
4677
+ if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
4678
+ // however it is rooted: xcode links -framework <name> from the sdk
4679
+ // and a stale group-relative path to it contributes nothing.
4680
+ /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
4681
+ byProduct.has(import_node_path6.default.basename(rawPath)))
4269
4682
  continue;
4270
4683
  const resolved = fileId ? project.resolvePath(fileId) : null;
4684
+ if (fileId && resolved !== null && !import_node_fs4.default.existsSync(resolved))
4685
+ throw new Error(
4686
+ `${str(target.name) ?? "target"}: linked framework ${name} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
4687
+ );
4271
4688
  if (!binaryFrameworks.get(name)) binaryFrameworks.set(name, resolved);
4272
4689
  }
4273
4690
  }
@@ -4282,18 +4699,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4282
4699
  }
4283
4700
  for (const built of builtTargets)
4284
4701
  built.module.packageProducts = productsByTarget.get(built.ref) ?? [];
4285
- const resolvedFile = import_node_path5.default.join(
4286
- workspace ?? import_node_path5.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
4702
+ const resolvedFile = import_node_path6.default.join(
4703
+ workspace ?? import_node_path6.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
4287
4704
  "xcshareddata",
4288
4705
  "swiftpm",
4289
4706
  "Package.resolved"
4290
4707
  );
4291
- let packageResolved = import_node_fs3.default.existsSync(resolvedFile) ? [import_node_fs3.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path5.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs3.default.existsSync(file)).map((file) => import_node_fs3.default.realpathSync(file)).sort();
4708
+ let packageResolved = import_node_fs4.default.existsSync(resolvedFile) ? [import_node_fs4.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path6.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs4.default.existsSync(file)).map((file) => import_node_fs4.default.realpathSync(file)).sort();
4292
4709
  if (packageResolved.length === 0) {
4293
4710
  const requirements = remotePackageRequirements(projects);
4294
4711
  if (requirements.length > 0) {
4295
4712
  resolveSwiftPackageRequirements(requirements, resolvedFile);
4296
- packageResolved = [import_node_fs3.default.realpathSync(resolvedFile)];
4713
+ packageResolved = [import_node_fs4.default.realpathSync(resolvedFile)];
4297
4714
  }
4298
4715
  }
4299
4716
  const used = order.map((ref) => ref.project);
@@ -4301,14 +4718,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4301
4718
  ...module2,
4302
4719
  rootDir: commonAncestor(
4303
4720
  [
4304
- workspace ? import_node_path5.default.dirname(workspace) : app.project.projectDir,
4721
+ workspace ? import_node_path6.default.dirname(workspace) : app.project.projectDir,
4305
4722
  ...used.map((project) => project.projectDir),
4306
4723
  ...localPackageDirs,
4307
4724
  ...linkedProducts.flatMap(
4308
- ({ source }) => source.kind === "local" && import_node_fs3.default.existsSync(source.dir) ? [source.dir] : []
4725
+ ({ source }) => source.kind === "local" && import_node_fs4.default.existsSync(source.dir) ? [source.dir] : []
4309
4726
  ),
4310
4727
  ...new Set(podSourceDirs)
4311
- ].map((dir) => import_node_fs3.default.realpathSync(dir))
4728
+ ].map((dir) => import_node_fs4.default.realpathSync(dir))
4312
4729
  ),
4313
4730
  projectFiles: [
4314
4731
  .../* @__PURE__ */ new Set([
@@ -4321,10 +4738,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4321
4738
  appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
4322
4739
  infoPlist: infoPlistPending ? null : import_plist2.default.build(info),
4323
4740
  infoPlistFile,
4741
+ developmentRegion: str(app.project.project.developmentRegion) ?? "en",
4324
4742
  frameworks,
4743
+ resourceProducts,
4325
4744
  linkedProducts,
4326
4745
  localPackageDirs: [
4327
- ...new Set(localPackageDirs.map((dir) => import_node_fs3.default.realpathSync(dir)))
4746
+ ...new Set(localPackageDirs.map((dir) => import_node_fs4.default.realpathSync(dir)))
4328
4747
  ].sort(),
4329
4748
  binaryFrameworks: [...binaryFrameworks].map(([name, file]) => ({ name, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
4330
4749
  packageResolved,
@@ -4403,7 +4822,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
4403
4822
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
4404
4823
  const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
4405
4824
  const rootModuleName = readRootModuleName(
4406
- app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) && import_node_fs4.default.existsSync(file)).map((file) => import_node_fs4.default.readFileSync(file, "utf8"))
4825
+ app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) && import_node_fs5.default.existsSync(file)).map((file) => import_node_fs5.default.readFileSync(file, "utf8"))
4407
4826
  );
4408
4827
  return {
4409
4828
  applicationName,
@@ -4424,7 +4843,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
4424
4843
  googleSignIn: readGoogleSignInConfiguration(
4425
4844
  dictionary,
4426
4845
  Object.fromEntries(
4427
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs4.default.readFileSync(file, "utf8"))])
4846
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs5.default.readFileSync(file, "utf8"))])
4428
4847
  )
4429
4848
  ),
4430
4849
  supportedInterfaceOrientations,
@@ -4433,11 +4852,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
4433
4852
  alternateIconNames: [...alternateIconNames],
4434
4853
  appIconArtwork: resolveNativeAppIconArtwork(
4435
4854
  app.resources,
4436
- (file) => import_node_fs4.default.readFileSync(file, "utf8"),
4855
+ (file) => import_node_fs5.default.readFileSync(file, "utf8"),
4437
4856
  (file) => {
4438
- const extension = import_node_path6.default.extname(file).toLowerCase();
4857
+ const extension = import_node_path7.default.extname(file).toLowerCase();
4439
4858
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
4440
- return `data:${contentType};base64,${import_node_fs4.default.readFileSync(file).toString("base64")}`;
4859
+ return `data:${contentType};base64,${import_node_fs5.default.readFileSync(file).toString("base64")}`;
4441
4860
  },
4442
4861
  icons,
4443
4862
  app.appIconName,
@@ -4457,10 +4876,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
4457
4876
  }
4458
4877
  var NativeAppTargetSelectionError = class extends Error {
4459
4878
  };
4460
- function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest) {
4879
+ function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
4461
4880
  const read = selectNativeAppIdentityReader(platform, {
4462
4881
  android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
4463
- ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget)
4882
+ ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment)
4464
4883
  });
4465
4884
  return read ? read() : null;
4466
4885
  }
@@ -4468,22 +4887,22 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
4468
4887
  const read = selectNativeAppIdentityReader(platform, {
4469
4888
  android: () => null,
4470
4889
  ios: () => {
4471
- const iosRoot = import_node_path6.default.join(projectRoot, "ios");
4472
- if (!import_node_fs4.default.existsSync(iosRoot)) return null;
4890
+ const iosRoot = import_node_path7.default.join(projectRoot, "ios");
4891
+ if (!import_node_fs5.default.existsSync(iosRoot)) return null;
4473
4892
  const files = {};
4474
- for (const entry of import_node_fs4.default.readdirSync(iosRoot, { withFileTypes: true })) {
4893
+ for (const entry of import_node_fs5.default.readdirSync(iosRoot, { withFileTypes: true })) {
4475
4894
  if (entry.name === "Pods") continue;
4476
4895
  if (entry.isDirectory()) {
4477
4896
  const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
4478
4897
  for (const name of names) {
4479
4898
  const relative = `ios/${entry.name}/${name}`;
4480
- const file = import_node_path6.default.join(projectRoot, relative);
4481
- if (import_node_fs4.default.existsSync(file)) files[relative] = import_node_fs4.default.readFileSync(file, "utf8");
4899
+ const file = import_node_path7.default.join(projectRoot, relative);
4900
+ if (import_node_fs5.default.existsSync(file)) files[relative] = import_node_fs5.default.readFileSync(file, "utf8");
4482
4901
  }
4483
4902
  } else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
4484
4903
  const relative = `ios/${entry.name}`;
4485
- const file = import_node_path6.default.join(projectRoot, relative);
4486
- if (import_node_fs4.default.existsSync(file)) files[relative] = import_node_fs4.default.readFileSync(file, "utf8");
4904
+ const file = import_node_path7.default.join(projectRoot, relative);
4905
+ if (import_node_fs5.default.existsSync(file)) files[relative] = import_node_fs5.default.readFileSync(file, "utf8");
4487
4906
  }
4488
4907
  }
4489
4908
  return extractNativeAppIdentityFromFiles(files, "ios", parseInfoPlist, iosTarget);
@@ -4494,41 +4913,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
4494
4913
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
4495
4914
  const files = {};
4496
4915
  if (androidMergedManifest) {
4497
- const file = import_node_path6.default.resolve(projectRoot, androidMergedManifest);
4498
- if (!import_node_fs4.default.existsSync(file)) return null;
4499
- files[androidMergedManifest] = import_node_fs4.default.readFileSync(file, "utf8");
4916
+ const file = import_node_path7.default.resolve(projectRoot, androidMergedManifest);
4917
+ if (!import_node_fs5.default.existsSync(file)) return null;
4918
+ files[androidMergedManifest] = import_node_fs5.default.readFileSync(file, "utf8");
4500
4919
  } else {
4501
- const androidRoot = import_node_path6.default.join(projectRoot, "android");
4502
- if (!import_node_fs4.default.existsSync(androidRoot)) return null;
4920
+ const androidRoot = import_node_path7.default.join(projectRoot, "android");
4921
+ if (!import_node_fs5.default.existsSync(androidRoot)) return null;
4503
4922
  const collect = (directory) => {
4504
- for (const entry of import_node_fs4.default.readdirSync(directory, { withFileTypes: true })) {
4505
- const file = import_node_path6.default.join(directory, entry.name);
4923
+ for (const entry of import_node_fs5.default.readdirSync(directory, { withFileTypes: true })) {
4924
+ const file = import_node_path7.default.join(directory, entry.name);
4506
4925
  if (entry.isDirectory()) collect(file);
4507
4926
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
4508
- files[import_node_path6.default.relative(projectRoot, file).split(import_node_path6.default.sep).join("/")] = import_node_fs4.default.readFileSync(file, "utf8");
4927
+ files[import_node_path7.default.relative(projectRoot, file).split(import_node_path7.default.sep).join("/")] = import_node_fs5.default.readFileSync(file, "utf8");
4509
4928
  }
4510
4929
  };
4511
- for (const module2 of import_node_fs4.default.readdirSync(androidRoot, { withFileTypes: true })) {
4930
+ for (const module2 of import_node_fs5.default.readdirSync(androidRoot, { withFileTypes: true })) {
4512
4931
  if (!module2.isDirectory()) continue;
4513
- const outputs = import_node_path6.default.join(
4932
+ const outputs = import_node_path7.default.join(
4514
4933
  androidRoot,
4515
4934
  module2.name,
4516
4935
  "build/intermediates/merged_manifests"
4517
4936
  );
4518
- if (import_node_fs4.default.existsSync(outputs)) collect(outputs);
4937
+ if (import_node_fs5.default.existsSync(outputs)) collect(outputs);
4519
4938
  }
4520
4939
  }
4521
4940
  for (const manifest of Object.keys(files)) {
4522
4941
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
4523
4942
  if (!resourceDirectory) continue;
4524
- const absolute = import_node_path6.default.resolve(projectRoot, resourceDirectory);
4525
- if (!import_node_fs4.default.existsSync(absolute)) continue;
4526
- for (const entry of import_node_fs4.default.readdirSync(absolute, { withFileTypes: true })) {
4943
+ const absolute = import_node_path7.default.resolve(projectRoot, resourceDirectory);
4944
+ if (!import_node_fs5.default.existsSync(absolute)) continue;
4945
+ for (const entry of import_node_fs5.default.readdirSync(absolute, { withFileTypes: true })) {
4527
4946
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
4528
- for (const resource of import_node_fs4.default.readdirSync(import_node_path6.default.join(absolute, entry.name))) {
4947
+ for (const resource of import_node_fs5.default.readdirSync(import_node_path7.default.join(absolute, entry.name))) {
4529
4948
  if (!resource.endsWith(".xml")) continue;
4530
4949
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
4531
- files[file] = import_node_fs4.default.readFileSync(import_node_path6.default.resolve(projectRoot, file), "utf8");
4950
+ files[file] = import_node_fs5.default.readFileSync(import_node_path7.default.resolve(projectRoot, file), "utf8");
4532
4951
  }
4533
4952
  }
4534
4953
  }
@@ -4541,11 +4960,11 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
4541
4960
  androidMergedManifest
4542
4961
  );
4543
4962
  }
4544
- function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
4545
- const app = readIosAppTarget(projectRoot, iosTarget);
4963
+ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment) {
4964
+ const app = readIosAppTarget(projectRoot, iosTarget, environment);
4546
4965
  if (!app) return null;
4547
4966
  const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
4548
- const projectManifestPath = import_node_path6.default.join(projectRoot, "package.json");
4967
+ const projectManifestPath = import_node_path7.default.join(projectRoot, "package.json");
4549
4968
  const projectRequire = (0, import_node_module.createRequire)(projectManifestPath);
4550
4969
  let reanimatedManifestPath;
4551
4970
  try {
@@ -4559,22 +4978,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
4559
4978
  throw error;
4560
4979
  }
4561
4980
  const installedManifest = JSON.parse(
4562
- import_node_fs4.default.readFileSync(reanimatedManifestPath, "utf8")
4981
+ import_node_fs5.default.readFileSync(reanimatedManifestPath, "utf8")
4563
4982
  );
4564
4983
  const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
4565
4984
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
4566
4985
  if (Number.parseInt(installedVersion, 10) < 4) return identity;
4567
4986
  const defaults = JSON.parse(
4568
- import_node_fs4.default.readFileSync(
4569
- import_node_path6.default.join(
4570
- import_node_path6.default.dirname(reanimatedManifestPath),
4987
+ import_node_fs5.default.readFileSync(
4988
+ import_node_path7.default.join(
4989
+ import_node_path7.default.dirname(reanimatedManifestPath),
4571
4990
  "src/featureFlags/staticFlags.json"
4572
4991
  ),
4573
4992
  "utf8"
4574
4993
  )
4575
4994
  );
4576
4995
  if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
4577
- const manifest = JSON.parse(import_node_fs4.default.readFileSync(projectManifestPath, "utf8"));
4996
+ const manifest = JSON.parse(import_node_fs5.default.readFileSync(projectManifestPath, "utf8"));
4578
4997
  const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
4579
4998
  const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
4580
4999
  if (overrides !== void 0 && !isRecord(overrides)) {
@@ -4596,10 +5015,10 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
4596
5015
  }
4597
5016
  return { ...identity, reanimatedStaticFeatureFlags: flags };
4598
5017
  }
4599
- function readIosAppTarget(projectRoot, iosTarget) {
4600
- const iosRoot = import_node_path6.default.join(projectRoot, "ios");
4601
- if (!import_node_fs4.default.existsSync(iosRoot)) return null;
4602
- const projects = import_node_fs4.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
5018
+ function readIosAppTarget(projectRoot, iosTarget, environment) {
5019
+ const iosRoot = import_node_path7.default.join(projectRoot, "ios");
5020
+ if (!import_node_fs5.default.existsSync(iosRoot)) return null;
5021
+ const projects = import_node_fs5.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
4603
5022
  if (projects.length === 0) return null;
4604
5023
  if (projects.length > 1 && !iosTarget) {
4605
5024
  throw new NativeAppTargetSelectionError(
@@ -4609,7 +5028,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
4609
5028
  let project = projects[0];
4610
5029
  if (iosTarget && projects.length > 1) {
4611
5030
  const matches = projects.filter(
4612
- (entry) => listXcodeAppTargets(import_node_path6.default.join(iosRoot, entry.name), {
5031
+ (entry) => listXcodeAppTargets(import_node_path7.default.join(iosRoot, entry.name), {
4613
5032
  requireSources: false
4614
5033
  }).includes(iosTarget)
4615
5034
  );
@@ -4623,7 +5042,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
4623
5042
  }
4624
5043
  project = matches[0];
4625
5044
  }
4626
- const xcodeproj = import_node_path6.default.join(iosRoot, project.name);
5045
+ const xcodeproj = import_node_path7.default.join(iosRoot, project.name);
4627
5046
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
4628
5047
  if (!iosTarget && appTargets.length > 1) {
4629
5048
  throw new NativeAppTargetSelectionError(
@@ -4632,7 +5051,8 @@ function readIosAppTarget(projectRoot, iosTarget) {
4632
5051
  }
4633
5052
  return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
4634
5053
  requireSources: false,
4635
- prepareGeneratedSources: true
5054
+ prepareGeneratedSources: true,
5055
+ environment
4636
5056
  });
4637
5057
  }
4638
5058
  // Annotate the CommonJS export names for ESM import in node: