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
package/src/swift-wasm-prune.ts
CHANGED
|
@@ -24,7 +24,7 @@ import path from 'node:path'
|
|
|
24
24
|
import { promisify } from 'node:util'
|
|
25
25
|
import * as v from 'valibot'
|
|
26
26
|
import { sha256Hex } from './sha256'
|
|
27
|
-
import { DARWIN_RECORDS_PREFIX } from './swift-darwin-records'
|
|
27
|
+
import { DARWIN_RECORDS_PREFIX, GUEST_IMAGE_RECORDS } from './swift-darwin-records'
|
|
28
28
|
import { isWasmLinkObject, NATIVE_ARCHIVE_OBJECTS_DIR } from './swift-guest-source-plan'
|
|
29
29
|
import { OBJC_RUNTIME_LOOKUP_SECTION, wrappedLinkSymbols } from './swift-link-roots'
|
|
30
30
|
import { referencedResourceClasses } from './swift-resource-class-names'
|
|
@@ -286,13 +286,6 @@ function decodeRelocations(
|
|
|
286
286
|
const relocationBytes = (relocs: Relocations, i: number) =>
|
|
287
287
|
relocs.bytes.subarray(relocs.start[i]!, relocs.end[i]!)
|
|
288
288
|
|
|
289
|
-
// providers that read the guest image tables; only the guest link has those tables.
|
|
290
|
-
const GUEST_IMAGE_RECORDS: ReadonlySet<string> = new Set([
|
|
291
|
-
'DarwinRecords-guest-image-projection.o',
|
|
292
|
-
'DarwinRecords-dyld-loader.o',
|
|
293
|
-
'DarwinRecords-objc-image-classes.o',
|
|
294
|
-
])
|
|
295
|
-
|
|
296
289
|
interface ParsedObject {
|
|
297
290
|
file: string
|
|
298
291
|
isDist: boolean
|
|
@@ -420,6 +413,82 @@ function loadObjCMetadataFirst(buf: Uint8Array): boolean {
|
|
|
420
413
|
return false
|
|
421
414
|
}
|
|
422
415
|
|
|
416
|
+
function visitWasmLinkingSymbols(
|
|
417
|
+
buf: Uint8Array,
|
|
418
|
+
localize?: ReadonlySet<string>,
|
|
419
|
+
): { definedStrong: Set<string>; undefined: Set<string>; changed: boolean } {
|
|
420
|
+
const definedStrong = new Set<string>()
|
|
421
|
+
const undefinedSyms = new Set<string>()
|
|
422
|
+
let changed = false
|
|
423
|
+
const text = new TextDecoder()
|
|
424
|
+
let pos = 8
|
|
425
|
+
while (pos < buf.length) {
|
|
426
|
+
const id = buf[pos]!
|
|
427
|
+
const [size, start] = readULEB(buf, pos + 1)
|
|
428
|
+
const end = start + size
|
|
429
|
+
pos = end
|
|
430
|
+
if (id !== 0) continue
|
|
431
|
+
let [nameLength, cur] = readULEB(buf, start)
|
|
432
|
+
if (text.decode(buf.subarray(cur, cur + nameLength)) !== 'linking') continue
|
|
433
|
+
cur = readULEB(buf, cur + nameLength)[1]
|
|
434
|
+
const read = () => {
|
|
435
|
+
const [value, next] = readULEB(buf, cur)
|
|
436
|
+
cur = next
|
|
437
|
+
return value
|
|
438
|
+
}
|
|
439
|
+
while (cur < end) {
|
|
440
|
+
const subsection = buf[cur++]!
|
|
441
|
+
const subsectionEnd = read() + cur
|
|
442
|
+
if (subsection === 8) {
|
|
443
|
+
for (let symbol = 0, count = read(); symbol < count; symbol++) {
|
|
444
|
+
const kind = buf[cur++]!
|
|
445
|
+
const flagAt = cur
|
|
446
|
+
const flags = read()
|
|
447
|
+
const flagLen = cur - flagAt
|
|
448
|
+
const defined = (flags & 0x10) === 0
|
|
449
|
+
if (kind === 3) {
|
|
450
|
+
read()
|
|
451
|
+
continue
|
|
452
|
+
}
|
|
453
|
+
if (kind !== 1) read()
|
|
454
|
+
if (kind !== 1 && !defined && !(flags & 0x40)) continue
|
|
455
|
+
const length = read()
|
|
456
|
+
const name = text.decode(buf.subarray(cur, cur + length))
|
|
457
|
+
cur += length
|
|
458
|
+
if (kind === 1 && defined) for (let i = 0; i < 3; i++) read()
|
|
459
|
+
if (kind !== 0 && kind !== 1) continue
|
|
460
|
+
if (defined) {
|
|
461
|
+
// skip objc/runtime/swift symbols (including comdat-grouped
|
|
462
|
+
// ._OBJC_PROTOCOL_* records) so only public C library globals collide.
|
|
463
|
+
if (
|
|
464
|
+
(flags & 0x03) === 0 &&
|
|
465
|
+
!name.startsWith('.') &&
|
|
466
|
+
!name.startsWith('$s') &&
|
|
467
|
+
!name.startsWith('_$s')
|
|
468
|
+
) {
|
|
469
|
+
definedStrong.add(name)
|
|
470
|
+
if (localize?.has(name)) {
|
|
471
|
+
const localFlags = (flags & 0x40) | 0x02
|
|
472
|
+
if (flagLen === 1) buf[flagAt] = localFlags
|
|
473
|
+
else if (flagLen === 2) {
|
|
474
|
+
buf[flagAt] = localFlags | 0x80
|
|
475
|
+
buf[flagAt + 1] = 0x00
|
|
476
|
+
}
|
|
477
|
+
changed = true
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
} else {
|
|
481
|
+
undefinedSyms.add(name)
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
cur = subsectionEnd
|
|
486
|
+
}
|
|
487
|
+
break
|
|
488
|
+
}
|
|
489
|
+
return { definedStrong, undefined: undefinedSyms, changed }
|
|
490
|
+
}
|
|
491
|
+
|
|
423
492
|
export function patchSwiftrtObject(src: Uint8Array): Uint8Array {
|
|
424
493
|
const buf = new Uint8Array(src)
|
|
425
494
|
const neutralizedSyms = new Set<number>()
|
|
@@ -1632,6 +1701,8 @@ export function keepsSwiftUIReflection(
|
|
|
1632
1701
|
|
|
1633
1702
|
/** the pruned link's map, from which an app module selects the sdk data it keeps. */
|
|
1634
1703
|
export const SWIFT_PRUNED_LINK_MAP = '.peach-link.map'
|
|
1704
|
+
// beside each object, the copy a plain link loads with its objective-c metadata first.
|
|
1705
|
+
export const OBJC_LOAD_FIRST_DIR = 'objc-load-first'
|
|
1635
1706
|
const SWIFT_PRUNED_LINK_RESPONSE = '.peach-link.pruned.rsp'
|
|
1636
1707
|
|
|
1637
1708
|
export function readSwiftPrunedLinkResponse(directory: string): string[] {
|
|
@@ -3077,6 +3148,101 @@ export async function pruneSwiftWasmLink(
|
|
|
3077
3148
|
leftoverArchiveFiles.length = 0
|
|
3078
3149
|
}
|
|
3079
3150
|
|
|
3151
|
+
// on darwin, system libraries such as libsqlite3.dylib live in a two-level
|
|
3152
|
+
// namespace apart from static pods; on wasm they are static archives in one
|
|
3153
|
+
// flat link. localize a pod object's private colliding globals when nothing
|
|
3154
|
+
// else in its target references them.
|
|
3155
|
+
const skippedRuntimeArchives = new Set([
|
|
3156
|
+
'Darwin',
|
|
3157
|
+
'DarwinRecords',
|
|
3158
|
+
'Dispatch',
|
|
3159
|
+
'Foundation',
|
|
3160
|
+
'ObjectiveC',
|
|
3161
|
+
'objc',
|
|
3162
|
+
'BlocksRuntime',
|
|
3163
|
+
'c',
|
|
3164
|
+
'c++',
|
|
3165
|
+
'c++abi',
|
|
3166
|
+
'm',
|
|
3167
|
+
'pthread',
|
|
3168
|
+
'unwind',
|
|
3169
|
+
])
|
|
3170
|
+
const systemArchiveSymbols = new Set<string>()
|
|
3171
|
+
for (const token of outTokens) {
|
|
3172
|
+
if (!token.startsWith('-l')) continue
|
|
3173
|
+
const lib = token.slice(2)
|
|
3174
|
+
if (
|
|
3175
|
+
lib.startsWith('swift') ||
|
|
3176
|
+
lib.startsWith('clang_rt') ||
|
|
3177
|
+
lib.startsWith('wasi-') ||
|
|
3178
|
+
skippedRuntimeArchives.has(lib)
|
|
3179
|
+
)
|
|
3180
|
+
continue
|
|
3181
|
+
const archive = path.join(sdkWasiDir, `lib${lib}.a`)
|
|
3182
|
+
if (!fs.existsSync(archive)) continue
|
|
3183
|
+
for (const member of readArchiveMembers(archive))
|
|
3184
|
+
for (const sym of visitWasmLinkingSymbols(member.bytes).definedStrong)
|
|
3185
|
+
systemArchiveSymbols.add(sym)
|
|
3186
|
+
}
|
|
3187
|
+
if (systemArchiveSymbols.size > 0) {
|
|
3188
|
+
const resolvedDir = path.resolve(directory) + path.sep
|
|
3189
|
+
const resolvedPrunedDir = path.resolve(prunedObjsDir) + path.sep
|
|
3190
|
+
const appObjects: {
|
|
3191
|
+
index: number
|
|
3192
|
+
file: string
|
|
3193
|
+
targetDir: string
|
|
3194
|
+
bytes: Buffer
|
|
3195
|
+
symbols: ReturnType<typeof visitWasmLinkingSymbols>
|
|
3196
|
+
collisions: string[]
|
|
3197
|
+
}[] = []
|
|
3198
|
+
for (const [index, token] of outTokens.entries()) {
|
|
3199
|
+
const file = path.resolve(token)
|
|
3200
|
+
if (
|
|
3201
|
+
!file.endsWith('.o') ||
|
|
3202
|
+
!file.startsWith(resolvedDir) ||
|
|
3203
|
+
file.startsWith(resolvedPrunedDir)
|
|
3204
|
+
)
|
|
3205
|
+
continue
|
|
3206
|
+
const bytes = fs.readFileSync(file)
|
|
3207
|
+
const symbols = visitWasmLinkingSymbols(bytes)
|
|
3208
|
+
const collisions: string[] = []
|
|
3209
|
+
for (const sym of symbols.definedStrong)
|
|
3210
|
+
if (systemArchiveSymbols.has(sym)) collisions.push(sym)
|
|
3211
|
+
const rel = path.relative(resolvedDir, file).split(path.sep)
|
|
3212
|
+
const buildIdx = rel.findIndex((part) => part.endsWith('.build'))
|
|
3213
|
+
const targetDir =
|
|
3214
|
+
buildIdx >= 0 ? rel.slice(0, buildIdx + 1).join('/') : path.dirname(file)
|
|
3215
|
+
appObjects.push({ index, file, targetDir, bytes, symbols, collisions })
|
|
3216
|
+
}
|
|
3217
|
+
if (appObjects.some((entry) => entry.collisions.length > 0)) {
|
|
3218
|
+
for (const entry of appObjects) {
|
|
3219
|
+
if (entry.collisions.length === 0) continue
|
|
3220
|
+
const targetUndefined = new Set<string>()
|
|
3221
|
+
for (const sibling of appObjects) {
|
|
3222
|
+
if (sibling === entry || sibling.targetDir !== entry.targetDir) continue
|
|
3223
|
+
for (const sym of sibling.symbols.undefined) targetUndefined.add(sym)
|
|
3224
|
+
}
|
|
3225
|
+
const toLocalize = new Set(
|
|
3226
|
+
entry.collisions.filter((sym) => !targetUndefined.has(sym)),
|
|
3227
|
+
)
|
|
3228
|
+
if (toLocalize.size === 0) continue
|
|
3229
|
+
const inputHash = link ? sha256Hex(entry.bytes) : ''
|
|
3230
|
+
const copy = Buffer.from(entry.bytes)
|
|
3231
|
+
if (!visitWasmLinkingSymbols(copy, toLocalize).changed) continue
|
|
3232
|
+
const output = path.join(
|
|
3233
|
+
path.dirname(entry.file),
|
|
3234
|
+
'localized',
|
|
3235
|
+
path.basename(entry.file),
|
|
3236
|
+
)
|
|
3237
|
+
fs.mkdirSync(path.dirname(output), { recursive: true })
|
|
3238
|
+
fs.writeFileSync(output, copy)
|
|
3239
|
+
recordTransformation(entry.file, output, inputHash, copy, 'pruned')
|
|
3240
|
+
prunedMap.set(entry.file, output)
|
|
3241
|
+
outTokens[entry.index] = output
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3080
3246
|
// dyld maps every image's objective-c metadata before any initializer, and the
|
|
3081
3247
|
// guest image ledger loads the app's at priority 1; a plain link does the same, so
|
|
3082
3248
|
// an app constructor below the default priority (sentry's 60000) finds its
|
|
@@ -3093,7 +3259,11 @@ export async function pruneSwiftWasmLink(
|
|
|
3093
3259
|
continue
|
|
3094
3260
|
const bytes = fs.readFileSync(file)
|
|
3095
3261
|
if (!loadObjCMetadataFirst(bytes)) continue
|
|
3096
|
-
const output = path.join(
|
|
3262
|
+
const output = path.join(
|
|
3263
|
+
path.dirname(file),
|
|
3264
|
+
OBJC_LOAD_FIRST_DIR,
|
|
3265
|
+
path.basename(file),
|
|
3266
|
+
)
|
|
3097
3267
|
fs.mkdirSync(path.dirname(output), { recursive: true })
|
|
3098
3268
|
fs.writeFileSync(output, bytes)
|
|
3099
3269
|
outTokens[index] = output
|
package/src/swift-xcframework.ts
CHANGED
|
@@ -10,6 +10,22 @@ type SimulatorNativeLibrary =
|
|
|
10
10
|
| { name: string; file: string; slice: string; kind: 'archive'; headers?: string }
|
|
11
11
|
| { name: string; file: string; slice: string; kind: 'framework' }
|
|
12
12
|
|
|
13
|
+
export function includesNativeArchiveHeader(
|
|
14
|
+
dir: string,
|
|
15
|
+
includes: readonly string[],
|
|
16
|
+
): boolean {
|
|
17
|
+
if (includes.length === 0 || !dir.endsWith('.xcframework')) return false
|
|
18
|
+
const slice = simulatorNativeLibrary(dir)
|
|
19
|
+
const headers = slice?.kind === 'archive' ? slice.headers : undefined
|
|
20
|
+
return (
|
|
21
|
+
!!headers &&
|
|
22
|
+
includes.some((include) => {
|
|
23
|
+
const file = path.resolve(headers, include)
|
|
24
|
+
return relativeInside(headers, file) !== null && fs.existsSync(file)
|
|
25
|
+
})
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
13
29
|
export function simulatorNativeLibrary(dir: string): SimulatorNativeLibrary | null {
|
|
14
30
|
if (dir.endsWith('.framework')) {
|
|
15
31
|
const name = path.basename(dir, '.framework')
|
package/src/swiftContract.ts
CHANGED
|
@@ -559,7 +559,7 @@ export interface SwiftSdkEntryAssets {
|
|
|
559
559
|
|
|
560
560
|
export interface SwiftEntryModuleArgs extends Pick<
|
|
561
561
|
SwiftModuleOptions,
|
|
562
|
-
'walkPeakPages' | 'startupParts'
|
|
562
|
+
'walkPeakPages' | 'startupParts' | 'interactionParts'
|
|
563
563
|
> {
|
|
564
564
|
/** where the compiled artifact is served. */
|
|
565
565
|
url: string
|
|
@@ -605,6 +605,7 @@ export interface SwiftModuleOptions {
|
|
|
605
605
|
hash: string
|
|
606
606
|
walkPeakPages?: number
|
|
607
607
|
startupParts?: readonly string[]
|
|
608
|
+
interactionParts?: readonly string[]
|
|
608
609
|
icuUrl?: string
|
|
609
610
|
exports?: readonly string[]
|
|
610
611
|
resources?: SwiftImageResources
|
|
@@ -641,6 +642,8 @@ export function isSwiftPackageMetadata(value: unknown): value is SwiftPackageMet
|
|
|
641
642
|
typeof value.hash === 'string' &&
|
|
642
643
|
value.walkPeakPages === readNativeStartupPeak(value.walkPeakPages) &&
|
|
643
644
|
(value.startupParts === undefined || isNativeLazyDigestList(value.startupParts)) &&
|
|
645
|
+
(value.interactionParts === undefined ||
|
|
646
|
+
isNativeLazyDigestList(value.interactionParts)) &&
|
|
644
647
|
(value.icuUrl === undefined || typeof value.icuUrl === 'string') &&
|
|
645
648
|
typeof value.rootId === 'string' &&
|
|
646
649
|
typeof value.hmrPath === 'string'
|
|
@@ -62,6 +62,8 @@ export interface SwiftSdkBindingAsset {
|
|
|
62
62
|
readonly bytes: Buffer
|
|
63
63
|
readonly liveSlots: Buffer
|
|
64
64
|
readonly appLink?: Buffer
|
|
65
|
+
/** the app image's data pieces and edges (swift-sdk-later-data swiftAppDataPieces). */
|
|
66
|
+
readonly appData?: Buffer
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
export interface SwiftSdkModuleAsset {
|
package/src/turbo-bundle.ts
CHANGED
|
@@ -41,9 +41,12 @@ export async function compiledTurboProviders(
|
|
|
41
41
|
...Object.keys(config?.nativeViews ?? {}),
|
|
42
42
|
])
|
|
43
43
|
if (!projectRoot && (await turboProviderCandidates(appRoot)).length === 0) return []
|
|
44
|
-
const nitro = new Set(
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const nitro = new Set([
|
|
45
|
+
'react-native-nitro-modules',
|
|
46
|
+
...((await selectCompiledNitroProviders(appRoot))?.providers.map(
|
|
47
|
+
({ name }) => name,
|
|
48
|
+
) ?? []),
|
|
49
|
+
])
|
|
47
50
|
return (
|
|
48
51
|
await discoverTurboProviders(
|
|
49
52
|
appRoot,
|
|
@@ -23,6 +23,8 @@ import {
|
|
|
23
23
|
podspecSubspec,
|
|
24
24
|
podspecSwiftVersion,
|
|
25
25
|
} from './podspec-sources'
|
|
26
|
+
import { isSwiftNativeTranslationUnit } from './swift-package'
|
|
27
|
+
import type { SwiftNativeTarget } from './swiftContract'
|
|
26
28
|
|
|
27
29
|
const run = promisify(execFile)
|
|
28
30
|
|
|
@@ -30,6 +32,43 @@ const run = promisify(execFile)
|
|
|
30
32
|
/** the third-party pods react native's own podspecs vendor into the renderer core. */
|
|
31
33
|
export const RENDERER_DEPENDENCY_PODS = ['RCT-Folly', 'DoubleConversion', 'fmt']
|
|
32
34
|
|
|
35
|
+
export function pruneCodegenTranslationUnits(
|
|
36
|
+
targets: readonly SwiftNativeTarget[],
|
|
37
|
+
files: Record<string, string>,
|
|
38
|
+
providerFiles: Record<string, string>,
|
|
39
|
+
codegenTargets: ReadonlySet<string>,
|
|
40
|
+
sourcePaths?: Readonly<Record<string, string>>,
|
|
41
|
+
referencedSpecs?: ReadonlySet<string>,
|
|
42
|
+
) {
|
|
43
|
+
const prefix = '/upstream/ReactCodegen/'
|
|
44
|
+
const provided = Object.keys(providerFiles).flatMap((file) => {
|
|
45
|
+
const at = file.indexOf(prefix)
|
|
46
|
+
return at >= 0 && isSwiftNativeTranslationUnit(file)
|
|
47
|
+
? [file.slice(at + prefix.length)]
|
|
48
|
+
: []
|
|
49
|
+
})
|
|
50
|
+
const codegenSpec = (source: string) =>
|
|
51
|
+
/(?:^|\/)react\/renderer\/components\/([^/]+)\//.exec(source)?.[1] ??
|
|
52
|
+
/\/ReactCodegen\/([^/]+)\//.exec(source)?.[1] ??
|
|
53
|
+
/\/build\/generated\/ios\/(?!ReactCodegen\/)([^/]+)\//.exec(source)?.[1]
|
|
54
|
+
for (const target of targets) {
|
|
55
|
+
if (!codegenTargets.has(target.name)) continue
|
|
56
|
+
for (const file of Object.keys(target.sourceDirectories)) {
|
|
57
|
+
if (!isSwiftNativeTranslationUnit(file)) continue
|
|
58
|
+
const source = (sourcePaths?.[file] ?? file).replaceAll(path.sep, '/')
|
|
59
|
+
const duplicate = provided.some(
|
|
60
|
+
(unit) => file.endsWith(`/${unit}`) || source.endsWith(`/${unit}`),
|
|
61
|
+
)
|
|
62
|
+
const spec = referencedSpecs && (codegenSpec(source) ?? codegenSpec(file))
|
|
63
|
+
if (!duplicate && (!spec || spec === 'react' || referencedSpecs?.has(spec)))
|
|
64
|
+
continue
|
|
65
|
+
delete target.sourceDirectories[file]
|
|
66
|
+
delete target.fileFlags[file]
|
|
67
|
+
delete files[file]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
33
72
|
export function installedRendererDependencyGlobs(
|
|
34
73
|
reactNativeRoot: string,
|
|
35
74
|
appRoot: string,
|
|
@@ -53,6 +92,8 @@ export interface FabricPodSources {
|
|
|
53
92
|
module: string
|
|
54
93
|
swiftVersion: string | null
|
|
55
94
|
files: string[]
|
|
95
|
+
/** reached only through React-RCTAppDelegate, which Peach's engine replaces */
|
|
96
|
+
appDelegate: boolean
|
|
56
97
|
}
|
|
57
98
|
|
|
58
99
|
const RENDERER_PODS = new Set([
|
|
@@ -130,35 +171,77 @@ const LEGACY_BRIDGE_PODS_VERSIONED = new Set([
|
|
|
130
171
|
'React-oscompat',
|
|
131
172
|
])
|
|
132
173
|
|
|
174
|
+
// React-RCTAppDelegate and the pods it reaches beyond the renderer and the
|
|
175
|
+
// legacy bridge: the bridgeless host (RCTHost, RCTInstance) with its Hermes
|
|
176
|
+
// instance factory, React Native's own modules (React-CoreModules, RCTBlob)
|
|
177
|
+
// and the default C++ TurboModules; compile those installed
|
|
178
|
+
const APP_DELEGATE_PODS = new Set([
|
|
179
|
+
'React-RCTAppDelegate',
|
|
180
|
+
'React-RCTRuntime',
|
|
181
|
+
'React-RuntimeApple',
|
|
182
|
+
'React-RuntimeCore',
|
|
183
|
+
'React-RuntimeHermes',
|
|
184
|
+
'React-CoreModules',
|
|
185
|
+
'React-RCTBlob',
|
|
186
|
+
'React-NativeModulesApple',
|
|
187
|
+
'React-defaultsnativemodule',
|
|
188
|
+
'React-featureflags',
|
|
189
|
+
'React-Mapbuffer',
|
|
190
|
+
'React-jsitooling',
|
|
191
|
+
'React-jsitracing',
|
|
192
|
+
'React-timing',
|
|
193
|
+
'React-rendererconsistency',
|
|
194
|
+
'React-debug',
|
|
195
|
+
'React-callinvoker',
|
|
196
|
+
'React-runtimeexecutor',
|
|
197
|
+
])
|
|
198
|
+
|
|
133
199
|
/** the pod source membership of the installed renderer. `legacyBridge` adds
|
|
134
200
|
* the pods and DevSupport units RCTBridge.mm reaches, which CocoaPods links
|
|
135
|
-
* beside the renderer
|
|
136
|
-
*
|
|
201
|
+
* beside the renderer, and with a renderer the pods React-RCTAppDelegate
|
|
202
|
+
* reaches, whose Hermes instance needs the same installed hermes-engine;
|
|
203
|
+
* `bridgeOnly` keeps just the legacy bridge pods, for an app that mounts no
|
|
204
|
+
* renderer. */
|
|
137
205
|
export function installedFabricSources(
|
|
138
206
|
reactNativeRoot: string,
|
|
139
207
|
{ legacyBridge = false, bridgeOnly = false, appRoot = reactNativeRoot } = {},
|
|
140
208
|
): FabricPodSources[] {
|
|
141
209
|
const root = fs.realpathSync(reactNativeRoot)
|
|
142
|
-
const
|
|
210
|
+
const installed = ['React', 'ReactCommon', 'ReactApple', 'Libraries']
|
|
143
211
|
.flatMap((directory) =>
|
|
144
212
|
fs.readdirSync(path.join(root, directory), {
|
|
145
213
|
recursive: true,
|
|
146
214
|
withFileTypes: true,
|
|
147
215
|
}),
|
|
148
216
|
)
|
|
149
|
-
.filter(
|
|
150
|
-
(entry) =>
|
|
151
|
-
entry.isFile() &&
|
|
152
|
-
(RENDERER_PODS.has(path.basename(entry.name, '.podspec')) ||
|
|
153
|
-
RENDERER_PODS_VERSIONED.has(path.basename(entry.name, '.podspec')) ||
|
|
154
|
-
((bridgeOnly || legacyBridge) &&
|
|
155
|
-
(LEGACY_BRIDGE_PODS.has(path.basename(entry.name, '.podspec')) ||
|
|
156
|
-
LEGACY_BRIDGE_PODS_VERSIONED.has(
|
|
157
|
-
path.basename(entry.name, '.podspec'),
|
|
158
|
-
)))) &&
|
|
159
|
-
entry.name.endsWith('.podspec'),
|
|
160
|
-
)
|
|
217
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith('.podspec'))
|
|
161
218
|
.map((entry) => path.join(entry.parentPath, entry.name))
|
|
219
|
+
const appDelegatePods = new Set<string>()
|
|
220
|
+
if (legacyBridge && !bridgeOnly) {
|
|
221
|
+
for (const name of APP_DELEGATE_PODS) appDelegatePods.add(name)
|
|
222
|
+
const defaults = installed.find(
|
|
223
|
+
(file) => path.basename(file) === 'React-defaultsnativemodule.podspec',
|
|
224
|
+
)
|
|
225
|
+
if (defaults) {
|
|
226
|
+
const dependencies = loadPodspec(defaults, appRoot).attrs.get('dependencies')
|
|
227
|
+
if (isRecord(dependencies)) {
|
|
228
|
+
for (const name of Object.keys(dependencies)) {
|
|
229
|
+
if (/^React-.*nativemodule$/.test(name)) appDelegatePods.add(name)
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
const specs = installed
|
|
235
|
+
.filter((file) => {
|
|
236
|
+
const name = path.basename(file, '.podspec')
|
|
237
|
+
return (
|
|
238
|
+
RENDERER_PODS.has(name) ||
|
|
239
|
+
RENDERER_PODS_VERSIONED.has(name) ||
|
|
240
|
+
appDelegatePods.has(name) ||
|
|
241
|
+
((bridgeOnly || legacyBridge) &&
|
|
242
|
+
(LEGACY_BRIDGE_PODS.has(name) || LEGACY_BRIDGE_PODS_VERSIONED.has(name)))
|
|
243
|
+
)
|
|
244
|
+
})
|
|
162
245
|
.concat(path.join(root, 'React-Core.podspec'))
|
|
163
246
|
.filter(
|
|
164
247
|
(file) =>
|
|
@@ -210,6 +293,7 @@ export function installedFabricSources(
|
|
|
210
293
|
module: podspecModuleName(spec),
|
|
211
294
|
swiftVersion: podspecSwiftVersion(spec),
|
|
212
295
|
files: relative,
|
|
296
|
+
appDelegate: appDelegatePods.has(podspecName(spec)),
|
|
213
297
|
}
|
|
214
298
|
})
|
|
215
299
|
}
|
|
@@ -253,6 +337,7 @@ export async function runInstalledTurboCodegen(
|
|
|
253
337
|
appRoot: string,
|
|
254
338
|
outDir: string,
|
|
255
339
|
signal?: AbortSignal,
|
|
340
|
+
standaloneLibrary?: true,
|
|
256
341
|
): Promise<TurboCodegenIntake> {
|
|
257
342
|
const manifestPath = createRequire(path.join(appRoot, 'package.json')).resolve(
|
|
258
343
|
'react-native/package.json',
|
|
@@ -276,7 +361,11 @@ export async function runInstalledTurboCodegen(
|
|
|
276
361
|
fs.mkdirSync(path.dirname(autolinking), { recursive: true })
|
|
277
362
|
fs.writeFileSync(
|
|
278
363
|
autolinking,
|
|
279
|
-
JSON.stringify(
|
|
364
|
+
JSON.stringify(
|
|
365
|
+
standaloneLibrary
|
|
366
|
+
? { dependencies: {} }
|
|
367
|
+
: await iosAutolinkingConfig(appRoot, signal),
|
|
368
|
+
),
|
|
280
369
|
)
|
|
281
370
|
await run(
|
|
282
371
|
process.execPath,
|
|
@@ -288,6 +377,7 @@ export async function runInstalledTurboCodegen(
|
|
|
288
377
|
outDir,
|
|
289
378
|
'-t',
|
|
290
379
|
'ios',
|
|
380
|
+
...(standaloneLibrary ? ['-s', 'library'] : []),
|
|
291
381
|
],
|
|
292
382
|
{ env, signal },
|
|
293
383
|
)
|