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 __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -425,11 +425,117 @@ var init_config = __esm({
425
425
  }
426
426
  });
427
427
 
428
+ // src/node-http-fetch.ts
429
+ var node_http_fetch_exports = {};
430
+ __export(node_http_fetch_exports, {
431
+ nodeHttpFetch: () => nodeHttpFetch
432
+ });
433
+ function nodeHttpFetch(url, init = {}, redirects = 0) {
434
+ const target = new URL(url);
435
+ const transport = target.protocol === "https:" ? import_node_https.default : import_node_http.default;
436
+ return new Promise((resolve4, reject) => {
437
+ const req = transport.request(
438
+ target,
439
+ { method: "GET", headers: init.headers, signal: init.signal },
440
+ (res) => {
441
+ const status = res.statusCode ?? 0;
442
+ const location = res.headers.location;
443
+ if (status >= 300 && status < 400 && location) {
444
+ res.resume();
445
+ if (redirects >= MAX_REDIRECTS) {
446
+ reject(new Error(`too many redirects from ${url}`));
447
+ return;
448
+ }
449
+ resolve4(nodeHttpFetch(new URL(location, target).href, init, redirects + 1));
450
+ return;
451
+ }
452
+ const headers = new Headers();
453
+ for (const [name2, value] of Object.entries(res.headers)) {
454
+ if (Array.isArray(value)) for (const entry of value) headers.append(name2, entry);
455
+ else if (value !== void 0) headers.set(name2, value);
456
+ }
457
+ if (BODYLESS_STATUS.has(status)) {
458
+ res.resume();
459
+ resolve4(new Response(null, { status, headers }));
460
+ return;
461
+ }
462
+ let source = res;
463
+ const codings = (res.headers["content-encoding"] ?? "").split(",").map((entry) => entry.trim().toLowerCase()).filter((entry) => entry && entry !== "identity");
464
+ if (codings.every((coding) => DECODABLE_CODINGS.has(coding))) {
465
+ for (const coding of codings.reverse()) {
466
+ let decoder;
467
+ if (coding === "br") decoder = import_node_zlib.default.createBrotliDecompress();
468
+ else if (coding === "deflate") {
469
+ let inner;
470
+ decoder = new import_node_stream.Transform({
471
+ transform(chunk, _encoding, done) {
472
+ if (!inner) {
473
+ inner = (chunk[0] & 15) === 8 ? import_node_zlib.default.createInflate(TRUNCATION_TOLERANT) : import_node_zlib.default.createInflateRaw(TRUNCATION_TOLERANT);
474
+ inner.on("data", (data) => decoder.push(data));
475
+ inner.on("error", (error) => decoder.destroy(error));
476
+ }
477
+ inner.write(chunk, done);
478
+ },
479
+ flush(done) {
480
+ if (!inner) return done();
481
+ inner.once("end", () => done());
482
+ inner.end();
483
+ },
484
+ destroy(error, done) {
485
+ inner?.destroy();
486
+ done(error);
487
+ }
488
+ });
489
+ } else decoder = import_node_zlib.default.createGunzip(TRUNCATION_TOLERANT);
490
+ source = (0, import_node_stream.pipeline)(source, decoder, () => {
491
+ });
492
+ }
493
+ }
494
+ const chunks = source[Symbol.asyncIterator]();
495
+ const body = new ReadableStream({
496
+ async pull(controller) {
497
+ try {
498
+ const chunk = await chunks.next();
499
+ if (chunk.done) controller.close();
500
+ else if (chunk.value instanceof Uint8Array) controller.enqueue(chunk.value);
501
+ else controller.error(new Error("HTTP response returned a non-byte chunk"));
502
+ } catch (error) {
503
+ controller.error(error);
504
+ }
505
+ },
506
+ cancel() {
507
+ source.destroy();
508
+ res.destroy();
509
+ }
510
+ });
511
+ resolve4(new Response(body, { status, headers }));
512
+ }
513
+ );
514
+ req.on("error", reject);
515
+ req.end();
516
+ });
517
+ }
518
+ var import_node_http, import_node_https, import_node_stream, import_node_zlib, BODYLESS_STATUS, TRUNCATION_TOLERANT, MAX_REDIRECTS, DECODABLE_CODINGS;
519
+ var init_node_http_fetch = __esm({
520
+ "src/node-http-fetch.ts"() {
521
+ "use strict";
522
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
523
+ import_node_http = __toESM(require("node:http"), 1);
524
+ import_node_https = __toESM(require("node:https"), 1);
525
+ import_node_stream = require("node:stream");
526
+ import_node_zlib = __toESM(require("node:zlib"), 1);
527
+ BODYLESS_STATUS = /* @__PURE__ */ new Set([101, 204, 205, 304]);
528
+ TRUNCATION_TOLERANT = { finishFlush: import_node_zlib.default.constants.Z_SYNC_FLUSH };
529
+ MAX_REDIRECTS = 5;
530
+ DECODABLE_CODINGS = /* @__PURE__ */ new Set(["gzip", "x-gzip", "deflate", "br"]);
531
+ }
532
+ });
533
+
428
534
  // runtime-companion.json
