peachsim 0.1.1644 → 0.1.1653

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 (608) hide show
  1. package/README.md +12 -0
  2. package/cli/app-catalog.ts +1 -1
  3. package/cli/app-fonts.ts +11 -80
  4. package/cli/app-splash.ts +18 -12
  5. package/cli/bridge-flow-runner.ts +11 -7
  6. package/cli/cloud-client.ts +10 -13
  7. package/cli/command-registry.ts +13 -4
  8. package/cli/commands/box.ts +4 -4
  9. package/cli/commands/control.ts +93 -53
  10. package/cli/commands/coverage-parser.ts +67 -0
  11. package/cli/commands/coverage.ts +550 -0
  12. package/cli/commands/debug.ts +9 -18
  13. package/cli/commands/desktop.ts +19 -7
  14. package/cli/commands/device.ts +14 -9
  15. package/cli/commands/guest-host.ts +6 -10
  16. package/cli/commands/inspect/core.ts +81 -17
  17. package/cli/commands/inspect.ts +13 -8
  18. package/cli/commands/kotlin.ts +2 -2
  19. package/cli/commands/maestro-compare.ts +1 -1
  20. package/cli/commands/platform.ts +20 -11
  21. package/cli/commands/preview.ts +16 -18
  22. package/cli/commands/runtime.ts +3 -2
  23. package/cli/commands/screenshot-layers.ts +1 -1
  24. package/cli/commands/screenshot.ts +1 -1
  25. package/cli/commands/serve.ts +5 -1
  26. package/cli/commands/support.ts +4 -4
  27. package/cli/commands/three-mode.ts +22 -15
  28. package/cli/commands/upload.ts +44 -45
  29. package/cli/current-sim.ts +38 -0
  30. package/cli/desktop-companion.ts +36 -8
  31. package/cli/device-option.ts +1 -1
  32. package/cli/drivers/playwright.ts +1 -0
  33. package/cli/drivers/types.ts +4 -0
  34. package/cli/help-core.ts +1 -1
  35. package/cli/internal-child.ts +2 -1
  36. package/cli/main.ts +9 -3
  37. package/cli/outbound-endpoints.ts +11 -3
  38. package/cli/output-redaction.ts +39 -14
  39. package/cli/remote-simulators.ts +4 -1
  40. package/cli/scene-video.ts +5 -2
  41. package/cli/send-to-box.ts +7 -10
  42. package/cli/telemetry.ts +1 -1
  43. package/cli/ws-bridge.ts +8 -1
  44. package/detox/attempt-events.cjs +3 -1
  45. package/detox/attempt-events.d.cts +1 -1
  46. package/detox/expectations.ts +108 -99
  47. package/detox/frame-offset.d.mts +6 -0
  48. package/detox/frame-offset.mjs +35 -0
  49. package/detox/gestures.ts +6 -18
  50. package/detox/index.ts +169 -101
  51. package/detox/jest-preset.cjs +1 -3
  52. package/detox/jest-transform.cjs +4 -0
  53. package/detox/matchers.ts +3 -0
  54. package/detox/motion-change.cjs +46 -114
  55. package/detox/motion-change.d.cts +5 -27
  56. package/dist-lib/agent-daemon-client.cjs +1 -1
  57. package/dist-lib/agent-events.cjs +1 -1
  58. package/dist-lib/attached-projects.cjs +1 -1
  59. package/dist-lib/auth/shared-session.cjs +1 -1
  60. package/dist-lib/backend-origin.cjs +1 -1
  61. package/dist-lib/beta.cjs +1 -1
  62. package/dist-lib/beta.mjs +1 -1
  63. package/dist-lib/bridge-constants.cjs +1 -1
  64. package/dist-lib/bridge-contract-input.cjs +65 -1
  65. package/dist-lib/bridge-contract-input.mjs +63 -1
  66. package/dist-lib/bridge-contract.cjs +19 -1
  67. package/dist-lib/bridge-contract.mjs +17 -1
  68. package/dist-lib/bundle-channel.cjs +38091 -14846
  69. package/dist-lib/capture-contract.cjs +1 -1
  70. package/dist-lib/capture-contract.mjs +1 -1
  71. package/dist-lib/cloud-contract.cjs +1 -1
  72. package/dist-lib/cloud-contract.mjs +1 -1
  73. package/dist-lib/cloud-test-args.cjs +1 -1
  74. package/dist-lib/cloud-test-args.mjs +1 -1
  75. package/dist-lib/cloud.cjs +1 -1
  76. package/dist-lib/cloud.mjs +1 -1
  77. package/dist-lib/config.cjs +1 -1
  78. package/dist-lib/config.mjs +5 -3
  79. package/dist-lib/detox/index.cjs +1244 -4509
  80. package/dist-lib/detox/jest-preset.cjs +1 -3
  81. package/dist-lib/detox/jest-transform.cjs +4 -0
  82. package/dist-lib/dev-bundle-resolution.cjs +28 -24
  83. package/dist-lib/expo-swift-bundle.cjs +35049 -13125
  84. package/dist-lib/expo-swift-metadata.cjs +1 -1
  85. package/dist-lib/expo-swift-metadata.mjs +1 -1
  86. package/dist-lib/home-paths.cjs +1 -1
  87. package/dist-lib/host/bridge-host.cjs +45112 -63143
  88. package/dist-lib/host/fetch-proxy-handler.cjs +3544 -11
  89. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  90. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  91. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  92. package/dist-lib/host/websocket-proxy.cjs +1 -1
  93. package/dist-lib/index.cjs +1909 -2029
  94. package/dist-lib/jump-to-source-babel.cjs +1 -1
  95. package/dist-lib/jump-to-source-native.cjs +1 -1
  96. package/dist-lib/kotlin-host.cjs +2 -2
  97. package/dist-lib/menu.cjs +1 -1
  98. package/dist-lib/menu.mjs +1 -1
  99. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  100. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  101. package/dist-lib/metro-production-bundle.cjs +1 -1
  102. package/dist-lib/metro-production-bundle.mjs +1 -1
  103. package/dist-lib/metro.cjs +380 -522
  104. package/dist-lib/native-app-identity-project.cjs +39 -252
  105. package/dist-lib/native-app-identity-project.mjs +1174 -11
  106. package/dist-lib/native-app-identity.cjs +8 -3
  107. package/dist-lib/native-app-identity.mjs +8 -3
  108. package/dist-lib/native-firebase-metadata.cjs +1 -1
  109. package/dist-lib/native-firebase-metadata.mjs +1 -1
  110. package/dist-lib/plist.cjs +2 -244
  111. package/dist-lib/plist.mjs +1 -1
  112. package/dist-lib/profiles.cjs +1 -1
  113. package/dist-lib/public-brand.cjs +1 -1
  114. package/dist-lib/public-origins-lib-esm.json +290 -0
  115. package/dist-lib/public-origins-lib-static.json +1 -0
  116. package/dist-lib/public-origins-lib.json +1852 -0
  117. package/dist-lib/react-native-host-modules.cjs +1 -1
  118. package/dist-lib/react-native-host-modules.mjs +1 -1
  119. package/dist-lib/scripts/dev-server-scanner.cjs +14 -253
  120. package/dist-lib/sdk.cjs +83 -16
  121. package/dist-lib/sdk.mjs +81 -15
  122. package/dist-lib/skills.cjs +50546 -75098
  123. package/dist-lib/swift-compile.cjs +25897 -1070
  124. package/dist-lib/swift-compile.mjs +25866 -1033
  125. package/dist-lib/swift-package.cjs +79 -1
  126. package/dist-lib/swift-package.mjs +75 -1
  127. package/dist-lib/swift-submit.cjs +1 -1
  128. package/dist-lib/swift-submit.mjs +1 -1
  129. package/dist-lib/swift-toolchain.cjs +1 -1
  130. package/dist-lib/swift.cjs +1 -1
  131. package/dist-lib/vite-swift.cjs +34273 -12349
  132. package/dist-lib/vite.cjs +373 -298
  133. package/dist-lib/worklet-executable.cjs +1 -1
  134. package/dist-lib/worklet-executable.mjs +1 -1
  135. package/dist-types/packages/peach-compat/src/engine-config.d.ts +2 -0
  136. package/dist-types/packages/peach-compat/src/stubs/form-sheet-spring.d.ts +9 -0
  137. package/dist-types/packages/peach-compat/src/stubs/native-evaluation-lease.d.ts +47 -0
  138. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +113 -0
  139. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +154 -0
  140. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +756 -0
  141. package/dist-types/packages/peach-compat/src/stubs/transition-scalar.d.ts +25 -0
  142. package/dist-types/packages/peach-engine/src/billing/plans.d.ts +64 -0
  143. package/dist-types/packages/peach-engine/src/browser-page-target.d.ts +2 -0
  144. package/dist-types/packages/peach-engine/src/bundle-platform-url.d.ts +3 -0
  145. package/dist-types/packages/peach-engine/src/capture/browser-accessibility-host.d.ts +3 -0
  146. package/dist-types/packages/peach-engine/src/capture/browser-composite.d.ts +55 -0
  147. package/dist-types/packages/peach-engine/src/capture/browserAccessibilityContract.d.ts +27 -0
  148. package/dist-types/packages/peach-engine/src/capture/nativeScreenCaptureContract.d.ts +22 -0
  149. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +36 -0
  150. package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +34 -0
  151. package/dist-types/packages/peach-engine/src/config.d.ts +5 -0
  152. package/dist-types/packages/peach-engine/src/engine/android-stretch-effect.d.ts +57 -0
  153. package/dist-types/packages/peach-engine/src/engine/animated-driven-style.d.ts +47 -0
  154. package/dist-types/packages/peach-engine/src/engine/animated-value.d.ts +5 -0
  155. package/dist-types/packages/peach-engine/src/engine/animated.d.ts +195 -0
  156. package/dist-types/packages/peach-engine/src/engine/animation-clockContract.d.ts +15 -0
  157. package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +148 -0
  158. package/dist-types/packages/peach-engine/src/engine/app-catalog-wire.d.ts +10 -0
  159. package/dist-types/packages/peach-engine/src/engine/app-font-registry.d.ts +87 -0
  160. package/dist-types/packages/peach-engine/src/engine/attributed-paragraph-paint.d.ts +7 -0
  161. package/dist-types/packages/peach-engine/src/engine/attributed-paragraph.d.ts +123 -0
  162. package/dist-types/packages/peach-engine/src/engine/audioContract.d.ts +16 -0
  163. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +93 -0
  164. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +216 -0
  165. package/dist-types/packages/peach-engine/src/engine/config-plugin-fonts.d.ts +40 -0
  166. package/dist-types/packages/peach-engine/src/engine/config-plugin-splash.d.ts +25 -0
  167. package/dist-types/packages/peach-engine/src/engine/cull-visibility.d.ts +44 -0
  168. package/dist-types/packages/peach-engine/src/engine/damage-rect.d.ts +19 -0
  169. package/dist-types/packages/peach-engine/src/engine/engine-resource.d.ts +6 -0
  170. package/dist-types/packages/peach-engine/src/engine/expo-manifest.d.ts +5 -0
  171. package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +30 -0
  172. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +139 -0
  173. package/dist-types/packages/peach-engine/src/engine/generated/sf-pro-font.d.ts +1 -0
  174. package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +31 -0
  175. package/dist-types/packages/peach-engine/src/engine/host-composite.d.ts +100 -0
  176. package/dist-types/packages/peach-engine/src/engine/hosted-semantics.d.ts +49 -0
  177. package/dist-types/packages/peach-engine/src/engine/image-audit.d.ts +70 -0
  178. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +350 -0
  179. package/dist-types/packages/peach-engine/src/engine/inspect-info.d.ts +27 -0
  180. package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +14 -0
  181. package/dist-types/packages/peach-engine/src/engine/inspect-visibility.d.ts +33 -0
  182. package/dist-types/packages/peach-engine/src/engine/ios-fast-scroll.d.ts +16 -0
  183. package/dist-types/packages/peach-engine/src/engine/layout-sab.d.ts +43 -0
  184. package/dist-types/packages/peach-engine/src/engine/liquid-glass-rect.d.ts +23 -0
  185. package/dist-types/packages/peach-engine/src/engine/liquid-glass-shaders.d.ts +9 -0
  186. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +283 -0
  187. package/dist-types/packages/peach-engine/src/engine/live-object-counts.d.ts +6 -0
  188. package/dist-types/packages/peach-engine/src/engine/lottie-runtime.d.ts +32 -0
  189. package/dist-types/packages/peach-engine/src/engine/lottie-types.d.ts +138 -0
  190. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +27 -0
  191. package/dist-types/packages/peach-engine/src/engine/metalDirectContract.d.ts +108 -0
  192. package/dist-types/packages/peach-engine/src/engine/metalShaderContract.d.ts +217 -0
  193. package/dist-types/packages/peach-engine/src/engine/native-animation-driver.d.ts +112 -0
  194. package/dist-types/packages/peach-engine/src/engine/native-animation-graph.d.ts +62 -0
  195. package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +133 -0
  196. package/dist-types/packages/peach-engine/src/engine/native-resources.d.ts +26 -0
  197. package/dist-types/packages/peach-engine/src/engine/nativeReanimatedContract.d.ts +25 -0
  198. package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +64 -0
  199. package/dist-types/packages/peach-engine/src/engine/node.d.ts +589 -0
  200. package/dist-types/packages/peach-engine/src/engine/paint-boundary-types.d.ts +112 -0
  201. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +57 -0
  202. package/dist-types/packages/peach-engine/src/engine/portalContract.d.ts +21 -0
  203. package/dist-types/packages/peach-engine/src/engine/portals.d.ts +20 -0
  204. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +107 -0
  205. package/dist-types/packages/peach-engine/src/engine/riveContract.d.ts +420 -0
  206. package/dist-types/packages/peach-engine/src/engine/rn-spring.d.ts +51 -0
  207. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +379 -0
  208. package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +152 -0
  209. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +10 -0
  210. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +75 -0
  211. package/dist-types/packages/peach-engine/src/engine/scroll-range.d.ts +14 -0
  212. package/dist-types/packages/peach-engine/src/engine/scroll-velocity.d.ts +14 -0
  213. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +320 -0
  214. package/dist-types/packages/peach-engine/src/engine/signal.d.ts +7 -0
  215. package/dist-types/packages/peach-engine/src/engine/snapshot-cache-policy.d.ts +6 -0
  216. package/dist-types/packages/peach-engine/src/engine/svg-geometry.d.ts +41 -0
  217. package/dist-types/packages/peach-engine/src/engine/text-attachment-paragraphs.d.ts +10 -0
  218. package/dist-types/packages/peach-engine/src/engine/text-decoration.d.ts +11 -0
  219. package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +22 -0
  220. package/dist-types/packages/peach-engine/src/engine/text-paint-receipt.d.ts +98 -0
  221. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +11 -0
  222. package/dist-types/packages/peach-engine/src/engine/text-paragraphContract.d.ts +34 -0
  223. package/dist-types/packages/peach-engine/src/engine/text-transform.d.ts +1 -0
  224. package/dist-types/packages/peach-engine/src/engine/types.d.ts +657 -0
  225. package/dist-types/packages/peach-engine/src/engine/visible-frame.d.ts +54 -0
  226. package/dist-types/packages/peach-engine/src/engine/webrtcContract.d.ts +74 -0
  227. package/dist-types/packages/peach-engine/src/graphite-stats-fields.d.ts +184 -0
  228. package/dist-types/packages/peach-engine/src/guest-import-meta.d.ts +12 -0
  229. package/dist-types/packages/peach-engine/src/guest-module-overrides.d.ts +7 -0
  230. package/dist-types/packages/peach-engine/src/ios/app-card-types.d.ts +7 -0
  231. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +177 -0
  232. package/dist-types/packages/peach-engine/src/ios/aux-home-scene.d.ts +54 -0
  233. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +47 -0
  234. package/dist-types/packages/peach-engine/src/ios/constants.d.ts +21 -0
  235. package/dist-types/packages/peach-engine/src/ios/duo-housing.d.ts +37 -0
  236. package/dist-types/packages/peach-engine/src/ios/home/types.d.ts +29 -0
  237. package/dist-types/packages/peach-engine/src/ios/home-app-catalog.d.ts +43 -0
  238. package/dist-types/packages/peach-engine/src/ios/photo-store.d.ts +73 -0
  239. package/dist-types/packages/peach-engine/src/ios/photoLibraryContract.d.ts +166 -0
  240. package/dist-types/packages/peach-engine/src/ios/shell-controller-types.d.ts +21 -0
  241. package/dist-types/packages/peach-engine/src/ios/shell-transition-debug.d.ts +18 -0
  242. package/dist-types/packages/peach-engine/src/metro-asset-path.d.ts +21 -0
  243. package/dist-types/packages/peach-engine/src/metro-fingerprint-registry-client.d.ts +11 -0
  244. package/dist-types/packages/peach-engine/src/metro-fingerprint.d.ts +38 -0
  245. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +44 -0
  246. package/dist-types/packages/peach-engine/src/observability/types.d.ts +74 -0
  247. package/dist-types/packages/peach-engine/src/peach-warm-manifest.d.ts +32 -0
  248. package/dist-types/packages/peach-engine/src/permissions/app-settings-client.d.ts +25 -0
  249. package/dist-types/packages/peach-engine/src/permissions/system-permission-types.d.ts +20 -0
  250. package/dist-types/packages/peach-engine/src/platform/android-back-panel.d.ts +131 -0
  251. package/dist-types/packages/peach-engine/src/platform/android-gesture-exclusion.d.ts +28 -0
  252. package/dist-types/packages/peach-engine/src/platform/android-predictive-back.d.ts +33 -0
  253. package/dist-types/packages/peach-engine/src/platform/system-bars-state.d.ts +14 -0
  254. package/dist-types/packages/peach-engine/src/playwright-sim-host.d.ts +1 -0
  255. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +8 -0
  256. package/dist-types/packages/peach-engine/src/preview/bundle-variantContract.d.ts +24 -0
  257. package/dist-types/packages/peach-engine/src/preview/capture-bundle.d.ts +26 -0
  258. package/dist-types/packages/peach-engine/src/preview/compress-node.d.ts +2 -0
  259. package/dist-types/packages/peach-engine/src/preview/compress.d.ts +2 -0
  260. package/dist-types/packages/peach-engine/src/preview/presigned-upload.d.ts +60 -0
  261. package/dist-types/packages/peach-engine/src/preview/trace.d.ts +144 -0
  262. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +152 -0
  263. package/dist-types/packages/peach-engine/src/profiler/animation-recording-loader.d.ts +1 -0
  264. package/dist-types/packages/peach-engine/src/profiler/profile-trace.d.ts +4 -0
  265. package/dist-types/packages/peach-engine/src/react-bridge.d.ts +3 -0
  266. package/dist-types/packages/peach-engine/src/react-native/AppState.d.ts +45 -0
  267. package/dist-types/packages/peach-engine/src/react-native/Appearance.d.ts +34 -0
  268. package/dist-types/packages/peach-engine/src/react-native/framework-colors-data.d.ts +2 -0
  269. package/dist-types/packages/peach-engine/src/react-native/host-services.d.ts +42 -0
  270. package/dist-types/packages/peach-engine/src/react-native/layout-animation.d.ts +22 -0
  271. package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +17 -0
  272. package/dist-types/packages/peach-engine/src/remote-stream/client-config.d.ts +10 -0
  273. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +58 -0
  274. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +45 -0
  275. package/dist-types/packages/peach-engine/src/render-worker/animated-drive-output.d.ts +35 -0
  276. package/dist-types/packages/peach-engine/src/render-worker/app-load.d.ts +16 -0
  277. package/dist-types/packages/peach-engine/src/render-worker/aux-surface-types.d.ts +2 -0
  278. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-shared.d.ts +42 -0
  279. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +434 -0
  280. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-worker-init.d.ts +12 -0
  281. package/dist-types/packages/peach-engine/src/render-worker/compositor-backend.d.ts +31 -0
  282. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +202 -0
  283. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1945 -0
  284. package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-resample.d.ts +44 -0
  285. package/dist-types/packages/peach-engine/src/render-worker/css-keyframes-drive.d.ts +36 -0
  286. package/dist-types/packages/peach-engine/src/render-worker/edit-menu-geometry.d.ts +8 -0
  287. package/dist-types/packages/peach-engine/src/render-worker/engine-resource-relay.d.ts +21 -0
  288. package/dist-types/packages/peach-engine/src/render-worker/expo-widgetContract.d.ts +16 -0
  289. package/dist-types/packages/peach-engine/src/render-worker/gesture-seam-protocol.d.ts +152 -0
  290. package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +29 -0
  291. package/dist-types/packages/peach-engine/src/render-worker/graphite-pipeline-compiler-contract.d.ts +49 -0
  292. package/dist-types/packages/peach-engine/src/render-worker/graphite-pipeline-compiler.d.ts +12 -0
  293. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +756 -0
  294. package/dist-types/packages/peach-engine/src/render-worker/image-lifecycle-event.d.ts +22 -0
  295. package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +48 -0
  296. package/dist-types/packages/peach-engine/src/render-worker/live-frame-mirror.d.ts +34 -0
  297. package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +189 -0
  298. package/dist-types/packages/peach-engine/src/render-worker/mapNativeContract.d.ts +101 -0
  299. package/dist-types/packages/peach-engine/src/render-worker/native-dynamic-synchronizable.d.ts +22 -0
  300. package/dist-types/packages/peach-engine/src/render-worker/native-menu-gesture.d.ts +9 -0
  301. package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +23 -0
  302. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1087 -0
  303. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +100 -0
  304. package/dist-types/packages/peach-engine/src/render-worker/nativeAnimMirrorContract.d.ts +174 -0
  305. package/dist-types/packages/peach-engine/src/render-worker/nativeSyncReplyContract.d.ts +11 -0
  306. package/dist-types/packages/peach-engine/src/render-worker/one-native-contentContract.d.ts +54 -0
  307. package/dist-types/packages/peach-engine/src/render-worker/pointerSampleContract.d.ts +14 -0
  308. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +880 -0
  309. package/dist-types/packages/peach-engine/src/render-worker/reanimated-css-contract.d.ts +63 -0
  310. package/dist-types/packages/peach-engine/src/render-worker/reanimated-readiness.d.ts +29 -0
  311. package/dist-types/packages/peach-engine/src/render-worker/resilient-frame-clock.d.ts +22 -0
  312. package/dist-types/packages/peach-engine/src/render-worker/retained-app-load.d.ts +20 -0
  313. package/dist-types/packages/peach-engine/src/render-worker/screen-edge-swipe-commit-protocol.d.ts +1 -0
  314. package/dist-types/packages/peach-engine/src/render-worker/screen-form-sheet-commit-protocol.d.ts +26 -0
  315. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror-tenant.d.ts +37 -0
  316. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +164 -0
  317. package/dist-types/packages/peach-engine/src/render-worker/shell-event-registry.d.ts +119 -0
  318. package/dist-types/packages/peach-engine/src/render-worker/shell-gesture-regions.d.ts +41 -0
  319. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +603 -0
  320. package/dist-types/packages/peach-engine/src/render-worker/shell-scene-schema.d.ts +101 -0
  321. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-inline-sources.d.ts +13 -0
  322. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +87 -0
  323. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +47 -0
  324. package/dist-types/packages/peach-engine/src/render-worker/text-inputContract.d.ts +93 -0
  325. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +102 -0
  326. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +292 -0
  327. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +107 -0
  328. package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +16 -0
  329. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +211 -0
  330. package/dist-types/packages/peach-engine/src/render-worker/worker-storage.d.ts +33 -0
  331. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +987 -0
  332. package/dist-types/packages/peach-engine/src/render-worker/worklet-sab.d.ts +24 -0
  333. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +84 -0
  334. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +31 -0
  335. package/dist-types/packages/peach-engine/src/screenshots/timeline-assets.d.ts +10 -0
  336. package/dist-types/packages/peach-engine/src/screenshots/tokens.d.ts +9 -0
  337. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +70 -0
  338. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +87 -0
  339. package/dist-types/packages/peach-engine/src/settings/interface-rotation.d.ts +30 -0
  340. package/dist-types/packages/peach-engine/src/settings/react-native-configuration.d.ts +12 -0
  341. package/dist-types/packages/peach-engine/src/settings/scene-geometryContract.d.ts +40 -0
  342. package/dist-types/packages/peach-engine/src/settings/store.d.ts +37 -0
  343. package/dist-types/packages/peach-engine/src/shell-events.d.ts +203 -0
  344. package/dist-types/packages/peach-engine/src/shell-intent.d.ts +68 -0
  345. package/dist-types/packages/peach-engine/src/sootsim-event.d.ts +35 -0
  346. package/dist-types/packages/peach-engine/src/top-overlay-state.d.ts +5 -0
  347. package/dist-types/packages/peach-engine/src/web-authentication-automation-host.d.ts +2 -0
  348. package/dist-types/packages/peach-engine/src/webAuthenticationContract.d.ts +34 -0
  349. package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +180 -0
  350. package/dist-types/packages/peach-engine/src/wireframe-mode.d.ts +16 -0
  351. package/dist-types/packages/peach-globals/src/frameBreakdownContract.d.ts +16 -0
  352. package/dist-types/packages/peach-globals/src/index.d.ts +3311 -0
  353. package/dist-types/packages/peach-globals/src/nativeSurfaceContract.d.ts +76 -0
  354. package/dist-types/packages/peach-globals/src/pointerSourceEventContract.d.ts +8 -0
  355. package/dist-types/packages/peach-globals/src/profileTrace.d.ts +11 -0
  356. package/dist-types/packages/peach-globals/src/profilerContract.d.ts +223 -0
  357. package/dist-types/packages/peach-kit/src/capabilities.d.ts +721 -0
  358. package/dist-types/packages/peach-kit/src/internal.d.ts +4 -0
  359. package/dist-types/packages/peach-kit/src/materials/types.d.ts +27 -0
  360. package/dist-types/packages/peach-kit/src/materials/uikit-blur-material.d.ts +14 -0
  361. package/dist-types/packages/peach-kit/src/navigation-types.d.ts +11 -0
  362. package/dist-types/packages/peach-kit/src/react-bridge.d.ts +53 -0
  363. package/dist-types/packages/peach-kit/src/runtime.d.ts +26 -0
  364. package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +24 -0
  365. package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +53 -0
  366. package/dist-types/packages/peach-kit/src/ui/presentationContract.d.ts +17 -0
  367. package/kotlin/ComposeSources/PeachComposeHost.kt +1 -1
  368. package/kotlin/JniSources/com/facebook/jni/HybridData.kt +0 -2
  369. package/kotlin/JniSources/dev/peach/jni/NativeBindings.kt +0 -2
  370. package/kotlin/JniTransportSources/dev/peach/jni/integration/JniTransport.kt +0 -2
  371. package/kotlin/README.md +6 -0
  372. package/package.json +22 -2
  373. package/runtime-companion.json +1 -0
  374. package/skills/contrast/SKILL.md +1 -0
  375. package/src/assetCatalogContract.ts +21 -0
  376. package/src/bridge-contract-input.ts +84 -0
  377. package/src/bridge-contract.ts +35 -3
  378. package/src/browser-launch-policy.ts +1 -0
  379. package/src/bundle-channel.mjs +4 -2
  380. package/src/cli-runtime.ts +55 -0
  381. package/src/crash-fingerprint.ts +26 -0
  382. package/src/dev-bundle-resolution.ts +50 -23
  383. package/src/device-catalog.ts +1159 -0
  384. package/src/host/bridge-host.ts +3 -26
  385. package/src/host/browser-pointer.ts +71 -0
  386. package/src/host/dev-server-package-versions.ts +23 -0
  387. package/src/host/fetch-proxy-handler.ts +17 -4
  388. package/src/installed-package-versions.ts +142 -38
  389. package/src/kotlin-host.ts +1 -1
  390. package/src/metro-plugin.ts +4 -4
  391. package/src/metro-project-root.ts +68 -0
  392. package/src/nitro-adapter.lock.json +26 -0
  393. package/src/nitro-adapter.ts +103 -0
  394. package/src/nitro-bundle.ts +24 -10
  395. package/src/nitro-compile.ts +33 -51
  396. package/src/nitro-source.ts +177 -96
  397. package/src/nitroAdapterContract.ts +217 -0
  398. package/src/nitroContract.ts +24 -11
  399. package/src/process-group.ts +41 -34
  400. package/src/react-bridge-importers.ts +28 -0
  401. package/src/reactNativeConfigurationContract.ts +36 -0
  402. package/src/runtime-assets.ts +7 -2
  403. package/src/runtime-delivery.ts +2 -0
  404. package/src/runtimePlatformContract.ts +70 -0
  405. package/src/screenshots/frame-compose.ts +42 -43
  406. package/src/screenshots/org-deck.ts +9 -4
  407. package/src/screenshots/preset-names.ts +29 -0
  408. package/src/screenshots/registry.ts +5 -5
  409. package/src/screenshots/schema.ts +1 -1
  410. package/src/screenshots/screenshotContract.ts +971 -0
  411. package/src/settings-flags.ts +107 -0
  412. package/src/settingsContract.ts +609 -0
  413. package/src/storageSnapshotContract.ts +344 -0
  414. package/src/stub-pattern-matcher.ts +550 -0
  415. package/src/swift-compile.ts +908 -40
  416. package/src/swift-compiler-digest.ts +13 -1
  417. package/src/swift-distribution.lock.json +49 -22
  418. package/src/swift-host.ts +167 -52
  419. package/src/swift-objc-compile.ts +54 -24
  420. package/src/swift-objc-export.ts +532 -0
  421. package/src/swift-objc-import.ts +769 -0
  422. package/src/swift-objc-metadata.ts +285 -10
  423. package/src/swift-objc-sdk.ts +13970 -158
  424. package/src/swift-objc-standin.ts +137 -1
  425. package/src/swift-package.ts +94 -0
  426. package/src/swift-packages.ts +5 -5
  427. package/src/swift-submit.ts +6 -0
  428. package/src/swiftContract.ts +99 -0
  429. package/src/target-matcher.ts +6 -1
  430. package/src/vite-plugin.ts +14 -40
  431. package/src/worker-system-chunks.ts +1 -1
  432. package/src/workerChunkContract.ts +5 -0
  433. package/src/worklets-babel.ts +24 -5
  434. package/src/xcode-project.ts +36 -7
  435. package/src/xcode-target-members.ts +10 -3
  436. package/cli/drivers/playwright-sim-host.ts +0 -825
  437. package/kotlin/fixtures/counter/Counter.d.kt.ts +0 -17
  438. package/kotlin/fixtures/counter/Counter.kt +0 -51
  439. package/kotlin/fixtures/counter/CounterApp.native.tsx +0 -61
  440. package/kotlin/fixtures/counter/CounterApp.tsx +0 -3
  441. package/kotlin/fixtures/counter/CounterScreen.d.kt.ts +0 -8
  442. package/kotlin/fixtures/counter/CounterScreen.kt +0 -56
  443. package/kotlin/fixtures/counter/app/_layout.tsx +0 -4
  444. package/kotlin/fixtures/counter/app/index+spa.tsx +0 -1
  445. package/kotlin/fixtures/counter/app/routes.d.ts +0 -18
  446. package/kotlin/fixtures/counter/package.json +0 -20
  447. package/kotlin/fixtures/counter/tsconfig.json +0 -19
  448. package/kotlin/fixtures/counter/vite.config.ts +0 -20
  449. package/kotlin/fixtures/headless-counter/Headless.kt +0 -234
  450. package/kotlin/fixtures/import-animation/Animation.d.kt.ts +0 -7
  451. package/kotlin/fixtures/import-animation/Animation.kt +0 -80
  452. package/kotlin/fixtures/import-animation/ImportAnimation.native.tsx +0 -13
  453. package/kotlin/fixtures/import-animation/README.md +0 -24
  454. package/kotlin/fixtures/import-animation/app/_layout.tsx +0 -4
  455. package/kotlin/fixtures/import-animation/app/index+spa.tsx +0 -1
  456. package/kotlin/fixtures/import-animation/app/routes.d.ts +0 -18
  457. package/kotlin/fixtures/import-animation/package.json +0 -23
  458. package/kotlin/fixtures/import-animation/tsconfig.json +0 -20
  459. package/kotlin/fixtures/import-animation/vite.config.ts +0 -20
  460. package/kotlin/fixtures/import-drawing/Drawing.d.kt.ts +0 -7
  461. package/kotlin/fixtures/import-drawing/Drawing.kt +0 -101
  462. package/kotlin/fixtures/import-drawing/ImportDrawing.native.tsx +0 -18
  463. package/kotlin/fixtures/import-drawing/README.md +0 -34
  464. package/kotlin/fixtures/import-drawing/app/_layout.tsx +0 -4
  465. package/kotlin/fixtures/import-drawing/app/index+spa.tsx +0 -1
  466. package/kotlin/fixtures/import-drawing/package.json +0 -23
  467. package/kotlin/fixtures/import-drawing/tsconfig.json +0 -20
  468. package/kotlin/fixtures/import-drawing/vite.config.ts +0 -20
  469. package/kotlin/fixtures/import-editor/Editor.d.kt.ts +0 -7
  470. package/kotlin/fixtures/import-editor/Editor.kt +0 -59
  471. package/kotlin/fixtures/import-editor/ImportEditor.native.tsx +0 -23
  472. package/kotlin/fixtures/import-editor/README.md +0 -27
  473. package/kotlin/fixtures/import-editor/app/_layout.tsx +0 -4
  474. package/kotlin/fixtures/import-editor/app/index+spa.tsx +0 -1
  475. package/kotlin/fixtures/import-editor/package.json +0 -23
  476. package/kotlin/fixtures/import-editor/tsconfig.json +0 -20
  477. package/kotlin/fixtures/import-editor/vite.config.ts +0 -20
  478. package/kotlin/fixtures/import-effects/Effects.d.kt.ts +0 -7
  479. package/kotlin/fixtures/import-effects/Effects.kt +0 -87
  480. package/kotlin/fixtures/import-effects/ImportEffects.native.tsx +0 -13
  481. package/kotlin/fixtures/import-effects/README.md +0 -19
  482. package/kotlin/fixtures/import-effects/app/_layout.tsx +0 -4
  483. package/kotlin/fixtures/import-effects/app/index+spa.tsx +0 -1
  484. package/kotlin/fixtures/import-effects/package.json +0 -23
  485. package/kotlin/fixtures/import-effects/tsconfig.json +0 -20
  486. package/kotlin/fixtures/import-effects/vite.config.ts +0 -20
  487. package/kotlin/fixtures/import-layout/ImportLayout.native.tsx +0 -13
  488. package/kotlin/fixtures/import-layout/Layout.d.kt.ts +0 -7
  489. package/kotlin/fixtures/import-layout/Layout.kt +0 -72
  490. package/kotlin/fixtures/import-layout/README.md +0 -24
  491. package/kotlin/fixtures/import-layout/app/_layout.tsx +0 -4
  492. package/kotlin/fixtures/import-layout/app/index+spa.tsx +0 -1
  493. package/kotlin/fixtures/import-layout/package.json +0 -23
  494. package/kotlin/fixtures/import-layout/tsconfig.json +0 -20
  495. package/kotlin/fixtures/import-layout/vite.config.ts +0 -20
  496. package/kotlin/fixtures/import-navigation/ImportNavigation.native.tsx +0 -18
  497. package/kotlin/fixtures/import-navigation/Navigation.d.kt.ts +0 -7
  498. package/kotlin/fixtures/import-navigation/Navigation.kt +0 -104
  499. package/kotlin/fixtures/import-navigation/README.md +0 -31
  500. package/kotlin/fixtures/import-navigation/app/_layout.tsx +0 -4
  501. package/kotlin/fixtures/import-navigation/app/index+spa.tsx +0 -1
  502. package/kotlin/fixtures/import-navigation/package.json +0 -23
  503. package/kotlin/fixtures/import-navigation/tsconfig.json +0 -20
  504. package/kotlin/fixtures/import-navigation/vite.config.ts +0 -20
  505. package/kotlin/fixtures/import-overlays/ImportOverlays.native.tsx +0 -29
  506. package/kotlin/fixtures/import-overlays/Overlays.d.kt.ts +0 -7
  507. package/kotlin/fixtures/import-overlays/Overlays.kt +0 -93
  508. package/kotlin/fixtures/import-overlays/README.md +0 -34
  509. package/kotlin/fixtures/import-overlays/app/_layout.tsx +0 -4
  510. package/kotlin/fixtures/import-overlays/app/index+spa.tsx +0 -1
  511. package/kotlin/fixtures/import-overlays/package.json +0 -23
  512. package/kotlin/fixtures/import-overlays/tsconfig.json +0 -20
  513. package/kotlin/fixtures/import-overlays/vite.config.ts +0 -20
  514. package/kotlin/fixtures/import-resources/ImportResources.native.tsx +0 -18
  515. package/kotlin/fixtures/import-resources/README.md +0 -26
  516. package/kotlin/fixtures/import-resources/Resources.d.kt.ts +0 -6
  517. package/kotlin/fixtures/import-resources/Resources.kt +0 -72
  518. package/kotlin/fixtures/import-resources/app/_layout.tsx +0 -4
  519. package/kotlin/fixtures/import-resources/app/index+spa.tsx +0 -1
  520. package/kotlin/fixtures/import-resources/package.json +0 -23
  521. package/kotlin/fixtures/import-resources/tsconfig.json +0 -20
  522. package/kotlin/fixtures/import-resources/vite.config.ts +0 -20
  523. package/kotlin/fixtures/import-scroll/ImportNested.native.tsx +0 -10
  524. package/kotlin/fixtures/import-scroll/ImportScroll.native.tsx +0 -13
  525. package/kotlin/fixtures/import-scroll/Nested.d.kt.ts +0 -4
  526. package/kotlin/fixtures/import-scroll/Nested.kt +0 -64
  527. package/kotlin/fixtures/import-scroll/README.md +0 -38
  528. package/kotlin/fixtures/import-scroll/Scroll.d.kt.ts +0 -7
  529. package/kotlin/fixtures/import-scroll/Scroll.kt +0 -91
  530. package/kotlin/fixtures/import-scroll/app/_layout.tsx +0 -4
  531. package/kotlin/fixtures/import-scroll/app/index+spa.tsx +0 -1
  532. package/kotlin/fixtures/import-scroll/app/nested+spa.tsx +0 -1
  533. package/kotlin/fixtures/import-scroll/package.json +0 -23
  534. package/kotlin/fixtures/import-scroll/tsconfig.json +0 -20
  535. package/kotlin/fixtures/import-scroll/vite.config.ts +0 -20
  536. package/kotlin/fixtures/import-selection/ImportSelection.native.tsx +0 -44
  537. package/kotlin/fixtures/import-selection/README.md +0 -32
  538. package/kotlin/fixtures/import-selection/Selection.d.kt.ts +0 -8
  539. package/kotlin/fixtures/import-selection/Selection.kt +0 -78
  540. package/kotlin/fixtures/import-selection/app/_layout.tsx +0 -4
  541. package/kotlin/fixtures/import-selection/app/index+spa.tsx +0 -1
  542. package/kotlin/fixtures/import-selection/package.json +0 -23
  543. package/kotlin/fixtures/import-selection/tsconfig.json +0 -20
  544. package/kotlin/fixtures/import-selection/vite.config.ts +0 -20
  545. package/kotlin/fixtures/import-surfaces/ImportSurfaces.native.tsx +0 -13
  546. package/kotlin/fixtures/import-surfaces/README.md +0 -22
  547. package/kotlin/fixtures/import-surfaces/Surfaces.d.kt.ts +0 -7
  548. package/kotlin/fixtures/import-surfaces/Surfaces.kt +0 -64
  549. package/kotlin/fixtures/import-surfaces/app/_layout.tsx +0 -4
  550. package/kotlin/fixtures/import-surfaces/app/index+spa.tsx +0 -1
  551. package/kotlin/fixtures/import-surfaces/package.json +0 -23
  552. package/kotlin/fixtures/import-surfaces/tsconfig.json +0 -20
  553. package/kotlin/fixtures/import-surfaces/vite.config.ts +0 -20
  554. package/kotlin/fixtures/import-values/ImportValues.native.tsx +0 -61
  555. package/kotlin/fixtures/import-values/README.md +0 -28
  556. package/kotlin/fixtures/import-values/Values.d.kt.ts +0 -15
  557. package/kotlin/fixtures/import-values/Values.kt +0 -84
  558. package/kotlin/fixtures/import-values/app/_layout.tsx +0 -4
  559. package/kotlin/fixtures/import-values/app/index+spa.tsx +0 -1
  560. package/kotlin/fixtures/import-values/package.json +0 -23
  561. package/kotlin/fixtures/import-values/tsconfig.json +0 -20
  562. package/kotlin/fixtures/import-values/vite.config.ts +0 -20
  563. package/kotlin/fixtures/kotlin-app/app/build.gradle.kts +0 -30
  564. package/kotlin/fixtures/kotlin-app/app/src/main/AndroidManifest.xml +0 -13
  565. package/kotlin/fixtures/kotlin-app/app/src/main/java/dev/contrast/kotlinapp/MainActivity.kt +0 -60
  566. package/kotlin/fixtures/kotlin-app/app/src/main/java/dev/contrast/kotlinapp/ProbeApplication.kt +0 -18
  567. package/kotlin/fixtures/kotlin-app/build.gradle.kts +0 -5
  568. package/kotlin/fixtures/kotlin-app/gradle.properties +0 -4
  569. package/kotlin/fixtures/kotlin-app/settings.gradle.kts +0 -4
  570. package/kotlin/fixtures/kotlin-app-variants/Anim.kt +0 -62
  571. package/kotlin/fixtures/kotlin-app-variants/BarBehavior.kt +0 -38
  572. package/kotlin/fixtures/kotlin-app-variants/BarVisibility.kt +0 -36
  573. package/kotlin/fixtures/kotlin-app-variants/Bitmaps.kt +0 -50
  574. package/kotlin/fixtures/kotlin-app-variants/Browse.kt +0 -73
  575. package/kotlin/fixtures/kotlin-app-variants/Colors.kt +0 -41
  576. package/kotlin/fixtures/kotlin-app-variants/Controls.kt +0 -62
  577. package/kotlin/fixtures/kotlin-app-variants/Drag.kt +0 -56
  578. package/kotlin/fixtures/kotlin-app-variants/Draw.kt +0 -74
  579. package/kotlin/fixtures/kotlin-app-variants/Drawables.kt +0 -53
  580. package/kotlin/fixtures/kotlin-app-variants/Focus.kt +0 -62
  581. package/kotlin/fixtures/kotlin-app-variants/Form.kt +0 -47
  582. package/kotlin/fixtures/kotlin-app-variants/Icons.kt +0 -59
  583. package/kotlin/fixtures/kotlin-app-variants/Ime.kt +0 -53
  584. package/kotlin/fixtures/kotlin-app-variants/Lists.kt +0 -57
  585. package/kotlin/fixtures/kotlin-app-variants/Nav.kt +0 -47
  586. package/kotlin/fixtures/kotlin-app-variants/Note.kt +0 -40
  587. package/kotlin/fixtures/kotlin-app-variants/Overlays.kt +0 -56
  588. package/kotlin/fixtures/kotlin-app-variants/Pan.kt +0 -38
  589. package/kotlin/fixtures/kotlin-app-variants/Pickers.kt +0 -44
  590. package/kotlin/fixtures/kotlin-app-variants/Press.kt +0 -43
  591. package/kotlin/fixtures/kotlin-app-variants/Scroll.kt +0 -63
  592. package/kotlin/fixtures/kotlin-app-variants/Sheet.kt +0 -43
  593. package/kotlin/fixtures/kotlin-app-variants/Strings.kt +0 -49
  594. package/kotlin/fixtures/kotlin-app-variants/Tabs.kt +0 -47
  595. package/kotlin/fixtures/kotlin-app-variants/TextWidth.kt +0 -45
  596. package/kotlin/fixtures/kotlin-app-variants/TransientInsets.kt +0 -50
  597. package/kotlin/fixtures/kotlin-app-variants/Transition.kt +0 -69
  598. package/kotlin/fixtures/kotlin-app-variants/ViewConfig.kt +0 -22
  599. package/kotlin/fixtures/kotlin-app-variants/Widgets.kt +0 -67
  600. package/kotlin/fixtures/runtime-state/RuntimeState.kt +0 -200
  601. package/kotlin/fork/README.md +0 -97
  602. package/kotlin/fork/build.sh +0 -176
  603. package/kotlin/fork/compose-worker-globals.patch +0 -1247
  604. package/kotlin/fork/fork.json +0 -46
  605. package/kotlin/fork/publish.ts +0 -99
  606. package/kotlin/fork/skia-android-shaping.patch +0 -189
  607. package/kotlin/fork/skiko-local.init.gradle +0 -10
  608. package/kotlin/fork/skiko-worker-clock.patch +0 -122
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1644 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1653 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
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 {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -87,230 +87,596 @@ var init_bundleGlobalFooter = __esm({
87
87
  }
88
88
  });
