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-standins.ts
CHANGED
|
@@ -67,8 +67,11 @@ import { relativeInside } from './swift-source-file'
|
|
|
67
67
|
import { withBuiltinStandinBehavior } from './swift-standin-builtin-behavior'
|
|
68
68
|
import { STANDIN_SOURCE_DIGEST, standinSourceDigest } from './swift-standin-digest'
|
|
69
69
|
import {
|
|
70
|
+
OBJC_UNREPRESENTABLE,
|
|
70
71
|
STANDIN_IMPORTS,
|
|
72
|
+
SWIFT_OBJC_ONLY,
|
|
71
73
|
emitSwiftStandin,
|
|
74
|
+
exposeObjCOnlyDeclarations,
|
|
72
75
|
isSwiftDeclaration,
|
|
73
76
|
objcProtocolsInSwiftSignatures,
|
|
74
77
|
type SymbolFragment,
|
|
@@ -76,7 +79,7 @@ import {
|
|
|
76
79
|
type SwiftStandinBehaviors,
|
|
77
80
|
type StandinBehavior,
|
|
78
81
|
synthesizedInterfaceEnums,
|
|
79
|
-
|
|
82
|
+
restoreSwiftInterfaceAttributes,
|
|
80
83
|
} from './swift-standin-emit'
|
|
81
84
|
import {
|
|
82
85
|
sourceSwiftCheckout,
|
|
@@ -682,7 +685,7 @@ const files = (dir: string, test: (name: string) => boolean): string[] =>
|
|
|
682
685
|
|
|
683
686
|
/** the module surfaces an iOS simulator slice describes. */
|
|
684
687
|
type SliceSurface =
|
|
685
|
-
| { kind: 'swift'; module: string; interface: string }
|
|
688
|
+
| { kind: 'swift'; module: string; interface: string; objcHeader?: string }
|
|
686
689
|
| (ObjcSurface & { kind: 'mixed'; interface: string })
|
|
687
690
|
| { kind: 'c'; module: string; modulemap: string; headers: string }
|
|
688
691
|
| (ObjcSurface & { kind: 'objc' })
|
|
@@ -824,7 +827,15 @@ function surfaces(
|
|
|
824
827
|
modulemap,
|
|
825
828
|
headers: path.join(framework, 'Headers'),
|
|
826
829
|
})
|
|
827
|
-
} else
|
|
830
|
+
} else {
|
|
831
|
+
const objcHeader = path.join(headers, `${module}-Swift.h`)
|
|
832
|
+
found.push({
|
|
833
|
+
kind: 'swift',
|
|
834
|
+
module,
|
|
835
|
+
interface: file,
|
|
836
|
+
objcHeader: fs.existsSync(objcHeader) ? objcHeader : undefined,
|
|
837
|
+
})
|
|
838
|
+
}
|
|
828
839
|
continue
|
|
829
840
|
}
|
|
830
841
|
if (fs.existsSync(modulemap))
|
|
@@ -1071,8 +1082,13 @@ function swiftStandin(
|
|
|
1071
1082
|
behavior: ReadonlyMap<string, StandinBehavior>,
|
|
1072
1083
|
siblings: ReadonlySet<string>,
|
|
1073
1084
|
): SwiftStandin {
|
|
1085
|
+
const interfaceText = fs.readFileSync(surface.interface, 'utf8')
|
|
1086
|
+
// symbolgraph skips declarations the vendor hides from Swift but exports to Objective-C.
|
|
1087
|
+
const intake = surface.objcHeader
|
|
1088
|
+
? exposeObjCOnlyDeclarations(interfaceText)
|
|
1089
|
+
: interfaceText
|
|
1074
1090
|
const text = swiftInterfaceForWasm(
|
|
1075
|
-
|
|
1091
|
+
intake,
|
|
1076
1092
|
swiftSdkPaths(toolchain.moduleRoot, toolchain.toolchainBin).cFlags,
|
|
1077
1093
|
)
|
|
1078
1094
|
const search = path.join(work, 'interfaces')
|
|
@@ -1125,8 +1141,13 @@ function swiftStandin(
|
|
|
1125
1141
|
// the graph drops underscore-prefixed declarations; missing enums are
|
|
1126
1142
|
// read back out of the binary's real interface so the stand-in names them.
|
|
1127
1143
|
const supplemented = synthesizedInterfaceEnums(text, surface.module, graphs)
|
|
1128
|
-
|
|
1129
|
-
|
|
1144
|
+
const superclasses = restoreSwiftInterfaceAttributes(
|
|
1145
|
+
interfaceText,
|
|
1146
|
+
surface.module,
|
|
1147
|
+
graphs,
|
|
1148
|
+
surface.objcHeader !== undefined,
|
|
1149
|
+
)
|
|
1150
|
+
const standin = graphStandin(
|
|
1130
1151
|
surface.module,
|
|
1131
1152
|
supplemented ? [...graphs, supplemented] : graphs,
|
|
1132
1153
|
interfaceEnumValues(graphs, text),
|
|
@@ -1147,10 +1168,37 @@ function swiftStandin(
|
|
|
1147
1168
|
new Map(),
|
|
1148
1169
|
null,
|
|
1149
1170
|
new Map(),
|
|
1150
|
-
interfaceProjections(graphs, text),
|
|
1171
|
+
{ projections: interfaceProjections(graphs, text), superclasses },
|
|
1151
1172
|
[],
|
|
1152
1173
|
externalConformances(surface.module, text),
|
|
1153
1174
|
)
|
|
1175
|
+
if (surface.objcHeader) {
|
|
1176
|
+
const header = fs.readFileSync(surface.objcHeader, 'utf8')
|
|
1177
|
+
const classes = new Set(
|
|
1178
|
+
[
|
|
1179
|
+
...standin.files[`${surface.module}.swift`]!.matchAll(
|
|
1180
|
+
/^[ \t]+[^\n]*?@objc\((\w+)\)[^\n]*?\bclass\s+\w+/gm,
|
|
1181
|
+
),
|
|
1182
|
+
].map((match) => match[1]!),
|
|
1183
|
+
)
|
|
1184
|
+
if (classes.size > 0) {
|
|
1185
|
+
const declarations = new Set(
|
|
1186
|
+
[
|
|
1187
|
+
...header.matchAll(
|
|
1188
|
+
/^(?:SWIFT_(?:RESILIENT_)?CLASS_NAMED\([^\n]*\)\n)?@interface (\w+)\b[^\n]*\n[\s\S]*?^@end\b/gm,
|
|
1189
|
+
),
|
|
1190
|
+
].flatMap((match) => (classes.has(match[1]!) ? [match[0]] : [])),
|
|
1191
|
+
)
|
|
1192
|
+
if (declarations.size > 0) {
|
|
1193
|
+
const forwards = new Set(header.match(/^@(?:class|protocol) \w+;$/gm))
|
|
1194
|
+
standin.files[`${surface.module}-Swift.inc`] = [
|
|
1195
|
+
...forwards,
|
|
1196
|
+
...declarations,
|
|
1197
|
+
].join('\n')
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
return standin
|
|
1154
1202
|
}
|
|
1155
1203
|
|
|
1156
1204
|
// a source module a binary's interface imports, emitted from its sources as
|
|
@@ -1474,6 +1522,67 @@ function interfaceEnumValues(
|
|
|
1474
1522
|
return values
|
|
1475
1523
|
}
|
|
1476
1524
|
|
|
1525
|
+
function mixedClangHeaders(
|
|
1526
|
+
surface: Extract<Surface, { kind: 'mixed' }>,
|
|
1527
|
+
graphs: SymbolGraph[],
|
|
1528
|
+
): { files: Record<string, string>; names: Set<string> } {
|
|
1529
|
+
const references = new Set(
|
|
1530
|
+
graphs.flatMap(({ symbols }) =>
|
|
1531
|
+
symbols.flatMap((symbol) => {
|
|
1532
|
+
const fragments = symbol.declarationFragments ?? []
|
|
1533
|
+
if (!fragments.some((fragment) => /^@objc(?:\(|$)/.test(fragment.spelling)))
|
|
1534
|
+
return []
|
|
1535
|
+
return fragments.flatMap((fragment) =>
|
|
1536
|
+
fragment.preciseIdentifier ? [fragment.preciseIdentifier] : [],
|
|
1537
|
+
)
|
|
1538
|
+
}),
|
|
1539
|
+
),
|
|
1540
|
+
)
|
|
1541
|
+
const optionSets = new Set(
|
|
1542
|
+
graphs.flatMap(({ relationships }) =>
|
|
1543
|
+
relationships.flatMap(({ kind, source, target }) =>
|
|
1544
|
+
kind === 'conformsTo' && target === 's:s9OptionSetP' ? [source] : [],
|
|
1545
|
+
),
|
|
1546
|
+
),
|
|
1547
|
+
)
|
|
1548
|
+
const options = new Map<string, string>()
|
|
1549
|
+
for (const { symbols } of graphs)
|
|
1550
|
+
for (const { identifier, pathComponents } of symbols) {
|
|
1551
|
+
const id = identifier.precise
|
|
1552
|
+
const name = /^c:(?:@M@[^@]+)?@E@(\w+)$/.exec(id)?.[1]
|
|
1553
|
+
if (name && pathComponents.length === 1 && references.has(id) && optionSets.has(id))
|
|
1554
|
+
options.set(name, pathComponents[0]!)
|
|
1555
|
+
}
|
|
1556
|
+
const headerFiles: Record<string, string> = {}
|
|
1557
|
+
const headers = new Set<string>()
|
|
1558
|
+
const names = new Set<string>()
|
|
1559
|
+
for (const file of files(
|
|
1560
|
+
surface.headers,
|
|
1561
|
+
(name) => name.endsWith('.h') && !name.endsWith('-Swift.h'),
|
|
1562
|
+
)) {
|
|
1563
|
+
const source = fs.readFileSync(path.join(surface.headers, file), 'utf8')
|
|
1564
|
+
const name = surface.module + '/' + file
|
|
1565
|
+
headerFiles['include/' + name] = source
|
|
1566
|
+
for (const match of source.matchAll(/\bNS_OPTIONS\(\s*[^,\n]+,\s*(\w+)\s*\)/g)) {
|
|
1567
|
+
const option = options.get(match[1]!)
|
|
1568
|
+
if (!option) continue
|
|
1569
|
+
names.add(option)
|
|
1570
|
+
headers.add(name)
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
const umbrella = `include/${surface.module}/${surface.module}.h`
|
|
1574
|
+
if (Object.hasOwn(headerFiles, umbrella))
|
|
1575
|
+
headerFiles[umbrella] +=
|
|
1576
|
+
`\n#if defined(__OBJC__) && !defined(__swift__)\n#import <${surface.module}/${surface.module}-Swift.h>\n#endif\n`
|
|
1577
|
+
headerFiles['include/module.modulemap'] =
|
|
1578
|
+
'module ' +
|
|
1579
|
+
surface.module +
|
|
1580
|
+
' {\n' +
|
|
1581
|
+
[...headers].map((header) => ' header ' + JSON.stringify(header)).join('\n') +
|
|
1582
|
+
'\n export *\n}\n'
|
|
1583
|
+
return { files: headerFiles, names }
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1477
1586
|
function mixedStandin(
|
|
1478
1587
|
surface: Extract<Surface, { kind: 'mixed' }>,
|
|
1479
1588
|
binary: SwiftPackageBinary,
|
|
@@ -1493,13 +1602,19 @@ function mixedStandin(
|
|
|
1493
1602
|
frameworkDirs,
|
|
1494
1603
|
)
|
|
1495
1604
|
const interfaceText = fs.readFileSync(surface.interface, 'utf8')
|
|
1496
|
-
|
|
1605
|
+
const superclasses = restoreSwiftInterfaceAttributes(
|
|
1606
|
+
interfaceText,
|
|
1607
|
+
surface.module,
|
|
1608
|
+
view.graphs,
|
|
1609
|
+
fs.existsSync(path.join(surface.headers, `${surface.module}-Swift.h`)),
|
|
1610
|
+
)
|
|
1497
1611
|
const values = new Map([
|
|
1498
1612
|
...view.values,
|
|
1499
1613
|
...interfaceEnumValues(view.graphs, interfaceText),
|
|
1500
1614
|
])
|
|
1501
1615
|
const provided = new Set(swiftPeachModules(toolchain.moduleRoot))
|
|
1502
1616
|
const owners = new Set<string>()
|
|
1617
|
+
const underlying = mixedClangHeaders(surface, view.graphs)
|
|
1503
1618
|
const graphs = view.graphs.map((graph) => {
|
|
1504
1619
|
const own = new Set(graph.symbols.map((symbol) => symbol.identifier.precise))
|
|
1505
1620
|
// darwin's Foundation names these bare; the guest keeps networking types
|
|
@@ -1517,14 +1632,16 @@ function mixedStandin(
|
|
|
1517
1632
|
}
|
|
1518
1633
|
return {
|
|
1519
1634
|
...graph,
|
|
1520
|
-
symbols: graph.symbols
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1635
|
+
symbols: graph.symbols
|
|
1636
|
+
.filter((symbol) => !underlying.names.has(symbol.pathComponents[0]!))
|
|
1637
|
+
.map((symbol) => ({
|
|
1638
|
+
...symbol,
|
|
1639
|
+
declarationFragments: symbol.declarationFragments?.map(qualify),
|
|
1640
|
+
functionSignature: symbol.functionSignature && {
|
|
1641
|
+
...symbol.functionSignature,
|
|
1642
|
+
returns: symbol.functionSignature.returns?.map(qualify),
|
|
1643
|
+
},
|
|
1644
|
+
})),
|
|
1528
1645
|
}
|
|
1529
1646
|
})
|
|
1530
1647
|
const imports = [
|
|
@@ -1537,11 +1654,18 @@ function mixedStandin(
|
|
|
1537
1654
|
(module) =>
|
|
1538
1655
|
module !== surface.module && (provided.has(module) || siblings.has(module)),
|
|
1539
1656
|
)
|
|
1540
|
-
|
|
1657
|
+
const wasm = wasmFlags(toolchain, imports)
|
|
1658
|
+
for (const [name, source] of Object.entries(underlying.files)) {
|
|
1659
|
+
const file = path.join(work, name)
|
|
1660
|
+
fs.mkdirSync(path.dirname(file), { recursive: true })
|
|
1661
|
+
fs.writeFileSync(file, source)
|
|
1662
|
+
}
|
|
1663
|
+
wasm.push('-I', path.join(work, 'include'), '-import-underlying-module')
|
|
1664
|
+
const standin = graphStandin(
|
|
1541
1665
|
surface.module,
|
|
1542
1666
|
graphs,
|
|
1543
1667
|
values,
|
|
1544
|
-
|
|
1668
|
+
wasm,
|
|
1545
1669
|
binary,
|
|
1546
1670
|
toolchain,
|
|
1547
1671
|
work,
|
|
@@ -1552,11 +1676,14 @@ function mixedStandin(
|
|
|
1552
1676
|
view.protocolProperties ?? new Map(),
|
|
1553
1677
|
null,
|
|
1554
1678
|
view.inheritedConformances,
|
|
1555
|
-
interfaceProjections(view.graphs, interfaceText),
|
|
1679
|
+
{ projections: interfaceProjections(view.graphs, interfaceText), superclasses },
|
|
1556
1680
|
[],
|
|
1557
1681
|
externalConformances(surface.module, interfaceText),
|
|
1558
1682
|
view.imports.filter((name) => provided.has(name) || siblings.has(name)),
|
|
1559
1683
|
)
|
|
1684
|
+
Object.assign(standin.files, underlying.files)
|
|
1685
|
+
standin.publicHeadersPath = 'include'
|
|
1686
|
+
return standin
|
|
1560
1687
|
}
|
|
1561
1688
|
|
|
1562
1689
|
// an external conformance edge can lack a declaration for the extended type.
|
|
@@ -1683,7 +1810,7 @@ function objcStandin(
|
|
|
1683
1810
|
new Map(),
|
|
1684
1811
|
null,
|
|
1685
1812
|
new Map(),
|
|
1686
|
-
|
|
1813
|
+
{},
|
|
1687
1814
|
dependencyGraphs,
|
|
1688
1815
|
'',
|
|
1689
1816
|
view.imports.filter((name) => provided.has(name) || siblings.has(name)),
|
|
@@ -1746,8 +1873,6 @@ function headerDependencyModules(binary: SwiftPackageBinary): string[] {
|
|
|
1746
1873
|
)
|
|
1747
1874
|
}
|
|
1748
1875
|
|
|
1749
|
-
const OBJC_UNREPRESENTABLE =
|
|
1750
|
-
/cannot be marked '@objc' because (?:its type|its result type|the type of the parameter) cannot be represented in Objective-C/
|
|
1751
1876
|
const INERT_VALUE =
|
|
1752
1877
|
/missing argument|cannot be constructed|has no member 'init'|no exact matches in call to initializer|cannot convert return expression|does not conform to '|extra argument|takes no arguments|could not be inferred|cannot infer/
|
|
1753
1878
|
|
|
@@ -1771,7 +1896,10 @@ function graphStandin(
|
|
|
1771
1896
|
// placeholder's own re-exports
|
|
1772
1897
|
placeholder: { peachImports: string[]; exported: string[] } | null = null,
|
|
1773
1898
|
inheritedConformances: ReadonlyMap<string, ReadonlySet<string>> = new Map(),
|
|
1774
|
-
|
|
1899
|
+
interfaceDetails: {
|
|
1900
|
+
projections?: ReadonlyMap<string, string>
|
|
1901
|
+
superclasses?: ReadonlyMap<string, string>
|
|
1902
|
+
} = {},
|
|
1775
1903
|
dependencyGraphs: SymbolGraph[] = [],
|
|
1776
1904
|
// declarations the symbol graphs cannot carry, appended after the emitted ones
|
|
1777
1905
|
trailer = '',
|
|
@@ -1871,7 +1999,7 @@ function graphStandin(
|
|
|
1871
1999
|
family: [...imports, ...(placeholder?.peachImports ?? [])],
|
|
1872
2000
|
objcProperties,
|
|
1873
2001
|
inheritedConformances,
|
|
1874
|
-
|
|
2002
|
+
...interfaceDetails,
|
|
1875
2003
|
dependencyGraphs,
|
|
1876
2004
|
exported: [
|
|
1877
2005
|
...(placeholder?.exported ?? []),
|
|
@@ -1969,31 +2097,35 @@ function graphStandin(
|
|
|
1969
2097
|
plain.add(owner)
|
|
1970
2098
|
continue
|
|
1971
2099
|
}
|
|
1972
|
-
if (owner && swiftPaths.has(owner))
|
|
1973
|
-
throw new Error(
|
|
1974
|
-
`Swift declaration ${module}.${owner} does not typecheck: ${match[3]}`,
|
|
1975
|
-
)
|
|
1976
|
-
if (owner && behavior.has(owner))
|
|
1977
|
-
throw new Error(
|
|
1978
|
-
`Configured Swift behavior ${module}.${owner} does not typecheck: ${match[3]}`,
|
|
1979
|
-
)
|
|
1980
2100
|
if (
|
|
1981
2101
|
owner &&
|
|
1982
2102
|
/failable initializer 'init\(coder:\)' cannot override a non-failable/.test(
|
|
1983
2103
|
match[3]!,
|
|
1984
2104
|
) &&
|
|
1985
2105
|
!nonfailable.has(owner)
|
|
1986
|
-
)
|
|
2106
|
+
) {
|
|
1987
2107
|
nonfailable.add(owner)
|
|
1988
|
-
|
|
1989
|
-
|
|
2108
|
+
continue
|
|
2109
|
+
}
|
|
2110
|
+
// a stand-in superclass may supply the initializer that the vendor hid.
|
|
2111
|
+
if (
|
|
1990
2112
|
owner &&
|
|
1991
2113
|
/requires an 'override' keyword/.test(match[3]!) &&
|
|
1992
2114
|
!forced.has(owner)
|
|
1993
|
-
)
|
|
2115
|
+
) {
|
|
1994
2116
|
forced.add(owner)
|
|
2117
|
+
continue
|
|
2118
|
+
}
|
|
2119
|
+
if (owner && swiftPaths.has(owner))
|
|
2120
|
+
throw new Error(
|
|
2121
|
+
`Swift declaration ${module}.${owner} does not typecheck: ${match[3]}`,
|
|
2122
|
+
)
|
|
2123
|
+
if (owner && behavior.has(owner))
|
|
2124
|
+
throw new Error(
|
|
2125
|
+
`Configured Swift behavior ${module}.${owner} does not typecheck: ${match[3]}`,
|
|
2126
|
+
)
|
|
1995
2127
|
// an inert value the declaration's type cannot build: its body traps
|
|
1996
|
-
|
|
2128
|
+
if (owner && inert && INERT_VALUE.test(match[3]!) && !trapped.has(owner))
|
|
1997
2129
|
trapped.add(owner)
|
|
1998
2130
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`)
|
|
1999
2131
|
else elsewhere.push(match[3]!)
|
|
@@ -3697,6 +3829,17 @@ async function buildStandins(
|
|
|
3697
3829
|
includes.push(dir)
|
|
3698
3830
|
}
|
|
3699
3831
|
if (source !== undefined) {
|
|
3832
|
+
const underlying = standin.publicHeadersPath
|
|
3833
|
+
if (underlying) {
|
|
3834
|
+
const root = path.join(modules, standin.module)
|
|
3835
|
+
for (const [name, text] of Object.entries(standin.files)) {
|
|
3836
|
+
if (!name.startsWith(underlying + '/')) continue
|
|
3837
|
+
const file = path.join(root, name)
|
|
3838
|
+
fs.mkdirSync(path.dirname(file), { recursive: true })
|
|
3839
|
+
fs.writeFileSync(file, text)
|
|
3840
|
+
}
|
|
3841
|
+
includes.push(path.join(root, underlying))
|
|
3842
|
+
}
|
|
3700
3843
|
const file = path.join(modules, `${standin.module}.swift`)
|
|
3701
3844
|
fs.writeFileSync(file, source)
|
|
3702
3845
|
try {
|
|
@@ -3704,7 +3847,10 @@ async function buildStandins(
|
|
|
3704
3847
|
path.join(toolchain.toolchainBin, 'swiftc'),
|
|
3705
3848
|
emitSwiftModuleArgs(
|
|
3706
3849
|
standin.module,
|
|
3707
|
-
|
|
3850
|
+
[
|
|
3851
|
+
...wasmFlags(generatedToolchain, swiftImportNames(source)),
|
|
3852
|
+
...(underlying ? ['-import-underlying-module'] : []),
|
|
3853
|
+
],
|
|
3708
3854
|
modules,
|
|
3709
3855
|
file,
|
|
3710
3856
|
),
|
|
@@ -17,6 +17,7 @@ import { createServer, get as httpGet } from 'node:http'
|
|
|
17
17
|
import { get as httpsGet } from 'node:https'
|
|
18
18
|
import { tmpdir } from 'node:os'
|
|
19
19
|
import { dirname, join } from 'node:path'
|
|
20
|
+
import { fileURLToPath } from 'node:url'
|
|
20
21
|
import {
|
|
21
22
|
PEACH_SIMULATOR_PATH,
|
|
22
23
|
PEACH_SIMULATOR_SHELL_FILE,
|
|
@@ -45,7 +46,7 @@ import { recordSwiftStartupParts } from './swift-interaction-profile'
|
|
|
45
46
|
import { withSwiftRootLock } from './swift-root-lock'
|
|
46
47
|
import { replaySdkSplitLiterals } from './swift-sdk-dev-replay'
|
|
47
48
|
import { sharesSwiftSdkManifest, swiftSdkDevBaseFile } from './swift-sdk-image'
|
|
48
|
-
import { swiftSdkDeferredDataPlan } from './swift-sdk-later-data'
|
|
49
|
+
import { deferSwiftAppData, swiftSdkDeferredDataPlan } from './swift-sdk-later-data'
|
|
49
50
|
import { SWIFT_HMR_PATH, SWIFT_PACKAGE_PATH } from './swift-submit'
|
|
50
51
|
import { refreshSwiftCacheHold, swiftCacheDir } from './swift-toolchain'
|
|
51
52
|
import {
|
|
@@ -120,9 +121,9 @@ function serveProfileRuntime(
|
|
|
120
121
|
request: IncomingMessage,
|
|
121
122
|
response: ServerResponse,
|
|
122
123
|
) {
|
|
123
|
-
if (typeof root === 'string') {
|
|
124
|
+
if (typeof root === 'string' || root.protocol === 'file:') {
|
|
124
125
|
const runtime = resolveRuntimeFilePath(
|
|
125
|
-
root,
|
|
126
|
+
typeof root === 'string' ? root : fileURLToPath(root),
|
|
126
127
|
url.pathname === PEACH_SIMULATOR_PATH ? PEACH_SIMULATOR_SHELL_FILE : url.pathname,
|
|
127
128
|
)
|
|
128
129
|
if (runtime) serveRuntimeFile(request, response, runtime)
|
|
@@ -294,7 +295,7 @@ function swiftAppStartupCacheDir(
|
|
|
294
295
|
parent,
|
|
295
296
|
cache: join(
|
|
296
297
|
parent,
|
|
297
|
-
`startup-
|
|
298
|
+
`startup-v12-${platform}${environment}${guest}${args}${measureOnly ? '-heap' : ''}`,
|
|
298
299
|
),
|
|
299
300
|
}
|
|
300
301
|
}
|
|
@@ -768,12 +769,21 @@ async function storeStartupSplit(
|
|
|
768
769
|
const interactionParts = split.interactionParts.map(
|
|
769
770
|
(index) => split.sides[index]!.sha256,
|
|
770
771
|
)
|
|
772
|
+
// an app image moves the data only its deferred parts reach into later files
|
|
773
|
+
const own =
|
|
774
|
+
partCodeBytes === undefined && delivery.sides.length
|
|
775
|
+
? deferSwiftAppData(work.bytes, delivery.primary, delivery.sides)
|
|
776
|
+
: undefined
|
|
771
777
|
const result: SwiftStartupImage = {
|
|
772
|
-
primary: delivery.primary,
|
|
778
|
+
primary: own?.primary ?? delivery.primary,
|
|
773
779
|
...measurement,
|
|
774
|
-
parts: new Map(
|
|
775
|
-
split.sides.map(({ sha256 }, index)
|
|
776
|
-
|
|
780
|
+
parts: new Map([
|
|
781
|
+
...split.sides.map(({ sha256 }, index): [string, Buffer] => [
|
|
782
|
+
sha256,
|
|
783
|
+
delivery.sides[index]!,
|
|
784
|
+
]),
|
|
785
|
+
...(own?.later ?? []).map((bytes): [string, Buffer] => [digest(bytes), bytes]),
|
|
786
|
+
]),
|
|
777
787
|
...(interactionParts.length ? { interactionParts } : {}),
|
|
778
788
|
...(interactionParts.length || partCodeBytes !== undefined
|
|
779
789
|
? { source: digest(work.bytes) }
|
|
@@ -1279,8 +1289,8 @@ export async function bootSwiftPreview(
|
|
|
1279
1289
|
].join('\n'),
|
|
1280
1290
|
)
|
|
1281
1291
|
if (!profile) return
|
|
1282
|
-
const startupParts = recordedParts?.(paintedAt)
|
|
1283
1292
|
const measured = await collectProfile(launchErrors, (ms) => page.waitForTimeout(ms))
|
|
1293
|
+
const startupParts = recordedParts?.(Date.now())
|
|
1284
1294
|
return startupParts?.length ? { ...measured, startupParts } : measured
|
|
1285
1295
|
} finally {
|
|
1286
1296
|
capture.resolve(false)
|
package/src/swift-toolchain.ts
CHANGED
|
@@ -50,6 +50,24 @@ export interface SwiftHostCompilerPin {
|
|
|
50
50
|
// keep the checkout, distribution lock, and live canary index compilers.
|
|
51
51
|
// installed CLIs register the compiler carried by their own runtime.
|
|
52
52
|
const compilerArchives: Record<string, SwiftHostCompilerPin> = {
|
|
53
|
+
'swift-6.4.0-RELEASE-custom-79968b9717d332cb': {
|
|
54
|
+
identity: '79968b9717d332cb',
|
|
55
|
+
archive: 'tar.zst',
|
|
56
|
+
hosts: {
|
|
57
|
+
'darwin-arm64': {
|
|
58
|
+
checksum: '1275c900f87b41c1d42b884cd4e80f79abd2ab46c99d7c4325e4fe9cb0cf6152',
|
|
59
|
+
manifest: 'a8142e2cf741ddd0531c161000a2f05c600ba1125a481496536fca9346d7b100',
|
|
60
|
+
},
|
|
61
|
+
'linux-x64': {
|
|
62
|
+
checksum: '08e82c2f6265a83e5203aa91790bb956ebbf616e9e5592e69de860b3b4dd1395',
|
|
63
|
+
manifest: 'f51902156ecea7d61859266cd4f0412e949d554cd15d79ee0d360213fa15111c',
|
|
64
|
+
},
|
|
65
|
+
'linux-arm64': {
|
|
66
|
+
checksum: '3c6107f54fee6dbe5981b35eff19d55376e67aa8ae16c077ca16c2f510d24e40',
|
|
67
|
+
manifest: '524d5651d9bb95ca10c29534db96679575711edd25ef65985eb13319cb0d972f',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
53
71
|
'swift-6.4.0-RELEASE-custom-3844400b8fd05718': {
|
|
54
72
|
identity: '3844400b8fd05718',
|
|
55
73
|
archive: 'tar.zst',
|