peachsim 0.1.1716 → 0.1.1738

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/README.md +21 -3
  2. package/cli/app-bundle-resources.ts +2 -1
  3. package/cli/app-fonts.ts +4 -4
  4. package/cli/app-splash.ts +4 -4
  5. package/cli/app-stubs.ts +17 -0
  6. package/cli/command-registry.ts +1 -0
  7. package/cli/commands/control.ts +83 -822
  8. package/cli/commands/coverage-swift.ts +112 -4
  9. package/cli/commands/daemon.ts +8 -0
  10. package/cli/commands/detox.ts +3 -0
  11. package/cli/commands/doctor.ts +19 -2
  12. package/cli/commands/inspect/actions.ts +74 -14
  13. package/cli/commands/inspect/core.ts +5 -1
  14. package/cli/commands/inspect/settling.ts +5 -2
  15. package/cli/commands/inspect/wait-ready.ts +6 -0
  16. package/cli/commands/inspect.ts +48 -45
  17. package/cli/commands/kotlin.ts +12 -2
  18. package/cli/commands/package.ts +760 -0
  19. package/cli/commands/serve.ts +6 -0
  20. package/cli/commands/shell-url.ts +838 -0
  21. package/cli/commands/swift.ts +42 -102
  22. package/cli/commands/test.ts +20 -0
  23. package/cli/commands/upload.ts +1 -1
  24. package/cli/device-option.ts +1 -1
  25. package/cli/main.ts +13 -1
  26. package/cli/native-input.ts +199 -0
  27. package/cli/outbound-endpoints.ts +26 -1
  28. package/cli/packaged-app-launcher.ts +95 -0
  29. package/cli/scene-video.ts +36 -12
  30. package/detox/index.ts +196 -24
  31. package/dist-lib/agent-daemon-client.cjs +1 -1
  32. package/dist-lib/agent-events.cjs +1 -1
  33. package/dist-lib/attached-projects.cjs +5 -2
  34. package/dist-lib/auth/shared-session.cjs +5 -2
  35. package/dist-lib/backend-origin.cjs +1 -1
  36. package/dist-lib/beta.cjs +1 -1
  37. package/dist-lib/beta.mjs +1 -1
  38. package/dist-lib/bridge-constants.cjs +1 -1
  39. package/dist-lib/bridge-contract-input.cjs +1 -1
  40. package/dist-lib/bridge-contract-input.mjs +1 -1
  41. package/dist-lib/bridge-contract.cjs +1 -1
  42. package/dist-lib/bridge-contract.mjs +1 -1
  43. package/dist-lib/bundle-channel.cjs +39889 -31873
  44. package/dist-lib/capture-contract.cjs +1 -1
  45. package/dist-lib/capture-contract.mjs +1 -1
  46. package/dist-lib/cloud-contract.cjs +1 -1
  47. package/dist-lib/cloud-contract.mjs +1 -1
  48. package/dist-lib/cloud-test-args.cjs +1 -1
  49. package/dist-lib/cloud-test-args.mjs +1 -1
  50. package/dist-lib/cloud.cjs +1 -1
  51. package/dist-lib/cloud.mjs +1 -1
  52. package/dist-lib/config.cjs +1 -1
  53. package/dist-lib/config.mjs +1 -1
  54. package/dist-lib/detox/index.cjs +195 -63
  55. package/dist-lib/dev-bundle-resolution.cjs +14 -13
  56. package/dist-lib/expo-swift-bundle.cjs +18507 -11835
  57. package/dist-lib/expo-swift-metadata.cjs +4 -1
  58. package/dist-lib/expo-swift-metadata.mjs +3 -1
  59. package/dist-lib/home-paths.cjs +27 -3
  60. package/dist-lib/host/bridge-host.cjs +28373 -24090
  61. package/dist-lib/host/fetch-proxy-handler.cjs +235 -225
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +915 -399
  67. package/dist-lib/jump-to-source-babel.cjs +1 -1
  68. package/dist-lib/jump-to-source-native.cjs +1 -1
  69. package/dist-lib/kotlin-host.cjs +335 -47
  70. package/dist-lib/menu.cjs +13 -1
  71. package/dist-lib/menu.mjs +13 -1
  72. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  73. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  74. package/dist-lib/metro-production-bundle.cjs +1 -1
  75. package/dist-lib/metro-production-bundle.mjs +1 -1
  76. package/dist-lib/metro.cjs +918 -411
  77. package/dist-lib/native-app-identity-project.cjs +703 -283
  78. package/dist-lib/native-app-identity-project.mjs +500 -87
  79. package/dist-lib/native-app-identity.cjs +13 -2
  80. package/dist-lib/native-app-identity.mjs +13 -2
  81. package/dist-lib/native-firebase-metadata.cjs +1 -1
  82. package/dist-lib/native-firebase-metadata.mjs +1 -1
  83. package/dist-lib/plist.cjs +1 -1
  84. package/dist-lib/plist.mjs +1 -1
  85. package/dist-lib/profiles.cjs +5 -2
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +28 -23
  88. package/dist-lib/public-origins-lib.json +418 -224
  89. package/dist-lib/react-native-host-modules.cjs +35 -2
  90. package/dist-lib/react-native-host-modules.mjs +35 -2
  91. package/dist-lib/reap-browser.cjs +12 -4
  92. package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
  93. package/dist-lib/sdk.cjs +17 -7
  94. package/dist-lib/sdk.mjs +16 -7
  95. package/dist-lib/skills.cjs +44825 -29141
  96. package/dist-lib/swift-compile.cjs +616 -400
  97. package/dist-lib/swift-compile.mjs +528 -315
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +1 -1
  100. package/dist-lib/swift-submit.cjs +2 -2
  101. package/dist-lib/swift-submit.mjs +2 -2
  102. package/dist-lib/swift-toolchain.cjs +105 -17
  103. package/dist-lib/swift.cjs +1 -1
  104. package/dist-lib/vite-swift.cjs +4660 -2252
  105. package/dist-lib/vite.cjs +248 -234
  106. package/dist-lib/worklet-executable.cjs +1 -1
  107. package/dist-lib/worklet-executable.mjs +1 -1
  108. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
  109. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
  110. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  111. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +9 -6
  112. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  113. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +11 -1
  114. package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -12
  115. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  116. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
  117. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  118. package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
  119. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  120. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
  121. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  122. package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
  123. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
  124. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
  126. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +36 -2
  127. package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
  128. package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
  129. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  130. package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
  131. package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
  132. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
  133. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  134. package/kotlin/README.md +3 -0
  135. package/kotlin/sdk.tar.gz +0 -0
  136. package/package.json +1 -1
  137. package/runtime-companion.json +1 -1
  138. package/scripts/dev-server-scanner.ts +12 -25
  139. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  140. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  141. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  142. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  143. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  144. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  145. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  146. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  147. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
  148. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
  149. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
  150. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
  151. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
  152. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
  153. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
  154. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
  155. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
  156. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
  157. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -1
  158. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
  159. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
  160. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
  161. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +711 -46
  162. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
  163. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
  164. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
  165. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
  166. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
  167. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
  168. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
  169. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
  170. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
  171. package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
  172. package/sdk/ios/usr/include/module.modulemap +1 -0
  173. package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
  174. package/sdk/ios/usr/include/os/signpost.h +414 -0
  175. package/sdk/ios/usr/include/os.modulemap +10 -0
  176. package/sdk/ios/usr/include/sys/cdefs.h +5 -0
  177. package/sdk/ios/usr/include/sys/ioccom.h +99 -0
  178. package/sdk/ios/usr/include/sys/syslog.h +236 -0
  179. package/sdk/ios/usr/include/syslog.h +24 -0
  180. package/sdk/ios/wasm/include/errno.h +4 -20
  181. package/sdk/ios/wasm/include/fcntl.h +4 -2
  182. package/sdk/ios/wasm/include/pthread.h +3 -0
  183. package/sdk/ios/wasm/include/setjmp.h +57 -0
  184. package/sdk/ios/wasm/include/stdio.h +24 -0
  185. package/sdk/ios/wasm/include/stdlib.h +32 -7
  186. package/sdk/ios/wasm/include/sys/file.h +7 -0
  187. package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
  188. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  189. package/sdk/ios/wasm/include/sys/syscall.h +9 -0
  190. package/sdk/ios/wasm/include/sys/time.h +10 -0
  191. package/sdk/ios/wasm/include/unistd.h +12 -3
  192. package/sdk/native-hashes.json +4 -3
  193. package/skills/contrast/SKILL.md +2 -1
  194. package/skills/peach-debug/SKILL.md +0 -1
  195. package/skills/peach-perf/SKILL.md +0 -1
  196. package/skills/peach-setup/SKILL.md +0 -1
  197. package/skills/peach-test/SKILL.md +7 -4
  198. package/skills/peach-visual/SKILL.md +0 -1
  199. package/src/admitted-mac-build.ts +3 -0
  200. package/src/android-app-identity.ts +18 -0
  201. package/src/android-autolinking.ts +1 -0
  202. package/src/android-bridge-packages.ts +279 -0
  203. package/src/android-root-module.ts +9 -9
  204. package/src/appPackageContract.ts +83 -0
  205. package/src/bridge-contract.ts +50 -0
  206. package/src/bundle-channel.mjs +41 -6
  207. package/src/cli-runtime.ts +9 -5
  208. package/src/dev-bundle-resolution.ts +7 -27
  209. package/src/dom-source-reference.ts +15 -0
  210. package/src/expo-discovery-cache.ts +134 -26
  211. package/src/expo-kotlin-host.ts +97 -26
  212. package/src/expo-manifest-body.ts +33 -0
  213. package/src/expo-native-workspace.ts +158 -38
  214. package/src/expo-swift-host.ts +350 -75
  215. package/src/expo-swift-ready.ts +5 -1
  216. package/src/expoKotlinContract.ts +12 -2
  217. package/src/expoSwiftContract.ts +10 -0
  218. package/src/generated/swift-c-predefines.json +1 -1
  219. package/src/home-paths.ts +41 -2
  220. package/src/host/app-package-handler.ts +47 -0
  221. package/src/host/bridge-host.ts +8 -0
  222. package/src/host/fetch-proxy-handler.ts +10 -0
  223. package/src/host/staged-host-files.ts +18 -0
  224. package/src/index.ts +3 -0
  225. package/src/kotlin-host.ts +225 -48
  226. package/src/kotlin-instance-source.ts +126 -0
  227. package/src/kotlinSdkContract.ts +2 -1
  228. package/src/menu.ts +14 -0
  229. package/src/native-app-identity-project.ts +7 -2
  230. package/src/native-app-identity.ts +11 -0
  231. package/src/native-firebase-config.ts +24 -1
  232. package/src/native-prebuilt.ts +154 -0
  233. package/src/nitro-adapter.lock.json +270 -270
  234. package/src/nitro-adapter.ts +56 -50
  235. package/src/nitro-bundle.ts +92 -74
  236. package/src/nitro-compile.ts +45 -14
  237. package/src/nitro-dependencies.ts +63 -46
  238. package/src/nitro-source.ts +64 -26
  239. package/src/nitroAdapterContract.ts +146 -98
  240. package/src/nitroContract.ts +71 -21
  241. package/src/react-native-bridge-modules.ts +70 -42
  242. package/src/react-native-host-modules.ts +34 -1
  243. package/src/reactNativeConfigurationContract.ts +14 -0
  244. package/src/reap-browser.ts +15 -3
  245. package/src/sdk.ts +5 -0
  246. package/src/settingsContract.ts +38 -1
  247. package/src/sim-client.ts +4 -1
  248. package/src/storageSnapshotContract.ts +32 -81
  249. package/src/swift-compile.ts +268 -89
  250. package/src/swift-coverage/indexdump.ts +22 -6
  251. package/src/swift-coverage/indexing.ts +4 -4
  252. package/src/swift-coverage/provenance.ts +1 -0
  253. package/src/swift-coverage/sdk.ts +104 -20
  254. package/src/swift-coverage/types.ts +34 -0
  255. package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
  256. package/src/swift-coverage/xcode-assets.ts +89 -131
  257. package/src/swift-coverage/xcode.ts +10 -2
  258. package/src/swift-cxx-reachable.ts +2 -1
  259. package/src/swift-distribution.lock.json +20 -16
  260. package/src/swift-host.ts +98 -22
  261. package/src/swift-icu.ts +1 -1
  262. package/src/swift-link-roots.ts +118 -0
  263. package/src/swift-objc-compile.ts +144 -22
  264. package/src/swift-objc-import.ts +6 -0
  265. package/src/swift-objc-standin.ts +2 -14
  266. package/src/swift-package-manifest.ts +14 -6
  267. package/src/swift-packages.ts +75 -11
  268. package/src/swift-pdf-raster.ts +1 -0
  269. package/src/swift-root-lock.ts +17 -1
  270. package/src/swift-source-pods.ts +2 -10
  271. package/src/swift-standin-emit.ts +597 -57
  272. package/src/swift-standins.ts +599 -56
  273. package/src/swift-submit.ts +7 -1
  274. package/src/swift-toolchain.ts +140 -17
  275. package/src/turbo-bundle.ts +81 -0
  276. package/src/turbo-codegen-intake.ts +91 -0
  277. package/src/turbo-compile.ts +120 -0
  278. package/src/turbo-runtime.lock.json +69 -0
  279. package/src/turbo-source.ts +754 -0
  280. package/src/vite-plugin-one.ts +17 -12
  281. package/src/vite-plugin.ts +28 -15
  282. package/src/xcode-project.ts +223 -22
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1716 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1738 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -42,7 +42,7 @@ var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
42
42
  var runtime_companion_default;
