peachsim 0.1.1692 → 0.1.1700

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 (245) hide show
  1. package/cli/bridge-flow-runner.ts +61 -39
  2. package/cli/commands/agent-wrapper.ts +21 -10
  3. package/cli/commands/control.ts +27 -7
  4. package/cli/commands/coverage.ts +1 -1
  5. package/cli/commands/detect.ts +17 -4
  6. package/cli/commands/maestro-compare.ts +25 -99
  7. package/cli/help-core.ts +3 -4
  8. package/cli/maestro-compare.ts +172 -4
  9. package/cli/outbound-endpoints.ts +2 -10
  10. package/detox/index.ts +15 -0
  11. package/detox/launch-permissions.ts +169 -0
  12. package/dist-lib/agent-daemon-client.cjs +2 -2
  13. package/dist-lib/agent-events.cjs +2 -2
  14. package/dist-lib/attached-projects.cjs +2 -2
  15. package/dist-lib/auth/shared-session.cjs +2 -2
  16. package/dist-lib/backend-origin.cjs +2 -2
  17. package/dist-lib/beta.cjs +2 -2
  18. package/dist-lib/beta.mjs +1 -1
  19. package/dist-lib/bridge-constants.cjs +2 -2
  20. package/dist-lib/bridge-contract-input.cjs +2 -2
  21. package/dist-lib/bridge-contract-input.mjs +1 -1
  22. package/dist-lib/bridge-contract.cjs +2 -2
  23. package/dist-lib/bridge-contract.mjs +1 -1
  24. package/dist-lib/bundle-channel.cjs +18273 -15925
  25. package/dist-lib/capture-contract.cjs +2 -2
  26. package/dist-lib/capture-contract.mjs +1 -1
  27. package/dist-lib/cloud-contract.cjs +2 -2
  28. package/dist-lib/cloud-contract.mjs +1 -1
  29. package/dist-lib/cloud-test-args.cjs +2 -2
  30. package/dist-lib/cloud-test-args.mjs +1 -1
  31. package/dist-lib/cloud.cjs +2 -2
  32. package/dist-lib/cloud.mjs +1 -1
  33. package/dist-lib/config.cjs +2 -2
  34. package/dist-lib/config.mjs +1 -1
  35. package/dist-lib/detox/index.cjs +104 -3
  36. package/dist-lib/dev-bundle-resolution.cjs +208 -44
  37. package/dist-lib/expo-swift-bundle.cjs +2349 -1778
  38. package/dist-lib/expo-swift-metadata.cjs +2 -2
  39. package/dist-lib/expo-swift-metadata.mjs +1 -1
  40. package/dist-lib/home-paths.cjs +2 -2
  41. package/dist-lib/host/bridge-host.cjs +7885 -3334
  42. package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
  43. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  44. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  45. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  46. package/dist-lib/host/websocket-proxy.cjs +2 -2
  47. package/dist-lib/index.cjs +297 -77
  48. package/dist-lib/jump-to-source-babel.cjs +2 -2
  49. package/dist-lib/jump-to-source-native.cjs +2 -2
  50. package/dist-lib/kotlin-host.cjs +2 -2
  51. package/dist-lib/menu.cjs +2 -2
  52. package/dist-lib/menu.mjs +1 -1
  53. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  54. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  55. package/dist-lib/metro-production-bundle.cjs +2 -2
  56. package/dist-lib/metro-production-bundle.mjs +1 -1
  57. package/dist-lib/metro.cjs +294 -74
  58. package/dist-lib/native-app-identity-project.cjs +48 -37
  59. package/dist-lib/native-app-identity-project.mjs +47 -36
  60. package/dist-lib/native-app-identity.cjs +2 -2
  61. package/dist-lib/native-app-identity.mjs +1 -1
  62. package/dist-lib/native-firebase-metadata.cjs +2 -2
  63. package/dist-lib/native-firebase-metadata.mjs +1 -1
  64. package/dist-lib/plist.cjs +2 -2
  65. package/dist-lib/plist.mjs +1 -1
  66. package/dist-lib/profiles.cjs +2 -2
  67. package/dist-lib/public-brand.cjs +2 -2
  68. package/dist-lib/public-origins-lib-esm.json +24 -23
  69. package/dist-lib/public-origins-lib.json +199 -79
  70. package/dist-lib/react-native-host-modules.cjs +2 -2
  71. package/dist-lib/react-native-host-modules.mjs +1 -1
  72. package/dist-lib/reap-browser.cjs +2 -2
  73. package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
  74. package/dist-lib/sdk.cjs +2 -2
  75. package/dist-lib/sdk.mjs +1 -1
  76. package/dist-lib/skills.cjs +19600 -15992
  77. package/dist-lib/swift-compile.cjs +640 -402
  78. package/dist-lib/swift-compile.mjs +595 -357
  79. package/dist-lib/swift-package.cjs +24 -20
  80. package/dist-lib/swift-package.mjs +23 -19
  81. package/dist-lib/swift-submit.cjs +2 -2
  82. package/dist-lib/swift-submit.mjs +1 -1
  83. package/dist-lib/swift-toolchain.cjs +31 -4
  84. package/dist-lib/swift.cjs +2 -2
  85. package/dist-lib/vite-swift.cjs +1559 -1208
  86. package/dist-lib/vite.cjs +251 -42
  87. package/dist-lib/worklet-executable.cjs +2 -2
  88. package/dist-lib/worklet-executable.mjs +1 -1
  89. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
  90. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
  91. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
  92. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
  93. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
  94. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  95. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  96. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
  97. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
  98. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
  99. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
  100. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
  101. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
  102. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
  103. package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/runtime-companion.json +1 -1
  106. package/scripts/dev-server-scanner.ts +4 -0
  107. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
  108. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
  109. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
  110. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
  111. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
  112. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
  113. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
  114. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
  115. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
  116. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
  117. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
  118. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
  119. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
  120. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
  121. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
  122. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
  123. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
  124. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
  125. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
  126. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
  127. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
  128. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
  129. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
  130. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
  131. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
  132. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
  133. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
  134. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
  135. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
  136. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
  137. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
  138. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
  139. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
  140. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
  141. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
  142. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
  143. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
  144. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
  145. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
  146. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
  147. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
  148. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
  149. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
  150. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
  151. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
  152. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
  153. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
  154. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
  155. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
  156. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
  157. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
  158. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
  159. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
  173. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
  176. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
  177. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
  178. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
  179. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
  180. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
  181. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
  182. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
  183. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
  184. package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
  185. package/sdk/ios/usr/include/copyfile.h +143 -0
  186. package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
  187. package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
  188. package/sdk/ios/usr/include/malloc/_platform.h +80 -0
  189. package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
  190. package/sdk/ios/usr/include/malloc/malloc.h +768 -0
  191. package/sdk/ios/usr/include/os/availability.h +168 -6
  192. package/sdk/ios/usr/include/os/base.h +351 -0
  193. package/sdk/ios/usr/include/os/clock.h +18 -0
  194. package/sdk/ios/usr/include/os/lock.h +232 -10
  195. package/sdk/ios/usr/include/os/log.h +521 -38
  196. package/sdk/ios/usr/include/os/object.h +320 -3
  197. package/sdk/ios/usr/include/os/trace.h +492 -0
  198. package/sdk/ios/usr/include/os/trace_base.h +167 -0
  199. package/sdk/ios/usr/include/os/workgroup.h +37 -0
  200. package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
  201. package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
  202. package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
  203. package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
  204. package/sdk/ios/usr/include/sys/cdefs.h +38 -0
  205. package/sdk/ios/wasm/include/unistd.h +3 -0
  206. package/skills/contrast/SKILL.md +3 -0
  207. package/src/codex-client.ts +11 -6
  208. package/src/dev-bundle-resolution.ts +124 -48
  209. package/src/expo-native-workspace.ts +176 -0
  210. package/src/expo-swift-host.ts +161 -26
  211. package/src/expo-swift-ready.ts +14 -28
  212. package/src/expoSwiftContract.ts +4 -1
  213. package/src/generated/swift-c-predefines.json +68 -12
  214. package/src/host/bridge-host.ts +5 -0
  215. package/src/installed-package-versions.ts +14 -1
  216. package/src/metro-project-root.ts +44 -33
  217. package/src/native-app-identity-project.ts +1 -0
  218. package/src/nitro-adapter.lock.json +916 -10
  219. package/src/nitro-adapter.ts +33 -24
  220. package/src/nitro-bundle.ts +108 -22
  221. package/src/nitro-compile.ts +32 -5
  222. package/src/nitro-source.ts +13 -3
  223. package/src/nitroAdapterContract.ts +100 -20
  224. package/src/node-http-fetch.ts +116 -0
  225. package/src/packageVersionsContract.ts +46 -0
  226. package/src/serverDiscoveryContract.ts +1 -0
  227. package/src/settingsContract.ts +0 -30
  228. package/src/swift-binary-modules.ts +20 -5
  229. package/src/swift-compile.ts +168 -48
  230. package/src/swift-coverage/xcode-assets.ts +4 -3
  231. package/src/swift-host.ts +14 -3
  232. package/src/swift-objc-compile.ts +32 -5
  233. package/src/swift-objc-metadata.ts +2 -2
  234. package/src/swift-objc-platform.ts +2 -2
  235. package/src/swift-objc-standin.ts +43 -13
  236. package/src/swift-package.ts +33 -26
  237. package/src/swift-source-pods.ts +126 -41
  238. package/src/swift-standin-digest.ts +77 -0
  239. package/src/swift-standin-emit.ts +40 -4
  240. package/src/swift-standins.ts +68 -19
  241. package/src/swift-toolchain.ts +38 -0
  242. package/src/swiftContract.ts +8 -0
  243. package/src/vite-plugin.ts +0 -10
  244. package/src/xcode-project.ts +62 -42
  245. package/src/settings-flags.ts +0 -107
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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 __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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 __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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 __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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 __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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 __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../contrast-runtime-delivery/src/version.ts
4
4
  function isValidRuntimeVersion(value) {
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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;
5
5
  var __defProp = Object.defineProperty;
@@ -2355,7 +2355,7 @@ var import_node_module = require("node:module");
2355
2355
  var import_node_path2 = require("node:path");
2356
2356
 
2357
2357
  // runtime-companion.json
2358
- var runtime_companion_default = { abi: 1, sha256: "0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630", file: "node/cli-0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630.cjs" };
2358
+ var runtime_companion_default = { abi: 1, sha256: "1f3d4b48d9b79b8579197585654c7ea6f1a69bcc5f4cb2dad706f31aa88d791b", file: "node/cli-1f3d4b48d9b79b8579197585654c7ea6f1a69bcc5f4cb2dad706f31aa88d791b.cjs" };
2359
2359
 
2360
2360
  // src/runtime-assets.ts
2361
2361
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -8042,6 +8042,101 @@ function frameTimingRoundingBound(...operands) {
8042
8042
  return Number.EPSILON / (1 - Number.EPSILON) * operands.reduce((sum, value) => sum + Math.abs(value), 0);
8043
8043
  }
8044
8044
 
8045
+ // detox/launch-permissions.ts
8046
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8047
+ var DETOX_BASIC_PERMISSION_KINDS = {
8048
+ notifications: "notifications",
8049
+ calendar: "calendars",
8050
+ camera: "camera",
8051
+ medialibrary: "media-library",
8052
+ microphone: "microphone",
8053
+ motion: "motion",
8054
+ reminders: "reminders",
8055
+ siri: "siri",
8056
+ speech: "speech-recognition",
8057
+ faceid: "face-id",
8058
+ userTracking: "app-tracking-transparency"
8059
+ };
8060
+ var DETOX_EXTENDED_PERMISSION_KINDS = {
8061
+ contacts: "contacts",
8062
+ photos: "photo-library"
8063
+ };
8064
+ var DETOX_UNSIMULATED_KINDS = /* @__PURE__ */ new Set(["health", "homekit"]);
8065
+ function basicMutation(value, name2) {
8066
+ if (value === "YES") return { status: "authorized" };
8067
+ if (value === "NO") return { status: "denied" };
8068
+ if (value === "unset") return { status: "not-determined" };
8069
+ throw new Error(`launchApp.permissions.${name2} must be YES, NO, or unset`);
8070
+ }
8071
+ function locationMutations(value) {
8072
+ switch (value) {
8073
+ case "always":
8074
+ return [
8075
+ { kind: "location-when-in-use", mutation: { status: "authorized" } },
8076
+ { kind: "location-always", mutation: { status: "authorized" } }
8077
+ ];
8078
+ case "inuse":
8079
+ return [
8080
+ { kind: "location-when-in-use", mutation: { status: "authorized" } },
8081
+ { kind: "location-always", mutation: { status: "not-determined" } }
8082
+ ];
8083
+ case "never":
8084
+ return [
8085
+ { kind: "location-when-in-use", mutation: { status: "denied" } },
8086
+ { kind: "location-always", mutation: { status: "denied" } }
8087
+ ];
8088
+ case "unset":
8089
+ return [
8090
+ { kind: "location-when-in-use", mutation: { status: "not-determined" } },
8091
+ { kind: "location-always", mutation: { status: "not-determined" } }
8092
+ ];
8093
+ default:
8094
+ throw new Error(
8095
+ "launchApp.permissions.location must be always, inuse, never, or unset"
8096
+ );
8097
+ }
8098
+ }
8099
+ function detoxLaunchPermissionMutations(permissions) {
8100
+ const mutations = [];
8101
+ for (const [name2, value] of Object.entries(permissions)) {
8102
+ if (value === void 0) continue;
8103
+ if (name2 === "location") {
8104
+ mutations.push(...locationMutations(value));
8105
+ continue;
8106
+ }
8107
+ if (DETOX_UNSIMULATED_KINDS.has(name2)) continue;
8108
+ const extendedKind = DETOX_EXTENDED_PERMISSION_KINDS[name2];
8109
+ if (extendedKind) {
8110
+ mutations.push({
8111
+ kind: extendedKind,
8112
+ mutation: value === "limited" ? { status: "limited", limitedResourceIds: [] } : basicMutation(value, name2)
8113
+ });
8114
+ continue;
8115
+ }
8116
+ const basicKind = DETOX_BASIC_PERMISSION_KINDS[name2];
8117
+ if (basicKind) {
8118
+ mutations.push({ kind: basicKind, mutation: basicMutation(value, name2) });
8119
+ continue;
8120
+ }
8121
+ }
8122
+ return mutations;
8123
+ }
8124
+ async function applyDetoxLaunchPermissions(page, permissions) {
8125
+ const mutations = detoxLaunchPermissionMutations(permissions);
8126
+ if (mutations.length === 0) return;
8127
+ await page.evaluate(async (entries) => {
8128
+ const test = window.SootSim?.bridges?.test;
8129
+ if (typeof test?.permissionGuestAppId !== "function" || typeof test?.permissionSetAppPermission !== "function" || typeof test?.permissionGetAppSettings !== "function") {
8130
+ throw new Error("sootsim permission bridge is unavailable");
8131
+ }
8132
+ const appId = await test.permissionGuestAppId();
8133
+ for (const { kind, mutation } of entries) {
8134
+ await test.permissionSetAppPermission(appId, kind, mutation);
8135
+ }
8136
+ await test.permissionGetAppSettings(appId);
8137
+ }, mutations);
8138
+ }
8139
+
8045
8140
  // detox/matchers.ts
8046
8141
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8047
8142
  function createMatcher(type, value) {
@@ -9397,6 +9492,9 @@ var device = {
9397
9492
  );
9398
9493
  }
9399
9494
  await waitForSootsimTree(page, 1e4);
9495
+ if (opts?.permissions && DETOX_PLATFORM === "ios") {
9496
+ await applyDetoxLaunchPermissions(page, opts.permissions);
9497
+ }
9400
9498
  if (opts?.url) {
9401
9499
  await device.openURL({ url: opts.url, sourceApp: opts.sourceApp });
9402
9500
  }
@@ -9552,6 +9650,9 @@ var device = {
9552
9650
  );
9553
9651
  }