89
89
 
90
- // src/backend-origin.ts
91
- function normalizeHostname(hostname) {
92
- return hostname.replace(/^\[|\]$/g, "").toLowerCase();
93
- }
94
- function isLoopbackHost(hostname) {
95
- const normalized = normalizeHostname(hostname);
96
- return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
97
- }
98
- var init_backend_origin = __esm({
99
- "src/backend-origin.ts"() {
90
+ // src/process-group.ts
91
+ var init_process_group = __esm({
92
+ "src/process-group.ts"() {
100
93
  "use strict";
101
94
  }
102
95
  });
103
96
 
104
- // src/is-record.ts
105
- function isRecord(value) {
106
- return typeof value === "object" && value !== null && !Array.isArray(value);
97
+ // ../contrast-runtime-delivery/src/version.ts
98
+ function isValidRuntimeVersion(value) {
99
+ return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
107
100
  }
108
- var init_is_record = __esm({
109
- "src/is-record.ts"() {
101
+ var init_version = __esm({
102
+ "../contrast-runtime-delivery/src/version.ts"() {
110
103
  "use strict";
111
104
  }
112
105
  });
113
106
 
114
- // src/public-brand.ts
115
- var name, peachPublicBrand, rnxPublicBrand;
116
- var init_public_brand = __esm({
117
- "src/public-brand.ts"() {
107
+ // ../contrast-runtime-delivery/src/product.ts
108
+ var init_product = __esm({
109
+ "../contrast-runtime-delivery/src/product.ts"() {
118
110
  "use strict";
119
- name = "Peach";
120
- peachPublicBrand = Object.freeze({
121
- name,
122
- packageName: "peachsim",
123
- commandName: "peach",
124
- domain: "peachsim.com",
125
- origin: "https://peachsim.com",
126
- boxOrigin: "https://rnx-box.contrast.dev"
127
- });
128
- rnxPublicBrand = peachPublicBrand;
111
+ init_version();
129
112
  }
130
113
  });
131
114
 
132
- // ../../node_modules/json5/lib/unicode.js
133
- var require_unicode = __commonJS({
134
- "../../node_modules/json5/lib/unicode.js"(exports2, module2) {
135
- module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
136
- module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
137
- module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
115
+ // ../contrast-runtime-delivery/src/index.ts
116
+ var init_src = __esm({
117
+ "../contrast-runtime-delivery/src/index.ts"() {
118
+ "use strict";
119
+ init_process_group();
120
+ init_product();
121
+ init_product();
138
122
  }
139
123
  });
140
124
 
141
- // ../../node_modules/json5/lib/util.js
142
- var require_util = __commonJS({
143
- "../../node_modules/json5/lib/util.js"(exports2, module2) {
144
- var unicode = require_unicode();
145
- module2.exports = {
146
- isSpaceSeparator(c) {
147
- return typeof c === "string" && unicode.Space_Separator.test(c);
148
- },
149
- isIdStartChar(c) {
150
- return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c));
151
- },
152
- isIdContinueChar(c) {
153
- return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c));
154
- },
155
- isDigit(c) {
156
- return typeof c === "string" && /[0-9]/.test(c);
157
- },
158
- isHexDigit(c) {
159
- return typeof c === "string" && /[0-9A-Fa-f]/.test(c);
160
- }
161
- };
125
+ // src/home-paths.ts
126
+ function rnxHomeDir() {
127
+ const override = process.env[PEACH_HOME_ENV];
128
+ if (override && override.length > 0) return import_node_path.default.resolve(override);
129
+ return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
130
+ }
131
+ function runtimesDir() {
132
+ return import_node_path.default.join(rnxHomeDir(), "runtimes");
133
+ }
134
+ function runtimeDir(version) {
135
+ return import_node_path.default.join(runtimesDir(), version);
136
+ }
137
+ function activeRuntimeFile() {
138
+ return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
139
+ }
140
+ function daemonLockfilePath() {
141
+ return import_node_path.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
142
+ }
143
+ function devBridgesDir() {
144
+ return import_node_path.default.join(rnxHomeDir(), DEV_BRIDGES_DIR);
145
+ }
146
+ function readActiveRuntime() {
147
+ try {
148
+ const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
149
+ return value.length > 0 ? value : null;
150
+ } catch {
151
+ return null;
162
152
  }
163
- });
164
-
165
- // ../../node_modules/json5/lib/parse.js
166
- var require_parse = __commonJS({
167
- "../../node_modules/json5/lib/parse.js"(exports2, module2) {
168
- var util = require_util();
169
- var source;
170
- var parseState;
171
- var stack;
172
- var pos;
173
- var line;
174
- var column;
175
- var token;
176
- var key;
177
- var root;
178
- module2.exports = function parse4(text2, reviver) {
179
- source = String(text2);
180
- parseState = "start";
181
- stack = [];
182
- pos = 0;
183
- line = 1;
184
- column = 0;
185
- token = void 0;
186
- key = void 0;
187
- root = void 0;
188
- do {
189
- token = lex();
190
- parseStates[parseState]();
191
- } while (token.type !== "eof");
192
- if (typeof reviver === "function") {
193
- return internalize({ "": root }, "", reviver);
194
- }
195
- return root;
196
- };
197
- function internalize(holder, name2, reviver) {
198
- const value = holder[name2];
199
- if (value != null && typeof value === "object") {
200
- if (Array.isArray(value)) {
201
- for (let i = 0; i < value.length; i++) {
202
- const key2 = String(i);
203
- const replacement = internalize(value, key2, reviver);
204
- if (replacement === void 0) {
205
- delete value[key2];
206
- } else {
207
- Object.defineProperty(value, key2, {
208
- value: replacement,
209
- writable: true,
210
- enumerable: true,
211
- configurable: true
212
- });
213
- }
214
- }
215
- } else {
216
- for (const key2 in value) {
217
- const replacement = internalize(value, key2, reviver);
218
- if (replacement === void 0) {
219
- delete value[key2];
220
- } else {
221
- Object.defineProperty(value, key2, {
222
- value: replacement,
223
- writable: true,
224
- enumerable: true,
225
- configurable: true
226
- });
227
- }
228
- }
229
- }
230
- }
231
- return reviver.call(holder, name2, value);
232
- }
233
- var lexState;
234
- var buffer;
235
- var doubleQuote;
236
- var sign;
237
- var c;
238
- function lex() {
239
- lexState = "default";
240
- buffer = "";
241
- doubleQuote = false;
242
- sign = 1;
243
- for (; ; ) {
244
- c = peek();
245
- const token2 = lexStates[lexState]();
246
- if (token2) {
247
- return token2;
248
- }
153
+ }
154
+ function readDaemonLockfile() {
155
+ try {
156
+ const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
157
+ try {
158
+ const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
159
+ const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
160
+ const raw = buf.subarray(0, bytesRead).toString("utf8");
161
+ const parsed = JSON.parse(raw);
162
+ if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number" && (parsed.servedRuntimes === void 0 || Array.isArray(parsed.servedRuntimes) && parsed.servedRuntimes.every((version) => typeof version === "string"))) {
163
+ return parsed;
249
164
  }
165
+ return null;
166
+ } finally {
167
+ import_node_fs.default.closeSync(fd);
250
168
  }
251
- function peek() {
252
- if (source[pos]) {
253
- return String.fromCodePoint(source.codePointAt(pos));
254
- }
169
+ } catch {
170
+ return null;
171
+ }
172
+ }
173
+ function parseDevBridgeLockfile(raw) {
174
+ try {
175
+ const parsed = JSON.parse(raw);
176
+ if (parsed && parsed.schema === 1 && parsed.source === "vite-dev" && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.cwd === "string" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number" && (parsed.shellPort === void 0 || typeof parsed.shellPort === "number") && (parsed.servedRuntimes === void 0 || Array.isArray(parsed.servedRuntimes) && parsed.servedRuntimes.every((version) => typeof version === "string"))) {
177
+ return parsed;
255
178
  }
256
- function read() {
257
- const c2 = peek();
258
- if (c2 === "\n") {
259
- line++;
260
- column = 0;
261
- } else if (c2) {
262
- column += c2.length;
263
- } else {
264
- column++;
265
- }
266
- if (c2) {
267
- pos += c2.length;
179
+ return null;
180
+ } catch {
181
+ return null;
182
+ }
183
+ }
184
+ function readDevBridgeLockfiles() {
185
+ let entries;
186
+ try {
187
+ entries = import_node_fs.default.readdirSync(devBridgesDir(), { withFileTypes: true });
188
+ } catch {
189
+ return [];
190
+ }
191
+ const lockfiles = [];
192
+ for (const entry of entries) {
193
+ if (!entry.isFile() || !/^\d+\.json$/.test(entry.name)) continue;
194
+ try {
195
+ const filePath = import_node_path.default.join(devBridgesDir(), entry.name);
196
+ const fd = import_node_fs.default.openSync(filePath, "r");
197
+ try {
198
+ const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
199
+ const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
200
+ const lockfile = parseDevBridgeLockfile(
201
+ buf.subarray(0, bytesRead).toString("utf8")
202
+ );
203
+ if (lockfile && entry.name === `${lockfile.bridgePort}.json`) {
204
+ lockfiles.push(lockfile);
205
+ }
206
+ } finally {
207
+ import_node_fs.default.closeSync(fd);
268
208
  }
269
- return c2;
209
+ } catch {
270
210
  }
271
- var lexStates = {
272
- default() {
273
- switch (c) {
274
- case " ":
275
- case "\v":
276
- case "\f":
277
- case " ":
278
- case "\xA0":
279
- case "\uFEFF":
280
- case "\n":
281
- case "\r":
282
- case "\u2028":
283
- case "\u2029":
284
- read();
285
- return;
286
- case "/":
287
- read();
288
- lexState = "comment";
289
- return;
290
- case void 0:
291
- read();
292
- return newToken("eof");
293
- }
294
- if (util.isSpaceSeparator(c)) {
295
- read();
296
- return;
297
- }
298
- return lexStates[parseState]();
211
+ }
212
+ return lockfiles.sort((left, right) => left.bridgePort - right.bridgePort);
213
+ }
214
+ function isDaemonLockfileFresh(lock, now = Date.now()) {
215
+ if (!lock) return false;
216
+ if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
217
+ try {
218
+ process.kill(lock.pid, 0);
219
+ return true;
220
+ } catch {
221
+ return false;
222
+ }
223
+ }
224
+ function isDevBridgeLockfileFresh(lock, now = Date.now()) {
225
+ if (!lock) return false;
226
+ if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
227
+ try {
228
+ process.kill(lock.pid, 0);
229
+ return true;
230
+ } catch {
231
+ return false;
232
+ }
233
+ }
234
+ var import_node_fs, import_node_os, import_node_path, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGES_DIR, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES;
235
+ var init_home_paths = __esm({
236
+ "src/home-paths.ts"() {
237
+ "use strict";
238
+ import_node_fs = __toESM(require("node:fs"), 1);
239
+ import_node_os = require("node:os");
240
+ import_node_path = __toESM(require("node:path"), 1);
241
+ PEACH_HOME_ENV = "PEACH_HOME";
242
+ ACTIVE_RUNTIME_FILE = "active";
243
+ DAEMON_LOCKFILE = "daemon.json";
244
+ DEV_BRIDGES_DIR = "dev-bridges";
245
+ DAEMON_HEARTBEAT_STALE_MS = 3e4;
246
+ DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
247
+ }
248
+ });
249
+
250
+ // src/runtime-assets.ts
251
+ function findMonorepoRoot() {
252
+ if (_monorepoRootCache !== void 0) return _monorepoRootCache;
253
+ let dir = import_path.default.dirname((0, import_url.fileURLToPath)(__sootsim_import_meta_url));
254
+ for (let i = 0; i < 12 && dir !== import_path.default.dirname(dir); i++) {
255
+ if (import_fs.default.existsSync(import_path.default.join(dir, "packages/peach-engine/package.json")) && import_fs.default.existsSync(import_path.default.join(dir, "public/sootsim"))) {
256
+ _monorepoRootCache = dir;
257
+ return dir;
258
+ }
259
+ dir = import_path.default.dirname(dir);
260
+ }
261
+ _monorepoRootCache = null;
262
+ return null;
263
+ }
264
+ function resolveDevCheckoutRuntimeAssetRoot() {
265
+ if (process.env.PEACH_HOME && readActiveRuntime()) return null;
266
+ const root = findMonorepoRoot();
267
+ if (!root) return null;
268
+ return import_path.default.join(root, "public/sootsim");
269
+ }
270
+ function resolveDevCheckoutRuntimeRoot() {
271
+ const devBuild = resolveDevCheckoutRuntimeAssetRoot();
272
+ if (!devBuild) return null;
273
+ if (import_fs.default.existsSync(import_path.default.join(devBuild, "index.html")) && import_fs.default.existsSync(import_path.default.join(devBuild, "engine/index.html")) && import_fs.default.existsSync(import_path.default.join(devBuild, "engine-tenant/worker.js")) && import_fs.default.existsSync(import_path.default.join(devBuild, "engine-tenant/worker.prod.js"))) {
274
+ return devBuild;
275
+ }
276
+ return null;
277
+ }
278
+ function resolveActiveRuntimeRoot() {
279
+ const devRoot = resolveDevCheckoutRuntimeRoot();
280
+ if (devRoot) return devRoot;
281
+ const active = readActiveRuntime();
282
+ if (!active) return null;
283
+ const dir = runtimeDir(active);
284
+ if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
285
+ return dir;
286
+ }
287
+ function isRuntimeVersionHostname(hostname) {
288
+ return hostname.toLowerCase().endsWith(RUNTIME_VERSION_HOSTNAME_SUFFIX);
289
+ }
290
+ function runtimeVersionFromHostname(hostname) {
291
+ if (!isRuntimeVersionHostname(hostname)) return null;
292
+ const labels = hostname.slice(0, -RUNTIME_VERSION_HOSTNAME_SUFFIX.length).split(".");
293
+ if (labels.length === 0 || labels.some((label) => !/^[0-9a-f]{1,60}$/i.test(label))) {
294
+ return null;
295
+ }
296
+ const encoded = labels.join("");
297
+ if (encoded.length % 2 !== 0) return null;
298
+ try {
299
+ const version = Buffer.from(encoded, "hex").toString("utf8");
300
+ return isValidRuntimeVersion(version) ? version : null;
301
+ } catch {
302
+ return null;
303
+ }
304
+ }
305
+ function resolveInstalledRuntimeRoot(version) {
306
+ const dir = runtimeDir(version);
307
+ if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
308
+ return dir;
309
+ }
310
+ function resolveRuntimeRootForHostname(hostname) {
311
+ if (!isRuntimeVersionHostname(hostname)) return resolveActiveRuntimeRoot();
312
+ const version = runtimeVersionFromHostname(hostname);
313
+ return version ? resolveInstalledRuntimeRoot(version) : null;
314
+ }
315
+ function resolveRuntimeRootForRequestHost(host) {
316
+ if (!host) return resolveActiveRuntimeRoot();
317
+ try {
318
+ return resolveRuntimeRootForHostname(new URL(`http://${host}`).hostname);
319
+ } catch {
320
+ return null;
321
+ }
322
+ }
323
+ function isRootRuntimeAssetPath(pathname) {
324
+ return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
325
+ }
326
+ function resolveRuntimeFilePath(runtimeRoot, pathname) {
327
+ if (!pathname.startsWith("/")) return null;
328
+ if (pathname.includes("\0") || pathname.includes("\\")) return null;
329
+ for (const segment of pathname.split("/")) {
330
+ if (segment === "..") return null;
331
+ }
332
+ const normalized = pathname.startsWith("/sootsim/") ? pathname.slice("/sootsim".length) : pathname;
333
+ const fullPath = import_path.default.resolve(runtimeRoot, normalized.replace(/^\/+/, ""));
334
+ const rootWithSep = runtimeRoot.endsWith(import_path.default.sep) ? runtimeRoot : runtimeRoot + import_path.default.sep;
335
+ if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
336
+ if (!import_fs.default.existsSync(fullPath) || !import_fs.default.statSync(fullPath).isFile()) return null;
337
+ return fullPath;
338
+ }
339
+ function serveRuntimeFile(req, res, fullPath) {
340
+ const ext = import_path.default.extname(fullPath);
341
+ const stat = import_fs.default.statSync(fullPath);
342
+ const lastModified = stat.mtime.toUTCString();
343
+ res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
344
+ if (/^canvaskit-graphite-pipelines-[0-9a-f]{8}\.bin$/.test(import_path.default.basename(fullPath))) {
345
+ res.setHeader("cache-control", "public, max-age=31536000, immutable");
346
+ import_fs.default.createReadStream(fullPath).pipe(res);
347
+ return;
348
+ }
349
+ res.setHeader("cache-control", "no-cache");
350
+ res.setHeader("last-modified", lastModified);
351
+ if (req?.headers?.["if-modified-since"] === lastModified) {
352
+ res.statusCode = 304;
353
+ res.end();
354
+ return;
355
+ }
356
+ sendFileWithRanges(req, res, fullPath, stat.size, {});
357
+ }
358
+ function sendFileWithRanges(req, res, filePath, total, headers) {
359
+ const head = (req?.method || "GET").toUpperCase() === "HEAD";
360
+ const range = /^bytes=(\d*)-(\d*)$/.exec(req?.headers?.range || "");
361
+ const invalid = range && range[1] && range[2] && Number(range[2]) < Number(range[1]);
362
+ if (range && (range[1] || range[2]) && !invalid) {
363
+ const [, startRaw, endRaw] = range;
364
+ const start = startRaw ? Number(startRaw) : Math.max(0, total - Number(endRaw));
365
+ const end = startRaw && endRaw ? Math.min(Number(endRaw), total - 1) : total - 1;
366
+ if (start > end || start >= total) {
367
+ res.writeHead(416, { ...headers, "Content-Range": `bytes */${total}` });
368
+ res.end();
369
+ return;
370
+ }
371
+ res.writeHead(206, {
372
+ ...headers,
373
+ "Content-Range": `bytes ${start}-${end}/${total}`,
374
+ "Accept-Ranges": "bytes",
375
+ "Content-Length": String(end - start + 1)
376
+ });
377
+ if (head) res.end();
378
+ else streamFile(res, import_fs.default.createReadStream(filePath, { start, end }));
379
+ return;
380
+ }
381
+ res.writeHead(200, {
382
+ ...headers,
383
+ "Accept-Ranges": "bytes",
384
+ "Content-Length": String(total)
385
+ });
386
+ if (head || total === 0) res.end();
387
+ else streamFile(res, import_fs.default.createReadStream(filePath, { start: 0, end: total - 1 }));
388
+ }
389
+ function streamFile(res, stream) {
390
+ stream.on("error", (error) => res.destroy(error));
391
+ stream.pipe(res);
392
+ }
393
+ var import_fs, import_path, import_url, SOOTSIM_RUNTIME_MISSING_MESSAGE, _monorepoRootCache, MIME_TYPES, ROOT_RUNTIME_PATHS, RUNTIME_VERSION_HOSTNAME_SUFFIX;
394
+ var init_runtime_assets = __esm({
395
+ "src/runtime-assets.ts"() {
396
+ "use strict";
397
+ import_fs = __toESM(require("fs"), 1);
398
+ import_path = __toESM(require("path"), 1);
399
+ import_url = require("url");
400
+ init_src();
401
+ init_home_paths();
402
+ SOOTSIM_RUNTIME_MISSING_MESSAGE = "[peach] no engine runtime installed. run `peach runtime install`";
403
+ MIME_TYPES = {
404
+ ".js": "application/javascript",
405
+ ".mjs": "application/javascript",
406
+ ".css": "text/css",
407
+ ".html": "text/html",
408
+ ".wasm": "application/wasm",
409
+ ".json": "application/json",
410
+ ".jpg": "image/jpeg",
411
+ ".jpeg": "image/jpeg",
412
+ ".png": "image/png",
413
+ ".svg": "image/svg+xml",
414
+ ".webp": "image/webp",
415
+ ".glb": "model/gltf-binary",
416
+ ".ttf": "font/ttf",
417
+ ".otf": "font/otf",
418
+ ".woff": "font/woff",
419
+ ".woff2": "font/woff2",
420
+ ".mp3": "audio/mpeg",
421
+ ".wav": "audio/wav",
422
+ ".mp4": "video/mp4",
423
+ ".m4v": "video/mp4",
424
+ ".mov": "video/quicktime",
425
+ ".webm": "video/webm"
426
+ };
427
+ ROOT_RUNTIME_PATHS = [
428
+ "/assets/",
429
+ "/engine/",
430
+ "/engine-tenant/",
431
+ "/photos/",
432
+ "/three-mode/",
433
+ "/fonts/",
434
+ "/icons/",
435
+ "/sounds/",
436
+ "/spike/",
437
+ "/test-wallpaper.jpg",
438
+ "/preview-sw.js",
439
+ "/peach.svg",
440
+ "/bedrock-sqlite.wasm",
441
+ "/bedrock-sqlite.js",
442
+ "/sootsim/"
443
+ ];
444
+ RUNTIME_VERSION_HOSTNAME_SUFFIX = ".runtime.localhost";
445
+ }
446
+ });
447
+
448
+ // src/cli-runtime.ts
449
+ var init_cli_runtime = __esm({
450
+ "src/cli-runtime.ts"() {
451
+ "use strict";
452
+ init_runtime_assets();
453
+ }
454
+ });
455
+
456
+ // src/backend-origin.ts
457
+ function normalizeHostname(hostname) {
458
+ return hostname.replace(/^\[|\]$/g, "").toLowerCase();
459
+ }
460
+ function isLoopbackHost(hostname) {
461
+ const normalized = normalizeHostname(hostname);
462
+ return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
463
+ }
464
+ var init_backend_origin = __esm({
465
+ "src/backend-origin.ts"() {
466
+ "use strict";
467
+ }
468
+ });
469
+
470
+ // src/is-record.ts
471
+ function isRecord(value) {
472
+ return typeof value === "object" && value !== null && !Array.isArray(value);
473
+ }
474
+ var init_is_record = __esm({
475
+ "src/is-record.ts"() {
476
+ "use strict";
477
+ }
478
+ });
479
+
480
+ // src/public-brand.ts
481
+ var name, peachPublicBrand, rnxPublicBrand;
482
+ var init_public_brand = __esm({
483
+ "src/public-brand.ts"() {
484
+ "use strict";
485
+ name = "Peach";
486
+ peachPublicBrand = Object.freeze({
487
+ name,
488
+ packageName: "peachsim",
489
+ commandName: "peach",
490
+ domain: "peachsim.com",
491
+ origin: "https://peachsim.com",
492
+ boxOrigin: "https://rnx-box.contrast.dev"
493
+ });
494
+ rnxPublicBrand = peachPublicBrand;
495
+ }
496
+ });
497
+
498
+ // ../../node_modules/json5/lib/unicode.js
499
+ var require_unicode = __commonJS({
500
+ "../../node_modules/json5/lib/unicode.js"(exports2, module2) {
501
+ module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
502
+ module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
503
+ module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
504
+ }
505
+ });
506
+
507
+ // ../../node_modules/json5/lib/util.js
508
+ var require_util = __commonJS({
509
+ "../../node_modules/json5/lib/util.js"(exports2, module2) {
510
+ var unicode = require_unicode();
511
+ module2.exports = {
512
+ isSpaceSeparator(c) {
513
+ return typeof c === "string" && unicode.Space_Separator.test(c);
299
514
  },
300
- comment() {
301
- switch (c) {
302
- case "*":
303
- read();
304
- lexState = "multiLineComment";
305
- return;
306
- case "/":
307
- read();
308
- lexState = "singleLineComment";
309
- return;
310
- }
311
- throw invalidChar(read());
515
+ isIdStartChar(c) {
516
+ return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c));
312
517
  },
313
- multiLineComment() {
518
+ isIdContinueChar(c) {
519
+ return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c));
520
+ },
521
+ isDigit(c) {
522
+ return typeof c === "string" && /[0-9]/.test(c);
523
+ },
524
+ isHexDigit(c) {
525
+ return typeof c === "string" && /[0-9A-Fa-f]/.test(c);
526
+ }
527
+ };
528
+ }
529
+ });
530
+
531
+ // ../../node_modules/json5/lib/parse.js
532
+ var require_parse = __commonJS({
533
+ "../../node_modules/json5/lib/parse.js"(exports2, module2) {
534
+ var util = require_util();
535
+ var source;
536
+ var parseState;
537
+ var stack;
538
+ var pos;
539
+ var line;
540
+ var column;
541
+ var token;
542
+ var key;
543
+ var root;
544
+ module2.exports = function parse4(text2, reviver) {
545
+ source = String(text2);
546
+ parseState = "start";
547
+ stack = [];
548
+ pos = 0;
549
+ line = 1;
550
+ column = 0;
551
+ token = void 0;
552
+ key = void 0;
553
+ root = void 0;
554
+ do {
555
+ token = lex();
556
+ parseStates[parseState]();
557
+ } while (token.type !== "eof");
558
+ if (typeof reviver === "function") {
559
+ return internalize({ "": root }, "", reviver);
560
+ }
561
+ return root;
562
+ };
563
+ function internalize(holder, name2, reviver) {
564
+ const value = holder[name2];
565
+ if (value != null && typeof value === "object") {
566
+ if (Array.isArray(value)) {
567
+ for (let i = 0; i < value.length; i++) {
568
+ const key2 = String(i);
569
+ const replacement = internalize(value, key2, reviver);
570
+ if (replacement === void 0) {
571
+ delete value[key2];
572
+ } else {
573
+ Object.defineProperty(value, key2, {
574
+ value: replacement,
575
+ writable: true,
576
+ enumerable: true,
577
+ configurable: true
578
+ });
579
+ }
580
+ }
581
+ } else {
582
+ for (const key2 in value) {
583
+ const replacement = internalize(value, key2, reviver);
584
+ if (replacement === void 0) {
585
+ delete value[key2];
586
+ } else {
587
+ Object.defineProperty(value, key2, {
588
+ value: replacement,
589
+ writable: true,
590
+ enumerable: true,
591
+ configurable: true
592
+ });
593
+ }
594
+ }
595
+ }
596
+ }
597
+ return reviver.call(holder, name2, value);
598
+ }
599
+ var lexState;
600
+ var buffer;
601
+ var doubleQuote;
602
+ var sign;
603
+ var c;
604
+ function lex() {
605
+ lexState = "default";
606
+ buffer = "";
607
+ doubleQuote = false;
608
+ sign = 1;
609
+ for (; ; ) {
610
+ c = peek();
611
+ const token2 = lexStates[lexState]();
612
+ if (token2) {
613
+ return token2;
614
+ }
615
+ }
616
+ }
617
+ function peek() {
618
+ if (source[pos]) {
619
+ return String.fromCodePoint(source.codePointAt(pos));
620
+ }
621
+ }
622
+ function read() {
623
+ const c2 = peek();
624
+ if (c2 === "\n") {
625
+ line++;
626
+ column = 0;
627
+ } else if (c2) {
628
+ column += c2.length;
629
+ } else {
630
+ column++;
631
+ }
632
+ if (c2) {
633
+ pos += c2.length;
634
+ }
635
+ return c2;
636
+ }
637
+ var lexStates = {
638
+ default() {
639
+ switch (c) {
640
+ case " ":
641
+ case "\v":
642
+ case "\f":
643
+ case " ":
644
+ case "\xA0":
645
+ case "\uFEFF":
646
+ case "\n":
647
+ case "\r":
648
+ case "\u2028":
649
+ case "\u2029":
650
+ read();
651
+ return;
652
+ case "/":
653
+ read();
654
+ lexState = "comment";
655
+ return;
656
+ case void 0:
657
+ read();
658
+ return newToken("eof");
659
+ }
660
+ if (util.isSpaceSeparator(c)) {
661
+ read();
662
+ return;
663
+ }
664
+ return lexStates[parseState]();
665
+ },
666
+ comment() {
667
+ switch (c) {
668
+ case "*":
669
+ read();
670
+ lexState = "multiLineComment";
671
+ return;
672
+ case "/":
673
+ read();
674
+ lexState = "singleLineComment";
675
+ return;
676
+ }
677
+ throw invalidChar(read());
678
+ },
679
+ multiLineComment() {
314
680
  switch (c) {
315
681
  case "*":
316
682
  read();
@@ -4746,55 +5112,6 @@ var init_replacement_module_handler = __esm({
4746
5112
  }
4747
5113
  });
4748
5114
 
4749
- // src/process-group.ts
4750
- var init_process_group = __esm({
4751
- "src/process-group.ts"() {
4752
- "use strict";
4753
- }
4754
- });
4755
-
4756
- // ../contrast-runtime-delivery/src/version.ts
4757
- function isValidRuntimeVersion(value) {
4758
- return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
4759
- }
4760
- var init_version = __esm({
4761
- "../contrast-runtime-delivery/src/version.ts"() {
4762
- "use strict";
4763
- }
4764
- });
4765
-
4766
- // ../peach-engine/src/platform/adapter.ts
4767
- function isRuntimePlatform(value) {
4768
- return value === "ios" || value === "android";
4769
- }
4770
- function getRuntimePlatformAdapter(platform) {
4771
- return RUNTIME_PLATFORM_ADAPTERS[platform];
4772
- }
4773
- var IOS_ADAPTER, ANDROID_ADAPTER, RUNTIME_PLATFORM_ADAPTERS;
4774
- var init_adapter = __esm({
4775
- "../peach-engine/src/platform/adapter.ts"() {
4776
- "use strict";
4777
- IOS_ADAPTER = Object.freeze({
4778
- id: "ios",
4779
- displayName: "iOS",
4780
- isIOS: true,
4781
- isAndroid: false,
4782
- select: (registry) => registry.ios
4783
- });
4784
- ANDROID_ADAPTER = Object.freeze({
4785
- id: "android",
4786
- displayName: "Android",
4787
- isIOS: false,
4788
- isAndroid: true,
4789
- select: (registry) => registry.android
4790
- });
4791
- RUNTIME_PLATFORM_ADAPTERS = Object.freeze({
4792
- ios: IOS_ADAPTER,
4793
- android: ANDROID_ADAPTER
4794
- });
4795
- }
4796
- });
4797
-
4798
5115
  // cli/app-project.ts
4799
5116
  function firstNamedFile(dir, names) {
4800
5117
  for (const name2 of names) {
@@ -4847,245 +5164,6 @@ var init_app_project = __esm({
4847
5164
  }
4848
5165
  });
4849
5166
 
4850
- // ../../node_modules/plist/lib/parse.js
4851
- var require_parse2 = __commonJS({
4852
- "../../node_modules/plist/lib/parse.js"(exports2) {
4853
- var { DOMParser } = require("@xmldom/xmldom");
4854
- exports2.parse = parse4;
4855
- var TEXT_NODE = 3;
4856
- var CDATA_NODE = 4;
4857
- var COMMENT_NODE = 8;
4858
- function shouldIgnoreNode(node) {
4859
- return node.nodeType === TEXT_NODE || node.nodeType === COMMENT_NODE || node.nodeType === CDATA_NODE;
4860
- }
4861
- function isEmptyNode(node) {
4862
- if (!node.childNodes || node.childNodes.length === 0) {
4863
- return true;
4864
- } else {
4865
- return false;
4866
- }
4867
- }
4868
- function invariant(test, message) {
4869
- if (!test) {
4870
- throw new Error(message);
4871
- }
4872
- }
4873
- function parse4(xml) {
4874
- var doc = new DOMParser().parseFromString(xml, "text/xml");
4875
- invariant(
4876
- doc.documentElement.nodeName === "plist",
4877
- "malformed document. First element should be <plist>"
4878
- );
4879
- var plist3 = parsePlistXML(doc.documentElement);
4880
- if (plist3.length == 1) plist3 = plist3[0];
4881
- return plist3;
4882
- }
4883
- function parsePlistXML(node) {
4884
- var i, new_obj, key, val, new_arr, res, counter, type;
4885
- if (!node) return null;
4886
- if (node.nodeName === "plist") {
4887
- new_arr = [];
4888
- if (isEmptyNode(node)) {
4889
- return new_arr;
4890
- }
4891
- for (i = 0; i < node.childNodes.length; i++) {
4892
- if (!shouldIgnoreNode(node.childNodes[i])) {
4893
- new_arr.push(parsePlistXML(node.childNodes[i]));
4894
- }
4895
- }
4896
- return new_arr;
4897
- } else if (node.nodeName === "dict") {
4898
- new_obj = {};
4899
- key = null;
4900
- counter = 0;
4901
- if (isEmptyNode(node)) {
4902
- return new_obj;
4903
- }
4904
- for (i = 0; i < node.childNodes.length; i++) {
4905
- if (shouldIgnoreNode(node.childNodes[i])) continue;
4906
- if (counter % 2 === 0) {
4907
- invariant(
4908
- node.childNodes[i].nodeName === "key",
4909
- "Missing key while parsing <dict/>."
4910
- );
4911
- key = parsePlistXML(node.childNodes[i]);
4912
- } else {
4913
- invariant(
4914
- node.childNodes[i].nodeName !== "key",
4915
- 'Unexpected key "' + parsePlistXML(node.childNodes[i]) + '" while parsing <dict/>.'
4916
- );
4917
- new_obj[key] = parsePlistXML(node.childNodes[i]);
4918
- }
4919
- counter += 1;
4920
- }
4921
- if (counter % 2 === 1) {
4922
- new_obj[key] = "";
4923
- }
4924
- return new_obj;
4925
- } else if (node.nodeName === "array") {
4926
- new_arr = [];
4927
- if (isEmptyNode(node)) {
4928
- return new_arr;
4929
- }
4930
- for (i = 0; i < node.childNodes.length; i++) {
4931
- if (!shouldIgnoreNode(node.childNodes[i])) {
4932
- res = parsePlistXML(node.childNodes[i]);
4933
- if (null != res) new_arr.push(res);
4934
- }
4935
- }
4936
- return new_arr;
4937
- } else if (node.nodeName === "#text") {
4938
- } else if (node.nodeName === "key") {
4939
- if (isEmptyNode(node)) {
4940
- return "";
4941
- }
4942
- invariant(
4943
- node.childNodes[0].nodeValue !== "__proto__",
4944
- "__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912"
4945
- );
4946
- return node.childNodes[0].nodeValue;
4947
- } else if (node.nodeName === "string") {
4948
- res = "";
4949
- if (isEmptyNode(node)) {
4950
- return res;
4951
- }
4952
- for (i = 0; i < node.childNodes.length; i++) {
4953
- var type = node.childNodes[i].nodeType;
4954
- if (type === TEXT_NODE || type === CDATA_NODE) {
4955
- res += node.childNodes[i].nodeValue;
4956
- }
4957
- }
4958
- return res;
4959
- } else if (node.nodeName === "integer") {
4960
- invariant(!isEmptyNode(node), 'Cannot parse "" as integer.');
4961
- return parseInt(node.childNodes[0].nodeValue, 10);
4962
- } else if (node.nodeName === "real") {
4963
- invariant(!isEmptyNode(node), 'Cannot parse "" as real.');
4964
- res = "";
4965
- for (i = 0; i < node.childNodes.length; i++) {
4966
- if (node.childNodes[i].nodeType === TEXT_NODE) {
4967
- res += node.childNodes[i].nodeValue;
4968
- }
4969
- }
4970
- return parseFloat(res);
4971
- } else if (node.nodeName === "data") {
4972
- res = "";
4973
- if (isEmptyNode(node)) {
4974
- return Buffer.from(res, "base64");
4975
- }
4976
- for (i = 0; i < node.childNodes.length; i++) {
4977
- if (node.childNodes[i].nodeType === TEXT_NODE) {
4978
- res += node.childNodes[i].nodeValue.replace(/\s+/g, "");
4979
- }
4980
- }
4981
- return Buffer.from(res, "base64");
4982
- } else if (node.nodeName === "date") {
4983
- invariant(!isEmptyNode(node), 'Cannot parse "" as Date.');
4984
- return new Date(node.childNodes[0].nodeValue);
4985
- } else if (node.nodeName === "null") {
4986
- return null;
4987
- } else if (node.nodeName === "true") {
4988
- return true;
4989
- } else if (node.nodeName === "false") {
4990
- return false;
4991
- } else {
4992
- throw new Error("Invalid PLIST tag " + node.nodeName);
4993
- }
4994
- }
4995
- }
4996
- });
4997
-
4998
- // ../../node_modules/plist/lib/build.js
4999
- var require_build = __commonJS({
5000
- "../../node_modules/plist/lib/build.js"(exports2) {
5001
- var base64 = require("base64-js");
5002
- var xmlbuilder = require("xmlbuilder");
5003
- exports2.build = build2;
5004
- function ISODateString(d) {
5005
- function pad(n) {
5006
- return n < 10 ? "0" + n : n;
5007
- }
5008
- return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "Z";
5009
- }
5010
- var toString = Object.prototype.toString;
5011
- function type(obj) {
5012
- var m = toString.call(obj).match(/\[object (.*)\]/);
5013
- return m ? m[1] : m;
5014
- }
5015
- function build2(obj, opts) {
5016
- var XMLHDR = {
5017
- version: "1.0",
5018
- encoding: "UTF-8"
5019
- };
5020
- var XMLDTD = {
5021
- pubid: "-//Apple//DTD PLIST 1.0//EN",
5022
- sysid: "http://www.apple.com/DTDs/PropertyList-1.0.dtd"
5023
- };
5024
- var doc = xmlbuilder.create("plist");
5025
- doc.dec(XMLHDR.version, XMLHDR.encoding, XMLHDR.standalone);
5026
- doc.dtd(XMLDTD.pubid, XMLDTD.sysid);
5027
- doc.att("version", "1.0");
5028
- walk_obj(obj, doc);
5029
- if (!opts) opts = {};
5030
- opts.pretty = opts.pretty !== false;
5031
- return doc.end(opts);
5032
- }
5033
- function walk_obj(next, next_child) {
5034
- var tag_type, i, prop;
5035
- var name2 = type(next);
5036
- if ("Undefined" == name2) {
5037
- return;
5038
- } else if (Array.isArray(next)) {
5039
- next_child = next_child.ele("array");
5040
- for (i = 0; i < next.length; i++) {
5041
- walk_obj(next[i], next_child);
5042
- }
5043
- } else if (Buffer.isBuffer(next)) {
5044
- next_child.ele("data").raw(next.toString("base64"));
5045
- } else if ("Object" == name2) {
5046
- next_child = next_child.ele("dict");
5047
- for (prop in next) {
5048
- if (next.hasOwnProperty(prop)) {
5049
- next_child.ele("key").txt(prop);
5050
- walk_obj(next[prop], next_child);
5051
- }
5052
- }
5053
- } else if ("Number" == name2) {
5054
- tag_type = next % 1 === 0 ? "integer" : "real";
5055
- next_child.ele(tag_type).txt(next.toString());
5056
- } else if ("BigInt" == name2) {
5057
- next_child.ele("integer").txt(next);
5058
- } else if ("Date" == name2) {
5059
- next_child.ele("date").txt(ISODateString(new Date(next)));
5060
- } else if ("Boolean" == name2) {
5061
- next_child.ele(next ? "true" : "false");
5062
- } else if ("String" == name2) {
5063
- next_child.ele("string").txt(next);
5064
- } else if ("ArrayBuffer" == name2) {
5065
- next_child.ele("data").raw(base64.fromByteArray(next));
5066
- } else if (next && next.buffer && "ArrayBuffer" == type(next.buffer)) {
5067
- next_child.ele("data").raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child));
5068
- } else if ("Null" === name2) {
5069
- next_child.ele("null").txt("");
5070
- }
5071
- }
5072
- }
5073
- });
5074
-
5075
- // ../../node_modules/plist/index.js
5076
- var require_plist = __commonJS({
5077
- "../../node_modules/plist/index.js"(exports2) {
5078
- var parserFunctions = require_parse2();
5079
- Object.keys(parserFunctions).forEach(function(k) {
5080
- exports2[k] = parserFunctions[k];
5081
- });
5082
- var builderFunctions = require_build();
5083
- Object.keys(builderFunctions).forEach(function(k) {
5084
- exports2[k] = builderFunctions[k];
5085
- });
5086
- }
5087
- });
5088
-
5089
5167
  // src/nativeViewSourceContract.ts
5090
5168
  function isNativeViewSource(value) {
5091
5169
  if (!isRecord(value)) return false;
@@ -6078,9 +6156,6 @@ module.exports = __toCommonJS(src_exports);
6078
6156
  // cli/cloud-client.ts
6079
6157
  var import_node_crypto = require("node:crypto");
6080
6158
 
6081
- // ../peach-engine/src/preview/bundle-layout.ts
6082
- var import_metro_production_bundle = require("peachsim/metro-production-bundle");
6083
-
6084
6159
  // src/androidAutolinkingContract.ts
6085
6160
  init_bundleGlobalFooter();
6086
6161
  var FOOTER = "__peachAndroidAutolinkedPackages";
@@ -6114,1268 +6189,251 @@ function insertPackageVersionsFooter(source, versions) {
6114
6189
  return insertBundleGlobalFooter(source, FOOTER2, readPackageVersions(versions));
6115
6190
  }
6116
6191
 
6117
- // ../peach-engine/src/tenant-bundle-mode.ts
6118
- var import_metro_production_bundle2 = require("peachsim/metro-production-bundle");
6192
+ // cli/cloud-client.ts
6193
+ init_backend_origin();
6194
+ init_cli_runtime();
6119
6195
 
6120
- // ../peach-engine/src/tenant-runtime-environment.ts
6121
- function readBrowserLocation() {
6196
+ // src/cloud-contract.ts
6197
+ var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
6198
+ var RNX_CLOUD_COMMAND_SCOPES = {
6199
+ state: "read",
6200
+ tree: "read",
6201
+ query: "read",
6202
+ resolve: "read",
6203
+ screenshot: "read",
6204
+ capture: "read",
6205
+ captureRegions: "read",
6206
+ memory: "read",
6207
+ diagnostics: "read",
6208
+ storageSnapshot: "read",
6209
+ perform: "drive",
6210
+ waitFor: "drive",
6211
+ tap: "drive",
6212
+ longPress: "drive",
6213
+ settle: "drive",
6214
+ openUrl: "drive",
6215
+ setAppearance: "drive",
6216
+ keyboard: "drive",
6217
+ focus: "drive",
6218
+ flowStatus: "drive",
6219
+ reset: "reset",
6220
+ camera: "media",
6221
+ location: "media",
6222
+ // string evaluation and arbitrary bridge calls are maestro's boundary: the
6223
+ // customer sdk never carries this scope, and the service grants it only to
6224
+ // the account api key caller. close rides along, since ending the page ends
6225
+ // the sim and belongs to the sim's owner rather than any driver.
6226
+ evaluate: "debug",
6227
+ call: "debug",
6228
+ close: "debug"
6229
+ };
6230
+ function scopeTableKeys() {
6231
+ return Object.keys(RNX_CLOUD_COMMAND_SCOPES).filter(
6232
+ (key) => Object.prototype.hasOwnProperty.call(RNX_CLOUD_COMMAND_SCOPES, key)
6233
+ );
6234
+ }
6235
+ var RNX_CLOUD_COMMAND_TYPES = Object.freeze(scopeTableKeys());
6236
+ var RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
6237
+ function isRnxCloudCommandType(value) {
6238
+ return RNX_CLOUD_COMMAND_TYPE_SET.has(value);
6239
+ }
6240
+ function rnxCloudCommandScope(type) {
6241
+ return RNX_CLOUD_COMMAND_SCOPES[type];
6242
+ }
6243
+ var RNX_CLOUD_TOKEN_SCOPES = Object.freeze([
6244
+ "read",
6245
+ "drive",
6246
+ "reset",
6247
+ "media"
6248
+ ]);
6249
+ var RNX_CLOUD_ALL_COMMAND_SCOPES = Object.freeze(["read", "drive", "reset", "media", "debug"]);
6250
+ function rnxCloudScopesAllowCommand(scopes, type) {
6251
+ return scopes.includes(RNX_CLOUD_COMMAND_SCOPES[type]);
6252
+ }
6253
+
6254
+ // cli/cloud-client.ts
6255
+ init_is_record();
6256
+
6257
+ // src/metro-production-bundle.ts
6258
+ init_bundleGlobalFooter();
6259
+ var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
6260
+ var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
6261
+ var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
6262
+ function detachRNXMetroSourceMapUrl(bundleText) {
6263
+ const trimmedEnd = bundleText.trimEnd();
6264
+ const commentStart = trimmedEnd.lastIndexOf("\n");
6265
+ if (commentStart < 0 || !trimmedEnd.startsWith(RNXSIM_METRO_SOURCE_MAP_COMMENT, commentStart + 1)) {
6266
+ return { source: bundleText, sourceMappingUrl: null };
6267
+ }
6268
+ const url = trimmedEnd.slice(commentStart + 1 + RNXSIM_METRO_SOURCE_MAP_COMMENT.length);
6269
+ return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
6270
+ }
6271
+ function createRNXMetroModuleIdentityFooter(identity) {
6272
+ const payload = JSON.stringify(identity).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
6273
+ return `
6274
+ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}${payload};`;
6275
+ }
6276
+ function appendRNXMetroModuleIdentityFooter(bundleText, identity) {
6277
+ const footer = createRNXMetroModuleIdentityFooter(identity);
6278
+ const detached = detachRNXMetroSourceMapUrl(bundleText);
6279
+ return detached.sourceMappingUrl === null ? bundleText + footer : `${detached.source}${footer}
6280
+ ${RNXSIM_METRO_SOURCE_MAP_COMMENT}${detached.sourceMappingUrl}`;
6281
+ }
6282
+
6283
+ // cli/cloud-client.ts
6284
+ init_public_brand();
6285
+
6286
+ // src/auth/shared-session.ts
6287
+ init_home_paths();
6288
+ init_public_brand();
6289
+ var DEFAULT_ORIGIN = peachPublicBrand.origin;
6290
+
6291
+ // cli/run-rnx.ts
6292
+ var import_node_async_hooks = require("node:async_hooks");
6293
+ var sinks = new import_node_async_hooks.AsyncLocalStorage();
6294
+
6295
+ // cli/auth.ts
6296
+ var CHOOSE_ACCOUNT_HINT = "this sign-in belongs to several accounts; run `peach login --account <name>` to choose the one to bill";
6297
+
6298
+ // cli/cloud-session.ts
6299
+ init_backend_origin();
6300
+ init_is_record();
6301
+ var CLOUD_SESSION_VERSION = 3;
6302
+ var MAX_ENCODED_SESSION_BYTES = 32 * 1024;
6303
+ var PEACH_CLOUD_SESSION_ENV = "PEACH_CLOUD_SESSION";
6304
+ var RNX_SHELL_UPDATE_PREFIX = "__RNX_SHELL_UPDATE_V1__";
6305
+ var RNX_SHELL_UPDATE_SET_PREFIX = `${RNX_SHELL_UPDATE_PREFIX}set:`;
6306
+ var RNX_SHELL_UPDATE_UNSET = `${RNX_SHELL_UPDATE_PREFIX}unset`;
6307
+ function normalizeCloudOrigin(source) {
6308
+ let parsed;
6122
6309
  try {
6123
- return typeof location === "undefined" ? null : location;
6310
+ parsed = new URL(source);
6124
6311
  } catch {
6125
- return null;
6312
+ throw new Error(`invalid remote simulator origin: ${source}`);
6313
+ }
6314
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:" || parsed.username || parsed.password || parsed.pathname !== "/" || parsed.search || parsed.hash) {
6315
+ throw new Error(`remote simulator origin must be an HTTP(S) origin: ${source}`);
6316
+ }
6317
+ if (parsed.protocol === "http:" && !isLoopbackHost(parsed.hostname)) {
6318
+ throw new Error(`remote simulator origin requires HTTPS outside loopback: ${source}`);
6126
6319
  }
6320
+ return parsed.origin;
6321
+ }
6322
+ function createCloudSession(input) {
6323
+ const boxId = input.boxId?.trim() ?? "";
6324
+ const boxToken = input.boxToken ?? "";
6325
+ if (boxId === "" !== (boxToken === "")) {
6326
+ throw new Error("cloud session names a box with both its id and its token");
6327
+ }
6328
+ const session = {
6329
+ version: CLOUD_SESSION_VERSION,
6330
+ service: "sim",
6331
+ simId: input.simId.trim(),
6332
+ apiOrigin: normalizeCloudOrigin(input.apiOrigin.trim()),
6333
+ claimId: input.claimId.trim(),
6334
+ token: input.token,
6335
+ ...input.streamUrl ? { streamUrl: input.streamUrl } : {},
6336
+ ...input.platform ? { platform: input.platform } : {},
6337
+ ...input.device?.trim() ? { device: input.device.trim() } : {},
6338
+ ...input.artifact ? { artifact: input.artifact } : {},
6339
+ ...boxId && boxToken ? { boxId, boxToken } : {}
6340
+ };
6341
+ if (!session.simId || !session.claimId || !session.token) {
6342
+ throw new Error("cloud session requires a simulator, an origin, a claim, and a token");
6343
+ }
6344
+ return session;
6345
+ }
6346
+ function createCloudBoxSession(input) {
6347
+ if (input.appFontsWireSha256 !== void 0 && !/^[a-f0-9]{64}$/.test(input.appFontsWireSha256))
6348
+ throw new Error("cloud box session has an invalid app-font wire digest");
6349
+ const session = {
6350
+ version: CLOUD_SESSION_VERSION,
6351
+ service: "box",
6352
+ boxId: input.boxId.trim(),
6353
+ boxToken: input.boxToken,
6354
+ apiOrigin: normalizeCloudOrigin(input.apiOrigin.trim()),
6355
+ ...input.platform ? { platform: input.platform } : {},
6356
+ ...input.device?.trim() ? { device: input.device.trim() } : {},
6357
+ ...input.artifact ? { artifact: input.artifact } : {},
6358
+ ...input.appFontsWireSha256 !== void 0 ? { appFontsWireSha256: input.appFontsWireSha256 } : {}
6359
+ };
6360
+ if (!session.boxId || !session.boxToken) {
6361
+ throw new Error("cloud box session requires a box, an origin, and a box token");
6362
+ }
6363
+ return session;
6364
+ }
6365
+ function parseCloudSession(encoded) {
6366
+ const value = encoded.trim();
6367
+ if (!value || value.length > MAX_ENCODED_SESSION_BYTES || !/^[A-Za-z0-9_-]+$/.test(value)) {
6368
+ throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
6369
+ }
6370
+ let parsed;
6371
+ try {
6372
+ const bytes = Buffer.from(value, "base64url");
6373
+ if (bytes.toString("base64url") !== value) {
6374
+ throw new Error("non-canonical cloud session");
6375
+ }
6376
+ parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
6377
+ } catch {
6378
+ throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
6379
+ }
6380
+ if (!isRecord(parsed) || parsed.version !== CLOUD_SESSION_VERSION) {
6381
+ throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
6382
+ }
6383
+ const apiOrigin = parsed.apiOrigin;
6384
+ if (typeof apiOrigin !== "string") {
6385
+ throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
6386
+ }
6387
+ const platform = parsed.platform === "ios" || parsed.platform === "android" ? parsed.platform : void 0;
6388
+ const device = typeof parsed.device === "string" ? parsed.device : void 0;
6389
+ const artifact = isRecord(parsed.artifact) && typeof parsed.artifact.sha256 === "string" ? {
6390
+ sha256: parsed.artifact.sha256,
6391
+ bytes: typeof parsed.artifact.bytes === "number" ? parsed.artifact.bytes : void 0
6392
+ } : void 0;
6393
+ const streamUrl = typeof parsed.streamUrl === "string" ? parsed.streamUrl : void 0;
6394
+ const boxId = typeof parsed.boxId === "string" ? parsed.boxId : void 0;
6395
+ const boxToken = typeof parsed.boxToken === "string" ? parsed.boxToken : void 0;
6396
+ try {
6397
+ if (parsed.service === "box") {
6398
+ if (!boxId || !boxToken) throw new Error("unreadable cloud box session");
6399
+ if (parsed.appFontsWireSha256 !== void 0 && typeof parsed.appFontsWireSha256 !== "string")
6400
+ throw new Error("unreadable app-font wire digest");
6401
+ return createCloudBoxSession({
6402
+ boxId,
6403
+ boxToken,
6404
+ apiOrigin,
6405
+ platform,
6406
+ device,
6407
+ artifact,
6408
+ appFontsWireSha256: parsed.appFontsWireSha256
6409
+ });
6410
+ }
6411
+ const simId = parsed.simId;
6412
+ const claimId = parsed.claimId;
6413
+ const token = parsed.token;
6414
+ if (parsed.service !== "sim" || typeof simId !== "string" || typeof claimId !== "string" || typeof token !== "string") {
6415
+ throw new Error("unreadable cloud session");
6416
+ }
6417
+ return createCloudSession({
6418
+ simId,
6419
+ apiOrigin,
6420
+ claimId,
6421
+ token,
6422
+ streamUrl,
6423
+ platform,
6424
+ device,
6425
+ artifact,
6426
+ boxId,
6427
+ boxToken
6428
+ });
6429
+ } catch {
6430
+ throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
6431
+ }
6432
+ }
6433
+ function readCloudSession(environment = process.env) {
6434
+ const encoded = environment[PEACH_CLOUD_SESSION_ENV];
6435
+ return encoded?.trim() ? parseCloudSession(encoded) : null;
6127
6436
  }
6128
- var nativeRuntimeLocation = readBrowserLocation();
6129
-
6130
- // ../peach-engine/src/metro-fingerprint-registry-client.ts
6131
- var import_metro_fingerprint_registry = require("peachsim/metro-fingerprint-registry");
6132
-
6133
- // ../peach-compat/src/wrapper-real-packages.ts
6134
- var SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES = {
6135
- expoUiConfirmationDialog: {
6136
- specifier: "@peach-internal/expo-ui-confirmation-dialog",
6137
- packageName: "@expo/ui/src/swift-ui/ConfirmationDialog/index.tsx"
6138
- },
6139
- expoUiShareLink: {
6140
- specifier: "@peach-internal/expo-ui-share-link",
6141
- packageName: "@expo/ui/src/swift-ui/ShareLink/index.tsx"
6142
- },
6143
- expoUiNamespace: {
6144
- specifier: "@peach-internal/expo-ui-namespace",
6145
- packageName: "@expo/ui/src/swift-ui/Namespace.tsx"
6146
- },
6147
- expoUiHost: {
6148
- specifier: "@peach-internal/expo-ui-host",
6149
- packageName: "@expo/ui/src/swift-ui/Host/index.tsx"
6150
- },
6151
- expoUiBottomSheet: {
6152
- specifier: "@peach-internal/expo-ui-bottom-sheet",
6153
- packageName: "@expo/ui/src/swift-ui/BottomSheet/index.tsx"
6154
- },
6155
- expoUiTabView: {
6156
- specifier: "@peach-internal/expo-ui-tab-view",
6157
- packageName: "@expo/ui/src/swift-ui/TabView/index.tsx"
6158
- },
6159
- expoUiForm: {
6160
- specifier: "@peach-internal/expo-ui-form",
6161
- packageName: "@expo/ui/src/swift-ui/Form/index.tsx"
6162
- },
6163
- expoUiSection: {
6164
- specifier: "@peach-internal/expo-ui-section",
6165
- packageName: "@expo/ui/src/swift-ui/Section/index.tsx"
6166
- },
6167
- expoUiAccessoryWidgetBackground: {
6168
- specifier: "@peach-internal/expo-ui-accessory-widget-background",
6169
- packageName: "@expo/ui/src/swift-ui/AccessoryWidgetBackground/index.tsx"
6170
- },
6171
- expoUiGlassEffectContainer: {
6172
- specifier: "@peach-internal/expo-ui-glass-effect-container",
6173
- packageName: "@expo/ui/src/swift-ui/GlassEffectContainer/index.tsx"
6174
- },
6175
- expoUiContentUnavailableView: {
6176
- specifier: "@peach-internal/expo-ui-content-unavailable-view",
6177
- packageName: "@expo/ui/src/swift-ui/ContentUnavailableView/index.tsx"
6178
- },
6179
- expoUiColorPicker: {
6180
- specifier: "@peach-internal/expo-ui-color-picker",
6181
- packageName: "@expo/ui/src/swift-ui/ColorPicker/index.tsx"
6182
- },
6183
- expoUiProgressView: {
6184
- specifier: "@peach-internal/expo-ui-progress-view",
6185
- packageName: "@expo/ui/src/swift-ui/ProgressView/index.tsx"
6186
- },
6187
- expoUiToggle: {
6188
- specifier: "@peach-internal/expo-ui-toggle",
6189
- packageName: "@expo/ui/src/swift-ui/Toggle/index.tsx"
6190
- },
6191
- expoUiPicker: {
6192
- specifier: "@peach-internal/expo-ui-picker",
6193
- packageName: "@expo/ui/src/swift-ui/Picker/index.tsx"
6194
- },
6195
- expoUiDivider: {
6196
- specifier: "@peach-internal/expo-ui-divider",
6197
- packageName: "@expo/ui/src/swift-ui/Divider/index.tsx"
6198
- },
6199
- expoUiText: {
6200
- specifier: "@peach-internal/expo-ui-text",
6201
- packageName: "@expo/ui/src/swift-ui/Text/index.tsx"
6202
- },
6203
- expoUiMenu: {
6204
- specifier: "@peach-internal/expo-ui-menu",
6205
- packageName: "@expo/ui/src/swift-ui/Menu/index.tsx"
6206
- },
6207
- expoUiImage: {
6208
- specifier: "@peach-internal/expo-ui-image",
6209
- packageName: "@expo/ui/src/swift-ui/Image/index.tsx"
6210
- },
6211
- expoUiAlert: {
6212
- specifier: "@peach-internal/expo-ui-alert",
6213
- packageName: "@expo/ui/src/swift-ui/Alert/index.tsx"
6214
- },
6215
- expoUiPopover: {
6216
- specifier: "@peach-internal/expo-ui-popover",
6217
- packageName: "@expo/ui/src/swift-ui/Popover/index.tsx"
6218
- },
6219
- expoUiRNHostView: {
6220
- specifier: "@peach-internal/expo-ui-rnhost-view",
6221
- packageName: "@expo/ui/src/swift-ui/RNHostView.tsx"
6222
- },
6223
- expoUiOverlay: {
6224
- specifier: "@peach-internal/expo-ui-overlay",
6225
- packageName: "@expo/ui/src/swift-ui/Overlay/index.tsx"
6226
- },
6227
- expoUiBackground: {
6228
- specifier: "@peach-internal/expo-ui-background",
6229
- packageName: "@expo/ui/src/swift-ui/Background/index.tsx"
6230
- },
6231
- expoUiMask: {
6232
- specifier: "@peach-internal/expo-ui-mask",
6233
- packageName: "@expo/ui/src/swift-ui/Mask/index.tsx"
6234
- },
6235
- expoUiShapes: {
6236
- specifier: "@peach-internal/expo-ui-shapes",
6237
- packageName: "@expo/ui/src/swift-ui/Shapes/index.tsx"
6238
- },
6239
- expoUiControlGroup: {
6240
- specifier: "@peach-internal/expo-ui-control-group",
6241
- packageName: "@expo/ui/src/swift-ui/ControlGroup/index.tsx"
6242
- },
6243
- expoUiScrollView: {
6244
- specifier: "@peach-internal/expo-ui-scroll-view",
6245
- packageName: "@expo/ui/src/swift-ui/ScrollView/index.tsx"
6246
- },
6247
- expoUiGrid: {
6248
- specifier: "@peach-internal/expo-ui-grid",
6249
- packageName: "@expo/ui/src/swift-ui/Grid/index.tsx"
6250
- },
6251
- expoUiGroup: {
6252
- specifier: "@peach-internal/expo-ui-group",
6253
- packageName: "@expo/ui/src/swift-ui/Group/index.tsx"
6254
- },
6255
- expoUiSpacer: {
6256
- specifier: "@peach-internal/expo-ui-spacer",
6257
- packageName: "@expo/ui/src/swift-ui/Spacer/index.tsx"
6258
- },
6259
- expoUiLazyHStack: {
6260
- specifier: "@peach-internal/expo-ui-lazy-hstack",
6261
- packageName: "@expo/ui/src/swift-ui/LazyHStack/index.tsx"
6262
- },
6263
- expoUiLazyVStack: {
6264
- specifier: "@peach-internal/expo-ui-lazy-vstack",
6265
- packageName: "@expo/ui/src/swift-ui/LazyVStack/index.tsx"
6266
- },
6267
- expoUiHStack: {
6268
- specifier: "@peach-internal/expo-ui-hstack",
6269
- packageName: "@expo/ui/src/swift-ui/HStack/index.tsx"
6270
- },
6271
- expoUiVStack: {
6272
- specifier: "@peach-internal/expo-ui-vstack",
6273
- packageName: "@expo/ui/src/swift-ui/VStack/index.tsx"
6274
- },
6275
- expoUiZStack: {
6276
- specifier: "@peach-internal/expo-ui-zstack",
6277
- packageName: "@expo/ui/src/swift-ui/ZStack/index.tsx"
6278
- },
6279
- expoUiButton: {
6280
- specifier: "@peach-internal/expo-ui-button",
6281
- packageName: "@expo/ui/src/swift-ui/Button/index.tsx"
6282
- },
6283
- expoUiDatePicker: {
6284
- specifier: "@peach-internal/expo-ui-date-picker",
6285
- packageName: "@expo/ui/src/swift-ui/DatePicker/index.tsx"
6286
- },
6287
- expoUiSlider: {
6288
- specifier: "@peach-internal/expo-ui-slider",
6289
- packageName: "@expo/ui/src/swift-ui/Slider/index.tsx"
6290
- },
6291
- expoUiStepper: {
6292
- specifier: "@peach-internal/expo-ui-stepper",
6293
- packageName: "@expo/ui/src/swift-ui/Stepper/index.tsx"
6294
- },
6295
- expoUiLink: {
6296
- specifier: "@peach-internal/expo-ui-link",
6297
- packageName: "@expo/ui/src/swift-ui/Link/index.tsx"
6298
- },
6299
- expoUiAnimationConstants: {
6300
- specifier: "@peach-internal/expo-ui-animation-constants",
6301
- packageName: "@expo/ui/build/swift-ui/modifiers/animation/constants.js"
6302
- },
6303
- expoUiWithAnimation: {
6304
- specifier: "@peach-internal/expo-ui-with-animation",
6305
- packageName: "@expo/ui/build/swift-ui/withAnimation.js"
6306
- },
6307
- expoUiNativeState: {
6308
- specifier: "@peach-internal/expo-ui-native-state",
6309
- packageName: "@expo/ui/build/State/index.js"
6310
- },
6311
- expoUiSyncToggle: {
6312
- specifier: "@peach-internal/expo-ui-sync-toggle",
6313
- packageName: "@expo/ui/build/swift-ui/SyncToggle/index.js"
6314
- },
6315
- expoUiTextField: {
6316
- specifier: "@peach-internal/expo-ui-text-field",
6317
- packageName: "@expo/ui/src/swift-ui/TextField/index.tsx"
6318
- },
6319
- expoUiSecureField: {
6320
- specifier: "@peach-internal/expo-ui-secure-field",
6321
- packageName: "@expo/ui/src/swift-ui/SecureField/index.tsx"
6322
- },
6323
- expoUiArrangementView: {
6324
- specifier: "@peach-internal/expo-ui-arrangement-view",
6325
- packageName: "@expo/ui/src/swift-ui/ArrangementView/index.tsx"
6326
- },
6327
- expoUiLazyHStackForEach: {
6328
- specifier: "@peach-internal/expo-ui-lazy-hstack-for-each",
6329
- packageName: "@expo/ui/src/swift-ui/LazyHStack/index.tsx"
6330
- },
6331
- expoUiLazyVStackForEach: {
6332
- specifier: "@peach-internal/expo-ui-lazy-vstack-for-each",
6333
- packageName: "@expo/ui/src/swift-ui/LazyVStack/index.tsx"
6334
- },
6335
- expoUiNavigationDestination: {
6336
- specifier: "@peach-internal/expo-ui-navigation-destination",
6337
- packageName: "@expo/ui/src/swift-ui/NavigationDestination/index.tsx"
6338
- },
6339
- expoUiNavigationLink: {
6340
- specifier: "@peach-internal/expo-ui-navigation-link",
6341
- packageName: "@expo/ui/src/swift-ui/NavigationLink/index.tsx"
6342
- },
6343
- expoUiNavigationStack: {
6344
- specifier: "@peach-internal/expo-ui-navigation-stack",
6345
- packageName: "@expo/ui/src/swift-ui/NavigationStack/index.tsx"
6346
- },
6347
- expoUiNavigationSplitView: {
6348
- specifier: "@peach-internal/expo-ui-navigation-split-view",
6349
- packageName: "@expo/ui/src/swift-ui/NavigationSplitView/index.tsx"
6350
- },
6351
- expoUiToolbar: {
6352
- specifier: "@peach-internal/expo-ui-toolbar",
6353
- packageName: "@expo/ui/src/swift-ui/Toolbar/index.tsx"
6354
- },
6355
- expoUiList: {
6356
- specifier: "@peach-internal/expo-ui-list",
6357
- packageName: "@expo/ui/src/swift-ui/List/index.tsx"
6358
- },
6359
- expoUiDisclosureGroup: {
6360
- specifier: "@peach-internal/expo-ui-disclosure-group",
6361
- packageName: "@expo/ui/src/swift-ui/DisclosureGroup/index.tsx"
6362
- },
6363
- expoUiGauge: {
6364
- specifier: "@peach-internal/expo-ui-gauge",
6365
- packageName: "@expo/ui/src/swift-ui/Gauge/index.tsx"
6366
- },
6367
- expoUiLabeledContent: {
6368
- specifier: "@peach-internal/expo-ui-labeled-content",
6369
- packageName: "@expo/ui/src/swift-ui/LabeledContent/index.tsx"
6370
- },
6371
- expoUiLabel: {
6372
- specifier: "@peach-internal/expo-ui-label",
6373
- packageName: "@expo/ui/src/swift-ui/Label/index.tsx"
6374
- },
6375
- expoCodedError: {
6376
- specifier: "@peach-internal/expo-coded-error",
6377
- packageName: "expo-modules-core/build/errors/CodedError.js"
6378
- },
6379
- expoUnavailabilityError: {
6380
- specifier: "@peach-internal/expo-unavailability-error",
6381
- packageName: "expo-modules-core/build/errors/UnavailabilityError.js"
6382
- },
6383
- expoPlatform: {
6384
- specifier: "@peach-internal/expo-platform",
6385
- packageName: "expo-modules-core/build/Platform.js"
6386
- },
6387
- expoSharedObjectHook: {
6388
- specifier: "@peach-internal/expo-shared-object-hook",
6389
- packageName: "expo-modules-core/build/hooks/useReleasingSharedObject.js"
6390
- },
6391
- expoSharedObjectLifecycleHook: {
6392
- specifier: "@peach-internal/expo-shared-object-lifecycle-hook",
6393
- packageName: "expo-modules-core/build/hooks/useReleasingSharedObjectWithLifecycle.js"
6394
- },
6395
- expoApplication: {
6396
- specifier: "@sootsim-internal/expo-application-real",
6397
- packageName: "expo-application"
6398
- },
6399
- expoBackgroundFetch: {
6400
- specifier: "@sootsim-internal/expo-background-fetch-real",
6401
- packageName: "expo-background-fetch"
6402
- },
6403
- expoBackgroundTask: {
6404
- specifier: "@sootsim-internal/expo-background-task-real",
6405
- packageName: "expo-background-task"
6406
- },
6407
- expoSensors: {
6408
- specifier: "@sootsim-internal/expo-sensors-real",
6409
- packageName: "expo-sensors"
6410
- },
6411
- expoBattery: {
6412
- specifier: "@sootsim-internal/expo-battery-real",
6413
- packageName: "expo-battery"
6414
- },
6415
- expoBrightness: {
6416
- specifier: "@sootsim-internal/expo-brightness-real",
6417
- packageName: "expo-brightness"
6418
- },
6419
- expoConstants: {
6420
- specifier: "@sootsim-internal/expo-constants-real",
6421
- packageName: "expo-constants"
6422
- },
6423
- expoCalendar: {
6424
- specifier: "@sootsim-internal/expo-calendar-real",
6425
- packageName: "expo-calendar"
6426
- },
6427
- expoCalendarLegacy: {
6428
- specifier: "@sootsim-internal/expo-calendar-legacy-real",
6429
- // the package's own `./legacy` export, not a hardcoded `src/legacy/...`
6430
- // path — this follows wherever upstream points the subpath, in every
6431
- // version that has one. versions without it never import the legacy
6432
- // stub, so the alias just goes unused there.
6433
- packageName: "expo-calendar/legacy"
6434
- },
6435
- expoCellular: {
6436
- specifier: "@sootsim-internal/expo-cellular-real",
6437
- packageName: "expo-cellular"
6438
- },
6439
- expoContactsContacts: {
6440
- specifier: "@sootsim-internal/expo-contacts-contacts",
6441
- // sdk 57 split Contacts.ts into src/index.ts + legacy/ + next/
6442
- packageName: "expo-contacts/src/index.ts"
6443
- },
6444
- expoContactsContactAccessButton: {
6445
- specifier: "@sootsim-internal/expo-contacts-contact-access-button",
6446
- packageName: "expo-contacts/src/ContactAccessButton.tsx"
6447
- },
6448
- expoContactsLegacy: {
6449
- specifier: "@sootsim-internal/expo-contacts-legacy-real",
6450
- // same as expoCalendarLegacy: the public `./legacy` export, not a src path.
6451
- packageName: "expo-contacts/legacy"
6452
- },
6453
- expoInsights: {
6454
- specifier: "@sootsim-internal/expo-insights-real",
6455
- packageName: "expo-insights"
6456
- },
6457
- expoIntentLauncher: {
6458
- specifier: "@sootsim-internal/expo-intent-launcher-real",
6459
- packageName: "expo-intent-launcher"
6460
- },
6461
- expoMailComposer: {
6462
- specifier: "@sootsim-internal/expo-mail-composer-real",
6463
- packageName: "expo-mail-composer"
6464
- },
6465
- expoNetwork: {
6466
- specifier: "@sootsim-internal/expo-network-real",
6467
- packageName: "expo-network"
6468
- },
6469
- expoPrint: {
6470
- specifier: "@sootsim-internal/expo-print-real",
6471
- packageName: "expo-print"
6472
- },
6473
- expoScreenCapture: {
6474
- specifier: "@sootsim-internal/expo-screen-capture-real",
6475
- packageName: "expo-screen-capture"
6476
- },
6477
- expoScreenOrientation: {
6478
- specifier: "@sootsim-internal/expo-screen-orientation-real",
6479
- packageName: "expo-screen-orientation"
6480
- },
6481
- expoQuickActions: {
6482
- specifier: "@sootsim-internal/expo-quick-actions-real",
6483
- packageName: "expo-quick-actions/build/index.js"
6484
- },
6485
- expoSecureStore: {
6486
- specifier: "@sootsim-internal/expo-secure-store-real",
6487
- packageName: "expo-secure-store"
6488
- },
6489
- expoSplashScreen: {
6490
- specifier: "@sootsim-internal/expo-splash-screen-real",
6491
- packageName: "expo-splash-screen"
6492
- },
6493
- expoSqlite: {
6494
- specifier: "@sootsim-internal/expo-sqlite-real",
6495
- packageName: "expo-sqlite"
6496
- },
6497
- expoLinearGradient: {
6498
- specifier: "@sootsim-internal/expo-linear-gradient-real",
6499
- packageName: "expo-linear-gradient"
6500
- },
6501
- expoBlur: {
6502
- specifier: "@sootsim-internal/expo-blur-real",
6503
- packageName: "expo-blur"
6504
- },
6505
- expoSymbols: {
6506
- specifier: "@sootsim-internal/expo-symbols-real",
6507
- packageName: "expo-symbols"
6508
- },
6509
- communityCheckbox: {
6510
- specifier: "@sootsim-internal/react-native-community-checkbox-real",
6511
- packageName: "@react-native-community/checkbox/dist/js/CheckBox.ios.js"
6512
- },
6513
- reactNativeMaskedView: {
6514
- specifier: "@sootsim-internal/masked-view-real",
6515
- packageName: "@react-native-masked-view/masked-view"
6516
- },
6517
- expoSharing: {
6518
- specifier: "@sootsim-internal/expo-sharing-real",
6519
- packageName: "expo-sharing"
6520
- },
6521
- expoSms: {
6522
- specifier: "@sootsim-internal/expo-sms-real",
6523
- packageName: "expo-sms"
6524
- },
6525
- expoSpeech: {
6526
- specifier: "@sootsim-internal/expo-speech-real",
6527
- packageName: "expo-speech"
6528
- },
6529
- expoStoreReview: {
6530
- specifier: "@sootsim-internal/expo-store-review-real",
6531
- packageName: "expo-store-review"
6532
- },
6533
- expoTaskManager: {
6534
- specifier: "@sootsim-internal/expo-task-manager-real",
6535
- packageName: "expo-task-manager"
6536
- },
6537
- expoTrackingTransparency: {
6538
- specifier: "@sootsim-internal/expo-tracking-transparency-real",
6539
- packageName: "expo-tracking-transparency"
6540
- },
6541
- expoVideoThumbnails: {
6542
- specifier: "@sootsim-internal/expo-video-thumbnails-real",
6543
- packageName: "expo-video-thumbnails"
6544
- },
6545
- googleSignin: {
6546
- specifier: "@sootsim-internal/react-native-google-signin-real",
6547
- packageName: "@react-native-google-signin/google-signin"
6548
- },
6549
- reactNativeHapticFeedback: {
6550
- specifier: "@sootsim-internal/react-native-haptic-feedback-real",
6551
- packageName: "react-native-haptic-feedback"
6552
- },
6553
- reactNativeSegmentedControl: {
6554
- specifier: "@sootsim-internal/react-native-segmented-control-real",
6555
- packageName: "@react-native-segmented-control/segmented-control/js/SegmentedControl.ios.js"
6556
- },
6557
- reactNativeUitextview: {
6558
- specifier: "@sootsim-internal/react-native-uitextview-real",
6559
- packageName: "react-native-uitextview"
6560
- },
6561
- reactNativeWorkletsBundleMode: {
6562
- specifier: "@sootsim-internal/react-native-worklets-bundle-mode-real",
6563
- packageName: "react-native-worklets/lib/module/debug/bundleMode.native.js"
6564
- },
6565
- reactNativeWorkletsFunction: {
6566
- specifier: "@peach-internal/react-native-worklets-function-real",
6567
- packageName: "react-native-worklets/lib/module/workletFunction.js"
6568
- },
6569
- reactNativeWorkletsRunLoop: {
6570
- specifier: "@sootsim-internal/react-native-worklets-run-loop-real",
6571
- packageName: "react-native-worklets/lib/module/runLoop/workletRuntime/index.js"
6572
- }
6573
- };
6574
- var PEACH_REACT_NATIVE_UPSTREAM_MODULES = {
6575
- reactNativeBatchedBridge: {
6576
- specifier: "@peach-internal/react-native/BatchedBridge/BatchedBridge",
6577
- packageName: "react-native/Libraries/BatchedBridge/BatchedBridge.js"
6578
- },
6579
- reactNativeStyleAttributes: {
6580
- specifier: "@peach-internal/react-native/Components/View/ReactNativeStyleAttributes",
6581
- packageName: "react-native/Libraries/Components/View/ReactNativeStyleAttributes.js"
6582
- },
6583
- reactNativeProcessColor: {
6584
- specifier: "@peach-internal/react-native/StyleSheet/processColor",
6585
- packageName: "react-native/Libraries/StyleSheet/processColor.js"
6586
- },
6587
- reactNativeFontVariationSettings: {
6588
- specifier: "@peach-internal/react-native-font-variation-settings",
6589
- packageName: "react-native/Libraries/StyleSheet/processFontVariationSettings.js"
6590
- }
6591
- };
6592
- var PEACH_UPSTREAM_MODULES = {
6593
- ...SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES,
6594
- ...PEACH_REACT_NATIVE_UPSTREAM_MODULES
6595
- };
6596
-
6597
- // ../peach-compat/src/stub-manifest.ts
6598
- var COMPAT_STUBS = {
6599
- reactNativeScreens: {
6600
- specifier: "react-native-screens",
6601
- stubFile: "react-native-screens.ts",
6602
- runtimeTier: "lazy",
6603
- buildResolvers: ["vite", "dep-prebundle"]
6604
- },
6605
- reactNativeMaskedView: {
6606
- specifier: "@react-native-masked-view/masked-view",
6607
- stubFile: "masked-view.ts",
6608
- runtimeTier: "none",
6609
- buildResolvers: ["vite"]
6610
- },
6611
- reactNativeCommunityMaskedView: {
6612
- specifier: "@react-native-community/masked-view",
6613
- stubFile: "masked-view.ts",
6614
- runtimeTier: "none",
6615
- buildResolvers: ["vite"]
6616
- },
6617
- reactNativeTeleport: {
6618
- specifier: "react-native-teleport",
6619
- stubFile: "react-native-teleport.tsx",
6620
- runtimeTier: "lazy",
6621
- buildResolvers: ["vite", "dep-prebundle"]
6622
- },
6623
- reactNativeIosContextMenu: {
6624
- specifier: "react-native-ios-context-menu",
6625
- stubFile: "react-native-ios-context-menu.ts",
6626
- runtimeTier: "core",
6627
- buildResolvers: ["vite"]
6628
- },
6629
- reactNativeIosUtilities: {
6630
- specifier: "react-native-ios-utilities",
6631
- stubFile: "react-native-ios-utilities.ts",
6632
- runtimeTier: "core",
6633
- buildResolvers: ["vite"]
6634
- },
6635
- expoSplashScreen: {
6636
- specifier: "expo-splash-screen",
6637
- stubFile: "expo-splash-screen.ts",
6638
- runtimeTier: "none",
6639
- buildResolvers: ["vite", "dep-prebundle"]
6640
- },
6641
- reactNativeLaunchArguments: {
6642
- specifier: "react-native-launch-arguments",
6643
- stubFile: "react-native-launch-arguments.ts",
6644
- runtimeTier: "core",
6645
- buildResolvers: ["vite"]
6646
- },
6647
- expoWinterFormData: {
6648
- specifier: "expo/build/winter/FormData",
6649
- stubFile: "expo-winter-formdata.ts",
6650
- runtimeTier: "none",
6651
- buildResolvers: ["vite"]
6652
- },
6653
- expoWinterFetch: {
6654
- specifier: "expo/build/winter/fetch/index",
6655
- stubFile: "expo-winter-fetch.ts",
6656
- runtimeTier: "none",
6657
- buildResolvers: ["vite"]
6658
- },
6659
- expoConstants: {
6660
- specifier: "expo-constants",
6661
- stubFile: "expo-constants.ts",
6662
- runtimeTier: "none",
6663
- buildResolvers: ["vite", "dep-prebundle"]
6664
- },
6665
- expoLinearGradient: {
6666
- specifier: "expo-linear-gradient",
6667
- stubFile: "expo-linear-gradient.ts",
6668
- runtimeTier: "none",
6669
- buildResolvers: ["vite", "dep-prebundle"]
6670
- },
6671
- expoBlur: {
6672
- specifier: "expo-blur",
6673
- stubFile: "expo-blur.ts",
6674
- runtimeTier: "none",
6675
- buildResolvers: ["vite", "dep-prebundle"]
6676
- },
6677
- expoLiquidGlassView: {
6678
- specifier: "expo-liquid-glass-view",
6679
- stubFile: "expo-liquid-glass-view.ts",
6680
- runtimeTier: "core",
6681
- buildResolvers: ["vite", "dep-prebundle"]
6682
- },
6683
- expoGlassEffect: {
6684
- specifier: "expo-glass-effect",
6685
- stubFile: "expo-glass-effect.ts",
6686
- runtimeTier: "lazy",
6687
- buildResolvers: ["vite", "dep-prebundle"]
6688
- },
6689
- expoSymbols: {
6690
- specifier: "expo-symbols",
6691
- stubFile: "expo-symbols.ts",
6692
- runtimeTier: "none",
6693
- buildResolvers: ["vite", "dep-prebundle"]
6694
- },
6695
- expoMeshGradient: {
6696
- specifier: "expo-mesh-gradient",
6697
- stubFile: "expo-mesh-gradient.ts",
6698
- runtimeTier: "lazy",
6699
- buildResolvers: ["vite", "dep-prebundle"]
6700
- },
6701
- reactNativeBottomTabs: {
6702
- specifier: "react-native-bottom-tabs",
6703
- stubFile: "react-native-bottom-tabs.ts",
6704
- runtimeTier: "lazy",
6705
- buildResolvers: ["vite", "dep-prebundle"]
6706
- },
6707
- callstackReactNativeBottomTabs: {
6708
- specifier: "@callstack/react-native-bottom-tabs",
6709
- stubFile: "react-native-bottom-tabs.ts",
6710
- runtimeTier: "lazy",
6711
- buildResolvers: ["vite", "dep-prebundle"]
6712
- },
6713
- expoUiSwiftUi: {
6714
- specifier: "@expo/ui/swift-ui",
6715
- stubFile: "expo-ui.ts",
6716
- runtimeTier: "lazy",
6717
- buildResolvers: ["vite"]
6718
- },
6719
- expoUiCommunityMenu: {
6720
- specifier: "@expo/ui/community/menu",
6721
- stubFile: "expo-ui-menu.ts",
6722
- runtimeTier: "lazy",
6723
- buildResolvers: ["vite"]
6724
- },
6725
- expoModulesCore: {
6726
- specifier: "expo-modules-core",
6727
- stubFile: "expo-modules-core-package.ts",
6728
- runtimeTier: "lazy",
6729
- buildResolvers: ["vite"]
6730
- },
6731
- reactNativeWorklets: {
6732
- specifier: "react-native-worklets",
6733
- stubFile: "react-native-worklets-pkg/index.ts",
6734
- runtimeTier: "none",
6735
- buildResolvers: ["vite", "dep-prebundle"]
6736
- },
6737
- reactNativeWorkletsNative: {
6738
- specifier: "react-native-worklets/specs/NativeWorkletsModule",
6739
- stubFile: "react-native-worklets-native.ts",
6740
- runtimeTier: "lazy",
6741
- buildResolvers: ["vite"]
6742
- },
6743
- reactNativeWorkletsPackageJson: {
6744
- specifier: "react-native-worklets/package.json",
6745
- stubFile: "react-native-worklets-pkg/package.json",
6746
- runtimeTier: "none",
6747
- buildResolvers: ["vite"]
6748
- },
6749
- reactNativePdf: {
6750
- specifier: "react-native-pdf",
6751
- stubFile: "react-native-pdf.ts",
6752
- runtimeTier: "lazy",
6753
- buildResolvers: ["vite"]
6754
- },
6755
- expoBackgroundFetch: {
6756
- specifier: "expo-background-fetch",
6757
- stubFile: "expo-background-fetch.ts",
6758
- runtimeTier: "none",
6759
- buildResolvers: ["vite"]
6760
- },
6761
- expoBackgroundTask: {
6762
- specifier: "expo-background-task",
6763
- stubFile: "expo-background-task.ts",
6764
- runtimeTier: "none",
6765
- buildResolvers: ["vite"]
6766
- },
6767
- expoSensors: {
6768
- specifier: "expo-sensors",
6769
- stubFile: "expo-sensors.ts",
6770
- runtimeTier: "none",
6771
- buildResolvers: ["vite"]
6772
- },
6773
- expoVideoThumbnails: {
6774
- specifier: "expo-video-thumbnails",
6775
- stubFile: "expo-video-thumbnails.ts",
6776
- runtimeTier: "none",
6777
- buildResolvers: ["vite"]
6778
- },
6779
- googleSignin: {
6780
- specifier: "@react-native-google-signin/google-signin",
6781
- stubFile: "react-native-google-signin.ts",
6782
- runtimeTier: "none",
6783
- buildResolvers: ["vite", "dep-prebundle"]
6784
- },
6785
- reactNativeHapticFeedback: {
6786
- specifier: "react-native-haptic-feedback",
6787
- stubFile: "react-native-haptic-feedback.ts",
6788
- runtimeTier: "none",
6789
- buildResolvers: ["vite", "dep-prebundle"]
6790
- },
6791
- reactNativeSegmentedControl: {
6792
- specifier: "@react-native-segmented-control/segmented-control",
6793
- stubFile: "react-native-segmented-control.ts",
6794
- runtimeTier: "lazy",
6795
- buildResolvers: ["vite"]
6796
- },
6797
- reactNativeUitextview: {
6798
- specifier: "react-native-uitextview",
6799
- stubFile: "react-native-uitextview.ts",
6800
- runtimeTier: "lazy",
6801
- buildResolvers: ["vite"]
6802
- },
6803
- expoBattery: {
6804
- specifier: "expo-battery",
6805
- stubFile: "expo-battery.ts",
6806
- runtimeTier: "none",
6807
- buildResolvers: ["vite"]
6808
- },
6809
- expoBrightness: {
6810
- specifier: "expo-brightness",
6811
- stubFile: "expo-brightness.ts",
6812
- runtimeTier: "none",
6813
- buildResolvers: ["vite"]
6814
- },
6815
- // sdk 57 moved the async calendar surface behind `expo-calendar/legacy`.
6816
- // the bare-specifier alias is a PREFIX match, so without this longer entry
6817
- // it rewrites the subpath to `<stubs>/expo-calendar.ts/legacy`. it needs its
6818
- // own stub too: upstream's root re-exports `legacyWarnings`, where every
6819
- // async method throws "imported from expo-calendar is deprecated", so
6820
- // sharing the root stub makes the whole legacy surface throw at call time.
6821
- expoCalendarLegacy: {
6822
- specifier: "expo-calendar/legacy",
6823
- stubFile: "expo-calendar-legacy.ts",
6824
- runtimeTier: "none",
6825
- buildResolvers: ["vite"]
6826
- },
6827
- expoCalendar: {
6828
- specifier: "expo-calendar",
6829
- stubFile: "expo-calendar.ts",
6830
- runtimeTier: "none",
6831
- buildResolvers: ["vite"]
6832
- },
6833
- expoCellular: {
6834
- specifier: "expo-cellular",
6835
- stubFile: "expo-cellular.ts",
6836
- runtimeTier: "none",
6837
- buildResolvers: ["vite"]
6838
- },
6839
- // same `/legacy` prefix-alias and deprecated-root case as expo-calendar.
6840
- expoContactsLegacy: {
6841
- specifier: "expo-contacts/legacy",
6842
- stubFile: "expo-contacts-legacy.ts",
6843
- runtimeTier: "none",
6844
- buildResolvers: ["vite"]
6845
- },
6846
- expoContacts: {
6847
- specifier: "expo-contacts",
6848
- stubFile: "expo-contacts.ts",
6849
- runtimeTier: "none",
6850
- buildResolvers: ["vite"]
6851
- },
6852
- expoMailComposer: {
6853
- specifier: "expo-mail-composer",
6854
- stubFile: "expo-mail-composer.ts",
6855
- runtimeTier: "none",
6856
- buildResolvers: ["vite"]
6857
- },
6858
- expoPrint: {
6859
- specifier: "expo-print",
6860
- stubFile: "expo-print.ts",
6861
- runtimeTier: "none",
6862
- buildResolvers: ["vite"]
6863
- },
6864
- expoSecureStore: {
6865
- specifier: "expo-secure-store",
6866
- stubFile: "expo-secure-store.ts",
6867
- runtimeTier: "none",
6868
- buildResolvers: ["vite", "dep-prebundle"]
6869
- },
6870
- expoInsights: {
6871
- specifier: "expo-insights",
6872
- stubFile: "expo-insights.ts",
6873
- runtimeTier: "none",
6874
- buildResolvers: ["vite"]
6875
- },
6876
- expoIntentLauncher: {
6877
- specifier: "expo-intent-launcher",
6878
- stubFile: "expo-intent-launcher.ts",
6879
- runtimeTier: "none",
6880
- buildResolvers: ["vite"]
6881
- },
6882
- expoTaskManager: {
6883
- specifier: "expo-task-manager",
6884
- stubFile: "expo-task-manager.ts",
6885
- runtimeTier: "none",
6886
- buildResolvers: ["vite"]
6887
- },
6888
- expoApplication: {
6889
- specifier: "expo-application",
6890
- stubFile: "expo-application.ts",
6891
- runtimeTier: "none",
6892
- buildResolvers: ["vite", "dep-prebundle"]
6893
- },
6894
- expoNetwork: {
6895
- specifier: "expo-network",
6896
- stubFile: "expo-network.ts",
6897
- runtimeTier: "none",
6898
- buildResolvers: ["vite"]
6899
- },
6900
- expoScreenCapture: {
6901
- specifier: "expo-screen-capture",
6902
- stubFile: "expo-screen-capture.ts",
6903
- runtimeTier: "none",
6904
- buildResolvers: ["vite"]
6905
- },
6906
- expoScreenOrientation: {
6907
- specifier: "expo-screen-orientation",
6908
- stubFile: "expo-screen-orientation.ts",
6909
- runtimeTier: "none",
6910
- buildResolvers: ["vite"]
6911
- },
6912
- expoQuickActions: {
6913
- specifier: "expo-quick-actions",
6914
- stubFile: "expo-quick-actions.ts",
6915
- runtimeTier: "none",
6916
- buildResolvers: ["vite"]
6917
- },
6918
- expoSharing: {
6919
- specifier: "expo-sharing",
6920
- stubFile: "expo-sharing.ts",
6921
- runtimeTier: "none",
6922
- buildResolvers: ["vite"]
6923
- },
6924
- expoSms: {
6925
- specifier: "expo-sms",
6926
- stubFile: "expo-sms.ts",
6927
- runtimeTier: "none",
6928
- buildResolvers: ["vite"]
6929
- },
6930
- expoSqlite: {
6931
- specifier: "expo-sqlite",
6932
- stubFile: "expo-sqlite.ts",
6933
- runtimeTier: "none",
6934
- buildResolvers: ["vite", "dep-prebundle"]
6935
- },
6936
- expoSpeech: {
6937
- specifier: "expo-speech",
6938
- stubFile: "expo-speech.ts",
6939
- runtimeTier: "none",
6940
- buildResolvers: ["vite"]
6941
- },
6942
- expoStoreReview: {
6943
- specifier: "expo-store-review",
6944
- stubFile: "expo-store-review.ts",
6945
- runtimeTier: "none",
6946
- buildResolvers: ["vite"]
6947
- },
6948
- expoTrackingTransparency: {
6949
- specifier: "expo-tracking-transparency",
6950
- stubFile: "expo-tracking-transparency.ts",
6951
- runtimeTier: "none",
6952
- buildResolvers: ["vite"]
6953
- },
6954
- expoShareExtension: {
6955
- specifier: "expo-share-extension",
6956
- stubFile: "noop-sdks-extra/expo-share-extension.ts",
6957
- runtimeTier: "none",
6958
- buildResolvers: ["vite"]
6959
- },
6960
- expoHealthConnect: {
6961
- specifier: "expo-health-connect",
6962
- stubFile: "noop-sdks-extra/expo-health-connect.ts",
6963
- runtimeTier: "none",
6964
- buildResolvers: ["vite"]
6965
- },
6966
- expoInAppUpdates: {
6967
- specifier: "expo-in-app-updates",
6968
- stubFile: "noop-sdks-extra/expo-in-app-updates.ts",
6969
- runtimeTier: "none",
6970
- buildResolvers: ["vite"]
6971
- },
6972
- expoSuperwall: {
6973
- specifier: "expo-superwall",
6974
- stubFile: "noop-sdks-extra/expo-superwall.ts",
6975
- runtimeTier: "none",
6976
- buildResolvers: ["vite"]
6977
- },
6978
- communityCheckbox: {
6979
- specifier: "@react-native-community/checkbox",
6980
- stubFile: "react-native-community-checkbox.ts",
6981
- runtimeTier: "lazy",
6982
- buildResolvers: ["vite"]
6983
- },
6984
- reactNavigationNative: {
6985
- specifier: "@react-navigation/native",
6986
- stubFile: "react-navigation-native.tsx",
6987
- runtimeTier: "none",
6988
- buildResolvers: ["vite"]
6989
- }
6990
- };
6991
-
6992
- // ../peach-engine/src/metro-fingerprint.ts
6993
- var import_metro_production_bundle3 = require("peachsim/metro-production-bundle");
6994
- var import_react_native_host_modules = require("peachsim/react-native-host-modules");
6995
-
6996
- // ../peach-engine/src/stub-pattern-matcher.ts
6997
- function extractPackageFromPath(modulePath) {
6998
- let nodeModulesIndex = modulePath.lastIndexOf("/node_modules/");
6999
- let prefixLength = "/node_modules/".length;
7000
- if (nodeModulesIndex === -1) {
7001
- if (!modulePath.startsWith("node_modules/")) return null;
7002
- nodeModulesIndex = 0;
7003
- prefixLength = "node_modules/".length;
7004
- }
7005
- return packageNameAt(modulePath, nodeModulesIndex + prefixLength) || null;
7006
- }
7007
- function packageNameAt(modulePath, start) {
7008
- const firstSlash = modulePath.indexOf("/", start);
7009
- if (modulePath.startsWith("@", start)) {
7010
- if (firstSlash === -1) return null;
7011
- const secondSlash = modulePath.indexOf("/", firstSlash + 1);
7012
- return modulePath.slice(start, secondSlash === -1 ? void 0 : secondSlash);
7013
- }
7014
- return modulePath.slice(start, firstSlash === -1 ? void 0 : firstSlash);
7015
- }
7016
-
7017
- // cli/cloud-client.ts
7018
- init_backend_origin();
7019
-
7020
- // src/cloud-contract.ts
7021
- var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
7022
- var RNX_CLOUD_COMMAND_SCOPES = {
7023
- state: "read",
7024
- tree: "read",
7025
- query: "read",
7026
- resolve: "read",
7027
- screenshot: "read",
7028
- capture: "read",
7029
- captureRegions: "read",
7030
- memory: "read",
7031
- diagnostics: "read",
7032
- storageSnapshot: "read",
7033
- perform: "drive",
7034
- waitFor: "drive",
7035
- tap: "drive",
7036
- longPress: "drive",
7037
- settle: "drive",
7038
- openUrl: "drive",
7039
- setAppearance: "drive",
7040
- keyboard: "drive",
7041
- focus: "drive",
7042
- flowStatus: "drive",
7043
- reset: "reset",
7044
- camera: "media",
7045
- location: "media",
7046
- // string evaluation and arbitrary bridge calls are maestro's boundary: the
7047
- // customer sdk never carries this scope, and the service grants it only to
7048
- // the account api key caller. close rides along, since ending the page ends
7049
- // the sim and belongs to the sim's owner rather than any driver.
7050
- evaluate: "debug",
7051
- call: "debug",
7052
- close: "debug"
7053
- };
7054
- function scopeTableKeys() {
7055
- return Object.keys(RNX_CLOUD_COMMAND_SCOPES).filter(
7056
- (key) => Object.prototype.hasOwnProperty.call(RNX_CLOUD_COMMAND_SCOPES, key)
7057
- );
7058
- }
7059
- var RNX_CLOUD_COMMAND_TYPES = Object.freeze(scopeTableKeys());
7060
- var RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
7061
- function isRnxCloudCommandType(value) {
7062
- return RNX_CLOUD_COMMAND_TYPE_SET.has(value);
7063
- }
7064
- function rnxCloudCommandScope(type) {
7065
- return RNX_CLOUD_COMMAND_SCOPES[type];
7066
- }
7067
- var RNX_CLOUD_TOKEN_SCOPES = Object.freeze([
7068
- "read",
7069
- "drive",
7070
- "reset",
7071
- "media"
7072
- ]);
7073
- var RNX_CLOUD_ALL_COMMAND_SCOPES = Object.freeze(["read", "drive", "reset", "media", "debug"]);
7074
- function rnxCloudScopesAllowCommand(scopes, type) {
7075
- return scopes.includes(RNX_CLOUD_COMMAND_SCOPES[type]);
7076
- }
7077
-
7078
- // cli/cloud-client.ts
7079
- init_is_record();
7080
-
7081
- // src/metro-production-bundle.ts
7082
- init_bundleGlobalFooter();
7083
- var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
7084
- var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
7085
- var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
7086
- function detachRNXMetroSourceMapUrl(bundleText) {
7087
- const trimmedEnd = bundleText.trimEnd();
7088
- const commentStart = trimmedEnd.lastIndexOf("\n");
7089
- if (commentStart < 0 || !trimmedEnd.startsWith(RNXSIM_METRO_SOURCE_MAP_COMMENT, commentStart + 1)) {
7090
- return { source: bundleText, sourceMappingUrl: null };
7091
- }
7092
- const url = trimmedEnd.slice(commentStart + 1 + RNXSIM_METRO_SOURCE_MAP_COMMENT.length);
7093
- return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
7094
- }
7095
- function createRNXMetroModuleIdentityFooter(identity) {
7096
- const payload = JSON.stringify(identity).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
7097
- return `
7098
- ${RNXSIM_METRO_MODULE_PATHS_PREFIX}${payload};`;
7099
- }
7100
- function appendRNXMetroModuleIdentityFooter(bundleText, identity) {
7101
- const footer = createRNXMetroModuleIdentityFooter(identity);
7102
- const detached = detachRNXMetroSourceMapUrl(bundleText);
7103
- return detached.sourceMappingUrl === null ? bundleText + footer : `${detached.source}${footer}
7104
- ${RNXSIM_METRO_SOURCE_MAP_COMMENT}${detached.sourceMappingUrl}`;
7105
- }
7106
-
7107
- // cli/cloud-client.ts
7108
- init_public_brand();
7109
-
7110
- // src/home-paths.ts
7111
- var import_node_fs = __toESM(require("node:fs"), 1);
7112
- var import_node_os = require("node:os");
7113
- var import_node_path = __toESM(require("node:path"), 1);
7114
- var PEACH_HOME_ENV = "PEACH_HOME";
7115
- var ACTIVE_RUNTIME_FILE = "active";
7116
- var DAEMON_LOCKFILE = "daemon.json";
7117
- var DEV_BRIDGES_DIR = "dev-bridges";
7118
- var DAEMON_HEARTBEAT_STALE_MS = 3e4;
7119
- function rnxHomeDir() {
7120
- const override = process.env[PEACH_HOME_ENV];
7121
- if (override && override.length > 0) return import_node_path.default.resolve(override);
7122
- return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
7123
- }
7124
- function runtimesDir() {
7125
- return import_node_path.default.join(rnxHomeDir(), "runtimes");
7126
- }
7127
- function runtimeDir(version) {
7128
- return import_node_path.default.join(runtimesDir(), version);
7129
- }
7130
- function activeRuntimeFile() {
7131
- return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
7132
- }
7133
- function daemonLockfilePath() {
7134
- return import_node_path.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
7135
- }
7136
- function devBridgesDir() {
7137
- return import_node_path.default.join(rnxHomeDir(), DEV_BRIDGES_DIR);
7138
- }
7139
- function readActiveRuntime() {
7140
- try {
7141
- const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
7142
- return value.length > 0 ? value : null;
7143
- } catch {
7144
- return null;
7145
- }
7146
- }
7147
- var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
7148
- function readDaemonLockfile() {
7149
- try {
7150
- const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
7151
- try {
7152
- const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
7153
- const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
7154
- const raw = buf.subarray(0, bytesRead).toString("utf8");
7155
- const parsed = JSON.parse(raw);
7156
- if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number" && (parsed.servedRuntimes === void 0 || Array.isArray(parsed.servedRuntimes) && parsed.servedRuntimes.every((version) => typeof version === "string"))) {
7157
- return parsed;
7158
- }
7159
- return null;
7160
- } finally {
7161
- import_node_fs.default.closeSync(fd);
7162
- }
7163
- } catch {
7164
- return null;
7165
- }
7166
- }
7167
- function parseDevBridgeLockfile(raw) {
7168
- try {
7169
- const parsed = JSON.parse(raw);
7170
- if (parsed && parsed.schema === 1 && parsed.source === "vite-dev" && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.cwd === "string" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number" && (parsed.shellPort === void 0 || typeof parsed.shellPort === "number") && (parsed.servedRuntimes === void 0 || Array.isArray(parsed.servedRuntimes) && parsed.servedRuntimes.every((version) => typeof version === "string"))) {
7171
- return parsed;
7172
- }
7173
- return null;
7174
- } catch {
7175
- return null;
7176
- }
7177
- }
7178
- function readDevBridgeLockfiles() {
7179
- let entries;
7180
- try {
7181
- entries = import_node_fs.default.readdirSync(devBridgesDir(), { withFileTypes: true });
7182
- } catch {
7183
- return [];
7184
- }
7185
- const lockfiles = [];
7186
- for (const entry of entries) {
7187
- if (!entry.isFile() || !/^\d+\.json$/.test(entry.name)) continue;
7188
- try {
7189
- const filePath = import_node_path.default.join(devBridgesDir(), entry.name);
7190
- const fd = import_node_fs.default.openSync(filePath, "r");
7191
- try {
7192
- const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
7193
- const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
7194
- const lockfile = parseDevBridgeLockfile(
7195
- buf.subarray(0, bytesRead).toString("utf8")
7196
- );
7197
- if (lockfile && entry.name === `${lockfile.bridgePort}.json`) {
7198
- lockfiles.push(lockfile);
7199
- }
7200
- } finally {
7201
- import_node_fs.default.closeSync(fd);
7202
- }
7203
- } catch {
7204
- }
7205
- }
7206
- return lockfiles.sort((left, right) => left.bridgePort - right.bridgePort);
7207
- }
7208
- function isDaemonLockfileFresh(lock, now = Date.now()) {
7209
- if (!lock) return false;
7210
- if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
7211
- try {
7212
- process.kill(lock.pid, 0);
7213
- return true;
7214
- } catch {
7215
- return false;
7216
- }
7217
- }
7218
- function isDevBridgeLockfileFresh(lock, now = Date.now()) {
7219
- if (!lock) return false;
7220
- if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
7221
- try {
7222
- process.kill(lock.pid, 0);
7223
- return true;
7224
- } catch {
7225
- return false;
7226
- }
7227
- }
7228
-
7229
- // src/auth/shared-session.ts
7230
- init_public_brand();
7231
- var DEFAULT_ORIGIN = peachPublicBrand.origin;
7232
-
7233
- // cli/run-rnx.ts
7234
- var import_node_async_hooks = require("node:async_hooks");
7235
- var sinks = new import_node_async_hooks.AsyncLocalStorage();
7236
-
7237
- // cli/auth.ts
7238
- var CHOOSE_ACCOUNT_HINT = "this sign-in belongs to several accounts; run `peach login --account <name>` to choose the one to bill";
7239
-
7240
- // cli/cloud-session.ts
7241
- init_backend_origin();
7242
- init_is_record();
7243
- var CLOUD_SESSION_VERSION = 3;
7244
- var MAX_ENCODED_SESSION_BYTES = 32 * 1024;
7245
- var PEACH_CLOUD_SESSION_ENV = "PEACH_CLOUD_SESSION";
7246
- var RNX_SHELL_UPDATE_PREFIX = "__RNX_SHELL_UPDATE_V1__";
7247
- var RNX_SHELL_UPDATE_SET_PREFIX = `${RNX_SHELL_UPDATE_PREFIX}set:`;
7248
- var RNX_SHELL_UPDATE_UNSET = `${RNX_SHELL_UPDATE_PREFIX}unset`;
7249
- function normalizeCloudOrigin(source) {
7250
- let parsed;
7251
- try {
7252
- parsed = new URL(source);
7253
- } catch {
7254
- throw new Error(`invalid remote simulator origin: ${source}`);
7255
- }
7256
- if (parsed.protocol !== "https:" && parsed.protocol !== "http:" || parsed.username || parsed.password || parsed.pathname !== "/" || parsed.search || parsed.hash) {
7257
- throw new Error(`remote simulator origin must be an HTTP(S) origin: ${source}`);
7258
- }
7259
- if (parsed.protocol === "http:" && !isLoopbackHost(parsed.hostname)) {
7260
- throw new Error(`remote simulator origin requires HTTPS outside loopback: ${source}`);
7261
- }
7262
- return parsed.origin;
7263
- }
7264
- function createCloudSession(input) {
7265
- const boxId = input.boxId?.trim() ?? "";
7266
- const boxToken = input.boxToken ?? "";
7267
- if (boxId === "" !== (boxToken === "")) {
7268
- throw new Error("cloud session names a box with both its id and its token");
7269
- }
7270
- const session = {
7271
- version: CLOUD_SESSION_VERSION,
7272
- service: "sim",
7273
- simId: input.simId.trim(),
7274
- apiOrigin: normalizeCloudOrigin(input.apiOrigin.trim()),
7275
- claimId: input.claimId.trim(),
7276
- token: input.token,
7277
- ...input.streamUrl ? { streamUrl: input.streamUrl } : {},
7278
- ...input.platform ? { platform: input.platform } : {},
7279
- ...input.device?.trim() ? { device: input.device.trim() } : {},
7280
- ...input.artifact ? { artifact: input.artifact } : {},
7281
- ...boxId && boxToken ? { boxId, boxToken } : {}
7282
- };
7283
- if (!session.simId || !session.claimId || !session.token) {
7284
- throw new Error("cloud session requires a simulator, an origin, a claim, and a token");
7285
- }
7286
- return session;
7287
- }
7288
- function createCloudBoxSession(input) {
7289
- if (input.appFontsWireSha256 !== void 0 && !/^[a-f0-9]{64}$/.test(input.appFontsWireSha256))
7290
- throw new Error("cloud box session has an invalid app-font wire digest");
7291
- const session = {
7292
- version: CLOUD_SESSION_VERSION,
7293
- service: "box",
7294
- boxId: input.boxId.trim(),
7295
- boxToken: input.boxToken,
7296
- apiOrigin: normalizeCloudOrigin(input.apiOrigin.trim()),
7297
- ...input.platform ? { platform: input.platform } : {},
7298
- ...input.device?.trim() ? { device: input.device.trim() } : {},
7299
- ...input.artifact ? { artifact: input.artifact } : {},
7300
- ...input.appFontsWireSha256 !== void 0 ? { appFontsWireSha256: input.appFontsWireSha256 } : {}
7301
- };
7302
- if (!session.boxId || !session.boxToken) {
7303
- throw new Error("cloud box session requires a box, an origin, and a box token");
7304
- }
7305
- return session;
7306
- }
7307
- function parseCloudSession(encoded) {
7308
- const value = encoded.trim();
7309
- if (!value || value.length > MAX_ENCODED_SESSION_BYTES || !/^[A-Za-z0-9_-]+$/.test(value)) {
7310
- throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
7311
- }
7312
- let parsed;
7313
- try {
7314
- const bytes = Buffer.from(value, "base64url");
7315
- if (bytes.toString("base64url") !== value) {
7316
- throw new Error("non-canonical cloud session");
7317
- }
7318
- parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
7319
- } catch {
7320
- throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
7321
- }
7322
- if (!isRecord(parsed) || parsed.version !== CLOUD_SESSION_VERSION) {
7323
- throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
7324
- }
7325
- const apiOrigin = parsed.apiOrigin;
7326
- if (typeof apiOrigin !== "string") {
7327
- throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
7328
- }
7329
- const platform = parsed.platform === "ios" || parsed.platform === "android" ? parsed.platform : void 0;
7330
- const device = typeof parsed.device === "string" ? parsed.device : void 0;
7331
- const artifact = isRecord(parsed.artifact) && typeof parsed.artifact.sha256 === "string" ? {
7332
- sha256: parsed.artifact.sha256,
7333
- bytes: typeof parsed.artifact.bytes === "number" ? parsed.artifact.bytes : void 0
7334
- } : void 0;
7335
- const streamUrl = typeof parsed.streamUrl === "string" ? parsed.streamUrl : void 0;
7336
- const boxId = typeof parsed.boxId === "string" ? parsed.boxId : void 0;
7337
- const boxToken = typeof parsed.boxToken === "string" ? parsed.boxToken : void 0;
7338
- try {
7339
- if (parsed.service === "box") {
7340
- if (!boxId || !boxToken) throw new Error("unreadable cloud box session");
7341
- if (parsed.appFontsWireSha256 !== void 0 && typeof parsed.appFontsWireSha256 !== "string")
7342
- throw new Error("unreadable app-font wire digest");
7343
- return createCloudBoxSession({
7344
- boxId,
7345
- boxToken,
7346
- apiOrigin,
7347
- platform,
7348
- device,
7349
- artifact,
7350
- appFontsWireSha256: parsed.appFontsWireSha256
7351
- });
7352
- }
7353
- const simId = parsed.simId;
7354
- const claimId = parsed.claimId;
7355
- const token = parsed.token;
7356
- if (parsed.service !== "sim" || typeof simId !== "string" || typeof claimId !== "string" || typeof token !== "string") {
7357
- throw new Error("unreadable cloud session");
7358
- }
7359
- return createCloudSession({
7360
- simId,
7361
- apiOrigin,
7362
- claimId,
7363
- token,
7364
- streamUrl,
7365
- platform,
7366
- device,
7367
- artifact,
7368
- boxId,
7369
- boxToken
7370
- });
7371
- } catch {
7372
- throw new Error(`${PEACH_CLOUD_SESSION_ENV} is invalid`);
7373
- }
7374
- }
7375
- function readCloudSession(environment = process.env) {
7376
- const encoded = environment[PEACH_CLOUD_SESSION_ENV];
7377
- return encoded?.trim() ? parseCloudSession(encoded) : null;
7378
- }
7379
6437
 
7380
6438
  // cli/cloud-client.ts
7381
6439
  init_detect();
@@ -7592,13 +6650,13 @@ function createCloudBridgeForParsed(parsed) {
7592
6650
  }
7593
6651
 
7594
6652
  // cli/current-sim.ts
7595
- var import_fs2 = require("fs");
6653
+ var import_fs3 = require("fs");
7596
6654
  var import_os = require("os");
7597
- var import_path = require("path");
6655
+ var import_path2 = require("path");
7598
6656
 
7599
6657
  // cli/parent-pid.ts
7600
6658
  var import_child_process = require("child_process");
7601
- var import_fs = require("fs");
6659
+ var import_fs2 = require("fs");
7602
6660
  var import_module = require("module");
7603
6661
  var cached = null;
7604
6662
  var cachedComm = null;
@@ -7631,7 +6689,7 @@ function buildComm() {
7631
6689
  if (process.platform === "linux") {
7632
6690
  return (pid) => {
7633
6691
  try {
7634
- return (0, import_fs.readFileSync)(`/proc/${pid}/comm`, "utf8").trim() || null;
6692
+ return (0, import_fs2.readFileSync)(`/proc/${pid}/comm`, "utf8").trim() || null;
7635
6693
  } catch {
7636
6694
  return null;
7637
6695
  }
@@ -7660,7 +6718,7 @@ function buildPgid() {
7660
6718
  if (process.platform === "linux") {
7661
6719
  return (pid) => {
7662
6720
  try {
7663
- const raw = (0, import_fs.readFileSync)(`/proc/${pid}/stat`, "utf8");
6721
+ const raw = (0, import_fs2.readFileSync)(`/proc/${pid}/stat`, "utf8");
7664
6722
  const end = raw.lastIndexOf(")");
7665
6723
  if (end < 0) return null;
7666
6724
  const rest = raw.slice(end + 1).trim().split(/\s+/);
@@ -7713,7 +6771,7 @@ function readProcessTable() {
7713
6771
  function buildLinux() {
7714
6772
  return (pid) => {
7715
6773
  try {
7716
- const raw = (0, import_fs.readFileSync)(`/proc/${pid}/stat`, "utf8");
6774
+ const raw = (0, import_fs2.readFileSync)(`/proc/${pid}/stat`, "utf8");
7717
6775
  const end = raw.lastIndexOf(")");
7718
6776
  if (end < 0) return null;
7719
6777
  const rest = raw.slice(end + 1).trim().split(/\s+/);
@@ -7912,30 +6970,31 @@ function getOwnerProcessGroupId(owner = getStableOwnerPid()) {
7912
6970
  function getCurrentSimPath() {
7913
6971
  const envPath = process.env[CURRENT_SIM_PATH_ENV] || process.env[LEGACY_CURRENT_SIM_PATH_ENV];
7914
6972
  if (envPath) {
7915
- return (0, import_path.resolve)(envPath);
6973
+ return (0, import_path2.resolve)(envPath);
7916
6974
  }
7917
6975
  const key = getCliIdentityKey();
7918
- return (0, import_path.join)((0, import_os.tmpdir)(), `peach-current-sim-${key}.json`);
6976
+ return (0, import_path2.join)((0, import_os.tmpdir)(), `peach-current-sim-${key}.json`);
7919
6977
  }
7920
6978
  function legacyCloudCredentialDirectory(filepath) {
7921
- return (0, import_path.join)((0, import_path.dirname)(filepath), `${(0, import_path.basename)(filepath)}.credentials`);
6979
+ return (0, import_path2.join)((0, import_path2.dirname)(filepath), `${(0, import_path2.basename)(filepath)}.credentials`);
7922
6980
  }
7923
6981
  function readCurrentTarget() {
7924
6982
  const filepath = getCurrentSimPath();
7925
- (0, import_fs2.rmSync)(legacyCloudCredentialDirectory(filepath), { recursive: true, force: true });
7926
- if (!(0, import_fs2.existsSync)(filepath)) return null;
6983
+ (0, import_fs3.rmSync)(legacyCloudCredentialDirectory(filepath), { recursive: true, force: true });
6984
+ if (!(0, import_fs3.existsSync)(filepath)) return null;
7927
6985
  try {
7928
- const parsed = JSON.parse((0, import_fs2.readFileSync)(filepath, "utf8"));
6986
+ const parsed = JSON.parse((0, import_fs3.readFileSync)(filepath, "utf8"));
7929
6987
  if (parsed === null || typeof parsed !== "object") {
7930
- (0, import_fs2.rmSync)(filepath, { force: true });
6988
+ (0, import_fs3.rmSync)(filepath, { force: true });
7931
6989
  return null;
7932
6990
  }
6991
+ if (Reflect.get(parsed, "pendingOpen") === true) return null;
7933
6992
  const version = Reflect.get(parsed, "version");
7934
6993
  const plane = Reflect.get(parsed, "plane");
7935
6994
  const simId = Reflect.get(parsed, "simId");
7936
6995
  const updatedAt = Reflect.get(parsed, "updatedAt");
7937
6996
  if (version !== 1 && version !== CURRENT_SIM_VERSION || version === CURRENT_SIM_VERSION && plane !== "local" || typeof simId !== "string" || !simId.trim() || typeof updatedAt !== "string") {
7938
- (0, import_fs2.rmSync)(filepath, { force: true });
6997
+ (0, import_fs3.rmSync)(filepath, { force: true });
7939
6998
  return null;
7940
6999
  }
7941
7000
  const target = {
@@ -7947,7 +7006,7 @@ function readCurrentTarget() {
7947
7006
  if (version === 1) writeSecureJsonAtomic(filepath, target);
7948
7007
  return target;
7949
7008
  } catch {
7950
- (0, import_fs2.rmSync)(filepath, { force: true });
7009
+ (0, import_fs3.rmSync)(filepath, { force: true });
7951
7010
  return null;
7952
7011
  }
7953
7012
  }
@@ -7964,6 +7023,22 @@ function saveCurrentSimId(simId) {
7964
7023
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
7965
7024
  });
7966
7025
  }
7026
+ function assertNoPendingOpen() {
7027
+ if (!isOpenPending()) return;
7028
+ throw new Error(
7029
+ "the last `peach open` did not pin a sim, so this command would land on whichever tab is connected. run `peach open` again, `peach use <sim>`, or pass --sim <id>"
7030
+ );
7031
+ }
7032
+ function isOpenPending() {
7033
+ const filepath = getCurrentSimPath();
7034
+ if (!(0, import_fs3.existsSync)(filepath)) return false;
7035
+ try {
7036
+ const parsed = JSON.parse((0, import_fs3.readFileSync)(filepath, "utf8"));
7037
+ return parsed !== null && typeof parsed === "object" && Reflect.get(parsed, "pendingOpen") === true;
7038
+ } catch {
7039
+ return false;
7040
+ }
7041
+ }
7967
7042
 
7968
7043
  // cli/ws-bridge.ts
7969
7044
  var import_node_fs6 = __toESM(require("node:fs"), 1);
@@ -8011,9 +7086,39 @@ function resolveSootsimBridgePort(input = {}) {
8011
7086
  var HOSTED_SHELL_PATH = new RegExp(`^(?:${PEACH_SIMULATOR_PATH}|/sootsim)(?:/|$)`);
8012
7087
  var AUTOMATION_SIM_IDLE_REAP_TTL_MS = 5 * 6e4;
8013
7088
 
7089
+ // src/bridge-contract.ts
7090
+ var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
7091
+ var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
7092
+ function readyProbeContentBasis(probe) {
7093
+ if (probe.paintedAppContent === true) return "paintedAppContent";
7094
+ if ((probe.browserSurfaceCount ?? 0) > 0) return "browserSurface";
7095
+ if (probe.liveFrameActive) return "liveFrame";
7096
+ if (probe.targets > 0) return "targets";
7097
+ if (probe.flag === true && probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR)
7098
+ return "nodeFloor";
7099
+ return "";
7100
+ }
7101
+ var WRITE_COMMAND_TYPES = /* @__PURE__ */ new Set([
7102
+ "tap",
7103
+ "keyboard",
7104
+ "longPress",
7105
+ "perform",
7106
+ "reset",
7107
+ "camera"
7108
+ ]);
7109
+ function commandWritesSim(msg) {
7110
+ if (typeof msg.type !== "string") return false;
7111
+ if (msg.acquireLock === true) return true;
7112
+ if (msg.readOnly === true) return false;
7113
+ return WRITE_COMMAND_TYPES.has(msg.type);
7114
+ }
7115
+
8014
7116
  // src/cli-constants.ts
8015
7117
  var DEFAULT_SOOTSIM_SHELL_URL = "http://localhost:5173/";
8016
7118
 
7119
+ // cli/ws-bridge.ts
7120
+ init_home_paths();
7121
+
8017
7122
  // cli/pause-aware-timeout.ts
8018
7123
  var import_node_child_process = require("node:child_process");
8019
7124
  var import_node_fs5 = require("node:fs");
@@ -8415,6 +7520,9 @@ function createBridge(wsPort, opts = {}) {
8415
7520
  };
8416
7521
  const sentSimId = opts.simIdSource === "flag" ? opts.simId : readCurrentSimId() ?? opts.simId;
8417
7522
  const targetedSimId = typeof cmd.simId === "string" && cmd.simId ? cmd.simId : sentSimId;
7523
+ if (!sentSimId && !cmd.simId && (commandWritesSim(cmd) || cmd.type === "close")) {
7524
+ assertNoPendingOpen();
7525
+ }
8418
7526
  try {
8419
7527
  if (targetedSimId && cmd.type !== "bridge:list-sims" && !lineageBySimId.has(targetedSimId)) {
8420
7528
  let lookup = lineageLookupBySimId.get(targetedSimId);
@@ -8654,19 +7762,6 @@ async function resolveBridgePortForSim(parsed) {
8654
7762
  return owners[0].port;
8655
7763
  }
8656
7764
 
8657
- // src/bridge-contract.ts
8658
- var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
8659
- var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
8660
- function readyProbeContentBasis(probe) {
8661
- if (probe.paintedAppContent === true) return "paintedAppContent";
8662
- if ((probe.browserSurfaceCount ?? 0) > 0) return "browserSurface";
8663
- if (probe.liveFrameActive) return "liveFrame";
8664
- if (probe.targets > 0) return "targets";
8665
- if (probe.flag === true && probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR)
8666
- return "nodeFloor";
8667
- return "";
8668
- }
8669
-
8670
7765
  // src/bridge-contract-input.ts
8671
7766
  init_is_record();
8672
7767
  var SEMANTIC_WAIT_MAX_TIMEOUT_MS = 3e4;
@@ -11506,11 +10601,12 @@ function launchRnxDesktop(bundleUrl, appName) {
11506
10601
  }
11507
10602
 
11508
10603
  // src/vite-plugin-one.ts
10604
+ init_home_paths();
11509
10605
  init_replacement_module_handler();
11510
10606
 
11511
10607
  // src/installed-package-versions.ts
11512
- var import_fs3 = __toESM(require("fs"), 1);
11513
- var import_path2 = __toESM(require("path"), 1);
10608
+ var import_fs4 = __toESM(require("fs"), 1);
10609
+ var import_path3 = __toESM(require("path"), 1);
11514
10610
 
11515
10611
  // ../peach-compat/src/lazy-stub-patterns.ts
11516
10612
  var LAZY_STUB_PATTERNS = [
@@ -11537,7 +10633,6 @@ var LAZY_STUB_PATTERNS = [
11537
10633
  "@giphy/react-native-sdk",
11538
10634
  "@google/react-native-make-payment",
11539
10635
  "@googlemaps/react-native-navigation-sdk",
11540
- "@invertase/react-native-apple-authentication",
11541
10636
  "@iterable/expo-plugin",
11542
10637
  "@kingstinct/react-native-healthkit",
11543
10638
  "@livekit/react-native",
@@ -13497,43 +12592,971 @@ var NATIVE_RUNTIME_PACKAGE_NAMES = [
13497
12592
  "react-native-sectioned-slider"
13498
12593
  ];
13499
12594
 
12595
+ // ../peach-compat/src/wrapper-real-packages.ts
12596
+ var SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES = {
12597
+ expoUiConfirmationDialog: {
12598
+ specifier: "@peach-internal/expo-ui-confirmation-dialog",
12599
+ packageName: "@expo/ui/src/swift-ui/ConfirmationDialog/index.tsx"
12600
+ },
12601
+ expoUiShareLink: {
12602
+ specifier: "@peach-internal/expo-ui-share-link",
12603
+ packageName: "@expo/ui/src/swift-ui/ShareLink/index.tsx"
12604
+ },
12605
+ expoUiNamespace: {
12606
+ specifier: "@peach-internal/expo-ui-namespace",
12607
+ packageName: "@expo/ui/src/swift-ui/Namespace.tsx"
12608
+ },
12609
+ expoUiHost: {
12610
+ specifier: "@peach-internal/expo-ui-host",
12611
+ packageName: "@expo/ui/src/swift-ui/Host/index.tsx"
12612
+ },
12613
+ expoUiBottomSheet: {
12614
+ specifier: "@peach-internal/expo-ui-bottom-sheet",
12615
+ packageName: "@expo/ui/src/swift-ui/BottomSheet/index.tsx"
12616
+ },
12617
+ expoUiTabView: {
12618
+ specifier: "@peach-internal/expo-ui-tab-view",
12619
+ packageName: "@expo/ui/src/swift-ui/TabView/index.tsx"
12620
+ },
12621
+ expoUiForm: {
12622
+ specifier: "@peach-internal/expo-ui-form",
12623
+ packageName: "@expo/ui/src/swift-ui/Form/index.tsx"
12624
+ },
12625
+ expoUiSection: {
12626
+ specifier: "@peach-internal/expo-ui-section",
12627
+ packageName: "@expo/ui/src/swift-ui/Section/index.tsx"
12628
+ },
12629
+ expoUiAccessoryWidgetBackground: {
12630
+ specifier: "@peach-internal/expo-ui-accessory-widget-background",
12631
+ packageName: "@expo/ui/src/swift-ui/AccessoryWidgetBackground/index.tsx"
12632
+ },
12633
+ expoUiGlassEffectContainer: {
12634
+ specifier: "@peach-internal/expo-ui-glass-effect-container",
12635
+ packageName: "@expo/ui/src/swift-ui/GlassEffectContainer/index.tsx"
12636
+ },
12637
+ expoUiContentUnavailableView: {
12638
+ specifier: "@peach-internal/expo-ui-content-unavailable-view",
12639
+ packageName: "@expo/ui/src/swift-ui/ContentUnavailableView/index.tsx"
12640
+ },
12641
+ expoUiColorPicker: {
12642
+ specifier: "@peach-internal/expo-ui-color-picker",
12643
+ packageName: "@expo/ui/src/swift-ui/ColorPicker/index.tsx"
12644
+ },
12645
+ expoUiProgressView: {
12646
+ specifier: "@peach-internal/expo-ui-progress-view",
12647
+ packageName: "@expo/ui/src/swift-ui/ProgressView/index.tsx"
12648
+ },
12649
+ expoUiToggle: {
12650
+ specifier: "@peach-internal/expo-ui-toggle",
12651
+ packageName: "@expo/ui/src/swift-ui/Toggle/index.tsx"
12652
+ },
12653
+ expoUiPicker: {
12654
+ specifier: "@peach-internal/expo-ui-picker",
12655
+ packageName: "@expo/ui/src/swift-ui/Picker/index.tsx"
12656
+ },
12657
+ expoUiDivider: {
12658
+ specifier: "@peach-internal/expo-ui-divider",
12659
+ packageName: "@expo/ui/src/swift-ui/Divider/index.tsx"
12660
+ },
12661
+ expoUiText: {
12662
+ specifier: "@peach-internal/expo-ui-text",
12663
+ packageName: "@expo/ui/src/swift-ui/Text/index.tsx"
12664
+ },
12665
+ expoUiMenu: {
12666
+ specifier: "@peach-internal/expo-ui-menu",
12667
+ packageName: "@expo/ui/src/swift-ui/Menu/index.tsx"
12668
+ },
12669
+ expoUiImage: {
12670
+ specifier: "@peach-internal/expo-ui-image",
12671
+ packageName: "@expo/ui/src/swift-ui/Image/index.tsx"
12672
+ },
12673
+ expoUiAlert: {
12674
+ specifier: "@peach-internal/expo-ui-alert",
12675
+ packageName: "@expo/ui/src/swift-ui/Alert/index.tsx"
12676
+ },
12677
+ expoUiPopover: {
12678
+ specifier: "@peach-internal/expo-ui-popover",
12679
+ packageName: "@expo/ui/src/swift-ui/Popover/index.tsx"
12680
+ },
12681
+ expoUiRNHostView: {
12682
+ specifier: "@peach-internal/expo-ui-rnhost-view",
12683
+ packageName: "@expo/ui/src/swift-ui/RNHostView.tsx"
12684
+ },
12685
+ expoUiOverlay: {
12686
+ specifier: "@peach-internal/expo-ui-overlay",
12687
+ packageName: "@expo/ui/src/swift-ui/Overlay/index.tsx"
12688
+ },
12689
+ expoUiBackground: {
12690
+ specifier: "@peach-internal/expo-ui-background",
12691
+ packageName: "@expo/ui/src/swift-ui/Background/index.tsx"
12692
+ },
12693
+ expoUiMask: {
12694
+ specifier: "@peach-internal/expo-ui-mask",
12695
+ packageName: "@expo/ui/src/swift-ui/Mask/index.tsx"
12696
+ },
12697
+ expoUiShapes: {
12698
+ specifier: "@peach-internal/expo-ui-shapes",
12699
+ packageName: "@expo/ui/src/swift-ui/Shapes/index.tsx"
12700
+ },
12701
+ expoUiControlGroup: {
12702
+ specifier: "@peach-internal/expo-ui-control-group",
12703
+ packageName: "@expo/ui/src/swift-ui/ControlGroup/index.tsx"
12704
+ },
12705
+ expoUiScrollView: {
12706
+ specifier: "@peach-internal/expo-ui-scroll-view",
12707
+ packageName: "@expo/ui/src/swift-ui/ScrollView/index.tsx"
12708
+ },
12709
+ expoUiGrid: {
12710
+ specifier: "@peach-internal/expo-ui-grid",
12711
+ packageName: "@expo/ui/src/swift-ui/Grid/index.tsx"
12712
+ },
12713
+ expoUiGroup: {
12714
+ specifier: "@peach-internal/expo-ui-group",
12715
+ packageName: "@expo/ui/src/swift-ui/Group/index.tsx"
12716
+ },
12717
+ expoUiSpacer: {
12718
+ specifier: "@peach-internal/expo-ui-spacer",
12719
+ packageName: "@expo/ui/src/swift-ui/Spacer/index.tsx"
12720
+ },
12721
+ expoUiLazyHStack: {
12722
+ specifier: "@peach-internal/expo-ui-lazy-hstack",
12723
+ packageName: "@expo/ui/src/swift-ui/LazyHStack/index.tsx"
12724
+ },
12725
+ expoUiLazyVStack: {
12726
+ specifier: "@peach-internal/expo-ui-lazy-vstack",
12727
+ packageName: "@expo/ui/src/swift-ui/LazyVStack/index.tsx"
12728
+ },
12729
+ expoUiHStack: {
12730
+ specifier: "@peach-internal/expo-ui-hstack",
12731
+ packageName: "@expo/ui/src/swift-ui/HStack/index.tsx"
12732
+ },
12733
+ expoUiVStack: {
12734
+ specifier: "@peach-internal/expo-ui-vstack",
12735
+ packageName: "@expo/ui/src/swift-ui/VStack/index.tsx"
12736
+ },
12737
+ expoUiZStack: {
12738
+ specifier: "@peach-internal/expo-ui-zstack",
12739
+ packageName: "@expo/ui/src/swift-ui/ZStack/index.tsx"
12740
+ },
12741
+ expoUiButton: {
12742
+ specifier: "@peach-internal/expo-ui-button",
12743
+ packageName: "@expo/ui/src/swift-ui/Button/index.tsx"
12744
+ },
12745
+ expoUiDatePicker: {
12746
+ specifier: "@peach-internal/expo-ui-date-picker",
12747
+ packageName: "@expo/ui/src/swift-ui/DatePicker/index.tsx"
12748
+ },
12749
+ expoUiSlider: {
12750
+ specifier: "@peach-internal/expo-ui-slider",
12751
+ packageName: "@expo/ui/src/swift-ui/Slider/index.tsx"
12752
+ },
12753
+ expoUiStepper: {
12754
+ specifier: "@peach-internal/expo-ui-stepper",
12755
+ packageName: "@expo/ui/src/swift-ui/Stepper/index.tsx"
12756
+ },
12757
+ expoUiLink: {
12758
+ specifier: "@peach-internal/expo-ui-link",
12759
+ packageName: "@expo/ui/src/swift-ui/Link/index.tsx"
12760
+ },
12761
+ expoUiAnimationConstants: {
12762
+ specifier: "@peach-internal/expo-ui-animation-constants",
12763
+ packageName: "@expo/ui/build/swift-ui/modifiers/animation/constants.js"
12764
+ },
12765
+ expoUiWithAnimation: {
12766
+ specifier: "@peach-internal/expo-ui-with-animation",
12767
+ packageName: "@expo/ui/build/swift-ui/withAnimation.js"
12768
+ },
12769
+ expoUiNativeState: {
12770
+ specifier: "@peach-internal/expo-ui-native-state",
12771
+ packageName: "@expo/ui/build/State/index.js"
12772
+ },
12773
+ expoUiSyncToggle: {
12774
+ specifier: "@peach-internal/expo-ui-sync-toggle",
12775
+ packageName: "@expo/ui/build/swift-ui/SyncToggle/index.js"
12776
+ },
12777
+ expoUiTextField: {
12778
+ specifier: "@peach-internal/expo-ui-text-field",
12779
+ packageName: "@expo/ui/src/swift-ui/TextField/index.tsx"
12780
+ },
12781
+ expoUiSecureField: {
12782
+ specifier: "@peach-internal/expo-ui-secure-field",
12783
+ packageName: "@expo/ui/src/swift-ui/SecureField/index.tsx"
12784
+ },
12785
+ expoUiArrangementView: {
12786
+ specifier: "@peach-internal/expo-ui-arrangement-view",
12787
+ packageName: "@expo/ui/src/swift-ui/ArrangementView/index.tsx"
12788
+ },
12789
+ expoUiLazyHStackForEach: {
12790
+ specifier: "@peach-internal/expo-ui-lazy-hstack-for-each",
12791
+ packageName: "@expo/ui/src/swift-ui/LazyHStack/index.tsx"
12792
+ },
12793
+ expoUiLazyVStackForEach: {
12794
+ specifier: "@peach-internal/expo-ui-lazy-vstack-for-each",
12795
+ packageName: "@expo/ui/src/swift-ui/LazyVStack/index.tsx"
12796
+ },
12797
+ expoUiNavigationDestination: {
12798
+ specifier: "@peach-internal/expo-ui-navigation-destination",
12799
+ packageName: "@expo/ui/src/swift-ui/NavigationDestination/index.tsx"
12800
+ },
12801
+ expoUiNavigationLink: {
12802
+ specifier: "@peach-internal/expo-ui-navigation-link",
12803
+ packageName: "@expo/ui/src/swift-ui/NavigationLink/index.tsx"
12804
+ },
12805
+ expoUiNavigationStack: {
12806
+ specifier: "@peach-internal/expo-ui-navigation-stack",
12807
+ packageName: "@expo/ui/src/swift-ui/NavigationStack/index.tsx"
12808
+ },
12809
+ expoUiNavigationSplitView: {
12810
+ specifier: "@peach-internal/expo-ui-navigation-split-view",
12811
+ packageName: "@expo/ui/src/swift-ui/NavigationSplitView/index.tsx"
12812
+ },
12813
+ expoUiToolbar: {
12814
+ specifier: "@peach-internal/expo-ui-toolbar",
12815
+ packageName: "@expo/ui/src/swift-ui/Toolbar/index.tsx"
12816
+ },
12817
+ expoUiList: {
12818
+ specifier: "@peach-internal/expo-ui-list",
12819
+ packageName: "@expo/ui/src/swift-ui/List/index.tsx"
12820
+ },
12821
+ expoUiDisclosureGroup: {
12822
+ specifier: "@peach-internal/expo-ui-disclosure-group",
12823
+ packageName: "@expo/ui/src/swift-ui/DisclosureGroup/index.tsx"
12824
+ },
12825
+ expoUiGauge: {
12826
+ specifier: "@peach-internal/expo-ui-gauge",
12827
+ packageName: "@expo/ui/src/swift-ui/Gauge/index.tsx"
12828
+ },
12829
+ expoUiLabeledContent: {
12830
+ specifier: "@peach-internal/expo-ui-labeled-content",
12831
+ packageName: "@expo/ui/src/swift-ui/LabeledContent/index.tsx"
12832
+ },
12833
+ expoUiLabel: {
12834
+ specifier: "@peach-internal/expo-ui-label",
12835
+ packageName: "@expo/ui/src/swift-ui/Label/index.tsx"
12836
+ },
12837
+ expoCodedError: {
12838
+ specifier: "@peach-internal/expo-coded-error",
12839
+ packageName: "expo-modules-core/build/errors/CodedError.js"
12840
+ },
12841
+ expoUnavailabilityError: {
12842
+ specifier: "@peach-internal/expo-unavailability-error",
12843
+ packageName: "expo-modules-core/build/errors/UnavailabilityError.js"
12844
+ },
12845
+ expoPlatform: {
12846
+ specifier: "@peach-internal/expo-platform",
12847
+ packageName: "expo-modules-core/build/Platform.js"
12848
+ },
12849
+ expoSharedObjectHook: {
12850
+ specifier: "@peach-internal/expo-shared-object-hook",
12851
+ packageName: "expo-modules-core/build/hooks/useReleasingSharedObject.js"
12852
+ },
12853
+ expoSharedObjectLifecycleHook: {
12854
+ specifier: "@peach-internal/expo-shared-object-lifecycle-hook",
12855
+ packageName: "expo-modules-core/build/hooks/useReleasingSharedObjectWithLifecycle.js"
12856
+ },
12857
+ expoApplication: {
12858
+ specifier: "@sootsim-internal/expo-application-real",
12859
+ packageName: "expo-application"
12860
+ },
12861
+ expoBackgroundFetch: {
12862
+ specifier: "@sootsim-internal/expo-background-fetch-real",
12863
+ packageName: "expo-background-fetch"
12864
+ },
12865
+ expoBackgroundTask: {
12866
+ specifier: "@sootsim-internal/expo-background-task-real",
12867
+ packageName: "expo-background-task"
12868
+ },
12869
+ expoSensors: {
12870
+ specifier: "@sootsim-internal/expo-sensors-real",
12871
+ packageName: "expo-sensors"
12872
+ },
12873
+ expoBattery: {
12874
+ specifier: "@sootsim-internal/expo-battery-real",
12875
+ packageName: "expo-battery"
12876
+ },
12877
+ expoBrightness: {
12878
+ specifier: "@sootsim-internal/expo-brightness-real",
12879
+ packageName: "expo-brightness"
12880
+ },
12881
+ expoConstants: {
12882
+ specifier: "@sootsim-internal/expo-constants-real",
12883
+ packageName: "expo-constants"
12884
+ },
12885
+ expoCalendar: {
12886
+ specifier: "@sootsim-internal/expo-calendar-real",
12887
+ packageName: "expo-calendar"
12888
+ },
12889
+ expoCalendarLegacy: {
12890
+ specifier: "@sootsim-internal/expo-calendar-legacy-real",
12891
+ // the package's own `./legacy` export, not a hardcoded `src/legacy/...`
12892
+ // path — this follows wherever upstream points the subpath, in every
12893
+ // version that has one. versions without it never import the legacy
12894
+ // stub, so the alias just goes unused there.
12895
+ packageName: "expo-calendar/legacy"
12896
+ },
12897
+ expoCellular: {
12898
+ specifier: "@sootsim-internal/expo-cellular-real",
12899
+ packageName: "expo-cellular"
12900
+ },
12901
+ expoContactsContacts: {
12902
+ specifier: "@sootsim-internal/expo-contacts-contacts",
12903
+ // sdk 57 split Contacts.ts into src/index.ts + legacy/ + next/
12904
+ packageName: "expo-contacts/src/index.ts"
12905
+ },
12906
+ expoContactsContactAccessButton: {
12907
+ specifier: "@sootsim-internal/expo-contacts-contact-access-button",
12908
+ packageName: "expo-contacts/src/ContactAccessButton.tsx"
12909
+ },
12910
+ expoContactsLegacy: {
12911
+ specifier: "@sootsim-internal/expo-contacts-legacy-real",
12912
+ // same as expoCalendarLegacy: the public `./legacy` export, not a src path.
12913
+ packageName: "expo-contacts/legacy"
12914
+ },
12915
+ expoInsights: {
12916
+ specifier: "@sootsim-internal/expo-insights-real",
12917
+ packageName: "expo-insights"
12918
+ },
12919
+ expoIntentLauncher: {
12920
+ specifier: "@sootsim-internal/expo-intent-launcher-real",
12921
+ packageName: "expo-intent-launcher"
12922
+ },
12923
+ expoMailComposer: {
12924
+ specifier: "@sootsim-internal/expo-mail-composer-real",
12925
+ packageName: "expo-mail-composer"
12926
+ },
12927
+ expoNetwork: {
12928
+ specifier: "@sootsim-internal/expo-network-real",
12929
+ packageName: "expo-network"
12930
+ },
12931
+ expoPrint: {
12932
+ specifier: "@sootsim-internal/expo-print-real",
12933
+ packageName: "expo-print"
12934
+ },
12935
+ expoScreenCapture: {
12936
+ specifier: "@sootsim-internal/expo-screen-capture-real",
12937
+ packageName: "expo-screen-capture"
12938
+ },
12939
+ expoScreenOrientation: {
12940
+ specifier: "@sootsim-internal/expo-screen-orientation-real",
12941
+ packageName: "expo-screen-orientation"
12942
+ },
12943
+ expoQuickActions: {
12944
+ specifier: "@sootsim-internal/expo-quick-actions-real",
12945
+ packageName: "expo-quick-actions/build/index.js"
12946
+ },
12947
+ expoSecureStore: {
12948
+ specifier: "@sootsim-internal/expo-secure-store-real",
12949
+ packageName: "expo-secure-store"
12950
+ },
12951
+ expoSplashScreen: {
12952
+ specifier: "@sootsim-internal/expo-splash-screen-real",
12953
+ packageName: "expo-splash-screen"
12954
+ },
12955
+ expoSqlite: {
12956
+ specifier: "@sootsim-internal/expo-sqlite-real",
12957
+ packageName: "expo-sqlite"
12958
+ },
12959
+ expoLinearGradient: {
12960
+ specifier: "@sootsim-internal/expo-linear-gradient-real",
12961
+ packageName: "expo-linear-gradient"
12962
+ },
12963
+ expoBlur: {
12964
+ specifier: "@sootsim-internal/expo-blur-real",
12965
+ packageName: "expo-blur"
12966
+ },
12967
+ expoSymbols: {
12968
+ specifier: "@sootsim-internal/expo-symbols-real",
12969
+ packageName: "expo-symbols"
12970
+ },
12971
+ communityCheckbox: {
12972
+ specifier: "@sootsim-internal/react-native-community-checkbox-real",
12973
+ packageName: "@react-native-community/checkbox/dist/js/CheckBox.ios.js"
12974
+ },
12975
+ reactNativeMaskedView: {
12976
+ specifier: "@sootsim-internal/masked-view-real",
12977
+ packageName: "@react-native-masked-view/masked-view"
12978
+ },
12979
+ expoSharing: {
12980
+ specifier: "@sootsim-internal/expo-sharing-real",
12981
+ packageName: "expo-sharing"
12982
+ },
12983
+ expoSms: {
12984
+ specifier: "@sootsim-internal/expo-sms-real",
12985
+ packageName: "expo-sms"
12986
+ },
12987
+ expoSpeech: {
12988
+ specifier: "@sootsim-internal/expo-speech-real",
12989
+ packageName: "expo-speech"
12990
+ },
12991
+ expoStoreReview: {
12992
+ specifier: "@sootsim-internal/expo-store-review-real",
12993
+ packageName: "expo-store-review"
12994
+ },
12995
+ expoTaskManager: {
12996
+ specifier: "@sootsim-internal/expo-task-manager-real",
12997
+ packageName: "expo-task-manager"
12998
+ },
12999
+ expoTrackingTransparency: {
13000
+ specifier: "@sootsim-internal/expo-tracking-transparency-real",
13001
+ packageName: "expo-tracking-transparency"
13002
+ },
13003
+ expoVideoThumbnails: {
13004
+ specifier: "@sootsim-internal/expo-video-thumbnails-real",
13005
+ packageName: "expo-video-thumbnails"
13006
+ },
13007
+ googleSignin: {
13008
+ specifier: "@sootsim-internal/react-native-google-signin-real",
13009
+ packageName: "@react-native-google-signin/google-signin"
13010
+ },
13011
+ reactNativeHapticFeedback: {
13012
+ specifier: "@sootsim-internal/react-native-haptic-feedback-real",
13013
+ packageName: "react-native-haptic-feedback"
13014
+ },
13015
+ reactNativeSegmentedControl: {
13016
+ specifier: "@sootsim-internal/react-native-segmented-control-real",
13017
+ packageName: "@react-native-segmented-control/segmented-control/js/SegmentedControl.ios.js"
13018
+ },
13019
+ reactNativeUitextview: {
13020
+ specifier: "@sootsim-internal/react-native-uitextview-real",
13021
+ packageName: "react-native-uitextview"
13022
+ },
13023
+ reactNativeWorkletsBundleMode: {
13024
+ specifier: "@sootsim-internal/react-native-worklets-bundle-mode-real",
13025
+ packageName: "react-native-worklets/lib/module/debug/bundleMode.native.js"
13026
+ },
13027
+ reactNativeWorkletsFunction: {
13028
+ specifier: "@peach-internal/react-native-worklets-function-real",
13029
+ packageName: "react-native-worklets/lib/module/workletFunction.js"
13030
+ },
13031
+ reactNativeWorkletsRunLoop: {
13032
+ specifier: "@sootsim-internal/react-native-worklets-run-loop-real",
13033
+ packageName: "react-native-worklets/lib/module/runLoop/workletRuntime/index.js"
13034
+ }
13035
+ };
13036
+ var PEACH_REACT_NATIVE_UPSTREAM_MODULES = {
13037
+ reactNativeBatchedBridge: {
13038
+ specifier: "@peach-internal/react-native/BatchedBridge/BatchedBridge",
13039
+ packageName: "react-native/Libraries/BatchedBridge/BatchedBridge.js"
13040
+ },
13041
+ reactNativeStyleAttributes: {
13042
+ specifier: "@peach-internal/react-native/Components/View/ReactNativeStyleAttributes",
13043
+ packageName: "react-native/Libraries/Components/View/ReactNativeStyleAttributes.js"
13044
+ },
13045
+ reactNativeProcessColor: {
13046
+ specifier: "@peach-internal/react-native/StyleSheet/processColor",
13047
+ packageName: "react-native/Libraries/StyleSheet/processColor.js"
13048
+ },
13049
+ reactNativeFontVariationSettings: {
13050
+ specifier: "@peach-internal/react-native-font-variation-settings",
13051
+ packageName: "react-native/Libraries/StyleSheet/processFontVariationSettings.js"
13052
+ }
13053
+ };
13054
+ var PEACH_UPSTREAM_MODULES = {
13055
+ ...SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES,
13056
+ ...PEACH_REACT_NATIVE_UPSTREAM_MODULES
13057
+ };
13058
+
13059
+ // ../peach-compat/src/stub-manifest.ts
13060
+ var COMPAT_STUBS = {
13061
+ reactNativeScreens: {
13062
+ specifier: "react-native-screens",
13063
+ stubFile: "react-native-screens.ts",
13064
+ runtimeTier: "lazy",
13065
+ buildResolvers: ["vite", "dep-prebundle"]
13066
+ },
13067
+ reactNativeMaskedView: {
13068
+ specifier: "@react-native-masked-view/masked-view",
13069
+ stubFile: "masked-view.ts",
13070
+ runtimeTier: "none",
13071
+ buildResolvers: ["vite"]
13072
+ },
13073
+ reactNativeCommunityMaskedView: {
13074
+ specifier: "@react-native-community/masked-view",
13075
+ stubFile: "masked-view.ts",
13076
+ runtimeTier: "none",
13077
+ buildResolvers: ["vite"]
13078
+ },
13079
+ reactNativeTeleport: {
13080
+ specifier: "react-native-teleport",
13081
+ stubFile: "react-native-teleport.tsx",
13082
+ runtimeTier: "lazy",
13083
+ buildResolvers: ["vite", "dep-prebundle"]
13084
+ },
13085
+ reactNativeIosContextMenu: {
13086
+ specifier: "react-native-ios-context-menu",
13087
+ stubFile: "react-native-ios-context-menu.ts",
13088
+ runtimeTier: "core",
13089
+ buildResolvers: ["vite"]
13090
+ },
13091
+ reactNativeIosUtilities: {
13092
+ specifier: "react-native-ios-utilities",
13093
+ stubFile: "react-native-ios-utilities.ts",
13094
+ runtimeTier: "core",
13095
+ buildResolvers: ["vite"]
13096
+ },
13097
+ expoSplashScreen: {
13098
+ specifier: "expo-splash-screen",
13099
+ stubFile: "expo-splash-screen.ts",
13100
+ runtimeTier: "none",
13101
+ buildResolvers: ["vite", "dep-prebundle"]
13102
+ },
13103
+ reactNativeLaunchArguments: {
13104
+ specifier: "react-native-launch-arguments",
13105
+ stubFile: "react-native-launch-arguments.ts",
13106
+ runtimeTier: "core",
13107
+ buildResolvers: ["vite"]
13108
+ },
13109
+ expoWinterFormData: {
13110
+ specifier: "expo/build/winter/FormData",
13111
+ stubFile: "expo-winter-formdata.ts",
13112
+ runtimeTier: "none",
13113
+ buildResolvers: ["vite"]
13114
+ },
13115
+ expoWinterFetch: {
13116
+ specifier: "expo/build/winter/fetch/index",
13117
+ stubFile: "expo-winter-fetch.ts",
13118
+ runtimeTier: "none",
13119
+ buildResolvers: ["vite"]
13120
+ },
13121
+ expoConstants: {
13122
+ specifier: "expo-constants",
13123
+ stubFile: "expo-constants.ts",
13124
+ runtimeTier: "none",
13125
+ buildResolvers: ["vite", "dep-prebundle"]
13126
+ },
13127
+ expoLinearGradient: {
13128
+ specifier: "expo-linear-gradient",
13129
+ stubFile: "expo-linear-gradient.ts",
13130
+ runtimeTier: "none",
13131
+ buildResolvers: ["vite", "dep-prebundle"]
13132
+ },
13133
+ expoBlur: {
13134
+ specifier: "expo-blur",
13135
+ stubFile: "expo-blur.ts",
13136
+ runtimeTier: "none",
13137
+ buildResolvers: ["vite", "dep-prebundle"]
13138
+ },
13139
+ expoLiquidGlassView: {
13140
+ specifier: "expo-liquid-glass-view",
13141
+ stubFile: "expo-liquid-glass-view.ts",
13142
+ runtimeTier: "core",
13143
+ buildResolvers: ["vite", "dep-prebundle"]
13144
+ },
13145
+ expoGlassEffect: {
13146
+ specifier: "expo-glass-effect",
13147
+ stubFile: "expo-glass-effect.ts",
13148
+ runtimeTier: "lazy",
13149
+ buildResolvers: ["vite", "dep-prebundle"]
13150
+ },
13151
+ expoSymbols: {
13152
+ specifier: "expo-symbols",
13153
+ stubFile: "expo-symbols.ts",
13154
+ runtimeTier: "none",
13155
+ buildResolvers: ["vite", "dep-prebundle"]
13156
+ },
13157
+ expoMeshGradient: {
13158
+ specifier: "expo-mesh-gradient",
13159
+ stubFile: "expo-mesh-gradient.ts",
13160
+ runtimeTier: "lazy",
13161
+ buildResolvers: ["vite", "dep-prebundle"]
13162
+ },
13163
+ reactNativeBottomTabs: {
13164
+ specifier: "react-native-bottom-tabs",
13165
+ stubFile: "react-native-bottom-tabs.ts",
13166
+ runtimeTier: "lazy",
13167
+ buildResolvers: ["vite", "dep-prebundle"]
13168
+ },
13169
+ callstackReactNativeBottomTabs: {
13170
+ specifier: "@callstack/react-native-bottom-tabs",
13171
+ stubFile: "react-native-bottom-tabs.ts",
13172
+ runtimeTier: "lazy",
13173
+ buildResolvers: ["vite", "dep-prebundle"]
13174
+ },
13175
+ expoUiSwiftUi: {
13176
+ specifier: "@expo/ui/swift-ui",
13177
+ stubFile: "expo-ui.ts",
13178
+ runtimeTier: "lazy",
13179
+ buildResolvers: ["vite"]
13180
+ },
13181
+ expoUiCommunityMenu: {
13182
+ specifier: "@expo/ui/community/menu",
13183
+ stubFile: "expo-ui-menu.ts",
13184
+ runtimeTier: "lazy",
13185
+ buildResolvers: ["vite"]
13186
+ },
13187
+ expoModulesCore: {
13188
+ specifier: "expo-modules-core",
13189
+ stubFile: "expo-modules-core-package.ts",
13190
+ runtimeTier: "lazy",
13191
+ buildResolvers: ["vite"]
13192
+ },
13193
+ reactNativeWorklets: {
13194
+ specifier: "react-native-worklets",
13195
+ stubFile: "react-native-worklets-pkg/index.ts",
13196
+ runtimeTier: "none",
13197
+ buildResolvers: ["vite", "dep-prebundle"]
13198
+ },
13199
+ reactNativeWorkletsNative: {
13200
+ specifier: "react-native-worklets/specs/NativeWorkletsModule",
13201
+ stubFile: "react-native-worklets-native.ts",
13202
+ runtimeTier: "lazy",
13203
+ buildResolvers: ["vite"]
13204
+ },
13205
+ reactNativeWorkletsPackageJson: {
13206
+ specifier: "react-native-worklets/package.json",
13207
+ stubFile: "react-native-worklets-pkg/package.json",
13208
+ runtimeTier: "none",
13209
+ buildResolvers: ["vite"]
13210
+ },
13211
+ reactNativePdf: {
13212
+ specifier: "react-native-pdf",
13213
+ stubFile: "react-native-pdf.ts",
13214
+ runtimeTier: "lazy",
13215
+ buildResolvers: ["vite"]
13216
+ },
13217
+ expoBackgroundFetch: {
13218
+ specifier: "expo-background-fetch",
13219
+ stubFile: "expo-background-fetch.ts",
13220
+ runtimeTier: "none",
13221
+ buildResolvers: ["vite"]
13222
+ },
13223
+ expoBackgroundTask: {
13224
+ specifier: "expo-background-task",
13225
+ stubFile: "expo-background-task.ts",
13226
+ runtimeTier: "none",
13227
+ buildResolvers: ["vite"]
13228
+ },
13229
+ expoSensors: {
13230
+ specifier: "expo-sensors",
13231
+ stubFile: "expo-sensors.ts",
13232
+ runtimeTier: "none",
13233
+ buildResolvers: ["vite"]
13234
+ },
13235
+ expoVideoThumbnails: {
13236
+ specifier: "expo-video-thumbnails",
13237
+ stubFile: "expo-video-thumbnails.ts",
13238
+ runtimeTier: "none",
13239
+ buildResolvers: ["vite"]
13240
+ },
13241
+ googleSignin: {
13242
+ specifier: "@react-native-google-signin/google-signin",
13243
+ stubFile: "react-native-google-signin.ts",
13244
+ runtimeTier: "none",
13245
+ buildResolvers: ["vite", "dep-prebundle"]
13246
+ },
13247
+ reactNativeHapticFeedback: {
13248
+ specifier: "react-native-haptic-feedback",
13249
+ stubFile: "react-native-haptic-feedback.ts",
13250
+ runtimeTier: "none",
13251
+ buildResolvers: ["vite", "dep-prebundle"]
13252
+ },
13253
+ reactNativeSegmentedControl: {
13254
+ specifier: "@react-native-segmented-control/segmented-control",
13255
+ stubFile: "react-native-segmented-control.ts",
13256
+ runtimeTier: "lazy",
13257
+ buildResolvers: ["vite"]
13258
+ },
13259
+ reactNativeUitextview: {
13260
+ specifier: "react-native-uitextview",
13261
+ stubFile: "react-native-uitextview.ts",
13262
+ runtimeTier: "lazy",
13263
+ buildResolvers: ["vite"]
13264
+ },
13265
+ expoBattery: {
13266
+ specifier: "expo-battery",
13267
+ stubFile: "expo-battery.ts",
13268
+ runtimeTier: "none",
13269
+ buildResolvers: ["vite"]
13270
+ },
13271
+ expoBrightness: {
13272
+ specifier: "expo-brightness",
13273
+ stubFile: "expo-brightness.ts",
13274
+ runtimeTier: "none",
13275
+ buildResolvers: ["vite"]
13276
+ },
13277
+ // sdk 57 moved the async calendar surface behind `expo-calendar/legacy`.
13278
+ // the bare-specifier alias is a PREFIX match, so without this longer entry
13279
+ // it rewrites the subpath to `<stubs>/expo-calendar.ts/legacy`. it needs its
13280
+ // own stub too: upstream's root re-exports `legacyWarnings`, where every
13281
+ // async method throws "imported from expo-calendar is deprecated", so
13282
+ // sharing the root stub makes the whole legacy surface throw at call time.
13283
+ expoCalendarLegacy: {
13284
+ specifier: "expo-calendar/legacy",
13285
+ stubFile: "expo-calendar-legacy.ts",
13286
+ runtimeTier: "none",
13287
+ buildResolvers: ["vite"]
13288
+ },
13289
+ expoCalendar: {
13290
+ specifier: "expo-calendar",
13291
+ stubFile: "expo-calendar.ts",
13292
+ runtimeTier: "none",
13293
+ buildResolvers: ["vite"]
13294
+ },
13295
+ expoCellular: {
13296
+ specifier: "expo-cellular",
13297
+ stubFile: "expo-cellular.ts",
13298
+ runtimeTier: "none",
13299
+ buildResolvers: ["vite"]
13300
+ },
13301
+ // same `/legacy` prefix-alias and deprecated-root case as expo-calendar.
13302
+ expoContactsLegacy: {
13303
+ specifier: "expo-contacts/legacy",
13304
+ stubFile: "expo-contacts-legacy.ts",
13305
+ runtimeTier: "none",
13306
+ buildResolvers: ["vite"]
13307
+ },
13308
+ expoContacts: {
13309
+ specifier: "expo-contacts",
13310
+ stubFile: "expo-contacts.ts",
13311
+ runtimeTier: "none",
13312
+ buildResolvers: ["vite"]
13313
+ },
13314
+ expoMailComposer: {
13315
+ specifier: "expo-mail-composer",
13316
+ stubFile: "expo-mail-composer.ts",
13317
+ runtimeTier: "none",
13318
+ buildResolvers: ["vite"]
13319
+ },
13320
+ expoPrint: {
13321
+ specifier: "expo-print",
13322
+ stubFile: "expo-print.ts",
13323
+ runtimeTier: "none",
13324
+ buildResolvers: ["vite"]
13325
+ },
13326
+ expoSecureStore: {
13327
+ specifier: "expo-secure-store",
13328
+ stubFile: "expo-secure-store.ts",
13329
+ runtimeTier: "none",
13330
+ buildResolvers: ["vite", "dep-prebundle"]
13331
+ },
13332
+ expoInsights: {
13333
+ specifier: "expo-insights",
13334
+ stubFile: "expo-insights.ts",
13335
+ runtimeTier: "none",
13336
+ buildResolvers: ["vite"]
13337
+ },
13338
+ expoIntentLauncher: {
13339
+ specifier: "expo-intent-launcher",
13340
+ stubFile: "expo-intent-launcher.ts",
13341
+ runtimeTier: "none",
13342
+ buildResolvers: ["vite"]
13343
+ },
13344
+ expoTaskManager: {
13345
+ specifier: "expo-task-manager",
13346
+ stubFile: "expo-task-manager.ts",
13347
+ runtimeTier: "none",
13348
+ buildResolvers: ["vite"]
13349
+ },
13350
+ expoApplication: {
13351
+ specifier: "expo-application",
13352
+ stubFile: "expo-application.ts",
13353
+ runtimeTier: "none",
13354
+ buildResolvers: ["vite", "dep-prebundle"]
13355
+ },
13356
+ expoNetwork: {
13357
+ specifier: "expo-network",
13358
+ stubFile: "expo-network.ts",
13359
+ runtimeTier: "none",
13360
+ buildResolvers: ["vite"]
13361
+ },
13362
+ expoScreenCapture: {
13363
+ specifier: "expo-screen-capture",
13364
+ stubFile: "expo-screen-capture.ts",
13365
+ runtimeTier: "none",
13366
+ buildResolvers: ["vite"]
13367
+ },
13368
+ expoScreenOrientation: {
13369
+ specifier: "expo-screen-orientation",
13370
+ stubFile: "expo-screen-orientation.ts",
13371
+ runtimeTier: "none",
13372
+ buildResolvers: ["vite"]
13373
+ },
13374
+ expoQuickActions: {
13375
+ specifier: "expo-quick-actions",
13376
+ stubFile: "expo-quick-actions.ts",
13377
+ runtimeTier: "none",
13378
+ buildResolvers: ["vite"]
13379
+ },
13380
+ expoSharing: {
13381
+ specifier: "expo-sharing",
13382
+ stubFile: "expo-sharing.ts",
13383
+ runtimeTier: "none",
13384
+ buildResolvers: ["vite"]
13385
+ },
13386
+ expoSms: {
13387
+ specifier: "expo-sms",
13388
+ stubFile: "expo-sms.ts",
13389
+ runtimeTier: "none",
13390
+ buildResolvers: ["vite"]
13391
+ },
13392
+ expoSqlite: {
13393
+ specifier: "expo-sqlite",
13394
+ stubFile: "expo-sqlite.ts",
13395
+ runtimeTier: "none",
13396
+ buildResolvers: ["vite", "dep-prebundle"]
13397
+ },
13398
+ expoSpeech: {
13399
+ specifier: "expo-speech",
13400
+ stubFile: "expo-speech.ts",
13401
+ runtimeTier: "none",
13402
+ buildResolvers: ["vite"]
13403
+ },
13404
+ expoStoreReview: {
13405
+ specifier: "expo-store-review",
13406
+ stubFile: "expo-store-review.ts",
13407
+ runtimeTier: "none",
13408
+ buildResolvers: ["vite"]
13409
+ },
13410
+ expoTrackingTransparency: {
13411
+ specifier: "expo-tracking-transparency",
13412
+ stubFile: "expo-tracking-transparency.ts",
13413
+ runtimeTier: "none",
13414
+ buildResolvers: ["vite"]
13415
+ },
13416
+ expoShareExtension: {
13417
+ specifier: "expo-share-extension",
13418
+ stubFile: "noop-sdks-extra/expo-share-extension.ts",
13419
+ runtimeTier: "none",
13420
+ buildResolvers: ["vite"]
13421
+ },
13422
+ expoHealthConnect: {
13423
+ specifier: "expo-health-connect",
13424
+ stubFile: "noop-sdks-extra/expo-health-connect.ts",
13425
+ runtimeTier: "none",
13426
+ buildResolvers: ["vite"]
13427
+ },
13428
+ expoInAppUpdates: {
13429
+ specifier: "expo-in-app-updates",
13430
+ stubFile: "noop-sdks-extra/expo-in-app-updates.ts",
13431
+ runtimeTier: "none",
13432
+ buildResolvers: ["vite"]
13433
+ },
13434
+ expoSuperwall: {
13435
+ specifier: "expo-superwall",
13436
+ stubFile: "noop-sdks-extra/expo-superwall.ts",
13437
+ runtimeTier: "none",
13438
+ buildResolvers: ["vite"]
13439
+ },
13440
+ communityCheckbox: {
13441
+ specifier: "@react-native-community/checkbox",
13442
+ stubFile: "react-native-community-checkbox.ts",
13443
+ runtimeTier: "lazy",
13444
+ buildResolvers: ["vite"]
13445
+ },
13446
+ reactNavigationNative: {
13447
+ specifier: "@react-navigation/native",
13448
+ stubFile: "react-navigation-native.tsx",
13449
+ runtimeTier: "none",
13450
+ buildResolvers: ["vite"]
13451
+ }
13452
+ };
13453
+
13454
+ // src/stub-pattern-matcher.ts
13455
+ function extractPackageFromPath(modulePath) {
13456
+ let nodeModulesIndex = modulePath.lastIndexOf("/node_modules/");
13457
+ let prefixLength = "/node_modules/".length;
13458
+ if (nodeModulesIndex === -1) {
13459
+ if (!modulePath.startsWith("node_modules/")) return null;
13460
+ nodeModulesIndex = 0;
13461
+ prefixLength = "node_modules/".length;
13462
+ }
13463
+ return packageNameAt(modulePath, nodeModulesIndex + prefixLength) || null;
13464
+ }
13465
+ function packageNameAt(modulePath, start) {
13466
+ const firstSlash = modulePath.indexOf("/", start);
13467
+ if (modulePath.startsWith("@", start)) {
13468
+ if (firstSlash === -1) return null;
13469
+ const secondSlash = modulePath.indexOf("/", firstSlash + 1);
13470
+ return modulePath.slice(start, secondSlash === -1 ? void 0 : secondSlash);
13471
+ }
13472
+ return modulePath.slice(start, firstSlash === -1 ? void 0 : firstSlash);
13473
+ }
13474
+
13500
13475
  // src/installed-package-versions.ts
13501
- function readInstalledPackage(projectRoot, name2) {
13502
- let dir = projectRoot;
13503
- for (; ; ) {
13504
- let manifest;
13505
- try {
13506
- manifest = JSON.parse(
13507
- import_fs3.default.readFileSync(import_path2.default.join(dir, "node_modules", name2, "package.json"), "utf8")
13508
- );
13509
- } catch (error) {
13510
- if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
13511
- throw error;
13476
+ function* exists(target) {
13477
+ return (yield { op: "exists", path: target }) === true;
13478
+ }
13479
+ function* realpath(target) {
13480
+ const resolved = yield { op: "realpath", path: target };
13481
+ if (typeof resolved !== "string") throw new Error(`could not resolve ${target}`);
13482
+ return resolved;
13483
+ }
13484
+ function* readManifest(target) {
13485
+ const manifest = yield { op: "manifest", path: target };
13486
+ return typeof manifest === "object" ? manifest : null;
13487
+ }
13488
+ function parseManifest(source) {
13489
+ const manifest = JSON.parse(source);
13490
+ return typeof manifest === "object" && manifest !== null ? manifest : null;
13491
+ }
13492
+ function isMissing(error) {
13493
+ return error instanceof Error && "code" in error && error.code === "ENOENT";
13494
+ }
13495
+ function answerSync(step) {
13496
+ if (step.op === "exists") return import_fs4.default.existsSync(step.path);
13497
+ if (step.op === "realpath") return import_fs4.default.realpathSync(step.path);
13498
+ try {
13499
+ return parseManifest(import_fs4.default.readFileSync(step.path, "utf8"));
13500
+ } catch (error) {
13501
+ if (isMissing(error)) return null;
13502
+ throw error;
13503
+ }
13504
+ }
13505
+ function runSync(walk) {
13506
+ for (let step = walk.next(); ; ) {
13507
+ if (step.done) return step.value;
13508
+ step = walk.next(answerSync(step.value));
13509
+ }
13510
+ }
13511
+ function createInstalledPackageReader() {
13512
+ const hasModules = /* @__PURE__ */ new Map();
13513
+ const manifests = /* @__PURE__ */ new Map();
13514
+ return function* readInstalledPackage(fromDir, name2) {
13515
+ for (let dir = fromDir; ; ) {
13516
+ if (import_path3.default.basename(dir) !== "node_modules") {
13517
+ const modules = import_path3.default.join(dir, "node_modules");
13518
+ let present = hasModules.get(dir);
13519
+ if (present === void 0) {
13520
+ present = yield* exists(modules);
13521
+ hasModules.set(dir, present);
13522
+ }
13523
+ if (present) {
13524
+ const root = import_path3.default.join(modules, name2);
13525
+ let installed = manifests.get(root);
13526
+ if (installed === void 0) {
13527
+ const manifest = yield* readManifest(import_path3.default.join(root, "package.json"));
13528
+ installed = manifest ? { root, manifest } : null;
13529
+ manifests.set(root, installed);
13530
+ }
13531
+ if (installed) return installed;
13532
+ }
13512
13533
  }
13513
- const parent = import_path2.default.dirname(dir);
13534
+ const parent = import_path3.default.dirname(dir);
13514
13535
  if (parent === dir) return null;
13515
13536
  dir = parent;
13516
- continue;
13517
13537
  }
13518
- return typeof manifest === "object" && manifest !== null ? { root: import_path2.default.join(dir, "node_modules", name2), manifest } : null;
13519
- }
13538
+ };
13520
13539
  }
13521
- function readInstalledPackageVersions(projectRoot, modulePaths) {
13522
- const names = /* @__PURE__ */ new Set();
13523
- for (const modulePath of modulePaths) {
13524
- const name2 = extractPackageFromPath(modulePath.replaceAll(import_path2.default.sep, "/"));
13525
- if (name2) names.add(name2);
13526
- }
13540
+ function* installedVersionsWalk(projectRoot, names) {
13541
+ const readInstalledPackage = createInstalledPackageReader();
13527
13542
  const versions = {};
13528
13543
  for (const name2 of [...names].sort()) {
13529
- const installed = readInstalledPackage(projectRoot, name2);
13544
+ const installed = yield* readInstalledPackage(projectRoot, name2);
13530
13545
  const version = installed && Reflect.get(installed.manifest, "version");
13531
13546
  if (typeof version === "string" && version.length > 0) versions[name2] = version;
13532
13547
  }
13533
13548
  return versions;
13534
13549
  }
13535
- function readInstalledNativePackageVersions(projectRoot) {
13536
- const appRoot = import_fs3.default.realpathSync(projectRoot);
13550
+ function readInstalledPackageVersions(projectRoot, modulePaths) {
13551
+ const names = /* @__PURE__ */ new Set();
13552
+ for (const modulePath of modulePaths) {
13553
+ const name2 = extractPackageFromPath(modulePath.replaceAll(import_path3.default.sep, "/"));
13554
+ if (name2) names.add(name2);
13555
+ }
13556
+ return runSync(installedVersionsWalk(projectRoot, names));
13557
+ }
13558
+ function* nativePackageVersionsWalk(projectRoot) {
13559
+ const appRoot = yield* realpath(projectRoot);
13537
13560
  const nativeNames = /* @__PURE__ */ new Set();
13538
13561
  for (const specifier of [
13539
13562
  "react-native",
@@ -13544,17 +13567,14 @@ function readInstalledNativePackageVersions(projectRoot) {
13544
13567
  const name2 = extractPackageFromPath(`node_modules/${specifier}`);
13545
13568
  if (name2) nativeNames.add(name2);
13546
13569
  }
13547
- const manifest = JSON.parse(
13548
- import_fs3.default.readFileSync(import_path2.default.join(appRoot, "package.json"), "utf8")
13549
- );
13550
- if (typeof manifest !== "object" || manifest === null) {
13551
- throw new Error("app package.json must contain an object");
13552
- }
13570
+ const manifest = yield* readManifest(import_path3.default.join(appRoot, "package.json"));
13571
+ if (!manifest) throw new Error("app package.json must contain an object");
13572
+ const readInstalledPackage = createInstalledPackageReader();
13553
13573
  const pending = [{ root: appRoot, manifest }];
13554
13574
  const visited = /* @__PURE__ */ new Set();
13555
13575
  const needed = /* @__PURE__ */ new Set();
13556
13576
  for (let next = pending.pop(); next; next = pending.pop()) {
13557
- const root = import_fs3.default.realpathSync(next.root);
13577
+ const root = yield* realpath(next.root);
13558
13578
  if (visited.has(root)) continue;
13559
13579
  visited.add(root);
13560
13580
  const fields = ["dependencies", "optionalDependencies", "peerDependencies"];
@@ -13569,17 +13589,17 @@ function readInstalledNativePackageVersions(projectRoot) {
13569
13589
  if (typeof peer === "object" && peer !== null && Reflect.get(peer, "optional"))
13570
13590
  continue;
13571
13591
  }
13572
- const installed = readInstalledPackage(root, name2);
13592
+ const installed = yield* readInstalledPackage(root, name2);
13573
13593
  if (!installed) continue;
13574
13594
  if (nativeNames.has(name2)) needed.add(name2);
13575
13595
  pending.push(installed);
13576
13596
  }
13577
13597
  }
13578
13598
  }
13579
- return readInstalledPackageVersions(
13580
- projectRoot,
13581
- [...needed].map((specifier) => `node_modules/${specifier}`)
13582
- );
13599
+ return yield* installedVersionsWalk(projectRoot, needed);
13600
+ }
13601
+ function readInstalledNativePackageVersions(projectRoot) {
13602
+ return runSync(nativePackageVersionsWalk(projectRoot));
13583
13603
  }
13584
13604
 
13585
13605
  // src/one-widget-metadata.ts
@@ -13827,202 +13847,8 @@ async function configuredOneWidget(appRoot, bundleUrl) {
13827
13847
  };
13828
13848
  }
13829
13849
 
13830
- // src/runtime-assets.ts
13831
- var import_fs4 = __toESM(require("fs"), 1);
13832
- var import_path3 = __toESM(require("path"), 1);
13833
- var import_url = require("url");
13834
-
13835
- // ../contrast-runtime-delivery/src/index.ts
13836
- init_process_group();
13837
-
13838
- // ../contrast-runtime-delivery/src/product.ts
13839
- init_version();
13840
-
13841
- // src/runtime-assets.ts
13842
- var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[peach] no engine runtime installed. run `peach runtime install`";
13843
- var _monorepoRootCache;
13844
- function findMonorepoRoot() {
13845
- if (_monorepoRootCache !== void 0) return _monorepoRootCache;
13846
- let dir = import_path3.default.dirname((0, import_url.fileURLToPath)(__sootsim_import_meta_url));
13847
- for (let i = 0; i < 12 && dir !== import_path3.default.dirname(dir); i++) {
13848
- if (import_fs4.default.existsSync(import_path3.default.join(dir, "packages/peach-engine/package.json")) && import_fs4.default.existsSync(import_path3.default.join(dir, "public/sootsim"))) {
13849
- _monorepoRootCache = dir;
13850
- return dir;
13851
- }
13852
- dir = import_path3.default.dirname(dir);
13853
- }
13854
- _monorepoRootCache = null;
13855
- return null;
13856
- }
13857
- function resolveDevCheckoutRuntimeRoot() {
13858
- if (process.env.PEACH_HOME && readActiveRuntime()) return null;
13859
- const root = findMonorepoRoot();
13860
- if (!root) return null;
13861
- const devBuild = import_path3.default.join(root, "public/sootsim");
13862
- if (import_fs4.default.existsSync(import_path3.default.join(devBuild, "index.html")) && import_fs4.default.existsSync(import_path3.default.join(devBuild, "engine/index.html")) && import_fs4.default.existsSync(import_path3.default.join(devBuild, "engine-tenant/worker.js")) && import_fs4.default.existsSync(import_path3.default.join(devBuild, "engine-tenant/worker.prod.js"))) {
13863
- return devBuild;
13864
- }
13865
- return null;
13866
- }
13867
- var MIME_TYPES = {
13868
- ".js": "application/javascript",
13869
- ".mjs": "application/javascript",
13870
- ".css": "text/css",
13871
- ".html": "text/html",
13872
- ".wasm": "application/wasm",
13873
- ".json": "application/json",
13874
- ".jpg": "image/jpeg",
13875
- ".jpeg": "image/jpeg",
13876
- ".png": "image/png",
13877
- ".svg": "image/svg+xml",
13878
- ".webp": "image/webp",
13879
- ".glb": "model/gltf-binary",
13880
- ".ttf": "font/ttf",
13881
- ".otf": "font/otf",
13882
- ".woff": "font/woff",
13883
- ".woff2": "font/woff2",
13884
- ".mp3": "audio/mpeg",
13885
- ".wav": "audio/wav",
13886
- ".mp4": "video/mp4",
13887
- ".m4v": "video/mp4",
13888
- ".mov": "video/quicktime",
13889
- ".webm": "video/webm"
13890
- };
13891
- var ROOT_RUNTIME_PATHS = [
13892
- "/assets/",
13893
- "/engine/",
13894
- "/engine-tenant/",
13895
- "/photos/",
13896
- "/three-mode/",
13897
- "/fonts/",
13898
- "/icons/",
13899
- "/sounds/",
13900
- "/spike/",
13901
- "/test-wallpaper.jpg",
13902
- "/preview-sw.js",
13903
- "/peach.svg",
13904
- "/bedrock-sqlite.wasm",
13905
- "/bedrock-sqlite.js",
13906
- "/sootsim/"
13907
- ];
13908
- function resolveActiveRuntimeRoot() {
13909
- const devRoot = resolveDevCheckoutRuntimeRoot();
13910
- if (devRoot) return devRoot;
13911
- const active = readActiveRuntime();
13912
- if (!active) return null;
13913
- const dir = runtimeDir(active);
13914
- if (!import_fs4.default.existsSync(import_path3.default.join(dir, "index.html"))) return null;
13915
- return dir;
13916
- }
13917
- var RUNTIME_VERSION_HOSTNAME_SUFFIX = ".runtime.localhost";
13918
- function isRuntimeVersionHostname(hostname) {
13919
- return hostname.toLowerCase().endsWith(RUNTIME_VERSION_HOSTNAME_SUFFIX);
13920
- }
13921
- function runtimeVersionFromHostname(hostname) {
13922
- if (!isRuntimeVersionHostname(hostname)) return null;
13923
- const labels = hostname.slice(0, -RUNTIME_VERSION_HOSTNAME_SUFFIX.length).split(".");
13924
- if (labels.length === 0 || labels.some((label) => !/^[0-9a-f]{1,60}$/i.test(label))) {
13925
- return null;
13926
- }
13927
- const encoded = labels.join("");
13928
- if (encoded.length % 2 !== 0) return null;
13929
- try {
13930
- const version = Buffer.from(encoded, "hex").toString("utf8");
13931
- return isValidRuntimeVersion(version) ? version : null;
13932
- } catch {
13933
- return null;
13934
- }
13935
- }
13936
- function resolveInstalledRuntimeRoot(version) {
13937
- const dir = runtimeDir(version);
13938
- if (!import_fs4.default.existsSync(import_path3.default.join(dir, "index.html"))) return null;
13939
- return dir;
13940
- }
13941
- function resolveRuntimeRootForHostname(hostname) {
13942
- if (!isRuntimeVersionHostname(hostname)) return resolveActiveRuntimeRoot();
13943
- const version = runtimeVersionFromHostname(hostname);
13944
- return version ? resolveInstalledRuntimeRoot(version) : null;
13945
- }
13946
- function resolveRuntimeRootForRequestHost(host) {
13947
- if (!host) return resolveActiveRuntimeRoot();
13948
- try {
13949
- return resolveRuntimeRootForHostname(new URL(`http://${host}`).hostname);
13950
- } catch {
13951
- return null;
13952
- }
13953
- }
13954
- function isRootRuntimeAssetPath(pathname) {
13955
- return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
13956
- }
13957
- function resolveRuntimeFilePath(runtimeRoot, pathname) {
13958
- if (!pathname.startsWith("/")) return null;
13959
- if (pathname.includes("\0") || pathname.includes("\\")) return null;
13960
- for (const segment of pathname.split("/")) {
13961
- if (segment === "..") return null;
13962
- }
13963
- const normalized = pathname.startsWith("/sootsim/") ? pathname.slice("/sootsim".length) : pathname;
13964
- const fullPath = import_path3.default.resolve(runtimeRoot, normalized.replace(/^\/+/, ""));
13965
- const rootWithSep = runtimeRoot.endsWith(import_path3.default.sep) ? runtimeRoot : runtimeRoot + import_path3.default.sep;
13966
- if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
13967
- if (!import_fs4.default.existsSync(fullPath) || !import_fs4.default.statSync(fullPath).isFile()) return null;
13968
- return fullPath;
13969
- }
13970
- function serveRuntimeFile(req, res, fullPath) {
13971
- const ext = import_path3.default.extname(fullPath);
13972
- const stat = import_fs4.default.statSync(fullPath);
13973
- const lastModified = stat.mtime.toUTCString();
13974
- res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
13975
- if (/^canvaskit-graphite-pipelines-[0-9a-f]{8}\.bin$/.test(import_path3.default.basename(fullPath))) {
13976
- res.setHeader("cache-control", "public, max-age=31536000, immutable");
13977
- import_fs4.default.createReadStream(fullPath).pipe(res);
13978
- return;
13979
- }
13980
- res.setHeader("cache-control", "no-cache");
13981
- res.setHeader("last-modified", lastModified);
13982
- if (req?.headers?.["if-modified-since"] === lastModified) {
13983
- res.statusCode = 304;
13984
- res.end();
13985
- return;
13986
- }
13987
- sendFileWithRanges(req, res, fullPath, stat.size, {});
13988
- }
13989
- function sendFileWithRanges(req, res, filePath, total, headers) {
13990
- const head = (req?.method || "GET").toUpperCase() === "HEAD";
13991
- const range = /^bytes=(\d*)-(\d*)$/.exec(req?.headers?.range || "");
13992
- const invalid = range && range[1] && range[2] && Number(range[2]) < Number(range[1]);
13993
- if (range && (range[1] || range[2]) && !invalid) {
13994
- const [, startRaw, endRaw] = range;
13995
- const start = startRaw ? Number(startRaw) : Math.max(0, total - Number(endRaw));
13996
- const end = startRaw && endRaw ? Math.min(Number(endRaw), total - 1) : total - 1;
13997
- if (start > end || start >= total) {
13998
- res.writeHead(416, { ...headers, "Content-Range": `bytes */${total}` });
13999
- res.end();
14000
- return;
14001
- }
14002
- res.writeHead(206, {
14003
- ...headers,
14004
- "Content-Range": `bytes ${start}-${end}/${total}`,
14005
- "Accept-Ranges": "bytes",
14006
- "Content-Length": String(end - start + 1)
14007
- });
14008
- if (head) res.end();
14009
- else streamFile(res, import_fs4.default.createReadStream(filePath, { start, end }));
14010
- return;
14011
- }
14012
- res.writeHead(200, {
14013
- ...headers,
14014
- "Accept-Ranges": "bytes",
14015
- "Content-Length": String(total)
14016
- });
14017
- if (head || total === 0) res.end();
14018
- else streamFile(res, import_fs4.default.createReadStream(filePath, { start: 0, end: total - 1 }));
14019
- }
14020
- function streamFile(res, stream) {
14021
- stream.on("error", (error) => res.destroy(error));
14022
- stream.pipe(res);
14023
- }
14024
-
14025
13850
  // src/vite-plugin-one.ts
13851
+ init_runtime_assets();
14026
13852
  function exposeHeader(res, name2) {
14027
13853
  const exposed = res.getHeader("access-control-expose-headers");
14028
13854
  const names = typeof exposed === "string" && exposed ? exposed.split(/,\s*/) : [];
@@ -14404,7 +14230,6 @@ var import_fs6 = __toESM(require("fs"), 1);
14404
14230
  var import_module2 = require("module");
14405
14231
  var import_node_crypto7 = require("node:crypto");
14406
14232
  var import_path5 = __toESM(require("path"), 1);
14407
- init_adapter();
14408
14233
  init_app_project();
14409
14234
 
14410
14235
  // src/android-autolinking.ts
@@ -14903,8 +14728,13 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
14903
14728
  if (file.endsWith(".swift")) {
14904
14729
  if (!relative3.split("/").some((segment) => BUNDLE_DIR.test(segment)))
14905
14730
  visit3(file, "source");
14906
- } else if (/\.(h|m|mm|c|cpp|metal)$/.test(file)) {
14907
- if (!file.endsWith(".h")) visit3(file, "source");
14731
+ } else if (/\.(h|hh|hpp|hxx|pch)$/.test(file)) {
14732
+ visit3(
14733
+ file,
14734
+ relative3.split("/").some((segment) => BUNDLE_DIR.test(segment)) ? "resource" : "header"
14735
+ );
14736
+ } else if (/\.(m|mm|c|cc|cpp|cxx|metal)$/.test(file)) {
14737
+ visit3(file, "source");
14908
14738
  } else visit3(file, "resource");
14909
14739
  }
14910
14740
  }
@@ -15413,7 +15243,7 @@ var import_node_path14 = __toESM(require("node:path"), 1);
15413
15243
  init_is_record();
15414
15244
 
15415
15245
  // src/plist.ts
15416
- var import_plist = __toESM(require_plist(), 1);
15246
+ var import_plist = __toESM(require("plist"), 1);
15417
15247
  function parsePlistSource(source) {
15418
15248
  return import_plist.default.parse(source);
15419
15249
  }
@@ -15423,7 +15253,7 @@ var import_node_child_process5 = require("node:child_process");
15423
15253
  var import_node_crypto6 = require("node:crypto");
15424
15254
  var import_node_fs13 = __toESM(require("node:fs"), 1);
15425
15255
  var import_node_path13 = __toESM(require("node:path"), 1);
15426
- var import_plist2 = __toESM(require_plist(), 1);
15256
+ var import_plist2 = __toESM(require("plist"), 1);
15427
15257
 
15428
15258
  // src/xcode-json-project.ts
15429
15259
  var import_node_path12 = __toESM(require("node:path"), 1);
@@ -15847,14 +15677,14 @@ function workspaceReferences(workspace) {
15847
15677
  if (!import_node_fs13.default.existsSync(data))
15848
15678
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
15849
15679
  const container = import_node_path13.default.dirname(workspace);
15850
- const locate = (location2, base) => {
15851
- const colon = location2.indexOf(":");
15852
- const kind = location2.slice(0, colon);
15853
- const rest = location2.slice(colon + 1);
15680
+ const locate = (location, base) => {
15681
+ const colon = location.indexOf(":");
15682
+ const kind = location.slice(0, colon);
15683
+ const rest = location.slice(colon + 1);
15854
15684
  if (kind === "group") return import_node_path13.default.resolve(base, rest);
15855
15685
  if (kind === "container" || kind === "self") return import_node_path13.default.resolve(container, rest);
15856
15686
  if (kind === "absolute") return import_node_path13.default.resolve(rest);
15857
- throw new Error(`${import_node_path13.default.basename(workspace)} has an unsupported location ${location2}`);
15687
+ throw new Error(`${import_node_path13.default.basename(workspace)} has an unsupported location ${location}`);
15858
15688
  };
15859
15689
  const groups = [container];
15860
15690
  const references = [];
@@ -15864,8 +15694,8 @@ function workspaceReferences(workspace) {
15864
15694
  continue;
15865
15695
  }
15866
15696
  const base = groups.at(-1);
15867
- const location2 = /\blocation\s*=\s*"([^"]*)"/.exec(attributes)?.[1];
15868
- const resolved = location2 ? locate(decodeXml(location2), base) : base;
15697
+ const location = /\blocation\s*=\s*"([^"]*)"/.exec(attributes)?.[1];
15698
+ const resolved = location ? locate(decodeXml(location), base) : base;
15869
15699
  if (tag === "FileRef") references.push(resolved);
15870
15700
  else if (!selfClosing) groups.push(resolved);
15871
15701
  }
@@ -16079,6 +15909,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
16079
15909
  const targetName = str(target.name) ?? targetId;
16080
15910
  const sources = /* @__PURE__ */ new Set();
16081
15911
  const allSources = /* @__PURE__ */ new Set();
15912
+ const headers = /* @__PURE__ */ new Set();
16082
15913
  const resources = /* @__PURE__ */ new Set();
16083
15914
  const scriptForOutput = /* @__PURE__ */ new Map();
16084
15915
  for (const phaseId of list(target.buildPhases)) {
@@ -16207,6 +16038,10 @@ ${output}`
16207
16038
  (file) => isDirectory(file) ? walkFiles(file) : import_node_fs13.default.existsSync(file) ? [file] : [],
16208
16039
  import_node_path13.default.join,
16209
16040
  (file, kind) => {
16041
+ if (kind === "header") {
16042
+ headers.add(file);
16043
+ return;
16044
+ }
16210
16045
  if (kind === "resource") {
16211
16046
  resources.add(file);
16212
16047
  return;
@@ -16236,7 +16071,8 @@ ${output}`
16236
16071
  return {
16237
16072
  sources: [...sources].sort(),
16238
16073
  resources: [...resources].sort(),
16239
- allSources: [...allSources].sort()
16074
+ allSources: [...allSources].sort(),
16075
+ headers: [...headers].sort()
16240
16076
  };
16241
16077
  }
16242
16078
  function commonAncestor(dirs) {
@@ -16412,7 +16248,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
16412
16248
  );
16413
16249
  for (const file of read) xcconfigs.add(file);
16414
16250
  const swiftVersion = Number.parseFloat(settings2("SWIFT_VERSION") || "5");
16415
- const members = targetMembers(ref, settings2, options, keys, xcconfigs);
16251
+ const { headers, ...members } = targetMembers(ref, settings2, options, keys, xcconfigs);
16416
16252
  const searchRules = recursiveSearchRules(settings2);
16417
16253
  const implementations = members.allSources.filter(
16418
16254
  (file) => /\.(c|cc|cpp|cxx|m|mm)$/.test(file)
@@ -16447,10 +16283,25 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
16447
16283
  iosDeploymentTarget: settings2("IPHONEOS_DEPLOYMENT_TARGET") || null,
16448
16284
  ...implementations.some((file) => /\.mm?$/.test(file)) ? {
16449
16285
  objc: {
16450
- headers: Object.keys(ref.project.objects).flatMap((id) => {
16451
- const file = ref.project.resolvePath(id);
16452
- return file && /\.(h|hh|hpp|hxx|pch)$/.test(file) && import_node_fs13.default.existsSync(file) ? [file] : [];
16286
+ publicHeaders: list(ref.target.buildPhases).flatMap((phaseId) => {
16287
+ const phase = ref.project.object(phaseId);
16288
+ if (phase?.isa !== "PBXHeadersBuildPhase") return [];
16289
+ return list(phase.files).flatMap((id) => {
16290
+ const file = ref.project.object(id);
16291
+ const attributes = isDict(file?.settings) ? list(file.settings.ATTRIBUTES) : [];
16292
+ const resolved = ref.project.resolvePath(str(file?.fileRef) ?? "");
16293
+ return attributes.includes("Public") && resolved ? [resolved] : [];
16294
+ });
16453
16295
  }),
16296
+ headers: [
16297
+ .../* @__PURE__ */ new Set([
16298
+ ...headers,
16299
+ ...Object.keys(ref.project.objects).flatMap((id) => {
16300
+ const file = ref.project.resolvePath(id);
16301
+ return file && /\.(h|hh|hpp|hxx|pch)$/.test(file) && import_node_fs13.default.existsSync(file) ? [file] : [];
16302
+ })
16303
+ ])
16304
+ ],
16454
16305
  prefixHeader: settings2("GCC_PREFIX_HEADER") ? absolute(settings2("GCC_PREFIX_HEADER")) : null,
16455
16306
  bridgingHeader: settings2("SWIFT_OBJC_BRIDGING_HEADER") ? absolute(settings2("SWIFT_OBJC_BRIDGING_HEADER")) : null,
16456
16307
  headerSearchPaths: [
@@ -16461,7 +16312,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
16461
16312
  settings2("FRAMEWORK_SEARCH_PATHS")
16462
16313
  ).flatMap((raw) => expandSearchPath(absolute(raw), searchRules)),
16463
16314
  flags: [
16464
- ...settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? ["-fobjc-arc"] : [],
16315
+ settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
16465
16316
  ...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
16466
16317
  ...settings2("CLANG_ENABLE_MODULES") === "YES" ? ["-fmodules"] : [],
16467
16318
  ...settings2("GCC_C_LANGUAGE_STANDARD") ? [`-std=${settings2("GCC_C_LANGUAGE_STANDARD")}`] : [],
@@ -17361,6 +17212,35 @@ function insertNativeFirebaseFooter(source, config) {
17361
17212
  return start < 0 ? detached + footer : detached.slice(0, start) + footer + detached.slice(start);
17362
17213
  }
17363
17214
 
17215
+ // src/metro-plugin.ts
17216
+ init_runtime_assets();
17217
+
17218
+ // src/runtimePlatformContract.ts
17219
+ var IOS_ADAPTER = Object.freeze({
17220
+ id: "ios",
17221
+ displayName: "iOS",
17222
+ isIOS: true,
17223
+ isAndroid: false,
17224
+ select: (registry) => registry.ios
17225
+ });
17226
+ var ANDROID_ADAPTER = Object.freeze({
17227
+ id: "android",
17228
+ displayName: "Android",
17229
+ isIOS: false,
17230
+ isAndroid: true,
17231
+ select: (registry) => registry.android
17232
+ });
17233
+ var RUNTIME_PLATFORM_ADAPTERS = Object.freeze({
17234
+ ios: IOS_ADAPTER,
17235
+ android: ANDROID_ADAPTER
17236
+ });
17237
+ function isRuntimePlatform(value) {
17238
+ return value === "ios" || value === "android";
17239
+ }
17240
+ function getRuntimePlatformAdapter(platform) {
17241
+ return RUNTIME_PLATFORM_ADAPTERS[platform];
17242
+ }
17243
+
17364
17244
  // src/metro-plugin.ts
17365
17245
  var prefix = "/__peachsim";
17366
17246
  function isMetroSerializerArtifacts(value) {