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
|
@@ -1,44 +1,63 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2937 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/capture-contract.ts
|
|
4
4
|
var RNX_SCREEN_CAPTURE_VERSION = 1;
|
|
5
|
-
function
|
|
5
|
+
function imageSourceUri(node) {
|
|
6
6
|
const source = node.props?.source;
|
|
7
|
-
return node.type === "image" && !!source && typeof source === "object" && "uri" in source && typeof source.uri === "string"
|
|
7
|
+
return node.type === "image" && !!source && typeof source === "object" && "uri" in source && typeof source.uri === "string" ? source.uri : null;
|
|
8
|
+
}
|
|
9
|
+
function isLiveRasterSource(node) {
|
|
10
|
+
return imageSourceUri(node)?.startsWith("live:") ?? false;
|
|
8
11
|
}
|
|
9
|
-
function
|
|
12
|
+
function isGuestProjectImage(uri) {
|
|
13
|
+
return uri !== null && /^(?:https?:\/\/[^/?#]+)?\/__contrast_project_asset\//.test(uri);
|
|
14
|
+
}
|
|
15
|
+
function rasterLayerFrame(node, viewport) {
|
|
10
16
|
const visible = node.visibleFrame;
|
|
11
|
-
|
|
17
|
+
const uri = imageSourceUri(node);
|
|
18
|
+
if (visible && visible.width > 0 && visible.height > 0 && isGuestProjectImage(uri)) {
|
|
12
19
|
return { x: visible.x, y: visible.y, width: visible.width, height: visible.height };
|
|
13
20
|
}
|
|
14
|
-
|
|
21
|
+
const frame = node.frame ?? {
|
|
15
22
|
x: node.absolutePosition.x,
|
|
16
23
|
y: node.absolutePosition.y,
|
|
17
24
|
width: node.layout.width,
|
|
18
25
|
height: node.layout.height
|
|
19
26
|
};
|
|
27
|
+
if (!uri?.startsWith("live:")) return frame;
|
|
28
|
+
const x = Math.max(frame.x, 0);
|
|
29
|
+
const y = Math.max(frame.y, 0);
|
|
30
|
+
return {
|
|
31
|
+
x,
|
|
32
|
+
y,
|
|
33
|
+
width: Math.max(0, Math.min(frame.x + frame.width, viewport.width) - x),
|
|
34
|
+
height: Math.max(0, Math.min(frame.y + frame.height, viewport.height) - y)
|
|
35
|
+
};
|
|
20
36
|
}
|
|
21
37
|
function selectRnxRasterNodeIds(tree, pixelRatio) {
|
|
22
38
|
const nodesById = new Map(tree.nodes.map((node) => [node.nodeId, node]));
|
|
23
39
|
const maxLayerArea = tree.width * tree.height * 0.25;
|
|
24
40
|
const eligible = /* @__PURE__ */ new Map();
|
|
25
41
|
for (const node of tree.nodes) {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
42
|
+
const uri = imageSourceUri(node);
|
|
43
|
+
const liveSource = uri?.startsWith("live:") ?? false;
|
|
44
|
+
const visibleFrame = liveSource ? rasterLayerFrame(node, tree) : node.visibleFrame ?? node.frame;
|
|
28
45
|
if (!visibleFrame || visibleFrame.width <= 0 || visibleFrame.height <= 0) continue;
|
|
29
46
|
const glass = node.style._liquidGlass !== void 0 || node.style._liquidGlassEdge !== void 0 || node.style._liquidGlassMaterialTint !== void 0;
|
|
30
47
|
const background = node.style.experimental_backgroundImage;
|
|
31
48
|
const layers = Array.isArray(background) ? background : [background];
|
|
49
|
+
const guestImage = isGuestProjectImage(uri);
|
|
32
50
|
const imageBackground = (node.type === "view" || node.type === "root" || node.type === "scroll-view") && layers.some((layer) => typeof layer === "string" && layer.startsWith("@"));
|
|
33
|
-
const unsupported = imageBackground || node.type === "masked-view" || node.props?.__peachCaptureSvgRaster === true || liveSource || node.type === "text" && typeof node.text === "string" && (/\p{Emoji_Presentation}/u.test(node.text) || /\uFE0F|\u200D|\u20E3|\p{Emoji_Modifier}|\p{Regional_Indicator}/u.test(
|
|
51
|
+
const unsupported = guestImage || imageBackground || node.type === "masked-view" || node.props?.__peachCaptureSvgRaster === true || liveSource || node.type === "text" && typeof node.text === "string" && (/\p{Emoji_Presentation}/u.test(node.text) || /\uFE0F|\u200D|\u20E3|\p{Emoji_Modifier}|\p{Regional_Indicator}/u.test(
|
|
34
52
|
node.text
|
|
35
53
|
)) || glass;
|
|
36
54
|
if (!unsupported) continue;
|
|
37
|
-
const captured = rasterLayerFrame(node);
|
|
55
|
+
const captured = liveSource ? visibleFrame : rasterLayerFrame(node, tree);
|
|
38
56
|
const area = captured.width * captured.height;
|
|
39
57
|
const ownPaint = imageBackground || glass && area > maxLayerArea;
|
|
40
|
-
|
|
41
|
-
|
|
58
|
+
const priority = liveSource ? 2 : guestImage || ownPaint ? 1 : 0;
|
|
59
|
+
if (priority > 0 || area <= maxLayerArea) {
|
|
60
|
+
eligible.set(node.nodeId, { nodeId: node.nodeId, area, priority, ownPaint });
|
|
42
61
|
}
|
|
43
62
|
}
|
|
44
63
|
for (const [nodeId, layer] of eligible) {
|
|
@@ -46,7 +65,7 @@ function selectRnxRasterNodeIds(tree, pixelRatio) {
|
|
|
46
65
|
while (parentNodeId !== null) {
|
|
47
66
|
const parent = eligible.get(parentNodeId);
|
|
48
67
|
if (parent && !parent.ownPaint) {
|
|
49
|
-
parent.
|
|
68
|
+
parent.priority = Math.max(parent.priority, layer.priority);
|
|
50
69
|
eligible.delete(nodeId);
|
|
51
70
|
break;
|
|
52
71
|
}
|
|
@@ -54,20 +73,23 @@ function selectRnxRasterNodeIds(tree, pixelRatio) {
|
|
|
54
73
|
}
|
|
55
74
|
}
|
|
56
75
|
const candidates = [...eligible.values()].sort(
|
|
57
|
-
(left, right) =>
|
|
76
|
+
(left, right) => right.priority - left.priority || left.area - right.area || left.nodeId - right.nodeId
|
|
58
77
|
);
|
|
59
78
|
const screenArea = tree.width * tree.height;
|
|
60
79
|
const selection = { nodeIds: /* @__PURE__ */ new Set(), ownPaint: /* @__PURE__ */ new Set() };
|
|
61
80
|
let atlasArea = 0;
|
|
62
81
|
let layerArea = 0;
|
|
82
|
+
let hasLiveLayer = false;
|
|
63
83
|
for (const candidate of candidates) {
|
|
64
|
-
const leading = candidate.
|
|
65
|
-
|
|
84
|
+
const leading = candidate.priority > 0;
|
|
85
|
+
const reserveHeadroom = candidate.priority === 2 || leading && !hasLiveLayer;
|
|
86
|
+
if (atlasArea + candidate.area > screenArea * (reserveHeadroom ? 1 : 1.25) || !leading && layerArea + candidate.area > screenArea * 0.5) {
|
|
66
87
|
continue;
|
|
67
88
|
}
|
|
68
89
|
selection.nodeIds.add(candidate.nodeId);
|
|
69
90
|
if (candidate.ownPaint) selection.ownPaint.add(candidate.nodeId);
|
|
70
91
|
atlasArea += candidate.area;
|
|
92
|
+
hasLiveLayer || (hasLiveLayer = candidate.priority === 2);
|
|
71
93
|
if (!leading) layerArea += candidate.area;
|
|
72
94
|
}
|
|
73
95
|
const picked = [...selection.nodeIds];
|
|
@@ -91,7 +113,7 @@ function rnxRasterFrames(tree, nodeIds) {
|
|
|
91
113
|
const frames = /* @__PURE__ */ new Map();
|
|
92
114
|
for (const node of tree.nodes) {
|
|
93
115
|
if (!nodeIds.has(node.nodeId)) continue;
|
|
94
|
-
const frame = rasterLayerFrame(node);
|
|
116
|
+
const frame = rasterLayerFrame(node, tree);
|
|
95
117
|
const glassOutset = liquidGlassPaintOutset(node.style._liquidGlass, frame);
|
|
96
118
|
const shadowRadius = typeof node.style.shadowRadius === "number" ? node.style.shadowRadius : 0;
|
|
97
119
|
const shadowOffset = node.style.shadowOffset;
|
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2937 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
import {
|
|
3
|
+
SOURCE_SWIFT_FRAMEWORK_RECIPE,
|
|
4
|
+
SWIFT_SDK_IMAGE_VERSION,
|
|
5
|
+
WASM_LOWER_IDENTITY,
|
|
6
|
+
compileSwiftProjectUnit,
|
|
7
|
+
compilerSourceDigest,
|
|
8
|
+
foundationCategoryObjects,
|
|
9
|
+
keepWasmNames,
|
|
10
|
+
linkedFrameworkTargets,
|
|
11
|
+
lowerWasm,
|
|
12
|
+
readGuestRuntimeCatalogs,
|
|
13
|
+
resolveBunBinary,
|
|
14
|
+
swiftFleetBuilderArchive,
|
|
15
|
+
swiftProjectBuildKey,
|
|
16
|
+
swiftSdkGuestLookups,
|
|
17
|
+
swiftSdkImageScope,
|
|
18
|
+
wasmNamedFunctions
|
|
19
|
+
} from "./chunk-YZF2USRD.mjs";
|
|
2
20
|
import {
|
|
3
21
|
DARWIN_RECORDS_PREFIX,
|
|
4
22
|
SDK_DYLD_RESOLVER,
|
|
5
23
|
SKIP_OBJC_ROOT_OBJECTS,
|
|
6
|
-
SOURCE_SWIFT_FRAMEWORK_RECIPE,
|
|
7
24
|
SWIFT_FRAMEWORK_PRODUCT_FILE,
|
|
8
25
|
SWIFT_SDK_APP_TABLE_BASE,
|
|
9
|
-
SWIFT_SDK_IMAGE_VERSION,
|
|
10
|
-
WASM_LOWER_IDENTITY,
|
|
11
26
|
array,
|
|
12
27
|
assertPeachGuestEngineLink,
|
|
13
28
|
boolean,
|
|
14
29
|
chunkKey,
|
|
30
|
+
clearSwiftModuleDigestScope,
|
|
15
31
|
codeOnlySdkImage,
|
|
16
|
-
compileSwiftProjectUnit,
|
|
17
|
-
compilerSourceDigest,
|
|
18
32
|
constructorKeys,
|
|
19
33
|
fetchNativeEntry,
|
|
20
34
|
finishSdkImage,
|
|
21
|
-
foundationCategoryObjects,
|
|
22
35
|
guestWasmSymbols,
|
|
23
|
-
keepWasmNames,
|
|
24
|
-
linkedFrameworkTargets,
|
|
25
36
|
literal,
|
|
26
|
-
lowerWasm,
|
|
27
37
|
nativeEntryKey,
|
|
28
38
|
objcRootInfo,
|
|
29
39
|
object,
|
|
@@ -32,41 +42,31 @@ import {
|
|
|
32
42
|
passiveSegments,
|
|
33
43
|
peachGuestServiceAllowlist,
|
|
34
44
|
readArMembers,
|
|
35
|
-
readGuestRuntimeCatalogs,
|
|
36
45
|
readSwiftPrunedLinkResponse,
|
|
46
|
+
readULEB,
|
|
37
47
|
readWasmImports,
|
|
38
48
|
readWasmLinkMap,
|
|
39
49
|
record,
|
|
40
50
|
relocationEdges,
|
|
41
|
-
resolveBunBinary,
|
|
42
51
|
sdkGuestSymbolName,
|
|
43
52
|
string,
|
|
44
53
|
strongDefinitions,
|
|
45
|
-
swiftFleetBuilderArchive,
|
|
46
|
-
swiftFrameworkProductSchema,
|
|
47
|
-
swiftObjectReplayMetadata,
|
|
48
|
-
swiftProjectBuildKey,
|
|
49
|
-
swiftSdkGuestLookups,
|
|
50
|
-
swiftSdkImageScope,
|
|
51
|
-
union,
|
|
52
|
-
unslottedFunctions,
|
|
53
|
-
wasmNamedFunctions,
|
|
54
|
-
wasmSections as wasmSections2,
|
|
55
|
-
wrappedLinkSymbols
|
|
56
|
-
} from "./chunk-BNO52N2S.mjs";
|
|
57
|
-
import {
|
|
58
|
-
clearSwiftModuleDigestScope,
|
|
59
|
-
readULEB,
|
|
60
54
|
swiftCompileSurfaceDigest,
|
|
61
55
|
swiftDistributionAt,
|
|
56
|
+
swiftFrameworkProductSchema,
|
|
62
57
|
swiftGuestEngineInputDigest,
|
|
63
58
|
swiftModuleRelease,
|
|
64
59
|
swiftModuleSdk,
|
|
65
60
|
swiftModuleToolchain,
|
|
61
|
+
swiftObjectReplayMetadata,
|
|
66
62
|
swiftSdkPaths,
|
|
67
63
|
swiftSdkReplacedModules,
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
union,
|
|
65
|
+
unslottedFunctions,
|
|
66
|
+
wasmSections,
|
|
67
|
+
wasmSections2,
|
|
68
|
+
wrappedLinkSymbols
|
|
69
|
+
} from "./chunk-4WIDTRBB.mjs";
|
|
70
70
|
import {
|
|
71
71
|
SWIFT_JAVASCRIPTCORE_RUNTIME,
|
|
72
72
|
SWIFT_PEACH_ENGINE_ARCHIVE,
|
|
@@ -80,13 +80,13 @@ import {
|
|
|
80
80
|
swiftFileChecksum,
|
|
81
81
|
withSwiftRootLock,
|
|
82
82
|
withSwiftRootReadHolds
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-LD4K2VBL.mjs";
|
|
84
84
|
import {
|
|
85
85
|
SWIFT_FRAME_TURN_EXPORTS
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-NA6DJPB6.mjs";
|
|
87
87
|
import {
|
|
88
88
|
swiftTargetModuleName
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-IJU3JMWM.mjs";
|
|
90
90
|
|
|
91
91
|
// src/swift-sdk-image.ts
|
|
92
92
|
import { execFile, spawn } from "node:child_process";
|
|
@@ -277,6 +277,11 @@ function wasmImmediates(bytes, earliest, float) {
|
|
|
277
277
|
const skip = () => {
|
|
278
278
|
while (bytes[at++] & 128) ;
|
|
279
279
|
};
|
|
280
|
+
const valueType = () => {
|
|
281
|
+
const type = bytes[at];
|
|
282
|
+
if (type === 99 || type === 100) at++;
|
|
283
|
+
skip();
|
|
284
|
+
};
|
|
280
285
|
const address = (bits) => {
|
|
281
286
|
let lo = 0;
|
|
282
287
|
let hi = 0;
|
|
@@ -317,15 +322,16 @@ function wasmImmediates(bytes, earliest, float) {
|
|
|
317
322
|
else if (op >= 40 && op <= 62) memarg();
|
|
318
323
|
else if (op <= 1 || op === 5 || op === 10 || op === 11 || op === 15 || op === 25 || op === 26 || op === 27 || op >= 69 && op <= 196 || op === 209 || op === 211 || op === 212)
|
|
319
324
|
continue;
|
|
320
|
-
else if (op >= 2 && op <= 4 || op
|
|
325
|
+
else if (op >= 2 && op <= 4 || op === 6) valueType();
|
|
326
|
+
else if (op >= 7 && op <= 9 || op === 12 || op === 13 || op === 16 || op === 18 || op === 20 || op === 21 || op === 24 || op >= 32 && op <= 38 || op === 63 || op === 64 || op === 208 || op === 210 || op === 213 || op === 214)
|
|
321
327
|
skip();
|
|
322
328
|
else if (op === 14) for (let n = u() + 1; n > 0; n--) skip();
|
|
323
329
|
else if (op === 17 || op === 19) {
|
|
324
330
|
skip();
|
|
325
331
|
skip();
|
|
326
|
-
} else if (op === 28) for (let n = u(); n > 0; n--)
|
|
332
|
+
} else if (op === 28) for (let n = u(); n > 0; n--) valueType();
|
|
327
333
|
else if (op === 31) {
|
|
328
|
-
|
|
334
|
+
valueType();
|
|
329
335
|
for (let n = u(); n > 0; n--) {
|
|
330
336
|
if (bytes[at++] < 2) skip();
|
|
331
337
|
skip();
|
|
@@ -350,6 +356,21 @@ function wasmImmediates(bytes, earliest, float) {
|
|
|
350
356
|
memarg();
|
|
351
357
|
at++;
|
|
352
358
|
}
|
|
359
|
+
} else if (op === 251) {
|
|
360
|
+
const sub = u();
|
|
361
|
+
if (sub <= 1 || sub >= 6 && sub <= 7 || sub >= 11 && sub <= 14 || sub === 16)
|
|
362
|
+
skip();
|
|
363
|
+
else if (sub >= 2 && sub <= 5 || sub >= 8 && sub <= 10 || sub >= 17 && sub <= 19) {
|
|
364
|
+
skip();
|
|
365
|
+
skip();
|
|
366
|
+
} else if (sub >= 20 && sub <= 23) skip();
|
|
367
|
+
else if (sub === 24 || sub === 25) {
|
|
368
|
+
at++;
|
|
369
|
+
skip();
|
|
370
|
+
skip();
|
|
371
|
+
skip();
|
|
372
|
+
} else if (sub !== 15 && (sub < 26 || sub > 30))
|
|
373
|
+
throw new Error(`sdk code has unknown instruction 0xfb ${sub}`);
|
|
353
374
|
} else if (op === 254) {
|
|
354
375
|
if (u() === 3) at++;
|
|
355
376
|
else memarg();
|
|
@@ -359,7 +380,7 @@ function wasmImmediates(bytes, earliest, float) {
|
|
|
359
380
|
const body = (end) => {
|
|
360
381
|
for (let locals = u(); locals > 0; locals--) {
|
|
361
382
|
skip();
|
|
362
|
-
|
|
383
|
+
valueType();
|
|
363
384
|
}
|
|
364
385
|
expression(end);
|
|
365
386
|
at = end;
|
|
@@ -758,8 +779,8 @@ function findCachedSwiftSdkImage(sha256, preferredKey) {
|
|
|
758
779
|
if (image) return image;
|
|
759
780
|
}
|
|
760
781
|
}
|
|
761
|
-
async function hasCachedSwiftSdkImage(moduleRoot, scopedLookups = false) {
|
|
762
|
-
const key = await swiftSdkImageKey(moduleRoot, scopedLookups);
|
|
782
|
+
async function hasCachedSwiftSdkImage(moduleRoot, scopedLookups = false, sourceModules = []) {
|
|
783
|
+
const key = await swiftSdkImageKey(moduleRoot, scopedLookups, [], sourceModules);
|
|
763
784
|
return cached(path2.join(swiftCacheDir(), "swift-sdk-images", key), key) !== void 0;
|
|
764
785
|
}
|
|
765
786
|
async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkImports = [], options) {
|
|
@@ -797,7 +818,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
797
818
|
const existing = cached(directory, key);
|
|
798
819
|
if (existing) return retainFleetSdkImage(moduleRoot, existing);
|
|
799
820
|
if (!aotGuest && !options?.producer && !options?.frameworkReplay && !required.length && !distribution && path2.resolve(moduleRoot) === sourceSwiftCheckout() && process.platform === "linux" && process.env.TM_SESSION) {
|
|
800
|
-
const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-
|
|
821
|
+
const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-GD3SM6YI.mjs");
|
|
801
822
|
await produceSwiftSdkImage({
|
|
802
823
|
moduleRoot,
|
|
803
824
|
key,
|
|
@@ -889,10 +910,10 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
889
910
|
swiftCacheDir(),
|
|
890
911
|
"swift-sdk-image-plans",
|
|
891
912
|
createHash("sha256").update(JSON.stringify(imports)).update(
|
|
892
|
-
options?.frameworkReplay ? JSON.stringify([moduleRoot, options.frameworkReplay]) :
|
|
893
|
-
moduleRoot,
|
|
894
|
-
|
|
895
|
-
)
|
|
913
|
+
options?.frameworkReplay ? JSON.stringify([moduleRoot, options.frameworkReplay]) : JSON.stringify([
|
|
914
|
+
swiftModuleRelease(moduleRoot),
|
|
915
|
+
swiftModuleSdk(moduleRoot).wasmSdkChecksum
|
|
916
|
+
])
|
|
896
917
|
).digest("hex")
|
|
897
918
|
);
|
|
898
919
|
const link = () => withSwiftRootReadHolds(
|
|
@@ -912,7 +933,8 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
912
933
|
options?.frameworkReplay,
|
|
913
934
|
dev,
|
|
914
935
|
releaseFrameworks,
|
|
915
|
-
options?.onLinked
|
|
936
|
+
options?.onLinked,
|
|
937
|
+
options?.verifyLinkage
|
|
916
938
|
)
|
|
917
939
|
);
|
|
918
940
|
const image = await (distribution ? link() : withSwiftRootLock(appRoot + ".image-lock", link));
|
|
@@ -1324,13 +1346,15 @@ async function resolveSdkLinkPlan(moduleRoot, appRoot, toolchain, sdk, distribut
|
|
|
1324
1346
|
}
|
|
1325
1347
|
return { link, hostExports, cached: false };
|
|
1326
1348
|
}
|
|
1327
|
-
async function linkSwiftSdkImage(moduleRoot, key, directory, work, appRoot, scopedLookups, imports, products, required, sourceModules, engine, aotGuest, frameworkReplay, dev, releaseFrameworks, onLinked) {
|
|
1349
|
+
async function linkSwiftSdkImage(moduleRoot, key, directory, work, appRoot, scopedLookups, imports, products, required, sourceModules, engine, aotGuest, frameworkReplay, dev, releaseFrameworks, onLinked, verifyLinkage) {
|
|
1328
1350
|
rmSync(work, { recursive: true, force: true });
|
|
1329
1351
|
mkdirSync2(work, { recursive: true });
|
|
1330
1352
|
const toolchain = swiftModuleToolchain(moduleRoot);
|
|
1331
1353
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
1332
1354
|
const sdk = swiftSdkPaths(moduleRoot, toolchain.toolchainBin);
|
|
1333
1355
|
const started = performance.now();
|
|
1356
|
+
const diagnosticNames = /* @__PURE__ */ new Map();
|
|
1357
|
+
const retainedAliases = verifyLinkage && new Set(required);
|
|
1334
1358
|
const report = (phase, phaseStarted) => console.error(
|
|
1335
1359
|
`[swift-sdk-image ${key}] ${phase} ${Math.round(performance.now() - phaseStarted)}ms`
|
|
1336
1360
|
);
|
|
@@ -1570,9 +1594,11 @@ async function linkSwiftSdkImage(moduleRoot, key, directory, work, appRoot, scop
|
|
|
1570
1594
|
const original = devObjects?.get(object2.path);
|
|
1571
1595
|
if (original) devObjects?.set(output, original);
|
|
1572
1596
|
}
|
|
1573
|
-
for (const { alias, name } of ledger.definitions)
|
|
1597
|
+
for (const { alias, name } of ledger.definitions) {
|
|
1598
|
+
if (retainedAliases && retainedAliases.has(alias)) diagnosticNames.set(alias, name);
|
|
1574
1599
|
if (name.startsWith("._OBJC_CLASS_") || name.startsWith("$s") && /C(?:N|Mn)$/.test(name))
|
|
1575
1600
|
guestMetadataNames[alias] = name;
|
|
1601
|
+
}
|
|
1576
1602
|
const scopeLedger = path2.join(work, "guest-ledger.ll");
|
|
1577
1603
|
const scopeObject = path2.join(work, "guest-ledger.o");
|
|
1578
1604
|
writeFileSync(scopeLedger, ledger.llvmIR);
|
|
@@ -1706,6 +1732,7 @@ const uint32_t __peach_sdk_framework_count = ${frameworks.length};
|
|
|
1706
1732
|
sdkInterface,
|
|
1707
1733
|
functionSlots
|
|
1708
1734
|
} = finishSdkImage(linkedBytes, hostExports, [...libraries], lookups && linkMap);
|
|
1735
|
+
verifyLinkage?.(key, sdkInterface, diagnosticNames);
|
|
1709
1736
|
if (guestLookups) sdkInterface.guestCallers = guestLookups.callers;
|
|
1710
1737
|
const mask = sdkInterface.data.__peach_sdk_constructors;
|
|
1711
1738
|
if (mask === void 0) throw new Error("sdk image lacks its constructor mask");
|
|
@@ -2165,6 +2192,7 @@ var MANIFEST_BLOCKS = [
|
|
|
2165
2192
|
var isManifestBlock = (name) => MANIFEST_BLOCKS.includes(name);
|
|
2166
2193
|
|
|
2167
2194
|
export {
|
|
2195
|
+
wasmImmediates,
|
|
2168
2196
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
2169
2197
|
SWIFT_SDK_MEMORY_BASE,
|
|
2170
2198
|
swiftSdkDistributionInputs,
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*! peach v0.1.2937 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
|
|
3
|
+
// ../peach-kit/src/nativeSdkBindingContract.ts
|
|
4
|
+
var NATIVE_SDK_GLOBAL_PREFIX = "__peach_sdk_binding.";
|
|
5
|
+
var LATER_DIGEST_BYTES = 32;
|
|
6
|
+
function nativeSdkDataLength(bytes, start = 0) {
|
|
7
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
8
|
+
if (start + 4 > bytes.byteLength) throw new Error("Swift SDK data has no run count");
|
|
9
|
+
let at = start + 4;
|
|
10
|
+
for (let runs = view.getUint32(start, true); runs > 0; runs--) {
|
|
11
|
+
if (at + 12 > bytes.byteLength) throw new Error("Swift SDK data run is truncated");
|
|
12
|
+
at += 12 + view.getUint32(at + 8, true);
|
|
13
|
+
}
|
|
14
|
+
if (at > bytes.byteLength) throw new Error("Swift SDK data range exceeds its section");
|
|
15
|
+
return at - start;
|
|
16
|
+
}
|
|
17
|
+
function encodeNativeSdkLater(later) {
|
|
18
|
+
const { files, needs = [] } = later;
|
|
19
|
+
if (!files.length || files.length > 255)
|
|
20
|
+
throw new Error("Swift SDK later data needs one to 255 files");
|
|
21
|
+
const bytes = new Uint8Array(
|
|
22
|
+
8 + files.length * (LATER_DIGEST_BYTES + 4) + needs.reduce((sum, part) => sum + 1 + part.length, 0)
|
|
23
|
+
);
|
|
24
|
+
const view = new DataView(bytes.buffer);
|
|
25
|
+
view.setUint32(0, files.length, true);
|
|
26
|
+
let at = 4;
|
|
27
|
+
for (const { sha256, byteLength } of files) {
|
|
28
|
+
if (!/^[a-f0-9]{64}$/.test(sha256))
|
|
29
|
+
throw new Error("Swift SDK later data needs a sha256 digest");
|
|
30
|
+
if (!byteLength) throw new Error("Swift SDK later data file is empty");
|
|
31
|
+
for (let i = 0; i < LATER_DIGEST_BYTES; i++)
|
|
32
|
+
bytes[at + i] = Number.parseInt(sha256.slice(i * 2, i * 2 + 2), 16);
|
|
33
|
+
view.setUint32(at + LATER_DIGEST_BYTES, byteLength, true);
|
|
34
|
+
at += LATER_DIGEST_BYTES + 4;
|
|
35
|
+
}
|
|
36
|
+
view.setUint32(at, needs.length, true);
|
|
37
|
+
at += 4;
|
|
38
|
+
for (const part of needs) {
|
|
39
|
+
bytes[at++] = part.length;
|
|
40
|
+
for (const file of part) {
|
|
41
|
+
if (file >= files.length)
|
|
42
|
+
throw new Error("Swift SDK later need names a missing file");
|
|
43
|
+
bytes[at++] = file;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return bytes;
|
|
47
|
+
}
|
|
48
|
+
function decodeNativeSdkLater(trailer) {
|
|
49
|
+
const view = new DataView(trailer.buffer, trailer.byteOffset, trailer.byteLength);
|
|
50
|
+
const truncated = () => new Error("Swift SDK binding later data is truncated");
|
|
51
|
+
if (trailer.byteLength < 4) throw truncated();
|
|
52
|
+
const count = view.getUint32(0, true);
|
|
53
|
+
let at = 4;
|
|
54
|
+
const files = [];
|
|
55
|
+
for (let file = 0; file < count; file++) {
|
|
56
|
+
if (at + LATER_DIGEST_BYTES + 4 > trailer.byteLength) throw truncated();
|
|
57
|
+
const sha256 = Array.from(
|
|
58
|
+
trailer.subarray(at, at + LATER_DIGEST_BYTES),
|
|
59
|
+
(byte) => byte.toString(16).padStart(2, "0")
|
|
60
|
+
).join("");
|
|
61
|
+
const byteLength = view.getUint32(at + LATER_DIGEST_BYTES, true);
|
|
62
|
+
if (!byteLength) throw new Error("Swift SDK binding names empty later data");
|
|
63
|
+
files.push({ sha256, byteLength });
|
|
64
|
+
at += LATER_DIGEST_BYTES + 4;
|
|
65
|
+
}
|
|
66
|
+
if (!files.length || at + 4 > trailer.byteLength) throw truncated();
|
|
67
|
+
const parts = view.getUint32(at, true);
|
|
68
|
+
at += 4;
|
|
69
|
+
const needs = [];
|
|
70
|
+
for (let part = 0; part < parts; part++) {
|
|
71
|
+
if (at >= trailer.byteLength) throw truncated();
|
|
72
|
+
const n = trailer[at++];
|
|
73
|
+
if (at + n > trailer.byteLength) throw truncated();
|
|
74
|
+
const list = Array.from(trailer.subarray(at, at + n));
|
|
75
|
+
if (list.some((file) => file >= files.length))
|
|
76
|
+
throw new Error("Swift SDK binding later need names a missing file");
|
|
77
|
+
needs.push(list);
|
|
78
|
+
at += n;
|
|
79
|
+
}
|
|
80
|
+
if (at !== trailer.byteLength) throw new Error("Swift SDK binding has trailing bytes");
|
|
81
|
+
return parts ? { files, needs } : { files };
|
|
82
|
+
}
|
|
83
|
+
function encodeNativeSdkFixups(triples) {
|
|
84
|
+
if (triples.length % 3) throw new Error("Swift SDK fixups are not triples");
|
|
85
|
+
const order = Array.from({ length: triples.length / 3 }, (_, i) => i * 3).sort(
|
|
86
|
+
(a, b) => triples[a] - triples[b]
|
|
87
|
+
);
|
|
88
|
+
const out = new Uint8Array(order.length * 12);
|
|
89
|
+
let at = 0;
|
|
90
|
+
const varint = (value) => {
|
|
91
|
+
for (; value >= 128; value = Math.floor(value / 128)) out[at++] = value % 128 | 128;
|
|
92
|
+
out[at++] = value;
|
|
93
|
+
};
|
|
94
|
+
let offset = 0;
|
|
95
|
+
let index = 0;
|
|
96
|
+
for (const i of order) {
|
|
97
|
+
const width = triples[i + 1];
|
|
98
|
+
if (width !== 4 && width !== 8)
|
|
99
|
+
throw new Error("Swift SDK fixup width must be 4 or 8");
|
|
100
|
+
varint((triples[i] - offset) * 2 + (width === 8 ? 1 : 0));
|
|
101
|
+
const delta = triples[i + 2] - index;
|
|
102
|
+
varint(delta < 0 ? -delta * 2 - 1 : delta * 2);
|
|
103
|
+
offset = triples[i];
|
|
104
|
+
index = triples[i + 2];
|
|
105
|
+
}
|
|
106
|
+
return out.slice(0, at);
|
|
107
|
+
}
|
|
108
|
+
function decodeNativeSdkBinding(buffer) {
|
|
109
|
+
const headerBytes = 16;
|
|
110
|
+
if (buffer.byteLength < headerBytes)
|
|
111
|
+
throw new Error("Swift SDK binding is missing its header");
|
|
112
|
+
const [valueCount, slotCount, memoryCount, tlsCount] = new Uint32Array(buffer, 0, 4);
|
|
113
|
+
const fixed = headerBytes + valueCount * 8 + (slotCount + tlsCount) * 4;
|
|
114
|
+
if (fixed > buffer.byteLength || memoryCount % 3 || tlsCount % 3)
|
|
115
|
+
throw new Error("Swift SDK binding has invalid fixup ranges");
|
|
116
|
+
const values = new BigInt64Array(buffer, headerBytes, valueCount);
|
|
117
|
+
const slots = new Uint32Array(buffer, headerBytes + values.byteLength, slotCount);
|
|
118
|
+
const tls = new Uint32Array(buffer, slots.byteOffset + slots.byteLength, tlsCount);
|
|
119
|
+
const bytes = new Uint8Array(buffer);
|
|
120
|
+
const memory = new Uint32Array(memoryCount);
|
|
121
|
+
let at = fixed;
|
|
122
|
+
const varint = () => {
|
|
123
|
+
let value = 0;
|
|
124
|
+
for (let scale = 1; ; scale *= 128) {
|
|
125
|
+
if (at >= bytes.length) throw new Error("Swift SDK binding fixups are truncated");
|
|
126
|
+
const byte = bytes[at++];
|
|
127
|
+
value += (byte & 127) * scale;
|
|
128
|
+
if (byte < 128) return value;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
let offset = 0;
|
|
132
|
+
let index = 0;
|
|
133
|
+
for (let i = 0; i < memory.length; i += 3) {
|
|
134
|
+
const word = varint();
|
|
135
|
+
offset += Math.floor(word / 2);
|
|
136
|
+
const delta = varint();
|
|
137
|
+
index += delta % 2 ? -(delta + 1) / 2 : delta / 2;
|
|
138
|
+
memory[i] = offset;
|
|
139
|
+
memory[i + 1] = word % 2 ? 8 : 4;
|
|
140
|
+
memory[i + 2] = index;
|
|
141
|
+
}
|
|
142
|
+
const rest = new Uint8Array(buffer, at);
|
|
143
|
+
const sdkData = rest.subarray(0, nativeSdkDataLength(rest));
|
|
144
|
+
const trailer = rest.subarray(sdkData.byteLength);
|
|
145
|
+
if (trailer.byteLength === 0) return { slots, values, memory, tls, sdkData };
|
|
146
|
+
return { slots, values, memory, tls, sdkData, later: decodeNativeSdkLater(trailer) };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export {
|
|
150
|
+
NATIVE_SDK_GLOBAL_PREFIX,
|
|
151
|
+
encodeNativeSdkLater,
|
|
152
|
+
encodeNativeSdkFixups,
|
|
153
|
+
decodeNativeSdkBinding
|
|
154
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2937 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
isSwiftImageVariants
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SCT5OFDV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
findBundleFooter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CWVMCW23.mjs";
|
|
8
8
|
import {
|
|
9
9
|
isRecord
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PZPJJBAS.mjs";
|
|
11
11
|
|
|
12
12
|
// src/android-string-value.ts
|
|
13
13
|
function compileAndroidStringValue(text, where) {
|