429
535
  var runtime_companion_default;
430
536
  var init_runtime_companion = __esm({
431
537
  "runtime-companion.json"() {
432
- runtime_companion_default = { abi: 1, sha256: "0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630", file: "node/cli-0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630.cjs" };
538
+ runtime_companion_default = { abi: 1, sha256: "1f3d4b48d9b79b8579197585654c7ea6f1a69bcc5f4cb2dad706f31aa88d791b", file: "node/cli-1f3d4b48d9b79b8579197585654c7ea6f1a69bcc5f4cb2dad706f31aa88d791b.cjs" };
433
539
  }
434
540
  });
435
541
 
@@ -6654,6 +6760,23 @@ function readPackageVersions(value) {
6654
6760
  function insertPackageVersionsFooter(source, versions) {
6655
6761
  return insertBundleGlobalFooter(source, FOOTER2, readPackageVersions(versions));
6656
6762
  }
6763
+ var WORKLETS_STATIC_FLAGS_KEY = "react-native-worklets/staticFlags.json";
6764
+ function isFlagRecord(value) {
6765
+ return typeof value === "object" && value !== null && !Array.isArray(value);
6766
+ }
6767
+ function resolveWorkletsStaticFlags(defaults, appManifest) {
6768
+ if (!isFlagRecord(defaults)) throw new Error("Worklets static flags are malformed");
6769
+ const worklets = isFlagRecord(appManifest) ? appManifest.worklets : void 0;
6770
+ const overrides = isFlagRecord(worklets) ? worklets.staticFeatureFlags : void 0;
6771
+ if (overrides !== void 0 && !isFlagRecord(overrides)) {
6772
+ throw new Error("Worklets static flag overrides are malformed");
6773
+ }
6774
+ const flags = {};
6775
+ for (const [name2, value] of Object.entries({ ...defaults, ...overrides })) {
6776
+ flags[name2] = String(value) === "true";
6777
+ }
6778
+ return JSON.stringify(flags);
6779
+ }
6657
6780
 
6658
6781
  // src/host/dev-server-package-versions.ts
6659
6782
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -6720,7 +6843,6 @@ var LAZY_STUB_PATTERNS = [
6720
6843
  "@sbaiahmed1/react-native-biometrics/types",
6721
6844
  "@sbaiahmed1/react-native-blur",
6722
6845
  "@shopify/checkout-sheet-kit",
6723
- "@shopify/react-native-skia",
6724
6846
  "@stream-io/video-react-native-sdk",
6725
6847
  "@stripe/stripe-identity-react-native",
6726
6848
  "@stripe/stripe-react-native",
@@ -6739,7 +6861,6 @@ var LAZY_STUB_PATTERNS = [
6739
6861
  "expo-in-app-updates",
6740
6862
  "expo-mesh-gradient",
6741
6863
  "expo-modules-core",
6742
- "expo-share-extension",
6743
6864
  "expo-superwall",
6744
6865
  "freerasp-react-native",
6745
6866
  "klaviyo-react-native-sdk",
@@ -6831,7 +6952,6 @@ var LAZY_STUB_PATTERNS = [
6831
6952
  "react-native-share-menu",
6832
6953
  "react-native-shared-element",
6833
6954
  "react-native-simple-toast",
6834
- "react-native-skia",
6835
6955
  "react-native-spinkit",
6836
6956
  "react-native-ssl-public-key-pinning",
6837
6957
  "react-native-star-io10",
@@ -9479,12 +9599,6 @@ var COMPAT_STUBS = {
9479
9599
  runtimeTier: "none",
9480
9600
  buildResolvers: ["vite"]
9481
9601
  },
9482
- expoShareExtension: {
9483
- specifier: "expo-share-extension",
9484
- stubFile: "noop-sdks-extra/expo-share-extension.ts",
9485
- runtimeTier: "none",
9486
- buildResolvers: ["vite"]
9487
- },
9488
9602
  expoHealthConnect: {
9489
9603
  specifier: "expo-health-connect",
9490
9604
  stubFile: "noop-sdks-extra/expo-health-connect.ts",
@@ -9631,6 +9745,15 @@ function* installedVersionsWalk(projectRoot, names) {
9631
9745
  const installed = yield* readInstalledPackage(projectRoot, name2);
9632
9746
  const version = installed && Reflect.get(installed.manifest, "version");
9633
9747
  if (typeof version === "string" && version.length > 0) versions[name2] = version;
9748
+ if (name2 === "react-native-worklets" && installed) {
9749
+ const defaults = yield* readManifest(
9750
+ import_path.default.join(installed.root, "src/featureFlags/staticFlags.json")
9751
+ );
9752
+ if (defaults) {
9753
+ const app = yield* readManifest(import_path.default.join(projectRoot, "package.json"));
9754
+ versions[WORKLETS_STATIC_FLAGS_KEY] = resolveWorkletsStaticFlags(defaults, app);
9755
+ }
9756
+ }
9634
9757
  }
9635
9758
  return versions;
9636
9759
  }
@@ -9766,7 +9889,93 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9766
9889
  init_backend_origin();
9767
9890
 
9768
9891
  // src/dev-bundle-resolution.ts
9892
+ function shouldProxyLoopbackProbe(targetUrl, pageOrigin) {
9893
+ try {
9894
+ const target = new URL(targetUrl);
9895
+ const page = new URL(pageOrigin);
9896
+ return isLoopbackHost(target.hostname) && isLoopbackHost(page.hostname) && target.origin !== page.origin;
9897
+ } catch {
9898
+ return false;
9899
+ }
9900
+ }
9901
+ async function fetchDevProbe(targetUrl, pageOrigin, init) {
9902
+ const requestInit = {
9903
+ ...init,
9904
+ cache: init?.cache ?? "no-store"
9905
+ };
9906
+ if (!pageOrigin || !shouldProxyLoopbackProbe(targetUrl, pageOrigin)) {
9907
+ return fetch(targetUrl, requestInit);
9908
+ }
9909
+ return fetch(
9910
+ `${pageOrigin}/__fetch-proxy?url=${encodeURIComponent(targetUrl)}`,
9911
+ requestInit
9912
+ );
9913
+ }
9769
9914
  var MANIFEST_PROBE_TIMEOUT_MS = 3e4;
9915
+ var manifestRequests = /* @__PURE__ */ new Map();
9916
+ async function startDevManifestRequest(normalizedBaseUrl, pageOrigin, signal) {
9917
+ const init = { headers: { "expo-platform": "ios" }, signal };
9918
+ const res = pageOrigin ? await fetchDevProbe(`${normalizedBaseUrl}/`, pageOrigin, init) : await (await Promise.resolve().then(() => (init_node_http_fetch(), node_http_fetch_exports))).nodeHttpFetch(`${normalizedBaseUrl}/`, init);
9919
+ const body = await res.arrayBuffer();
9920
+ return new Response(body.byteLength ? body : null, {
9921
+ status: res.status,
9922
+ headers: res.headers
9923
+ });
9924
+ }
9925
+ async function fetchDevManifest(baseUrl, pageOrigin, options = {}) {
9926
+ options.signal?.throwIfAborted();
9927
+ const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
9928
+ let request = manifestRequests.get(normalizedBaseUrl);
9929
+ if (!request) {
9930
+ const controller = new AbortController();
9931
+ const promise = startDevManifestRequest(
9932
+ normalizedBaseUrl,
9933
+ pageOrigin,
9934
+ controller.signal
9935
+ ).finally(() => {
9936
+ if (manifestRequests.get(normalizedBaseUrl)?.controller === controller)
9937
+ manifestRequests.delete(normalizedBaseUrl);
9938
+ });
9939
+ request = { promise, controller, clients: 0 };
9940
+ manifestRequests.set(normalizedBaseUrl, request);
9941
+ }
9942
+ const current = request;
9943
+ current.clients++;
9944
+ const waitMs = options.waitMs === void 0 ? MANIFEST_PROBE_TIMEOUT_MS : options.waitMs;
9945
+ let deadline;
9946
+ let onAbort;
9947
+ try {
9948
+ const stopped = new Promise((_, reject) => {
9949
+ onAbort = () => {
9950
+ const reason = options.signal?.reason;
9951
+ reject(
9952
+ reason instanceof Error ? reason : new Error("Metro manifest request canceled", { cause: reason })
9953
+ );
9954
+ };
9955
+ options.signal?.addEventListener("abort", onAbort, { once: true });
9956
+ if (options.signal?.aborted) onAbort();
9957
+ if (waitMs !== null)
9958
+ deadline = setTimeout(
9959
+ () => reject(
9960
+ new Error(
9961
+ `Metro manifest request timed out after ${waitMs / 1e3}s: ${normalizedBaseUrl}/`
9962
+ )
9963
+ ),
9964
+ waitMs
9965
+ );
9966
+ });
9967
+ return (await Promise.race([current.promise, stopped])).clone();
9968
+ } finally {
9969
+ clearTimeout(deadline);
9970
+ if (onAbort) options.signal?.removeEventListener("abort", onAbort);
9971
+ current.clients--;
9972
+ if (options.signal?.aborted && current.clients === 0) {
9973
+ if (manifestRequests.get(normalizedBaseUrl) === current)
9974
+ manifestRequests.delete(normalizedBaseUrl);
9975
+ current.controller.abort(options.signal.reason);
9976
+ }
9977
+ }
9978
+ }
9770
9979
 
9771
9980
  // src/kotlinDiscoveryContract.ts
9772
9981
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -10233,38 +10442,38 @@ function resolveProcessCwd(pid) {
10233
10442
 
10234
10443
  // src/metro-project-root.ts
10235
10444
  init_backend_origin();
10236
- async function resolveMetroProjectRoot(bundleUrl) {
10445
+ async function resolveMetroProjectRoot(bundleUrl, manifestProjectRoot, options = {}) {
10237
10446
  const origin = loopbackOriginOf(bundleUrl);
10238
10447
  if (!origin) return null;
10239
- const controller = new AbortController();
10240
- const timer = setTimeout(() => controller.abort(), MANIFEST_PROBE_TIMEOUT_MS);
10448
+ options.signal?.throwIfAborted();
10449
+ if (manifestProjectRoot) return manifestProjectRoot;
10450
+ const waitMs = options.waitMs === void 0 ? MANIFEST_PROBE_TIMEOUT_MS : options.waitMs;
10451
+ const deadline = waitMs === null ? void 0 : AbortSignal.timeout(waitMs);
10452
+ const signal = deadline ? options.signal ? AbortSignal.any([options.signal, deadline]) : deadline : options.signal;
10453
+ const { nodeHttpFetch: nodeHttpFetch2 } = await Promise.resolve().then(() => (init_node_http_fetch(), node_http_fetch_exports));
10454
+ const status = await nodeHttpFetch2(`${origin}/status`, { signal });
10455
+ const statusBody = await status.text();
10456
+ const advertisedRoot = status.headers.get("X-React-Native-Project-Root");
10457
+ if (status.ok && advertisedRoot) return decodeURI(advertisedRoot);
10458
+ if (manifestProjectRoot === null) return null;
10459
+ const metroRunning = status.ok && statusBody.trim() === "packager-status:running";
10460
+ const res = await fetchDevManifest(origin, void 0, { waitMs: null, signal });
10241
10461
  let servedManifest = false;
10242
- let metroRunning = false;
10243
- try {
10244
- const status = await fetch(`${origin}/status`, { signal: controller.signal });
10245
- const advertisedRoot = status.headers.get("X-React-Native-Project-Root");
10246
- if (status.ok && advertisedRoot) return decodeURI(advertisedRoot);
10247
- metroRunning = status.ok && (await status.text()).trim() === "packager-status:running";
10248
- const res = await fetch(`${origin}/`, {
10249
- headers: { "expo-platform": "ios", Accept: "application/json" },
10250
- signal: controller.signal
10251
- });
10252
- if (res.ok) {
10253
- const manifest = parseExpoManifestBody(await res.text());
10462
+ if (res.ok) {
10463
+ let manifest;
10464
+ try {
10465
+ manifest = parseExpoManifestBody(await res.text());
10254
10466
  servedManifest = true;
10255
- let root = manifest;
10256
- for (const key of ["extra", "expoClient", "_internal", "projectRoot"]) {
10257
- root = typeof root === "object" && root !== null ? Reflect.get(root, key) : void 0;
10258
- }
10259
- if (typeof root === "string" && root.length > 0) return root;
10467
+ } catch (error) {
10468
+ if (res.headers.get("content-type")?.includes("json")) throw error;
10260
10469
  }
10261
- } catch {
10262
- if (controller.signal.aborted)
10263
- throw new Error(
10264
- `Metro project root request timed out after ${MANIFEST_PROBE_TIMEOUT_MS / 1e3}s: ${origin}. Wait for the dev server to finish starting or pass --project-root.`
10265
- );
10266
- } finally {
10267
- clearTimeout(timer);
10470
+ let root = manifest;
10471
+ for (const key of ["extra", "expoClient", "_internal", "projectRoot"]) {
10472
+ root = typeof root === "object" && root !== null ? Reflect.get(root, key) : void 0;
10473
+ }
10474
+ if (typeof root === "string" && root.length > 0) return root;
10475
+ } else if (res.status !== 404 && res.status !== 405) {
10476
+ throw new Error(`Metro project root request failed: HTTP ${res.status} at ${origin}/`);
10268
10477
  }
10269
10478
  if (servedManifest || !metroRunning) return null;
10270
10479
  const port = Number(new URL(origin).port);
@@ -12489,10 +12698,13 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
12489
12698
  }
12490
12699
  function settingList(value) {
12491
12700
  const items2 = [];
12492
- for (const [, quoted, plain] of value.matchAll(
12493
- /"((?:\\.|[^"\\])*)"|((?:\\.|[^\s"])+)/g
12494
- ))
12495
- items2.push((quoted ?? plain).replace(/\\(.)/g, "$1"));
12701
+ for (const [word] of value.matchAll(/(?:"(?:\\.|[^"\\])*"|\\.|[^\s"\\])+/g))
12702
+ items2.push(
12703
+ word.replace(
12704
+ /"((?:\\.|[^"\\])*)"|\\(.)/g,
12705
+ (_, quoted, escaped) => quoted !== void 0 ? quoted.replace(/\\(.)/g, "$1") : escaped
12706
+ )
12707
+ );
12496
12708
  return items2;
