peachsim 0.1.1744 → 0.1.1801
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/cli/account-gate.ts +97 -0
- package/cli/app-catalog.ts +24 -0
- package/cli/app-stubs.ts +7 -0
- package/cli/auth.ts +48 -18
- package/cli/bin.ts +35 -2
- package/cli/bridge-flow-runner.ts +174 -6
- package/cli/cloud-dispatch.ts +0 -3
- package/cli/command-registry.ts +2 -6
- package/cli/commands/auth.ts +68 -3
- package/cli/commands/compat.ts +1116 -0
- package/cli/commands/control.ts +90 -13
- package/cli/commands/coverage.ts +85 -116
- package/cli/commands/detox.ts +20 -20
- package/cli/commands/device.ts +31 -27
- package/cli/commands/doctor.ts +76 -1032
- package/cli/commands/flow.ts +80 -41
- package/cli/commands/guest-host.ts +2 -2
- package/cli/commands/inspect/core.ts +8 -7
- package/cli/commands/inspect/settling.ts +60 -25
- package/cli/commands/inspect/wait-ready.ts +6 -4
- package/cli/commands/inspect/wait-selector.ts +32 -18
- package/cli/commands/inspect.ts +8 -6
- package/cli/commands/kotlin.ts +15 -6
- package/cli/commands/logout.ts +4 -2
- package/cli/commands/maestro-compare.ts +19 -37
- package/cli/commands/maestro-generate.ts +4 -4
- package/cli/commands/maestro.ts +56 -37
- package/cli/commands/package.ts +136 -57
- package/cli/commands/preview.ts +10 -1
- package/cli/commands/{film.ts → record-three.ts} +33 -28
- package/cli/commands/record.ts +41 -39
- package/cli/commands/screenshots.ts +4 -0
- package/cli/commands/setup.ts +38 -1
- package/cli/commands/shell-url.ts +49 -24
- package/cli/commands/swift.ts +29 -11
- package/cli/commands/test.ts +43 -13
- package/cli/commands/upload.ts +12 -9
- package/cli/drivers/playwright-core-pin.ts +2 -2
- package/cli/flow-export.ts +1 -1
- package/cli/flow-file.ts +1 -1
- package/cli/internal-child.ts +3 -8
- package/cli/maestro-compare.ts +73 -7
- package/cli/maestro-js.ts +1 -1
- package/cli/maestro-report.ts +1 -1
- package/cli/maestro-workspace.ts +66 -4
- package/cli/main.ts +22 -55
- package/cli/native-input.ts +13 -20
- package/cli/outbound-endpoints.ts +40 -7
- package/cli/output-redaction.ts +8 -3
- package/cli/packaged-app-launcher.ts +40 -28
- package/cli/prompt.ts +20 -0
- package/cli/recording-access.ts +7 -7
- package/cli/run-registry.ts +1 -1
- package/cli/scene-video.ts +0 -4
- package/cli/ws-bridge.ts +7 -4
- package/detox/index.ts +293 -50
- package/detox/jest-preset.cjs +6 -0
- package/detox/launch-permissions.ts +1 -21
- 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 +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -8
- package/dist-lib/bridge-contract.mjs +2 -7
- package/dist-lib/bundle-channel.cjs +45273 -38265
- package/dist-lib/capture-contract.cjs +37 -14
- package/dist-lib/capture-contract.mjs +36 -13
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +2 -2
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +562 -126
- package/dist-lib/detox/jest-preset.cjs +6 -0
- package/dist-lib/dev-bundle-resolution.cjs +18 -13
- package/dist-lib/expo-swift-bundle.cjs +28566 -23874
- package/dist-lib/expo-swift-metadata.cjs +104 -2
- package/dist-lib/expo-swift-metadata.mjs +104 -2
- package/dist-lib/home-paths.cjs +8 -5
- package/dist-lib/host/bridge-host.cjs +36618 -29846
- package/dist-lib/host/fetch-proxy-handler.cjs +23 -20
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +5 -2
- package/dist-lib/index.cjs +1921 -1549
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +21 -7
- package/dist-lib/menu.mjs +21 -7
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1877 -1584
- package/dist-lib/native-app-identity-project.cjs +1274 -951
- package/dist-lib/native-app-identity-project.mjs +1414 -963
- package/dist-lib/native-app-identity.cjs +64 -58
- package/dist-lib/native-app-identity.mjs +64 -58
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -33
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +484 -280
- package/dist-lib/react-native-host-modules.cjs +3 -1
- package/dist-lib/react-native-host-modules.mjs +3 -1
- package/dist-lib/reap-browser.cjs +23 -26
- package/dist-lib/scripts/dev-server-scanner.cjs +13 -10
- package/dist-lib/sdk.cjs +69 -36
- package/dist-lib/sdk.mjs +69 -36
- package/dist-lib/skills.cjs +33781 -27141
- package/dist-lib/swift-compile.cjs +3759 -2520
- package/dist-lib/swift-compile.mjs +3680 -2441
- package/dist-lib/swift-package.cjs +33 -1
- package/dist-lib/swift-package.mjs +31 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +102 -5
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +16480 -14579
- package/dist-lib/vite.cjs +269 -295
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/secure-item-store.d.ts +38 -0
- package/dist-types/packages/peach-compat/src/stubs/ring-mode-state.d.ts +4 -0
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +21 -12
- package/dist-types/packages/peach-engine/src/billing/plans.d.ts +1 -2
- package/dist-types/packages/peach-engine/src/capture/browser-composite-provider.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/capture/browser-composite.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/animated-driven-style.d.ts +10 -10
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +6 -2
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/lottie-runtime.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/native-animation-driver.d.ts +18 -1
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +71 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +31 -3
- package/dist-types/packages/peach-engine/src/engine/paint-boundary-types.d.ts +0 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +7 -2
- package/dist-types/packages/peach-engine/src/engine/portals.d.ts +2 -4
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +7 -1
- package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-velocity.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/engine/secureItemHostContract.d.ts +30 -0
- package/dist-types/packages/peach-engine/src/engine/shell-owned-values.d.ts +55 -0
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +85 -26
- package/dist-types/packages/peach-engine/src/graphite-stats-fields.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/ios/aux-home-scene.d.ts +3 -4
- package/dist-types/packages/peach-engine/src/ios/aux-shell-animated-sources.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/ios/home-app-catalog.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/ios/photo-store.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/ios/photoLibraryContract.d.ts +15 -0
- package/dist-types/packages/peach-engine/src/ios/shell-controller-types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/metro-asset-path.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-worker-init.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +31 -12
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-presentation.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/render-worker/expo-widgetContract.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/expo-widgets-activityContract.d.ts +15 -0
- package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +12 -2
- package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +30 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -9
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror-tenant.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +8 -4
- package/dist-types/packages/peach-engine/src/render-worker/shell-scene-schema.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/render-worker/text-inputContract.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +10 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-sab.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +4 -0
- package/dist-types/packages/peach-globals/src/eventBridgeContract.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +7 -0
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -1
- package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +5 -1
- package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +3 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +23 -1
- package/dist-types/packages/peach-kit/src/internal.d.ts +2 -1
- package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +2 -0
- package/dist-types/packages/peach-kit/src/ui/keyboard-toolbar.d.ts +5 -0
- package/install.sh +20 -1
- package/package.json +6 -5
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h +629 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionDeprecated.h +90 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionRoute.h +256 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h +1006 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVFAudio.apinotes +246 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVFAudio.h +5 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAnimation.h +52 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioSession.h +11 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h +264 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h +88 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSession.h +1360 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSessionPreset.h +167 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h +13 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMediaFormat.h +508 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataItem.h +1 -1
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h +31 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVSampleBufferDisplayLayer.h +18 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureDeviceDirectionCoordinator.h +113 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEvent.h +82 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEventInteraction.h +114 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEventSound.h +50 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVError.h +51 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVInputPickerInteraction.h +93 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h +39 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes +112 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h +110 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h +79 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKitTypes.h +54 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVLegibleMediaOptionsMenuController.h +193 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController.h +271 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController_AVSampleBufferDisplayLayerSupport.h +135 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController_VideoCallSupport.h +66 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackRouteSelecting.h +46 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h +71 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackUserInterfaceControllable.h +551 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h +42 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h +704 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h +186 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/AudioSessionTypes.h +104 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h +1621 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes +42 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAttribute.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCharacteristic.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDescriptor.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBService.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreRequest.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFRunLoop.h +195 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h +220 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h +501 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +3 -18
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMBase.h +443 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h +8 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h +996 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMTime.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h +3 -0
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFMessage.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFPayload.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFReaderSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCReaderSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularData.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h +1811 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontCollection.h +360 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h +574 -17
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManagerErrors.h +109 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFrame.h +336 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h +203 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTGlyphInfo.h +264 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h +531 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTParagraphStyle.h +496 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRubyAnnotation.h +326 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRun.h +547 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h +496 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTTextTab.h +158 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h +286 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +80 -1
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h +1833 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/SFNTTypes.h +482 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DDDevicePickerViewController.h +41 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DeviceDiscoveryUI.h +9 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DeviceDiscoveryUIDefines.h +14 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Modules/DeviceDiscoveryUI.swiftcrossimport/SwiftUI.swiftoverlay +4 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +49 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h +2 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSRegularExpression.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSUbiquitousKeyValueStore.h +30 -0
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievement.h +3 -3
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKBasePlayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallenge.h +6 -6
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h +4 -4
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLocalPlayer.h +6 -6
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmaker.h +2 -2
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKNotificationBanner.h +1 -1
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPlayer.h +3 -3
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGame.h +2 -2
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatch.h +4 -4
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatchmakerViewController.h +3 -3
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalType.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h +6 -6
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h +5 -5
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h +14 -14
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h +20 -20
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +1 -1
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageMetadata.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/ImageIOBase.h +6 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSBase.h +195 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContext.h +245 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContextRef.h +178 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSExport.h +151 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSManagedValue.h +81 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSObjectRef.h +755 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSStringRef.h +148 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSStringRefCF.h +60 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSTypedArray.h +180 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSValue.h +824 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSValueRef.h +555 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSVirtualMachine.h +92 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JavaScript.h +37 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JavaScriptCore.h +38 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/WebKitAvailability.h +36 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Modules/module.modulemap +8 -0
- package/sdk/ios/System/Library/Frameworks/MobileCoreServices.framework/Headers/UTType.h +19 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCAdvertiserAssistant.h +76 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCBrowserViewController.h +88 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCError.h +34 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCNearbyServiceAdvertiser.h +84 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCNearbyServiceBrowser.h +94 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCPeerID.h +37 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCSession.h +215 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MultipeerConnectivity.apinotes +5 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MultipeerConnectivity.h +15 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotHelper.h +1 -1
- package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h +6 -6
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +2 -2
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h +2 -2
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h +4 -4
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +2 -2
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitDeprecated.h +3 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSLayoutManager.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +172 -27
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSText.h +59 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextContainer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextList.h +63 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextStorage.h +10 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSToolbar+UIKitAdditions.h +142 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +20 -20
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAction.h +103 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UICommand.h +131 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +8 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFont.h +80 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFontDescriptor.h +191 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGeometry.h +259 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +9 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +5 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +6 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInteraction.h +37 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +4248 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +66 -102
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h +55 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UILayoutGuide.h +62 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenu.h +283 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuDisplayPreferences.h +27 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuElement.h +86 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuLeaf.h +68 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +3 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +2 -0
- package/sdk/ios/System/Library/Frameworks/UIKitText.framework/Headers/UIKitText.apinotes +135 -0
- package/sdk/ios/System/Library/Frameworks/UIKitText.framework/Modules/module.modulemap +8 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTAdditions.h +167 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTCoreTypes.h +1332 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes +53 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.h +18 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNError.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotification.h +27 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAction.h +69 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationActionIcon.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttachment.h +44 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttributedMessageContext.h +24 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationCategory.h +82 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h +152 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationRequest.h +34 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationResponse.h +41 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationServiceExtension.h +27 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSettings.h +90 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSound.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationTrigger.h +64 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h +107 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes +17 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCDefines.h +14 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSession.h +200 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSessionFile.h +30 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSessionUserInfoTransfer.h +22 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WatchConnectivity.apinotes +19 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WatchConnectivity.h +15 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h +120 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardList.h +77 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardListItem.h +54 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleList.h +37 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleListStore.h +47 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorld.h +87 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorldConfiguration.h +71 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContextMenuElementInfo.h +47 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDOMNodeSnapshot.h +57 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDataDetectorTypes.h +60 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h +67 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h +146 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKError.h +71 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindConfiguration.h +52 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindResult.h +41 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFormInfo.h +63 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFoundation.h +72 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h +62 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKHTTPCookieStore.h +108 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKImmersiveEnvironment.h +50 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKImmersiveEnvironmentDelegate.h +69 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKJSHandle.h +80 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigation.h +45 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h +118 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationDelegate.h +219 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationResponse.h +60 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h +47 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPDFConfiguration.h +49 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h +117 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewActionItem.h +39 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewActionItemIdentifiers.h +38 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewElementInfo.h +43 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKProcessPool.h +39 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessage.h +64 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessageHandler.h +52 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessageHandlerWithReply.h +95 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSecurityOrigin.h +57 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSnapshotConfiguration.h +59 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h +316 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKURLSchemeHandler.h +61 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKURLSchemeTask.h +75 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserContentController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h +76 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h +237 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h +164 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h +106 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h +790 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h +255 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h +89 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h +207 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h +90 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h +43 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h +175 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h +99 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h +95 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h +396 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h +94 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h +170 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h +87 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h +800 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h +275 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h +150 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataRecord.h +90 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h +137 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWindowFeatures.h +72 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes +204 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h +93 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h +3 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/WiFiAware.framework/Modules/WiFiAware.swiftmodule/arm64-apple-ios-simulator.swiftinterface +605 -0
- package/sdk/ios/System/Library/Frameworks/_DeviceDiscoveryUI_SwiftUI.framework/Modules/_DeviceDiscoveryUI_SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +79 -0
- package/sdk/ios/usr/include/MacTypes.h +8 -0
- package/sdk/ios/usr/include/objc/NSObjCRuntime.h +5 -0
- package/sdk/ios/wasm/include/fcntl.h +1 -0
- package/sdk/ios/wasm/include/pthread.h +2 -0
- package/sdk/ios/wasm/include/stdlib.h +1 -0
- package/sdk/native-hashes.json +11 -1
- package/skills/contrast/SKILL.md +4 -9
- package/skills/peach-perf/SKILL.md +3 -1
- package/skills/peach-perf/references/profiling.md +1 -1
- package/skills/peach-test/SKILL.md +20 -17
- package/skills/peach-test/references/detox.md +7 -7
- package/skills/peach-test/references/maestro.md +20 -18
- package/src/admitted-mac-build.ts +7 -0
- package/src/android-autolinking.ts +2 -2
- package/src/android-drawables.ts +5 -5
- package/src/android-string-value.ts +1 -1
- package/src/android-strings.ts +1 -1
- package/src/android-theme.ts +2 -2
- package/src/appPackageContract.ts +1 -1
- package/src/bridge-contract.ts +12 -16
- package/src/build-cache.ts +65 -0
- package/src/bundle-channel.mjs +69 -9
- package/src/capture-contract.ts +55 -17
- package/src/chromium-admission.ts +24 -21
- package/src/conformance-comparison-contract.ts +105 -40
- package/src/dev-bundle-resolution.ts +23 -10
- package/src/device-catalog.ts +35 -2
- package/src/disk-cleanup.ts +18 -8
- package/src/expo-autolinking.ts +24 -0
- package/src/expo-discovery-cache.ts +168 -23
- package/src/expo-native-workspace.ts +551 -191
- package/src/expo-swift-host.ts +711 -314
- package/src/expo-swift-ready.ts +39 -5
- package/src/expo-widget-assets.ts +2 -2
- package/src/expo-widgets-bundle.ts +56 -0
- package/src/expo-workspace-exclusion.ts +62 -0
- package/src/expoSwiftContract.ts +27 -4
- package/src/forked-script-contract.ts +3 -0
- package/src/home-paths.ts +10 -6
- package/src/host/bridge-host.ts +27 -0
- package/src/host/network-policy.ts +1 -1
- package/src/kotlin-app.ts +9 -11
- package/src/kotlin-host.ts +2 -2
- package/src/launchMetadataContract.ts +5 -0
- package/src/menu.ts +19 -5
- package/src/native-app-identity-project.ts +35 -49
- package/src/native-app-identity.ts +5 -6
- package/src/native-firebase-config.ts +10 -48
- package/src/native-prebuilt.ts +3 -2
- package/src/native-slices.ts +39 -0
- package/src/native-static-libraries.ts +73 -0
- package/src/nitro-adapter.lock.json +249 -249
- package/src/nitro-adapter.ts +16 -5
- package/src/nitro-bundle.ts +35 -16
- package/src/nitro-compile.ts +254 -16
- package/src/nitro-compiler-digest.ts +39 -0
- package/src/nitro-dependencies.ts +368 -28
- package/src/nitro-source.ts +432 -77
- package/src/nitro-superset.lock.json +27 -36
- package/src/nitro-superset.ts +6 -0
- package/src/nitroAdapterContract.ts +52 -0
- package/src/nitroContract.ts +40 -4
- package/src/numbered-lock.ts +2 -2
- package/src/one-native-app-accent.ts +32 -0
- package/src/one-widget-discovery.ts +6 -1
- package/src/one-widget-metadata.ts +2 -2
- package/src/portable-expo-contract.ts +103 -0
- package/src/portable-expo-workspace.ts +94 -0
- package/src/prepared-native-inventory.ts +93 -0
- package/src/prepared-xcode-phases.ts +194 -0
- package/src/process-group.ts +8 -15
- package/src/process-table.ts +117 -0
- package/src/react-native-bridge-modules.ts +240 -14
- package/src/react-native-coverage/native-typescript-parser.ts +11 -2
- package/src/react-native-coverage/verified-reach.ts +12 -6
- package/src/react-native-host-modules.ts +2 -0
- package/src/reap-browser.ts +13 -9
- package/src/retired-cache-directory.ts +34 -0
- package/src/runtime-assets.ts +1 -0
- package/src/screenshots/orchestrate.ts +4 -0
- package/src/screenshots/schema.ts +2 -2
- package/src/storageSnapshotContract.ts +9 -2
- package/src/stub-pattern-matcher.ts +53 -19
- package/src/swift-compile.ts +1011 -327
- package/src/swift-compiler-digest.ts +3 -0
- package/src/swift-coverage/indexing.ts +1 -1
- package/src/swift-coverage/xcode-asset-symbols.ts +72 -39
- package/src/swift-coverage/xcode-assets.ts +2 -1
- package/src/swift-cxx-declarations.ts +114 -130
- package/src/swift-cxx-standin.ts +3 -3
- package/src/swift-darwin-records.ts +88 -0
- package/src/swift-distribution.lock.json +15 -12
- package/src/swift-distribution.ts +25 -9
- package/src/swift-host.ts +443 -142
- package/src/swift-icu.ts +72 -4
- package/src/swift-link-roots.ts +2 -0
- package/src/swift-objc-compile.ts +312 -65
- package/src/swift-objc-import.ts +8 -1
- package/src/swift-objc-standin.ts +20 -2
- package/src/swift-package-manifest.ts +189 -57
- package/src/swift-package.ts +51 -0
- package/src/swift-packages.ts +117 -45
- package/src/swift-pdf-raster.ts +7 -4
- package/src/swift-project-user.ts +183 -0
- package/src/swift-reproducible.ts +26 -0
- package/src/swift-root-lock.ts +34 -62
- package/src/swift-shared-sdk.ts +232 -21
- package/src/swift-source-pods.ts +9 -2
- package/src/swift-standin-emit.ts +248 -7
- package/src/swift-standins.ts +130 -108
- package/src/swift-submit.ts +3 -0
- package/src/swift-toolchain.ts +109 -8
- package/src/swift-wasm-prune.ts +210 -55
- package/src/swiftContract.ts +14 -0
- package/src/swiftGuestImageContract.ts +113 -0
- package/src/turbo-bundle.ts +5 -8
- package/src/turbo-codegen-intake.ts +134 -0
- package/src/turbo-compile.ts +198 -21
- package/src/turbo-native-libraries.ts +98 -0
- package/src/turbo-runtime.lock.json +25 -18
- package/src/turbo-source.ts +1519 -147
- package/src/vite-plugin-one.ts +25 -3
- package/src/vite-plugin-swift.ts +5 -1
- package/src/vite-plugin.ts +40 -18
- package/src/worker-system-chunks.ts +103 -15
- package/src/worklets-babel.ts +50 -29
- package/src/xcode-header-search.ts +15 -5
- package/src/xcode-project.ts +444 -88
- package/src/xcode-target-members.ts +72 -63
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-resample.d.ts +0 -44
package/src/expo-swift-host.ts
CHANGED
|
@@ -9,10 +9,12 @@ import os from 'node:os'
|
|
|
9
9
|
import path from 'node:path'
|
|
10
10
|
import { fileURLToPath } from 'node:url'
|
|
11
11
|
import { promisify } from 'node:util'
|
|
12
|
+
import { PEACH_ANSWERED_NATIVE_PACKAGE_NAMES } from '../../peach-compat/src/generated/supported-native-packages'
|
|
13
|
+
import { EXPO_EAGER_NATIVE_VIEWS } from '../../peach-compat/src/stubs/native-seams/expo-eager-seam-contract'
|
|
12
14
|
import { loadRNXAppConfig } from '../cli/app-config'
|
|
13
15
|
import { resolveAppProject } from '../cli/app-project'
|
|
14
|
-
import { RNX_FORKED_SCRIPT_ENV } from '../cli/internal-child'
|
|
15
16
|
import { isLoopbackHost } from './backend-origin'
|
|
17
|
+
import { autolinkerAppleFlags } from './expo-autolinking'
|
|
16
18
|
import {
|
|
17
19
|
expoDiscoveryKey,
|
|
18
20
|
readExpoDiscovery,
|
|
@@ -20,6 +22,7 @@ import {
|
|
|
20
22
|
} from './expo-discovery-cache'
|
|
21
23
|
import { prepareExpoNativeWorkspace } from './expo-native-workspace'
|
|
22
24
|
import { COMPILED_EXPO_NATIVE_PACKAGES } from './expoSwiftContract'
|
|
25
|
+
import { PEACH_FORKED_SCRIPT_ENV } from './forked-script-contract'
|
|
23
26
|
import { cacheDir, swiftCacheDir } from './home-paths'
|
|
24
27
|
import { isRecord } from './is-record'
|
|
25
28
|
import { readExpoConfigAsync } from './native-firebase-config'
|
|
@@ -28,18 +31,24 @@ import {
|
|
|
28
31
|
NATIVE_PREPARE_QUERY_PARAM,
|
|
29
32
|
NATIVE_PREPARED_QUERY_PARAM,
|
|
30
33
|
} from './nativePreparationContract'
|
|
31
|
-
import {
|
|
34
|
+
import { preparedXcodeInterfaces } from './prepared-xcode-phases'
|
|
35
|
+
import {
|
|
36
|
+
BRIDGE_MODULE_FILE_PREFIX,
|
|
37
|
+
collectBridgeModuleSources,
|
|
38
|
+
} from './react-native-bridge-modules'
|
|
32
39
|
import { swiftBinaryModules } from './swift-binary-modules'
|
|
33
40
|
import {
|
|
34
41
|
swiftAvailableModules,
|
|
35
42
|
swiftCodeMask,
|
|
36
43
|
swiftImportNames,
|
|
37
44
|
swiftPeachModules,
|
|
45
|
+
swiftModuleInterface,
|
|
38
46
|
swiftSourceClosure,
|
|
39
47
|
swiftTargetDependencies,
|
|
40
48
|
syncSwiftTree,
|
|
49
|
+
withoutSwiftDeclarations,
|
|
41
50
|
} from './swift-compile'
|
|
42
|
-
import { resolveSwiftModule } from './swift-distribution'
|
|
51
|
+
import { ensureSwiftToolchain, resolveSwiftModule } from './swift-distribution'
|
|
43
52
|
import {
|
|
44
53
|
artifactFor,
|
|
45
54
|
disposeSwiftProject,
|
|
@@ -49,24 +58,32 @@ import {
|
|
|
49
58
|
projectFor,
|
|
50
59
|
serveSwiftPackageAsset,
|
|
51
60
|
sourceContentStamp,
|
|
61
|
+
swiftProjectAppInfo,
|
|
52
62
|
standinLibraries,
|
|
53
63
|
SwiftMissingModulesError,
|
|
64
|
+
prepareXcodeSwiftPackages,
|
|
54
65
|
} from './swift-host'
|
|
55
66
|
import { iosDeploymentMinimum } from './swift-objc-standin'
|
|
56
|
-
import {
|
|
67
|
+
import {
|
|
68
|
+
isSwiftNativeTranslationUnit,
|
|
69
|
+
moduleMapName,
|
|
70
|
+
swiftManifestTargets,
|
|
71
|
+
swiftManifestSettings,
|
|
72
|
+
swiftNativeSupportFiles,
|
|
73
|
+
} from './swift-package'
|
|
57
74
|
import {
|
|
58
75
|
standinGenerationInputs,
|
|
59
76
|
swiftStandins,
|
|
60
77
|
SWIFT_STANDINS_DIR,
|
|
61
78
|
} from './swift-standins'
|
|
62
79
|
import { MAX_SWIFT_COMPILE_FILES, MAX_SWIFT_COMPILE_SOURCE_BYTES } from './swift-submit'
|
|
63
|
-
import { sourceSwiftCheckout } from './swift-toolchain'
|
|
64
80
|
import type { PeachConfig } from './config'
|
|
65
81
|
import type {
|
|
66
82
|
ExpoSwiftSourceUnit,
|
|
67
83
|
ExpoSwiftCompilationResult,
|
|
68
84
|
ExpoSwiftPreparationOptions,
|
|
69
85
|
} from './expoSwiftContract'
|
|
86
|
+
import type { NativeAppIdentity } from './native-app-identity'
|
|
70
87
|
import type { SwiftPackageBinary } from './swift-packages'
|
|
71
88
|
import type { SwiftStandin } from './swift-standins'
|
|
72
89
|
import type { SwiftNativeTarget } from './swiftContract'
|
|
@@ -75,7 +92,7 @@ import type { IncomingMessage, ServerResponse } from 'node:http'
|
|
|
75
92
|
const run = promisify(execFile)
|
|
76
93
|
// the compiled CLI's execPath is peach itself, which runs a forked `.js` as a
|
|
77
94
|
// script only with this set; node and bun ignore it.
|
|
78
|
-
const scriptEnv = { ...process.env, [
|
|
95
|
+
const scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: '1' }
|
|
79
96
|
export const EXPO_SWIFT_ROUTE = '/__peach/expo-swift'
|
|
80
97
|
export const EXPO_SWIFT_ENTRY = 'Sources/PeachExpoApp/PeachExpoEntry.swift'
|
|
81
98
|
|
|
@@ -88,6 +105,7 @@ const WITNESS_BATCH = 200
|
|
|
88
105
|
const traceStore = new AsyncLocalStorage<Witness>()
|
|
89
106
|
const discoveryCache = new Map<string, DiscoveryEntry>()
|
|
90
107
|
const preparedCache = new Map<string, PreparedEntry>()
|
|
108
|
+
const answeredPackages: ReadonlySet<string> = new Set(PEACH_ANSWERED_NATIVE_PACKAGE_NAMES)
|
|
91
109
|
|
|
92
110
|
type MissingMark = { missing: true }
|
|
93
111
|
type PresentMark = {
|
|
@@ -156,7 +174,11 @@ function tracedPath(value: unknown): string | null {
|
|
|
156
174
|
}
|
|
157
175
|
|
|
158
176
|
function ignoredInput(file: string): boolean {
|
|
159
|
-
if (
|
|
177
|
+
if (
|
|
178
|
+
file.includes(`${path.sep}peach-expo-swift${path.sep}`) ||
|
|
179
|
+
file.endsWith(`${path.sep}peach-expo-swift`)
|
|
180
|
+
)
|
|
181
|
+
return true
|
|
160
182
|
return ignoredRoots.some(
|
|
161
183
|
(root) => file === root || file.startsWith(`${root}${path.sep}`),
|
|
162
184
|
)
|
|
@@ -233,8 +255,7 @@ function noteChangedSince(file: string, startMs: number): void {
|
|
|
233
255
|
|
|
234
256
|
function noteRead(target: unknown): void {
|
|
235
257
|
const file = tracedPath(target)
|
|
236
|
-
if (
|
|
237
|
-
notePresent(file)
|
|
258
|
+
if (file) notePresent(file)
|
|
238
259
|
}
|
|
239
260
|
|
|
240
261
|
function listsRecursively(options: unknown): boolean {
|
|
@@ -280,6 +301,7 @@ function installSwiftInputTrace(): void {
|
|
|
280
301
|
path.join(cacheDir(), 'swift-builds'),
|
|
281
302
|
path.join(swiftCacheDir(), 'swift-builds'),
|
|
282
303
|
path.join(cacheDir(), 'swift-root-locks'),
|
|
304
|
+
path.join(cacheDir(), 'swift-tmp'),
|
|
283
305
|
].filter((prefix, index, all) => all.indexOf(prefix) === index)
|
|
284
306
|
ignoredRoots = prefixes.flatMap((root) => {
|
|
285
307
|
try {
|
|
@@ -382,20 +404,19 @@ async function witnessMatches(witness: Witness): Promise<boolean> {
|
|
|
382
404
|
return true
|
|
383
405
|
}
|
|
384
406
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
fs.existsSync(path.join(sourceSwiftCheckout(), 'toolchain.json')),
|
|
389
|
-
)
|
|
390
|
-
}
|
|
391
|
-
|
|
407
|
+
// the evaluated Expo config is a key input: a child process evaluates it from
|
|
408
|
+
// app config, plugins and env files the witness cannot see, and its result file
|
|
409
|
+
// is new on every run, so it is read untraced and compared here instead.
|
|
392
410
|
async function discoveryKey(
|
|
393
411
|
root: string,
|
|
394
412
|
installedWorkspace: string | undefined,
|
|
395
413
|
prepareNative: boolean,
|
|
396
414
|
): Promise<string> {
|
|
397
|
-
const config = await
|
|
398
|
-
|
|
415
|
+
const [config, expoConfig] = await Promise.all([
|
|
416
|
+
loadRNXAppConfig(resolveAppProject(root)),
|
|
417
|
+
readExpoConfigAsync(root),
|
|
418
|
+
])
|
|
419
|
+
return `${fs.realpathSync(root)}\0${installedWorkspace ?? ''}\0${prepareNative ? '1' : '0'}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`
|
|
399
420
|
}
|
|
400
421
|
|
|
401
422
|
function cloneNativeTarget(target: SwiftNativeTarget): SwiftNativeTarget {
|
|
@@ -519,6 +540,11 @@ function cloneUnits(units: ExpoSwiftSourceUnit[] | null): ExpoSwiftSourceUnit[]
|
|
|
519
540
|
frameworks: unit.frameworks.slice(),
|
|
520
541
|
files: { ...unit.files },
|
|
521
542
|
...(unit.nativeFiles ? { nativeFiles: { ...unit.nativeFiles } } : {}),
|
|
543
|
+
...(unit.headerAliases ? { headerAliases: { ...unit.headerAliases } } : {}),
|
|
544
|
+
...(unit.resources ? { resources: { ...unit.resources } } : {}),
|
|
545
|
+
...(unit.resourceBundles
|
|
546
|
+
? { resourceBundles: unit.resourceBundles.map((bundle) => ({ ...bundle })) }
|
|
547
|
+
: {}),
|
|
522
548
|
...(unit.nativeTargets
|
|
523
549
|
? { nativeTargets: unit.nativeTargets.map(cloneNativeTarget) }
|
|
524
550
|
: {}),
|
|
@@ -527,6 +553,7 @@ function cloneUnits(units: ExpoSwiftSourceUnit[] | null): ExpoSwiftSourceUnit[]
|
|
|
527
553
|
|
|
528
554
|
function cloneResult(result: ExpoSwiftCompilationResult): ExpoSwiftCompilationResult {
|
|
529
555
|
return {
|
|
556
|
+
...(result.nativeAppIdentity ? { nativeAppIdentity: result.nativeAppIdentity } : {}),
|
|
530
557
|
namespaces: result.namespaces.slice(),
|
|
531
558
|
...(result.bridgeModules ? { bridgeModules: result.bridgeModules.slice() } : {}),
|
|
532
559
|
modules: result.modules.map((module) => ({
|
|
@@ -553,29 +580,6 @@ function retarget(cached: PreparedEntry, base: string): ExpoSwiftCompilationResu
|
|
|
553
580
|
return result
|
|
554
581
|
}
|
|
555
582
|
|
|
556
|
-
// the autolinker's command line changed across Expo releases: before 1.8.0 it
|
|
557
|
-
// takes the project from its working directory, before 1.10.3 the Apple
|
|
558
|
-
// platform is named `ios`.
|
|
559
|
-
function autolinkerAppleFlags(autolinkerManifest: string, appRoot: string) {
|
|
560
|
-
const manifest: unknown = JSON.parse(fs.readFileSync(autolinkerManifest, 'utf8'))
|
|
561
|
-
const version =
|
|
562
|
-
manifest && typeof manifest === 'object' && Reflect.get(manifest, 'version')
|
|
563
|
-
const parts =
|
|
564
|
-
typeof version === 'string'
|
|
565
|
-
? version.split('.').map((part) => Number.parseInt(part, 10))
|
|
566
|
-
: []
|
|
567
|
-
const [major, minor, patch] = parts
|
|
568
|
-
if (!Number.isInteger(major) || !Number.isInteger(minor) || !Number.isInteger(patch))
|
|
569
|
-
throw new Error(
|
|
570
|
-
`unreadable expo-modules-autolinking version in ${autolinkerManifest}`,
|
|
571
|
-
)
|
|
572
|
-
const atLeast = (m: number, n: number, p: number) =>
|
|
573
|
-
major !== m ? major > m : minor !== n ? minor > n : patch >= p
|
|
574
|
-
if (atLeast(1, 10, 3)) return ['--platform', 'apple', '--project-root', appRoot]
|
|
575
|
-
if (atLeast(1, 8, 0)) return ['--platform', 'ios', '--project-root', appRoot]
|
|
576
|
-
return ['--platform', 'ios']
|
|
577
|
-
}
|
|
578
|
-
|
|
579
583
|
// only omit a class when its module and every declared view have app-owned
|
|
580
584
|
// answers. an unresolved definition stays native, including partial overrides.
|
|
581
585
|
function configuredExpoSwiftModule(
|
|
@@ -584,7 +588,6 @@ function configuredExpoSwiftModule(
|
|
|
584
588
|
registrationName: string | null,
|
|
585
589
|
config: PeachConfig | undefined,
|
|
586
590
|
): boolean {
|
|
587
|
-
if (!config) return false
|
|
588
591
|
for (const source of Object.values(files)) {
|
|
589
592
|
const code = swiftCodeMask(source)
|
|
590
593
|
const declaration = new RegExp(`\\bclass\\s+${className}\\b[^{}]*\\{`).exec(code)
|
|
@@ -604,20 +607,256 @@ function configuredExpoSwiftModule(
|
|
|
604
607
|
)
|
|
605
608
|
if (names.length > 1) return false
|
|
606
609
|
const name = registrationName ?? names[0]?.[1]
|
|
607
|
-
if (!name
|
|
610
|
+
if (!name) return false
|
|
611
|
+
const builtInView =
|
|
612
|
+
config?.nativeModules?.[name] === false
|
|
613
|
+
? undefined
|
|
614
|
+
: EXPO_EAGER_NATIVE_VIEWS.get(name)
|
|
615
|
+
if (!config?.nativeModules?.[name] && !builtInView) return false
|
|
608
616
|
const views = [
|
|
609
617
|
...mask.matchAll(/\bView\s*\(\s*([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)\.self\s*\)/g),
|
|
610
618
|
]
|
|
611
619
|
if ([...mask.matchAll(/\bView\s*\(/g)].length !== views.length) return false
|
|
612
620
|
return views.every(
|
|
613
621
|
(view) =>
|
|
614
|
-
Boolean(config
|
|
615
|
-
|
|
622
|
+
Boolean(config?.nativeViews?.[`${name}_${view[1]!.split('.').pop()!}`]) ||
|
|
623
|
+
builtInView === `${name}_${view[1]!.split('.').pop()!}` ||
|
|
624
|
+
(views.length === 1 && Boolean(config?.nativeViews?.[name])),
|
|
616
625
|
)
|
|
617
626
|
}
|
|
618
627
|
return false
|
|
619
628
|
}
|
|
620
629
|
|
|
630
|
+
function enrichInstalledUnits(
|
|
631
|
+
units: ExpoSwiftSourceUnit[],
|
|
632
|
+
installed: Awaited<ReturnType<typeof installedWorkspaceInput>>,
|
|
633
|
+
namespaceGroups: Map<string, string[]>,
|
|
634
|
+
provided: ReadonlySet<string>,
|
|
635
|
+
moduleRoot: string,
|
|
636
|
+
bridgeNamespaces: ReadonlySet<string> = new Set(),
|
|
637
|
+
interfaceRoot?: string,
|
|
638
|
+
): void {
|
|
639
|
+
const { input, binaryFrameworks } = installed
|
|
640
|
+
const installedTargets = swiftManifestTargets(input.files['Package.swift'] ?? '')
|
|
641
|
+
const targetByName = new Map(installedTargets.map((target) => [target.name, target]))
|
|
642
|
+
const importedTargets = swiftTargetDependencies(input.files, installedTargets)
|
|
643
|
+
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length)
|
|
644
|
+
const map = (file: string) => {
|
|
645
|
+
const target = byPath.find((target) => file.startsWith(`${target.path}/`))
|
|
646
|
+
return target
|
|
647
|
+
? `Sources/${target.name}/${file.slice(target.path.length + 1).replace(/^(?:.*\/)?node_modules\//, '')}`
|
|
648
|
+
: file
|
|
649
|
+
}
|
|
650
|
+
const isDummyUnit = (file: string) =>
|
|
651
|
+
/(?:^|\/)Target Support Files\/[^/]+\/[^/]+-dummy\.m$/.test(file)
|
|
652
|
+
for (const unit of units) {
|
|
653
|
+
if (bridgeNamespaces.size > 0 && !bridgeNamespaces.has(unit.namespace)) continue
|
|
654
|
+
// native modules resolve the installed workspace resource products through Bundle.
|
|
655
|
+
unit.resources = input.resources
|
|
656
|
+
unit.resourceBundles = input.resourceBundles
|
|
657
|
+
unit.frameworks = [...new Set([...unit.frameworks, ...binaryFrameworks])]
|
|
658
|
+
const target = targetByName.get(unit.namespace)
|
|
659
|
+
if (!target) {
|
|
660
|
+
if (bridgeNamespaces.has(unit.namespace))
|
|
661
|
+
throw new Error(
|
|
662
|
+
`React Native pod target ${unit.namespace} is absent from the installed workspace`,
|
|
663
|
+
)
|
|
664
|
+
continue
|
|
665
|
+
}
|
|
666
|
+
const bridge = bridgeNamespaces.has(unit.namespace)
|
|
667
|
+
if (bridge)
|
|
668
|
+
for (const file of Object.keys(unit.files)) {
|
|
669
|
+
if (!path.posix.basename(file).startsWith(BRIDGE_MODULE_FILE_PREFIX))
|
|
670
|
+
delete unit.files[file]
|
|
671
|
+
}
|
|
672
|
+
unit.swiftLanguageMode = target.languageMode
|
|
673
|
+
const included = new Set<string>()
|
|
674
|
+
const visit = (name: string, root = false) => {
|
|
675
|
+
// dependencies already supplied by the runtime must not be built twice.
|
|
676
|
+
if (included.has(name) || (!root && provided.has(name))) return
|
|
677
|
+
const dependency = targetByName.get(name)
|
|
678
|
+
if (!dependency) return
|
|
679
|
+
included.add(name)
|
|
680
|
+
for (const name of importedTargets.get(dependency.name) ?? []) visit(name)
|
|
681
|
+
}
|
|
682
|
+
for (const name of namespaceGroups.get(unit.namespace) ?? [unit.namespace])
|
|
683
|
+
visit(name, true)
|
|
684
|
+
for (const [file, source] of Object.entries(input.files)) {
|
|
685
|
+
const owner = byPath.find((target) => file.startsWith(`${target.path}/`))
|
|
686
|
+
if (
|
|
687
|
+
owner &&
|
|
688
|
+
included.has(owner.name) &&
|
|
689
|
+
(file.endsWith('.swift') || isSwiftNativeTranslationUnit(file)) &&
|
|
690
|
+
!isDummyUnit(file) &&
|
|
691
|
+
!(bridge && /RCT_EXTERN_(?:REMAP_)?MODULE\s*\(/.test(source))
|
|
692
|
+
)
|
|
693
|
+
unit.files[map(file)] =
|
|
694
|
+
bridge && owner.name === unit.namespace && file.endsWith('.swift')
|
|
695
|
+
? `import Foundation\nimport UIKit\nimport React\n${source}`
|
|
696
|
+
: source
|
|
697
|
+
}
|
|
698
|
+
unit.nativeFiles = Object.fromEntries(
|
|
699
|
+
Object.entries(swiftNativeSupportFiles(input.files, installedTargets)).map(
|
|
700
|
+
([file, source]) => [map(file), source],
|
|
701
|
+
),
|
|
702
|
+
)
|
|
703
|
+
unit.headerAliases = Object.fromEntries(
|
|
704
|
+
Object.entries(input.headerAliases ?? {}).map(([alias, file]) => [
|
|
705
|
+
map(alias),
|
|
706
|
+
map(file),
|
|
707
|
+
]),
|
|
708
|
+
)
|
|
709
|
+
const podspecTargets = unit.nativeTargets ?? []
|
|
710
|
+
unit.nativeTargets = (input.nativeTargets ?? [])
|
|
711
|
+
.filter((native) => included.has(native.name))
|
|
712
|
+
.map((native) => ({
|
|
713
|
+
...native,
|
|
714
|
+
headers: native.headers.map(map),
|
|
715
|
+
publicHeaders: native.publicHeaders.map(map),
|
|
716
|
+
bridgingHeader: native.bridgingHeader ? map(native.bridgingHeader) : null,
|
|
717
|
+
prefixHeader: native.prefixHeader ? map(native.prefixHeader) : null,
|
|
718
|
+
fileFlags: Object.fromEntries(
|
|
719
|
+
Object.entries(native.fileFlags)
|
|
720
|
+
.filter(([file]) => !isDummyUnit(file))
|
|
721
|
+
.map(([file, flags]) => [map(file), flags]),
|
|
722
|
+
),
|
|
723
|
+
sourceDirectories: Object.fromEntries(
|
|
724
|
+
Object.entries(native.sourceDirectories)
|
|
725
|
+
.filter(([file]) => !isDummyUnit(file))
|
|
726
|
+
.map(([file, directory]) => [map(file), directory]),
|
|
727
|
+
),
|
|
728
|
+
}))
|
|
729
|
+
// the installed workspace lists only targets with clang inputs; the
|
|
730
|
+
// podspec's floor is the one CocoaPods builds the pod at.
|
|
731
|
+
for (const podspecTarget of podspecTargets) {
|
|
732
|
+
const installedTarget = unit.nativeTargets.find(
|
|
733
|
+
(native) => native.name === podspecTarget.name,
|
|
734
|
+
)
|
|
735
|
+
if (!installedTarget) unit.nativeTargets.push(podspecTarget)
|
|
736
|
+
else installedTarget.deploymentTarget ??= podspecTarget.deploymentTarget
|
|
737
|
+
}
|
|
738
|
+
unit.files['Package.swift'] = expoManifest(
|
|
739
|
+
unit.files,
|
|
740
|
+
'',
|
|
741
|
+
new Map(
|
|
742
|
+
installedTargets
|
|
743
|
+
.filter((target) => included.has(target.name))
|
|
744
|
+
.map((target) => [target.name, target]),
|
|
745
|
+
),
|
|
746
|
+
)
|
|
747
|
+
}
|
|
748
|
+
// the runtime already supplies these modules. their CocoaPods umbrella
|
|
749
|
+
// includes every public header, including headers unrelated to this target.
|
|
750
|
+
// keep the original headers, but build clang submodules for the headers
|
|
751
|
+
// actually reached by this target and their transitive includes.
|
|
752
|
+
const support: Record<string, string> = Object.assign(
|
|
753
|
+
{},
|
|
754
|
+
...units.map((unit) => unit.nativeFiles),
|
|
755
|
+
)
|
|
756
|
+
const aliases = new Map(
|
|
757
|
+
units.flatMap((unit) => Object.entries(unit.headerAliases ?? {})),
|
|
758
|
+
)
|
|
759
|
+
const maps = Object.entries(support).flatMap(([file, text]) => {
|
|
760
|
+
if (!file.endsWith('.modulemap')) return []
|
|
761
|
+
const name = moduleMapName(text)
|
|
762
|
+
return name && provided.has(name) && /\bumbrella\s+header\s+"[^"]+"/.test(text)
|
|
763
|
+
? [{ file, text, name, reached: new Set<string>() }]
|
|
764
|
+
: []
|
|
765
|
+
})
|
|
766
|
+
const pending: [string, string][] = [
|
|
767
|
+
...units.flatMap((unit) => Object.entries(unit.files)),
|
|
768
|
+
...units.flatMap((unit) =>
|
|
769
|
+
(unit.nativeTargets ?? []).flatMap((native) =>
|
|
770
|
+
[
|
|
771
|
+
...Object.keys(native.sourceDirectories),
|
|
772
|
+
...native.publicHeaders,
|
|
773
|
+
native.prefixHeader,
|
|
774
|
+
native.bridgingHeader,
|
|
775
|
+
].flatMap((file): [string, string][] =>
|
|
776
|
+
file && support[file] !== undefined ? [[file, support[file]!]] : [],
|
|
777
|
+
),
|
|
778
|
+
),
|
|
779
|
+
),
|
|
780
|
+
]
|
|
781
|
+
const visited = new Set<string>()
|
|
782
|
+
while (pending.length) {
|
|
783
|
+
const [file, source] = pending.pop()!
|
|
784
|
+
if (visited.has(file)) continue
|
|
785
|
+
visited.add(file)
|
|
786
|
+
for (const match of source.matchAll(/#\s*(?:import|include)\s*[<"]([^>"]+)[>"]/g)) {
|
|
787
|
+
const include = match[1]!
|
|
788
|
+
for (const map of maps) {
|
|
789
|
+
if (!include.startsWith(`${map.name}/`)) continue
|
|
790
|
+
const header = include.slice(map.name.length + 1)
|
|
791
|
+
const candidate = path.posix.join(path.posix.dirname(map.file), include)
|
|
792
|
+
if (support[candidate] === undefined) continue
|
|
793
|
+
map.reached.add(header)
|
|
794
|
+
pending.push([candidate, support[candidate]!])
|
|
795
|
+
}
|
|
796
|
+
const relative = path.posix.normalize(
|
|
797
|
+
path.posix.join(path.posix.dirname(file), include),
|
|
798
|
+
)
|
|
799
|
+
if (support[relative] !== undefined) pending.push([relative, support[relative]!])
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
for (const map of maps) {
|
|
803
|
+
if (!map.reached.size) continue
|
|
804
|
+
const swift = swiftModuleInterface(moduleRoot, map.name, interfaceRoot)
|
|
805
|
+
const mapDirectory = path.posix.dirname(map.file)
|
|
806
|
+
if (swift) {
|
|
807
|
+
const header = `${map.name}-Swift.h`
|
|
808
|
+
support[path.posix.join(mapDirectory, map.name, header)] = swift.header
|
|
809
|
+
const queue = [...map.reached].map((file) =>
|
|
810
|
+
path.posix.join(mapDirectory, map.name, file),
|
|
811
|
+
)
|
|
812
|
+
const seen = new Set<string>()
|
|
813
|
+
while (queue.length) {
|
|
814
|
+
const file = queue.pop()!
|
|
815
|
+
if (seen.has(file) || support[file] === undefined) continue
|
|
816
|
+
seen.add(file)
|
|
817
|
+
const source = support[file]!
|
|
818
|
+
for (const match of source.matchAll(
|
|
819
|
+
/#\s*(?:import|include)\s*[<"]([^>"]+)[>"]/g,
|
|
820
|
+
)) {
|
|
821
|
+
const include = match[1]!
|
|
822
|
+
const next = include.startsWith(`${map.name}/`)
|
|
823
|
+
? path.posix.join(mapDirectory, include)
|
|
824
|
+
: path.posix.normalize(path.posix.join(path.posix.dirname(file), include))
|
|
825
|
+
if (support[next] !== undefined) queue.push(next)
|
|
826
|
+
}
|
|
827
|
+
const contents = withoutSwiftDeclarations(
|
|
828
|
+
source,
|
|
829
|
+
swift.declared,
|
|
830
|
+
`#import <${map.name}/${header}>`,
|
|
831
|
+
)
|
|
832
|
+
support[file] = contents
|
|
833
|
+
// the header overlay reads the canonical file behind a pod symlink.
|
|
834
|
+
let canonical = file
|
|
835
|
+
while (aliases.has(canonical)) canonical = aliases.get(canonical)!
|
|
836
|
+
support[canonical] = contents
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
const submodules = [
|
|
840
|
+
...(swift
|
|
841
|
+
? [` module Swift { header "${map.name}/${map.name}-Swift.h" export * }`]
|
|
842
|
+
: []),
|
|
843
|
+
...[...map.reached]
|
|
844
|
+
.sort()
|
|
845
|
+
.filter((header) => !map.text.includes(`textual header "${header}"`))
|
|
846
|
+
.map(
|
|
847
|
+
(header, index) =>
|
|
848
|
+
` module Header${index} { header "${map.name}/${header}" export * }`,
|
|
849
|
+
),
|
|
850
|
+
]
|
|
851
|
+
if (!/^\s*module\s+\*\s*\{[^}]*\}\s*$/m.test(map.text))
|
|
852
|
+
throw new Error(`${map.file}: cannot stage an umbrella without wildcard submodules`)
|
|
853
|
+
support[map.file] = map.text
|
|
854
|
+
.replace(/^\s*umbrella\s+header\s+"[^"]+"\s*\n/m, '')
|
|
855
|
+
.replace(/^\s*module\s+\*\s*\{[^}]*\}\s*\n/m, `${submodules.join('\n')}\n`)
|
|
856
|
+
}
|
|
857
|
+
for (const unit of units) unit.nativeFiles = { ...unit.nativeFiles, ...support }
|
|
858
|
+
}
|
|
859
|
+
|
|
621
860
|
export async function collectExpoSwiftSources(
|
|
622
861
|
appRoot: string,
|
|
623
862
|
signal?: AbortSignal,
|
|
@@ -719,7 +958,7 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
719
958
|
// before propagating errors so a failed request leaves no child running.
|
|
720
959
|
const [searched, resolvedModules] = await Promise.allSettled(
|
|
721
960
|
['search', 'resolve'].map((command) =>
|
|
722
|
-
run(
|
|
961
|
+
run('node', [cli, command, ...flags, '--json'], {
|
|
723
962
|
timeout: 120_000,
|
|
724
963
|
maxBuffer: 8 * 1024 * 1024,
|
|
725
964
|
env: scriptEnv,
|
|
@@ -761,8 +1000,47 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
761
1000
|
if (Array.isArray(found)) resolution.modules = found
|
|
762
1001
|
}
|
|
763
1002
|
}
|
|
1003
|
+
let installed: Awaited<ReturnType<typeof installedWorkspaceInput>> | undefined
|
|
1004
|
+
let provided: ReadonlySet<string> = new Set()
|
|
1005
|
+
let moduleRoot = ''
|
|
1006
|
+
let nativeAppIdentity: NativeAppIdentity | undefined
|
|
1007
|
+
if (installedWorkspace) {
|
|
1008
|
+
report(`reading installed workspace ${installedWorkspace}`)
|
|
1009
|
+
const module = await resolveSwiftModule({ signal })
|
|
1010
|
+
await prepareXcodeSwiftPackages(installedWorkspace, undefined, undefined, signal)
|
|
1011
|
+
moduleRoot = module.root
|
|
1012
|
+
provided = new Set(swiftPeachModules(module.root))
|
|
1013
|
+
const projectRoot = openXcodeProject(
|
|
1014
|
+
installedWorkspace,
|
|
1015
|
+
undefined,
|
|
1016
|
+
undefined,
|
|
1017
|
+
'Debug',
|
|
1018
|
+
module?.root,
|
|
1019
|
+
resolutions.flatMap((resolution) =>
|
|
1020
|
+
isRecord(resolution) && Array.isArray(resolution.swiftModuleNames)
|
|
1021
|
+
? resolution.swiftModuleNames.filter(
|
|
1022
|
+
(name): name is string => typeof name === 'string',
|
|
1023
|
+
)
|
|
1024
|
+
: [],
|
|
1025
|
+
),
|
|
1026
|
+
)
|
|
1027
|
+
await new Promise<void>((resolve) => setImmediate(resolve))
|
|
1028
|
+
try {
|
|
1029
|
+
installed = await installedWorkspaceInput(projectRoot, 'main.swift', module.root)
|
|
1030
|
+
const identity = swiftProjectAppInfo(projectRoot).identity
|
|
1031
|
+
if (!identity) throw new Error('prepared Expo workspace has no native app identity')
|
|
1032
|
+
nativeAppIdentity = identity
|
|
1033
|
+
} finally {
|
|
1034
|
+
disposeSwiftProject(projectRoot)
|
|
1035
|
+
}
|
|
1036
|
+
report('installed workspace read')
|
|
1037
|
+
}
|
|
1038
|
+
const installedTargets = swiftManifestTargets(
|
|
1039
|
+
installed?.input.files['Package.swift'] ?? '',
|
|
1040
|
+
)
|
|
764
1041
|
const units: ExpoSwiftSourceUnit[] = []
|
|
765
1042
|
const namespacesSeen = new Set<string>()
|
|
1043
|
+
const namespaceGroups = new Map<string, string[]>()
|
|
766
1044
|
let needsNativeWorkspace = false
|
|
767
1045
|
let bytes = 0
|
|
768
1046
|
let fileCount = 0
|
|
@@ -777,11 +1055,12 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
777
1055
|
if (typeof sourceRoot !== 'string')
|
|
778
1056
|
throw new Error('Expo autolinking entry has no path')
|
|
779
1057
|
const canonical = fs.realpathSync(sourceRoot)
|
|
780
|
-
//
|
|
1058
|
+
// covered packages retain their native seams; uncovered installed modules
|
|
1059
|
+
// compile through the same autolinker-selected route as app-local modules.
|
|
781
1060
|
if (
|
|
782
1061
|
canonical.split(path.sep).includes('node_modules') &&
|
|
783
|
-
(
|
|
784
|
-
|
|
1062
|
+
answeredPackages.has(packageName) &&
|
|
1063
|
+
!COMPILED_EXPO_NATIVE_PACKAGES.ios.includes(packageName)
|
|
785
1064
|
)
|
|
786
1065
|
continue
|
|
787
1066
|
// the autolinker read these in a child, so the parent can only stamp them
|
|
@@ -831,137 +1110,146 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
831
1110
|
continue
|
|
832
1111
|
if (
|
|
833
1112
|
!Array.isArray(namespaces) ||
|
|
834
|
-
namespaces.length
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
throw new Error(
|
|
839
|
-
`${sourceRoot}: local Expo Swift modules need one Apple Swift module`,
|
|
1113
|
+
namespaces.length === 0 ||
|
|
1114
|
+
!namespaces.every(
|
|
1115
|
+
(name): name is string =>
|
|
1116
|
+
typeof name === 'string' && /^[A-Za-z_][A-Za-z0-9_]*$/.test(name),
|
|
840
1117
|
)
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
1118
|
+
)
|
|
1119
|
+
throw new Error(`${sourceRoot}: invalid Expo Apple Swift modules`)
|
|
1120
|
+
// pod source membership comes from CocoaPods, including packages whose
|
|
1121
|
+
// Apple sources live outside an ios directory or exclude sibling sources.
|
|
1122
|
+
if (deferredToWorkspace) {
|
|
1123
|
+
// every selected pod uses its real prepared graph. non-Mac hosts intake
|
|
1124
|
+
// the portable workspace instead of silently dropping its registration.
|
|
1125
|
+
needsNativeWorkspace = true
|
|
1126
|
+
continue
|
|
1127
|
+
}
|
|
1128
|
+
// cocoapods assigns each class to a target. multiple pods cannot be
|
|
1129
|
+
// partitioned by directory because their source globs may overlap.
|
|
1130
|
+
if (namespaces.length > 1 && !installed) {
|
|
1131
|
+
const prepared = await prepareExpoNativeWorkspace(appRoot, signal)
|
|
1132
|
+
return collectExpoSwiftSources(prepared.app, signal, prepared.workspace)
|
|
1133
|
+
}
|
|
1134
|
+
const declarations: {
|
|
1135
|
+
reference: string
|
|
849
1136
|
nativeName: string | null
|
|
850
|
-
|
|
851
|
-
subscriber:
|
|
852
|
-
handler:
|
|
1137
|
+
module: boolean
|
|
1138
|
+
subscriber: boolean
|
|
1139
|
+
handler: boolean
|
|
853
1140
|
}[] = []
|
|
854
|
-
for (const
|
|
855
|
-
const
|
|
856
|
-
typeof
|
|
857
|
-
?
|
|
858
|
-
:
|
|
859
|
-
?
|
|
1141
|
+
for (const descriptor of Array.isArray(modules) ? modules : []) {
|
|
1142
|
+
const reference =
|
|
1143
|
+
typeof descriptor === 'string'
|
|
1144
|
+
? descriptor
|
|
1145
|
+
: isRecord(descriptor)
|
|
1146
|
+
? descriptor.class
|
|
860
1147
|
: null
|
|
861
|
-
const
|
|
862
|
-
typeof
|
|
1148
|
+
const nativeName =
|
|
1149
|
+
typeof descriptor === 'string'
|
|
863
1150
|
? null
|
|
864
|
-
:
|
|
865
|
-
?
|
|
1151
|
+
: isRecord(descriptor)
|
|
1152
|
+
? descriptor.name
|
|
866
1153
|
: null
|
|
867
1154
|
if (
|
|
868
|
-
typeof
|
|
869
|
-
!/^[A-Za-z_]
|
|
870
|
-
(
|
|
1155
|
+
typeof reference !== 'string' ||
|
|
1156
|
+
!/^[A-Za-z_]\w*(\.[A-Za-z_]\w*)*$/.test(reference) ||
|
|
1157
|
+
(nativeName !== null && typeof nativeName !== 'string')
|
|
871
1158
|
)
|
|
872
1159
|
throw new Error(`${sourceRoot}: invalid Expo Apple module descriptor`)
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
nativeName
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
subscriber: null,
|
|
880
|
-
handler: null,
|
|
1160
|
+
declarations.push({
|
|
1161
|
+
reference,
|
|
1162
|
+
nativeName,
|
|
1163
|
+
module: true,
|
|
1164
|
+
subscriber: false,
|
|
1165
|
+
handler: false,
|
|
881
1166
|
})
|
|
882
1167
|
}
|
|
883
|
-
// a delegate class is compiled with its closure like a module class; one
|
|
884
|
-
// class may be both a module and a delegate
|
|
885
1168
|
for (const [names, role] of [
|
|
886
1169
|
[subscriberNames, 'subscriber'],
|
|
887
1170
|
[handlerNames, 'handler'],
|
|
888
1171
|
] as const) {
|
|
889
|
-
for (const
|
|
1172
|
+
for (const reference of names) {
|
|
890
1173
|
if (
|
|
891
|
-
typeof
|
|
892
|
-
!/^[A-Za-z_]
|
|
1174
|
+
typeof reference !== 'string' ||
|
|
1175
|
+
!/^[A-Za-z_]\w*(\.[A-Za-z_]\w*)*$/.test(reference)
|
|
893
1176
|
)
|
|
894
1177
|
throw new Error(`${sourceRoot}: invalid Expo Apple delegate descriptor`)
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
const expression =
|
|
898
|
-
role === 'subscriber'
|
|
899
|
-
? reference
|
|
900
|
-
: `(packageName: ${JSON.stringify(packageName)}, handler: ${reference})`
|
|
901
|
-
const existing = classes.find((item) => item.name === name)
|
|
902
|
-
if (existing) existing[role] = expression
|
|
1178
|
+
const existing = declarations.find((item) => item.reference === reference)
|
|
1179
|
+
if (existing) existing[role] = true
|
|
903
1180
|
else
|
|
904
|
-
|
|
905
|
-
|
|
1181
|
+
declarations.push({
|
|
1182
|
+
reference,
|
|
906
1183
|
nativeName: null,
|
|
907
|
-
|
|
908
|
-
subscriber: role === 'subscriber'
|
|
909
|
-
handler: role === 'handler'
|
|
1184
|
+
module: false,
|
|
1185
|
+
subscriber: role === 'subscriber',
|
|
1186
|
+
handler: role === 'handler',
|
|
910
1187
|
})
|
|
911
1188
|
}
|
|
912
1189
|
}
|
|
913
|
-
const
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
const walk = (dir: string, binary = false) => {
|
|
942
|
-
signal?.throwIfAborted()
|
|
943
|
-
// versioned frameworks expose the same directory through several links.
|
|
944
|
-
const directory = resolveSource(dir)
|
|
945
|
-
if (directories.has(directory)) return
|
|
946
|
-
directories.add(directory)
|
|
947
|
-
for (const child of fs
|
|
948
|
-
.readdirSync(dir, { withFileTypes: true })
|
|
949
|
-
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
950
|
-
const file = path.join(dir, child.name)
|
|
951
|
-
const linked = child.isSymbolicLink() ? resolveSource(file) : null
|
|
952
|
-
const target = linked ? fs.statSync(linked) : child
|
|
953
|
-
if (target.isDirectory()) {
|
|
954
|
-
const framework = /\.(xcframework|framework)$/.test(child.name)
|
|
955
|
-
if (framework && !binary) frameworks.add(linked ?? resolveSource(file))
|
|
956
|
-
if (!child.name.startsWith('.') && child.name !== 'build')
|
|
957
|
-
walk(file, binary || framework)
|
|
958
|
-
continue
|
|
1190
|
+
const owners = new Map<string, Set<string>>()
|
|
1191
|
+
for (const namespace of namespaces) {
|
|
1192
|
+
namespaceGroups.set(namespace, namespaces)
|
|
1193
|
+
if (namespacesSeen.has(namespace))
|
|
1194
|
+
throw new Error(`duplicate local Expo Swift module ${namespace}`)
|
|
1195
|
+
namespacesSeen.add(namespace)
|
|
1196
|
+
const files: Record<string, string> = {}
|
|
1197
|
+
const frameworks = new Set<string>()
|
|
1198
|
+
const ios = path.join(canonical, 'ios')
|
|
1199
|
+
// an app's own module may share sources with its other native targets
|
|
1200
|
+
// through links that stay inside the app; installed packages stay sealed.
|
|
1201
|
+
const appOwned = !canonical.split(path.sep).includes('node_modules')
|
|
1202
|
+
const withinApp = path.relative(appRoot, canonical)
|
|
1203
|
+
const sourceBoundary =
|
|
1204
|
+
appOwned && withinApp !== '..' && !withinApp.startsWith(`..${path.sep}`)
|
|
1205
|
+
? appRoot
|
|
1206
|
+
: canonical
|
|
1207
|
+
const boundaryName = sourceBoundary === appRoot ? 'app root' : 'module root'
|
|
1208
|
+
const directories = new Set<string>()
|
|
1209
|
+
const sources = new Set<string>()
|
|
1210
|
+
const resolveSource = (file: string) => {
|
|
1211
|
+
let target: string
|
|
1212
|
+
try {
|
|
1213
|
+
target = fs.realpathSync(file)
|
|
1214
|
+
} catch (cause) {
|
|
1215
|
+
throw new Error(`Cannot resolve Expo Swift source: ${file}`, {
|
|
1216
|
+
cause,
|
|
1217
|
+
})
|
|
959
1218
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1219
|
+
const relative = path.relative(sourceBoundary, target)
|
|
1220
|
+
if (
|
|
1221
|
+
relative === '..' ||
|
|
1222
|
+
relative.startsWith(`..${path.sep}`) ||
|
|
1223
|
+
path.isAbsolute(relative)
|
|
1224
|
+
)
|
|
1225
|
+
throw new Error(
|
|
1226
|
+
`Expo Swift source escapes ${boundaryName}: ${file} -> ${target}`,
|
|
1227
|
+
)
|
|
1228
|
+
return target
|
|
1229
|
+
}
|
|
1230
|
+
const walk = (dir: string, binary = false) => {
|
|
1231
|
+
signal?.throwIfAborted()
|
|
1232
|
+
// versioned frameworks expose the same directory through several links.
|
|
1233
|
+
const directory = resolveSource(dir)
|
|
1234
|
+
if (directories.has(directory)) return
|
|
1235
|
+
directories.add(directory)
|
|
1236
|
+
for (const child of fs
|
|
1237
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
1238
|
+
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
1239
|
+
const file = path.join(dir, child.name)
|
|
1240
|
+
const linked = child.isSymbolicLink() ? resolveSource(file) : null
|
|
1241
|
+
const target = linked ? fs.statSync(linked) : child
|
|
1242
|
+
if (target.isDirectory()) {
|
|
1243
|
+
const framework = /\.(xcframework|framework)$/.test(child.name)
|
|
1244
|
+
if (framework && !binary) frameworks.add(linked ?? resolveSource(file))
|
|
1245
|
+
if (!child.name.startsWith('.') && child.name !== 'build')
|
|
1246
|
+
walk(file, binary || framework)
|
|
1247
|
+
continue
|
|
1248
|
+
}
|
|
1249
|
+
if (!target.isFile() || !child.name.endsWith('.swift')) continue
|
|
1250
|
+
const source = linked ?? resolveSource(file)
|
|
1251
|
+
if (sources.has(source)) continue
|
|
1252
|
+
sources.add(source)
|
|
965
1253
|
bytes += fs.statSync(source).size
|
|
966
1254
|
fileCount++
|
|
967
1255
|
if (
|
|
@@ -970,64 +1258,125 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
970
1258
|
bytes > MAX_SWIFT_COMPILE_SOURCE_BYTES)
|
|
971
1259
|
)
|
|
972
1260
|
throw new Error('Expo Swift sources exceed compile service caps')
|
|
1261
|
+
files[
|
|
1262
|
+
`Sources/${namespace}/${path.relative(ios, file).split(path.sep).join('/')}`
|
|
1263
|
+
] =
|
|
1264
|
+
// CocoaPods' iOS umbrella header imports UIKit into every Swift file
|
|
1265
|
+
// through the underlying module; these source units have no clang pod.
|
|
1266
|
+
`import UIKit\n#sourceLocation(file: ${JSON.stringify(file)}, line: 1)\n${fs.readFileSync(source, 'utf8')}`
|
|
973
1267
|
}
|
|
974
|
-
files[
|
|
975
|
-
`Sources/${namespace}/${path.relative(ios, file).split(path.sep).join('/')}`
|
|
976
|
-
] =
|
|
977
|
-
// CocoaPods' iOS umbrella header imports UIKit into every Swift file
|
|
978
|
-
// through the underlying module; these source units have no clang pod.
|
|
979
|
-
`import UIKit\n#sourceLocation(file: ${JSON.stringify(file)}, line: 1)\n${fs.readFileSync(source, 'utf8')}`
|
|
980
1268
|
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1269
|
+
const walkFrameworks = (dir: string) => {
|
|
1270
|
+
signal?.throwIfAborted()
|
|
1271
|
+
const directory = resolveSource(dir)
|
|
1272
|
+
if (directories.has(directory)) return
|
|
1273
|
+
directories.add(directory)
|
|
1274
|
+
for (const child of fs
|
|
1275
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
1276
|
+
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
1277
|
+
if (
|
|
1278
|
+
child.name.startsWith('.') ||
|
|
1279
|
+
child.name === 'build' ||
|
|
1280
|
+
child.name === 'node_modules' ||
|
|
1281
|
+
child.name === 'android' ||
|
|
1282
|
+
child.name === 'web' ||
|
|
1283
|
+
child.name === 'src'
|
|
1284
|
+
)
|
|
1285
|
+
continue
|
|
1286
|
+
const file = path.join(dir, child.name)
|
|
1287
|
+
const linked = child.isSymbolicLink() ? resolveSource(file) : null
|
|
1288
|
+
const target = linked ? fs.statSync(linked) : child
|
|
1289
|
+
if (!target.isDirectory()) continue
|
|
1290
|
+
if (/\.(xcframework|framework)$/.test(child.name)) {
|
|
1291
|
+
frameworks.add(linked ?? resolveSource(file))
|
|
1292
|
+
continue
|
|
1293
|
+
}
|
|
1294
|
+
walkFrameworks(file)
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
if (installed) {
|
|
1298
|
+
const target = installedTargets.find((item) => item.name === namespace)
|
|
1299
|
+
if (!target)
|
|
1300
|
+
throw new Error(
|
|
1301
|
+
`Expo pod target ${namespace} is absent from the installed workspace`,
|
|
1302
|
+
)
|
|
1303
|
+
for (const [file, source] of Object.entries(installed.input.files)) {
|
|
1304
|
+
if (file.startsWith(`${target.path}/`) && file.endsWith('.swift'))
|
|
1305
|
+
files[
|
|
1306
|
+
`Sources/${namespace}/${file.slice(target.path.length + 1).replace(/^(?:.*\/)?node_modules\//, '')}`
|
|
1307
|
+
] = source
|
|
1308
|
+
}
|
|
1309
|
+
} else {
|
|
1310
|
+
walk(ios)
|
|
1311
|
+
walkFrameworks(canonical)
|
|
1312
|
+
}
|
|
1313
|
+
// a module compiled from its own source declares its iOS floor in its
|
|
1314
|
+
// podspec; CocoaPods builds the pod at that floor.
|
|
1315
|
+
const podspec = fs.existsSync(ios)
|
|
1316
|
+
? fs.readdirSync(ios).find((name) => name.endsWith('.podspec'))
|
|
1317
|
+
: undefined
|
|
1318
|
+
const podspecFloor = podspec
|
|
1319
|
+
? /\.platforms\s*=\s*\{\s*:ios\s*=>\s*['"](\d+(?:\.\d+){0,2})['"]/.exec(
|
|
1320
|
+
fs.readFileSync(path.join(ios, podspec), 'utf8'),
|
|
1321
|
+
)?.[1]
|
|
1322
|
+
: undefined
|
|
1323
|
+
for (const declaration of declarations) {
|
|
1324
|
+
const className = declaration.reference
|
|
1325
|
+
const owner = className.split('.')[0]!
|
|
1326
|
+
if (className.includes('.') && namespaces.includes(owner) && owner !== namespace)
|
|
1005
1327
|
continue
|
|
1328
|
+
const name = className.split('.').pop()!
|
|
1329
|
+
// a class with its module's name shadows that module in Swift lookup.
|
|
1330
|
+
const reference =
|
|
1331
|
+
className.includes('.') || className === namespace
|
|
1332
|
+
? className
|
|
1333
|
+
: `${namespace}.${className}`
|
|
1334
|
+
const module = {
|
|
1335
|
+
name,
|
|
1336
|
+
nativeName: declaration.nativeName,
|
|
1337
|
+
registration: declaration.module
|
|
1338
|
+
? `(${reference}.self, ${declaration.nativeName === null ? 'nil' : JSON.stringify(declaration.nativeName)})`
|
|
1339
|
+
: null,
|
|
1340
|
+
subscriber: declaration.subscriber ? `${reference}.self` : null,
|
|
1341
|
+
handler: declaration.handler
|
|
1342
|
+
? `(packageName: ${JSON.stringify(packageName)}, handler: ${reference}.self)`
|
|
1343
|
+
: null,
|
|
1344
|
+
}
|
|
1345
|
+
const closure = swiftSourceClosure(files, [module.name])
|
|
1346
|
+
if (namespaces.length > 1 && Object.keys(closure).length === 0) continue
|
|
1347
|
+
const classOwners = owners.get(className) ?? new Set<string>()
|
|
1348
|
+
classOwners.add(namespace)
|
|
1349
|
+
owners.set(className, classOwners)
|
|
1350
|
+
const configured =
|
|
1351
|
+
module.registration !== null &&
|
|
1352
|
+
configuredExpoSwiftModule(closure, module.name, module.nativeName, appConfig)
|
|
1353
|
+
if (configured && !module.subscriber && !module.handler) continue
|
|
1354
|
+
if (Array.isArray(pods) && pods.length > 0) needsNativeWorkspace = true
|
|
1355
|
+
const unit: ExpoSwiftSourceUnit = {
|
|
1356
|
+
namespace,
|
|
1357
|
+
moduleId: `${namespace}.${module.name}`,
|
|
1358
|
+
classes: module.registration && !configured ? [module.registration] : [],
|
|
1359
|
+
bridgeModules: [],
|
|
1360
|
+
appDelegateSubscribers: module.subscriber ? [module.subscriber] : [],
|
|
1361
|
+
reactDelegateHandlers: module.handler ? [module.handler] : [],
|
|
1362
|
+
files: closure,
|
|
1363
|
+
frameworks: [...frameworks],
|
|
1364
|
+
...(podspecFloor
|
|
1365
|
+
? { nativeTargets: [synthesizedNativeTarget(namespace, podspecFloor)] }
|
|
1366
|
+
: {}),
|
|
1006
1367
|
}
|
|
1007
|
-
|
|
1368
|
+
unit.files[EXPO_SWIFT_ENTRY] = expoEntry([unit])
|
|
1369
|
+
units.push(unit)
|
|
1008
1370
|
}
|
|
1009
1371
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
if (configured && !module.subscriber && !module.handler) continue
|
|
1018
|
-
if (Array.isArray(pods) && pods.length > 0) needsNativeWorkspace = true
|
|
1019
|
-
const unit: ExpoSwiftSourceUnit = {
|
|
1020
|
-
namespace,
|
|
1021
|
-
moduleId: `${namespace}.${module.name}`,
|
|
1022
|
-
classes: module.registration && !configured ? [module.registration] : [],
|
|
1023
|
-
bridgeModules: [],
|
|
1024
|
-
appDelegateSubscribers: module.subscriber ? [module.subscriber] : [],
|
|
1025
|
-
reactDelegateHandlers: module.handler ? [module.handler] : [],
|
|
1026
|
-
files: closure,
|
|
1027
|
-
frameworks: [...frameworks],
|
|
1372
|
+
if (namespaces.length > 1) {
|
|
1373
|
+
for (const declaration of declarations) {
|
|
1374
|
+
const classOwners = owners.get(declaration.reference)
|
|
1375
|
+
if (classOwners?.size !== 1)
|
|
1376
|
+
throw new Error(
|
|
1377
|
+
`${sourceRoot}: Expo class ${declaration.reference} belongs to ${classOwners?.size ?? 0} installed Apple targets`,
|
|
1378
|
+
)
|
|
1028
1379
|
}
|
|
1029
|
-
unit.files[EXPO_SWIFT_ENTRY] = expoEntry([unit])
|
|
1030
|
-
units.push(unit)
|
|
1031
1380
|
}
|
|
1032
1381
|
}
|
|
1033
1382
|
if (prepareNative && !installedWorkspace && needsNativeWorkspace) {
|
|
@@ -1053,11 +1402,15 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1053
1402
|
preparedRoot: prepared.work,
|
|
1054
1403
|
signal,
|
|
1055
1404
|
})
|
|
1056
|
-
|
|
1405
|
+
if (typeof stored === 'string') {
|
|
1406
|
+
report(`discovery cache refused the entry: ${stored}`)
|
|
1407
|
+
return discovered
|
|
1408
|
+
}
|
|
1409
|
+
return stored
|
|
1057
1410
|
}
|
|
1058
1411
|
// inline modules belong to the app target, including non-module intent files.
|
|
1059
1412
|
// use Expo's scanner so its watched directories and class selection stay native.
|
|
1060
|
-
const config = await readExpoConfigAsync(appRoot)
|
|
1413
|
+
const config = await traceStore.exit(() => readExpoConfigAsync(appRoot))
|
|
1061
1414
|
signal?.throwIfAborted()
|
|
1062
1415
|
const experiments = config.experiments
|
|
1063
1416
|
const inlineConfig = isRecord(experiments) ? experiments.inlineModules : undefined
|
|
@@ -1133,82 +1486,16 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1133
1486
|
}
|
|
1134
1487
|
}
|
|
1135
1488
|
if (units.length === 0) return null
|
|
1136
|
-
if (
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1489
|
+
if (installed)
|
|
1490
|
+
enrichInstalledUnits(
|
|
1491
|
+
units,
|
|
1492
|
+
installed,
|
|
1493
|
+
namespaceGroups,
|
|
1494
|
+
provided,
|
|
1495
|
+
moduleRoot,
|
|
1496
|
+
new Set(),
|
|
1497
|
+
installedWorkspace ? preparedXcodeInterfaces(installedWorkspace) : undefined,
|
|
1145
1498
|
)
|
|
1146
|
-
try {
|
|
1147
|
-
const { input, binaryFrameworks } = installedWorkspaceInput(
|
|
1148
|
-
projectRoot,
|
|
1149
|
-
'main.swift',
|
|
1150
|
-
)
|
|
1151
|
-
const targets = swiftManifestTargets(input.files['Package.swift'] ?? '')
|
|
1152
|
-
for (const unit of units) {
|
|
1153
|
-
// a unit links the installed binary frameworks it imports; the
|
|
1154
|
-
// compile step keeps only the ones its sources name.
|
|
1155
|
-
unit.frameworks = [...new Set([...unit.frameworks, ...binaryFrameworks])]
|
|
1156
|
-
const target = targets.find((item) => item.name === unit.namespace)
|
|
1157
|
-
const native = input.nativeTargets?.find((item) => item.name === unit.namespace)
|
|
1158
|
-
if (!target || !native) continue
|
|
1159
|
-
// cocoapods compiles each pod at its own SWIFT_VERSION
|
|
1160
|
-
unit.swiftLanguageMode = target.languageMode
|
|
1161
|
-
// package reads skip node_modules directories, so an installed pod's
|
|
1162
|
-
// unit takes its path below the package that ships it.
|
|
1163
|
-
const map = (file: string) =>
|
|
1164
|
-
file.startsWith(`${target.path}/`)
|
|
1165
|
-
? `Sources/${unit.namespace}/${file.slice(target.path.length + 1).replace(/^(?:.*\/)?node_modules\//, '')}`
|
|
1166
|
-
: file
|
|
1167
|
-
const isDummyUnit = (file: string) =>
|
|
1168
|
-
/(?:^|\/)Target Support Files\/[^/]+\/[^/]+-dummy\.m$/.test(file)
|
|
1169
|
-
for (const [file, source] of Object.entries(input.files)) {
|
|
1170
|
-
if (
|
|
1171
|
-
file.startsWith(`${target.path}/`) &&
|
|
1172
|
-
isSwiftNativeTranslationUnit(file) &&
|
|
1173
|
-
!isDummyUnit(file)
|
|
1174
|
-
) {
|
|
1175
|
-
unit.files[map(file)] = source
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
// the pod's resolved settings travel with every unit it names, swift-only
|
|
1179
|
-
// included: the builder requires each target's deployment target whether
|
|
1180
|
-
// or not the target ships clang sources of its own.
|
|
1181
|
-
const nativeFiles: Record<string, string> = {}
|
|
1182
|
-
for (const [file, source] of Object.entries(input.files)) {
|
|
1183
|
-
if (/\.(h|hh|hpp|hxx|pch|inc|inl|modulemap)$/.test(file))
|
|
1184
|
-
nativeFiles[map(file)] = source
|
|
1185
|
-
}
|
|
1186
|
-
unit.nativeFiles = nativeFiles
|
|
1187
|
-
unit.nativeTargets = [
|
|
1188
|
-
{
|
|
1189
|
-
...native,
|
|
1190
|
-
headers: native.headers.map(map),
|
|
1191
|
-
publicHeaders: native.publicHeaders.map(map),
|
|
1192
|
-
bridgingHeader: native.bridgingHeader ? map(native.bridgingHeader) : null,
|
|
1193
|
-
prefixHeader: native.prefixHeader ? map(native.prefixHeader) : null,
|
|
1194
|
-
fileFlags: Object.fromEntries(
|
|
1195
|
-
Object.entries(native.fileFlags)
|
|
1196
|
-
.filter(([file]) => !isDummyUnit(file))
|
|
1197
|
-
.map(([file, flags]) => [map(file), flags]),
|
|
1198
|
-
),
|
|
1199
|
-
sourceDirectories: Object.fromEntries(
|
|
1200
|
-
Object.entries(native.sourceDirectories)
|
|
1201
|
-
.filter(([file]) => !isDummyUnit(file))
|
|
1202
|
-
.map(([file, directory]) => [map(file), directory]),
|
|
1203
|
-
),
|
|
1204
|
-
},
|
|
1205
|
-
]
|
|
1206
|
-
}
|
|
1207
|
-
} finally {
|
|
1208
|
-
disposeSwiftProject(projectRoot)
|
|
1209
|
-
}
|
|
1210
|
-
report('installed workspace read')
|
|
1211
|
-
}
|
|
1212
1499
|
const allFiles: Record<string, string> = Object.assign(
|
|
1213
1500
|
{},
|
|
1214
1501
|
...units.map((unit) => unit.files),
|
|
@@ -1257,6 +1544,11 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1257
1544
|
unit.nativeFiles,
|
|
1258
1545
|
...dependency.map((item) => item.nativeFiles),
|
|
1259
1546
|
)
|
|
1547
|
+
unit.headerAliases = Object.assign(
|
|
1548
|
+
{},
|
|
1549
|
+
unit.headerAliases,
|
|
1550
|
+
...dependency.map((item) => item.headerAliases),
|
|
1551
|
+
)
|
|
1260
1552
|
for (const [name, source] of Object.entries(allFiles)) {
|
|
1261
1553
|
if (name.startsWith(`Sources/${namespace}/`)) unit.files[name] = source
|
|
1262
1554
|
}
|
|
@@ -1264,17 +1556,19 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1264
1556
|
unit.files['Package.swift'] = expoManifest(
|
|
1265
1557
|
unit.files,
|
|
1266
1558
|
'',
|
|
1267
|
-
|
|
1559
|
+
targetSettings([...included].flatMap((namespace) => byNamespace.get(namespace)!)),
|
|
1268
1560
|
)
|
|
1269
1561
|
}
|
|
1562
|
+
if (nativeAppIdentity)
|
|
1563
|
+
for (const unit of units) unit.nativeAppIdentity = nativeAppIdentity
|
|
1270
1564
|
return units
|
|
1271
1565
|
}
|
|
1272
1566
|
|
|
1273
|
-
//
|
|
1567
|
+
// target settings follow their installed CocoaPods build configuration.
|
|
1274
1568
|
function expoManifest(
|
|
1275
1569
|
files: Record<string, string>,
|
|
1276
1570
|
generation = '',
|
|
1277
|
-
|
|
1571
|
+
settings: ReturnType<typeof targetSettings> = new Map(),
|
|
1278
1572
|
): string {
|
|
1279
1573
|
const targets = new Map<string, string>()
|
|
1280
1574
|
for (const file of Object.keys(files)) {
|
|
@@ -1285,17 +1579,28 @@ function expoManifest(
|
|
|
1285
1579
|
throw new Error(`duplicate Expo Swift compile target ${match[2]}`)
|
|
1286
1580
|
targets.set(match[2]!, dir)
|
|
1287
1581
|
}
|
|
1288
|
-
|
|
1582
|
+
const declarations = [...targets].map(([name, dir]) => {
|
|
1583
|
+
const configuration = dir.startsWith(`${SWIFT_STANDINS_DIR}/`)
|
|
1584
|
+
? { languageMode: 5, mainActorIsolation: false }
|
|
1585
|
+
: settings.get(name)
|
|
1586
|
+
return `.target(name: ${JSON.stringify(name)}, path: ${JSON.stringify(dir)}${configuration ? ', ' + swiftManifestSettings(configuration) : ''})`
|
|
1587
|
+
})
|
|
1588
|
+
return `// swift-tools-version: 6.0\nimport PackageDescription\nlet package = Package(name: "PeachExpo", targets: [${declarations.join(', ')}, .executableTarget(name: "PeachExpoApp", path: "Sources/PeachExpoApp")])\n// stand-in inputs: ${generation}\n`
|
|
1289
1589
|
}
|
|
1290
1590
|
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1591
|
+
function targetSettings(units: ExpoSwiftSourceUnit[]) {
|
|
1592
|
+
const settings = new Map<string, Parameters<typeof swiftManifestSettings>[0]>()
|
|
1593
|
+
for (const unit of units) {
|
|
1594
|
+
for (const target of swiftManifestTargets(unit.files['Package.swift'] ?? ''))
|
|
1595
|
+
settings.set(target.name, target)
|
|
1596
|
+
if (unit.swiftLanguageMode !== undefined)
|
|
1597
|
+
settings.set(unit.namespace, {
|
|
1598
|
+
...settings.get(unit.namespace),
|
|
1599
|
+
languageMode: unit.swiftLanguageMode,
|
|
1600
|
+
mainActorIsolation: settings.get(unit.namespace)?.mainActorIsolation ?? false,
|
|
1601
|
+
})
|
|
1602
|
+
}
|
|
1603
|
+
return settings
|
|
1299
1604
|
}
|
|
1300
1605
|
|
|
1301
1606
|
function expoEntry(units: ExpoSwiftSourceUnit[]): string {
|
|
@@ -1335,6 +1640,10 @@ function expoSwiftPreparedKey(base: string, units: ExpoSwiftSourceUnit[]): strin
|
|
|
1335
1640
|
hash.update(unit.moduleId)
|
|
1336
1641
|
hash.update('\0')
|
|
1337
1642
|
hash.update(JSON.stringify(unit.nativeTargets ?? []))
|
|
1643
|
+
hash.update(JSON.stringify(unit.headerAliases ?? {}))
|
|
1644
|
+
hash.update(JSON.stringify(unit.resourceBundles ?? []))
|
|
1645
|
+
hash.update(JSON.stringify(unit.resources ?? {}))
|
|
1646
|
+
hash.update(JSON.stringify(unit.nativeAppIdentity ?? null))
|
|
1338
1647
|
for (const name of Object.keys(unit.nativeFiles ?? {}).sort()) {
|
|
1339
1648
|
hash.update('\0')
|
|
1340
1649
|
hash.update(name)
|
|
@@ -1411,7 +1720,7 @@ export async function compileExpoSwiftModules(
|
|
|
1411
1720
|
installSwiftInputTrace()
|
|
1412
1721
|
let key: string
|
|
1413
1722
|
try {
|
|
1414
|
-
key = await discoveryKey(root, options.installedWorkspace,
|
|
1723
|
+
key = await discoveryKey(root, options.installedWorkspace, true)
|
|
1415
1724
|
} catch {
|
|
1416
1725
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options)
|
|
1417
1726
|
}
|
|
@@ -1456,17 +1765,68 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1456
1765
|
root,
|
|
1457
1766
|
signal,
|
|
1458
1767
|
options.installedWorkspace,
|
|
1459
|
-
|
|
1768
|
+
true,
|
|
1460
1769
|
)
|
|
1461
1770
|
signal.throwIfAborted()
|
|
1771
|
+
// reading the app's xcode project resolves remote swift packages with the
|
|
1772
|
+
// locked compiler, so install it first only when a project names one.
|
|
1773
|
+
const ios = path.join(root, 'ios')
|
|
1774
|
+
if (
|
|
1775
|
+
[ios, path.join(ios, 'Pods')].some(
|
|
1776
|
+
(dir) =>
|
|
1777
|
+
fs.existsSync(dir) &&
|
|
1778
|
+
fs.readdirSync(dir).some((entry) => {
|
|
1779
|
+
const project = path.join(dir, entry, 'project.pbxproj')
|
|
1780
|
+
return (
|
|
1781
|
+
entry.endsWith('.xcodeproj') &&
|
|
1782
|
+
fs.existsSync(project) &&
|
|
1783
|
+
fs.readFileSync(project, 'utf8').includes('XCRemoteSwiftPackageReference')
|
|
1784
|
+
)
|
|
1785
|
+
}),
|
|
1786
|
+
)
|
|
1787
|
+
)
|
|
1788
|
+
await ensureSwiftToolchain(signal)
|
|
1462
1789
|
const bridge = collectBridgeModuleSources(fs.realpathSync(root), signal)
|
|
1790
|
+
if (bridge && bridge.installedNamespaces.length > 0) {
|
|
1791
|
+
const workspace =
|
|
1792
|
+
options.installedWorkspace ??
|
|
1793
|
+
(await prepareExpoNativeWorkspace(root, signal)).workspace
|
|
1794
|
+
const module = await resolveSwiftModule({ signal })
|
|
1795
|
+
await prepareXcodeSwiftPackages(workspace, undefined, undefined, signal)
|
|
1796
|
+
const project = openXcodeProject(
|
|
1797
|
+
workspace,
|
|
1798
|
+
undefined,
|
|
1799
|
+
undefined,
|
|
1800
|
+
'Debug',
|
|
1801
|
+
module.root,
|
|
1802
|
+
bridge.installedNamespaces,
|
|
1803
|
+
)
|
|
1804
|
+
try {
|
|
1805
|
+
const installed = await installedWorkspaceInput(
|
|
1806
|
+
project,
|
|
1807
|
+
'main.swift',
|
|
1808
|
+
module.root,
|
|
1809
|
+
)
|
|
1810
|
+
enrichInstalledUnits(
|
|
1811
|
+
bridge.units,
|
|
1812
|
+
installed,
|
|
1813
|
+
new Map(),
|
|
1814
|
+
new Set(swiftPeachModules(module.root)),
|
|
1815
|
+
module.root,
|
|
1816
|
+
new Set(bridge.installedNamespaces),
|
|
1817
|
+
preparedXcodeInterfaces(workspace),
|
|
1818
|
+
)
|
|
1819
|
+
} finally {
|
|
1820
|
+
disposeSwiftProject(project)
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1463
1823
|
for (const unit of bridge?.units ?? []) {
|
|
1464
1824
|
if (expoUnits?.some((expo) => expo.namespace === unit.namespace))
|
|
1465
1825
|
throw new Error(
|
|
1466
1826
|
`app target ${unit.namespace} shares its Swift module name with a local Expo module`,
|
|
1467
1827
|
)
|
|
1468
1828
|
unit.files[EXPO_SWIFT_ENTRY] = expoEntry([unit])
|
|
1469
|
-
unit.files['Package.swift'] = expoManifest(unit.files, '',
|
|
1829
|
+
unit.files['Package.swift'] = expoManifest(unit.files, '', targetSettings([unit]))
|
|
1470
1830
|
}
|
|
1471
1831
|
const units = [...(expoUnits ?? []), ...(bridge?.units ?? [])]
|
|
1472
1832
|
const bridgeFailures = bridge?.failures ?? []
|
|
@@ -1475,6 +1835,9 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1475
1835
|
`preparing ${units.length} modules: ${units.map((unit) => unit.moduleId).join(', ')}`,
|
|
1476
1836
|
)
|
|
1477
1837
|
const result: ExpoSwiftCompilationResult = {
|
|
1838
|
+
...(expoUnits?.[0]?.nativeAppIdentity
|
|
1839
|
+
? { nativeAppIdentity: expoUnits[0].nativeAppIdentity }
|
|
1840
|
+
: {}),
|
|
1478
1841
|
namespaces: [
|
|
1479
1842
|
...units.map((unit) => unit.moduleId),
|
|
1480
1843
|
...bridgeFailures.map((failure) => failure.namespace),
|
|
@@ -1551,8 +1914,13 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1551
1914
|
toolchainBin: module.toolchainBin,
|
|
1552
1915
|
}
|
|
1553
1916
|
const generation = standinGenerationInputs(reached, toolchain)
|
|
1554
|
-
const built = swiftStandins(reached, toolchain, provided)
|
|
1555
|
-
const linkedLibraries = standinLibraries(
|
|
1917
|
+
const built = await swiftStandins(reached, toolchain, provided)
|
|
1918
|
+
const linkedLibraries = standinLibraries(
|
|
1919
|
+
reached,
|
|
1920
|
+
built.standins,
|
|
1921
|
+
root,
|
|
1922
|
+
toolchain,
|
|
1923
|
+
)
|
|
1556
1924
|
const linkedStandins = new Set([...linkedLibraries.values()].flat())
|
|
1557
1925
|
for (const standin of built.standins)
|
|
1558
1926
|
for (const [name, source] of Object.entries(standin.files)) {
|
|
@@ -1600,7 +1968,7 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1600
1968
|
unit.files['Package.swift'] = expoManifest(
|
|
1601
1969
|
unit.files,
|
|
1602
1970
|
generation,
|
|
1603
|
-
|
|
1971
|
+
targetSettings([unit]),
|
|
1604
1972
|
)
|
|
1605
1973
|
}
|
|
1606
1974
|
}
|
|
@@ -1616,9 +1984,15 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1616
1984
|
]),
|
|
1617
1985
|
),
|
|
1618
1986
|
)
|
|
1987
|
+
projectFor(packagePath).oneModule = false
|
|
1619
1988
|
projectFor(packagePath).libraries = libraries.get(unit)
|
|
1620
1989
|
projectFor(packagePath).nativeTargets = inheritExecutableFloor(unit.nativeTargets)
|
|
1621
1990
|
projectFor(packagePath).nativeFiles = unit.nativeFiles
|
|
1991
|
+
projectFor(packagePath).headerAliases = unit.headerAliases
|
|
1992
|
+
projectFor(packagePath).resourceBundles = unit.resourceBundles
|
|
1993
|
+
projectFor(packagePath).bundleFiles = unit.resources
|
|
1994
|
+
? { files: unit.resources, bundles: unit.resourceBundles ?? [], watched: [] }
|
|
1995
|
+
: undefined
|
|
1622
1996
|
const stamp = sourceContentStamp(packagePath, module.root)
|
|
1623
1997
|
const failed = readFailedCompilation(packagePath)
|
|
1624
1998
|
if (failed?.stamp === stamp) {
|
|
@@ -1653,7 +2027,7 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1653
2027
|
files['Package.swift'] = expoManifest(
|
|
1654
2028
|
files,
|
|
1655
2029
|
linked.map((unit) => generations.get(unit) ?? '').join(','),
|
|
1656
|
-
|
|
2030
|
+
targetSettings(linked),
|
|
1657
2031
|
)
|
|
1658
2032
|
const packagePath = expoSwiftPackage(key, 'linked-app')
|
|
1659
2033
|
syncSwiftTree(
|
|
@@ -1672,6 +2046,7 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1672
2046
|
throw new Error(`conflicting Expo Swift binary libraries for ${name}`)
|
|
1673
2047
|
linkedLibraries.set(name, library)
|
|
1674
2048
|
}
|
|
2049
|
+
projectFor(packagePath).oneModule = false
|
|
1675
2050
|
projectFor(packagePath).libraries =
|
|
1676
2051
|
linkedLibraries.size > 0 ? Object.fromEntries(linkedLibraries) : undefined
|
|
1677
2052
|
projectFor(packagePath).nativeTargets = inheritExecutableFloor([
|
|
@@ -1687,6 +2062,24 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1687
2062
|
{},
|
|
1688
2063
|
...linked.map((unit) => unit.nativeFiles),
|
|
1689
2064
|
)
|
|
2065
|
+
projectFor(packagePath).headerAliases = Object.assign(
|
|
2066
|
+
{},
|
|
2067
|
+
...linked.map((unit) => unit.headerAliases),
|
|
2068
|
+
)
|
|
2069
|
+
const resources = Object.assign({}, ...linked.map((unit) => unit.resources))
|
|
2070
|
+
const resourceBundles = [
|
|
2071
|
+
...new Map(
|
|
2072
|
+
linked.flatMap((unit) =>
|
|
2073
|
+
(unit.resourceBundles ?? []).map(
|
|
2074
|
+
(bundle) => [bundle.target, bundle] satisfies [string, typeof bundle],
|
|
2075
|
+
),
|
|
2076
|
+
),
|
|
2077
|
+
).values(),
|
|
2078
|
+
]
|
|
2079
|
+
projectFor(packagePath).resourceBundles = resourceBundles
|
|
2080
|
+
projectFor(packagePath).bundleFiles = Object.keys(resources).length
|
|
2081
|
+
? { files: resources, bundles: resourceBundles, watched: [] }
|
|
2082
|
+
: undefined
|
|
1690
2083
|
signal.throwIfAborted()
|
|
1691
2084
|
const stamp = sourceContentStamp(packagePath, module.root)
|
|
1692
2085
|
const refused = readFailedCompilation(packagePath)
|
|
@@ -1708,17 +2101,18 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1708
2101
|
const diagnostic = error instanceof Error ? error.message : String(error)
|
|
1709
2102
|
if (
|
|
1710
2103
|
error instanceof SwiftMissingModulesError ||
|
|
1711
|
-
/^.+:\d+(?::\d+)?: error:|^(?:ld(?:\.lld)?|wasm-ld): error
|
|
2104
|
+
/^.+:\d+(?::\d+)?: error:|^(?:ld(?:\.lld)?|wasm-ld): error:|^(?:error: )?[^\n:]+: missing or unsupported declared iOS deployment target /m.test(
|
|
2105
|
+
diagnostic,
|
|
2106
|
+
)
|
|
1712
2107
|
)
|
|
1713
2108
|
throw error
|
|
1714
2109
|
// admission and interrupted builds say nothing about individual modules.
|
|
1715
2110
|
// share their result briefly, including across dev server restarts.
|
|
1716
2111
|
if (sourceContentStamp(packagePath, module.root) === stamp)
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
diagnostic,
|
|
1720
|
-
|
|
1721
|
-
})
|
|
2112
|
+
fs.writeFileSync(
|
|
2113
|
+
failureRecordPath(packagePath),
|
|
2114
|
+
JSON.stringify({ stamp, diagnostic, retryAt: Date.now() + 60_000 }),
|
|
2115
|
+
)
|
|
1722
2116
|
throw new ExpoSwiftLinkRefusal(diagnostic, { cause: error })
|
|
1723
2117
|
}
|
|
1724
2118
|
}
|
|
@@ -1730,9 +2124,7 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1730
2124
|
} catch (linkError) {
|
|
1731
2125
|
signal.throwIfAborted()
|
|
1732
2126
|
if (linkError instanceof ExpoSwiftLinkRefusal) {
|
|
1733
|
-
|
|
1734
|
-
for (const unit of candidates) failures.set(unit.moduleId, linkError.message)
|
|
1735
|
-
linked = []
|
|
2127
|
+
throw linkError
|
|
1736
2128
|
} else {
|
|
1737
2129
|
report('linked build failed; isolating module diagnostics')
|
|
1738
2130
|
linked = []
|
|
@@ -1771,10 +2163,14 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1771
2163
|
// native preparation failures name the target, not a file; they
|
|
1772
2164
|
// are input-determined like a source error, so they ride with
|
|
1773
2165
|
// them instead of hiding behind the filtered diagnostic.
|
|
1774
|
-
const targetErrors =
|
|
2166
|
+
const targetErrors =
|
|
2167
|
+
diagnostic.match(
|
|
2168
|
+
/^error: target .*$|^(?:error: )?[^\n:]+: missing or unsupported declared iOS deployment target .*$/gm,
|
|
2169
|
+
) ?? []
|
|
1775
2170
|
const unitErrors = [...targetErrors, ...sourceErrors]
|
|
1776
2171
|
if (
|
|
1777
2172
|
publishArtifact &&
|
|
2173
|
+
targetErrors.length === 0 &&
|
|
1778
2174
|
(sourceErrors.length === 0 || sourceErrors.length !== errors.length) &&
|
|
1779
2175
|
!(error instanceof SwiftMissingModulesError)
|
|
1780
2176
|
)
|
|
@@ -1842,6 +2238,7 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1842
2238
|
hash: artifact.hash,
|
|
1843
2239
|
icuUrl: icuUrl(base, artifact),
|
|
1844
2240
|
rootId: `${key}/Expo`,
|
|
2241
|
+
bundleFiles: artifact.package.bundleFiles.files,
|
|
1845
2242
|
})
|
|
1846
2243
|
}
|
|
1847
2244
|
signal.throwIfAborted()
|
|
@@ -1880,7 +2277,7 @@ export async function handleExpoSwiftRequest(
|
|
|
1880
2277
|
res.setHeader('Access-Control-Allow-Origin', origin ?? '*')
|
|
1881
2278
|
res.setHeader('Vary', 'Origin')
|
|
1882
2279
|
res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin')
|
|
1883
|
-
if (serveSwiftPackageAsset(url.pathname, res)) return true
|
|
2280
|
+
if (await serveSwiftPackageAsset(url.pathname, res)) return true
|
|
1884
2281
|
if (url.pathname !== EXPO_SWIFT_ROUTE) return false
|
|
1885
2282
|
if (req.method !== 'GET') {
|
|
1886
2283
|
res.writeHead(405)
|