peachsim 0.1.2935 → 0.1.2937
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/LICENSE +6 -8
- package/cli/account-gate.ts +20 -3
- package/cli/app-bundle-resources.ts +66 -19
- package/cli/catalog/meta.ts +2 -106
- package/cli/command-agent.ts +7 -0
- package/cli/command-registry.ts +0 -1
- package/cli/commands/control.ts +13 -5
- package/cli/commands/daemon.ts +4 -2
- package/cli/commands/device.ts +78 -8
- package/cli/commands/do-chain.ts +11 -8
- package/cli/commands/inspect/core.ts +4 -9
- package/cli/commands/inspect/settling.ts +1 -0
- package/cli/commands/logout.ts +6 -1
- package/cli/commands/map.ts +2 -6
- package/cli/commands/package.ts +112 -57
- package/cli/commands/shell-url.ts +0 -1
- package/cli/download-auth.ts +2 -0
- package/cli/drivers/playwright-provisioning.ts +10 -38
- package/cli/github-workflow-identity.ts +8 -0
- package/cli/internal-child-contract.ts +1 -0
- package/cli/internal-child.ts +5 -0
- package/cli/main.ts +2 -10
- package/cli/outbound-endpoints.ts +26 -0
- package/detox/index.ts +227 -131
- 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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +47 -3
- package/dist-lib/bridge-contract-input.mjs +6 -6
- package/dist-lib/bridge-contract.cjs +10 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +12779 -9515
- package/dist-lib/capture-contract.cjs +39 -17
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +8 -8
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +6 -6
- package/dist-lib/detox/index.cjs +200 -132
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-Q5TRRYSO.mjs → acorn-IIBLEO25.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-UDWBTBVG.mjs → chunk-4FTPQKPT.mjs} +10 -1
- package/dist-lib/esm-chunks/chunk-4WIDTRBB.mjs +10232 -0
- package/dist-lib/esm-chunks/{chunk-LCMFYMT7.mjs → chunk-5QZOQ3NZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BJ2OGUX7.mjs → chunk-CIY67HNL.mjs} +39 -17
- package/dist-lib/esm-chunks/{chunk-SKQTNQYE.mjs → chunk-CQFEMJ64.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AXWVXRHX.mjs → chunk-CWVMCW23.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MTALOHQR.mjs → chunk-F6DZ4DS2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-I4R7IZRD.mjs → chunk-HJMF6O7L.mjs} +74 -46
- package/dist-lib/esm-chunks/chunk-I6T4PXJF.mjs +154 -0
- package/dist-lib/esm-chunks/{chunk-XWAUZKIA.mjs → chunk-IJU3JMWM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CXWUIOCH.mjs → chunk-KODEPXQC.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-WJE5QHSD.mjs → chunk-LD4K2VBL.mjs} +155 -36
- package/dist-lib/esm-chunks/{chunk-2TSM64HI.mjs → chunk-LTE7YMEG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3GGOXUJA.mjs → chunk-M3CSKAJE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7G5UETIG.mjs → chunk-NA6DJPB6.mjs} +43 -1
- package/dist-lib/esm-chunks/{chunk-MSUHMNAI.mjs → chunk-NNAX24FS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VDJA4LP4.mjs → chunk-PZPJJBAS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UEEEJVQA.mjs → chunk-QXSTHMWN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-S2RJB5I7.mjs → chunk-RBPVK5YI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VRAXNGYT.mjs → chunk-SCT5OFDV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-T3M73LGP.mjs → chunk-U3CJGYSP.mjs} +50 -6
- package/dist-lib/esm-chunks/{chunk-SLUGTGQQ.mjs → chunk-VXTOQ522.mjs} +12 -6
- package/dist-lib/esm-chunks/{chunk-EL44SZMV.mjs → chunk-WMSVGYTH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-FEDEPSEV.mjs → chunk-WRWINRWK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BNO52N2S.mjs → chunk-YZF2USRD.mjs} +1905 -8760
- package/dist-lib/esm-chunks/{chunk-TQLKYMVP.mjs → chunk-ZNHR6C3L.mjs} +1 -1
- package/dist-lib/esm-chunks/{download-auth-registry-G75MIT55.mjs → download-auth-registry-AHS5MSIB.mjs} +4 -4
- package/dist-lib/esm-chunks/{metro-layout-parser-FXLUDTYT.mjs → metro-layout-parser-24ZYK5UP.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-524D4MA2.mjs → swift-package-prebuilt-L4YNXQRD.mjs} +15 -15
- package/dist-lib/esm-chunks/{swift-sdk-app-module-EX544YJY.mjs → swift-sdk-app-module-RM652JSW.mjs} +87 -71
- package/dist-lib/esm-chunks/{swift-sdk-image-LOTMWVM7.mjs → swift-sdk-image-5PQ44UJT.mjs} +15 -15
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-UO6B3M4U.mjs → swift-sdk-image-producer-GD3SM6YI.mjs} +5 -5
- package/dist-lib/esm-chunks/swift-sdk-later-data-62QYJ2KH.mjs +590 -0
- package/dist-lib/expo-swift-bundle.cjs +21037 -17896
- package/dist-lib/expo-swift-metadata.cjs +8 -2
- package/dist-lib/expo-swift-metadata.mjs +9 -8
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +22481 -18741
- package/dist-lib/host/fetch-proxy-handler.cjs +21079 -17980
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +68 -38
- package/dist-lib/kotlin-host.cjs +97 -21
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +23 -1
- package/dist-lib/metro-production-bundle.mjs +24 -4
- package/dist-lib/native-app-identity-project.cjs +3582 -571
- package/dist-lib/native-app-identity-project.mjs +1024 -398
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +132 -116
- package/dist-lib/public-origins-lib.json +215 -173
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +17 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +6 -7
- package/dist-lib/sdk.mjs +13 -14
- package/dist-lib/skills.cjs +23216 -19650
- package/dist-lib/swift-compile.cjs +4337 -2905
- package/dist-lib/swift-compile.mjs +15 -13
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +19 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +94 -32
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +8 -5
- package/dist-lib/worklet-executable.mjs +9 -6
- package/dist-types/packages/peach-engine/src/canvaskit-artifact-urls.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/capture/compositor-presentation-recording.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/generated/canvaskit-artifact-hashes.d.ts +26 -0
- package/dist-types/packages/peach-engine/src/engine/guest-scene-inspect.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/inspect-info.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/metalTypes.d.ts +32 -2
- package/dist-types/packages/peach-engine/src/engine/portalContract.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/engine/remote-display-protocol.d.ts +12 -2
- package/dist-types/packages/peach-engine/src/guest/http-cookie-storage.d.ts +73 -0
- package/dist-types/packages/peach-engine/src/guest/native-evaluation-lease.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/guest/nitro-jsi-host.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +225 -9
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/ios/duo-vertical-bar-geometry.d.ts +0 -1
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/remote-stream/canvas-display-compositor.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/remote-stream/canvas-display-contract.d.ts +44 -10
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +4 -3
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -4
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -27
- package/dist-types/packages/peach-engine/src/render-worker/reanimated-readiness.d.ts +2 -6
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/app-bundle-resources.d.ts +10 -0
- package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/hostStorageBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +2 -2
- package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +9 -6
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +11 -0
- package/dist-types/packages/peach-globals/src/oneWidgetContract.d.ts +28 -0
- package/package.json +2 -2
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreHaptics.framework/Headers/CoreHaptics.h +251 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INImage.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INIntent.h +18 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INIntentIdentifiers.h +30 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INIntentResponse.h +12 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INInteraction.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectCollection.h +0 -7
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectSection.h +0 -7
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INOutgoingMessageType.h +7 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INPerson.h +36 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INPersonHandle.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INSendMessageIntent+UserNotifications.h +6 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INSendMessageIntent.h +33 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INSpeakableString.h +24 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/Intents.h +11 -7
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +0 -8
- package/sdk/ios/System/Library/Frameworks/MetalTypes.framework/Headers/MetalTypes.h +8 -0
- package/sdk/ios/System/Library/Frameworks/Social.framework/Headers/SLServiceTypes.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Social.framework/Headers/Social.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotification.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAction.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttachment.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationCategory.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationRequest.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationResponse.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSound.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationTrigger.h +5 -5
- package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/wasm/include/unistd.h +1 -0
- package/src/acorn-program.ts +3 -0
- package/src/audio-codec-archives.ts +141 -0
- package/src/bridge-contract-input.ts +61 -1
- package/src/bridge-contract.ts +45 -4
- package/src/bundle-channel.mjs +44 -30
- package/src/capture-contract.ts +57 -39
- package/src/conformance-comparison-contract.ts +2 -0
- package/src/expo-discovery-cache.ts +0 -2
- package/src/expo-macro-host.ts +8 -3
- package/src/expo-native-compiler-digest.ts +0 -1
- package/src/expo-native-prebuilt.ts +1 -1
- package/src/expo-native-workspace.ts +83 -45
- package/src/expo-pod-prebuilt.ts +1 -0
- package/src/expo-swift-host.ts +158 -77
- package/src/expo-swift-legacy-runtime-source.ts +12 -1
- package/src/expo-swift-view-source.ts +51 -20
- package/src/expo-workspace-exclusion.ts +7 -1
- package/src/expoSwiftContract.ts +10 -1
- package/src/ffmpeg-source-build.ts +123 -59
- package/src/genrule-archives.ts +7 -2
- package/src/genrule-library-builds.ts +101 -18
- package/src/host/bridge-host.ts +10 -1
- package/src/installed-native-libraries.ts +147 -23
- package/src/installed-package-versions.ts +30 -0
- package/src/ios-rn-bundle-request.ts +3 -1
- package/src/ios-rn-bundle.ts +38 -27
- package/src/ios-rn-compile.ts +23 -6
- package/src/ios-rn-startup.ts +2 -1
- package/src/java-module-abi.ts +4 -3
- package/src/kotlin-host.ts +4 -4
- package/src/kotlin-library-sources.ts +8 -5
- package/src/metro-production-bundle.ts +24 -0
- package/src/native-firebase-config.ts +2 -0
- package/src/native-framework-compiler.ts +5 -0
- package/src/native-package-slice-build.ts +3 -0
- package/src/native-package-slice.ts +15 -10
- package/src/native-preparation.ts +4 -1
- package/src/native-static-libraries.ts +107 -33
- package/src/nativeRuntimePackageIndex.ts +1 -4
- package/src/nitro-adapter.lock.json +286 -286
- package/src/nitro-app-providers.ts +20 -8
- package/src/nitro-compile.ts +131 -37
- package/src/nitro-dependencies.ts +42 -8
- package/src/nitro-source.ts +40 -36
- package/src/nitro-superset.lock.json +4 -4
- package/src/nitroAdapterContract.ts +32 -7
- package/src/nitroContract.ts +21 -37
- package/src/one-direct-host-source.ts +247 -140
- package/src/one-fabric.ts +129 -0
- package/src/one-native-controls-package.ts +95 -21
- package/src/one-native-controls-release.ts +147 -14
- package/src/one-native-source.ts +4 -1
- package/src/one-nitro-inputs.ts +1 -1
- package/src/one-nitro-source.ts +45 -1
- package/src/one-sdk/source.ts +10 -41
- package/src/one-widget-metadata.ts +2 -2
- package/src/one-widget-package.ts +1 -1
- package/src/oneSdkContract.ts +3 -0
- package/src/playwright-browser-paths.ts +30 -0
- package/src/pods-install.ts +6 -2
- package/src/pods-post-install.ts +2 -2
- package/src/pods-project.ts +10 -0
- package/src/podspec-ruby-stdlib.ts +73 -0
- package/src/podspec-ruby.ts +1 -1
- package/src/podspec-sources.ts +31 -13
- package/src/process-group.ts +135 -5
- package/src/published-swift-sdk.ts +25 -1
- package/src/react-native-bridge-modules.ts +35 -3
- package/src/react-native-core-build.ts +14 -2
- package/src/react-native-core.ts +12 -2
- package/src/rive-runtime-dependencies.ts +178 -40
- package/src/serverDiscoveryContract.ts +1 -1
- package/src/storageSnapshotContract.ts +1 -1
- package/src/swift-app-data-store.ts +35 -0
- package/src/swift-compile.ts +403 -121
- package/src/swift-compiler-digest.ts +4 -0
- package/src/swift-darwin-records.ts +6 -0
- package/src/swift-distribution-mirror.ts +10 -1
- package/src/swift-distribution.lock.json +19 -18
- package/src/swift-distribution.ts +17 -1
- package/src/swift-entry-module.ts +1 -0
- package/src/swift-guest-compile.ts +8 -1
- package/src/swift-host.ts +79 -23
- package/src/swift-installed-targets.ts +51 -20
- package/src/swift-objc-standin.ts +60 -8
- package/src/swift-packages.ts +104 -24
- package/src/swift-project-user.ts +2 -1
- package/src/swift-reproducible.ts +99 -1
- package/src/swift-root-lock.ts +52 -46
- package/src/swift-sdk-app-module.ts +65 -13
- package/src/swift-sdk-image-producer.ts +2 -1
- package/src/swift-sdk-image.ts +23 -8
- package/src/swift-sdk-later-data.ts +294 -44
- package/src/swift-sdk-surface.ts +233 -55
- package/src/swift-shared-sdk.ts +7 -0
- package/src/swift-standin-builtin-behavior.ts +18 -0
- package/src/swift-standin-emit.ts +242 -54
- package/src/swift-standins.ts +184 -38
- package/src/swift-startup-split.ts +19 -9
- package/src/swift-toolchain.ts +18 -0
- package/src/swift-wasm-prune.ts +179 -9
- package/src/swift-xcframework.ts +16 -0
- package/src/swiftContract.ts +4 -1
- package/src/swiftSdkLinkContract.ts +2 -0
- package/src/swiftTargetContract.ts +1 -0
- package/src/turbo-bundle.ts +6 -3
- package/src/turbo-codegen-intake.ts +106 -16
- package/src/turbo-compile.ts +89 -68
- package/src/turbo-fabric-app.ts +287 -23
- package/src/turbo-provider-host.ts +122 -31
- package/src/turbo-runtime.lock.json +26 -26
- package/src/turbo-source.ts +374 -157
- package/src/vite-plugin.ts +48 -112
- package/src/wasm-binary-sections.ts +40 -0
- package/src/wasm-code-immediates.ts +35 -5
- package/src/widget-extension-bundle.ts +15 -1
- package/src/worklet-executable.ts +2 -1
- package/src/worklet-kernel.ts +5 -3
- package/src/worklets-babel.ts +2 -1
- package/src/xcode-project.ts +151 -53
- package/src/xcode-scheme-actions.ts +104 -0
- package/cli/commands/canvas.ts +0 -1204
- package/dist-lib/esm-chunks/chunk-B5QD2KEV.mjs +0 -2787
- package/dist-lib/vendor/magic-string.cjs +0 -1693
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +0 -127
- package/src/appBundleResourcesContract.ts +0 -51
- package/src/canvas-groups.ts +0 -28
- package/src/canvas-map-layout.ts +0 -161
- package/src/oneWidgetContract.ts +0 -134
|
@@ -2,19 +2,28 @@
|
|
|
2
2
|
// verified native slices supply each declared vendored archive. a provider
|
|
3
3
|
// that links a prebuilt Apple binary with no WebAssembly build is unavailable,
|
|
4
4
|
// as a pod the app never linked would be, and its diagnostic names the binary.
|
|
5
|
+
import { createHash } from 'node:crypto'
|
|
5
6
|
import fs from 'node:fs'
|
|
6
7
|
import { createRequire } from 'node:module'
|
|
7
8
|
import path from 'node:path'
|
|
9
|
+
import * as v from 'valibot'
|
|
10
|
+
import yaml from 'yaml'
|
|
8
11
|
import { preparedExpoWorkspacesDir } from './expo-native-workspace'
|
|
9
12
|
import { isRecord } from './is-record'
|
|
10
13
|
import {
|
|
11
14
|
combineNativeStaticLibraries,
|
|
15
|
+
HERMES_VM_NATIVE_LIBRARY,
|
|
12
16
|
nativeStaticLibrary,
|
|
13
17
|
nonmodularFrameworkLibraries,
|
|
14
18
|
nativeStaticLibraryRecipe,
|
|
15
19
|
} from './native-static-libraries'
|
|
20
|
+
import { lockedPods } from './pod-lockfile'
|
|
21
|
+
import { swiftModuleToolchain } from './swift-distribution'
|
|
22
|
+
import { installedSourceFrameworkRecipe } from './swift-packages'
|
|
16
23
|
import { withSwiftRootLock } from './swift-root-lock'
|
|
17
24
|
import { readPackageFile, relativeInside } from './swift-source-file'
|
|
25
|
+
import { hasBuiltinStandinBehavior } from './swift-standin-builtin-behavior'
|
|
26
|
+
import { swiftStandins } from './swift-standins'
|
|
18
27
|
import { simulatorNativeLibrary } from './swift-xcframework'
|
|
19
28
|
import { readXcodeAppTarget, requireInstalledXcodeWorkspace } from './xcode-project'
|
|
20
29
|
import type {
|
|
@@ -95,8 +104,9 @@ export async function installedNativeLibraries(
|
|
|
95
104
|
projectRoot: string,
|
|
96
105
|
moduleRoot: string,
|
|
97
106
|
iosTarget?: string,
|
|
98
|
-
|
|
107
|
+
options: { frameworkLinkOwner?: 'workspace' | 'provider'; linkHermes?: boolean } = {},
|
|
99
108
|
): Promise<InstalledNativeLibraries> {
|
|
109
|
+
const { frameworkLinkOwner = 'workspace', linkHermes = false } = options
|
|
100
110
|
const result: InstalledNativeLibraries = { pods: new Map(), unavailable: new Map() }
|
|
101
111
|
if (providers.length === 0) return result
|
|
102
112
|
projectRoot = fs.realpathSync(projectRoot)
|
|
@@ -139,15 +149,56 @@ export async function installedNativeLibraries(
|
|
|
139
149
|
.map((directory) => fs.realpathSync(directory))
|
|
140
150
|
// nonmodular frameworks publish their headers through CocoaPods search
|
|
141
151
|
// roots. their verified implementations link once through the shared core.
|
|
142
|
-
const
|
|
152
|
+
const shared = nonmodularFrameworkLibraries(
|
|
143
153
|
binaryPaths,
|
|
144
154
|
moduleRoot,
|
|
145
|
-
(recipe) => recipe.name ===
|
|
155
|
+
(recipe) => recipe.name === HERMES_VM_NATIVE_LIBRARY.name,
|
|
146
156
|
)
|
|
157
|
+
if (linkHermes) {
|
|
158
|
+
const lock: unknown = yaml.parse(fs.readFileSync(app.cocoapods.manifestLock, 'utf8'))
|
|
159
|
+
const version = lockedPods(lock).get('hermes-engine')?.version
|
|
160
|
+
if (version !== HERMES_VM_NATIVE_LIBRARY.version)
|
|
161
|
+
throw new Error(
|
|
162
|
+
`${projectRoot}: no compiled Hermes VM for CocoaPods version ${version}`,
|
|
163
|
+
)
|
|
164
|
+
const archive = nativeStaticLibrary(
|
|
165
|
+
path.join(podsRoot, 'hermes-engine'),
|
|
166
|
+
HERMES_VM_NATIVE_LIBRARY,
|
|
167
|
+
moduleRoot,
|
|
168
|
+
)
|
|
169
|
+
const { jsiInputs } = v.parse(
|
|
170
|
+
v.object({
|
|
171
|
+
jsiInputs: v.array(
|
|
172
|
+
v.tuple([
|
|
173
|
+
v.picklist(['jsi/jsi.h', 'jsi/jsi-inl.h', 'jsi/jsi.cpp']),
|
|
174
|
+
v.string(),
|
|
175
|
+
]),
|
|
176
|
+
),
|
|
177
|
+
}),
|
|
178
|
+
JSON.parse(
|
|
179
|
+
fs.readFileSync(path.join(path.dirname(archive), 'receipt.json'), 'utf8'),
|
|
180
|
+
),
|
|
181
|
+
)
|
|
182
|
+
for (const [file, digest] of jsiInputs) {
|
|
183
|
+
const source = path.join(reactNativeRoot, 'ReactCommon/jsi', file)
|
|
184
|
+
if (createHash('sha256').update(fs.readFileSync(source)).digest('hex') !== digest)
|
|
185
|
+
throw new Error(`${source}: JSI differs from the compiled Hermes VM`)
|
|
186
|
+
}
|
|
187
|
+
shared.push(archive)
|
|
188
|
+
}
|
|
189
|
+
const [firstShared, ...otherShared] = shared
|
|
147
190
|
const sharedLibrary =
|
|
148
191
|
firstShared === undefined
|
|
149
192
|
? undefined
|
|
150
193
|
: combineNativeStaticLibraries([firstShared, ...otherShared], moduleRoot)
|
|
194
|
+
const resolvedFrameworks = new Map<
|
|
195
|
+
string,
|
|
196
|
+
TurboInstalledPod['binaryFrameworks'][number] | null
|
|
197
|
+
>()
|
|
198
|
+
// a recipe-matched dependency framework stands in by its headers alone; its
|
|
199
|
+
// source-built archive links once, with the first pod that uses it
|
|
200
|
+
const dependencyArchives = new Map<string, string>()
|
|
201
|
+
const linkedDependencyArchives = new Set<string>()
|
|
151
202
|
for (const provider of providers) {
|
|
152
203
|
const name = path.basename(provider.podspecPath, '.podspec')
|
|
153
204
|
const json = localPods.get(name)
|
|
@@ -176,23 +227,35 @@ export async function installedNativeLibraries(
|
|
|
176
227
|
return relative === null ? [] : [relative]
|
|
177
228
|
}),
|
|
178
229
|
)
|
|
230
|
+
const ffmpeg =
|
|
231
|
+
provider.name === 'react-native-audio-api'
|
|
232
|
+
? new Set(
|
|
233
|
+
paths.filter((file) =>
|
|
234
|
+
/^common\/cpp\/audioapi\/external\/ffmpeg_ios\/lib(?:avcodec|avformat|avutil|swresample)\.xcframework$/.test(
|
|
235
|
+
file,
|
|
236
|
+
),
|
|
237
|
+
),
|
|
238
|
+
)
|
|
239
|
+
: new Set<string>()
|
|
179
240
|
// the copy phases identify the exact XCFrameworks selected through subspecs.
|
|
180
|
-
const archives = [...new Set([...paths, ...selected])]
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
file
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
241
|
+
const archives = [...new Set([...paths, ...selected])]
|
|
242
|
+
.filter((file) => !ffmpeg.has(file))
|
|
243
|
+
.map((file) => {
|
|
244
|
+
if (!selected.has(file) && (spec.subspecs || /[*?{]/.test(file)))
|
|
245
|
+
return { file, recipe: null }
|
|
246
|
+
const declared = path.resolve(root, file)
|
|
247
|
+
const framework = declared.endsWith('.xcframework')
|
|
248
|
+
? simulatorNativeLibrary(declared)
|
|
249
|
+
: null
|
|
250
|
+
if (declared.endsWith('.xcframework') && !framework) return { file, recipe: null }
|
|
251
|
+
const native = framework?.file ?? declared
|
|
252
|
+
return {
|
|
253
|
+
file: path.relative(root, native),
|
|
254
|
+
native,
|
|
255
|
+
framework,
|
|
256
|
+
recipe: nativeStaticLibraryRecipe(readPackageFile(root, native, Infinity)),
|
|
257
|
+
}
|
|
258
|
+
})
|
|
196
259
|
// a pod from a specification repository whose installed files are only
|
|
197
260
|
// prebuilt binaries, such as a vendor SDK framework, cannot compile.
|
|
198
261
|
const dependencyBinaries = Object.keys({
|
|
@@ -201,14 +264,64 @@ export async function installedNativeLibraries(
|
|
|
201
264
|
}).flatMap((dependency) => {
|
|
202
265
|
const pod = dependency.split('/')[0]!
|
|
203
266
|
if (localPods.has(pod)) return []
|
|
204
|
-
return installedPodBinaries(path.join(podsRoot, pod))
|
|
205
|
-
path.relative(path.dirname(podsRoot), file),
|
|
206
|
-
)
|
|
267
|
+
return installedPodBinaries(path.join(podsRoot, pod))
|
|
207
268
|
})
|
|
269
|
+
const binaryFrameworks: TurboInstalledPod['binaryFrameworks'] = []
|
|
270
|
+
const unanswered: string[] = []
|
|
271
|
+
for (const directory of new Set(dependencyBinaries)) {
|
|
272
|
+
if (installedSourceFrameworkRecipe(app.cocoapods, directory)) continue
|
|
273
|
+
let resolved = resolvedFrameworks.get(directory)
|
|
274
|
+
if (resolved === undefined) {
|
|
275
|
+
const framework = simulatorNativeLibrary(directory)
|
|
276
|
+
const recipe =
|
|
277
|
+
framework?.kind === 'framework'
|
|
278
|
+
? nativeStaticLibraryRecipe(fs.readFileSync(framework.file))
|
|
279
|
+
: undefined
|
|
280
|
+
resolved = null
|
|
281
|
+
if (
|
|
282
|
+
frameworkLinkOwner === 'workspace' &&
|
|
283
|
+
framework?.kind === 'framework' &&
|
|
284
|
+
(hasBuiltinStandinBehavior(framework.name) || recipe !== undefined)
|
|
285
|
+
) {
|
|
286
|
+
const toolchain = { moduleRoot, ...swiftModuleToolchain(moduleRoot) }
|
|
287
|
+
const { standins, gaps } = await swiftStandins(
|
|
288
|
+
[
|
|
289
|
+
{
|
|
290
|
+
target: framework.name,
|
|
291
|
+
source: path.relative(path.dirname(podsRoot), directory),
|
|
292
|
+
url: null,
|
|
293
|
+
checksum: null,
|
|
294
|
+
dir: directory,
|
|
295
|
+
reached: true,
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
toolchain,
|
|
299
|
+
new Set(),
|
|
300
|
+
{},
|
|
301
|
+
{ nativeSlices: false },
|
|
302
|
+
)
|
|
303
|
+
if (gaps.size === 0 && standins.length > 0) {
|
|
304
|
+
resolved = {
|
|
305
|
+
name: framework.name,
|
|
306
|
+
headers: path.join(path.dirname(framework.file), 'Headers'),
|
|
307
|
+
standins,
|
|
308
|
+
}
|
|
309
|
+
if (recipe)
|
|
310
|
+
dependencyArchives.set(
|
|
311
|
+
directory,
|
|
312
|
+
nativeStaticLibrary(framework.file, recipe, moduleRoot),
|
|
313
|
+
)
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
resolvedFrameworks.set(directory, resolved)
|
|
317
|
+
}
|
|
318
|
+
if (resolved) binaryFrameworks.push(resolved)
|
|
319
|
+
else unanswered.push(path.relative(path.dirname(podsRoot), directory))
|
|
320
|
+
}
|
|
208
321
|
const unavailable = [
|
|
209
322
|
...new Set([
|
|
210
323
|
...archives.flatMap(({ file, recipe }) => (recipe ? [] : [file])),
|
|
211
|
-
...
|
|
324
|
+
...unanswered,
|
|
212
325
|
]),
|
|
213
326
|
]
|
|
214
327
|
if (unavailable.length > 0) {
|
|
@@ -234,6 +347,16 @@ export async function installedNativeLibraries(
|
|
|
234
347
|
? []
|
|
235
348
|
: [library]
|
|
236
349
|
})
|
|
350
|
+
for (const directory of dependencyBinaries) {
|
|
351
|
+
const archive = dependencyArchives.get(directory)
|
|
352
|
+
if (!archive || linkedDependencyArchives.has(archive)) continue
|
|
353
|
+
linkedDependencyArchives.add(archive)
|
|
354
|
+
ownedLibraries.push(archive)
|
|
355
|
+
}
|
|
356
|
+
if (ffmpeg.size > 0) {
|
|
357
|
+
const { audioApiFfmpegArchive } = await import('./audio-codec-archives')
|
|
358
|
+
ownedLibraries.push(await audioApiFfmpegArchive(root, moduleRoot, [...ffmpeg]))
|
|
359
|
+
}
|
|
237
360
|
const [firstLibrary, ...otherLibraries] = ownedLibraries
|
|
238
361
|
const publicHeaders = new Set(
|
|
239
362
|
(target.objc?.publicHeaders ?? []).map((file) => fs.realpathSync(file)),
|
|
@@ -277,6 +400,7 @@ export async function installedNativeLibraries(
|
|
|
277
400
|
result.pods.set(provider.name, {
|
|
278
401
|
root,
|
|
279
402
|
moduleName: target.moduleName,
|
|
403
|
+
binaryFrameworks,
|
|
280
404
|
preprocessorFlags: {
|
|
281
405
|
c: preprocessorFlags(target.objc?.flags ?? []),
|
|
282
406
|
cxx: preprocessorFlags([
|
|
@@ -239,6 +239,36 @@ export function readInstalledNativePackageVersions(projectRoot: string): Package
|
|
|
239
239
|
return versions
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
// reads native package versions directly from a standalone project's bun.lock
|
|
243
|
+
// so builds that omit its node_modules (like remote conformance builds) still
|
|
244
|
+
// bind the exact pinned versions.
|
|
245
|
+
export function readLockfileNativePackageVersions(projectRoot: string): PackageVersions {
|
|
246
|
+
const lockPath = path.join(fs.realpathSync(projectRoot), 'bun.lock')
|
|
247
|
+
const parsed: unknown = JSON.parse(
|
|
248
|
+
fs.readFileSync(lockPath, 'utf8').replace(/,(\s*[}\]])/g, '$1'),
|
|
249
|
+
)
|
|
250
|
+
const packages =
|
|
251
|
+
typeof parsed === 'object' && parsed !== null
|
|
252
|
+
? Reflect.get(parsed, 'packages')
|
|
253
|
+
: undefined
|
|
254
|
+
if (typeof packages !== 'object' || packages === null)
|
|
255
|
+
throw new Error(`bun.lock at ${lockPath} has no packages map`)
|
|
256
|
+
const nativeNames = getNativePackageNames()
|
|
257
|
+
const versions: PackageVersions = {}
|
|
258
|
+
for (const [key, entry] of Object.entries(packages)) {
|
|
259
|
+
if (!Array.isArray(entry) || typeof entry[0] !== 'string') continue
|
|
260
|
+
const spec = entry[0]
|
|
261
|
+
const at = spec.lastIndexOf('@')
|
|
262
|
+
if (at <= 0) continue
|
|
263
|
+
const name = spec.slice(0, at)
|
|
264
|
+
const version = spec.slice(at + 1)
|
|
265
|
+
if (key === name && nativeNames.has(name) && version) versions[name] = version
|
|
266
|
+
}
|
|
267
|
+
if (Object.keys(versions).length === 0)
|
|
268
|
+
throw new Error(`bun.lock at ${lockPath} resolved no native packages`)
|
|
269
|
+
return versions
|
|
270
|
+
}
|
|
271
|
+
|
|
242
272
|
// record every input before the walk reads it, including missing candidates and
|
|
243
273
|
// linked manifests. an edit during the walk invalidates the next scan.
|
|
244
274
|
async function installFingerprint(target: string): Promise<string> {
|
|
@@ -13,7 +13,9 @@ import { localPublishedSwiftSdkUrl, swiftArtifactIsAvailable } from './swift-hos
|
|
|
13
13
|
import { swiftModuleStamp } from './swift-sdk-surface'
|
|
14
14
|
import { privateSwiftDistributionRoot } from './swift-toolchain'
|
|
15
15
|
|
|
16
|
-
const preparations = new NativePreparation<NativeBundleMetadata>(
|
|
16
|
+
const preparations = new NativePreparation<NativeBundleMetadata>({
|
|
17
|
+
reuseWatchedInputs: true,
|
|
18
|
+
})
|
|
17
19
|
|
|
18
20
|
function reusable(origin: string, metadata: NativeBundleMetadata): boolean {
|
|
19
21
|
return (
|
package/src/ios-rn-bundle.ts
CHANGED
|
@@ -24,6 +24,11 @@ import {
|
|
|
24
24
|
prepareSwiftSdkEntryAssets,
|
|
25
25
|
type SwiftArtifact,
|
|
26
26
|
} from './swift-host'
|
|
27
|
+
import {
|
|
28
|
+
clangImportNames,
|
|
29
|
+
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
30
|
+
swiftManifestTargets,
|
|
31
|
+
} from './swift-package'
|
|
27
32
|
import { privateSwiftDistributionRoot } from './swift-toolchain'
|
|
28
33
|
import { buildTurboBundle, turboAppCompileOptions } from './turbo-bundle'
|
|
29
34
|
import { prepareTurboCompileInput } from './turbo-compile'
|
|
@@ -41,7 +46,7 @@ export async function buildIosRnBundles(
|
|
|
41
46
|
if (!moduleRoot && privateSwiftDistributionRoot())
|
|
42
47
|
moduleRoot = await swiftDistributionRoot()
|
|
43
48
|
const standaloneOne = standaloneOneNitroRoot(root)
|
|
44
|
-
if (standaloneOne || (!families.expo &&
|
|
49
|
+
if (standaloneOne || (!families.expo && !families.nitro))
|
|
45
50
|
return {
|
|
46
51
|
expoSwift: null,
|
|
47
52
|
oneSDK: null,
|
|
@@ -103,10 +108,12 @@ export async function buildIosRnBundles(
|
|
|
103
108
|
const one = includeOne ? await appOneSDKLinkSources(root) : null
|
|
104
109
|
let inputs: Promise<Awaited<ReturnType<typeof prepareProviders>>> | undefined
|
|
105
110
|
async function prepareProviders() {
|
|
106
|
-
const [nitroPlan,
|
|
107
|
-
nitro &&
|
|
111
|
+
const [nitroPlan, independentTurbo] = await Promise.all([
|
|
112
|
+
nitro &&
|
|
113
|
+
prepareNitroCompileInput({ ...nitro, embedded: true, includeTurboHost: !turbo }),
|
|
108
114
|
turbo && prepareTurboCompileInput({ ...turbo, embedded: true, configuration }),
|
|
109
115
|
])
|
|
116
|
+
const turboPlan = independentTurbo ?? nitroPlan?.turbo
|
|
110
117
|
const components: IosAppComponent[] = []
|
|
111
118
|
if (nitroPlan)
|
|
112
119
|
components.push({
|
|
@@ -124,7 +131,11 @@ export async function buildIosRnBundles(
|
|
|
124
131
|
turboPlan.collection.coreMode === 'turbo' ||
|
|
125
132
|
hasProviderSwiftSources(turboPlan.input),
|
|
126
133
|
})
|
|
127
|
-
|
|
134
|
+
const turboPackages = [
|
|
135
|
+
...(independentTurbo?.collection.providers ?? []),
|
|
136
|
+
...(nitroPlan?.reactPackages ?? []),
|
|
137
|
+
]
|
|
138
|
+
return { nitroPlan, turboPlan, components, turboPackages }
|
|
128
139
|
}
|
|
129
140
|
let image: SwiftArtifact | undefined
|
|
130
141
|
const expoMetadata = includeExpo
|
|
@@ -144,6 +155,27 @@ export async function buildIosRnBundles(
|
|
|
144
155
|
.filter(({ reactModulesOnly }) => !reactModulesOnly)
|
|
145
156
|
.map(({ name }) => name),
|
|
146
157
|
),
|
|
158
|
+
linkedNativeImports: async () => {
|
|
159
|
+
const { components } = await (inputs ??= prepareProviders())
|
|
160
|
+
const provided = new Set(
|
|
161
|
+
components.flatMap(({ input }) => [
|
|
162
|
+
...swiftManifestTargets(input.files['Package.swift']!).map(
|
|
163
|
+
({ name }) => name,
|
|
164
|
+
),
|
|
165
|
+
...Object.keys(input.binaryModules ?? {}),
|
|
166
|
+
]),
|
|
167
|
+
)
|
|
168
|
+
const imports = components.flatMap(({ input }) =>
|
|
169
|
+
Object.entries(input.files).flatMap(([file, source]) =>
|
|
170
|
+
SWIFT_NATIVE_SOURCE_EXTENSIONS.some(
|
|
171
|
+
(extension) => extension !== '.modulemap' && file.endsWith(extension),
|
|
172
|
+
)
|
|
173
|
+
? clangImportNames(source)
|
|
174
|
+
: [],
|
|
175
|
+
),
|
|
176
|
+
)
|
|
177
|
+
return new Set(imports.filter((name) => !provided.has(name)))
|
|
178
|
+
},
|
|
147
179
|
...(expoOnly ? { only: expoOnly, prepareWorkspace: true } : {}),
|
|
148
180
|
},
|
|
149
181
|
async (project, entry, module, signal) => {
|
|
@@ -161,24 +193,6 @@ export async function buildIosRnBundles(
|
|
|
161
193
|
: null
|
|
162
194
|
const expoSwift = expoMetadata ? { metadata: expoMetadata, assets: [] } : null
|
|
163
195
|
if (!image) {
|
|
164
|
-
if (!one && (!nitro || !turbo))
|
|
165
|
-
return {
|
|
166
|
-
expoSwift,
|
|
167
|
-
oneSDK: null,
|
|
168
|
-
nitro: nitro
|
|
169
|
-
? await buildNitroBundle(
|
|
170
|
-
root,
|
|
171
|
-
nitro.configuration,
|
|
172
|
-
moduleRoot,
|
|
173
|
-
true,
|
|
174
|
-
iosTarget,
|
|
175
|
-
only,
|
|
176
|
-
)
|
|
177
|
-
: null,
|
|
178
|
-
turbo: turbo
|
|
179
|
-
? await buildTurboBundle(root, moduleRoot, undefined, iosTarget, only)
|
|
180
|
-
: unavailableTurbo,
|
|
181
|
-
}
|
|
182
196
|
const { components } = await (inputs ??= prepareProviders())
|
|
183
197
|
if (one) {
|
|
184
198
|
const files = Object.fromEntries(oneSDKPackageFiles(one, true))
|
|
@@ -188,7 +202,7 @@ export async function buildIosRnBundles(
|
|
|
188
202
|
}
|
|
189
203
|
image = await linkIosApp(root, components, floor, sdk)
|
|
190
204
|
}
|
|
191
|
-
const { nitroPlan, turboPlan } = await (inputs ??= prepareProviders())
|
|
205
|
+
const { nitroPlan, turboPlan, turboPackages } = await (inputs ??= prepareProviders())
|
|
192
206
|
const assets = await compiledModuleAssets(image)
|
|
193
207
|
const artifact = {
|
|
194
208
|
url: '/__peach/swift/' + image.hash + '.wasm',
|
|
@@ -231,10 +245,7 @@ export async function buildIosRnBundles(
|
|
|
231
245
|
metadata: {
|
|
232
246
|
...artifact,
|
|
233
247
|
platform: 'ios',
|
|
234
|
-
packages:
|
|
235
|
-
name,
|
|
236
|
-
version,
|
|
237
|
-
})),
|
|
248
|
+
packages: turboPackages.map(({ name, version }) => ({ name, version })),
|
|
238
249
|
...(unavailable.length ? { unavailable } : {}),
|
|
239
250
|
},
|
|
240
251
|
assets: expoSwift || nitroPlan ? [] : assets,
|
package/src/ios-rn-compile.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
SWIFT_REACT_BRIDGE_IMPORTS,
|
|
13
13
|
} from './swift-package'
|
|
14
14
|
import { swiftImportNames } from './swift-sdk-surface'
|
|
15
|
+
import { pruneCodegenTranslationUnits } from './turbo-codegen-intake'
|
|
15
16
|
import { resolveXcodeHeaderAlias } from './xcode-header-search'
|
|
16
17
|
import type { SwiftCompileInput } from './swift-compile'
|
|
17
18
|
import type { SwiftNativeTarget, SwiftResourceBundle } from './swiftContract'
|
|
@@ -88,7 +89,7 @@ function appEntry(components: readonly IosAppComponent[]): string {
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
// Each collector can also carry the installed React core for its standalone
|
|
91
|
-
// executable.
|
|
92
|
+
// executable. turbo owns the react host, while expo owns its core and generated registry.
|
|
92
93
|
export function composeIosAppInput(
|
|
93
94
|
components: readonly IosAppComponent[],
|
|
94
95
|
floor?: string,
|
|
@@ -106,6 +107,8 @@ export function composeIosAppInput(
|
|
|
106
107
|
const products = new Set<string>()
|
|
107
108
|
const appDependencies = new Set<string>()
|
|
108
109
|
const main = components.find((component) => component.main)
|
|
110
|
+
const app = main ?? components.find((component) => component.family === 'expo')
|
|
111
|
+
const launchPlist = app?.input.resources?.['Info.plist']
|
|
109
112
|
const mainTarget =
|
|
110
113
|
main &&
|
|
111
114
|
swiftManifestTargets(main.input.files['Package.swift']!).find(
|
|
@@ -161,7 +164,10 @@ export function composeIosAppInput(
|
|
|
161
164
|
)
|
|
162
165
|
for (const [index, target] of dependencies.entries()) {
|
|
163
166
|
const call = calls[index]!
|
|
164
|
-
if (
|
|
167
|
+
if (
|
|
168
|
+
!declarations.has(target.name) ||
|
|
169
|
+
(family === 'expo' && target.name === 'ExpoModulesCore')
|
|
170
|
+
) {
|
|
165
171
|
declarations.set(target.name, '.' + call.kind + '(' + call.call)
|
|
166
172
|
const prefix = (target.path || 'Sources/' + target.name) + '/'
|
|
167
173
|
const found = new Set<string>()
|
|
@@ -173,7 +179,7 @@ export function composeIosAppInput(
|
|
|
173
179
|
found.add(dependency)
|
|
174
180
|
}
|
|
175
181
|
}
|
|
176
|
-
|
|
182
|
+
sourceImports.set(target.name, found)
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
185
|
for (const dep of executable.dependencies ?? [])
|
|
@@ -266,7 +272,7 @@ export function composeIosAppInput(
|
|
|
266
272
|
}
|
|
267
273
|
for (const target of input.nativeTargets ?? []) {
|
|
268
274
|
const name = target.name === executable.name ? appTarget : target.name
|
|
269
|
-
if (!nativeTargets.has(name))
|
|
275
|
+
if (!nativeTargets.has(name) || (family === 'expo' && name === 'ExpoModulesCore'))
|
|
270
276
|
nativeTargets.set(
|
|
271
277
|
name,
|
|
272
278
|
moduleMaps.size
|
|
@@ -294,11 +300,22 @@ export function composeIosAppInput(
|
|
|
294
300
|
for (const bundle of input.resourceBundles ?? [])
|
|
295
301
|
resourceBundles.set(bundle.target, bundle)
|
|
296
302
|
for (const [name, data] of Object.entries(input.resources ?? {})) {
|
|
303
|
+
if (name === 'Info.plist' && launchPlist !== undefined) continue
|
|
297
304
|
if (resources[name] !== undefined && resources[name] !== data)
|
|
298
305
|
throw new Error('conflicting iOS app resource ' + name)
|
|
299
306
|
resources[name] = data
|
|
300
307
|
}
|
|
301
308
|
}
|
|
309
|
+
const installedCodegen = nativeTargets.get('ReactCodegen')
|
|
310
|
+
if (installedCodegen) {
|
|
311
|
+
const codegen = {
|
|
312
|
+
...installedCodegen,
|
|
313
|
+
fileFlags: { ...installedCodegen.fileFlags },
|
|
314
|
+
sourceDirectories: { ...installedCodegen.sourceDirectories },
|
|
315
|
+
}
|
|
316
|
+
pruneCodegenTranslationUnits([codegen], files, files, new Set([codegen.name]))
|
|
317
|
+
nativeTargets.set(codegen.name, codegen)
|
|
318
|
+
}
|
|
302
319
|
// A pod header staged under two provider roots must still have one Clang identity.
|
|
303
320
|
for (const duplicate of Object.keys(repeatedHeaders)) {
|
|
304
321
|
const canonical = canonicalHeader(duplicate)
|
|
@@ -361,8 +378,8 @@ export function composeIosAppInput(
|
|
|
361
378
|
'], cxxLanguageStandard: .cxx20)',
|
|
362
379
|
'',
|
|
363
380
|
].join('\n')
|
|
364
|
-
//
|
|
365
|
-
|
|
381
|
+
// the xcode-backed collector also owns the app's catalog and ancillary inputs.
|
|
382
|
+
if (launchPlist !== undefined) resources['Info.plist'] = launchPlist
|
|
366
383
|
return {
|
|
367
384
|
...app?.input,
|
|
368
385
|
entry,
|
package/src/ios-rn-startup.ts
CHANGED
|
@@ -81,7 +81,7 @@ export async function splitIosRnBundleApp(
|
|
|
81
81
|
const startup: Partial<
|
|
82
82
|
Pick<
|
|
83
83
|
SwiftModuleOptions,
|
|
84
|
-
'url' | 'hash' | 'sdkUrl' | 'sdkBindingUrl' | 'walkPeakPages'
|
|
84
|
+
'url' | 'hash' | 'sdkUrl' | 'sdkBindingUrl' | 'walkPeakPages' | 'startupParts'
|
|
85
85
|
>
|
|
86
86
|
> = {}
|
|
87
87
|
if (splitSdk && sdkUrl) {
|
|
@@ -100,6 +100,7 @@ export async function splitIosRnBundleApp(
|
|
|
100
100
|
throw new Error('cannot profile the native RN app without the engine runtime')
|
|
101
101
|
image = await splitSwiftApp(app.bytes, { ...launch, runtimeRoot }, false)
|
|
102
102
|
}
|
|
103
|
+
if (image.startupParts?.length) startup.startupParts = image.startupParts
|
|
103
104
|
if (modules.length > 1 || image.primary.length < app.bytes.length) {
|
|
104
105
|
const hash = createHash('sha256').update(image.primary).digest('hex')
|
|
105
106
|
const parent = originalUrl.slice(0, originalUrl.lastIndexOf('/') + 1)
|
package/src/java-module-abi.ts
CHANGED
|
@@ -82,10 +82,11 @@ export async function compileJavaModuleAbi(input: {
|
|
|
82
82
|
toolchain: KotlinToolchainInstallation
|
|
83
83
|
libraries: string[]
|
|
84
84
|
sdkRoot: string
|
|
85
|
-
|
|
85
|
+
friendModules: readonly string[]
|
|
86
86
|
language: string
|
|
87
87
|
}): Promise<string> {
|
|
88
|
-
const { specs, work, hash, toolchain, libraries, sdkRoot,
|
|
88
|
+
const { specs, work, hash, toolchain, libraries, sdkRoot, friendModules, language } =
|
|
89
|
+
input
|
|
89
90
|
const directory = path.join(work, 'java-abi')
|
|
90
91
|
fs.mkdirSync(directory)
|
|
91
92
|
const sources = specs.specs.map((spec, index) => {
|
|
@@ -110,7 +111,7 @@ export async function compileJavaModuleAbi(input: {
|
|
|
110
111
|
'-libraries',
|
|
111
112
|
libraries.join(path.delimiter),
|
|
112
113
|
`-Xplugin=${path.join(sdkRoot, 'plugin.jar')}`,
|
|
113
|
-
`-Xfriend-modules=${
|
|
114
|
+
`-Xfriend-modules=${friendModules.join(path.delimiter)}`,
|
|
114
115
|
'-language-version',
|
|
115
116
|
language,
|
|
116
117
|
'-api-version',
|
package/src/kotlin-host.ts
CHANGED
|
@@ -1353,10 +1353,10 @@ async function compileKotlin(
|
|
|
1353
1353
|
const profileConfig = KOTLIN_SDK_PROFILES[sdkProfile]
|
|
1354
1354
|
const baseLibrary =
|
|
1355
1355
|
'base' in profileConfig ? path.join(sdk.root, `${profileConfig.base}.klib`) : null
|
|
1356
|
+
const sdkLibraries = baseLibrary ? [baseLibrary, sdkLibrary] : [sdkLibrary]
|
|
1356
1357
|
const libraries = [
|
|
1357
1358
|
...ready.libraries,
|
|
1358
|
-
...
|
|
1359
|
-
sdkLibrary,
|
|
1359
|
+
...sdkLibraries,
|
|
1360
1360
|
path.join(sdk.root, 'java.klib'),
|
|
1361
1361
|
]
|
|
1362
1362
|
const compose = usesCompose ? await ensureCompose(toolchain) : null
|
|
@@ -1389,7 +1389,7 @@ async function compileKotlin(
|
|
|
1389
1389
|
[
|
|
1390
1390
|
...common(),
|
|
1391
1391
|
`-Xplugin=${plugin}`,
|
|
1392
|
-
`-Xfriend-modules=${
|
|
1392
|
+
`-Xfriend-modules=${(javaLibrary ? [...sdkLibraries, javaLibrary] : sdkLibraries).join(path.delimiter)}`,
|
|
1393
1393
|
...(usesCompose
|
|
1394
1394
|
? [
|
|
1395
1395
|
`-Xplugin=${path.resolve(path.dirname(kotlinc), '../lib/compose-compiler-plugin.jar')}`,
|
|
@@ -1437,7 +1437,7 @@ async function compileKotlin(
|
|
|
1437
1437
|
toolchain: ready,
|
|
1438
1438
|
libraries: libraries.filter((library) => library !== javaLibrary),
|
|
1439
1439
|
sdkRoot: sdk.root,
|
|
1440
|
-
|
|
1440
|
+
friendModules: sdkLibraries,
|
|
1441
1441
|
language,
|
|
1442
1442
|
})
|
|
1443
1443
|
// the compiler resolves the app's classes and constructors: a first
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { spawn, type StdioOptions } from 'node:child_process'
|
|
2
1
|
import fs from 'node:fs'
|
|
3
2
|
import path from 'node:path'
|
|
4
3
|
import { isRecord } from './is-record'
|
|
5
4
|
import { kotlinToolCommand, runKotlinTool } from './kotlin-toolchain'
|
|
5
|
+
import { spawnOwnedProcessGroup } from './process-group'
|
|
6
6
|
import type { KotlinToolchainInstallation } from './kotlinSdkContract'
|
|
7
7
|
|
|
8
8
|
function runCompiler(
|
|
9
9
|
file: string,
|
|
10
10
|
args: readonly string[],
|
|
11
|
-
options: {
|
|
11
|
+
options: { output: [number | 'inherit', 'inherit']; env?: NodeJS.ProcessEnv },
|
|
12
12
|
operation: string,
|
|
13
13
|
): Promise<void> {
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
|
-
const child =
|
|
15
|
+
const child = spawnOwnedProcessGroup(file, args, options)
|
|
16
16
|
child.once('error', reject)
|
|
17
17
|
child.once('close', (code, signal) => {
|
|
18
18
|
if (code === 0) resolve()
|
|
@@ -225,7 +225,7 @@ export async function compileKotlinLibrarySources(input: {
|
|
|
225
225
|
await runCompiler(
|
|
226
226
|
members.file,
|
|
227
227
|
members.args,
|
|
228
|
-
{
|
|
228
|
+
{ output: [fd, 'inherit'] },
|
|
229
229
|
'Android library ' + name + ' metadata read',
|
|
230
230
|
)
|
|
231
231
|
} finally {
|
|
@@ -299,7 +299,10 @@ export async function compileKotlinLibrarySources(input: {
|
|
|
299
299
|
...kotlinSources,
|
|
300
300
|
...translatedSources,
|
|
301
301
|
],
|
|
302
|
-
{
|
|
302
|
+
{
|
|
303
|
+
output: ['inherit', 'inherit'],
|
|
304
|
+
env: { ...process.env, JAVA_HOME: ready.javaHome },
|
|
305
|
+
},
|
|
303
306
|
'Android library ' + name + ' compilation',
|
|
304
307
|
)
|
|
305
308
|
const compiled = path.join(raw, `${name}.klib`)
|
|
@@ -4,6 +4,30 @@ import type { CallExpression, Expression } from 'acorn'
|
|
|
4
4
|
const RNXSIM_METRO_MODULE_PATHS_PREFIX = 'globalThis.__sootsimModulePaths='
|
|
5
5
|
export const RNX_METRO_MODULE_IDENTITY_VERSION = 2
|
|
6
6
|
|
|
7
|
+
// metro names an asset directory outside the project root in unstable_path.
|
|
8
|
+
export function packagedMetroAssetDirectory(location: string): string {
|
|
9
|
+
const base = 'https://packaged.invalid'
|
|
10
|
+
const parsed = new URL(location, base)
|
|
11
|
+
if (parsed.origin !== base) throw new Error(`non-packaged asset location: ${location}`)
|
|
12
|
+
const outside = parsed.searchParams.get('unstable_path')
|
|
13
|
+
if (outside === null) return parsed.pathname.replace(/^\/+/, '')
|
|
14
|
+
return `assets/${outside.replace(/^\.\//, '').replace(/\.\.\//g, '_')}`
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function relocateMetroAssetLocations(
|
|
18
|
+
source: string,
|
|
19
|
+
locate: (location: string) => string,
|
|
20
|
+
): string {
|
|
21
|
+
return source.replace(
|
|
22
|
+
/("?httpServerLocation"?\s*:\s*)(?:"((?:[^"\\]|\\.)*)"|`([^`\\$]*)`)/g,
|
|
23
|
+
(match: string, property: string, quoted: string | undefined, template: string) => {
|
|
24
|
+
const location = quoted === undefined ? template : JSON.parse(`"${quoted}"`)
|
|
25
|
+
const next = locate(location)
|
|
26
|
+
return next === location ? match : `${property}${JSON.stringify(next)}`
|
|
27
|
+
},
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
7
31
|
export type RNXMetroModulePathMap = Record<string, string>
|
|
8
32
|
export type RNXMetroLogicalSpecifierMap = Record<string, string[]>
|
|
9
33
|
export type RNXMetroModuleIdentitySource =
|
|
@@ -134,6 +134,7 @@ function readExpoConfig(projectRoot: string): Record<string, unknown> {
|
|
|
134
134
|
// startup work and hand the result to readNativeFirebaseConfig.
|
|
135
135
|
export async function readExpoConfigAsync(
|
|
136
136
|
projectRoot: string,
|
|
137
|
+
toolEnvironment?: Pick<NodeJS.ProcessEnv, 'MISE_TRUSTED_CONFIG_PATHS'>,
|
|
137
138
|
): Promise<Record<string, unknown>> {
|
|
138
139
|
if (!hasExpoConfig(projectRoot)) return {}
|
|
139
140
|
const directory = resultDirectory()
|
|
@@ -141,6 +142,7 @@ export async function readExpoConfigAsync(
|
|
|
141
142
|
try {
|
|
142
143
|
const child = spawn('node', expoConfigArgs(projectRoot, resultPath), {
|
|
143
144
|
cwd: projectRoot,
|
|
145
|
+
env: toolEnvironment && { ...process.env, ...toolEnvironment },
|
|
144
146
|
stdio: ['ignore', 'ignore', 'pipe'],
|
|
145
147
|
timeout: EXPO_CONFIG_TIMEOUT_MS,
|
|
146
148
|
})
|