9554
9652
  await waitForSootsimTree(_page, 3e4);
9653
+ if (opts?.permissions && DETOX_PLATFORM === "ios") {
9654
+ await applyDetoxLaunchPermissions(_page, opts.permissions);
9655
+ }
9555
9656
  await waitForSootsimSurfaceMetrics(_page, 3e4);
9556
9657
  await waitForSootsimShellReady(_page, 3e4);
9557
9658
  await waitForSootsimWorkletsIdle(_page, 3e3);
@@ -1,10 +1,15 @@
1
- /*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
1
+ /*! peach v0.1.1700 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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
+ var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
7
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __esm = (fn, res) => function __init() {
11
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
+ };
8
13
  var __export = (target, all) => {
9
14
  for (var name in all)
10
15
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -17,8 +22,128 @@ var __copyProps = (to, from, except, desc) => {
17
22
  }
18
23
  return to;
19
24
  };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
20
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
34
 
35
+ // <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
36
+ var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
37
+ "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
38
+ }
39
+ });
40
+
41
+ // src/node-http-fetch.ts
42
+ var node_http_fetch_exports = {};
43
+ __export(node_http_fetch_exports, {
44
+ nodeHttpFetch: () => nodeHttpFetch
45
+ });
46
+ function nodeHttpFetch(url, init = {}, redirects = 0) {
47
+ const target = new URL(url);
48
+ const transport = target.protocol === "https:" ? import_node_https.default : import_node_http.default;
49
+ return new Promise((resolve, reject) => {
50
+ const req = transport.request(
51
+ target,
52
+ { method: "GET", headers: init.headers, signal: init.signal },
53
+ (res) => {
54
+ const status = res.statusCode ?? 0;
55
+ const location = res.headers.location;
56
+ if (status >= 300 && status < 400 && location) {
57
+ res.resume();
58
+ if (redirects >= MAX_REDIRECTS) {
59
+ reject(new Error(`too many redirects from ${url}`));
60
+ return;
61
+ }
62
+ resolve(nodeHttpFetch(new URL(location, target).href, init, redirects + 1));
63
+ return;
64
+ }
65
+ const headers = new Headers();
66
+ for (const [name, value] of Object.entries(res.headers)) {
67
+ if (Array.isArray(value)) for (const entry of value) headers.append(name, entry);
68
+ else if (value !== void 0) headers.set(name, value);
69
+ }
70
+ if (BODYLESS_STATUS.has(status)) {
71
+ res.resume();
72
+ resolve(new Response(null, { status, headers }));
73
+ return;
74
+ }
75
+ let source = res;
76
+ const codings = (res.headers["content-encoding"] ?? "").split(",").map((entry) => entry.trim().toLowerCase()).filter((entry) => entry && entry !== "identity");
77
+ if (codings.every((coding) => DECODABLE_CODINGS.has(coding))) {
78
+ for (const coding of codings.reverse()) {
79
+ let decoder;
80
+ if (coding === "br") decoder = import_node_zlib.default.createBrotliDecompress();
81
+ else if (coding === "deflate") {
82
+ let inner;
83
+ decoder = new import_node_stream.Transform({
84
+ transform(chunk, _encoding, done) {
85
+ if (!inner) {
86
+ inner = (chunk[0] & 15) === 8 ? import_node_zlib.default.createInflate(TRUNCATION_TOLERANT) : import_node_zlib.default.createInflateRaw(TRUNCATION_TOLERANT);
87
+ inner.on("data", (data) => decoder.push(data));
88
+ inner.on("error", (error) => decoder.destroy(error));
89
+ }
90
+ inner.write(chunk, done);
91
+ },
92
+ flush(done) {
93
+ if (!inner) return done();
94
+ inner.once("end", () => done());
95
+ inner.end();
96
+ },
97
+ destroy(error, done) {
98
+ inner?.destroy();
99
+ done(error);
100
+ }
101
+ });
102
+ } else decoder = import_node_zlib.default.createGunzip(TRUNCATION_TOLERANT);
103
+ source = (0, import_node_stream.pipeline)(source, decoder, () => {
104
+ });
105
+ }
106
+ }
107
+ const chunks = source[Symbol.asyncIterator]();
108
+ const body = new ReadableStream({
109
+ async pull(controller) {
110
+ try {
111
+ const chunk = await chunks.next();
112
+ if (chunk.done) controller.close();
113
+ else if (chunk.value instanceof Uint8Array) controller.enqueue(chunk.value);
114
+ else controller.error(new Error("HTTP response returned a non-byte chunk"));
115
+ } catch (error) {
116
+ controller.error(error);
117
+ }
118
+ },
119
+ cancel() {
120
+ source.destroy();
121
+ res.destroy();
122
+ }
123
+ });
124
+ resolve(new Response(body, { status, headers }));
125
+ }
126
+ );
127
+ req.on("error", reject);
128
+ req.end();
129
+ });
130
+ }
131
+ var import_node_http, import_node_https, import_node_stream, import_node_zlib, BODYLESS_STATUS, TRUNCATION_TOLERANT, MAX_REDIRECTS, DECODABLE_CODINGS;
132
+ var init_node_http_fetch = __esm({
133
+ "src/node-http-fetch.ts"() {
134
+ "use strict";
135
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
136
+ import_node_http = __toESM(require("node:http"), 1);
137
+ import_node_https = __toESM(require("node:https"), 1);
138
+ import_node_stream = require("node:stream");
139
+ import_node_zlib = __toESM(require("node:zlib"), 1);
140
+ BODYLESS_STATUS = /* @__PURE__ */ new Set([101, 204, 205, 304]);
141
+ TRUNCATION_TOLERANT = { finishFlush: import_node_zlib.default.constants.Z_SYNC_FLUSH };
142
+ MAX_REDIRECTS = 5;
143
+ DECODABLE_CODINGS = /* @__PURE__ */ new Set(["gzip", "x-gzip", "deflate", "br"]);
144
+ }
145
+ });
146
+
22
147
  // src/dev-bundle-resolution.ts