43
43
  var init_runtime_companion = __esm({
44
44
  "runtime-companion.json"() {
45
- runtime_companion_default = { abi: 1, sha256: "a0dede25c849ecabd639fbb0a0c4edd8e62a34bf12090932dba19832f2369659", file: "node/cli-a0dede25c849ecabd639fbb0a0c4edd8e62a34bf12090932dba19832f2369659.cjs" };
45
+ runtime_companion_default = { abi: 1, sha256: "65f18da220835917c493afae338016e2e9c092419e67b12eb3fb00e389637557", file: "node/cli-65f18da220835917c493afae338016e2e9c092419e67b12eb3fb00e389637557.cjs" };
46
46
  }
47
47
  });
48
48
 
@@ -86,10 +86,13 @@ var init_src = __esm({
86
86
  });
87
87
 
88
88
  // src/home-paths.ts
89
+ function ambientHomeDir() {
90
+ return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
91
+ }
89
92
  function rnxHomeDir() {
90
93
  const override = process.env[PEACH_HOME_ENV];
91
94
  if (override && override.length > 0) return import_node_path.default.resolve(override);
92
- return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
95
+ return ambientHomeDir();
93
96
  }
94
97
  function runtimesDir() {
95
98
  return import_node_path.default.join(rnxHomeDir(), "runtimes");
@@ -396,7 +399,8 @@ function verifyCliCompanion(root) {
396
399
  }
397
400
  function getCliRuntime() {
398
401
  if (loaded) return loaded.runtime;
399
- const root = resolveDevCheckoutRuntimeAssetRoot() ?? resolveActiveRuntimeRoot();
402
+ const monorepoRoot = findMonorepoRoot();
403
+ const root = monorepoRoot ? (0, import_node_path2.join)(monorepoRoot, "public/sootsim") : resolveActiveRuntimeRoot();
400
404
  if (!root) throw new Error("No Peach runtime installed; run `peach runtime install`");
401
405
  verifyCliCompanion(root);
402
406
  const require2 = (0, import_node_module.createRequire)(__sootsim_import_meta_url);
@@ -779,6 +783,217 @@ var import_path2 = __toESM(require("path"), 1);
779
783
 
780
784
  // ../peach-compat/src/lazy-stub-patterns.ts
781
785
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
786
+
787
+ // ../peach-compat/src/version-range.ts
788
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
789
+ var ANY_BOUNDS = {
790
+ lower: null,
791
+ lowerInclusive: false,
792
+ upper: null,
793
+ upperInclusive: false
794
+ };
795
+ var COMPARATOR = /\s*(?:[<>]=?|[=^~])?\s*[^\s]+/g;
796
+ function compareVersions(left, right) {
797
+ if (left.major !== right.major) return left.major < right.major ? -1 : 1;
798
+ if (left.minor !== right.minor) return left.minor < right.minor ? -1 : 1;
799
+ if (left.patch !== right.patch) return left.patch < right.patch ? -1 : 1;
800
+ if (left.prerelease.length === 0) return right.prerelease.length === 0 ? 0 : 1;
801
+ if (right.prerelease.length === 0) return -1;
802
+ const length = Math.max(left.prerelease.length, right.prerelease.length);
803
+ for (let index = 0; index < length; index++) {
804
+ const leftPart = left.prerelease[index];
805
+ const rightPart = right.prerelease[index];
806
+ if (leftPart === void 0) return -1;
807
+ if (rightPart === void 0) return 1;
808
+ if (leftPart === rightPart) continue;
809
+ const leftNumeric = /^\d+$/.test(leftPart);
810
+ const rightNumeric = /^\d+$/.test(rightPart);
811
+ if (leftNumeric && rightNumeric) return Number(leftPart) < Number(rightPart) ? -1 : 1;
812
+ if (leftNumeric !== rightNumeric) return leftNumeric ? -1 : 1;
813
+ return leftPart < rightPart ? -1 : 1;
814
+ }
815
+ return 0;
816
+ }
817
+ function parseComparator(input) {
818
+ const token = input.trim();
819
+ if (token === "" || token === "*" || token === "x" || token === "X") {
820
+ return ANY_BOUNDS;
821
+ }
822
+ const match = /^(>=|<=|>|<|=|\^|~)?\s*v?(\d+|[xX*])(?:\.(\d+|[xX*]))?(?:\.(\d+|[xX*]))?(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(
823
+ token
824
+ );
825
+ if (!match) return null;
826
+ const operator = match[1] ?? "=";
827
+ const wildcard = (part) => part === void 0 || part === "x" || part === "X" || part === "*";
828
+ if (wildcard(match[2])) return ANY_BOUNDS;
829
+ const major = Number(match[2]);
830
+ const minor = wildcard(match[3]) ? null : Number(match[3]);
831
+ const patch = wildcard(match[4]) ? null : Number(match[4]);
832
+ const floor = {
833
+ major,
834
+ minor: minor ?? 0,
835
+ patch: patch ?? 0,
836
+ prerelease: match[5] ? match[5].split(".") : []
837
+ };
838
+ if (operator === ">") {
839
+ return { ...ANY_BOUNDS, lower: floor, lowerInclusive: false };
840
+ }
841
+ if (operator === ">=") {
842
+ return { ...ANY_BOUNDS, lower: floor, lowerInclusive: true };
843
+ }
844
+ if (operator === "<") {
845
+ return { ...ANY_BOUNDS, upper: floor, upperInclusive: false };
846
+ }
847
+ if (operator === "<=") {
848
+ return { ...ANY_BOUNDS, upper: floor, upperInclusive: true };
849
+ }
850
+ let upper;
851
+ if (operator === "^") {
852
+ upper = major !== 0 ? { major: major + 1, minor: 0, patch: 0, prerelease: [] } : (minor ?? 0) !== 0 || minor === null ? { major: 0, minor: (minor ?? 0) + 1, patch: 0, prerelease: [] } : { major: 0, minor: 0, patch: (patch ?? 0) + 1, prerelease: [] };
853
+ } else if (operator === "~") {
854
+ upper = minor === null ? { major: major + 1, minor: 0, patch: 0, prerelease: [] } : { major, minor: minor + 1, patch: 0, prerelease: [] };
855
+ } else if (minor === null) {
856
+ upper = { major: major + 1, minor: 0, patch: 0, prerelease: [] };
857
+ } else if (patch === null) {
858
+ upper = { major, minor: minor + 1, patch: 0, prerelease: [] };
859
+ } else {
860
+ return {
861
+ lower: floor,
862
+ lowerInclusive: true,
863
+ upper: floor,
864
+ upperInclusive: true
865
+ };
866
+ }
867
+ return {
868
+ lower: floor,
869
+ lowerInclusive: true,
870
+ upper,
871
+ upperInclusive: false
872
+ };
873
+ }
874
+ function stricterLower(left, right) {
875
+ if (!left.lower) return { lower: right.lower, lowerInclusive: right.lowerInclusive };
876
+ if (!right.lower) return { lower: left.lower, lowerInclusive: left.lowerInclusive };
877
+ const order = compareVersions(left.lower, right.lower);
878
+ if (order > 0) return { lower: left.lower, lowerInclusive: left.lowerInclusive };
879
+ if (order < 0) return { lower: right.lower, lowerInclusive: right.lowerInclusive };
880
+ return {
881
+ lower: left.lower,
882
+ lowerInclusive: left.lowerInclusive && right.lowerInclusive
883
+ };
884
+ }
885
+ function stricterUpper(left, right) {
886
+ if (!left.upper) return { upper: right.upper, upperInclusive: right.upperInclusive };
887
+ if (!right.upper) return { upper: left.upper, upperInclusive: left.upperInclusive };
888
+ const order = compareVersions(left.upper, right.upper);
889
+ if (order < 0) return { upper: left.upper, upperInclusive: left.upperInclusive };
890
+ if (order > 0) return { upper: right.upper, upperInclusive: right.upperInclusive };
891
+ return {
892
+ upper: left.upper,
893
+ upperInclusive: left.upperInclusive && right.upperInclusive
894
+ };
895
+ }
896
+ function hasValues(bounds) {
897
+ if (!bounds.lower || !bounds.upper) return true;
898
+ const order = compareVersions(bounds.lower, bounds.upper);
899
+ return order < 0 || order === 0 && bounds.lowerInclusive && bounds.upperInclusive;
900
+ }
901
+ function parseRange(input) {
902
+ const groups = input.split("||");
903
+ const parsed = [];
904
+ for (const group of groups) {
905
+ const tokens = group.trim().match(COMPARATOR) ?? [];
906
+ if (tokens.length === 0) return null;
907
+ let bounds = ANY_BOUNDS;
908
+ for (const token of tokens) {
909
+ const comparator = parseComparator(token);
910
+ if (!comparator) return null;
911
+ bounds = {
912
+ ...stricterLower(bounds, comparator),
913
+ ...stricterUpper(bounds, comparator)
914
+ };
915
+ }
916
+ if (!hasValues(bounds)) return null;
917
+ parsed.push(bounds);
918
+ }
919
+ return parsed;
920
+ }
921
+ function containsBounds(container, contained) {
922
+ if (container.lower) {
923
+ if (!contained.lower) return false;
924
+ const order = compareVersions(container.lower, contained.lower);
925
+ if (order > 0) return false;
926
+ if (order === 0 && contained.lowerInclusive && !container.lowerInclusive) return false;
927
+ }
928
+ if (container.upper) {
929
+ if (!contained.upper) return false;
930
+ const order = compareVersions(container.upper, contained.upper);
931
+ if (order < 0) return false;
932
+ if (order === 0 && contained.upperInclusive && !container.upperInclusive) return false;
933
+ }
934
+ return true;
935
+ }
936
+ function overlapsBounds(left, right) {
937
+ const intersection = {
938
+ ...stricterLower(left, right),
939
+ ...stricterUpper(left, right)
940
+ };
941
+ return hasValues(intersection);
942
+ }
943
+ function resolveCompatVersionRange(availableRegistryRanges, declaredVersion) {
944
+ const declaredGroups = parseRange(declaredVersion);
945
+ const registryGroups = availableRegistryRanges.map((range) => ({
946
+ range,
947
+ bounds: parseRange(range)
948
+ }));
949
+ if (!declaredGroups || registryGroups.some((candidate) => !candidate.bounds)) {
950
+ return {
951
+ status: "unresolved",
952
+ declaredVersion,
953
+ availableRegistryRanges
954
+ };
955
+ }
956
+ let selectedRange = null;
957
+ for (const declared of declaredGroups) {
958
+ const containing = registryGroups.filter(
959
+ (candidate2) => candidate2.bounds?.length === 1 && containsBounds(candidate2.bounds[0], declared)
960
+ );
961
+ if (containing.length !== 1) {
962
+ const overlaps = registryGroups.some(
963
+ (candidate2) => candidate2.bounds?.some((bounds) => overlapsBounds(bounds, declared))
964
+ );
965
+ return {
966
+ status: overlaps ? "unresolved" : "unmatched",
967
+ declaredVersion,
968
+ availableRegistryRanges
969
+ };
970
+ }
971
+ const candidate = containing[0].range;
972
+ if (selectedRange && selectedRange !== candidate) {
973
+ return {
974
+ status: "unresolved",
975
+ declaredVersion,
976
+ availableRegistryRanges
977
+ };
978
+ }
979
+ selectedRange = candidate;
980
+ }
981
+ if (!selectedRange) {
982
+ return {
983
+ status: "unresolved",
984
+ declaredVersion,
985
+ availableRegistryRanges
986
+ };
987
+ }
988
+ return {
989
+ status: "matched",
990
+ declaredVersion,
991
+ registryRange: selectedRange,
992
+ availableRegistryRanges
993
+ };
994
+ }
995
+
996
+ // ../peach-compat/src/lazy-stub-patterns.ts
782
997
  var LAZY_STUB_PATTERNS = [
783
998
  "@10play/tentap-editor",
784
999
  "@adobe/react-native-aepcore",
@@ -834,13 +1049,10 @@ var LAZY_STUB_PATTERNS = [
834
1049
  "@shopify/checkout-sheet-kit",
835
1050
  "@stream-io/video-react-native-sdk",
836
1051
  "@stripe/stripe-identity-react-native",
837
- "@stripe/stripe-react-native",
838
- "@stripe/stripe-react-native/lib/typescript/src/types",
839
1052
  "@stripe/stripe-terminal-react-native",
840
1053
  "@supersami/rn-foreground-service",
841
1054
  "@survicate/react-native-survicate",
842
1055
  "@twilio/voice-react-native-sdk",
843
- "@walletconnect/react-native-compat",
844
1056
  "@xmartlabs/react-native-line",
845
1057
  "@zoontek/react-native-navigation-bar",
846
1058
  "clevertap-react-native",
@@ -852,9 +1064,7 @@ var LAZY_STUB_PATTERNS = [
852
1064
  "expo-modules-core",
853
1065
  "expo-superwall",
854
1066
  "freerasp-react-native",
855
- "klaviyo-react-native-sdk",
856
1067
  "llama.rn",
857
- "mixpanel-react-native",
858
1068
  "newrelic-react-native-agent",
859
1069
  "realm",
860
1070
  "react-native-a11y",
@@ -866,7 +1076,6 @@ var LAZY_STUB_PATTERNS = [
866
1076
  "react-native-android-location-enabler",
867
1077
  "react-native-animateable-text",
868
1078
  "react-native-app-clip",
869
- "react-native-appsflyer",
870
1079
  "react-native-avoid-softinput",
871
1080
  "react-native-azure-auth",
872
1081
  "react-native-background-actions",
@@ -875,7 +1084,6 @@ var LAZY_STUB_PATTERNS = [
875
1084
  "react-native-bluetooth-classic",
876
1085
  "react-native-bluetooth-state-manager",
877
1086
  "react-native-bottom-tabs",
878
- "react-native-branch",
879
1087
  "react-native-camera-kit",
880
1088
  "react-native-change-icon",
881
1089
  "react-native-charts-wrapper",
@@ -913,7 +1121,6 @@ var LAZY_STUB_PATTERNS = [
913
1121
  "react-native-moengage",
914
1122
  "react-native-navigation-mode",
915
1123
  "react-native-network-info",
916
- "react-native-nitro-haptics",
917
1124
  "react-native-otp-verify",
918
1125
  "react-native-passkey",
919
1126
  "react-native-payments",
@@ -934,6 +1141,7 @@ var LAZY_STUB_PATTERNS = [
934
1141
  "react-native-restart-newarch",
935
1142
  "react-native-screenguard",
936
1143
  "react-native-screens",
1144
+ "react-native-screens/components/Screen",
937
1145
  "react-native-screenshot-prevent",
938
1146
  "react-native-select-contact",
939
1147
  "react-native-send-intent",
@@ -1805,7 +2013,6 @@ var NATIVE_STUB_PACKAGE_NAMES = [
1805
2013
  "@callstack/timezone-hermes-fix",
1806
2014
  "@candlefinance/faster-image",
1807
2015
  "@candlefinance/haptics",
1808
- "@clerk/expo",
1809
2016
  "@clerk/expo-passkeys",
1810
2017
  "@cometchat/chat-uikit-react-native",
1811
2018
  "@computools/react-native-dynamic-app-icon",
@@ -1841,6 +2048,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
1841
2048
  "@flyskywhy/react-native-gcanvas",
1842
2049
  "@fugood/react-native-audio-pcm-stream",
1843
2050
  "@fullstory/react-native",
2051
+ "@g4rb4g3/react-native-carplay",
1844
2052
  "@gabriel-sisjr/react-native-background-location",
1845
2053
  "@generac/react-native-local-network-permission",
1846
2054
  "@giphy/react-native-sdk",
@@ -1848,6 +2056,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
1848
2056
  "@goliapkg/sentori-react-native",
1849
2057
  "@google/react-native-make-payment",
1850
2058
  "@googlemaps/react-native-navigation-sdk",
2059
+ "@gutenye/ocr-react-native",
1851
2060
  "@haroldtran/react-native-pax",
1852
2061
  "@hot-updater/react-native",
1853
2062
  "@huymobile/react-native-sms-retriever-nitro-module",
@@ -1976,6 +2185,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
1976
2185
  "@rn-org/react-native-geofencing",
1977
2186
  "@rn-org/react-native-shortcuts",
1978
2187
  "@rnmapbox/maps",
2188
+ "@rntp/player",
1979
2189
  "@rnw-community/react-native-payments",
1980
2190
  "@rocket.chat/mobile-crypto",
1981
2191
  "@roman.sytnyk/blur-app-in-recents",
@@ -2453,6 +2663,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
2453
2663
  "react-native-nfc-manager",
2454
2664
  "react-native-nitro-ark",
2455
2665
  "react-native-nitro-audio-manager",
2666
+ "react-native-nitro-base64",
2456
2667
  "react-native-nitro-buffer",
2457
2668
  "react-native-nitro-cloud-uploader",
2458
2669
  "react-native-nitro-cookies",
@@ -2757,7 +2968,7 @@ var NATIVE_RUNTIME_PACKAGE_NAMES = [
2757
2968
  "@valora/react-native-keychain",
2758
2969
  "react-native-app-control",
2759
2970
  "react-native-blue-crypto",
2760
- "react-native-nitro-base64",
2971
+ "react-native-dynamic-theme",
2761
2972
  "react-native-nitro-gzip",
2762
2973
  "react-native-sectioned-slider"
2763
2974
  ];
@@ -3020,6 +3231,10 @@ var SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES = {
3020
3231
  specifier: "@peach-internal/expo-platform",
3021
3232
  packageName: "expo-modules-core/build/Platform.js"
3022
3233
  },
3234
+ expoLegacyEventEmitter: {
3235
+ specifier: "@peach-internal/expo-legacy-event-emitter",
3236
+ packageName: "expo-modules-core/build/LegacyEventEmitter.js"
3237
+ },
3023
3238
  expoSharedObjectHook: {
3024
3239
  specifier: "@peach-internal/expo-shared-object-hook",
3025
3240
  packageName: "expo-modules-core/build/hooks/useReleasingSharedObject.js"
@@ -3623,217 +3838,6 @@ var COMPAT_STUBS = {
3623
3838
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3624
3839
  var import_node_fs4 = __toESM(require("node:fs"), 1);
3625
3840
  var import_node_path4 = __toESM(require("node:path"), 1);
3626
-
3627
- // ../peach-compat/src/version-range.ts
3628
- init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3629
- var ANY_BOUNDS = {
3630
- lower: null,
3631
- lowerInclusive: false,
3632
- upper: null,
3633
- upperInclusive: false
3634
- };
3635
- var COMPARATOR = /\s*(?:[<>]=?|[=^~])?\s*[^\s]+/g;
3636
- function compareVersions(left, right) {
3637
- if (left.major !== right.major) return left.major < right.major ? -1 : 1;
3638
- if (left.minor !== right.minor) return left.minor < right.minor ? -1 : 1;
3639
- if (left.patch !== right.patch) return left.patch < right.patch ? -1 : 1;
3640
- if (left.prerelease.length === 0) return right.prerelease.length === 0 ? 0 : 1;
3641
- if (right.prerelease.length === 0) return -1;
3642
- const length = Math.max(left.prerelease.length, right.prerelease.length);
3643
- for (let index = 0; index < length; index++) {
3644
- const leftPart = left.prerelease[index];
3645
- const rightPart = right.prerelease[index];
3646
- if (leftPart === void 0) return -1;
3647
- if (rightPart === void 0) return 1;
3648
- if (leftPart === rightPart) continue;
3649
- const leftNumeric = /^\d+$/.test(leftPart);
3650
- const rightNumeric = /^\d+$/.test(rightPart);
3651
- if (leftNumeric && rightNumeric) return Number(leftPart) < Number(rightPart) ? -1 : 1;
3652
- if (leftNumeric !== rightNumeric) return leftNumeric ? -1 : 1;
3653
- return leftPart < rightPart ? -1 : 1;
3654
- }
3655
- return 0;
3656
- }
3657
- function parseComparator(input) {
3658
- const token = input.trim();
3659
- if (token === "" || token === "*" || token === "x" || token === "X") {
3660
- return ANY_BOUNDS;
3661
- }
3662
- const match = /^(>=|<=|>|<|=|\^|~)?\s*v?(\d+|[xX*])(?:\.(\d+|[xX*]))?(?:\.(\d+|[xX*]))?(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(
3663
- token
3664
- );
3665
- if (!match) return null;
3666
- const operator = match[1] ?? "=";
3667
- const wildcard = (part) => part === void 0 || part === "x" || part === "X" || part === "*";
3668
- if (wildcard(match[2])) return ANY_BOUNDS;
3669
- const major = Number(match[2]);
3670
- const minor = wildcard(match[3]) ? null : Number(match[3]);
3671
- const patch = wildcard(match[4]) ? null : Number(match[4]);
3672
- const floor = {
3673
- major,
3674
- minor: minor ?? 0,
3675
- patch: patch ?? 0,
3676
- prerelease: match[5] ? match[5].split(".") : []
3677
- };
3678
- if (operator === ">") {
3679
- return { ...ANY_BOUNDS, lower: floor, lowerInclusive: false };
3680
- }
3681
- if (operator === ">=") {
3682
- return { ...ANY_BOUNDS, lower: floor, lowerInclusive: true };
3683
- }
3684
- if (operator === "<") {
3685
- return { ...ANY_BOUNDS, upper: floor, upperInclusive: false };
3686
- }
3687
- if (operator === "<=") {
3688
- return { ...ANY_BOUNDS, upper: floor, upperInclusive: true };
3689
- }
3690
- let upper;
3691
- if (operator === "^") {
3692
- upper = major !== 0 ? { major: major + 1, minor: 0, patch: 0, prerelease: [] } : (minor ?? 0) !== 0 || minor === null ? { major: 0, minor: (minor ?? 0) + 1, patch: 0, prerelease: [] } : { major: 0, minor: 0, patch: (patch ?? 0) + 1, prerelease: [] };
3693
- } else if (operator === "~") {
3694
- upper = minor === null ? { major: major + 1, minor: 0, patch: 0, prerelease: [] } : { major, minor: minor + 1, patch: 0, prerelease: [] };
3695
- } else if (minor === null) {
3696
- upper = { major: major + 1, minor: 0, patch: 0, prerelease: [] };
3697
- } else if (patch === null) {
3698
- upper = { major, minor: minor + 1, patch: 0, prerelease: [] };
3699
- } else {
3700
- return {
3701
- lower: floor,
3702
- lowerInclusive: true,
3703
- upper: floor,
3704
- upperInclusive: true
3705
- };
3706
- }
3707
- return {
3708
- lower: floor,
3709
- lowerInclusive: true,
3710
- upper,
3711
- upperInclusive: false
3712
- };
3713
- }
3714
- function stricterLower(left, right) {
3715
- if (!left.lower) return { lower: right.lower, lowerInclusive: right.lowerInclusive };
3716
- if (!right.lower) return { lower: left.lower, lowerInclusive: left.lowerInclusive };
3717
- const order = compareVersions(left.lower, right.lower);
3718
- if (order > 0) return { lower: left.lower, lowerInclusive: left.lowerInclusive };
3719
- if (order < 0) return { lower: right.lower, lowerInclusive: right.lowerInclusive };
3720
- return {
3721
- lower: left.lower,
3722
- lowerInclusive: left.lowerInclusive && right.lowerInclusive
3723
- };
3724
- }
3725
- function stricterUpper(left, right) {
3726
- if (!left.upper) return { upper: right.upper, upperInclusive: right.upperInclusive };
3727
- if (!right.upper) return { upper: left.upper, upperInclusive: left.upperInclusive };
3728
- const order = compareVersions(left.upper, right.upper);
3729
- if (order < 0) return { upper: left.upper, upperInclusive: left.upperInclusive };
3730
- if (order > 0) return { upper: right.upper, upperInclusive: right.upperInclusive };
3731
- return {
3732
- upper: left.upper,
3733
- upperInclusive: left.upperInclusive && right.upperInclusive
3734
- };
3735
- }
3736
- function hasValues(bounds) {
3737
- if (!bounds.lower || !bounds.upper) return true;
3738
- const order = compareVersions(bounds.lower, bounds.upper);
3739
- return order < 0 || order === 0 && bounds.lowerInclusive && bounds.upperInclusive;
3740
- }
3741
- function parseRange(input) {
3742
- const groups = input.split("||");
3743
- const parsed = [];
3744
- for (const group of groups) {
3745
- const tokens = group.trim().match(COMPARATOR) ?? [];
3746
- if (tokens.length === 0) return null;
3747
- let bounds = ANY_BOUNDS;
3748
- for (const token of tokens) {
3749
- const comparator = parseComparator(token);
3750
- if (!comparator) return null;
3751
- bounds = {
3752
- ...stricterLower(bounds, comparator),
3753
- ...stricterUpper(bounds, comparator)
3754
- };
3755
- }
3756
- if (!hasValues(bounds)) return null;
3757
- parsed.push(bounds);
3758
- }
3759
- return parsed;
3760
- }
3761
- function containsBounds(container, contained) {
3762
- if (container.lower) {
3763
- if (!contained.lower) return false;
3764
- const order = compareVersions(container.lower, contained.lower);
3765
- if (order > 0) return false;
3766
- if (order === 0 && contained.lowerInclusive && !container.lowerInclusive) return false;
3767
- }
3768
- if (container.upper) {
3769
- if (!contained.upper) return false;
3770
- const order = compareVersions(container.upper, contained.upper);
3771
- if (order < 0) return false;
3772
- if (order === 0 && contained.upperInclusive && !container.upperInclusive) return false;
3773
- }
3774
- return true;
3775
- }
3776
- function overlapsBounds(left, right) {
3777
- const intersection = {
3778
- ...stricterLower(left, right),
3779
- ...stricterUpper(left, right)
3780
- };
3781
- return hasValues(intersection);
3782
- }
3783
- function resolveCompatVersionRange(availableRegistryRanges, declaredVersion) {
3784
- const declaredGroups = parseRange(declaredVersion);
3785
- const registryGroups = availableRegistryRanges.map((range) => ({
3786
- range,
3787
- bounds: parseRange(range)
3788
- }));
3789
- if (!declaredGroups || registryGroups.some((candidate) => !candidate.bounds)) {
3790
- return {
3791
- status: "unresolved",
3792
- declaredVersion,
3793
- availableRegistryRanges
3794
- };
3795
- }
3796
- let selectedRange = null;
3797
- for (const declared of declaredGroups) {
3798
- const containing = registryGroups.filter(
3799
- (candidate2) => candidate2.bounds?.length === 1 && containsBounds(candidate2.bounds[0], declared)
3800
- );
3801
- if (containing.length !== 1) {
3802
- const overlaps = registryGroups.some(
3803
- (candidate2) => candidate2.bounds?.some((bounds) => overlapsBounds(bounds, declared))
3804
- );
3805
- return {
3806
- status: overlaps ? "unresolved" : "unmatched",
3807
- declaredVersion,
3808
- availableRegistryRanges
3809
- };
3810
- }
3811
- const candidate = containing[0].range;
3812
- if (selectedRange && selectedRange !== candidate) {
3813
- return {
3814
- status: "unresolved",
3815
- declaredVersion,
3816
- availableRegistryRanges
3817
- };
3818
- }
3819
- selectedRange = candidate;
3820
- }
3821
- if (!selectedRange) {
3822
- return {
3823
- status: "unresolved",
3824
- declaredVersion,
3825
- availableRegistryRanges
3826
- };
3827
- }
3828
- return {
3829
- status: "matched",
3830
- declaredVersion,
3831
- registryRange: selectedRange,
3832
- availableRegistryRanges
3833
- };
3834
- }
3835
-
3836
- // src/installed-native-build-options.ts
3837
3841
  var RIVE_PACKAGE = "@rive-app/react-native";
3838
3842
  var RIVE_05 = [">=0.5.0 <0.6.0"];
3839
3843
  function missing(error) {
@@ -5356,6 +5360,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
5356
5360
  else proxyReq.end(nextBody);
5357
5361
  });
5358
5362
  const proxyRes = await send().finally(() => req.off("aborted", markAborted));
5363
+ upstreamAnswered = true;
5359
5364
  const status = proxyRes.statusCode ?? 502;
5360
5365
  const location = proxyRes.headers.location;
5361
5366
  const hopCookies = [...setCookies, ...proxyRes.headers["set-cookie"] ?? []];
@@ -5401,6 +5406,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
5401
5406
  }
5402
5407
  await (0, import_promises3.pipeline)(proxyRes, res);
5403
5408
  };
5409
+ let upstreamAnswered = false;
5404
5410
  let body;
5405
5411
  try {
5406
5412
  if (req.method !== "GET" && req.method !== "HEAD") {
@@ -5415,6 +5421,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
5415
5421
  await proxy(upstreamUrl, originalMethod, body, 0, []);
5416
5422
  } catch (err) {
5417
5423
  const norm = normalizeHostname(upstreamUrl.hostname);
5424
+ if (upstreamAnswered && !res.headersSent)
5425
+ console.error(`[peach] fetch proxy could not forward ${upstreamUrl.href}:`, err);
5418
5426
  if (!res.headersSent && isLoopbackHost(norm) && err?.code === "ECONNREFUSED") {
5419
5427
  const altHosts = norm === "::1" ? ["127.0.0.1"] : norm === "127.0.0.1" ? ["[::1]"] : ["[::1]", "127.0.0.1"];
5420
5428
  for (const altHost of altHosts) {
@@ -5442,6 +5450,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
5442
5450
  res.end();
5443
5451
  return;
5444
5452
  }
5453
+ if (!(err instanceof Error && "code" in err))
5454
+ console.error("[peach] fetch proxy failed:", err);
5445
5455
  if (req instanceof import_node_http2.Http2ServerRequest)
5446
5456
  req.stream.destroy(new Error("fetch proxy upstream failed", { cause: err }));
5447
5457
  else req.socket.destroy();
@@ -6179,6 +6189,10 @@ function swiftViteLifetime(server) {
6179
6189
  }
6180
6190
 
6181
6191
  // src/vite-plugin-one.ts
6192
+ function requestAuthority(req) {
6193
+ const authority = req.headers[":authority"];
6194
+ return req.headers.host ?? (typeof authority === "string" ? authority : void 0);
6195
+ }
6182
6196
  function exposeHeader(res, name) {
6183
6197
  const exposed = res.getHeader("access-control-expose-headers");
6184
6198
  const names = typeof exposed === "string" && exposed ? exposed.split(/,\s*/) : [];
@@ -6254,7 +6268,6 @@ function peachPlugin(options = {}) {
6254
6268
  return;
6255
6269
  }
6256
6270
  const loopback = address.address === "::" || address.address === "0.0.0.0" ? "127.0.0.1" : address.address;
6257
- const authority = req.headers[":authority"];
6258
6271
  const options2 = {
6259
6272
  host: loopback,
6260
6273
  port: address.port,
@@ -6264,7 +6277,7 @@ function peachPlugin(options = {}) {
6264
6277
  ...Object.fromEntries(
6265
6278
  Object.entries(req.headers).filter(([key]) => !key.startsWith(":"))
6266
6279
  ),
6267
- host: req.headers.host ?? (typeof authority === "string" ? authority : void 0),
6280
+ host: requestAuthority(req),
6268
6281
  "accept-encoding": "identity",
6269
6282
  [BUNDLE_SOURCE_REQUEST_HEADER]: "1"
6270
6283
  },
@@ -6280,13 +6293,14 @@ function peachPlugin(options = {}) {
6280
6293
  res.setHeader(key, value);
6281
6294
  }
6282
6295
  const forward = res.statusCode === 200 ? forwardRolldownBundleResponse(upstream, res) : (0, import_promises5.pipeline)(upstream, res);
6283
- forward.catch(
6284
- (error) => res.destroy(error instanceof Error ? error : new Error(String(error)))
6285
- );
6296
+ forward.catch((error) => {
6297
+ console.error("[peach] bundle forward failed", error);
6298
+ res.destroy(error instanceof Error ? error : new Error(String(error)));
6299
+ });
6286
6300
  };
6287
6301
  const upstreamReq = server.config.server.https ? import_node_https2.default.request(options2, respond) : import_node_http3.default.request(options2, respond);
6288
6302
  upstreamReq.once("error", next);
6289
- req.once("close", () => {
6303
+ res.once("close", () => {
6290
6304
  if (!res.writableFinished) upstreamReq.destroy();
6291
6305
  });
6292
6306
  upstreamReq.end();
@@ -6365,7 +6379,7 @@ function peachPlugin(options = {}) {
6365
6379
  const devOrigin = () => `http://localhost:${listeningPort()}`;
6366
6380
  const requestOrigin = (req) => new URL(
6367
6381
  req.url || "/",
6368
- `${server.config.server.https ? "https" : "http"}://${req.headers.host}`
6382
+ `${server.config.server.https ? "https" : "http"}://${requestAuthority(req)}`
6369
6383
  ).origin;
6370
6384
  const sendSwiftChange = (change) => {
6371
6385
  const message = JSON.stringify(change);
@@ -6510,7 +6524,7 @@ function peachPlugin(options = {}) {
6510
6524
  const html = import_fs4.default.readFileSync(import_path4.default.join(runtimeRoot, "index.html"), "utf8");
6511
6525
  const lock = readDaemonLockfile();
6512
6526
  const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
6513
- const inject = `<script>(function(){var u=new URL(location.href);var b=${JSON.stringify(bundleForOrigin(origin))};if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',b);window.__sootsimBridgePort=${bridgePort};window.__peachPageServingAuthority='contributor';history.replaceState(null,'','${prefix}/'+u.search)})()</script>`;
6527
+ const inject = `<script>(function(){var u=new URL(location.href);var b=${JSON.stringify(bundleForOrigin(origin))};if(!u.searchParams.has('bundle')&&!u.searchParams.get('demoApp')?.trim())u.searchParams.set('bundle',b);window.__sootsimBridgePort=${bridgePort};window.__peachPageServingAuthority='contributor';history.replaceState(null,'','${prefix}/'+u.search)})()</script>`;
6514
6528
  return html.replace("</head>", inject + "</head>");
6515
6529
  };
6516
6530
  server.middlewares.use((req, res, next) => {
@@ -6575,7 +6589,7 @@ function peachPlugin(options = {}) {
6575
6589
  if (serveBrowserProxyRoute(req, res)) return;
6576
6590
  const url = req.url || "";
6577
6591
  const pathname = url.split("?")[0];
6578
- const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers.host);
6592
+ const runtimeRoot = resolveRuntimeRootForRequestHost(requestAuthority(req));
6579
6593
  if (!runtimeRoot) {
6580
6594
  if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(prefix + "/")) {
6581
6595
  res.statusCode = 500;