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.
- package/README.md +12 -0
- package/cli/app-catalog.ts +1 -1
- package/cli/app-fonts.ts +11 -80
- package/cli/app-splash.ts +18 -12
- package/cli/bridge-flow-runner.ts +11 -7
- package/cli/cloud-client.ts +10 -13
- package/cli/command-registry.ts +13 -4
- package/cli/commands/box.ts +4 -4
- package/cli/commands/control.ts +93 -53
- package/cli/commands/coverage-parser.ts +67 -0
- package/cli/commands/coverage.ts +550 -0
- package/cli/commands/debug.ts +9 -18
- package/cli/commands/desktop.ts +19 -7
- package/cli/commands/device.ts +14 -9
- package/cli/commands/guest-host.ts +6 -10
- package/cli/commands/inspect/core.ts +81 -17
- package/cli/commands/inspect.ts +13 -8
- package/cli/commands/kotlin.ts +2 -2
- package/cli/commands/maestro-compare.ts +1 -1
- package/cli/commands/platform.ts +20 -11
- package/cli/commands/preview.ts +16 -18
- package/cli/commands/runtime.ts +3 -2
- package/cli/commands/screenshot-layers.ts +1 -1
- package/cli/commands/screenshot.ts +1 -1
- package/cli/commands/serve.ts +5 -1
- package/cli/commands/support.ts +4 -4
- package/cli/commands/three-mode.ts +22 -15
- package/cli/commands/upload.ts +44 -45
- package/cli/current-sim.ts +38 -0
- package/cli/desktop-companion.ts +36 -8
- package/cli/device-option.ts +1 -1
- package/cli/drivers/playwright.ts +1 -0
- package/cli/drivers/types.ts +4 -0
- package/cli/help-core.ts +1 -1
- package/cli/internal-child.ts +2 -1
- package/cli/main.ts +9 -3
- package/cli/outbound-endpoints.ts +11 -3
- package/cli/output-redaction.ts +39 -14
- package/cli/remote-simulators.ts +4 -1
- package/cli/scene-video.ts +5 -2
- package/cli/send-to-box.ts +7 -10
- package/cli/telemetry.ts +1 -1
- package/cli/ws-bridge.ts +8 -1
- package/detox/attempt-events.cjs +3 -1
- package/detox/attempt-events.d.cts +1 -1
- package/detox/expectations.ts +108 -99
- package/detox/frame-offset.d.mts +6 -0
- package/detox/frame-offset.mjs +35 -0
- package/detox/gestures.ts +6 -18
- package/detox/index.ts +169 -101
- package/detox/jest-preset.cjs +1 -3
- package/detox/jest-transform.cjs +4 -0
- package/detox/matchers.ts +3 -0
- package/detox/motion-change.cjs +46 -114
- package/detox/motion-change.d.cts +5 -27
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +65 -1
- package/dist-lib/bridge-contract-input.mjs +63 -1
- package/dist-lib/bridge-contract.cjs +19 -1
- package/dist-lib/bridge-contract.mjs +17 -1
- package/dist-lib/bundle-channel.cjs +38091 -14846
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -3
- package/dist-lib/detox/index.cjs +1244 -4509
- package/dist-lib/detox/jest-preset.cjs +1 -3
- package/dist-lib/detox/jest-transform.cjs +4 -0
- package/dist-lib/dev-bundle-resolution.cjs +28 -24
- package/dist-lib/expo-swift-bundle.cjs +35049 -13125
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +45112 -63143
- package/dist-lib/host/fetch-proxy-handler.cjs +3544 -11
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1909 -2029
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +380 -522
- package/dist-lib/native-app-identity-project.cjs +39 -252
- package/dist-lib/native-app-identity-project.mjs +1174 -11
- package/dist-lib/native-app-identity.cjs +8 -3
- package/dist-lib/native-app-identity.mjs +8 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -244
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +290 -0
- package/dist-lib/public-origins-lib-static.json +1 -0
- package/dist-lib/public-origins-lib.json +1852 -0
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +14 -253
- package/dist-lib/sdk.cjs +83 -16
- package/dist-lib/sdk.mjs +81 -15
- package/dist-lib/skills.cjs +50546 -75098
- package/dist-lib/swift-compile.cjs +25897 -1070
- package/dist-lib/swift-compile.mjs +25866 -1033
- package/dist-lib/swift-package.cjs +79 -1
- package/dist-lib/swift-package.mjs +75 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +34273 -12349
- package/dist-lib/vite.cjs +373 -298
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/engine-config.d.ts +2 -0
- package/dist-types/packages/peach-compat/src/stubs/form-sheet-spring.d.ts +9 -0
- package/dist-types/packages/peach-compat/src/stubs/native-evaluation-lease.d.ts +47 -0
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +113 -0
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +154 -0
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +756 -0
- package/dist-types/packages/peach-compat/src/stubs/transition-scalar.d.ts +25 -0
- package/dist-types/packages/peach-engine/src/billing/plans.d.ts +64 -0
- package/dist-types/packages/peach-engine/src/browser-page-target.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/bundle-platform-url.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/capture/browser-accessibility-host.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/capture/browser-composite.d.ts +55 -0
- package/dist-types/packages/peach-engine/src/capture/browserAccessibilityContract.d.ts +27 -0
- package/dist-types/packages/peach-engine/src/capture/nativeScreenCaptureContract.d.ts +22 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +36 -0
- package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +34 -0
- package/dist-types/packages/peach-engine/src/config.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/android-stretch-effect.d.ts +57 -0
- package/dist-types/packages/peach-engine/src/engine/animated-driven-style.d.ts +47 -0
- package/dist-types/packages/peach-engine/src/engine/animated-value.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +195 -0
- package/dist-types/packages/peach-engine/src/engine/animation-clockContract.d.ts +15 -0
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +148 -0
- package/dist-types/packages/peach-engine/src/engine/app-catalog-wire.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/engine/app-font-registry.d.ts +87 -0
- package/dist-types/packages/peach-engine/src/engine/attributed-paragraph-paint.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/attributed-paragraph.d.ts +123 -0
- package/dist-types/packages/peach-engine/src/engine/audioContract.d.ts +16 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +93 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +216 -0
- package/dist-types/packages/peach-engine/src/engine/config-plugin-fonts.d.ts +40 -0
- package/dist-types/packages/peach-engine/src/engine/config-plugin-splash.d.ts +25 -0
- package/dist-types/packages/peach-engine/src/engine/cull-visibility.d.ts +44 -0
- package/dist-types/packages/peach-engine/src/engine/damage-rect.d.ts +19 -0
- package/dist-types/packages/peach-engine/src/engine/engine-resource.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/expo-manifest.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +30 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +139 -0
- package/dist-types/packages/peach-engine/src/engine/generated/sf-pro-font.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +31 -0
- package/dist-types/packages/peach-engine/src/engine/host-composite.d.ts +100 -0
- package/dist-types/packages/peach-engine/src/engine/hosted-semantics.d.ts +49 -0
- package/dist-types/packages/peach-engine/src/engine/image-audit.d.ts +70 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +350 -0
- package/dist-types/packages/peach-engine/src/engine/inspect-info.d.ts +27 -0
- package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/engine/inspect-visibility.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/engine/ios-fast-scroll.d.ts +16 -0
- package/dist-types/packages/peach-engine/src/engine/layout-sab.d.ts +43 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass-rect.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass-shaders.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +283 -0
- package/dist-types/packages/peach-engine/src/engine/live-object-counts.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/lottie-runtime.d.ts +32 -0
- package/dist-types/packages/peach-engine/src/engine/lottie-types.d.ts +138 -0
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +27 -0
- package/dist-types/packages/peach-engine/src/engine/metalDirectContract.d.ts +108 -0
- package/dist-types/packages/peach-engine/src/engine/metalShaderContract.d.ts +217 -0
- package/dist-types/packages/peach-engine/src/engine/native-animation-driver.d.ts +112 -0
- package/dist-types/packages/peach-engine/src/engine/native-animation-graph.d.ts +62 -0
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +133 -0
- package/dist-types/packages/peach-engine/src/engine/native-resources.d.ts +26 -0
- package/dist-types/packages/peach-engine/src/engine/nativeReanimatedContract.d.ts +25 -0
- package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +64 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +589 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary-types.d.ts +112 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +57 -0
- package/dist-types/packages/peach-engine/src/engine/portalContract.d.ts +21 -0
- package/dist-types/packages/peach-engine/src/engine/portals.d.ts +20 -0
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +107 -0
- package/dist-types/packages/peach-engine/src/engine/riveContract.d.ts +420 -0
- package/dist-types/packages/peach-engine/src/engine/rn-spring.d.ts +51 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +379 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +152 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +75 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-range.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-velocity.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +320 -0
- package/dist-types/packages/peach-engine/src/engine/signal.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/snapshot-cache-policy.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/svg-geometry.d.ts +41 -0
- package/dist-types/packages/peach-engine/src/engine/text-attachment-paragraphs.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/engine/text-decoration.d.ts +11 -0
- package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +22 -0
- package/dist-types/packages/peach-engine/src/engine/text-paint-receipt.d.ts +98 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +11 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraphContract.d.ts +34 -0
- package/dist-types/packages/peach-engine/src/engine/text-transform.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +657 -0
- package/dist-types/packages/peach-engine/src/engine/visible-frame.d.ts +54 -0
- package/dist-types/packages/peach-engine/src/engine/webrtcContract.d.ts +74 -0
- package/dist-types/packages/peach-engine/src/graphite-stats-fields.d.ts +184 -0
- package/dist-types/packages/peach-engine/src/guest-import-meta.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/guest-module-overrides.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/ios/app-card-types.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +177 -0
- package/dist-types/packages/peach-engine/src/ios/aux-home-scene.d.ts +54 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +47 -0
- package/dist-types/packages/peach-engine/src/ios/constants.d.ts +21 -0
- package/dist-types/packages/peach-engine/src/ios/duo-housing.d.ts +37 -0
- package/dist-types/packages/peach-engine/src/ios/home/types.d.ts +29 -0
- package/dist-types/packages/peach-engine/src/ios/home-app-catalog.d.ts +43 -0
- package/dist-types/packages/peach-engine/src/ios/photo-store.d.ts +73 -0
- package/dist-types/packages/peach-engine/src/ios/photoLibraryContract.d.ts +166 -0
- package/dist-types/packages/peach-engine/src/ios/shell-controller-types.d.ts +21 -0
- package/dist-types/packages/peach-engine/src/ios/shell-transition-debug.d.ts +18 -0
- package/dist-types/packages/peach-engine/src/metro-asset-path.d.ts +21 -0
- package/dist-types/packages/peach-engine/src/metro-fingerprint-registry-client.d.ts +11 -0
- package/dist-types/packages/peach-engine/src/metro-fingerprint.d.ts +38 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +44 -0
- package/dist-types/packages/peach-engine/src/observability/types.d.ts +74 -0
- package/dist-types/packages/peach-engine/src/peach-warm-manifest.d.ts +32 -0
- package/dist-types/packages/peach-engine/src/permissions/app-settings-client.d.ts +25 -0
- package/dist-types/packages/peach-engine/src/permissions/system-permission-types.d.ts +20 -0
- package/dist-types/packages/peach-engine/src/platform/android-back-panel.d.ts +131 -0
- package/dist-types/packages/peach-engine/src/platform/android-gesture-exclusion.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/platform/android-predictive-back.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/platform/system-bars-state.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/playwright-sim-host.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-variantContract.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/preview/capture-bundle.d.ts +26 -0
- package/dist-types/packages/peach-engine/src/preview/compress-node.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/preview/compress.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/preview/presigned-upload.d.ts +60 -0
- package/dist-types/packages/peach-engine/src/preview/trace.d.ts +144 -0
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +152 -0
- package/dist-types/packages/peach-engine/src/profiler/animation-recording-loader.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/profiler/profile-trace.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/react-bridge.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/react-native/AppState.d.ts +45 -0
- package/dist-types/packages/peach-engine/src/react-native/Appearance.d.ts +34 -0
- package/dist-types/packages/peach-engine/src/react-native/framework-colors-data.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/react-native/host-services.d.ts +42 -0
- package/dist-types/packages/peach-engine/src/react-native/layout-animation.d.ts +22 -0
- package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/remote-stream/client-config.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +58 -0
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +45 -0
- package/dist-types/packages/peach-engine/src/render-worker/animated-drive-output.d.ts +35 -0
- package/dist-types/packages/peach-engine/src/render-worker/app-load.d.ts +16 -0
- package/dist-types/packages/peach-engine/src/render-worker/aux-surface-types.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-shared.d.ts +42 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +434 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-worker-init.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-backend.d.ts +31 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +202 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1945 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-resample.d.ts +44 -0
- package/dist-types/packages/peach-engine/src/render-worker/css-keyframes-drive.d.ts +36 -0
- package/dist-types/packages/peach-engine/src/render-worker/edit-menu-geometry.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/engine-resource-relay.d.ts +21 -0
- package/dist-types/packages/peach-engine/src/render-worker/expo-widgetContract.d.ts +16 -0
- package/dist-types/packages/peach-engine/src/render-worker/gesture-seam-protocol.d.ts +152 -0
- package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +29 -0
- package/dist-types/packages/peach-engine/src/render-worker/graphite-pipeline-compiler-contract.d.ts +49 -0
- package/dist-types/packages/peach-engine/src/render-worker/graphite-pipeline-compiler.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +756 -0
- package/dist-types/packages/peach-engine/src/render-worker/image-lifecycle-event.d.ts +22 -0
- package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +48 -0
- package/dist-types/packages/peach-engine/src/render-worker/live-frame-mirror.d.ts +34 -0
- package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +189 -0
- package/dist-types/packages/peach-engine/src/render-worker/mapNativeContract.d.ts +101 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-dynamic-synchronizable.d.ts +22 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-menu-gesture.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1087 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +100 -0
- package/dist-types/packages/peach-engine/src/render-worker/nativeAnimMirrorContract.d.ts +174 -0
- package/dist-types/packages/peach-engine/src/render-worker/nativeSyncReplyContract.d.ts +11 -0
- package/dist-types/packages/peach-engine/src/render-worker/one-native-contentContract.d.ts +54 -0
- package/dist-types/packages/peach-engine/src/render-worker/pointerSampleContract.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +880 -0
- package/dist-types/packages/peach-engine/src/render-worker/reanimated-css-contract.d.ts +63 -0
- package/dist-types/packages/peach-engine/src/render-worker/reanimated-readiness.d.ts +29 -0
- package/dist-types/packages/peach-engine/src/render-worker/resilient-frame-clock.d.ts +22 -0
- package/dist-types/packages/peach-engine/src/render-worker/retained-app-load.d.ts +20 -0
- package/dist-types/packages/peach-engine/src/render-worker/screen-edge-swipe-commit-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/screen-form-sheet-commit-protocol.d.ts +26 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror-tenant.d.ts +37 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +164 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-event-registry.d.ts +119 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-gesture-regions.d.ts +41 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +603 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-scene-schema.d.ts +101 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-inline-sources.d.ts +13 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +87 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +47 -0
- package/dist-types/packages/peach-engine/src/render-worker/text-inputContract.d.ts +93 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +102 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +292 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +107 -0
- package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +16 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +211 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-storage.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +987 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-sab.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +84 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +31 -0
- package/dist-types/packages/peach-engine/src/screenshots/timeline-assets.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/screenshots/tokens.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +70 -0
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +87 -0
- package/dist-types/packages/peach-engine/src/settings/interface-rotation.d.ts +30 -0
- package/dist-types/packages/peach-engine/src/settings/react-native-configuration.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/settings/scene-geometryContract.d.ts +40 -0
- package/dist-types/packages/peach-engine/src/settings/store.d.ts +37 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +203 -0
- package/dist-types/packages/peach-engine/src/shell-intent.d.ts +68 -0
- package/dist-types/packages/peach-engine/src/sootsim-event.d.ts +35 -0
- package/dist-types/packages/peach-engine/src/top-overlay-state.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/web-authentication-automation-host.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/webAuthenticationContract.d.ts +34 -0
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +180 -0
- package/dist-types/packages/peach-engine/src/wireframe-mode.d.ts +16 -0
- package/dist-types/packages/peach-globals/src/frameBreakdownContract.d.ts +16 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +3311 -0
- package/dist-types/packages/peach-globals/src/nativeSurfaceContract.d.ts +76 -0
- package/dist-types/packages/peach-globals/src/pointerSourceEventContract.d.ts +8 -0
- package/dist-types/packages/peach-globals/src/profileTrace.d.ts +11 -0
- package/dist-types/packages/peach-globals/src/profilerContract.d.ts +223 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +721 -0
- package/dist-types/packages/peach-kit/src/internal.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +27 -0
- package/dist-types/packages/peach-kit/src/materials/uikit-blur-material.d.ts +14 -0
- package/dist-types/packages/peach-kit/src/navigation-types.d.ts +11 -0
- package/dist-types/packages/peach-kit/src/react-bridge.d.ts +53 -0
- package/dist-types/packages/peach-kit/src/runtime.d.ts +26 -0
- package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +24 -0
- package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +53 -0
- package/dist-types/packages/peach-kit/src/ui/presentationContract.d.ts +17 -0
- package/kotlin/ComposeSources/PeachComposeHost.kt +1 -1
- package/kotlin/JniSources/com/facebook/jni/HybridData.kt +0 -2
- package/kotlin/JniSources/dev/peach/jni/NativeBindings.kt +0 -2
- package/kotlin/JniTransportSources/dev/peach/jni/integration/JniTransport.kt +0 -2
- package/kotlin/README.md +6 -0
- package/package.json +22 -2
- package/runtime-companion.json +1 -0
- package/skills/contrast/SKILL.md +1 -0
- package/src/assetCatalogContract.ts +21 -0
- package/src/bridge-contract-input.ts +84 -0
- package/src/bridge-contract.ts +35 -3
- package/src/browser-launch-policy.ts +1 -0
- package/src/bundle-channel.mjs +4 -2
- package/src/cli-runtime.ts +55 -0
- package/src/crash-fingerprint.ts +26 -0
- package/src/dev-bundle-resolution.ts +50 -23
- package/src/device-catalog.ts +1159 -0
- package/src/host/bridge-host.ts +3 -26
- package/src/host/browser-pointer.ts +71 -0
- package/src/host/dev-server-package-versions.ts +23 -0
- package/src/host/fetch-proxy-handler.ts +17 -4
- package/src/installed-package-versions.ts +142 -38
- package/src/kotlin-host.ts +1 -1
- package/src/metro-plugin.ts +4 -4
- package/src/metro-project-root.ts +68 -0
- package/src/nitro-adapter.lock.json +26 -0
- package/src/nitro-adapter.ts +103 -0
- package/src/nitro-bundle.ts +24 -10
- package/src/nitro-compile.ts +33 -51
- package/src/nitro-source.ts +177 -96
- package/src/nitroAdapterContract.ts +217 -0
- package/src/nitroContract.ts +24 -11
- package/src/process-group.ts +41 -34
- package/src/react-bridge-importers.ts +28 -0
- package/src/reactNativeConfigurationContract.ts +36 -0
- package/src/runtime-assets.ts +7 -2
- package/src/runtime-delivery.ts +2 -0
- package/src/runtimePlatformContract.ts +70 -0
- package/src/screenshots/frame-compose.ts +42 -43
- package/src/screenshots/org-deck.ts +9 -4
- package/src/screenshots/preset-names.ts +29 -0
- package/src/screenshots/registry.ts +5 -5
- package/src/screenshots/schema.ts +1 -1
- package/src/screenshots/screenshotContract.ts +971 -0
- package/src/settings-flags.ts +107 -0
- package/src/settingsContract.ts +609 -0
- package/src/storageSnapshotContract.ts +344 -0
- package/src/stub-pattern-matcher.ts +550 -0
- package/src/swift-compile.ts +908 -40
- package/src/swift-compiler-digest.ts +13 -1
- package/src/swift-distribution.lock.json +49 -22
- package/src/swift-host.ts +167 -52
- package/src/swift-objc-compile.ts +54 -24
- package/src/swift-objc-export.ts +532 -0
- package/src/swift-objc-import.ts +769 -0
- package/src/swift-objc-metadata.ts +285 -10
- package/src/swift-objc-sdk.ts +13970 -158
- package/src/swift-objc-standin.ts +137 -1
- package/src/swift-package.ts +94 -0
- package/src/swift-packages.ts +5 -5
- package/src/swift-submit.ts +6 -0
- package/src/swiftContract.ts +99 -0
- package/src/target-matcher.ts +6 -1
- package/src/vite-plugin.ts +14 -40
- package/src/worker-system-chunks.ts +1 -1
- package/src/workerChunkContract.ts +5 -0
- package/src/worklets-babel.ts +24 -5
- package/src/xcode-project.ts +36 -7
- package/src/xcode-target-members.ts +10 -3
- package/cli/drivers/playwright-sim-host.ts +0 -825
- package/kotlin/fixtures/counter/Counter.d.kt.ts +0 -17
- package/kotlin/fixtures/counter/Counter.kt +0 -51
- package/kotlin/fixtures/counter/CounterApp.native.tsx +0 -61
- package/kotlin/fixtures/counter/CounterApp.tsx +0 -3
- package/kotlin/fixtures/counter/CounterScreen.d.kt.ts +0 -8
- package/kotlin/fixtures/counter/CounterScreen.kt +0 -56
- package/kotlin/fixtures/counter/app/_layout.tsx +0 -4
- package/kotlin/fixtures/counter/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/counter/app/routes.d.ts +0 -18
- package/kotlin/fixtures/counter/package.json +0 -20
- package/kotlin/fixtures/counter/tsconfig.json +0 -19
- package/kotlin/fixtures/counter/vite.config.ts +0 -20
- package/kotlin/fixtures/headless-counter/Headless.kt +0 -234
- package/kotlin/fixtures/import-animation/Animation.d.kt.ts +0 -7
- package/kotlin/fixtures/import-animation/Animation.kt +0 -80
- package/kotlin/fixtures/import-animation/ImportAnimation.native.tsx +0 -13
- package/kotlin/fixtures/import-animation/README.md +0 -24
- package/kotlin/fixtures/import-animation/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-animation/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-animation/app/routes.d.ts +0 -18
- package/kotlin/fixtures/import-animation/package.json +0 -23
- package/kotlin/fixtures/import-animation/tsconfig.json +0 -20
- package/kotlin/fixtures/import-animation/vite.config.ts +0 -20
- package/kotlin/fixtures/import-drawing/Drawing.d.kt.ts +0 -7
- package/kotlin/fixtures/import-drawing/Drawing.kt +0 -101
- package/kotlin/fixtures/import-drawing/ImportDrawing.native.tsx +0 -18
- package/kotlin/fixtures/import-drawing/README.md +0 -34
- package/kotlin/fixtures/import-drawing/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-drawing/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-drawing/package.json +0 -23
- package/kotlin/fixtures/import-drawing/tsconfig.json +0 -20
- package/kotlin/fixtures/import-drawing/vite.config.ts +0 -20
- package/kotlin/fixtures/import-editor/Editor.d.kt.ts +0 -7
- package/kotlin/fixtures/import-editor/Editor.kt +0 -59
- package/kotlin/fixtures/import-editor/ImportEditor.native.tsx +0 -23
- package/kotlin/fixtures/import-editor/README.md +0 -27
- package/kotlin/fixtures/import-editor/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-editor/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-editor/package.json +0 -23
- package/kotlin/fixtures/import-editor/tsconfig.json +0 -20
- package/kotlin/fixtures/import-editor/vite.config.ts +0 -20
- package/kotlin/fixtures/import-effects/Effects.d.kt.ts +0 -7
- package/kotlin/fixtures/import-effects/Effects.kt +0 -87
- package/kotlin/fixtures/import-effects/ImportEffects.native.tsx +0 -13
- package/kotlin/fixtures/import-effects/README.md +0 -19
- package/kotlin/fixtures/import-effects/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-effects/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-effects/package.json +0 -23
- package/kotlin/fixtures/import-effects/tsconfig.json +0 -20
- package/kotlin/fixtures/import-effects/vite.config.ts +0 -20
- package/kotlin/fixtures/import-layout/ImportLayout.native.tsx +0 -13
- package/kotlin/fixtures/import-layout/Layout.d.kt.ts +0 -7
- package/kotlin/fixtures/import-layout/Layout.kt +0 -72
- package/kotlin/fixtures/import-layout/README.md +0 -24
- package/kotlin/fixtures/import-layout/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-layout/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-layout/package.json +0 -23
- package/kotlin/fixtures/import-layout/tsconfig.json +0 -20
- package/kotlin/fixtures/import-layout/vite.config.ts +0 -20
- package/kotlin/fixtures/import-navigation/ImportNavigation.native.tsx +0 -18
- package/kotlin/fixtures/import-navigation/Navigation.d.kt.ts +0 -7
- package/kotlin/fixtures/import-navigation/Navigation.kt +0 -104
- package/kotlin/fixtures/import-navigation/README.md +0 -31
- package/kotlin/fixtures/import-navigation/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-navigation/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-navigation/package.json +0 -23
- package/kotlin/fixtures/import-navigation/tsconfig.json +0 -20
- package/kotlin/fixtures/import-navigation/vite.config.ts +0 -20
- package/kotlin/fixtures/import-overlays/ImportOverlays.native.tsx +0 -29
- package/kotlin/fixtures/import-overlays/Overlays.d.kt.ts +0 -7
- package/kotlin/fixtures/import-overlays/Overlays.kt +0 -93
- package/kotlin/fixtures/import-overlays/README.md +0 -34
- package/kotlin/fixtures/import-overlays/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-overlays/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-overlays/package.json +0 -23
- package/kotlin/fixtures/import-overlays/tsconfig.json +0 -20
- package/kotlin/fixtures/import-overlays/vite.config.ts +0 -20
- package/kotlin/fixtures/import-resources/ImportResources.native.tsx +0 -18
- package/kotlin/fixtures/import-resources/README.md +0 -26
- package/kotlin/fixtures/import-resources/Resources.d.kt.ts +0 -6
- package/kotlin/fixtures/import-resources/Resources.kt +0 -72
- package/kotlin/fixtures/import-resources/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-resources/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-resources/package.json +0 -23
- package/kotlin/fixtures/import-resources/tsconfig.json +0 -20
- package/kotlin/fixtures/import-resources/vite.config.ts +0 -20
- package/kotlin/fixtures/import-scroll/ImportNested.native.tsx +0 -10
- package/kotlin/fixtures/import-scroll/ImportScroll.native.tsx +0 -13
- package/kotlin/fixtures/import-scroll/Nested.d.kt.ts +0 -4
- package/kotlin/fixtures/import-scroll/Nested.kt +0 -64
- package/kotlin/fixtures/import-scroll/README.md +0 -38
- package/kotlin/fixtures/import-scroll/Scroll.d.kt.ts +0 -7
- package/kotlin/fixtures/import-scroll/Scroll.kt +0 -91
- package/kotlin/fixtures/import-scroll/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-scroll/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-scroll/app/nested+spa.tsx +0 -1
- package/kotlin/fixtures/import-scroll/package.json +0 -23
- package/kotlin/fixtures/import-scroll/tsconfig.json +0 -20
- package/kotlin/fixtures/import-scroll/vite.config.ts +0 -20
- package/kotlin/fixtures/import-selection/ImportSelection.native.tsx +0 -44
- package/kotlin/fixtures/import-selection/README.md +0 -32
- package/kotlin/fixtures/import-selection/Selection.d.kt.ts +0 -8
- package/kotlin/fixtures/import-selection/Selection.kt +0 -78
- package/kotlin/fixtures/import-selection/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-selection/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-selection/package.json +0 -23
- package/kotlin/fixtures/import-selection/tsconfig.json +0 -20
- package/kotlin/fixtures/import-selection/vite.config.ts +0 -20
- package/kotlin/fixtures/import-surfaces/ImportSurfaces.native.tsx +0 -13
- package/kotlin/fixtures/import-surfaces/README.md +0 -22
- package/kotlin/fixtures/import-surfaces/Surfaces.d.kt.ts +0 -7
- package/kotlin/fixtures/import-surfaces/Surfaces.kt +0 -64
- package/kotlin/fixtures/import-surfaces/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-surfaces/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-surfaces/package.json +0 -23
- package/kotlin/fixtures/import-surfaces/tsconfig.json +0 -20
- package/kotlin/fixtures/import-surfaces/vite.config.ts +0 -20
- package/kotlin/fixtures/import-values/ImportValues.native.tsx +0 -61
- package/kotlin/fixtures/import-values/README.md +0 -28
- package/kotlin/fixtures/import-values/Values.d.kt.ts +0 -15
- package/kotlin/fixtures/import-values/Values.kt +0 -84
- package/kotlin/fixtures/import-values/app/_layout.tsx +0 -4
- package/kotlin/fixtures/import-values/app/index+spa.tsx +0 -1
- package/kotlin/fixtures/import-values/package.json +0 -23
- package/kotlin/fixtures/import-values/tsconfig.json +0 -20
- package/kotlin/fixtures/import-values/vite.config.ts +0 -20
- package/kotlin/fixtures/kotlin-app/app/build.gradle.kts +0 -30
- package/kotlin/fixtures/kotlin-app/app/src/main/AndroidManifest.xml +0 -13
- package/kotlin/fixtures/kotlin-app/app/src/main/java/dev/contrast/kotlinapp/MainActivity.kt +0 -60
- package/kotlin/fixtures/kotlin-app/app/src/main/java/dev/contrast/kotlinapp/ProbeApplication.kt +0 -18
- package/kotlin/fixtures/kotlin-app/build.gradle.kts +0 -5
- package/kotlin/fixtures/kotlin-app/gradle.properties +0 -4
- package/kotlin/fixtures/kotlin-app/settings.gradle.kts +0 -4
- package/kotlin/fixtures/kotlin-app-variants/Anim.kt +0 -62
- package/kotlin/fixtures/kotlin-app-variants/BarBehavior.kt +0 -38
- package/kotlin/fixtures/kotlin-app-variants/BarVisibility.kt +0 -36
- package/kotlin/fixtures/kotlin-app-variants/Bitmaps.kt +0 -50
- package/kotlin/fixtures/kotlin-app-variants/Browse.kt +0 -73
- package/kotlin/fixtures/kotlin-app-variants/Colors.kt +0 -41
- package/kotlin/fixtures/kotlin-app-variants/Controls.kt +0 -62
- package/kotlin/fixtures/kotlin-app-variants/Drag.kt +0 -56
- package/kotlin/fixtures/kotlin-app-variants/Draw.kt +0 -74
- package/kotlin/fixtures/kotlin-app-variants/Drawables.kt +0 -53
- package/kotlin/fixtures/kotlin-app-variants/Focus.kt +0 -62
- package/kotlin/fixtures/kotlin-app-variants/Form.kt +0 -47
- package/kotlin/fixtures/kotlin-app-variants/Icons.kt +0 -59
- package/kotlin/fixtures/kotlin-app-variants/Ime.kt +0 -53
- package/kotlin/fixtures/kotlin-app-variants/Lists.kt +0 -57
- package/kotlin/fixtures/kotlin-app-variants/Nav.kt +0 -47
- package/kotlin/fixtures/kotlin-app-variants/Note.kt +0 -40
- package/kotlin/fixtures/kotlin-app-variants/Overlays.kt +0 -56
- package/kotlin/fixtures/kotlin-app-variants/Pan.kt +0 -38
- package/kotlin/fixtures/kotlin-app-variants/Pickers.kt +0 -44
- package/kotlin/fixtures/kotlin-app-variants/Press.kt +0 -43
- package/kotlin/fixtures/kotlin-app-variants/Scroll.kt +0 -63
- package/kotlin/fixtures/kotlin-app-variants/Sheet.kt +0 -43
- package/kotlin/fixtures/kotlin-app-variants/Strings.kt +0 -49
- package/kotlin/fixtures/kotlin-app-variants/Tabs.kt +0 -47
- package/kotlin/fixtures/kotlin-app-variants/TextWidth.kt +0 -45
- package/kotlin/fixtures/kotlin-app-variants/TransientInsets.kt +0 -50
- package/kotlin/fixtures/kotlin-app-variants/Transition.kt +0 -69
- package/kotlin/fixtures/kotlin-app-variants/ViewConfig.kt +0 -22
- package/kotlin/fixtures/kotlin-app-variants/Widgets.kt +0 -67
- package/kotlin/fixtures/runtime-state/RuntimeState.kt +0 -200
- package/kotlin/fork/README.md +0 -97
- package/kotlin/fork/build.sh +0 -176
- package/kotlin/fork/compose-worker-globals.patch +0 -1247
- package/kotlin/fork/fork.json +0 -46
- package/kotlin/fork/publish.ts +0 -99
- package/kotlin/fork/skia-android-shaping.patch +0 -189
- package/kotlin/fork/skiko-local.init.gradle +0 -10
- package/kotlin/fork/skiko-worker-clock.patch +0 -122
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
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;
|
|
@@ -32,6 +32,76 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
));
|
|
33
33
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
34
|
|
|
35
|
+
// src/home-paths.ts
|
|
36
|
+
function rnxHomeDir() {
|
|
37
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
38
|
+
if (override && override.length > 0) return import_node_path2.default.resolve(override);
|
|
39
|
+
return import_node_path2.default.join((0, import_node_os.homedir)(), ".peach");
|
|
40
|
+
}
|
|
41
|
+
function runtimesDir() {
|
|
42
|
+
return import_node_path2.default.join(rnxHomeDir(), "runtimes");
|
|
43
|
+
}
|
|
44
|
+
function runtimeDir(version) {
|
|
45
|
+
return import_node_path2.default.join(runtimesDir(), version);
|
|
46
|
+
}
|
|
47
|
+
function activeRuntimeFile() {
|
|
48
|
+
return import_node_path2.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
49
|
+
}
|
|
50
|
+
function daemonLockfilePath() {
|
|
51
|
+
return import_node_path2.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
52
|
+
}
|
|
53
|
+
function readActiveRuntime() {
|
|
54
|
+
try {
|
|
55
|
+
const value = import_node_fs2.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
56
|
+
return value.length > 0 ? value : null;
|
|
57
|
+
} catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function readDaemonLockfile() {
|
|
62
|
+
try {
|
|
63
|
+
const fd = import_node_fs2.default.openSync(daemonLockfilePath(), "r");
|
|
64
|
+
try {
|
|
65
|
+
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
66
|
+
const bytesRead = import_node_fs2.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
67
|
+
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
68
|
+
const parsed = JSON.parse(raw);
|
|
69
|
+
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"))) {
|
|
70
|
+
return parsed;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
} finally {
|
|
74
|
+
import_node_fs2.default.closeSync(fd);
|
|
75
|
+
}
|
|
76
|
+
} catch {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
81
|
+
if (!lock) return false;
|
|
82
|
+
if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
|
|
83
|
+
try {
|
|
84
|
+
process.kill(lock.pid, 0);
|
|
85
|
+
return true;
|
|
86
|
+
} catch {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
var import_node_fs2, import_node_os, import_node_path2, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES;
|
|
91
|
+
var init_home_paths = __esm({
|
|
92
|
+
"src/home-paths.ts"() {
|
|
93
|
+
"use strict";
|
|
94
|
+
import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
95
|
+
import_node_os = require("node:os");
|
|
96
|
+
import_node_path2 = __toESM(require("node:path"), 1);
|
|
97
|
+
PEACH_HOME_ENV = "PEACH_HOME";
|
|
98
|
+
ACTIVE_RUNTIME_FILE = "active";
|
|
99
|
+
DAEMON_LOCKFILE = "daemon.json";
|
|
100
|
+
DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
101
|
+
DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
35
105
|
// src/process-group.ts
|
|
36
106
|
var init_process_group = __esm({
|
|
37
107
|
"src/process-group.ts"() {
|
|
@@ -39,6 +109,232 @@ var init_process_group = __esm({
|
|
|
39
109
|
}
|
|
40
110
|
});
|
|
41
111
|
|
|
112
|
+
// ../contrast-runtime-delivery/src/version.ts
|
|
113
|
+
function isValidRuntimeVersion(value) {
|
|
114
|
+
return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
|
|
115
|
+
}
|
|
116
|
+
var init_version = __esm({
|
|
117
|
+
"../contrast-runtime-delivery/src/version.ts"() {
|
|
118
|
+
"use strict";
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// ../contrast-runtime-delivery/src/product.ts
|
|
123
|
+
var init_product = __esm({
|
|
124
|
+
"../contrast-runtime-delivery/src/product.ts"() {
|
|
125
|
+
"use strict";
|
|
126
|
+
init_version();
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// ../contrast-runtime-delivery/src/index.ts
|
|
131
|
+
var init_src = __esm({
|
|
132
|
+
"../contrast-runtime-delivery/src/index.ts"() {
|
|
133
|
+
"use strict";
|
|
134
|
+
init_process_group();
|
|
135
|
+
init_product();
|
|
136
|
+
init_product();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// src/runtime-assets.ts
|
|
141
|
+
function findMonorepoRoot() {
|
|
142
|
+
if (_monorepoRootCache !== void 0) return _monorepoRootCache;
|
|
143
|
+
let dir = import_path2.default.dirname((0, import_url.fileURLToPath)(__sootsim_import_meta_url));
|
|
144
|
+
for (let i = 0; i < 12 && dir !== import_path2.default.dirname(dir); i++) {
|
|
145
|
+
if (import_fs2.default.existsSync(import_path2.default.join(dir, "packages/peach-engine/package.json")) && import_fs2.default.existsSync(import_path2.default.join(dir, "public/sootsim"))) {
|
|
146
|
+
_monorepoRootCache = dir;
|
|
147
|
+
return dir;
|
|
148
|
+
}
|
|
149
|
+
dir = import_path2.default.dirname(dir);
|
|
150
|
+
}
|
|
151
|
+
_monorepoRootCache = null;
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
function resolveDevCheckoutRuntimeAssetRoot() {
|
|
155
|
+
if (process.env.PEACH_HOME && readActiveRuntime()) return null;
|
|
156
|
+
const root = findMonorepoRoot();
|
|
157
|
+
if (!root) return null;
|
|
158
|
+
return import_path2.default.join(root, "public/sootsim");
|
|
159
|
+
}
|
|
160
|
+
function resolveDevCheckoutRuntimeRoot() {
|
|
161
|
+
const devBuild = resolveDevCheckoutRuntimeAssetRoot();
|
|
162
|
+
if (!devBuild) return null;
|
|
163
|
+
if (import_fs2.default.existsSync(import_path2.default.join(devBuild, "index.html")) && import_fs2.default.existsSync(import_path2.default.join(devBuild, "engine/index.html")) && import_fs2.default.existsSync(import_path2.default.join(devBuild, "engine-tenant/worker.js")) && import_fs2.default.existsSync(import_path2.default.join(devBuild, "engine-tenant/worker.prod.js"))) {
|
|
164
|
+
return devBuild;
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
function resolveActiveRuntimeRoot() {
|
|
169
|
+
const devRoot = resolveDevCheckoutRuntimeRoot();
|
|
170
|
+
if (devRoot) return devRoot;
|
|
171
|
+
const active = readActiveRuntime();
|
|
172
|
+
if (!active) return null;
|
|
173
|
+
const dir = runtimeDir(active);
|
|
174
|
+
if (!import_fs2.default.existsSync(import_path2.default.join(dir, "index.html"))) return null;
|
|
175
|
+
return dir;
|
|
176
|
+
}
|
|
177
|
+
function isRuntimeVersionHostname(hostname) {
|
|
178
|
+
return hostname.toLowerCase().endsWith(RUNTIME_VERSION_HOSTNAME_SUFFIX);
|
|
179
|
+
}
|
|
180
|
+
function runtimeVersionFromHostname(hostname) {
|
|
181
|
+
if (!isRuntimeVersionHostname(hostname)) return null;
|
|
182
|
+
const labels = hostname.slice(0, -RUNTIME_VERSION_HOSTNAME_SUFFIX.length).split(".");
|
|
183
|
+
if (labels.length === 0 || labels.some((label) => !/^[0-9a-f]{1,60}$/i.test(label))) {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
const encoded = labels.join("");
|
|
187
|
+
if (encoded.length % 2 !== 0) return null;
|
|
188
|
+
try {
|
|
189
|
+
const version = Buffer.from(encoded, "hex").toString("utf8");
|
|
190
|
+
return isValidRuntimeVersion(version) ? version : null;
|
|
191
|
+
} catch {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function resolveInstalledRuntimeRoot(version) {
|
|
196
|
+
const dir = runtimeDir(version);
|
|
197
|
+
if (!import_fs2.default.existsSync(import_path2.default.join(dir, "index.html"))) return null;
|
|
198
|
+
return dir;
|
|
199
|
+
}
|
|
200
|
+
function resolveRuntimeRootForHostname(hostname) {
|
|
201
|
+
if (!isRuntimeVersionHostname(hostname)) return resolveActiveRuntimeRoot();
|
|
202
|
+
const version = runtimeVersionFromHostname(hostname);
|
|
203
|
+
return version ? resolveInstalledRuntimeRoot(version) : null;
|
|
204
|
+
}
|
|
205
|
+
function resolveRuntimeRootForRequestHost(host) {
|
|
206
|
+
if (!host) return resolveActiveRuntimeRoot();
|
|
207
|
+
try {
|
|
208
|
+
return resolveRuntimeRootForHostname(new URL(`http://${host}`).hostname);
|
|
209
|
+
} catch {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function isRootRuntimeAssetPath(pathname) {
|
|
214
|
+
return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
|
|
215
|
+
}
|
|
216
|
+
function resolveRuntimeFilePath(runtimeRoot, pathname) {
|
|
217
|
+
if (!pathname.startsWith("/")) return null;
|
|
218
|
+
if (pathname.includes("\0") || pathname.includes("\\")) return null;
|
|
219
|
+
for (const segment of pathname.split("/")) {
|
|
220
|
+
if (segment === "..") return null;
|
|
221
|
+
}
|
|
222
|
+
const normalized = pathname.startsWith("/sootsim/") ? pathname.slice("/sootsim".length) : pathname;
|
|
223
|
+
const fullPath = import_path2.default.resolve(runtimeRoot, normalized.replace(/^\/+/, ""));
|
|
224
|
+
const rootWithSep = runtimeRoot.endsWith(import_path2.default.sep) ? runtimeRoot : runtimeRoot + import_path2.default.sep;
|
|
225
|
+
if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
|
|
226
|
+
if (!import_fs2.default.existsSync(fullPath) || !import_fs2.default.statSync(fullPath).isFile()) return null;
|
|
227
|
+
return fullPath;
|
|
228
|
+
}
|
|
229
|
+
function serveRuntimeFile(req, res, fullPath) {
|
|
230
|
+
const ext = import_path2.default.extname(fullPath);
|
|
231
|
+
const stat = import_fs2.default.statSync(fullPath);
|
|
232
|
+
const lastModified = stat.mtime.toUTCString();
|
|
233
|
+
res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
|
|
234
|
+
if (/^canvaskit-graphite-pipelines-[0-9a-f]{8}\.bin$/.test(import_path2.default.basename(fullPath))) {
|
|
235
|
+
res.setHeader("cache-control", "public, max-age=31536000, immutable");
|
|
236
|
+
import_fs2.default.createReadStream(fullPath).pipe(res);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
res.setHeader("cache-control", "no-cache");
|
|
240
|
+
res.setHeader("last-modified", lastModified);
|
|
241
|
+
if (req?.headers?.["if-modified-since"] === lastModified) {
|
|
242
|
+
res.statusCode = 304;
|
|
243
|
+
res.end();
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
sendFileWithRanges(req, res, fullPath, stat.size, {});
|
|
247
|
+
}
|
|
248
|
+
function sendFileWithRanges(req, res, filePath, total, headers) {
|
|
249
|
+
const head = (req?.method || "GET").toUpperCase() === "HEAD";
|
|
250
|
+
const range = /^bytes=(\d*)-(\d*)$/.exec(req?.headers?.range || "");
|
|
251
|
+
const invalid = range && range[1] && range[2] && Number(range[2]) < Number(range[1]);
|
|
252
|
+
if (range && (range[1] || range[2]) && !invalid) {
|
|
253
|
+
const [, startRaw, endRaw] = range;
|
|
254
|
+
const start = startRaw ? Number(startRaw) : Math.max(0, total - Number(endRaw));
|
|
255
|
+
const end = startRaw && endRaw ? Math.min(Number(endRaw), total - 1) : total - 1;
|
|
256
|
+
if (start > end || start >= total) {
|
|
257
|
+
res.writeHead(416, { ...headers, "Content-Range": `bytes */${total}` });
|
|
258
|
+
res.end();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
res.writeHead(206, {
|
|
262
|
+
...headers,
|
|
263
|
+
"Content-Range": `bytes ${start}-${end}/${total}`,
|
|
264
|
+
"Accept-Ranges": "bytes",
|
|
265
|
+
"Content-Length": String(end - start + 1)
|
|
266
|
+
});
|
|
267
|
+
if (head) res.end();
|
|
268
|
+
else streamFile(res, import_fs2.default.createReadStream(filePath, { start, end }));
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
res.writeHead(200, {
|
|
272
|
+
...headers,
|
|
273
|
+
"Accept-Ranges": "bytes",
|
|
274
|
+
"Content-Length": String(total)
|
|
275
|
+
});
|
|
276
|
+
if (head || total === 0) res.end();
|
|
277
|
+
else streamFile(res, import_fs2.default.createReadStream(filePath, { start: 0, end: total - 1 }));
|
|
278
|
+
}
|
|
279
|
+
function streamFile(res, stream) {
|
|
280
|
+
stream.on("error", (error) => res.destroy(error));
|
|
281
|
+
stream.pipe(res);
|
|
282
|
+
}
|
|
283
|
+
var import_fs2, import_path2, import_url, SOOTSIM_RUNTIME_MISSING_MESSAGE, _monorepoRootCache, MIME_TYPES, ROOT_RUNTIME_PATHS, RUNTIME_VERSION_HOSTNAME_SUFFIX;
|
|
284
|
+
var init_runtime_assets = __esm({
|
|
285
|
+
"src/runtime-assets.ts"() {
|
|
286
|
+
"use strict";
|
|
287
|
+
import_fs2 = __toESM(require("fs"), 1);
|
|
288
|
+
import_path2 = __toESM(require("path"), 1);
|
|
289
|
+
import_url = require("url");
|
|
290
|
+
init_src();
|
|
291
|
+
init_home_paths();
|
|
292
|
+
SOOTSIM_RUNTIME_MISSING_MESSAGE = "[peach] no engine runtime installed. run `peach runtime install`";
|
|
293
|
+
MIME_TYPES = {
|
|
294
|
+
".js": "application/javascript",
|
|
295
|
+
".mjs": "application/javascript",
|
|
296
|
+
".css": "text/css",
|
|
297
|
+
".html": "text/html",
|
|
298
|
+
".wasm": "application/wasm",
|
|
299
|
+
".json": "application/json",
|
|
300
|
+
".jpg": "image/jpeg",
|
|
301
|
+
".jpeg": "image/jpeg",
|
|
302
|
+
".png": "image/png",
|
|
303
|
+
".svg": "image/svg+xml",
|
|
304
|
+
".webp": "image/webp",
|
|
305
|
+
".glb": "model/gltf-binary",
|
|
306
|
+
".ttf": "font/ttf",
|
|
307
|
+
".otf": "font/otf",
|
|
308
|
+
".woff": "font/woff",
|
|
309
|
+
".woff2": "font/woff2",
|
|
310
|
+
".mp3": "audio/mpeg",
|
|
311
|
+
".wav": "audio/wav",
|
|
312
|
+
".mp4": "video/mp4",
|
|
313
|
+
".m4v": "video/mp4",
|
|
314
|
+
".mov": "video/quicktime",
|
|
315
|
+
".webm": "video/webm"
|
|
316
|
+
};
|
|
317
|
+
ROOT_RUNTIME_PATHS = [
|
|
318
|
+
"/assets/",
|
|
319
|
+
"/engine/",
|
|
320
|
+
"/engine-tenant/",
|
|
321
|
+
"/photos/",
|
|
322
|
+
"/three-mode/",
|
|
323
|
+
"/fonts/",
|
|
324
|
+
"/icons/",
|
|
325
|
+
"/sounds/",
|
|
326
|
+
"/spike/",
|
|
327
|
+
"/test-wallpaper.jpg",
|
|
328
|
+
"/preview-sw.js",
|
|
329
|
+
"/peach.svg",
|
|
330
|
+
"/bedrock-sqlite.wasm",
|
|
331
|
+
"/bedrock-sqlite.js",
|
|
332
|
+
"/sootsim/"
|
|
333
|
+
];
|
|
334
|
+
RUNTIME_VERSION_HOSTNAME_SUFFIX = ".runtime.localhost";
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
|
|
42
338
|
// src/vite-plugin-one.ts
|
|
43
339
|
var vite_plugin_one_exports = {};
|
|
44
340
|
__export(vite_plugin_one_exports, {
|
|
@@ -134,69 +430,8 @@ function launchRnxDesktop(bundleUrl, appName) {
|
|
|
134
430
|
observeRnxDesktopLaunch(child, appName);
|
|
135
431
|
}
|
|
136
432
|
|
|
137
|
-
// src/
|
|
138
|
-
|
|
139
|
-
var import_node_os = require("node:os");
|
|
140
|
-
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
141
|
-
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
142
|
-
var ACTIVE_RUNTIME_FILE = "active";
|
|
143
|
-
var DAEMON_LOCKFILE = "daemon.json";
|
|
144
|
-
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
145
|
-
function rnxHomeDir() {
|
|
146
|
-
const override = process.env[PEACH_HOME_ENV];
|
|
147
|
-
if (override && override.length > 0) return import_node_path2.default.resolve(override);
|
|
148
|
-
return import_node_path2.default.join((0, import_node_os.homedir)(), ".peach");
|
|
149
|
-
}
|
|
150
|
-
function runtimesDir() {
|
|
151
|
-
return import_node_path2.default.join(rnxHomeDir(), "runtimes");
|
|
152
|
-
}
|
|
153
|
-
function runtimeDir(version) {
|
|
154
|
-
return import_node_path2.default.join(runtimesDir(), version);
|
|
155
|
-
}
|
|
156
|
-
function activeRuntimeFile() {
|
|
157
|
-
return import_node_path2.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
158
|
-
}
|
|
159
|
-
function daemonLockfilePath() {
|
|
160
|
-
return import_node_path2.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
161
|
-
}
|
|
162
|
-
function readActiveRuntime() {
|
|
163
|
-
try {
|
|
164
|
-
const value = import_node_fs2.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
165
|
-
return value.length > 0 ? value : null;
|
|
166
|
-
} catch {
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
171
|
-
function readDaemonLockfile() {
|
|
172
|
-
try {
|
|
173
|
-
const fd = import_node_fs2.default.openSync(daemonLockfilePath(), "r");
|
|
174
|
-
try {
|
|
175
|
-
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
176
|
-
const bytesRead = import_node_fs2.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
177
|
-
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
178
|
-
const parsed = JSON.parse(raw);
|
|
179
|
-
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"))) {
|
|
180
|
-
return parsed;
|
|
181
|
-
}
|
|
182
|
-
return null;
|
|
183
|
-
} finally {
|
|
184
|
-
import_node_fs2.default.closeSync(fd);
|
|
185
|
-
}
|
|
186
|
-
} catch {
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
191
|
-
if (!lock) return false;
|
|
192
|
-
if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
|
|
193
|
-
try {
|
|
194
|
-
process.kill(lock.pid, 0);
|
|
195
|
-
return true;
|
|
196
|
-
} catch {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
433
|
+
// src/vite-plugin-one.ts
|
|
434
|
+
init_home_paths();
|
|
200
435
|
|
|
201
436
|
// src/host/replacement-module-handler.ts
|
|
202
437
|
var import_node_fs3 = require("node:fs");
|
|
@@ -692,7 +927,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
692
927
|
"@giphy/react-native-sdk",
|
|
693
928
|
"@google/react-native-make-payment",
|
|
694
929
|
"@googlemaps/react-native-navigation-sdk",
|
|
695
|
-
"@invertase/react-native-apple-authentication",
|
|
696
930
|
"@iterable/expo-plugin",
|
|
697
931
|
"@kingstinct/react-native-healthkit",
|
|
698
932
|
"@livekit/react-native",
|
|
@@ -3511,7 +3745,7 @@ var COMPAT_STUBS = {
|
|
|
3511
3745
|
}
|
|
3512
3746
|
};
|
|
3513
3747
|
|
|
3514
|
-
//
|
|
3748
|
+
// src/stub-pattern-matcher.ts
|
|
3515
3749
|
function extractPackageFromPath(modulePath) {
|
|
3516
3750
|
let nodeModulesIndex = modulePath.lastIndexOf("/node_modules/");
|
|
3517
3751
|
let prefixLength = "/node_modules/".length;
|
|
@@ -3533,42 +3767,82 @@ function packageNameAt(modulePath, start) {
|
|
|
3533
3767
|
}
|
|
3534
3768
|
|
|
3535
3769
|
// src/installed-package-versions.ts
|
|
3536
|
-
function
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3770
|
+
function* exists(target) {
|
|
3771
|
+
return (yield { op: "exists", path: target }) === true;
|
|
3772
|
+
}
|
|
3773
|
+
function* realpath(target) {
|
|
3774
|
+
const resolved = yield { op: "realpath", path: target };
|
|
3775
|
+
if (typeof resolved !== "string") throw new Error(`could not resolve ${target}`);
|
|
3776
|
+
return resolved;
|
|
3777
|
+
}
|
|
3778
|
+
function* readManifest(target) {
|
|
3779
|
+
const manifest = yield { op: "manifest", path: target };
|
|
3780
|
+
return typeof manifest === "object" ? manifest : null;
|
|
3781
|
+
}
|
|
3782
|
+
function parseManifest(source) {
|
|
3783
|
+
const manifest = JSON.parse(source);
|
|
3784
|
+
return typeof manifest === "object" && manifest !== null ? manifest : null;
|
|
3785
|
+
}
|
|
3786
|
+
function isMissing(error) {
|
|
3787
|
+
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
3788
|
+
}
|
|
3789
|
+
function answerSync(step) {
|
|
3790
|
+
if (step.op === "exists") return import_fs.default.existsSync(step.path);
|
|
3791
|
+
if (step.op === "realpath") return import_fs.default.realpathSync(step.path);
|
|
3792
|
+
try {
|
|
3793
|
+
return parseManifest(import_fs.default.readFileSync(step.path, "utf8"));
|
|
3794
|
+
} catch (error) {
|
|
3795
|
+
if (isMissing(error)) return null;
|
|
3796
|
+
throw error;
|
|
3797
|
+
}
|
|
3798
|
+
}
|
|
3799
|
+
function runSync(walk) {
|
|
3800
|
+
for (let step = walk.next(); ; ) {
|
|
3801
|
+
if (step.done) return step.value;
|
|
3802
|
+
step = walk.next(answerSync(step.value));
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
function createInstalledPackageReader() {
|
|
3806
|
+
const hasModules = /* @__PURE__ */ new Map();
|
|
3807
|
+
const manifests = /* @__PURE__ */ new Map();
|
|
3808
|
+
return function* readInstalledPackage(fromDir, name) {
|
|
3809
|
+
for (let dir = fromDir; ; ) {
|
|
3810
|
+
if (import_path.default.basename(dir) !== "node_modules") {
|
|
3811
|
+
const modules = import_path.default.join(dir, "node_modules");
|
|
3812
|
+
let present = hasModules.get(dir);
|
|
3813
|
+
if (present === void 0) {
|
|
3814
|
+
present = yield* exists(modules);
|
|
3815
|
+
hasModules.set(dir, present);
|
|
3816
|
+
}
|
|
3817
|
+
if (present) {
|
|
3818
|
+
const root = import_path.default.join(modules, name);
|
|
3819
|
+
let installed = manifests.get(root);
|
|
3820
|
+
if (installed === void 0) {
|
|
3821
|
+
const manifest = yield* readManifest(import_path.default.join(root, "package.json"));
|
|
3822
|
+
installed = manifest ? { root, manifest } : null;
|
|
3823
|
+
manifests.set(root, installed);
|
|
3824
|
+
}
|
|
3825
|
+
if (installed) return installed;
|
|
3826
|
+
}
|
|
3547
3827
|
}
|
|
3548
3828
|
const parent = import_path.default.dirname(dir);
|
|
3549
3829
|
if (parent === dir) return null;
|
|
3550
3830
|
dir = parent;
|
|
3551
|
-
continue;
|
|
3552
3831
|
}
|
|
3553
|
-
|
|
3554
|
-
}
|
|
3832
|
+
};
|
|
3555
3833
|
}
|
|
3556
|
-
function
|
|
3557
|
-
const
|
|
3558
|
-
for (const modulePath of modulePaths) {
|
|
3559
|
-
const name = extractPackageFromPath(modulePath.replaceAll(import_path.default.sep, "/"));
|
|
3560
|
-
if (name) names.add(name);
|
|
3561
|
-
}
|
|
3834
|
+
function* installedVersionsWalk(projectRoot, names) {
|
|
3835
|
+
const readInstalledPackage = createInstalledPackageReader();
|
|
3562
3836
|
const versions = {};
|
|
3563
3837
|
for (const name of [...names].sort()) {
|
|
3564
|
-
const installed = readInstalledPackage(projectRoot, name);
|
|
3838
|
+
const installed = yield* readInstalledPackage(projectRoot, name);
|
|
3565
3839
|
const version = installed && Reflect.get(installed.manifest, "version");
|
|
3566
3840
|
if (typeof version === "string" && version.length > 0) versions[name] = version;
|
|
3567
3841
|
}
|
|
3568
3842
|
return versions;
|
|
3569
3843
|
}
|
|
3570
|
-
function
|
|
3571
|
-
const appRoot =
|
|
3844
|
+
function* nativePackageVersionsWalk(projectRoot) {
|
|
3845
|
+
const appRoot = yield* realpath(projectRoot);
|
|
3572
3846
|
const nativeNames = /* @__PURE__ */ new Set();
|
|
3573
3847
|
for (const specifier of [
|
|
3574
3848
|
"react-native",
|
|
@@ -3579,17 +3853,14 @@ function readInstalledNativePackageVersions(projectRoot) {
|
|
|
3579
3853
|
const name = extractPackageFromPath(`node_modules/${specifier}`);
|
|
3580
3854
|
if (name) nativeNames.add(name);
|
|
3581
3855
|
}
|
|
3582
|
-
const manifest =
|
|
3583
|
-
|
|
3584
|
-
);
|
|
3585
|
-
if (typeof manifest !== "object" || manifest === null) {
|
|
3586
|
-
throw new Error("app package.json must contain an object");
|
|
3587
|
-
}
|
|
3856
|
+
const manifest = yield* readManifest(import_path.default.join(appRoot, "package.json"));
|
|
3857
|
+
if (!manifest) throw new Error("app package.json must contain an object");
|
|
3858
|
+
const readInstalledPackage = createInstalledPackageReader();
|
|
3588
3859
|
const pending = [{ root: appRoot, manifest }];
|
|
3589
3860
|
const visited = /* @__PURE__ */ new Set();
|
|
3590
3861
|
const needed = /* @__PURE__ */ new Set();
|
|
3591
3862
|
for (let next = pending.pop(); next; next = pending.pop()) {
|
|
3592
|
-
const root =
|
|
3863
|
+
const root = yield* realpath(next.root);
|
|
3593
3864
|
if (visited.has(root)) continue;
|
|
3594
3865
|
visited.add(root);
|
|
3595
3866
|
const fields = ["dependencies", "optionalDependencies", "peerDependencies"];
|
|
@@ -3604,17 +3875,17 @@ function readInstalledNativePackageVersions(projectRoot) {
|
|
|
3604
3875
|
if (typeof peer === "object" && peer !== null && Reflect.get(peer, "optional"))
|
|
3605
3876
|
continue;
|
|
3606
3877
|
}
|
|
3607
|
-
const installed = readInstalledPackage(root, name);
|
|
3878
|
+
const installed = yield* readInstalledPackage(root, name);
|
|
3608
3879
|
if (!installed) continue;
|
|
3609
3880
|
if (nativeNames.has(name)) needed.add(name);
|
|
3610
3881
|
pending.push(installed);
|
|
3611
3882
|
}
|
|
3612
3883
|
}
|
|
3613
3884
|
}
|
|
3614
|
-
return
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
);
|
|
3885
|
+
return yield* installedVersionsWalk(projectRoot, needed);
|
|
3886
|
+
}
|
|
3887
|
+
function readInstalledNativePackageVersions(projectRoot) {
|
|
3888
|
+
return runSync(nativePackageVersionsWalk(projectRoot));
|
|
3618
3889
|
}
|
|
3619
3890
|
|
|
3620
3891
|
// src/one-widget-metadata.ts
|
|
@@ -3927,204 +4198,8 @@ function insertPackageVersionsFooter(source, versions) {
|
|
|
3927
4198
|
return insertBundleGlobalFooter(source, FOOTER, readPackageVersions(versions));
|
|
3928
4199
|
}
|
|
3929
4200
|
|
|
3930
|
-
// src/runtime-assets.ts
|
|
3931
|
-
var import_fs2 = __toESM(require("fs"), 1);
|
|
3932
|
-
var import_path2 = __toESM(require("path"), 1);
|
|
3933
|
-
var import_url = require("url");
|
|
3934
|
-
|
|
3935
|
-
// ../contrast-runtime-delivery/src/index.ts
|
|
3936
|
-
init_process_group();
|
|
3937
|
-
|
|
3938
|
-
// ../contrast-runtime-delivery/src/version.ts
|
|
3939
|
-
function isValidRuntimeVersion(value) {
|
|
3940
|
-
return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
|
|
3941
|
-
}
|
|
3942
|
-
|
|
3943
|
-
// src/runtime-assets.ts
|
|
3944
|
-
var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[peach] no engine runtime installed. run `peach runtime install`";
|
|
3945
|
-
var _monorepoRootCache;
|
|
3946
|
-
function findMonorepoRoot() {
|
|
3947
|
-
if (_monorepoRootCache !== void 0) return _monorepoRootCache;
|
|
3948
|
-
let dir = import_path2.default.dirname((0, import_url.fileURLToPath)(__sootsim_import_meta_url));
|
|
3949
|
-
for (let i = 0; i < 12 && dir !== import_path2.default.dirname(dir); i++) {
|
|
3950
|
-
if (import_fs2.default.existsSync(import_path2.default.join(dir, "packages/peach-engine/package.json")) && import_fs2.default.existsSync(import_path2.default.join(dir, "public/sootsim"))) {
|
|
3951
|
-
_monorepoRootCache = dir;
|
|
3952
|
-
return dir;
|
|
3953
|
-
}
|
|
3954
|
-
dir = import_path2.default.dirname(dir);
|
|
3955
|
-
}
|
|
3956
|
-
_monorepoRootCache = null;
|
|
3957
|
-
return null;
|
|
3958
|
-
}
|
|
3959
|
-
function resolveDevCheckoutRuntimeRoot() {
|
|
3960
|
-
if (process.env.PEACH_HOME && readActiveRuntime()) return null;
|
|
3961
|
-
const root = findMonorepoRoot();
|
|
3962
|
-
if (!root) return null;
|
|
3963
|
-
const devBuild = import_path2.default.join(root, "public/sootsim");
|
|
3964
|
-
if (import_fs2.default.existsSync(import_path2.default.join(devBuild, "index.html")) && import_fs2.default.existsSync(import_path2.default.join(devBuild, "engine/index.html")) && import_fs2.default.existsSync(import_path2.default.join(devBuild, "engine-tenant/worker.js")) && import_fs2.default.existsSync(import_path2.default.join(devBuild, "engine-tenant/worker.prod.js"))) {
|
|
3965
|
-
return devBuild;
|
|
3966
|
-
}
|
|
3967
|
-
return null;
|
|
3968
|
-
}
|
|
3969
|
-
var MIME_TYPES = {
|
|
3970
|
-
".js": "application/javascript",
|
|
3971
|
-
".mjs": "application/javascript",
|
|
3972
|
-
".css": "text/css",
|
|
3973
|
-
".html": "text/html",
|
|
3974
|
-
".wasm": "application/wasm",
|
|
3975
|
-
".json": "application/json",
|
|
3976
|
-
".jpg": "image/jpeg",
|
|
3977
|
-
".jpeg": "image/jpeg",
|
|
3978
|
-
".png": "image/png",
|
|
3979
|
-
".svg": "image/svg+xml",
|
|
3980
|
-
".webp": "image/webp",
|
|
3981
|
-
".glb": "model/gltf-binary",
|
|
3982
|
-
".ttf": "font/ttf",
|
|
3983
|
-
".otf": "font/otf",
|
|
3984
|
-
".woff": "font/woff",
|
|
3985
|
-
".woff2": "font/woff2",
|
|
3986
|
-
".mp3": "audio/mpeg",
|
|
3987
|
-
".wav": "audio/wav",
|
|
3988
|
-
".mp4": "video/mp4",
|
|
3989
|
-
".m4v": "video/mp4",
|
|
3990
|
-
".mov": "video/quicktime",
|
|
3991
|
-
".webm": "video/webm"
|
|
3992
|
-
};
|
|
3993
|
-
var ROOT_RUNTIME_PATHS = [
|
|
3994
|
-
"/assets/",
|
|
3995
|
-
"/engine/",
|
|
3996
|
-
"/engine-tenant/",
|
|
3997
|
-
"/photos/",
|
|
3998
|
-
"/three-mode/",
|
|
3999
|
-
"/fonts/",
|
|
4000
|
-
"/icons/",
|
|
4001
|
-
"/sounds/",
|
|
4002
|
-
"/spike/",
|
|
4003
|
-
"/test-wallpaper.jpg",
|
|
4004
|
-
"/preview-sw.js",
|
|
4005
|
-
"/peach.svg",
|
|
4006
|
-
"/bedrock-sqlite.wasm",
|
|
4007
|
-
"/bedrock-sqlite.js",
|
|
4008
|
-
"/sootsim/"
|
|
4009
|
-
];
|
|
4010
|
-
function resolveActiveRuntimeRoot() {
|
|
4011
|
-
const devRoot = resolveDevCheckoutRuntimeRoot();
|
|
4012
|
-
if (devRoot) return devRoot;
|
|
4013
|
-
const active = readActiveRuntime();
|
|
4014
|
-
if (!active) return null;
|
|
4015
|
-
const dir = runtimeDir(active);
|
|
4016
|
-
if (!import_fs2.default.existsSync(import_path2.default.join(dir, "index.html"))) return null;
|
|
4017
|
-
return dir;
|
|
4018
|
-
}
|
|
4019
|
-
var RUNTIME_VERSION_HOSTNAME_SUFFIX = ".runtime.localhost";
|
|
4020
|
-
function isRuntimeVersionHostname(hostname) {
|
|
4021
|
-
return hostname.toLowerCase().endsWith(RUNTIME_VERSION_HOSTNAME_SUFFIX);
|
|
4022
|
-
}
|
|
4023
|
-
function runtimeVersionFromHostname(hostname) {
|
|
4024
|
-
if (!isRuntimeVersionHostname(hostname)) return null;
|
|
4025
|
-
const labels = hostname.slice(0, -RUNTIME_VERSION_HOSTNAME_SUFFIX.length).split(".");
|
|
4026
|
-
if (labels.length === 0 || labels.some((label) => !/^[0-9a-f]{1,60}$/i.test(label))) {
|
|
4027
|
-
return null;
|
|
4028
|
-
}
|
|
4029
|
-
const encoded = labels.join("");
|
|
4030
|
-
if (encoded.length % 2 !== 0) return null;
|
|
4031
|
-
try {
|
|
4032
|
-
const version = Buffer.from(encoded, "hex").toString("utf8");
|
|
4033
|
-
return isValidRuntimeVersion(version) ? version : null;
|
|
4034
|
-
} catch {
|
|
4035
|
-
return null;
|
|
4036
|
-
}
|
|
4037
|
-
}
|
|
4038
|
-
function resolveInstalledRuntimeRoot(version) {
|
|
4039
|
-
const dir = runtimeDir(version);
|
|
4040
|
-
if (!import_fs2.default.existsSync(import_path2.default.join(dir, "index.html"))) return null;
|
|
4041
|
-
return dir;
|
|
4042
|
-
}
|
|
4043
|
-
function resolveRuntimeRootForHostname(hostname) {
|
|
4044
|
-
if (!isRuntimeVersionHostname(hostname)) return resolveActiveRuntimeRoot();
|
|
4045
|
-
const version = runtimeVersionFromHostname(hostname);
|
|
4046
|
-
return version ? resolveInstalledRuntimeRoot(version) : null;
|
|
4047
|
-
}
|
|
4048
|
-
function resolveRuntimeRootForRequestHost(host) {
|
|
4049
|
-
if (!host) return resolveActiveRuntimeRoot();
|
|
4050
|
-
try {
|
|
4051
|
-
return resolveRuntimeRootForHostname(new URL(`http://${host}`).hostname);
|
|
4052
|
-
} catch {
|
|
4053
|
-
return null;
|
|
4054
|
-
}
|
|
4055
|
-
}
|
|
4056
|
-
function isRootRuntimeAssetPath(pathname) {
|
|
4057
|
-
return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
|
|
4058
|
-
}
|
|
4059
|
-
function resolveRuntimeFilePath(runtimeRoot, pathname) {
|
|
4060
|
-
if (!pathname.startsWith("/")) return null;
|
|
4061
|
-
if (pathname.includes("\0") || pathname.includes("\\")) return null;
|
|
4062
|
-
for (const segment of pathname.split("/")) {
|
|
4063
|
-
if (segment === "..") return null;
|
|
4064
|
-
}
|
|
4065
|
-
const normalized = pathname.startsWith("/sootsim/") ? pathname.slice("/sootsim".length) : pathname;
|
|
4066
|
-
const fullPath = import_path2.default.resolve(runtimeRoot, normalized.replace(/^\/+/, ""));
|
|
4067
|
-
const rootWithSep = runtimeRoot.endsWith(import_path2.default.sep) ? runtimeRoot : runtimeRoot + import_path2.default.sep;
|
|
4068
|
-
if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
|
|
4069
|
-
if (!import_fs2.default.existsSync(fullPath) || !import_fs2.default.statSync(fullPath).isFile()) return null;
|
|
4070
|
-
return fullPath;
|
|
4071
|
-
}
|
|
4072
|
-
function serveRuntimeFile(req, res, fullPath) {
|
|
4073
|
-
const ext = import_path2.default.extname(fullPath);
|
|
4074
|
-
const stat = import_fs2.default.statSync(fullPath);
|
|
4075
|
-
const lastModified = stat.mtime.toUTCString();
|
|
4076
|
-
res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
|
|
4077
|
-
if (/^canvaskit-graphite-pipelines-[0-9a-f]{8}\.bin$/.test(import_path2.default.basename(fullPath))) {
|
|
4078
|
-
res.setHeader("cache-control", "public, max-age=31536000, immutable");
|
|
4079
|
-
import_fs2.default.createReadStream(fullPath).pipe(res);
|
|
4080
|
-
return;
|
|
4081
|
-
}
|
|
4082
|
-
res.setHeader("cache-control", "no-cache");
|
|
4083
|
-
res.setHeader("last-modified", lastModified);
|
|
4084
|
-
if (req?.headers?.["if-modified-since"] === lastModified) {
|
|
4085
|
-
res.statusCode = 304;
|
|
4086
|
-
res.end();
|
|
4087
|
-
return;
|
|
4088
|
-
}
|
|
4089
|
-
sendFileWithRanges(req, res, fullPath, stat.size, {});
|
|
4090
|
-
}
|
|
4091
|
-
function sendFileWithRanges(req, res, filePath, total, headers) {
|
|
4092
|
-
const head = (req?.method || "GET").toUpperCase() === "HEAD";
|
|
4093
|
-
const range = /^bytes=(\d*)-(\d*)$/.exec(req?.headers?.range || "");
|
|
4094
|
-
const invalid = range && range[1] && range[2] && Number(range[2]) < Number(range[1]);
|
|
4095
|
-
if (range && (range[1] || range[2]) && !invalid) {
|
|
4096
|
-
const [, startRaw, endRaw] = range;
|
|
4097
|
-
const start = startRaw ? Number(startRaw) : Math.max(0, total - Number(endRaw));
|
|
4098
|
-
const end = startRaw && endRaw ? Math.min(Number(endRaw), total - 1) : total - 1;
|
|
4099
|
-
if (start > end || start >= total) {
|
|
4100
|
-
res.writeHead(416, { ...headers, "Content-Range": `bytes */${total}` });
|
|
4101
|
-
res.end();
|
|
4102
|
-
return;
|
|
4103
|
-
}
|
|
4104
|
-
res.writeHead(206, {
|
|
4105
|
-
...headers,
|
|
4106
|
-
"Content-Range": `bytes ${start}-${end}/${total}`,
|
|
4107
|
-
"Accept-Ranges": "bytes",
|
|
4108
|
-
"Content-Length": String(end - start + 1)
|
|
4109
|
-
});
|
|
4110
|
-
if (head) res.end();
|
|
4111
|
-
else streamFile(res, import_fs2.default.createReadStream(filePath, { start, end }));
|
|
4112
|
-
return;
|
|
4113
|
-
}
|
|
4114
|
-
res.writeHead(200, {
|
|
4115
|
-
...headers,
|
|
4116
|
-
"Accept-Ranges": "bytes",
|
|
4117
|
-
"Content-Length": String(total)
|
|
4118
|
-
});
|
|
4119
|
-
if (head || total === 0) res.end();
|
|
4120
|
-
else streamFile(res, import_fs2.default.createReadStream(filePath, { start: 0, end: total - 1 }));
|
|
4121
|
-
}
|
|
4122
|
-
function streamFile(res, stream) {
|
|
4123
|
-
stream.on("error", (error) => res.destroy(error));
|
|
4124
|
-
stream.pipe(res);
|
|
4125
|
-
}
|
|
4126
|
-
|
|
4127
4201
|
// src/vite-plugin-one.ts
|
|
4202
|
+
init_runtime_assets();
|
|
4128
4203
|
function exposeHeader(res, name) {
|
|
4129
4204
|
const exposed = res.getHeader("access-control-expose-headers");
|
|
4130
4205
|
const names = typeof exposed === "string" && exposed ? exposed.split(/,\s*/) : [];
|