peachsim 0.1.1728 → 0.1.1744
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 +4 -0
- package/cli/app-catalog.ts +47 -23
- package/cli/app-fonts.ts +19 -1
- package/cli/command-registry.ts +3 -0
- package/cli/commands/control.ts +68 -16
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/device.ts +3 -1
- package/cli/commands/doctor.ts +1 -4
- package/cli/commands/inspect/settling.ts +6 -1
- package/cli/commands/inspect/wait-ready.ts +22 -2
- package/cli/commands/package.ts +33 -21
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +41 -9
- package/cli/commands/swift.ts +1 -1
- package/cli/current-sim.ts +27 -0
- package/cli/drivers/linux-browser-libs.lock.json +323 -1
- package/cli/drivers/linux-browser-libs.ts +8 -6
- package/cli/drivers/playwright.ts +5 -1
- package/cli/internal-child.ts +11 -1
- package/cli/main.ts +6 -0
- package/cli/native-input.ts +1 -7
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/packaged-app-launcher.ts +3 -1
- package/cli/scene-video.ts +28 -7
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +18 -5
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- 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 +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +9932 -4561
- 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 +1 -1
- package/dist-lib/detox/index.cjs +30 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6886 -3303
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +8513 -3085
- package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
- 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 +6 -3
- package/dist-lib/index.cjs +175 -80
- 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 +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -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 +146 -76
- package/dist-lib/native-app-identity-project.cjs +76 -39
- package/dist-lib/native-app-identity-project.mjs +76 -39
- package/dist-lib/native-app-identity.cjs +10 -3
- package/dist-lib/native-app-identity.mjs +10 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -23
- package/dist-lib/public-origins-lib.json +138 -80
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -1
- package/dist-lib/sdk.mjs +4 -1
- package/dist-lib/skills.cjs +41126 -36493
- package/dist-lib/swift-compile.cjs +2103 -444
- package/dist-lib/swift-compile.mjs +2025 -369
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +84 -24
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6094 -2687
- package/dist-lib/vite.cjs +32 -10
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
- package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
- package/sdk/ios/usr/include/dns_sd.h +3616 -0
- package/sdk/ios/usr/include/dnssd.modulemap +4 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -265
- package/skills/peach-debug/references/accessibility.md +37 -73
- package/skills/peach-debug/references/commands.md +2 -2
- package/skills/peach-debug/references/events.md +74 -0
- package/skills/peach-perf/SKILL.md +64 -402
- package/skills/peach-perf/references/presentation.md +46 -0
- package/skills/peach-perf/references/profiling.md +93 -0
- package/skills/peach-perf/references/render-counters.md +57 -0
- package/skills/peach-setup/SKILL.md +66 -217
- package/skills/peach-setup/references/native-config.md +35 -0
- package/skills/peach-setup/references/reporting.md +28 -0
- package/skills/peach-test/SKILL.md +68 -285
- package/skills/peach-test/references/detox.md +69 -0
- package/skills/peach-test/references/maestro.md +95 -0
- package/skills/peach-visual/SKILL.md +53 -106
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +14 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +152 -60
- package/src/cli-runtime.ts +3 -0
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +10 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +211 -52
- package/src/expo-swift-host.ts +149 -123
- package/src/expo-swift-ready.ts +5 -1
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +21 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/host/websocket-proxy.ts +7 -2
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +261 -261
- package/src/nitro-adapter.ts +118 -50
- package/src/nitro-bundle.ts +134 -96
- package/src/nitro-compile.ts +16 -6
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +142 -30
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +68 -21
- package/src/react-bridge-importers.ts +1 -0
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +37 -1
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +315 -117
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +19 -13
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +18 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +51 -35
- package/src/swift-link-roots.ts +45 -18
- package/src/swift-objc-compile.ts +78 -2
- package/src/swift-objc-standin.ts +3 -0
- package/src/swift-shared-sdk.ts +85 -1
- package/src/swift-standin-emit.ts +6 -1
- package/src/swift-standins.ts +403 -19
- package/src/swift-submit.ts +17 -1
- package/src/swift-toolchain.ts +98 -23
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +82 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +15 -3
- package/src/vite-plugin.ts +82 -23
- package/src/wasm-optimize.ts +34 -0
- package/src/worker-system-chunks.ts +3 -3
- package/src/xcode-project.ts +52 -0
- package/src/xcode-target-members.ts +12 -1
package/src/bundle-channel.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { isLoopbackHost } from './backend-origin'
|
|
|
5
5
|
import { insertExpoKotlinFooter } from './expoKotlinContract'
|
|
6
6
|
import { insertExpoSwiftFooter } from './expoSwiftContract'
|
|
7
7
|
import { readInstalledNativePackageVersionsAsync } from './installed-package-versions'
|
|
8
|
-
import { insertNitroFooter } from './nitroContract'
|
|
8
|
+
import { insertNitroFooter, insertTurboFooter } from './nitroContract'
|
|
9
9
|
import { insertPackageVersionsFooter } from './packageVersionsContract'
|
|
10
10
|
import { terminateProcessGroup } from './process-group'
|
|
11
11
|
|
|
@@ -94,12 +94,15 @@ function prepareChannel({
|
|
|
94
94
|
expoSwift = null,
|
|
95
95
|
expoKotlin = null,
|
|
96
96
|
nitro = null,
|
|
97
|
+
turbo = null,
|
|
97
98
|
}) {
|
|
98
99
|
if (!(platform in nativeAssetPath)) throw new Error(`unknown platform: ${platform}`)
|
|
99
100
|
const native = platform === 'ios' ? expoSwift : expoKotlin
|
|
100
101
|
if (platform !== 'ios' && nitro !== null)
|
|
101
102
|
throw new Error(`${platform} bundle carries an iOS Nitro module`)
|
|
102
|
-
|
|
103
|
+
if (platform !== 'ios' && turbo !== null)
|
|
104
|
+
throw new Error(`${platform} bundle carries an iOS TurboModule`)
|
|
105
|
+
const nativeBundles = [native, nitro, turbo].filter(Boolean)
|
|
103
106
|
const nativeAssets = new Map()
|
|
104
107
|
if ((platform === 'ios' ? expoKotlin : expoSwift) !== null)
|
|
105
108
|
throw new Error(`${platform} bundle carries another platform's native modules`)
|
|
@@ -143,6 +146,7 @@ function prepareChannel({
|
|
|
143
146
|
}
|
|
144
147
|
if (native) identity.update(JSON.stringify(native.metadata))
|
|
145
148
|
if (nitro) identity.update(JSON.stringify(nitro.metadata))
|
|
149
|
+
if (turbo) identity.update(JSON.stringify(turbo.metadata))
|
|
146
150
|
const releaseKey = `${prefix}/peach/releases/${identity.digest('hex')}`
|
|
147
151
|
const assetBaseUrl = `${origin.origin}/${releaseKey}/`
|
|
148
152
|
const directories = new Set(
|
|
@@ -204,6 +208,19 @@ function prepareChannel({
|
|
|
204
208
|
}
|
|
205
209
|
source = insertNitroFooter(source, nativeMetadata.nitro)
|
|
206
210
|
}
|
|
211
|
+
if (turbo) {
|
|
212
|
+
nativeMetadata = {
|
|
213
|
+
...nativeMetadata,
|
|
214
|
+
turbo: {
|
|
215
|
+
...turbo.metadata,
|
|
216
|
+
url: release(turbo.metadata.url),
|
|
217
|
+
icuUrl: turbo.metadata.icuUrl.startsWith('/')
|
|
218
|
+
? release(turbo.metadata.icuUrl)
|
|
219
|
+
: turbo.metadata.icuUrl,
|
|
220
|
+
},
|
|
221
|
+
}
|
|
222
|
+
source = insertTurboFooter(source, nativeMetadata.turbo)
|
|
223
|
+
}
|
|
207
224
|
new Script(source, { filename: 'peach-release-bundle.js' })
|
|
208
225
|
const bundleBytes = Buffer.from(source)
|
|
209
226
|
const metadata = {
|
|
@@ -286,21 +303,85 @@ export async function publishBundleChannel(release, { put, fetchObject = fetch }
|
|
|
286
303
|
}
|
|
287
304
|
|
|
288
305
|
// peach boots an app from the dev server's bundle: it carries the module graph
|
|
289
|
-
// peach maps native seams by
|
|
290
|
-
//
|
|
291
|
-
//
|
|
292
|
-
// and, on ios, one executable of
|
|
293
|
-
|
|
294
|
-
|
|
306
|
+
// peach maps native seams by. a release build erases it, but the production
|
|
307
|
+
// bundle of the rolldown path keeps the factories its catalog recognises.
|
|
308
|
+
// package one platform's bundle with the files its assets register, the app's
|
|
309
|
+
// local Expo native modules for that platform and, on ios, one executable of
|
|
310
|
+
// its installed Nitro providers. `readAssetFile` supplies the bytes of a
|
|
311
|
+
// registered asset that has no local file.
|
|
312
|
+
async function packagePlatformBundle(
|
|
295
313
|
projectRoot,
|
|
296
|
-
|
|
314
|
+
platform,
|
|
315
|
+
bundle,
|
|
316
|
+
{ config, versions, readAssetFile },
|
|
297
317
|
) {
|
|
298
318
|
const { readFileSync } = await import('node:fs')
|
|
299
319
|
const { basename } = await import('node:path')
|
|
300
|
-
const { resolveRNXAppConfig } = await import('../cli/app-config')
|
|
301
320
|
const { produceConfiguredBundle } = await import('./configured-bundle-producer')
|
|
321
|
+
const assets = new Map()
|
|
322
|
+
for (const [registration] of bundle
|
|
323
|
+
.toString('utf8')
|
|
324
|
+
.matchAll(/(?<=registerAsset\()\{[^{}]*"__packager_asset": true[^{}]*\}/g)) {
|
|
325
|
+
const asset = JSON.parse(registration)
|
|
326
|
+
const directory = packagedAssetDirectory(asset.httpServerLocation)
|
|
327
|
+
if (asset.files) {
|
|
328
|
+
for (const file of asset.files) {
|
|
329
|
+
const path = `${directory}/${basename(file)}`
|
|
330
|
+
if (!assets.has(path)) assets.set(path, readFileSync(file))
|
|
331
|
+
}
|
|
332
|
+
continue
|
|
333
|
+
}
|
|
334
|
+
// without local files, each scale downloads at the url react native's
|
|
335
|
+
// AssetSourceResolver builds for it
|
|
336
|
+
for (const scale of asset.scales) {
|
|
337
|
+
const file = `${asset.name}${scale === 1 ? '' : `@${scale}x`}.${asset.type}`
|
|
338
|
+
const path = `${directory}/${file}`
|
|
339
|
+
if (!assets.has(path)) assets.set(path, await readAssetFile(asset, file))
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
platform,
|
|
344
|
+
// the versions footer stays last: the rolldown inventory reads it there.
|
|
345
|
+
bundle: Buffer.from(
|
|
346
|
+
insertPackageVersionsFooter(
|
|
347
|
+
await produceConfiguredBundle(
|
|
348
|
+
bundle.toString('utf8'),
|
|
349
|
+
config,
|
|
350
|
+
new Set(Object.keys(versions)),
|
|
351
|
+
),
|
|
352
|
+
versions,
|
|
353
|
+
),
|
|
354
|
+
),
|
|
355
|
+
assets: [...assets].map(([path, bytes]) => ({ path, bytes })),
|
|
356
|
+
...(platform === 'ios'
|
|
357
|
+
? {
|
|
358
|
+
expoSwift: await (
|
|
359
|
+
await import('./expo-swift-bundle')
|
|
360
|
+
).buildExpoSwiftBundle(projectRoot),
|
|
361
|
+
nitro: await (await import('./nitro-bundle')).buildNitroBundle(projectRoot),
|
|
362
|
+
turbo: await (await import('./turbo-bundle')).buildTurboBundle(projectRoot),
|
|
363
|
+
}
|
|
364
|
+
: {
|
|
365
|
+
expoKotlin: await (
|
|
366
|
+
await import('./expo-kotlin-bundle')
|
|
367
|
+
).buildExpoKotlinBundle(projectRoot),
|
|
368
|
+
}),
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
async function readPackagingInputs(projectRoot) {
|
|
373
|
+
const { resolveRNXAppConfig } = await import('../cli/app-config')
|
|
302
374
|
const { config } = await resolveRNXAppConfig(projectRoot)
|
|
303
|
-
|
|
375
|
+
return { config, versions: await readInstalledNativePackageVersionsAsync(projectRoot) }
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// snapshot each platform's bundle from a running dev server
|
|
379
|
+
export async function snapshotDevServerBundles(
|
|
380
|
+
origin,
|
|
381
|
+
projectRoot,
|
|
382
|
+
{ platforms = ['ios', 'android'], assertRunning = () => {} } = {},
|
|
383
|
+
) {
|
|
384
|
+
const inputs = await readPackagingInputs(projectRoot)
|
|
304
385
|
const snapshots = []
|
|
305
386
|
for (const platform of platforms) {
|
|
306
387
|
const url = `${origin}/index.bundle?platform=${platform}&dev=true&minify=false`
|
|
@@ -314,56 +395,67 @@ export async function snapshotDevServerBundles(
|
|
|
314
395
|
if (response?.ok) bundle = Buffer.from(await response.arrayBuffer())
|
|
315
396
|
else await new Promise((resolve) => setTimeout(resolve, 2000))
|
|
316
397
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
398
|
+
snapshots.push(
|
|
399
|
+
await packagePlatformBundle(projectRoot, platform, bundle, {
|
|
400
|
+
...inputs,
|
|
401
|
+
readAssetFile: async (asset, file) => {
|
|
402
|
+
const response = await fetch(
|
|
403
|
+
`${origin}${asset.httpServerLocation}/${file}?platform=${platform}&hash=${asset.hash}`,
|
|
404
|
+
)
|
|
405
|
+
if (!response.ok)
|
|
406
|
+
throw new Error(`dev server asset ${file} failed: ${response.status}`)
|
|
407
|
+
return Buffer.from(await response.arrayBuffer())
|
|
408
|
+
},
|
|
409
|
+
}),
|
|
410
|
+
)
|
|
411
|
+
}
|
|
412
|
+
return { platforms: snapshots }
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// a One app's production bundles. unminified, because the catalog recognises
|
|
416
|
+
// a module by the shape of its factory and only unminified output is
|
|
417
|
+
// deterministic (specs/sootsim-engine/one-updates-input.md).
|
|
418
|
+
export async function snapshotOneProductionBundle(
|
|
419
|
+
projectRoot,
|
|
420
|
+
entryFile,
|
|
421
|
+
env = {},
|
|
422
|
+
{ runtimeExecutable = process.execPath, platforms = ['ios', 'android'] } = {},
|
|
423
|
+
) {
|
|
424
|
+
const { execFile } = await import('node:child_process')
|
|
425
|
+
const { mkdtemp, readFile, rm } = await import('node:fs/promises')
|
|
426
|
+
const { tmpdir } = await import('node:os')
|
|
427
|
+
const { join } = await import('node:path')
|
|
428
|
+
const { promisify } = await import('node:util')
|
|
429
|
+
const inputs = await readPackagingInputs(projectRoot)
|
|
430
|
+
const snapshots = []
|
|
431
|
+
for (const platform of platforms) {
|
|
432
|
+
const out = await mkdtemp(join(tmpdir(), 'peach-production-bundle-'))
|
|
433
|
+
try {
|
|
434
|
+
await promisify(execFile)(
|
|
435
|
+
runtimeExecutable,
|
|
436
|
+
[
|
|
437
|
+
join(projectRoot, 'node_modules/.bin/react-native'),
|
|
438
|
+
'bundle',
|
|
439
|
+
'--platform', platform,
|
|
440
|
+
'--dev', 'false',
|
|
441
|
+
'--minify', 'false',
|
|
442
|
+
'--entry-file', entryFile,
|
|
443
|
+
'--bundle-output', join(out, 'bundle.js'),
|
|
444
|
+
'--assets-dest', join(out, 'assets'),
|
|
445
|
+
'--sourcemap-output', join(out, 'bundle.js.map'),
|
|
446
|
+
],
|
|
447
|
+
{ cwd: projectRoot, env: { ...process.env, ...env, NODE_ENV: 'production' } },
|
|
448
|
+
)
|
|
449
|
+
snapshots.push(
|
|
450
|
+
await packagePlatformBundle(projectRoot, platform, await readFile(join(out, 'bundle.js')), {
|
|
451
|
+
...inputs,
|
|
452
|
+
readAssetFile: (asset, file) =>
|
|
453
|
+
readFile(join(out, asset.httpServerLocation, file)),
|
|
454
|
+
}),
|
|
455
|
+
)
|
|
456
|
+
} finally {
|
|
457
|
+
await rm(out, { recursive: true, force: true })
|
|
343
458
|
}
|
|
344
|
-
snapshots.push({
|
|
345
|
-
platform,
|
|
346
|
-
bundle: Buffer.from(
|
|
347
|
-
await produceConfiguredBundle(
|
|
348
|
-
insertPackageVersionsFooter(bundle.toString('utf8'), versions),
|
|
349
|
-
config,
|
|
350
|
-
new Set(Object.keys(versions)),
|
|
351
|
-
),
|
|
352
|
-
),
|
|
353
|
-
assets: [...assets].map(([path, bytes]) => ({ path, bytes })),
|
|
354
|
-
...(platform === 'ios'
|
|
355
|
-
? {
|
|
356
|
-
expoSwift: await (
|
|
357
|
-
await import('./expo-swift-bundle')
|
|
358
|
-
).buildExpoSwiftBundle(projectRoot),
|
|
359
|
-
nitro: await (await import('./nitro-bundle')).buildNitroBundle(projectRoot),
|
|
360
|
-
}
|
|
361
|
-
: {
|
|
362
|
-
expoKotlin: await (
|
|
363
|
-
await import('./expo-kotlin-bundle')
|
|
364
|
-
).buildExpoKotlinBundle(projectRoot),
|
|
365
|
-
}),
|
|
366
|
-
})
|
|
367
459
|
}
|
|
368
460
|
return { platforms: snapshots }
|
|
369
461
|
}
|
package/src/cli-runtime.ts
CHANGED
|
@@ -45,6 +45,9 @@ let loaded: { root: string; runtime: typeof CliRuntime } | undefined
|
|
|
45
45
|
// so host serializers receive their implementation rather than a forwarding closure.
|
|
46
46
|
export function getCliRuntime(): typeof CliRuntime {
|
|
47
47
|
if (loaded) return loaded.runtime
|
|
48
|
+
// the companion comes from the runtime the host serves: inside the dev checkout
|
|
49
|
+
// that is the dev build `build:peachsim:cli` copied it beside, unless PEACH_HOME
|
|
50
|
+
// stages a runtime, as a release replay does inside a builder's checkout
|
|
48
51
|
const root = resolveDevCheckoutRuntimeAssetRoot() ?? resolveActiveRuntimeRoot()
|
|
49
52
|
if (!root) throw new Error('No Peach runtime installed; run `peach runtime install`')
|
|
50
53
|
verifyCliCompanion(root)
|
|
@@ -10,18 +10,28 @@ import { findBundleFooter } from './bundleGlobalFooter'
|
|
|
10
10
|
import {
|
|
11
11
|
collectConfiguredFileModules,
|
|
12
12
|
createPeachBundleConfigFooter,
|
|
13
|
+
detachPeachBundleConfigFooter,
|
|
13
14
|
PEACH_CONFIGURED_FILES_HOOK,
|
|
14
15
|
isPeachConfig,
|
|
15
16
|
} from './config'
|
|
16
17
|
import { resolveReplacementModuleFile } from './host/replacement-module-handler'
|
|
17
18
|
import type { PeachConfig } from './config'
|
|
18
19
|
|
|
20
|
+
// the minified prefix's first and last characters, as this producer writes them
|
|
21
|
+
const PREFIX_START = '(function(){const factories={'
|
|
22
|
+
const PREFIX_END = 'install(loaded)})();'
|
|
23
|
+
|
|
19
24
|
export async function produceConfiguredBundle(
|
|
20
25
|
source: string,
|
|
21
26
|
config: PeachConfig | undefined,
|
|
22
27
|
runtimePackages: ReadonlySet<string>,
|
|
23
28
|
): Promise<string> {
|
|
24
29
|
if (!config) return source
|
|
30
|
+
// a channel bundle already carries its configured files and config; packaging it with its
|
|
31
|
+
// project produces both again, and a second prefix finds the install hook already spent
|
|
32
|
+
source = detachPeachBundleConfigFooter(source).source
|
|
33
|
+
const producedEnd = source.startsWith(PREFIX_START) ? source.indexOf(PREFIX_END) : -1
|
|
34
|
+
if (producedEnd >= 0) source = source.slice(producedEnd + PREFIX_END.length)
|
|
25
35
|
// functions cannot cross JSON. executable native bindings belong in file entries.
|
|
26
36
|
const json = JSON.stringify(config, (_key, value: unknown) => {
|
|
27
37
|
if (
|
package/src/device-catalog.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getRuntimePlatformAdapter } from './runtimePlatformContract.ts'
|
|
2
|
+
|
|
1
3
|
export type RuntimePlatform = 'ios' | 'android'
|
|
2
4
|
|
|
3
5
|
// hardware side-button layout. top/height are in the frame's coordinate
|
|
@@ -245,6 +247,9 @@ export interface DeviceSpec {
|
|
|
245
247
|
// unresolvable off dev, so a shipped build cannot boot it. see
|
|
246
248
|
// isDeviceResolvableById.
|
|
247
249
|
developmentOnly?: boolean
|
|
250
|
+
// a window mode only a packaged app's host offers; browser, ide, tray and
|
|
251
|
+
// cli lists leave it out. it still resolves by id everywhere.
|
|
252
|
+
packagedOnly?: boolean
|
|
248
253
|
// posture is present on a resolved posture-aware profile. ordinary devices
|
|
249
254
|
// keep it absent so their existing device shape remains unchanged.
|
|
250
255
|
posture?: DevicePosture
|
|
@@ -262,8 +267,21 @@ export interface DeviceSpec {
|
|
|
262
267
|
// the foreground scene turned the duo's vertical bar off
|
|
263
268
|
// (withSceneVerticalBar). absent while the bar is automatic.
|
|
264
269
|
verticalBar?: 'disabled'
|
|
270
|
+
// distance from each window edge to the region a popover stays inside, where
|
|
271
|
+
// that region is not the default (10pt sides, safe area top and bottom).
|
|
272
|
+
popoverRegionInsets?: { left: number; top: number; right: number; bottom: number }
|
|
265
273
|
}
|
|
266
274
|
|
|
275
|
+
// the dynamic device's window limits, from the iOS 27.0 Stage Manager window
|
|
276
|
+
// on the iPad Pro 13-inch (M5), docs/ios-ipad-window-geometry.md: the smallest
|
|
277
|
+
// window is 375 x 486 and the largest the 1032 x 1376 display.
|
|
278
|
+
export const DYNAMIC_WINDOW_LIMITS = {
|
|
279
|
+
minWidth: 375,
|
|
280
|
+
minHeight: 486,
|
|
281
|
+
maxWidth: 1032,
|
|
282
|
+
maxHeight: 1376,
|
|
283
|
+
} as const
|
|
284
|
+
|
|
267
285
|
export type DeviceModel =
|
|
268
286
|
| 'canvas-workspace'
|
|
269
287
|
| 'iphone-se'
|
|
@@ -283,6 +301,7 @@ export type DeviceModel =
|
|
|
283
301
|
| 'iphone-duo'
|
|
284
302
|
| 'ipad-pro-11'
|
|
285
303
|
| 'ipad-pro-13'
|
|
304
|
+
| 'dynamic'
|
|
286
305
|
| 'pixel-8'
|
|
287
306
|
| 'pixel-8-three-button'
|
|
288
307
|
| 'pixel-9-pro-xl'
|
|
@@ -760,6 +779,10 @@ const profiles = {
|
|
|
760
779
|
top: 88 / 3,
|
|
761
780
|
trailing: 88 / 3,
|
|
762
781
|
},
|
|
782
|
+
// closed portrait popover region on the ios 27.1 duo simulator (uikit
|
|
783
|
+
// sheet probe, popoverLayoutMargins zero): left 8, the other edges 25.
|
|
784
|
+
// the open and rotated profiles are unmeasured and drop it.
|
|
785
|
+
popoverRegionInsets: { left: 8, top: 25, right: 25, bottom: 25 },
|
|
763
786
|
},
|
|
764
787
|
'ipad-pro-11': {
|
|
765
788
|
// frame and hardware buttons are not sourced yet, so this stays off the
|
|
@@ -782,6 +805,26 @@ const profiles = {
|
|
|
782
805
|
13,
|
|
783
806
|
403,
|
|
784
807
|
),
|
|
808
|
+
// an iPadOS app window the user resizes, on the iPad Pro 13-inch (M5). the
|
|
809
|
+
// profile is the launch window; the host sizes it with withWindowSize.
|
|
810
|
+
// numbers are the iOS 27.0 Stage Manager window in
|
|
811
|
+
// docs/ios-ipad-window-geometry.md.
|
|
812
|
+
dynamic: {
|
|
813
|
+
.../* @__PURE__ */ ipadProDevice('dynamic', 'Dynamic Window', 375, 753, 13, 403),
|
|
814
|
+
// the window starts below the screen's status strip and no home indicator
|
|
815
|
+
// is drawn in it, so neither insets the window.
|
|
816
|
+
statusBarHeight: 0,
|
|
817
|
+
landscapeStatusBarHeight: 0,
|
|
818
|
+
homeIndicatorHeight: 0,
|
|
819
|
+
navigationBarMode: 'none',
|
|
820
|
+
// the system clips the window to a 32pt circular arc.
|
|
821
|
+
cornerRadius: /* @__PURE__ */ cornerRadii(32),
|
|
822
|
+
continuousCornerRadius: /* @__PURE__ */ cornerRadii(32),
|
|
823
|
+
// the display's diagonal, not the window's.
|
|
824
|
+
physicalPPI: Math.hypot(2064, 2752) / 13,
|
|
825
|
+
safeAreaInsets: { top: 0, bottom: 0, left: 10, right: 10 },
|
|
826
|
+
packagedOnly: true,
|
|
827
|
+
},
|
|
785
828
|
'pixel-8': {
|
|
786
829
|
model: 'pixel-8',
|
|
787
830
|
platform: 'android',
|
|
@@ -1102,18 +1145,39 @@ export function listDeviceModels(): DeviceModel[] {
|
|
|
1102
1145
|
}
|
|
1103
1146
|
|
|
1104
1147
|
// devices a picker, tray, or list may offer. experimental prototypes never
|
|
1105
|
-
// appear,
|
|
1106
|
-
// running on a development surface
|
|
1148
|
+
// appear, developmentOnly devices appear only where the caller says it is
|
|
1149
|
+
// running on a development surface, and packagedOnly ones only in a packaged
|
|
1150
|
+
// app's host.
|
|
1107
1151
|
export function listSelectableDeviceModels(options?: {
|
|
1108
1152
|
developmentMode?: boolean
|
|
1153
|
+
packaged?: boolean
|
|
1109
1154
|
}): DeviceModel[] {
|
|
1110
1155
|
return listDeviceModels().filter((model) => {
|
|
1111
1156
|
const spec = devices[model]
|
|
1112
1157
|
if (spec.experimental) return false
|
|
1158
|
+
if (spec.packagedOnly && options?.packaged !== true) return false
|
|
1113
1159
|
return spec.developmentOnly !== true || options?.developmentMode === true
|
|
1114
1160
|
})
|
|
1115
1161
|
}
|
|
1116
1162
|
|
|
1163
|
+
// a swift guest's #available(iOS major.minor.patch) on this device: the
|
|
1164
|
+
// device's own iOS version answers, as the running OS does on device.
|
|
1165
|
+
export function iosVersionAtLeast(
|
|
1166
|
+
spec: DeviceSpec,
|
|
1167
|
+
major: number,
|
|
1168
|
+
minor: number,
|
|
1169
|
+
patch: number,
|
|
1170
|
+
): boolean {
|
|
1171
|
+
if (!getRuntimePlatformAdapter(spec.platform).isIOS)
|
|
1172
|
+
throw new Error(`${spec.model} runs ${spec.platform}, which has no iOS version`)
|
|
1173
|
+
const [deviceMajor = 0, deviceMinor = 0, devicePatch = 0] = spec.osVersion
|
|
1174
|
+
.split('.')
|
|
1175
|
+
.map(Number)
|
|
1176
|
+
if (deviceMajor !== major) return deviceMajor > major
|
|
1177
|
+
if (deviceMinor !== minor) return deviceMinor > minor
|
|
1178
|
+
return devicePatch >= patch
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1117
1181
|
// reverse lookup by display name (e.g. "iPhone 16 Pro Max" → 'iphone-16-pro-max').
|
|
1118
1182
|
// useful for consuming external manifests that record the human-readable
|
|
1119
1183
|
// device name without a slug. returns null when no match exists.
|
|
@@ -1125,7 +1189,7 @@ export function getDeviceByName(name: string): DeviceSpec | null {
|
|
|
1125
1189
|
}
|
|
1126
1190
|
|
|
1127
1191
|
function ipadProDevice(
|
|
1128
|
-
model: 'ipad-pro-11' | 'ipad-pro-13',
|
|
1192
|
+
model: 'ipad-pro-11' | 'ipad-pro-13' | 'dynamic',
|
|
1129
1193
|
name: string,
|
|
1130
1194
|
width: number,
|
|
1131
1195
|
height: number,
|
|
@@ -1164,7 +1228,7 @@ function ipadProDevice(
|
|
|
1164
1228
|
keyboardPanelHeights: {
|
|
1165
1229
|
qwerty: keyboardHeight,
|
|
1166
1230
|
pad: keyboardHeight,
|
|
1167
|
-
emoji: keyboardHeight + (model === 'ipad-pro-
|
|
1231
|
+
emoji: keyboardHeight + (model === 'ipad-pro-11' ? 0 : 2.5),
|
|
1168
1232
|
},
|
|
1169
1233
|
// hypot(1668, 2420) / 11, measured native pixels over the device type's
|
|
1170
1234
|
// 11-inch name. not a separate density read.
|
|
@@ -27,8 +27,11 @@ const PIPELINE_FILES = [
|
|
|
27
27
|
'expo-native-workspace',
|
|
28
28
|
'expo-swift-host',
|
|
29
29
|
'swift-compile',
|
|
30
|
+
'swift-cxx-reachable',
|
|
30
31
|
'swift-host',
|
|
32
|
+
'swift-objc-compile',
|
|
31
33
|
'swift-package',
|
|
34
|
+
'swift-standins',
|
|
32
35
|
'xcode-project',
|
|
33
36
|
]
|
|
34
37
|
|
|
@@ -63,14 +66,14 @@ function stable(value: unknown): string {
|
|
|
63
66
|
return JSON.stringify(value) ?? 'null'
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
export function expoDiscoveryKey(options: {
|
|
69
|
+
export async function expoDiscoveryKey(options: {
|
|
67
70
|
appRoot: string
|
|
68
71
|
searchText: string
|
|
69
72
|
resolveText: string
|
|
70
73
|
configuration?: unknown
|
|
71
74
|
signal?: AbortSignal
|
|
72
|
-
}): { key: string; root: string } {
|
|
73
|
-
const { root, hash } = hashExpoWorkspace(options.appRoot, options.signal)
|
|
75
|
+
}): Promise<{ key: string; root: string }> {
|
|
76
|
+
const { root, hash } = await hashExpoWorkspace(options.appRoot, options.signal)
|
|
74
77
|
const key = createHash('sha256')
|
|
75
78
|
.update(`${peachPin()}\0${hash}\0`)
|
|
76
79
|
.update(`${stable(JSON.parse(options.searchText))}\0`)
|
|
@@ -99,6 +102,8 @@ function isExpoSwiftSourceUnit(value: unknown): value is ExpoSwiftSourceUnit {
|
|
|
99
102
|
typeof value.moduleId === 'string' &&
|
|
100
103
|
strings(value.classes) &&
|
|
101
104
|
strings(value.bridgeModules) &&
|
|
105
|
+
strings(value.appDelegateSubscribers) &&
|
|
106
|
+
strings(value.reactDelegateHandlers) &&
|
|
102
107
|
stringRecord(value.files) &&
|
|
103
108
|
strings(value.frameworks) &&
|
|
104
109
|
(value.nativeTargets === undefined ||
|
|
@@ -124,6 +129,8 @@ function isStoredUnit(value: unknown): value is StoredExpoSwiftSourceUnit {
|
|
|
124
129
|
typeof value.moduleId === 'string' &&
|
|
125
130
|
strings(value.classes) &&
|
|
126
131
|
strings(value.bridgeModules) &&
|
|
132
|
+
strings(value.appDelegateSubscribers) &&
|
|
133
|
+
strings(value.reactDelegateHandlers) &&
|
|
127
134
|
digestRecord(value.files) &&
|
|
128
135
|
strings(value.frameworks) &&
|
|
129
136
|
(value.nativeTargets === undefined ||
|
package/src/expo-kotlin-host.ts
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
import fs from 'node:fs'
|
|
5
5
|
import path from 'node:path'
|
|
6
6
|
import { resolveExpoAndroidAutolinking } from './android-autolinking'
|
|
7
|
+
import {
|
|
8
|
+
androidAppSources,
|
|
9
|
+
selectBridgePackages,
|
|
10
|
+
type BridgePackage,
|
|
11
|
+
type BridgeSelection,
|
|
12
|
+
} from './android-bridge-packages'
|
|
7
13
|
import { isLoopbackHost } from './backend-origin'
|
|
14
|
+
import { COMPILED_EXPO_NATIVE_PACKAGES } from './expoSwiftContract'
|
|
8
15
|
import { isRecord } from './is-record'
|
|
9
16
|
import { peachKotlinModuleRoot } from './kotlin-module'
|
|
10
17
|
import type { ExpoKotlinCompilationResult } from './expoKotlinContract'
|
|
@@ -16,13 +23,15 @@ export interface ExpoKotlinModules {
|
|
|
16
23
|
// the registration names Android's ExpoModulesPackageList passes, in order
|
|
17
24
|
modules: { classifier: string; name: string | null }[]
|
|
18
25
|
sources: string[]
|
|
26
|
+
// the app's own legacy React Native modules, hosted beside the Expo ones
|
|
27
|
+
bridge: BridgeSelection | null
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
export async function collectExpoKotlinModules(
|
|
22
31
|
appRoot: string,
|
|
23
32
|
): Promise<ExpoKotlinModules | null> {
|
|
24
33
|
const modules = await resolveExpoAndroidAutolinking(appRoot)
|
|
25
|
-
const result: ExpoKotlinModules = { modules: [], sources: [] }
|
|
34
|
+
const result: ExpoKotlinModules = { modules: [], sources: [], bridge: null }
|
|
26
35
|
for (const entry of modules) {
|
|
27
36
|
// plugin-only dependencies have no local Kotlin module project.
|
|
28
37
|
if (entry.projects === undefined) continue
|
|
@@ -36,8 +45,13 @@ export async function collectExpoKotlinModules(
|
|
|
36
45
|
)
|
|
37
46
|
throw new Error('invalid Expo Android project')
|
|
38
47
|
const sourceDir = fs.realpathSync(project.sourceDir)
|
|
39
|
-
// installed
|
|
40
|
-
if (
|
|
48
|
+
// other installed dependencies retain their existing native seams.
|
|
49
|
+
if (
|
|
50
|
+
sourceDir.split(path.sep).includes('node_modules') &&
|
|
51
|
+
(typeof entry.packageName !== 'string' ||
|
|
52
|
+
!COMPILED_EXPO_NATIVE_PACKAGES.android.includes(entry.packageName))
|
|
53
|
+
)
|
|
54
|
+
continue
|
|
41
55
|
if (project.modules.length === 0) continue
|
|
42
56
|
for (const module of project.modules) {
|
|
43
57
|
if (
|
|
@@ -73,36 +87,93 @@ export async function collectExpoKotlinModules(
|
|
|
73
87
|
return result.modules.length === 0 ? null : result
|
|
74
88
|
}
|
|
75
89
|
|
|
90
|
+
// the app module's ReactPackage classes the application registers
|
|
91
|
+
async function collectBridgePackages(appRoot: string): Promise<BridgeSelection | null> {
|
|
92
|
+
const app = androidAppSources(appRoot)
|
|
93
|
+
if (
|
|
94
|
+
!app ||
|
|
95
|
+
!app.kotlin.some((file) =>
|
|
96
|
+
/\b(?:Base|Turbo)?ReactPackage\b/.test(fs.readFileSync(file, 'utf8')),
|
|
97
|
+
)
|
|
98
|
+
)
|
|
99
|
+
return null
|
|
100
|
+
const { scanBridgeFiles } = await import('./kotlin-host')
|
|
101
|
+
const files = await scanBridgeFiles(peachKotlinModuleRoot(), app.kotlin)
|
|
102
|
+
const selection = selectBridgePackages(app.applicationId, files, app.java)
|
|
103
|
+
return selection.packages.length === 0 ? null : selection
|
|
104
|
+
}
|
|
105
|
+
|
|
76
106
|
export async function compileExpoKotlinModules(
|
|
77
107
|
root: string,
|
|
78
108
|
origin: string,
|
|
79
109
|
): Promise<ExpoKotlinCompilationResult | null> {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
110
|
+
const expo = await collectExpoKotlinModules(root)
|
|
111
|
+
const selection = await collectBridgePackages(root)
|
|
112
|
+
if (!expo && !selection) return null
|
|
113
|
+
const modules = expo?.modules ?? []
|
|
114
|
+
const expoNamespaces = modules.map(
|
|
83
115
|
(module) => module.name ?? module.classifier.split('.').pop()!,
|
|
84
116
|
)
|
|
85
117
|
const { expoKotlinArtifact } = await import('./kotlin-host')
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
118
|
+
// a package that cannot be hosted, or whose sources fail to compile, is
|
|
119
|
+
// unavailable alone: the rest of the app's modules still link
|
|
120
|
+
const bridgeModules = (selection?.packages ?? []).flatMap((entry) =>
|
|
121
|
+
entry.modules.map((module) => module.name),
|
|
122
|
+
)
|
|
123
|
+
const failures: ExpoKotlinCompilationResult['failures'] = []
|
|
124
|
+
let hosted = selection?.packages ?? []
|
|
125
|
+
const drop = (dropped: typeof hosted, diagnostic: (entry: BridgePackage) => string) => {
|
|
126
|
+
for (const entry of dropped)
|
|
127
|
+
for (const module of entry.modules)
|
|
128
|
+
failures.push({ namespace: module.name, diagnostic: diagnostic(entry) })
|
|
129
|
+
hosted = hosted.filter((entry) => !dropped.includes(entry))
|
|
130
|
+
}
|
|
131
|
+
drop(
|
|
132
|
+
hosted.filter((entry) => entry.unsupported !== null),
|
|
133
|
+
(entry) => entry.unsupported!,
|
|
134
|
+
)
|
|
135
|
+
const result = (module: ExpoKotlinCompilationResult['module']) => ({
|
|
136
|
+
namespaces: [...expoNamespaces, ...bridgeModules],
|
|
137
|
+
module,
|
|
138
|
+
failures,
|
|
139
|
+
bridgeModules,
|
|
140
|
+
})
|
|
141
|
+
for (;;) {
|
|
142
|
+
const sources = [
|
|
143
|
+
...new Set([...(expo?.sources ?? []), ...hosted.flatMap((entry) => entry.sources)]),
|
|
144
|
+
]
|
|
145
|
+
if (modules.length === 0 && hosted.length === 0) return result(null)
|
|
146
|
+
try {
|
|
147
|
+
const artifact = await expoKotlinArtifact(root, peachKotlinModuleRoot(), origin, {
|
|
148
|
+
modules,
|
|
149
|
+
sources,
|
|
150
|
+
bridge: selection && { applicationId: selection.applicationId, packages: hosted },
|
|
151
|
+
})
|
|
152
|
+
return result(artifact)
|
|
153
|
+
} catch (error) {
|
|
154
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
155
|
+
// kotlinc names each failing source line; anything else is the host's
|
|
156
|
+
const errors = message.match(/^.+\.kt:\d+:\d+: error:.*$/gm)
|
|
157
|
+
if (!errors) throw error
|
|
158
|
+
const broken = hosted.filter((entry) =>
|
|
159
|
+
entry.sources.some((source) =>
|
|
160
|
+
errors.some((line) => line.startsWith(`${source}:`)),
|
|
161
|
+
),
|
|
162
|
+
)
|
|
163
|
+
if (broken.length > 0) {
|
|
164
|
+
drop(broken, (entry) =>
|
|
165
|
+
errors
|
|
166
|
+
.filter((line) =>
|
|
167
|
+
entry.sources.some((source) => line.startsWith(`${source}:`)),
|
|
168
|
+
)
|
|
169
|
+
.join('\n'),
|
|
170
|
+
)
|
|
171
|
+
continue
|
|
172
|
+
}
|
|
173
|
+
const diagnostic = errors.join('\n')
|
|
174
|
+
for (const namespace of expoNamespaces) failures.push({ namespace, diagnostic })
|
|
175
|
+
drop(hosted, () => diagnostic)
|
|
176
|
+
return result(null)
|
|
106
177
|
}
|
|
107
178
|
}
|
|
108
179
|
}
|