23
148
  var dev_bundle_resolution_exports = {};
24
149
  __export(dev_bundle_resolution_exports, {
@@ -30,8 +155,10 @@ __export(dev_bundle_resolution_exports, {
30
155
  resolveConnectionInput: () => resolveConnectionInput
31
156
  });
32
157
  module.exports = __toCommonJS(dev_bundle_resolution_exports);
158
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
33
159
 
34
160
  // src/backend-origin.ts
161
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
35
162
  var LOOPBACK_PROBE_HOSTNAMES = ["127.0.0.1", "::1"];
36
163
  function normalizeHostname(hostname) {
37
164
  return hostname.replace(/^\[|\]$/g, "").toLowerCase();
@@ -47,6 +174,7 @@ function isLoopbackHost(hostname) {
47
174
  }
48
175
 
49
176
  // src/expo-manifest-body.ts
177
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
50
178
  function parseExpoManifestBody(body) {
51
179
  const opening = /^(--[^\r\n]+)\r?\n/.exec(body);
52
180
  if (!opening) return JSON.parse(body);
@@ -59,6 +187,7 @@ function parseExpoManifestBody(body) {
59
187
  }
60
188
 
61
189
  // src/native-dev-bundle-url.ts
190
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
62
191
  var METRO_BUNDLE_PATH = "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
63
192
  function isAbsoluteHttpUrl(url) {
64
193
  return /^https?:\/\//i.test(url);
@@ -169,7 +298,8 @@ async function resolvePortViaServerScan(port) {
169
298
  bundleUrl: normalizeNativeDevBundleUrl(match.bundleUrl),
170
299
  port,
171
300
  framework: typeof match.framework === "string" ? match.framework : "unknown",
172
- projectName: typeof match.projectName === "string" ? match.projectName : void 0
301
+ projectName: typeof match.projectName === "string" ? match.projectName : void 0,
302
+ manifestProjectRoot: typeof match.manifestProjectRoot === "string" || match.manifestProjectRoot === null ? match.manifestProjectRoot : void 0
173
303
  };
174
304
  } catch {
175
305
  return null;
@@ -177,41 +307,71 @@ async function resolvePortViaServerScan(port) {
177
307
  }
178
308
  var MANIFEST_PROBE_TIMEOUT_MS = 3e4;
179
309
  var manifestRequests = /* @__PURE__ */ new Map();
180
- async function fetchDevManifest(baseUrl, pageOrigin) {
310
+ async function startDevManifestRequest(normalizedBaseUrl, pageOrigin, signal) {
311
+ const init = { headers: { "expo-platform": "ios" }, signal };
312
+ const res = pageOrigin ? await fetchDevProbe(`${normalizedBaseUrl}/`, pageOrigin, init) : await (await Promise.resolve().then(() => (init_node_http_fetch(), node_http_fetch_exports))).nodeHttpFetch(`${normalizedBaseUrl}/`, init);
313
+ const body = await res.arrayBuffer();
314
+ return new Response(body.byteLength ? body : null, {
315
+ status: res.status,
316
+ headers: res.headers
317
+ });
318
+ }
319
+ async function fetchDevManifest(baseUrl, pageOrigin, options = {}) {
320
+ options.signal?.throwIfAborted();
181
321
  const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
182
- const existing = manifestRequests.get(normalizedBaseUrl);
183
- if (existing) return (await existing)?.clone();
184
- const pending = fetchDevProbe(`${normalizedBaseUrl}/`, pageOrigin, {
185
- headers: { "expo-platform": "ios" }
186
- }).then(async (res) => {
187
- const body = await res.arrayBuffer();
188
- return new Response(body.byteLength ? body : null, {
189
- status: res.status,
190
- headers: res.headers
322
+ let request = manifestRequests.get(normalizedBaseUrl);
323
+ if (!request) {
324
+ const controller = new AbortController();
325
+ const promise = startDevManifestRequest(
326
+ normalizedBaseUrl,
327
+ pageOrigin,
328
+ controller.signal
329
+ ).finally(() => {
330
+ if (manifestRequests.get(normalizedBaseUrl)?.controller === controller)
331
+ manifestRequests.delete(normalizedBaseUrl);
191
332
  });
192
- }).catch(() => void 0);
193
- let probeDeadline;
194
- const request = Promise.race([
195
- pending,
196
- new Promise((resolve) => {
197
- probeDeadline = setTimeout(() => resolve("timeout"), MANIFEST_PROBE_TIMEOUT_MS);
198
- })
199
- ]).then((answered) => {
200
- if (answered === "timeout")
201
- throw new Error(
202
- `Metro manifest request timed out after ${MANIFEST_PROBE_TIMEOUT_MS / 1e3}s: ${normalizedBaseUrl}/. Wait for the dev server to finish starting or check its manifest endpoint.`
203
- );
204
- return answered;
205
- }).finally(() => {
206
- clearTimeout(probeDeadline);
207
- manifestRequests.delete(normalizedBaseUrl);
208
- });
209
- manifestRequests.set(normalizedBaseUrl, request);
210
- return (await request)?.clone();
333
+ request = { promise, controller, clients: 0 };
334
+ manifestRequests.set(normalizedBaseUrl, request);
335
+ }
336
+ const current = request;
337
+ current.clients++;
338
+ const waitMs = options.waitMs === void 0 ? MANIFEST_PROBE_TIMEOUT_MS : options.waitMs;
339
+ let deadline;
340
+ let onAbort;
341
+ try {
342
+ const stopped = new Promise((_, reject) => {
343
+ onAbort = () => {
344
+ const reason = options.signal?.reason;
345
+ reject(
346
+ reason instanceof Error ? reason : new Error("Metro manifest request canceled", { cause: reason })
347
+ );
348
+ };
349
+ options.signal?.addEventListener("abort", onAbort, { once: true });
350
+ if (options.signal?.aborted) onAbort();
351
+ if (waitMs !== null)
352
+ deadline = setTimeout(
353
+ () => reject(
354
+ new Error(
355
+ `Metro manifest request timed out after ${waitMs / 1e3}s: ${normalizedBaseUrl}/`
356
+ )
357
+ ),
358
+ waitMs
359
+ );
360
+ });
361
+ return (await Promise.race([current.promise, stopped])).clone();
362
+ } finally {
363
+ clearTimeout(deadline);
364
+ if (onAbort) options.signal?.removeEventListener("abort", onAbort);
365
+ current.clients--;
366
+ if (options.signal?.aborted && current.clients === 0) {
367
+ if (manifestRequests.get(normalizedBaseUrl) === current)
368
+ manifestRequests.delete(normalizedBaseUrl);
369
+ current.controller.abort(options.signal.reason);
370
+ }
371
+ }
211
372
  }
212
- async function probeExpoManifest(normalizedBaseUrl, port, pageOrigin) {
213
- const answered = await fetchDevManifest(normalizedBaseUrl, pageOrigin);
214
- if (answered === void 0) return { state: "no-answer" };
373
+ async function probeExpoManifest(normalizedBaseUrl, port, pageOrigin, options) {
374
+ const answered = await fetchDevManifest(normalizedBaseUrl, pageOrigin, options);
215
375
  if (answered.status === 404 || answered.status === 405) return { state: "no-manifest" };
216
376
  if (answered.status < 200 || answered.status >= 300)
217
377
  throw new Error(
@@ -236,9 +396,12 @@ async function probeExpoManifest(normalizedBaseUrl, port, pageOrigin) {
236
396
  const launchUrl = rawLaunchUrl ? alignLoopbackBundleUrlWithProbe(rawLaunchUrl, normalizedBaseUrl) : void 0;
237
397
  const name = "name" in client && typeof client.name === "string" ? client.name : void 0;
238
398
  if (!launchUrl && !name) return { state: "no-manifest" };
399
+ const internal = "_internal" in client && client._internal && typeof client._internal === "object" ? client._internal : {};
400
+ const manifestProjectRoot = "projectRoot" in internal && typeof internal.projectRoot === "string" && internal.projectRoot.length > 0 ? internal.projectRoot : null;
239
401
  return {
240
402
  state: "resolved",
241
403
  bundle: {
404
+ manifestProjectRoot,
242
405
  bundleUrl: normalizeNativeDevBundleUrl(
243
406
  launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
244
407
  ),
@@ -262,9 +425,9 @@ async function isPackagerRunning(normalizedBaseUrl, pageOrigin) {
262
425
  return false;
263
426
  }
264
427
  }
265
- async function probeBaseUrlBundleDirect(baseUrl, port, pageOrigin) {
428
+ async function probeBaseUrlBundleDirect(baseUrl, port, pageOrigin, options) {
266
429
  const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
267
- const manifest = await probeExpoManifest(normalizedBaseUrl, port, pageOrigin);
430
+ const manifest = await probeExpoManifest(normalizedBaseUrl, port, pageOrigin, options);
268
431
  if (manifest.state === "resolved") return manifest.bundle;
269
432
  if (manifest.state === "no-answer") return null;
270
433
  if (!await isPackagerRunning(normalizedBaseUrl, pageOrigin)) return null;
@@ -274,7 +437,7 @@ async function probeBaseUrlBundleDirect(baseUrl, port, pageOrigin) {
274
437
  framework: "metro"
275
438
  };
276
439
  }
277
- async function probeBaseUrlBundle(baseUrl, port, pageOrigin) {
440
+ async function probeBaseUrlBundle(baseUrl, port, pageOrigin, options) {
278
441
  try {
279
442
  if (isLoopbackHost(new URL(baseUrl).hostname)) {
280
443
  const viaScan = await resolvePortViaServerScan(port);
@@ -282,9 +445,9 @@ async function probeBaseUrlBundle(baseUrl, port, pageOrigin) {
282
445
  }
283
446
  } catch {
284
447
  }
285
- return probeBaseUrlBundleDirect(baseUrl, port, pageOrigin);
448
+ return probeBaseUrlBundleDirect(baseUrl, port, pageOrigin, options);
286
449
  }
287
- async function probePortBundle(port, pageOrigin) {
450
+ async function probePortBundle(port, pageOrigin, options = {}) {
288
451
  const viaScan = await resolvePortViaServerScan(port);
289
452
  if (viaScan) return viaScan;
290
453
  const unresolved = buildUnresolvedTargetError(`localhost:${port}`);
@@ -294,7 +457,8 @@ async function probePortBundle(port, pageOrigin) {
294
457
  const bundle = await probeBaseUrlBundleDirect(
295
458
  buildLoopbackProbeBaseUrl("http:", hostname, port),
296
459
  port,
297
- pageOrigin
460
+ pageOrigin,
461
+ options
298
462
  );
299
463
  if (!bundle) throw unresolved;
300
464
  return bundle;
@@ -307,11 +471,11 @@ async function probePortBundle(port, pageOrigin) {
307
471
  return null;
308
472
  }
309
473
  }
310
- async function resolveConnectionInput(input, pageOrigin) {
474
+ async function resolveConnectionInput(input, pageOrigin, options = {}) {
311
475
  const trimmed = input.trim();
312
476
  if (/^\d+$/.test(trimmed)) {
313
477
  const port2 = parseInt(trimmed, 10);
314
- const resolved = await probePortBundle(port2, pageOrigin);
478
+ const resolved = await probePortBundle(port2, pageOrigin, options);
315
479
  if (resolved) return resolved;
316
480
  throw buildUnresolvedTargetError(`localhost:${port2}`);
317
481
  }
@@ -328,7 +492,7 @@ async function resolveConnectionInput(input, pageOrigin) {
328
492
  const port = parsed.port ? parseInt(parsed.port, 10) : getDefaultPortForProtocol(protocol);
329
493
  const baseUrl = buildBaseUrl(protocol, parsed.hostname, port);
330
494
  if (isBaseServerUrl(parsed)) {
331
- const resolved = await probeBaseUrlBundle(baseUrl, port, pageOrigin);
495
+ const resolved = await probeBaseUrlBundle(baseUrl, port, pageOrigin, options);
332
496
  if (resolved) return resolved;
333
497
  throw buildUnresolvedTargetError(baseUrl);
334
498
  }