12497
12709
  }
12498
12710
  function expandSearchPath(directory, rules) {
@@ -12568,6 +12780,9 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
12568
12780
  const headers = /* @__PURE__ */ new Set();
12569
12781
  const resources = /* @__PURE__ */ new Set();
12570
12782
  const scriptForOutput = /* @__PURE__ */ new Map();
12783
+ const declaredInfoPlist = settings("INFOPLIST_FILE");
12784
+ const infoPlistOutput = declaredInfoPlist ? import_node_path8.default.resolve(project.projectDir, declaredInfoPlist) : null;
12785
+ const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
12571
12786
  for (const phaseId of list(target.buildPhases)) {
12572
12787
  const phase = project.object(phaseId);
12573
12788
  if (phase?.isa !== "PBXShellScriptBuildPhase") continue;
@@ -12600,10 +12815,10 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
12600
12815
  ...fileLists.get("INPUT").flatMap((item) => [item.file, ...item.entries]),
12601
12816
  ...fileLists.get("OUTPUT").map((item) => item.file)
12602
12817
  ];
12603
- if (allOutputs.some((file) => file.endsWith(".swift"))) {
12818
+ if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
12604
12819
  for (const file of inputFiles) if (import_node_fs8.default.existsSync(file)) projectInputs.add(file);
12605
12820
  }
12606
- if (options.prepareGeneratedSources && options.requireSources !== false && allOutputs.some((file) => file.endsWith(".swift"))) {
12821
+ if (options.prepareGeneratedSources && allOutputs.some(isPreparedOutput)) {
12607
12822
  const phaseDir = import_node_path8.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
12608
12823
  for (const lists of fileLists.values())
12609
12824
  for (const { file } of lists)
@@ -12674,12 +12889,12 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
12674
12889
  const output = error instanceof Error ? `${error.message}
12675
12890
  ${"stdout" in error ? String(error.stdout) : ""}${"stderr" in error ? String(error.stderr) : ""}` : String(error);
12676
12891
  throw new Error(
12677
- `${targetName}: Run Script "${script}" failed preparing generated Swift sources:
12892
+ `${targetName}: Run Script "${script}" failed preparing generated outputs:
12678
12893
  ${output}`
12679
12894
  );
12680
12895
  }
12681
12896
  const missing = allOutputs.filter(
12682
- (file) => file.endsWith(".swift") && !import_node_fs8.default.existsSync(file)
12897
+ (file) => isPreparedOutput(file) && !import_node_fs8.default.existsSync(file)
12683
12898
  );
12684
12899
  if (missing.length > 0)
12685
12900
  throw new Error(
@@ -12937,15 +13152,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
12937
13152
  if (cached) return cached;
12938
13153
  const entries = /* @__PURE__ */ new Map();
12939
13154
  for (const ref of projectTargets(project)) {
12940
- const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
12941
- const product = framework ? productName(ref) : "";
13155
+ const product = productName(ref);
12942
13156
  for (const { file, visibility } of headerPhase(ref)) {
12943
13157
  const name2 = import_node_path8.default.basename(file);
12944
13158
  if (!entries.has(name2))
12945
- entries.set(
12946
- name2,
12947
- framework && visibility !== "Project" ? `${product}/${name2}` : file
12948
- );
13159
+ entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
12949
13160
  }
12950
13161
  }
12951
13162
  for (const id of Object.keys(project.objects)) {
@@ -13057,20 +13268,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
13057
13268
  const implementations = allSources.filter(isSwiftNativeTranslationUnit);
13058
13269
  const native = implementations.length > 0;
13059
13270
  if (native && building) {
13060
- const generatedHeaders = list(ref.target.buildPhases).flatMap((phaseId) => {
13061
- const phase = ref.project.object(phaseId);
13062
- return phase?.isa === "PBXShellScriptBuildPhase" ? list(phase.outputPaths).filter((output) => HEADER_FILE.test(output)) : [];
13063
- });
13064
- if (generatedHeaders.length > 0 || list(ref.target.buildRules).length > 0)
13271
+ if (list(ref.target.buildRules).length > 0)
13065
13272
  throw new Error(
13066
- `${name2}: Xcode's generated-files header map, which lists headers its build rules and Run Script phases generate (${generatedHeaders.join(", ") || "build rules"}), is not modeled`
13067
- );
13068
- const nonFramework = projectTargets(ref.project).find(
13069
- (other) => !FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? "") && headerPhase(other).length > 0
13070
- );
13071
- if (nonFramework && settings2("USE_HEADERMAP") !== "NO")
13072
- throw new Error(
13073
- `${name2}: Xcode's all-non-framework-target-headers map, which lists the headers of ${str(nonFramework.target.name) ?? nonFramework.id}, is not modeled`
13273
+ `${name2}: Xcode's generated-files header map for build rules is not modeled`
13074
13274
  );
13075
13275
  if (settings2("ALWAYS_SEARCH_USER_PATHS") === "YES" && settings2("USER_HEADER_SEARCH_PATHS").trim())
13076
13276
  throw new Error(
@@ -13081,14 +13281,29 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
13081
13281
  const ownHeaders = /* @__PURE__ */ new Map();
13082
13282
  for (const { file, visibility } of headerFiles) {
13083
13283
  const name3 = import_node_path8.default.basename(file);
13084
- const published = framework && visibility !== "Project";
13284
+ const published = visibility !== "Project";
13085
13285
  if (!ownHeaders.has(name3))
13086
13286
  ownHeaders.set(name3, published ? `${product}/${name3}` : file);
13087
- if (framework && !published && !ownHeaders.has(`${product}/${name3}`))
13287
+ if (!published && !ownHeaders.has(`${product}/${name3}`))
13088
13288
  ownHeaders.set(`${product}/${name3}`, file);
13089
13289
  }
13290
+ const nonFrameworkHeaders = /* @__PURE__ */ new Map();
13291
+ for (const other of projectTargets(ref.project)) {
13292
+ if (FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? "")) continue;
13293
+ const otherProduct = productName(other);
13294
+ for (const { file, visibility } of headerPhase(other)) {
13295
+ if (visibility === "Project") continue;
13296
+ const key = `${otherProduct}/${import_node_path8.default.basename(file)}`;
13297
+ if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
13298
+ }
13299
+ }
13090
13300
  const wrapper = import_node_path8.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
13091
- const moduleMap = settings2("DEFINES_MODULE") === "YES" && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
13301
+ const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
13302
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path8.default.relative(import_node_path8.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path8.default.sep)[0] !== ".." && import_node_fs8.default.existsSync(moduleMap) ? import_node_fs8.default.readdirSync(import_node_path8.default.dirname(moduleMap)).flatMap((entry) => {
13303
+ if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
13304
+ const file = import_node_path8.default.join(import_node_path8.default.dirname(moduleMap), entry);
13305
+ return import_node_fs8.default.existsSync(file) ? [file] : [];
13306
+ }) : [];
13092
13307
  const fileFlags = {};
13093
13308
  for (const phaseId of list(ref.target.buildPhases)) {
13094
13309
  const phase = ref.project.object(phaseId);
@@ -13127,9 +13342,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
13127
13342
  },
13128
13343
  ...native ? {
13129
13344
  objc: {
13130
- publicHeaders: headerFiles.flatMap(
13131
- ({ file, visibility }) => visibility === "Public" ? [file] : []
13132
- ),
13345
+ publicHeaders: [
13346
+ ...headerFiles.flatMap(
13347
+ ({ file, visibility }) => visibility === "Public" ? [file] : []
13348
+ ),
13349
+ ...podHeaders.filter((file) => HEADER_FILE.test(file))
13350
+ ],
13133
13351
  headers: [
13134
13352
  .../* @__PURE__ */ new Set([
13135
13353
  ...headers,
@@ -13182,6 +13400,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
13182
13400
  fileFlags,
13183
13401
  headerMaps: settings2("USE_HEADERMAP") === "NO" ? [] : [
13184
13402
  { flag: "-I", entries: [...ownHeaders] },
13403
+ { flag: "-I", entries: [...nonFrameworkHeaders] },
13185
13404
  {
13186
13405
  flag: "-iquote",
13187
13406
  entries: projectHeaderMap(ref.project)
@@ -13201,7 +13420,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
13201
13420
  ]
13202
13421
  ),
13203
13422
  ...moduleMap ? [[import_node_path8.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
13204
- ]) : {}
13423
+ ]) : Object.fromEntries(podHeaders.map((file) => [file, file]))
13205
13424
  }
13206
13425
  } : {}
13207
13426
  }
@@ -13717,7 +13936,8 @@ function readIosAppTarget(projectRoot, iosTarget) {
13717
13936
  );
13718
13937
  }
13719
13938
  return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
13720
- requireSources: false
13939
+ requireSources: false,
13940
+ prepareGeneratedSources: true
13721
13941
  });
13722
13942
  }
13723
13943