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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1801 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -32,7 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
33
33
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
34
34
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
35
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "
|
|
35
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "67ab18b60c9eb360c9f04f34020e3e723f08b9279402819c53a5cfb8e7d32742", "swift-coverage/xcode-asset-symbols.ts": "c23432541bd24c3cb193f227b569fdd84afec74b934a45e986245f8801291a47", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "fdb8333fdb5d8346283e2397b0cd4b93b269ce7a5c34e15bbc2431b9e890f18a", "swift-package.ts": "ce08285995fc2fa58e05db1bfe9b3355966f4a155e2d648481115f349d3fd4f4", "swift-source-file.ts": "7653751b3edfd63479f733427b6767847de0cd2267715c14dc18d6e5233c3a91", "swift-toolchain.ts": "8fb0abedff92307644b9de42ec8e957d710a71378b6bc7f9bb5b116ea3bf7e56", "home-paths.ts": "cc72e811854c4d9e288ad449b8b33aa7b82ece846ba5f7a9ddf252a3d39943ac", "xcode-header-search.ts": "28dea24d74049440bec28e95669650157fc88e42227336859ce9c0e444436148", "xcode-project.ts": "4c0843a4d6cf818f1a20fda02fbafb2637370f9e203687b1da2c24b6bdd8260f", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -104,8 +104,8 @@ var require_parse = __commonJS({
|
|
|
104
104
|
}
|
|
105
105
|
return root;
|
|
106
106
|
};
|
|
107
|
-
function internalize(holder,
|
|
108
|
-
const value = holder[
|
|
107
|
+
function internalize(holder, name2, reviver) {
|
|
108
|
+
const value = holder[name2];
|
|
109
109
|
if (value != null && typeof value === "object") {
|
|
110
110
|
if (Array.isArray(value)) {
|
|
111
111
|
for (let i = 0; i < value.length; i++) {
|
|
@@ -138,7 +138,7 @@ var require_parse = __commonJS({
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
return reviver.call(holder,
|
|
141
|
+
return reviver.call(holder, name2, value);
|
|
142
142
|
}
|
|
143
143
|
var lexState;
|
|
144
144
|
var buffer;
|
|
@@ -1155,9 +1155,9 @@ var require_lib = __commonJS({
|
|
|
1155
1155
|
|
|
1156
1156
|
// src/native-app-identity-project.ts
|
|
1157
1157
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1158
|
-
import
|
|
1158
|
+
import fs15 from "node:fs";
|
|
1159
1159
|
import { createRequire } from "node:module";
|
|
1160
|
-
import
|
|
1160
|
+
import path26 from "node:path";
|
|
1161
1161
|
|
|
1162
1162
|
// src/android-app-identity.ts
|
|
1163
1163
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -1166,7 +1166,7 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
1166
1166
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1167
1167
|
function compileAndroidStringValue(text2, where) {
|
|
1168
1168
|
if (/^\s*[@?]/.test(text2))
|
|
1169
|
-
throw new Error(`${where} is a resource reference, not resolved by
|
|
1169
|
+
throw new Error(`${where} is a resource reference, not resolved by Peach yet`);
|
|
1170
1170
|
const out = [];
|
|
1171
1171
|
let quoted = false;
|
|
1172
1172
|
for (let index = 0; index < text2.length; index++) {
|
|
@@ -1234,18 +1234,18 @@ function parseXml(text2, file) {
|
|
|
1234
1234
|
if (!match)
|
|
1235
1235
|
throw new Error(`${file}: unreadable markup at ${body.slice(open, open + 40)}`);
|
|
1236
1236
|
index = TAG.lastIndex;
|
|
1237
|
-
const [, closing,
|
|
1238
|
-
if (!
|
|
1237
|
+
const [, closing, name2, rawAttributes, selfClosing] = match;
|
|
1238
|
+
if (!name2) continue;
|
|
1239
1239
|
if (closing) {
|
|
1240
1240
|
const element2 = stack.pop();
|
|
1241
|
-
if (element2?.name !==
|
|
1242
|
-
throw new Error(`${file}: </${
|
|
1241
|
+
if (element2?.name !== name2)
|
|
1242
|
+
throw new Error(`${file}: </${name2}> closes <${element2?.name}>`);
|
|
1243
1243
|
continue;
|
|
1244
1244
|
}
|
|
1245
1245
|
const attributes = {};
|
|
1246
1246
|
for (const [, key, double, single] of (rawAttributes ?? "").matchAll(ATTRIBUTE))
|
|
1247
1247
|
if (key) attributes[key] = decodeXmlText(double ?? single ?? "", file);
|
|
1248
|
-
const element = { name, attributes, children: [], text: "" };
|
|
1248
|
+
const element = { name: name2, attributes, children: [], text: "" };
|
|
1249
1249
|
stack.at(-1)?.children.push(element);
|
|
1250
1250
|
if (!selfClosing) stack.push(element);
|
|
1251
1251
|
}
|
|
@@ -1261,7 +1261,7 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1261
1261
|
const manifest = document.children[0];
|
|
1262
1262
|
if (manifest.name !== "manifest") return null;
|
|
1263
1263
|
const androidPrefix = Object.entries(manifest.attributes).find(
|
|
1264
|
-
([
|
|
1264
|
+
([name2, value]) => name2.startsWith("xmlns:") && value === "http://schemas.android.com/apk/res/android"
|
|
1265
1265
|
)?.[0].slice("xmlns:".length);
|
|
1266
1266
|
if (!androidPrefix) return null;
|
|
1267
1267
|
const attribute = `${androidPrefix}:`;
|
|
@@ -1272,8 +1272,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1272
1272
|
if (!application || !bundleIdentifier || !appVersion || !buildVersion || !/^[1-9][0-9]*$/.test(buildVersion) || [bundleIdentifier, appVersion].some((value) => /\$\{|^[@?]/.test(value)))
|
|
1273
1273
|
return null;
|
|
1274
1274
|
const toolsPrefixes = Object.entries(manifest.attributes).filter(
|
|
1275
|
-
([
|
|
1276
|
-
).map(([
|
|
1275
|
+
([name2, value]) => name2.startsWith("xmlns:") && value === "http://schemas.android.com/tools"
|
|
1276
|
+
).map(([name2]) => `${name2.slice("xmlns:".length)}:`);
|
|
1277
1277
|
const androidManifestPermissions = [];
|
|
1278
1278
|
for (const element of manifest.children) {
|
|
1279
1279
|
if (!["uses-permission", "uses-permission-sdk-23", "uses-permission-sdk-m"].includes(
|
|
@@ -1284,12 +1284,12 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1284
1284
|
(key) => toolsPrefixes.some((prefix) => key.startsWith(prefix))
|
|
1285
1285
|
))
|
|
1286
1286
|
return null;
|
|
1287
|
-
const
|
|
1287
|
+
const name2 = element.attributes[`${attribute}name`];
|
|
1288
1288
|
const max = element.attributes[`${attribute}maxSdkVersion`];
|
|
1289
|
-
if (!
|
|
1289
|
+
if (!name2 || /\$\{|^[@?]/.test(name2) || element.attributes[`${attribute}requiredFeature`] !== void 0 || element.attributes[`${attribute}requiredNotFeature`] !== void 0 || max !== void 0 && !/^\d+$/.test(max))
|
|
1290
1290
|
return null;
|
|
1291
1291
|
androidManifestPermissions.push({
|
|
1292
|
-
name,
|
|
1292
|
+
name: name2,
|
|
1293
1293
|
minSdkVersion: element.name === "uses-permission" ? 1 : 23,
|
|
1294
1294
|
...max === void 0 ? {} : { maxSdkVersion: Number(max) }
|
|
1295
1295
|
});
|
|
@@ -1313,15 +1313,15 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1313
1313
|
const root = document2.children[0];
|
|
1314
1314
|
if (document2.children.length === 1 && root?.name === "resources") {
|
|
1315
1315
|
const qualified = Object.entries(files).filter(
|
|
1316
|
-
([
|
|
1317
|
-
).flatMap(([
|
|
1316
|
+
([name2]) => name2.startsWith(`${resourceDirectory}/values-`) && name2.endsWith(".xml")
|
|
1317
|
+
).flatMap(([name2, source2]) => parseXml(source2, name2).children).flatMap((root2) => root2.children);
|
|
1318
1318
|
const visited = /* @__PURE__ */ new Set();
|
|
1319
1319
|
while (label?.startsWith("@string/") && !visited.has(label)) {
|
|
1320
1320
|
visited.add(label);
|
|
1321
|
-
const
|
|
1322
|
-
if (qualified.some((element) => element.attributes.name ===
|
|
1321
|
+
const name2 = label.slice("@string/".length);
|
|
1322
|
+
if (qualified.some((element) => element.attributes.name === name2)) break;
|
|
1323
1323
|
const matches = root.children.filter(
|
|
1324
|
-
(element) => (element.name === "string" || element.name === "item" && element.attributes.type === "string") && element.attributes.name ===
|
|
1324
|
+
(element) => (element.name === "string" || element.name === "item" && element.attributes.type === "string") && element.attributes.name === name2
|
|
1325
1325
|
);
|
|
1326
1326
|
const value = matches.length === 1 ? matches[0] : void 0;
|
|
1327
1327
|
if (!value || value.children.length) break;
|
|
@@ -1379,13 +1379,13 @@ function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, pr
|
|
|
1379
1379
|
const alternates = Object.fromEntries(
|
|
1380
1380
|
Object.entries(
|
|
1381
1381
|
isRecord(dictionary.CFBundleAlternateIcons) ? dictionary.CFBundleAlternateIcons : {}
|
|
1382
|
-
).map(([
|
|
1382
|
+
).map(([name2, declaration]) => [resolveReference(name2), declaration])
|
|
1383
1383
|
);
|
|
1384
1384
|
const resolve = (declaration, defaultName) => {
|
|
1385
1385
|
const entry = isRecord(declaration) ? declaration : {};
|
|
1386
|
-
const
|
|
1386
|
+
const name2 = typeof entry.CFBundleIconName === "string" ? resolveReference(entry.CFBundleIconName) : resolveReference(defaultName);
|
|
1387
1387
|
const catalogs = resources.filter(
|
|
1388
|
-
(file) => file.endsWith(`/${
|
|
1388
|
+
(file) => file.endsWith(`/${name2}.appiconset/Contents.json`)
|
|
1389
1389
|
);
|
|
1390
1390
|
const populatedCatalogs = [];
|
|
1391
1391
|
for (const catalog of catalogs) {
|
|
@@ -1406,7 +1406,7 @@ function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, pr
|
|
|
1406
1406
|
if (catalogCandidates.length > 0) populatedCatalogs.push(catalogCandidates);
|
|
1407
1407
|
}
|
|
1408
1408
|
if (populatedCatalogs.length > 1)
|
|
1409
|
-
throw new Error(`native app icon catalog ${
|
|
1409
|
+
throw new Error(`native app icon catalog ${name2} is ambiguous`);
|
|
1410
1410
|
const candidates = [];
|
|
1411
1411
|
if (populatedCatalogs.length === 1) {
|
|
1412
1412
|
candidates.push(...populatedCatalogs[0]);
|
|
@@ -1436,9 +1436,9 @@ function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, pr
|
|
|
1436
1436
|
return {
|
|
1437
1437
|
...primary.length ? { primary } : {},
|
|
1438
1438
|
alternates: Object.fromEntries(
|
|
1439
|
-
alternateNames.flatMap((
|
|
1440
|
-
const images = resolve(alternates[
|
|
1441
|
-
return images.length ? [[
|
|
1439
|
+
alternateNames.flatMap((name2) => {
|
|
1440
|
+
const images = resolve(alternates[name2], name2);
|
|
1441
|
+
return images.length ? [[name2, images]] : [];
|
|
1442
1442
|
})
|
|
1443
1443
|
)
|
|
1444
1444
|
};
|
|
@@ -1544,7 +1544,7 @@ function parseOpenStepPlist(text2) {
|
|
|
1544
1544
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1545
1545
|
var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
|
|
1546
1546
|
var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
|
|
1547
|
-
function xcodePathResolver(objects, projectDir,
|
|
1547
|
+
function xcodePathResolver(objects, projectDir, join7) {
|
|
1548
1548
|
const parents = /* @__PURE__ */ new Map();
|
|
1549
1549
|
for (const [id, entry] of Object.entries(objects)) {
|
|
1550
1550
|
if (!isDict(entry)) continue;
|
|
@@ -1560,13 +1560,13 @@ function xcodePathResolver(objects, projectDir, join4) {
|
|
|
1560
1560
|
let result = null;
|
|
1561
1561
|
if (isDict(entry)) {
|
|
1562
1562
|
const own = str(entry.path) ?? "";
|
|
1563
|
-
const
|
|
1564
|
-
if (
|
|
1565
|
-
else if (
|
|
1566
|
-
else if (
|
|
1563
|
+
const tree2 = str(entry.sourceTree) ?? "<group>";
|
|
1564
|
+
if (tree2 === "<absolute>") result = own;
|
|
1565
|
+
else if (tree2 === "SOURCE_ROOT") result = join7(projectDir, own);
|
|
1566
|
+
else if (tree2 === "<group>") {
|
|
1567
1567
|
const parent = parents.get(id);
|
|
1568
1568
|
const base = parent ? resolve(parent) : projectDir;
|
|
1569
|
-
if (base !== null) result =
|
|
1569
|
+
if (base !== null) result = join7(base, own);
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
paths.set(id, result);
|
|
@@ -1581,62 +1581,69 @@ function xcodeBuildFileBuildsForIos(buildFile) {
|
|
|
1581
1581
|
].filter((filter) => !!filter);
|
|
1582
1582
|
return !filters.length || filters.includes("ios");
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
if (phase.isa !== "PBXSourcesBuildPhase" && phase.isa !== "PBXResourcesBuildPhase")
|
|
1591
|
-
continue;
|
|
1592
|
-
for (const buildFileId of list(phase.files)) {
|
|
1593
|
-
const buildFile = objects[buildFileId];
|
|
1594
|
-
if (!isDict(buildFile) || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
1595
|
-
const refId = str(buildFile.fileRef);
|
|
1596
|
-
if (!refId) continue;
|
|
1597
|
-
const entry = objects[refId];
|
|
1598
|
-
const refs = isDict(entry) && entry.isa === "PBXVariantGroup" ? list(entry.children) : [refId];
|
|
1599
|
-
for (const id of refs) {
|
|
1600
|
-
const file = resolvePath(id);
|
|
1601
|
-
if (file === null) continue;
|
|
1602
|
-
if (phase.isa === "PBXSourcesBuildPhase") visit(file, "source");
|
|
1603
|
-
else for (const inner of filesUnder(file)) visit(inner, "resource");
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1584
|
+
function xcodeTargetMemberVisitor(objects) {
|
|
1585
|
+
const synchronizedGroups = [];
|
|
1586
|
+
for (const id of Object.keys(objects)) {
|
|
1587
|
+
const group = objects[id];
|
|
1588
|
+
if (isDict(group) && group.isa === "PBXFileSystemSynchronizedRootGroup")
|
|
1589
|
+
synchronizedGroups.push({ id, group });
|
|
1606
1590
|
}
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
if (!isDict(
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
const
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1591
|
+
return (targetId, resolvePath, filesUnder, join7, visit) => {
|
|
1592
|
+
const target = objects[targetId];
|
|
1593
|
+
if (!isDict(target)) return;
|
|
1594
|
+
for (const phaseId of list(target.buildPhases)) {
|
|
1595
|
+
const phase = objects[phaseId];
|
|
1596
|
+
if (!isDict(phase)) continue;
|
|
1597
|
+
if (phase.isa !== "PBXSourcesBuildPhase" && phase.isa !== "PBXResourcesBuildPhase")
|
|
1598
|
+
continue;
|
|
1599
|
+
for (const buildFileId of list(phase.files)) {
|
|
1600
|
+
const buildFile = objects[buildFileId];
|
|
1601
|
+
if (!isDict(buildFile) || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
1602
|
+
const refId = str(buildFile.fileRef);
|
|
1603
|
+
if (!refId) continue;
|
|
1604
|
+
const entry = objects[refId];
|
|
1605
|
+
const refs = isDict(entry) && entry.isa === "PBXVariantGroup" ? list(entry.children) : [refId];
|
|
1606
|
+
for (const id of refs) {
|
|
1607
|
+
const file = resolvePath(id);
|
|
1608
|
+
if (file === null) continue;
|
|
1609
|
+
if (phase.isa === "PBXSourcesBuildPhase") visit(file, "source");
|
|
1610
|
+
else for (const inner of filesUnder(file)) visit(inner, "resource");
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1619
1613
|
}
|
|
1620
|
-
const
|
|
1621
|
-
for (const
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
);
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
if (!
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1614
|
+
const owned = new Set(list(target.fileSystemSynchronizedGroups));
|
|
1615
|
+
for (const { id: groupId, group } of synchronizedGroups) {
|
|
1616
|
+
const folder = resolvePath(groupId);
|
|
1617
|
+
if (folder === null) continue;
|
|
1618
|
+
const prefix = folder === "" ? "" : `${folder.replace(/\/$/, "")}/`;
|
|
1619
|
+
const exceptions = /* @__PURE__ */ new Set();
|
|
1620
|
+
for (const exceptionId of list(group.exceptions)) {
|
|
1621
|
+
const exception = objects[exceptionId];
|
|
1622
|
+
if (!isDict(exception) || exception.target !== targetId) continue;
|
|
1623
|
+
for (const relative2 of list(exception.membershipExceptions))
|
|
1624
|
+
exceptions.add(relative2);
|
|
1625
|
+
}
|
|
1626
|
+
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative2) => filesUnder(join7(folder, relative2)));
|
|
1627
|
+
for (const file of members) {
|
|
1628
|
+
const relative2 = file.slice(prefix.length);
|
|
1629
|
+
const excepted = [...exceptions].some(
|
|
1630
|
+
(exception) => relative2 === exception || relative2.startsWith(`${exception}/`)
|
|
1634
1631
|
);
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1632
|
+
if (owned.has(groupId) === excepted || NEVER_MEMBER.test(relative2)) continue;
|
|
1633
|
+
if (file.endsWith(".swift")) {
|
|
1634
|
+
if (!relative2.split("/").some((segment) => BUNDLE_DIR.test(segment)))
|
|
1635
|
+
visit(file, "source");
|
|
1636
|
+
} else if (/\.(h|hh|hpp|hxx|pch)$/.test(file)) {
|
|
1637
|
+
visit(
|
|
1638
|
+
file,
|
|
1639
|
+
relative2.split("/").some((segment) => BUNDLE_DIR.test(segment)) ? "resource" : "header"
|
|
1640
|
+
);
|
|
1641
|
+
} else if (/\.(m|mm|c|cc|cpp|cxx|metal)$/.test(file)) {
|
|
1642
|
+
visit(file, "source");
|
|
1643
|
+
} else visit(file, "resource");
|
|
1644
|
+
}
|
|
1638
1645
|
}
|
|
1639
|
-
}
|
|
1646
|
+
};
|
|
1640
1647
|
}
|
|
1641
1648
|
|
|
1642
1649
|
// src/native-app-identity.ts
|
|
@@ -1747,13 +1754,13 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
|
|
|
1747
1754
|
(candidate) => candidate.name === "Release" && named(candidate.settings)
|
|
1748
1755
|
)?.settings ?? null;
|
|
1749
1756
|
}
|
|
1750
|
-
var APP_DELEGATE_PATH_RE = /(?:^|\/)ios\/([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
1757
|
+
var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
1751
1758
|
function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
|
|
1752
1759
|
const pbxprojPath = Object.keys(files).find(
|
|
1753
|
-
(
|
|
1760
|
+
(path27) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path27)
|
|
1754
1761
|
) ?? Object.keys(files).find(
|
|
1755
|
-
(
|
|
1756
|
-
) ?? Object.keys(files).find((
|
|
1762
|
+
(path27) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path27)
|
|
1763
|
+
) ?? Object.keys(files).find((path27) => /(?:^|\/)project\.pbxproj$/.test(path27));
|
|
1757
1764
|
if (!pbxprojPath) return null;
|
|
1758
1765
|
const pbxproj = files[pbxprojPath];
|
|
1759
1766
|
let objects = {};
|
|
@@ -1795,8 +1802,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1795
1802
|
} else if (applicationTargetNames.size === 1) {
|
|
1796
1803
|
targetName = [...applicationTargetNames][0];
|
|
1797
1804
|
} else if (applicationTargetNames.size > 1) {
|
|
1798
|
-
const delegateTargets = Object.keys(files).filter((
|
|
1799
|
-
(
|
|
1805
|
+
const delegateTargets = Object.keys(files).filter((path27) => !path27.includes("/Pods/")).map((path27) => path27.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
|
|
1806
|
+
(name2) => typeof name2 === "string" && applicationTargetNames.has(name2)
|
|
1800
1807
|
);
|
|
1801
1808
|
if (delegateTargets.length === 1) {
|
|
1802
1809
|
targetName = delegateTargets[0];
|
|
@@ -1900,8 +1907,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1900
1907
|
const icons = dictionary.CFBundleIcons;
|
|
1901
1908
|
const alternates = isRecord(icons) ? icons.CFBundleAlternateIcons : void 0;
|
|
1902
1909
|
const alternateIconNames = /* @__PURE__ */ new Set();
|
|
1903
|
-
for (const
|
|
1904
|
-
const resolved = resolveBuildSetting(
|
|
1910
|
+
for (const name2 of isRecord(alternates) ? Object.keys(alternates) : []) {
|
|
1911
|
+
const resolved = resolveBuildSetting(name2, settings);
|
|
1905
1912
|
if (resolved === null) throw new Error("native alternate icon name is unresolved");
|
|
1906
1913
|
alternateIconNames.add(resolved);
|
|
1907
1914
|
}
|
|
@@ -1993,7 +2000,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1993
2000
|
if (resourceUri) {
|
|
1994
2001
|
if (!selectedTarget)
|
|
1995
2002
|
throw new Error("native app icon target membership is unresolved");
|
|
1996
|
-
const
|
|
2003
|
+
const join7 = (base, own) => {
|
|
1997
2004
|
const segments = [];
|
|
1998
2005
|
for (const segment of `${base}/${own}`.split("/")) {
|
|
1999
2006
|
if (segment === "" || segment === ".") continue;
|
|
@@ -2006,23 +2013,22 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2006
2013
|
const project = Object.values(objects).find(
|
|
2007
2014
|
(object) => isRecord(object) && object.isa === "PBXProject"
|
|
2008
2015
|
);
|
|
2009
|
-
const projectDir =
|
|
2016
|
+
const projectDir = join7(
|
|
2010
2017
|
pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
|
|
2011
2018
|
isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
|
|
2012
2019
|
);
|
|
2013
2020
|
const paths = Object.keys(files);
|
|
2014
|
-
|
|
2015
|
-
objects,
|
|
2021
|
+
xcodeTargetMemberVisitor(objects)(
|
|
2016
2022
|
selectedTarget.id,
|
|
2017
|
-
xcodePathResolver(objects, projectDir,
|
|
2023
|
+
xcodePathResolver(objects, projectDir, join7),
|
|
2018
2024
|
(file) => {
|
|
2019
2025
|
if (Object.hasOwn(files, file)) return [file];
|
|
2020
2026
|
const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
2021
2027
|
return paths.filter(
|
|
2022
|
-
(
|
|
2028
|
+
(path27) => path27.startsWith(prefix) && !/(?:^|\/)\./.test(path27.slice(prefix.length))
|
|
2023
2029
|
);
|
|
2024
2030
|
},
|
|
2025
|
-
|
|
2031
|
+
join7,
|
|
2026
2032
|
(file, kind) => {
|
|
2027
2033
|
if (kind === "resource") resources.add(file);
|
|
2028
2034
|
}
|
|
@@ -2030,7 +2036,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2030
2036
|
}
|
|
2031
2037
|
const rootModuleName = readRootModuleName(
|
|
2032
2038
|
Object.entries(files).filter(
|
|
2033
|
-
([
|
|
2039
|
+
([path27]) => !path27.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path27) || path27.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
|
|
2034
2040
|
).map(([, source]) => source)
|
|
2035
2041
|
);
|
|
2036
2042
|
return {
|
|
@@ -2121,24 +2127,344 @@ function parsePlistSource(source) {
|
|
|
2121
2127
|
return plist.parse(source);
|
|
2122
2128
|
}
|
|
2123
2129
|
|
|
2124
|
-
// src/
|
|
2130
|
+
// src/swift-objc-standin.ts
|
|
2125
2131
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2126
|
-
import { execFileSync as
|
|
2127
|
-
import { createHash as
|
|
2128
|
-
import
|
|
2132
|
+
import { execFileSync as execFileSync2, spawnSync as spawnSync2 } from "node:child_process";
|
|
2133
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
2134
|
+
import fs2 from "node:fs";
|
|
2129
2135
|
import path5 from "node:path";
|
|
2136
|
+
|
|
2137
|
+
// src/swift-objc-platform.ts
|
|
2138
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2139
|
+
import { spawnSync } from "node:child_process";
|
|
2140
|
+
import path2 from "node:path";
|
|
2141
|
+
|
|
2142
|
+
// src/swift-toolchain.ts
|
|
2143
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2144
|
+
import { execFile, execFileSync } from "node:child_process";
|
|
2145
|
+
import { createHash } from "node:crypto";
|
|
2146
|
+
import fs from "node:fs";
|
|
2147
|
+
import os from "node:os";
|
|
2148
|
+
import path from "node:path";
|
|
2149
|
+
import { fileURLToPath } from "node:url";
|
|
2150
|
+
import { promisify } from "node:util";
|
|
2151
|
+
function peachsimPackageRoot() {
|
|
2152
|
+
let dir = import.meta.dirname;
|
|
2153
|
+
while (!fs.existsSync(path.join(dir, "package.json")) && dir !== path.dirname(dir))
|
|
2154
|
+
dir = path.dirname(dir);
|
|
2155
|
+
return dir;
|
|
2156
|
+
}
|
|
2157
|
+
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2158
|
+
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
2159
|
+
var compilerArchives = {
|
|
2160
|
+
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
2161
|
+
identity: "0b2d0a9011c88e66",
|
|
2162
|
+
hosts: {
|
|
2163
|
+
"darwin-arm64": {
|
|
2164
|
+
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
2165
|
+
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
2166
|
+
},
|
|
2167
|
+
"linux-x64": {
|
|
2168
|
+
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
2169
|
+
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
2170
|
+
},
|
|
2171
|
+
"linux-arm64": {
|
|
2172
|
+
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
2173
|
+
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
},
|
|
2177
|
+
"swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
|
|
2178
|
+
identity: "f7c03c3f59ec5d83",
|
|
2179
|
+
hosts: {
|
|
2180
|
+
"darwin-arm64": {
|
|
2181
|
+
checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
|
|
2182
|
+
manifest: "2a7754e6e365bf71ae6b6aefbbd810123795c73d43fb902a8a972d009d72790f"
|
|
2183
|
+
},
|
|
2184
|
+
"linux-x64": {
|
|
2185
|
+
checksum: "5ffa3b54d54583c1d6a38b708693072db4d088ba4bf5966b17014c068b2db641",
|
|
2186
|
+
manifest: "1b23ea52c5570de4697481a54bd0b0a0bcd6b54feccb7b0bb940d3643dec82cb"
|
|
2187
|
+
},
|
|
2188
|
+
"linux-arm64": {
|
|
2189
|
+
checksum: "29b0b97b7b0db4475dbe55f7011e57f493fed9f3482a6705becebd8b68c90bab",
|
|
2190
|
+
manifest: "3fdab1132715f5899de1bb1d7ddcd52cf540295ab86586c72f49502f37a403a1"
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
"swift-6.4.0-RELEASE-custom-3e3dca8fd1d82975": {
|
|
2195
|
+
identity: "3e3dca8fd1d82975",
|
|
2196
|
+
hosts: {
|
|
2197
|
+
"darwin-arm64": {
|
|
2198
|
+
checksum: "dfad56454f5e1e465071ff708bf485be65b438cf55d02b04d26d17d26df9f54a",
|
|
2199
|
+
manifest: "82c35e43ed81101bea500100356a555d8266e1987d5ca7605aaa4df747c38f81"
|
|
2200
|
+
},
|
|
2201
|
+
"linux-x64": {
|
|
2202
|
+
checksum: "d3f5908d097fdc1337ff979114e605bcc758052e32f9d5d760574153d58ce6db",
|
|
2203
|
+
manifest: "a03caf181177f3d68a45b5246d0f0a26d8a5fa9ff33cf44c44e6942b73363bae"
|
|
2204
|
+
},
|
|
2205
|
+
"linux-arm64": {
|
|
2206
|
+
checksum: "8fceafca152dd0692aa6bb51236fc362a4caeeef37fc22cb5ef6aa3d0d5b3df3",
|
|
2207
|
+
manifest: "3115bc496fd8e907a16992dfc5c85b3e0798d3b58ddf1d6dace63842aed8e53b"
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
},
|
|
2211
|
+
"swift-6.4.0-RELEASE-custom-b082ac5437336790": {
|
|
2212
|
+
identity: "b082ac5437336790",
|
|
2213
|
+
hosts: {
|
|
2214
|
+
"darwin-arm64": {
|
|
2215
|
+
checksum: "85e601982321d3a6f81f05928bc9bbe7a61bc75b27ce24508e79f6b5b537254d",
|
|
2216
|
+
manifest: "c889a70c6bba48eb0e5e218a5c0077eb557082fed5c5c58d10f07a941975080e"
|
|
2217
|
+
},
|
|
2218
|
+
"linux-x64": {
|
|
2219
|
+
checksum: "54c7988622d201e4ba6c83ca75e7b28c658b39cf1ea8b95ea88807afe33aa465",
|
|
2220
|
+
manifest: "bfd725c3b07a3624bb44c8e3a1b7ddf1eddde4fc9565e23740a9cee832c94583"
|
|
2221
|
+
},
|
|
2222
|
+
"linux-arm64": {
|
|
2223
|
+
checksum: "bd729fd73dc9953306eafd87eda79462b836b3cb127c73108327d7256b15f501",
|
|
2224
|
+
manifest: "e7f8827cca0f249a5b4a4750f6324f75633b374985fa0b93e650ee8bfcabeb39"
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
},
|
|
2228
|
+
"swift-6.4.0-RELEASE-custom-9cdaffdb6b37fb47": {
|
|
2229
|
+
identity: "9cdaffdb6b37fb47",
|
|
2230
|
+
hosts: {
|
|
2231
|
+
"darwin-arm64": {
|
|
2232
|
+
checksum: "fdd3f88cf76a8dc2083275d4253255030068a25b5ba68acbf59e0407c45677dd",
|
|
2233
|
+
manifest: "f50c68faf91f7d2a6ea5bcd4da4573a49dd00ad9f334b27d3f9ddb08b65e46cc"
|
|
2234
|
+
},
|
|
2235
|
+
"linux-x64": {
|
|
2236
|
+
checksum: "f29f9efc598b17f33d802467676ba282441a8c3c6fa67e307c4a1e6130509d73",
|
|
2237
|
+
manifest: "f907727c5a4af58ccad7ccbb043a21289d7eb37d166536a90b3c3848f95df816"
|
|
2238
|
+
},
|
|
2239
|
+
"linux-arm64": {
|
|
2240
|
+
checksum: "7d4a8a1f90dd6c86804ceb43f8b9cf680b9778d4640a2eb6da5cb333a599f23a",
|
|
2241
|
+
manifest: "a3224cd5c09a92f66cacd0395058b2c43fa103a92bb168280132bbd0febd1575"
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
2246
|
+
identity: SWIFT_HOST_COMPILER_ID,
|
|
2247
|
+
hosts: {
|
|
2248
|
+
"darwin-arm64": {
|
|
2249
|
+
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
2250
|
+
manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
|
|
2251
|
+
},
|
|
2252
|
+
"linux-x64": {
|
|
2253
|
+
checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
|
|
2254
|
+
manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
|
|
2255
|
+
},
|
|
2256
|
+
"linux-arm64": {
|
|
2257
|
+
checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
|
|
2258
|
+
manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
};
|
|
2263
|
+
|
|
2264
|
+
// src/swift-objc-sdk.ts
|
|
2265
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2266
|
+
import path4 from "node:path";
|
|
2267
|
+
|
|
2268
|
+
// src/swift-objc-sdk-tree.ts
|
|
2269
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2270
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
2271
|
+
import path3 from "node:path";
|
|
2272
|
+
function readIosSdkTree(root) {
|
|
2273
|
+
return readdirSync(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => {
|
|
2274
|
+
const file = path3.join(entry.parentPath, entry.name);
|
|
2275
|
+
return [
|
|
2276
|
+
path3.relative(root, file).split(path3.sep).join("/"),
|
|
2277
|
+
readFileSync(file, "utf8")
|
|
2278
|
+
];
|
|
2279
|
+
}).sort(([a], [b]) => a < b ? -1 : 1);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
// src/swift-objc-sdk.ts
|
|
2283
|
+
var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
|
|
2284
|
+
var OVERLAY_PATH = /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/;
|
|
2285
|
+
var tree = typeof __PEACH_BUNDLED_IOS_SDK__ === "undefined" ? readIosSdkTree(path4.join(peachsimPackageRoot(), "sdk", "ios")) : Object.entries(__PEACH_BUNDLED_IOS_SDK__).sort(([a], [b]) => a < b ? -1 : 1);
|
|
2286
|
+
var IOS_SDK_HEADERS = {};
|
|
2287
|
+
var IOS_SDK_OVERLAYS = {};
|
|
2288
|
+
for (const [file, text2] of tree) {
|
|
2289
|
+
const module = OVERLAY_PATH.exec(file)?.[1];
|
|
2290
|
+
if (module === void 0) {
|
|
2291
|
+
IOS_SDK_HEADERS[file] = text2;
|
|
2292
|
+
continue;
|
|
2293
|
+
}
|
|
2294
|
+
const header = `// swift-interface-format-version: 1.0
|
|
2295
|
+
// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}
|
|
2296
|
+
`;
|
|
2297
|
+
if (!text2.startsWith(header))
|
|
2298
|
+
throw new Error(`sdk overlay ${file} has the wrong interface header`);
|
|
2299
|
+
IOS_SDK_OVERLAYS[module] = text2.slice(header.length);
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
// src/swift-package.ts
|
|
2303
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2304
|
+
var SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS = [
|
|
2305
|
+
".c",
|
|
2306
|
+
".cc",
|
|
2307
|
+
".cpp",
|
|
2308
|
+
".cxx",
|
|
2309
|
+
".m",
|
|
2310
|
+
".mm"
|
|
2311
|
+
];
|
|
2312
|
+
function isSwiftNativeTranslationUnit(file) {
|
|
2313
|
+
return SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS.some(
|
|
2314
|
+
(extension) => file.endsWith(extension)
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
2317
|
+
var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
2318
|
+
...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
|
|
2319
|
+
".s",
|
|
2320
|
+
".S",
|
|
2321
|
+
".h",
|
|
2322
|
+
".hh",
|
|
2323
|
+
".hpp",
|
|
2324
|
+
".hxx",
|
|
2325
|
+
".pch",
|
|
2326
|
+
".inc",
|
|
2327
|
+
".inl",
|
|
2328
|
+
".ipp",
|
|
2329
|
+
".def",
|
|
2330
|
+
".modulemap"
|
|
2331
|
+
];
|
|
2332
|
+
function moduleMapTokens(text2) {
|
|
2333
|
+
return (text2.match(/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|[\w.*]+|[{}\[\]]/g) ?? []).filter((token) => !token.startsWith("/"));
|
|
2334
|
+
}
|
|
2335
|
+
function moduleMapName(text2) {
|
|
2336
|
+
const tokens = moduleMapTokens(text2);
|
|
2337
|
+
const index = tokens.findIndex(
|
|
2338
|
+
(token, i) => token === "module" && tokens[i - 1] !== "extern"
|
|
2339
|
+
);
|
|
2340
|
+
return index < 0 ? void 0 : tokens[index + 1];
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
// src/swift-objc-standin.ts
|
|
2344
|
+
var NATIVE_GRAPH_SDK_VERSION = "27.1";
|
|
2345
|
+
var WASI_EMULATION = [
|
|
2346
|
+
"_WASI_EMULATED_SIGNAL",
|
|
2347
|
+
"_WASI_EMULATED_MMAN",
|
|
2348
|
+
"_WASI_EMULATED_PROCESS_CLOCKS"
|
|
2349
|
+
];
|
|
2350
|
+
var WASI_EMULATION_FLAGS = WASI_EMULATION.map((name2) => `-D${name2}`);
|
|
2351
|
+
var NATIVE_GRAPH_INPUTS = {
|
|
2352
|
+
sdk: NATIVE_GRAPH_SDK_VERSION,
|
|
2353
|
+
settings: "e68503e5e534e9194af5efe8c636ca8b824e2d8237c5f38ec84aa4d155bc8418",
|
|
2354
|
+
build: "ff785237ba22f1d8f347a5c4f4c68400a387c6d935ef3a443545a72faef57e70",
|
|
2355
|
+
compiler: "Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)",
|
|
2356
|
+
target: IOS_SDK_TARGET
|
|
2357
|
+
};
|
|
2358
|
+
var NATIVE_GRAPH_ID = createHash2("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
2359
|
+
function stripExternalSourceMarks(text2) {
|
|
2360
|
+
return text2.split("\n").map(
|
|
2361
|
+
(line) => line.startsWith("#define PEACH_SWIFT_CLASS(") ? line : line.replace(/PEACH_SWIFT_CLASS\(\w+\)\s*/g, "")
|
|
2362
|
+
).join("\n");
|
|
2363
|
+
}
|
|
2364
|
+
function iosSdkEntries() {
|
|
2365
|
+
const overlays = Object.entries(IOS_SDK_OVERLAYS).map(
|
|
2366
|
+
([module, text2]) => [
|
|
2367
|
+
`usr/lib/swift/${module}.swiftmodule/arm64-apple-ios-simulator.swiftinterface`,
|
|
2368
|
+
`// swift-interface-format-version: 1.0
|
|
2369
|
+
// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}
|
|
2370
|
+
${text2}`
|
|
2371
|
+
]
|
|
2372
|
+
);
|
|
2373
|
+
const headers = Object.entries(IOS_SDK_HEADERS).map(
|
|
2374
|
+
([file, text2]) => [file, stripExternalSourceMarks(text2)]
|
|
2375
|
+
);
|
|
2376
|
+
return [...headers, ...overlays].sort(([a], [b]) => a < b ? -1 : 1);
|
|
2377
|
+
}
|
|
2378
|
+
var IOS_SDK_ID = createHash2("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
|
|
2379
|
+
|
|
2380
|
+
// src/xcode-project.ts
|
|
2381
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2382
|
+
import { execFileSync as execFileSync9 } from "node:child_process";
|
|
2383
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
2384
|
+
import fs14 from "node:fs";
|
|
2385
|
+
import path25 from "node:path";
|
|
2130
2386
|
import plist2 from "plist";
|
|
2131
2387
|
|
|
2388
|
+
// src/prepared-xcode-phases.ts
|
|
2389
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2390
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
2391
|
+
import fs3 from "node:fs";
|
|
2392
|
+
import path6 from "node:path";
|
|
2393
|
+
var workspaces = /* @__PURE__ */ new Map();
|
|
2394
|
+
var recording;
|
|
2395
|
+
function relativeFile(root, file) {
|
|
2396
|
+
const relative2 = path6.relative(root, file);
|
|
2397
|
+
if (!relative2 || relative2 === ".." || relative2.startsWith(`..${path6.sep}`) || path6.isAbsolute(relative2))
|
|
2398
|
+
throw new Error(`prepared Xcode output is outside its workspace: ${file}`);
|
|
2399
|
+
return relative2.split(path6.sep).join("/");
|
|
2400
|
+
}
|
|
2401
|
+
function output(root, file) {
|
|
2402
|
+
const relative2 = relativeFile(root, file);
|
|
2403
|
+
const stat = fs3.statSync(file, { throwIfNoEntry: false });
|
|
2404
|
+
if (!stat) return { path: relative2, sha256: null };
|
|
2405
|
+
if (!stat.isFile()) throw new Error(`prepared Xcode output is not a file: ${file}`);
|
|
2406
|
+
relativeFile(root, fs3.realpathSync(file));
|
|
2407
|
+
const bytes = fs3.readFileSync(file);
|
|
2408
|
+
const prefix = Buffer.from(root);
|
|
2409
|
+
const hash = createHash3("sha256");
|
|
2410
|
+
let offset = 0;
|
|
2411
|
+
for (let index = bytes.indexOf(prefix); index !== -1; index = bytes.indexOf(prefix, offset)) {
|
|
2412
|
+
hash.update(bytes.subarray(offset, index)).update("\0workspace\0");
|
|
2413
|
+
offset = index + prefix.length;
|
|
2414
|
+
}
|
|
2415
|
+
hash.update(bytes.subarray(offset));
|
|
2416
|
+
return {
|
|
2417
|
+
path: relative2,
|
|
2418
|
+
sha256: hash.digest("hex")
|
|
2419
|
+
};
|
|
2420
|
+
}
|
|
2421
|
+
function preparedXcodePhase(project, target, phase, configuration, outputs, recorded) {
|
|
2422
|
+
const root = recording?.root ?? [...workspaces.keys()].find((root2) => {
|
|
2423
|
+
const relative2 = path6.relative(root2, project);
|
|
2424
|
+
return relative2 !== ".." && !relative2.startsWith(`..${path6.sep}`) && !path6.isAbsolute(relative2);
|
|
2425
|
+
});
|
|
2426
|
+
if (!root) return false;
|
|
2427
|
+
const entry = {
|
|
2428
|
+
project: relativeFile(root, project),
|
|
2429
|
+
target,
|
|
2430
|
+
phase,
|
|
2431
|
+
configuration,
|
|
2432
|
+
outputs: outputs.map((file) => output(root, file))
|
|
2433
|
+
};
|
|
2434
|
+
if (recorded) {
|
|
2435
|
+
if (recording) {
|
|
2436
|
+
const previous = recording.phases.find(
|
|
2437
|
+
(item) => item.project === entry.project && item.target === target && item.phase === phase && item.configuration === configuration
|
|
2438
|
+
);
|
|
2439
|
+
if (previous && JSON.stringify(previous.outputs) !== JSON.stringify(entry.outputs))
|
|
2440
|
+
throw new Error(
|
|
2441
|
+
`Xcode phase produced inconsistent outputs: ${project} ${target} ${phase}`
|
|
2442
|
+
);
|
|
2443
|
+
if (!previous) recording.phases.push(entry);
|
|
2444
|
+
}
|
|
2445
|
+
return false;
|
|
2446
|
+
}
|
|
2447
|
+
if (recording) return false;
|
|
2448
|
+
const expected = workspaces.get(root)?.phases.find(
|
|
2449
|
+
(item) => item.project === entry.project && item.target === target && item.phase === phase && item.configuration === configuration
|
|
2450
|
+
);
|
|
2451
|
+
if (!expected || JSON.stringify(expected.outputs) !== JSON.stringify(entry.outputs))
|
|
2452
|
+
throw new Error(
|
|
2453
|
+
`prepared Xcode phase does not match its attested outputs: ${project} ${target} ${phase}`
|
|
2454
|
+
);
|
|
2455
|
+
return true;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2132
2458
|
// src/swift-coverage/xcode-assets.ts
|
|
2133
2459
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2134
|
-
import { createHash as
|
|
2135
|
-
import { readFileSync as
|
|
2460
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
2461
|
+
import { readFileSync as readFileSync4, readdirSync as readdirSync3, statSync, writeFileSync } from "node:fs";
|
|
2136
2462
|
import { join as join3, relative, sep } from "node:path";
|
|
2137
2463
|
|
|
2138
2464
|
// src/swift-coverage/provenance.ts
|
|
2139
2465
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2140
|
-
import { createHash } from "node:crypto";
|
|
2141
|
-
import { readFileSync } from "node:fs";
|
|
2466
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
2467
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2142
2468
|
import { join } from "node:path";
|
|
2143
2469
|
var SWIFT_COVERAGE_DIGEST_SOURCES = [
|
|
2144
2470
|
"swift-coverage/indexdump.ts",
|
|
@@ -2169,7 +2495,7 @@ function swiftCoverageSourceDigests(srcDir) {
|
|
|
2169
2495
|
return Object.fromEntries(
|
|
2170
2496
|
SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
|
|
2171
2497
|
file,
|
|
2172
|
-
|
|
2498
|
+
createHash4("sha256").update(readFileSync2(join(srcDir, file))).digest("hex")
|
|
2173
2499
|
])
|
|
2174
2500
|
);
|
|
2175
2501
|
}
|
|
@@ -2177,7 +2503,7 @@ var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_defaul
|
|
|
2177
2503
|
|
|
2178
2504
|
// src/swift-coverage/xcode-asset-symbols.ts
|
|
2179
2505
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2180
|
-
import { existsSync, readdirSync, readFileSync as
|
|
2506
|
+
import { existsSync, readdirSync as readdirSync2, readFileSync as readFileSync3 } from "node:fs";
|
|
2181
2507
|
import { extname, join as join2 } from "node:path";
|
|
2182
2508
|
var silentTypes = /* @__PURE__ */ new Set([
|
|
2183
2509
|
"appiconset",
|
|
@@ -2355,510 +2681,410 @@ var assetSymbolSettingKeys = [
|
|
|
2355
2681
|
"ASSETCATALOG_OTHER_FLAGS"
|
|
2356
2682
|
];
|
|
2357
2683
|
|
|
2358
|
-
// src/swift-package.ts
|
|
2684
|
+
// src/swift-package-manifest.ts
|
|
2359
2685
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
".
|
|
2379
|
-
".hpp",
|
|
2380
|
-
".hxx",
|
|
2381
|
-
".pch",
|
|
2382
|
-
".inc",
|
|
2383
|
-
".inl",
|
|
2384
|
-
".modulemap"
|
|
2385
|
-
];
|
|
2386
|
-
function moduleMapTokens(text2) {
|
|
2387
|
-
return (text2.match(/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|[\w.*]+|[{}\[\]]/g) ?? []).filter((token) => !token.startsWith("/"));
|
|
2686
|
+
import {
|
|
2687
|
+
execFile as execFile3,
|
|
2688
|
+
execFileSync as execFileSync8
|
|
2689
|
+
} from "node:child_process";
|
|
2690
|
+
import { createHash as createHash12 } from "node:crypto";
|
|
2691
|
+
import fs13 from "node:fs";
|
|
2692
|
+
import os8 from "node:os";
|
|
2693
|
+
import path23 from "node:path";
|
|
2694
|
+
import { promisify as promisify3 } from "node:util";
|
|
2695
|
+
|
|
2696
|
+
// src/home-paths.ts
|
|
2697
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2698
|
+
import { randomUUID } from "node:crypto";
|
|
2699
|
+
import fs4 from "node:fs";
|
|
2700
|
+
import { homedir } from "node:os";
|
|
2701
|
+
import path7 from "node:path";
|
|
2702
|
+
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
2703
|
+
function ambientHomeDir() {
|
|
2704
|
+
return path7.join(homedir(), ".peach");
|
|
2388
2705
|
}
|
|
2389
|
-
function
|
|
2390
|
-
const
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
);
|
|
2394
|
-
return index < 0 ? void 0 : tokens[index + 1];
|
|
2706
|
+
function rnxHomeDir() {
|
|
2707
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
2708
|
+
if (override && override.length > 0) return path7.resolve(override);
|
|
2709
|
+
return ambientHomeDir();
|
|
2395
2710
|
}
|
|
2396
|
-
function
|
|
2397
|
-
|
|
2398
|
-
return (path7.split("/").pop() ?? path7).replace(/\.git$/, "").toLowerCase();
|
|
2711
|
+
function cacheDir() {
|
|
2712
|
+
return path7.join(rnxHomeDir(), "cache");
|
|
2399
2713
|
}
|
|
2714
|
+
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
2715
|
+
|
|
2716
|
+
// src/swift-distribution.ts
|
|
2717
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2718
|
+
import fs12 from "node:fs";
|
|
2719
|
+
import os7 from "node:os";
|
|
2720
|
+
import path22 from "node:path";
|
|
2721
|
+
|
|
2722
|
+
// ../contrast-runtime-delivery/src/index.ts
|
|
2723
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2724
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
2725
|
+
import crypto from "node:crypto";
|
|
2726
|
+
import fs6 from "node:fs";
|
|
2727
|
+
import os2 from "node:os";
|
|
2728
|
+
import path9 from "node:path";
|
|
2729
|
+
import { Readable } from "node:stream";
|
|
2730
|
+
import { pipeline } from "node:stream/promises";
|
|
2731
|
+
|
|
2732
|
+
// src/process-group.ts
|
|
2733
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2734
|
+
import { spawn, spawnSync as spawnSync4 } from "node:child_process";
|
|
2735
|
+
import {
|
|
2736
|
+
appendFileSync,
|
|
2737
|
+
mkdtempSync,
|
|
2738
|
+
readdirSync as readdirSync5,
|
|
2739
|
+
readFileSync as readFileSync6,
|
|
2740
|
+
rmSync,
|
|
2741
|
+
writeFileSync as writeFileSync2
|
|
2742
|
+
} from "node:fs";
|
|
2743
|
+
import { tmpdir } from "node:os";
|
|
2744
|
+
import { join as join4 } from "node:path";
|
|
2745
|
+
import { Duplex } from "node:stream";
|
|
2746
|
+
import { setTimeout as sleep } from "node:timers/promises";
|
|
2747
|
+
|
|
2748
|
+
// src/process-table.ts
|
|
2749
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2750
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
2751
|
+
import { readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
|
|
2752
|
+
import { endianness } from "node:os";
|
|
2753
|
+
|
|
2754
|
+
// ../contrast-runtime-delivery/src/product.ts
|
|
2755
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2756
|
+
import fs5 from "node:fs";
|
|
2757
|
+
import path8 from "node:path";
|
|
2758
|
+
|
|
2759
|
+
// ../contrast-runtime-delivery/src/version.ts
|
|
2760
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2761
|
+
|
|
2762
|
+
// cli/drivers/linux-browser-libs.ts
|
|
2763
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2764
|
+
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
2765
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
2766
|
+
import { join as join6 } from "node:path";
|
|
2767
|
+
|
|
2768
|
+
// cli/cli-update.ts
|
|
2769
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2770
|
+
import fs7 from "node:fs";
|
|
2771
|
+
import path10 from "node:path";
|
|
2772
|
+
|
|
2773
|
+
// src/automatic-update-policy.ts
|
|
2774
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2775
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
2776
|
+
import { join as join5 } from "node:path";
|
|
2777
|
+
|
|
2778
|
+
// src/cli-version.ts
|
|
2779
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2780
|
+
import { readFileSync as readFileSync7 } from "node:fs";
|
|
2781
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
2782
|
+
|
|
2783
|
+
// src/public-brand.ts
|
|
2784
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2785
|
+
var name = "Peach";
|
|
2786
|
+
var peachPublicBrand = Object.freeze({
|
|
2787
|
+
name,
|
|
2788
|
+
packageName: "peachsim",
|
|
2789
|
+
commandName: "peach",
|
|
2790
|
+
domain: "peachsim.com",
|
|
2791
|
+
origin: "https://peachsim.com",
|
|
2792
|
+
boxOrigin: "https://rnx-box.contrast.dev"
|
|
2793
|
+
});
|
|
2794
|
+
|
|
2795
|
+
// cli/commands/inspect/env.ts
|
|
2796
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2797
|
+
|
|
2798
|
+
// cli/cli-update.ts
|
|
2799
|
+
var CLI_UPDATE_CHECK_INTERVAL_MS = 20 * 60 * 60 * 1e3;
|
|
2800
|
+
var CLI_UPDATE_NOTIFICATION_COOLDOWN_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
2801
|
+
|
|
2802
|
+
// src/swift-compile.ts
|
|
2803
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2804
|
+
import {
|
|
2805
|
+
spawn as spawn4,
|
|
2806
|
+
execFileSync as execFileSync7
|
|
2807
|
+
} from "node:child_process";
|
|
2808
|
+
import { createHash as createHash11, randomUUID as randomUUID4 } from "node:crypto";
|
|
2809
|
+
import {
|
|
2810
|
+
cpSync,
|
|
2811
|
+
existsSync as existsSync6,
|
|
2812
|
+
mkdirSync as mkdirSync3,
|
|
2813
|
+
mkdtempSync as mkdtempSync3,
|
|
2814
|
+
readFileSync as readFileSync14,
|
|
2815
|
+
readdirSync as readdirSync10,
|
|
2816
|
+
realpathSync as realpathSync3,
|
|
2817
|
+
renameSync as renameSync2,
|
|
2818
|
+
rmSync as rmSync5,
|
|
2819
|
+
statSync as statSync3,
|
|
2820
|
+
symlinkSync as symlinkSync2,
|
|
2821
|
+
utimesSync,
|
|
2822
|
+
writeFileSync as writeFileSync4
|
|
2823
|
+
} from "node:fs";
|
|
2824
|
+
import os6 from "node:os";
|
|
2825
|
+
import path21 from "node:path";
|
|
2826
|
+
|
|
2827
|
+
// src/admitted-mac-build.ts
|
|
2828
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2829
|
+
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
2830
|
+
|
|
2831
|
+
// src/retired-cache-directory.ts
|
|
2832
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2833
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
2834
|
+
import { renameSync } from "node:fs";
|
|
2835
|
+
import { rm } from "node:fs/promises";
|
|
2836
|
+
import path11 from "node:path";
|
|
2837
|
+
|
|
2838
|
+
// src/process-liveness.ts
|
|
2839
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2840
|
+
import { readFileSync as readFileSync8 } from "node:fs";
|
|
2841
|
+
|
|
2842
|
+
// src/swift-compiler-digest.ts
|
|
2843
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2844
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
2845
|
+
import { readFileSync as readFileSync9 } from "node:fs";
|
|
2846
|
+
import path12 from "node:path";
|
|
2847
|
+
|
|
2848
|
+
// src/swift-darwin-records.ts
|
|
2849
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2850
|
+
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
2851
|
+
import { mkdtempSync as mkdtempSync2, readdirSync as readdirSync7, rmSync as rmSync2, symlinkSync } from "node:fs";
|
|
2852
|
+
import { tmpdir as tmpdir2 } from "node:os";
|
|
2853
|
+
import path14 from "node:path";
|
|
2854
|
+
|
|
2855
|
+
// src/swift-objc-runtime.ts
|
|
2856
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2857
|
+
|
|
2858
|
+
// src/swift-shared-sdk.ts
|
|
2859
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2860
|
+
import { execFileSync as execFileSync3 } from "node:child_process";
|
|
2861
|
+
import { createHash as createHash7 } from "node:crypto";
|
|
2862
|
+
import fs8, { readdirSync as readdirSync6, readFileSync as readFileSync10 } from "node:fs";
|
|
2863
|
+
import path13 from "node:path";
|
|
2864
|
+
|
|
2865
|
+
// src/swift-design-time.ts
|
|
2866
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2867
|
+
|
|
2868
|
+
// src/swift-distribution-contract.ts
|
|
2869
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2870
|
+
|
|
2871
|
+
// src/swift-icu.ts
|
|
2872
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2873
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
2874
|
+
import { createHash as createHash8 } from "node:crypto";
|
|
2875
|
+
import { existsSync as existsSync4, readFileSync as readFileSync11 } from "node:fs";
|
|
2876
|
+
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
2877
|
+
import os3 from "node:os";
|
|
2878
|
+
import path15 from "node:path";
|
|
2879
|
+
import { promisify as promisify2 } from "node:util";
|
|
2880
|
+
import { brotliCompress, constants as zlibConstants, gunzip, gzip } from "node:zlib";
|
|
2881
|
+
var run = promisify2(execFile2);
|
|
2882
|
+
var deflate = promisify2(gzip);
|
|
2883
|
+
var compressBrotli = promisify2(brotliCompress);
|
|
2884
|
+
var inflateGzip = promisify2(gunzip);
|
|
2885
|
+
|
|
2886
|
+
// src/swift-link-roots.ts
|
|
2887
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2888
|
+
import fs9 from "node:fs";
|
|
2889
|
+
import path16 from "node:path";
|
|
2400
2890
|
|
|
2401
|
-
// src/swift-
|
|
2891
|
+
// src/swift-objc-import.ts
|
|
2402
2892
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2403
|
-
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
2404
|
-
import { createHash as createHash4 } from "node:crypto";
|
|
2405
|
-
import fs3 from "node:fs";
|
|
2406
|
-
import os2 from "node:os";
|
|
2407
|
-
import path3 from "node:path";
|
|
2408
2893
|
|
|
2409
|
-
// src/
|
|
2894
|
+
// src/swift-project-user.ts
|
|
2410
2895
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2411
|
-
import {
|
|
2412
|
-
import
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2896
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
2897
|
+
import {
|
|
2898
|
+
chmodSync,
|
|
2899
|
+
existsSync as existsSync5,
|
|
2900
|
+
mkdirSync,
|
|
2901
|
+
readdirSync as readdirSync8,
|
|
2902
|
+
readFileSync as readFileSync12,
|
|
2903
|
+
realpathSync,
|
|
2904
|
+
rmSync as rmSync3,
|
|
2905
|
+
statSync as statSync2
|
|
2906
|
+
} from "node:fs";
|
|
2907
|
+
import path17 from "node:path";
|
|
2908
|
+
|
|
2909
|
+
// src/swift-reproducible.ts
|
|
2910
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2911
|
+
import { realpathSync as realpathSync2 } from "node:fs";
|
|
2912
|
+
import os4 from "node:os";
|
|
2913
|
+
|
|
2914
|
+
// src/swift-root-lock.ts
|
|
2915
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2916
|
+
import {
|
|
2917
|
+
spawn as spawn3
|
|
2918
|
+
} from "node:child_process";
|
|
2919
|
+
import { createHash as createHash9, randomUUID as randomUUID3 } from "node:crypto";
|
|
2920
|
+
import {
|
|
2921
|
+
linkSync,
|
|
2922
|
+
mkdirSync as mkdirSync2,
|
|
2923
|
+
readdirSync as readdirSync9,
|
|
2924
|
+
readFileSync as readFileSync13,
|
|
2925
|
+
rmSync as rmSync4,
|
|
2926
|
+
writeFileSync as writeFileSync3
|
|
2927
|
+
} from "node:fs";
|
|
2928
|
+
import path18 from "node:path";
|
|
2929
|
+
|
|
2930
|
+
// src/swift-wasm-prune.ts
|
|
2931
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2932
|
+
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
2933
|
+
import { createHash as createHash10 } from "node:crypto";
|
|
2934
|
+
import fs10 from "node:fs";
|
|
2935
|
+
import os5 from "node:os";
|
|
2936
|
+
import path19 from "node:path";
|
|
2937
|
+
var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
|
|
2938
|
+
"libFoundation",
|
|
2939
|
+
"lib_FoundationCollections",
|
|
2940
|
+
"libswift_StringProcessing",
|
|
2941
|
+
"libswift_RegexParser",
|
|
2942
|
+
"libswiftObservation",
|
|
2943
|
+
"libswiftSynchronization",
|
|
2944
|
+
"libswiftCxx",
|
|
2945
|
+
"libswiftCxxStdlib",
|
|
2946
|
+
"libswiftWASILibc",
|
|
2947
|
+
"libswift_Builtin_float",
|
|
2948
|
+
"libObjectiveC"
|
|
2949
|
+
]);
|
|
2950
|
+
var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
|
|
2951
|
+
...[...PRUNED_SDK_ARCHIVES].map((a) => `-l${a.slice(3)}`),
|
|
2952
|
+
"-lswiftCore",
|
|
2953
|
+
"-lswift_Concurrency"
|
|
2954
|
+
]);
|
|
2955
|
+
|
|
2956
|
+
// src/swiftContract.ts
|
|
2957
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2958
|
+
|
|
2959
|
+
// src/wasm-optimize.ts
|
|
2960
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2961
|
+
import { BINARYEN_VERSION, wasmOpt } from "wasm-opt";
|
|
2962
|
+
var FEATURES = [
|
|
2963
|
+
"threads",
|
|
2964
|
+
"bulk-memory",
|
|
2965
|
+
"bulk-memory-opt",
|
|
2966
|
+
"call-indirect-overlong",
|
|
2967
|
+
"exception-handling",
|
|
2968
|
+
"multivalue",
|
|
2969
|
+
"mutable-globals",
|
|
2970
|
+
"nontrapping-float-to-int",
|
|
2971
|
+
"reference-types",
|
|
2972
|
+
"sign-ext"
|
|
2973
|
+
];
|
|
2974
|
+
var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
|
|
2444
2975
|
|
|
2445
|
-
// src/
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
"UIKitEnums",
|
|
2502
|
-
"UIKitCore",
|
|
2503
|
-
"PeachICU",
|
|
2504
|
-
"PeachCMark",
|
|
2505
|
-
"CoreImage",
|
|
2506
|
-
"QuartzCore",
|
|
2507
|
-
"CoreGraphics",
|
|
2508
|
-
"AppTrackingTransparency",
|
|
2509
|
-
"StoreKit",
|
|
2510
|
-
"_StoreKit_SwiftUI",
|
|
2511
|
-
"WeatherKit",
|
|
2512
|
-
"DeviceCheck",
|
|
2513
|
-
"PassKit",
|
|
2514
|
-
"Translation",
|
|
2515
|
-
"TipKit",
|
|
2516
|
-
"CoreSpotlight",
|
|
2517
|
-
"CoreVideo",
|
|
2518
|
-
"CoreMedia",
|
|
2519
|
-
"VideoToolbox",
|
|
2520
|
-
"AdSupport",
|
|
2521
|
-
"BackgroundTasks",
|
|
2522
|
-
"LocalAuthentication",
|
|
2523
|
-
"CoreMotion",
|
|
2524
|
-
"MessageUI",
|
|
2525
|
-
"GameController",
|
|
2526
|
-
"GameKit",
|
|
2527
|
-
"MetricKit",
|
|
2528
|
-
"Metal",
|
|
2529
|
-
"AuthenticationServices",
|
|
2530
|
-
"os",
|
|
2531
|
-
"Charts",
|
|
2532
|
-
"Symbols",
|
|
2533
|
-
"UniformTypeIdentifiers",
|
|
2534
|
-
"WidgetKit",
|
|
2535
|
-
"ActivityKit",
|
|
2536
|
-
"SwiftData",
|
|
2537
|
-
"UIKit",
|
|
2538
|
-
"React",
|
|
2539
|
-
"Combine",
|
|
2540
|
-
"PeachFoundationCombine",
|
|
2541
|
-
"AppIntents",
|
|
2542
|
-
"PhotosUI",
|
|
2543
|
-
"AVFoundation",
|
|
2544
|
-
"AVFAudio",
|
|
2545
|
-
"UserNotifications",
|
|
2546
|
-
"Network",
|
|
2547
|
-
"NetworkExtension",
|
|
2548
|
-
"OSLog",
|
|
2549
|
-
"PeachSecurityRuntime",
|
|
2550
|
-
"Accelerate",
|
|
2551
|
-
"CoreText",
|
|
2552
|
-
"CFNetwork",
|
|
2553
|
-
"CommonCrypto",
|
|
2554
|
-
"PeachCodec",
|
|
2555
|
-
"Compression",
|
|
2556
|
-
"zlib",
|
|
2557
|
-
"CryptoKit",
|
|
2558
|
-
"TikTokBusinessSDK",
|
|
2559
|
-
"nSure",
|
|
2560
|
-
"Statsig",
|
|
2561
|
-
"TOCropViewController",
|
|
2562
|
-
"RiveRuntime",
|
|
2563
|
-
"AVRouting",
|
|
2564
|
-
"CoreData",
|
|
2565
|
-
"PDFKit",
|
|
2566
|
-
"ModelIOEnums",
|
|
2567
|
-
"ModelIO",
|
|
2568
|
-
"MetalKit",
|
|
2569
|
-
"DatadogCore",
|
|
2570
|
-
"DatadogLogs",
|
|
2571
|
-
"DatadogRUM",
|
|
2572
|
-
"DatadogTrace",
|
|
2573
|
-
"AppLovinSDK",
|
|
2574
|
-
"GoogleMobileAds",
|
|
2575
|
-
"AppsFlyerLib",
|
|
2576
|
-
"FBSDKCoreKit",
|
|
2577
|
-
"FBAEMKit",
|
|
2578
|
-
"FBSDKCoreKit_Basics",
|
|
2976
|
+
// src/xcode-header-search.ts
|
|
2977
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2978
|
+
import fs11 from "node:fs";
|
|
2979
|
+
import path20 from "node:path";
|
|
2980
|
+
|
|
2981
|
+
// src/swift-compile.ts
|
|
2982
|
+
var admittedCores = Number(process.env.TM_EXEC_CPU_CORES);
|
|
2983
|
+
var BUILD_JOBS = String(
|
|
2984
|
+
Math.min(
|
|
2985
|
+
4,
|
|
2986
|
+
Math.max(1, Math.floor(os6.availableParallelism() / 2)),
|
|
2987
|
+
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
2988
|
+
)
|
|
2989
|
+
);
|
|
2990
|
+
var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
2991
|
+
GameplayKit: [],
|
|
2992
|
+
simd: [],
|
|
2993
|
+
ModelIO: ["simd"],
|
|
2994
|
+
GLKit: ["ModelIO"],
|
|
2995
|
+
Accelerate: [],
|
|
2996
|
+
CryptoKit: [],
|
|
2997
|
+
CommonCrypto: [],
|
|
2998
|
+
ImagePlayground: [],
|
|
2999
|
+
QuickLookThumbnailing: [],
|
|
3000
|
+
libxml2: [],
|
|
3001
|
+
Compression: [],
|
|
3002
|
+
zlib: [],
|
|
3003
|
+
TikTokBusinessSDK: [],
|
|
3004
|
+
nSure: [],
|
|
3005
|
+
Statsig: [],
|
|
3006
|
+
TOCropViewController: [],
|
|
3007
|
+
RiveRuntime: ["MetalKit"],
|
|
3008
|
+
MetalKit: ["ModelIO"],
|
|
3009
|
+
DatadogCore: [],
|
|
3010
|
+
DatadogLogs: ["DatadogCore"],
|
|
3011
|
+
DatadogRUM: ["DatadogCore"],
|
|
3012
|
+
DatadogTrace: ["DatadogCore"],
|
|
3013
|
+
DatadogCrashReporting: ["DatadogCore"],
|
|
3014
|
+
Amplitude: [],
|
|
3015
|
+
AppLovinSDK: [],
|
|
3016
|
+
AppsFlyerLib: [],
|
|
3017
|
+
FBSDKCoreKit: ["FBAEMKit", "FBSDKCoreKit_Basics"],
|
|
3018
|
+
FBAEMKit: ["FBSDKCoreKit_Basics"],
|
|
3019
|
+
FBSDKCoreKit_Basics: [],
|
|
3020
|
+
Intercom: [],
|
|
3021
|
+
FirebaseCore: [],
|
|
3022
|
+
FirebaseSharedSwift: ["FirebaseCore"],
|
|
3023
|
+
FirebaseRemoteConfig: ["FirebaseCore", "FirebaseSharedSwift"],
|
|
3024
|
+
FirebaseFirestoreInternal: ["FirebaseCore"],
|
|
3025
|
+
FirebaseAnalytics: ["FirebaseCore"],
|
|
3026
|
+
FirebaseAppCheck: ["FirebaseCore"],
|
|
3027
|
+
FirebaseAuth: ["FirebaseCore"],
|
|
3028
|
+
FirebaseCrashlytics: ["FirebaseCore"],
|
|
3029
|
+
FirebaseFirestore: ["FirebaseCore", "FirebaseSharedSwift", "FirebaseFirestoreInternal"],
|
|
3030
|
+
FirebaseStorage: ["FirebaseCore"],
|
|
3031
|
+
Firebase: [
|
|
2579
3032
|
"FirebaseCore",
|
|
2580
|
-
"FirebaseSharedSwift",
|
|
2581
|
-
"FirebaseRemoteConfig",
|
|
2582
|
-
"FirebaseFirestoreInternal",
|
|
2583
3033
|
"FirebaseAnalytics",
|
|
2584
3034
|
"FirebaseAppCheck",
|
|
2585
3035
|
"FirebaseAuth",
|
|
2586
3036
|
"FirebaseCrashlytics",
|
|
2587
3037
|
"FirebaseFirestore",
|
|
2588
|
-
"
|
|
2589
|
-
"
|
|
2590
|
-
"Intercom",
|
|
2591
|
-
"FBAudienceNetwork",
|
|
2592
|
-
"NaturalLanguage",
|
|
2593
|
-
"AVKit",
|
|
2594
|
-
"SafariServices",
|
|
2595
|
-
"QuickLook",
|
|
2596
|
-
"CoreHaptics",
|
|
2597
|
-
"WebKit",
|
|
2598
|
-
"Photos",
|
|
2599
|
-
"LinkPresentation",
|
|
2600
|
-
"FoundationModels",
|
|
2601
|
-
"CoreTransferable",
|
|
2602
|
-
"AudioToolbox",
|
|
2603
|
-
"MediaToolbox",
|
|
2604
|
-
"CoreAudioTypes",
|
|
2605
|
-
"AudioUnit",
|
|
2606
|
-
"Intents",
|
|
2607
|
-
"IntentsUI",
|
|
2608
|
-
"WatchConnectivity",
|
|
2609
|
-
"ReplayKit",
|
|
2610
|
-
"CoreServices",
|
|
2611
|
-
"MobileCoreServices",
|
|
2612
|
-
"CoreTelephony",
|
|
2613
|
-
"SystemConfiguration",
|
|
2614
|
-
"ImageIO",
|
|
2615
|
-
"CoreLocationEnums",
|
|
2616
|
-
"CoreLocation",
|
|
2617
|
-
"MapKit",
|
|
2618
|
-
"One",
|
|
2619
|
-
"simd",
|
|
2620
|
-
"GLKit",
|
|
2621
|
-
"GameplayKit",
|
|
2622
|
-
"SpriteKit",
|
|
2623
|
-
"PeachBox2D"
|
|
3038
|
+
"FirebaseRemoteConfig",
|
|
3039
|
+
"FirebaseStorage"
|
|
2624
3040
|
],
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
deviceModel: ["string"],
|
|
2628
|
-
systemName: ["string"],
|
|
2629
|
-
systemVersion: ["string"],
|
|
2630
|
-
screenMetrics: ["array"],
|
|
2631
|
-
colorScheme: ["string:light", "string:dark"],
|
|
2632
|
-
semanticColors: ["object"],
|
|
2633
|
-
imageAssets: ["object"],
|
|
2634
|
-
locale: ["string"],
|
|
2635
|
-
dynamicTypeSize: [
|
|
2636
|
-
"string:xSmall",
|
|
2637
|
-
"string:small",
|
|
2638
|
-
"string:medium",
|
|
2639
|
-
"string:large",
|
|
2640
|
-
"string:xLarge",
|
|
2641
|
-
"string:xxLarge",
|
|
2642
|
-
"string:xxxLarge",
|
|
2643
|
-
"string:accessibility1",
|
|
2644
|
-
"string:accessibility2",
|
|
2645
|
-
"string:accessibility3",
|
|
2646
|
-
"string:accessibility4",
|
|
2647
|
-
"string:accessibility5"
|
|
2648
|
-
],
|
|
2649
|
-
horizontalSizeClass: ["string:compact", "string:regular"],
|
|
2650
|
-
verticalSizeClass: ["string:compact", "string:regular"],
|
|
2651
|
-
accessibilityReduceMotion: ["bool"],
|
|
2652
|
-
hinge: ["null", "object"]
|
|
2653
|
-
},
|
|
2654
|
-
hosts: {
|
|
2655
|
-
"darwin-arm64": {
|
|
2656
|
-
sha256: "e0cb6487e64d3089d0795817b5f7543db57552bf1e21da7847351aee3b9227d0",
|
|
2657
|
-
size: 90762105
|
|
2658
|
-
},
|
|
2659
|
-
"linux-x64": {
|
|
2660
|
-
sha256: "fcadab7f519c456fd2ff7a780f36001cd2c51a90a29938684d0f2ab94c377440",
|
|
2661
|
-
size: 93479763
|
|
2662
|
-
},
|
|
2663
|
-
"linux-arm64": {
|
|
2664
|
-
sha256: "9a225586903eca8a4b13e03301814883e743a33cdbfc4b9eced867facff5472b",
|
|
2665
|
-
size: 92973106
|
|
2666
|
-
}
|
|
2667
|
-
}
|
|
2668
|
-
};
|
|
2669
|
-
|
|
2670
|
-
// src/swift-toolchain.ts
|
|
2671
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2672
|
-
import { execFileSync } from "node:child_process";
|
|
2673
|
-
import { createHash as createHash3 } from "node:crypto";
|
|
2674
|
-
import fs2 from "node:fs";
|
|
2675
|
-
import os from "node:os";
|
|
2676
|
-
import path2 from "node:path";
|
|
2677
|
-
import { fileURLToPath } from "node:url";
|
|
2678
|
-
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2679
|
-
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
2680
|
-
var compilerArchives = {
|
|
2681
|
-
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
2682
|
-
identity: "0b2d0a9011c88e66",
|
|
2683
|
-
hosts: {
|
|
2684
|
-
"darwin-arm64": {
|
|
2685
|
-
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
2686
|
-
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
2687
|
-
},
|
|
2688
|
-
"linux-x64": {
|
|
2689
|
-
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
2690
|
-
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
2691
|
-
},
|
|
2692
|
-
"linux-arm64": {
|
|
2693
|
-
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
2694
|
-
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
},
|
|
2698
|
-
"swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
|
|
2699
|
-
identity: "f7c03c3f59ec5d83",
|
|
2700
|
-
hosts: {
|
|
2701
|
-
"darwin-arm64": {
|
|
2702
|
-
checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
|
|
2703
|
-
manifest: "2a7754e6e365bf71ae6b6aefbbd810123795c73d43fb902a8a972d009d72790f"
|
|
2704
|
-
},
|
|
2705
|
-
"linux-x64": {
|
|
2706
|
-
checksum: "5ffa3b54d54583c1d6a38b708693072db4d088ba4bf5966b17014c068b2db641",
|
|
2707
|
-
manifest: "1b23ea52c5570de4697481a54bd0b0a0bcd6b54feccb7b0bb940d3643dec82cb"
|
|
2708
|
-
},
|
|
2709
|
-
"linux-arm64": {
|
|
2710
|
-
checksum: "29b0b97b7b0db4475dbe55f7011e57f493fed9f3482a6705becebd8b68c90bab",
|
|
2711
|
-
manifest: "3fdab1132715f5899de1bb1d7ddcd52cf540295ab86586c72f49502f37a403a1"
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
},
|
|
2715
|
-
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
2716
|
-
identity: SWIFT_HOST_COMPILER_ID,
|
|
2717
|
-
hosts: {
|
|
2718
|
-
"darwin-arm64": {
|
|
2719
|
-
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
2720
|
-
manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
|
|
2721
|
-
},
|
|
2722
|
-
"linux-x64": {
|
|
2723
|
-
checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
|
|
2724
|
-
manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
|
|
2725
|
-
},
|
|
2726
|
-
"linux-arm64": {
|
|
2727
|
-
checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
|
|
2728
|
-
manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
3041
|
+
GoogleMobileAds: [],
|
|
3042
|
+
FBAudienceNetwork: []
|
|
2732
3043
|
};
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
};
|
|
2769
|
-
}
|
|
3044
|
+
var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
3045
|
+
var FOUNDATION_IMPLICIT_MODULES = [
|
|
3046
|
+
"PeachObjC",
|
|
3047
|
+
"Dispatch",
|
|
3048
|
+
"FoundationNetworking",
|
|
3049
|
+
"PeachFoundationCombine",
|
|
3050
|
+
"Darwin"
|
|
3051
|
+
];
|
|
3052
|
+
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
3053
|
+
(module) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module}"`
|
|
3054
|
+
).join("");
|
|
3055
|
+
var compilerSourceDigest = true ? "8c46343a35b3db15f9074886c9d1ed86fa0e14a331bdb02ed609062eec316d8c" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
3056
|
+
var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
3057
|
+
"CFAllocator",
|
|
3058
|
+
"CFArray",
|
|
3059
|
+
"CFAttributedString",
|
|
3060
|
+
"CFBoolean",
|
|
3061
|
+
"CFData",
|
|
3062
|
+
"CFDate",
|
|
3063
|
+
"CFDictionary",
|
|
3064
|
+
"CFError",
|
|
3065
|
+
"CFMutableData",
|
|
3066
|
+
"CFNumber",
|
|
3067
|
+
"CFSet",
|
|
3068
|
+
"CFString",
|
|
3069
|
+
"CFURL"
|
|
3070
|
+
].map((name2) => `import class CoreFoundation.${name2}`).concat([
|
|
3071
|
+
"import typealias CoreFoundation.CFPropertyList",
|
|
3072
|
+
"import typealias CoreFoundation.CFTypeRef",
|
|
3073
|
+
"import CoreGraphics"
|
|
3074
|
+
]).join("; ");
|
|
3075
|
+
var ROOT_LOCKS = Symbol.for("peachsim.swiftCompile.rootLocks");
|
|
3076
|
+
var host = globalThis;
|
|
3077
|
+
var rootLocks = host[ROOT_LOCKS] ?? (host[ROOT_LOCKS] = /* @__PURE__ */ new Map());
|
|
3078
|
+
var SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
|
|
2770
3079
|
|
|
2771
3080
|
// src/swift-package-manifest.ts
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
}
|
|
2775
|
-
function swiftPackageFailure(error) {
|
|
2776
|
-
if (!(error instanceof Error)) return String(error);
|
|
2777
|
-
const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
|
|
2778
|
-
return stderr || error.message;
|
|
2779
|
-
}
|
|
2780
|
-
var cacheDir2 = path3.join(cacheDir(), "swift-manifests");
|
|
2781
|
-
var requirementClause = (item) => {
|
|
2782
|
-
const url = JSON.stringify(item.url);
|
|
2783
|
-
const requirement = item.requirement;
|
|
2784
|
-
if (requirement.kind === "upToNextMajorVersion")
|
|
2785
|
-
return `.package(url: ${url}, from: ${JSON.stringify(requirement.minimumVersion)})`;
|
|
2786
|
-
if (requirement.kind === "upToNextMinorVersion")
|
|
2787
|
-
return `.package(url: ${url}, .upToNextMinor(from: ${JSON.stringify(requirement.minimumVersion)}))`;
|
|
2788
|
-
if (requirement.kind === "versionRange")
|
|
2789
|
-
return `.package(url: ${url}, ${JSON.stringify(requirement.minimumVersion)}..<${JSON.stringify(requirement.maximumVersion)})`;
|
|
2790
|
-
if (requirement.kind === "exactVersion")
|
|
2791
|
-
return `.package(url: ${url}, exact: ${JSON.stringify(requirement.version)})`;
|
|
2792
|
-
if (requirement.kind === "branch")
|
|
2793
|
-
return `.package(url: ${url}, branch: ${JSON.stringify(requirement.branch)})`;
|
|
2794
|
-
return `.package(url: ${url}, revision: ${JSON.stringify(requirement.revision)})`;
|
|
2795
|
-
};
|
|
2796
|
-
function resolveSwiftPackageRequirements(requirements, destination) {
|
|
2797
|
-
const repository = (url) => url.replace(/(?:\.git)?\/?$/, "");
|
|
2798
|
-
const chosen = /* @__PURE__ */ new Map();
|
|
2799
|
-
for (const item of requirements) {
|
|
2800
|
-
const identity = swiftPackageIdentity(item.url);
|
|
2801
|
-
const previous = chosen.get(identity);
|
|
2802
|
-
if (previous && (repository(previous.url) !== repository(item.url) || JSON.stringify(previous.requirement) !== JSON.stringify(item.requirement)))
|
|
2803
|
-
throw new Error(
|
|
2804
|
-
`conflicting requirements for ${identity}: ${previous.url} ${JSON.stringify(previous.requirement)}; ${item.url} ${JSON.stringify(item.requirement)}`
|
|
2805
|
-
);
|
|
2806
|
-
if (!previous) chosen.set(identity, item);
|
|
2807
|
-
}
|
|
2808
|
-
const clauses = [...chosen.values()].sort(
|
|
2809
|
-
(a, b) => swiftPackageIdentity(a.url).localeCompare(swiftPackageIdentity(b.url))
|
|
2810
|
-
).map(requirementClause);
|
|
2811
|
-
const manifest = `// swift-tools-version:5.9
|
|
2812
|
-
import PackageDescription
|
|
2813
|
-
let package = Package(
|
|
2814
|
-
name: "Resolve",
|
|
2815
|
-
dependencies: [
|
|
2816
|
-
${clauses.join(",\n ")},
|
|
2817
|
-
]
|
|
2818
|
-
)
|
|
2819
|
-
`;
|
|
2820
|
-
const dir = fs3.mkdtempSync(path3.join(os2.tmpdir(), "peach-resolve-"));
|
|
2821
|
-
try {
|
|
2822
|
-
fs3.writeFileSync(path3.join(dir, "Package.swift"), manifest);
|
|
2823
|
-
try {
|
|
2824
|
-
execFileSync2(
|
|
2825
|
-
swiftCommand(),
|
|
2826
|
-
[
|
|
2827
|
-
"package",
|
|
2828
|
-
...swiftPackageCacheOptions(),
|
|
2829
|
-
"--package-path",
|
|
2830
|
-
dir,
|
|
2831
|
-
"--scratch-path",
|
|
2832
|
-
path3.join(dir, ".build"),
|
|
2833
|
-
"resolve"
|
|
2834
|
-
],
|
|
2835
|
-
{
|
|
2836
|
-
encoding: "utf8",
|
|
2837
|
-
env: { ...swiftEnvironment(), GIT_TERMINAL_PROMPT: "0" },
|
|
2838
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
2839
|
-
maxBuffer: 32 * 1024 * 1024
|
|
2840
|
-
}
|
|
2841
|
-
);
|
|
2842
|
-
} catch (error) {
|
|
2843
|
-
throw new Error(
|
|
2844
|
-
`swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
|
|
2845
|
-
{ cause: error }
|
|
2846
|
-
);
|
|
2847
|
-
}
|
|
2848
|
-
const resolved = path3.join(dir, "Package.resolved");
|
|
2849
|
-
if (!fs3.existsSync(resolved))
|
|
2850
|
-
throw new Error("swift package resolve wrote no Package.resolved");
|
|
2851
|
-
fs3.mkdirSync(path3.dirname(destination), { recursive: true });
|
|
2852
|
-
fs3.copyFileSync(resolved, destination);
|
|
2853
|
-
} finally {
|
|
2854
|
-
fs3.rmSync(dir, { recursive: true, force: true });
|
|
2855
|
-
}
|
|
2856
|
-
}
|
|
3081
|
+
var cacheDir2 = path23.join(cacheDir(), "swift-manifests");
|
|
3082
|
+
var execFileAsync = promisify3(execFile3);
|
|
2857
3083
|
|
|
2858
3084
|
// src/xcode-json-project.ts
|
|
2859
3085
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2860
3086
|
var import_json5 = __toESM(require_lib(), 1);
|
|
2861
|
-
import
|
|
3087
|
+
import path24 from "node:path";
|
|
2862
3088
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2863
3089
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
2864
3090
|
var items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -2915,7 +3141,7 @@ var PHASE_ISA = {
|
|
|
2915
3141
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
2916
3142
|
const json = import_json5.default.parse(source);
|
|
2917
3143
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
2918
|
-
const projectDir =
|
|
3144
|
+
const projectDir = path24.dirname(xcodeproj);
|
|
2919
3145
|
const objects = {};
|
|
2920
3146
|
let next = 0;
|
|
2921
3147
|
const add = (entry, id) => {
|
|
@@ -2928,7 +3154,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2928
3154
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
2929
3155
|
if (base) {
|
|
2930
3156
|
if (base[1] === "PROJECT")
|
|
2931
|
-
return { sourceTree: "<absolute>", path:
|
|
3157
|
+
return { sourceTree: "<absolute>", path: path24.join(projectDir, base[2]) };
|
|
2932
3158
|
if (base[1] === "PRODUCTS")
|
|
2933
3159
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
2934
3160
|
return null;
|
|
@@ -2936,7 +3162,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2936
3162
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
2937
3163
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
2938
3164
|
if (unescaped.startsWith("~")) return null;
|
|
2939
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
3165
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: path24.join(groupDir, unescaped) };
|
|
2940
3166
|
};
|
|
2941
3167
|
const memberships = [];
|
|
2942
3168
|
const folders = [];
|
|
@@ -2947,8 +3173,8 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2947
3173
|
const kind = text(entry.kind) ?? "file-reference";
|
|
2948
3174
|
const raw = text(entry.path) ?? "";
|
|
2949
3175
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
2950
|
-
const
|
|
2951
|
-
const node = { id: "", name, dir: null, parent, children: [] };
|
|
3176
|
+
const name2 = text(entry.name) ?? path24.basename(raw);
|
|
3177
|
+
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
2952
3178
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
2953
3179
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
2954
3180
|
const childIds = walk(items(entry.children), node);
|
|
@@ -2961,7 +3187,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2961
3187
|
isa: kind === "variant-group" ? "PBXVariantGroup" : "PBXGroup",
|
|
2962
3188
|
children: childIds,
|
|
2963
3189
|
...kind === "variant-group" ? {} : { sourceTree: "<absolute>", path: node.dir ?? "" },
|
|
2964
|
-
name
|
|
3190
|
+
name: name2
|
|
2965
3191
|
},
|
|
2966
3192
|
text(entry.id)
|
|
2967
3193
|
);
|
|
@@ -2979,7 +3205,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2979
3205
|
{
|
|
2980
3206
|
isa: "PBXFileReference",
|
|
2981
3207
|
...located ?? { sourceTree: "SDKROOT", path: raw },
|
|
2982
|
-
name
|
|
3208
|
+
name: name2
|
|
2983
3209
|
},
|
|
2984
3210
|
text(entry.id)
|
|
2985
3211
|
);
|
|
@@ -3031,8 +3257,8 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3031
3257
|
return node;
|
|
3032
3258
|
};
|
|
3033
3259
|
const configurations = items(json.configurations).flatMap((entry) => {
|
|
3034
|
-
const
|
|
3035
|
-
return
|
|
3260
|
+
const name2 = isObject(entry) ? text(entry.name) : text(entry);
|
|
3261
|
+
return name2 ? [{ name: name2, file: isObject(entry) ? entry.file : void 0 }] : [];
|
|
3036
3262
|
});
|
|
3037
3263
|
const settingsOf = (value) => Object.fromEntries(
|
|
3038
3264
|
Object.entries(isObject(value) ? value : {}).flatMap(
|
|
@@ -3047,14 +3273,14 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3047
3273
|
const configurationList = (settings, specialized) => add({
|
|
3048
3274
|
isa: "XCConfigurationList",
|
|
3049
3275
|
defaultConfigurationName: text(json["default-configuration"]) ?? "Debug",
|
|
3050
|
-
buildConfigurations: configurations.map(({ name, file }) => {
|
|
3051
|
-
const reference = specialized.has(
|
|
3276
|
+
buildConfigurations: configurations.map(({ name: name2, file }) => {
|
|
3277
|
+
const reference = specialized.has(name2) ? specialized.get(name2) : file;
|
|
3052
3278
|
const base = lookup(reference);
|
|
3053
3279
|
const anchor = isObject(reference) ? lookupNode(reference.anchor, root)?.id : null;
|
|
3054
3280
|
const relative2 = isObject(reference) ? text(reference["relative-path"]) : null;
|
|
3055
3281
|
return add({
|
|
3056
3282
|
isa: "XCBuildConfiguration",
|
|
3057
|
-
name,
|
|
3283
|
+
name: name2,
|
|
3058
3284
|
buildSettings: settings,
|
|
3059
3285
|
...base ? { baseConfigurationReference: base } : anchor && relative2 ? {
|
|
3060
3286
|
baseConfigurationReferenceAnchor: anchor,
|
|
@@ -3068,13 +3294,13 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3068
3294
|
if (!isObject(entry)) continue;
|
|
3069
3295
|
const repository = text(entry.repository);
|
|
3070
3296
|
const local = text(entry.path);
|
|
3071
|
-
const
|
|
3297
|
+
const name2 = local !== void 0 ? path24.basename(path24.resolve(path24.dirname(xcodeproj), local)) : path24.basename(repository ?? "").replace(/\.git$/, "");
|
|
3072
3298
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
3073
3299
|
isa: "XCRemoteSwiftPackageReference",
|
|
3074
3300
|
repositoryURL: repository ?? "",
|
|
3075
3301
|
...remoteVersionRequirement(entry)
|
|
3076
3302
|
});
|
|
3077
|
-
packageIds.set(
|
|
3303
|
+
packageIds.set(name2.toLowerCase(), id);
|
|
3078
3304
|
}
|
|
3079
3305
|
const productDependency = (entry) => add({
|
|
3080
3306
|
isa: "XCSwiftPackageProductDependency",
|
|
@@ -3094,12 +3320,12 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3094
3320
|
const targets = [];
|
|
3095
3321
|
for (const entry of items(json.targets)) {
|
|
3096
3322
|
if (!isObject(entry)) continue;
|
|
3097
|
-
const
|
|
3323
|
+
const name2 = text(entry.name) ?? "";
|
|
3098
3324
|
const productType = text(entry["product-type"]);
|
|
3099
3325
|
const target = {
|
|
3100
3326
|
isa: text(entry.kind) === "aggregate" ? "PBXAggregateTarget" : "PBXNativeTarget",
|
|
3101
|
-
name,
|
|
3102
|
-
productName:
|
|
3327
|
+
name: name2,
|
|
3328
|
+
productName: name2,
|
|
3103
3329
|
productType: productType ? `com.apple.product-type.${productType}` : text(entry["full-product-type"]) ?? "",
|
|
3104
3330
|
buildPhases: [],
|
|
3105
3331
|
dependencies: [],
|
|
@@ -3109,7 +3335,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3109
3335
|
const product = lookup(entry.product);
|
|
3110
3336
|
if (product) target.productReference = product;
|
|
3111
3337
|
const id = add(target, text(entry.id));
|
|
3112
|
-
targetIds.set(
|
|
3338
|
+
targetIds.set(name2, id);
|
|
3113
3339
|
targets.push({ id, target, entry });
|
|
3114
3340
|
for (const phase of items(entry["build-phases"])) {
|
|
3115
3341
|
const kind = isObject(phase) ? text(phase.kind) : text(phase);
|
|
@@ -3121,7 +3347,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3121
3347
|
isObject(phase) ? text(phase.id) : void 0
|
|
3122
3348
|
);
|
|
3123
3349
|
target.buildPhases.push(phaseId);
|
|
3124
|
-
phases.set([
|
|
3350
|
+
phases.set([name2, kind, phaseName].filter(Boolean).join("/"), phaseId);
|
|
3125
3351
|
phases.set(`id:${phaseId}`, phaseId);
|
|
3126
3352
|
}
|
|
3127
3353
|
}
|
|
@@ -3137,7 +3363,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3137
3363
|
files?.push(add({ isa: "PBXBuildFile", fileRef: refId }));
|
|
3138
3364
|
}
|
|
3139
3365
|
for (const { target, entry } of targets) {
|
|
3140
|
-
const
|
|
3366
|
+
const name2 = text(entry.name) ?? "";
|
|
3141
3367
|
target.buildConfigurationList = configurationList(
|
|
3142
3368
|
settingsOf(entry["build-settings"]),
|
|
3143
3369
|
new Map(
|
|
@@ -3175,7 +3401,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3175
3401
|
const dependency = productDependency(member);
|
|
3176
3402
|
target.packageProductDependencies.push(dependency);
|
|
3177
3403
|
const buildFile = member["build-phase"];
|
|
3178
|
-
phaseFiles(isObject(buildFile) ? buildFile["build-phase"] : buildFile,
|
|
3404
|
+
phaseFiles(isObject(buildFile) ? buildFile["build-phase"] : buildFile, name2)?.push(
|
|
3179
3405
|
add({ isa: "PBXBuildFile", productRef: dependency })
|
|
3180
3406
|
);
|
|
3181
3407
|
}
|
|
@@ -3243,6 +3469,7 @@ function isJsonObject(value) {
|
|
|
3243
3469
|
|
|
3244
3470
|
// src/xcode-project.ts
|
|
3245
3471
|
var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
|
|
3472
|
+
var runScriptTimeoutMs = 10 * 60 * 1e3;
|
|
3246
3473
|
var CXX_STANDARD_ALIASES = {
|
|
3247
3474
|
"c++0x": "c++11",
|
|
3248
3475
|
"gnu++0x": "gnu++11"
|
|
@@ -3277,28 +3504,28 @@ var CONDITIONS = {
|
|
|
3277
3504
|
variant: "normal"
|
|
3278
3505
|
};
|
|
3279
3506
|
function walkFiles(dir) {
|
|
3280
|
-
if (!
|
|
3507
|
+
if (!fs14.existsSync(dir)) return [];
|
|
3281
3508
|
const out = [];
|
|
3282
|
-
for (const entry of
|
|
3509
|
+
for (const entry of fs14.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
3283
3510
|
if (entry.name.startsWith(".")) continue;
|
|
3284
|
-
const full =
|
|
3511
|
+
const full = path25.join(dir, entry.name);
|
|
3285
3512
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
3286
3513
|
else if (entry.isFile()) out.push(full);
|
|
3287
3514
|
}
|
|
3288
3515
|
return out;
|
|
3289
3516
|
}
|
|
3290
|
-
var isDirectory = (dir) =>
|
|
3517
|
+
var isDirectory = (dir) => fs14.existsSync(dir) && fs14.statSync(dir).isDirectory();
|
|
3291
3518
|
function readXcconfig(file, read) {
|
|
3292
|
-
if (read.includes(file) || !
|
|
3519
|
+
if (read.includes(file) || !fs14.existsSync(file)) return {};
|
|
3293
3520
|
read.push(file);
|
|
3294
3521
|
const settings = {};
|
|
3295
|
-
for (const raw of
|
|
3522
|
+
for (const raw of fs14.readFileSync(file, "utf8").split("\n")) {
|
|
3296
3523
|
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
3297
3524
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
3298
3525
|
if (include) {
|
|
3299
3526
|
Object.assign(
|
|
3300
3527
|
settings,
|
|
3301
|
-
readXcconfig(
|
|
3528
|
+
readXcconfig(path25.resolve(path25.dirname(file), include[1]), read)
|
|
3302
3529
|
);
|
|
3303
3530
|
continue;
|
|
3304
3531
|
}
|
|
@@ -3318,8 +3545,8 @@ function applyConditions(raw, configuration) {
|
|
|
3318
3545
|
continue;
|
|
3319
3546
|
}
|
|
3320
3547
|
const matches = [...key.slice(bracket).matchAll(/\[([^=\]]+)=([^\]]*)\]/g)].every(
|
|
3321
|
-
([,
|
|
3322
|
-
const actual =
|
|
3548
|
+
([, name2, pattern]) => {
|
|
3549
|
+
const actual = name2 === "config" ? configuration : CONDITIONS[name2];
|
|
3323
3550
|
return actual !== void 0 && new RegExp(
|
|
3324
3551
|
`^${pattern.replace(/[.+^${}()|\\]/g, "\\$&").replaceAll("*", ".*").replaceAll("?", ".")}$`
|
|
3325
3552
|
).test(actual);
|
|
@@ -3348,22 +3575,22 @@ function decodeXml(text2) {
|
|
|
3348
3575
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
3349
3576
|
}
|
|
3350
3577
|
function workspaceReferences(workspace) {
|
|
3351
|
-
const data =
|
|
3352
|
-
if (!
|
|
3578
|
+
const data = path25.join(workspace, "contents.xcworkspacedata");
|
|
3579
|
+
if (!fs14.existsSync(data))
|
|
3353
3580
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
3354
|
-
const container =
|
|
3581
|
+
const container = path25.dirname(workspace);
|
|
3355
3582
|
const locate = (location, base) => {
|
|
3356
3583
|
const colon = location.indexOf(":");
|
|
3357
3584
|
const kind = location.slice(0, colon);
|
|
3358
3585
|
const rest = location.slice(colon + 1);
|
|
3359
|
-
if (kind === "group") return
|
|
3360
|
-
if (kind === "container" || kind === "self") return
|
|
3361
|
-
if (kind === "absolute") return
|
|
3362
|
-
throw new Error(`${
|
|
3586
|
+
if (kind === "group") return path25.resolve(base, rest);
|
|
3587
|
+
if (kind === "container" || kind === "self") return path25.resolve(container, rest);
|
|
3588
|
+
if (kind === "absolute") return path25.resolve(rest);
|
|
3589
|
+
throw new Error(`${path25.basename(workspace)} has an unsupported location ${location}`);
|
|
3363
3590
|
};
|
|
3364
3591
|
const groups = [container];
|
|
3365
3592
|
const references = [];
|
|
3366
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
3593
|
+
for (const [, closing, tag, attributes, selfClosing] of fs14.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
3367
3594
|
if (closing) {
|
|
3368
3595
|
if (tag === "Group") groups.pop();
|
|
3369
3596
|
continue;
|
|
@@ -3413,9 +3640,9 @@ function remotePackageRequirements(projects) {
|
|
|
3413
3640
|
}
|
|
3414
3641
|
var loaded = /* @__PURE__ */ new Map();
|
|
3415
3642
|
function xcodeProjectFile(xcodeproj) {
|
|
3416
|
-
for (const
|
|
3417
|
-
const file =
|
|
3418
|
-
if (
|
|
3643
|
+
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
3644
|
+
const file = path25.join(xcodeproj, name2);
|
|
3645
|
+
if (fs14.existsSync(file)) return file;
|
|
3419
3646
|
}
|
|
3420
3647
|
return null;
|
|
3421
3648
|
}
|
|
@@ -3423,8 +3650,8 @@ function loadProject(xcodeproj) {
|
|
|
3423
3650
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
3424
3651
|
if (!projectFile)
|
|
3425
3652
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
3426
|
-
const source =
|
|
3427
|
-
const digest =
|
|
3653
|
+
const source = fs14.readFileSync(projectFile, "utf8");
|
|
3654
|
+
const digest = createHash13("sha256").update(source).digest("hex");
|
|
3428
3655
|
const cached = loaded.get(projectFile);
|
|
3429
3656
|
if (cached?.digest === digest) return cached.project;
|
|
3430
3657
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -3440,10 +3667,10 @@ function loadProject(xcodeproj) {
|
|
|
3440
3667
|
if (!project || project.isa !== "PBXProject") {
|
|
3441
3668
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
3442
3669
|
}
|
|
3443
|
-
const projectDir =
|
|
3444
|
-
|
|
3670
|
+
const projectDir = fs14.realpathSync(
|
|
3671
|
+
path25.resolve(path25.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
3445
3672
|
);
|
|
3446
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
3673
|
+
const resolvePath = xcodePathResolver(objects, projectDir, path25.join);
|
|
3447
3674
|
const result = {
|
|
3448
3675
|
xcodeproj,
|
|
3449
3676
|
projectFile,
|
|
@@ -3451,7 +3678,8 @@ function loadProject(xcodeproj) {
|
|
|
3451
3678
|
project,
|
|
3452
3679
|
projectDir,
|
|
3453
3680
|
object,
|
|
3454
|
-
resolvePath
|
|
3681
|
+
resolvePath,
|
|
3682
|
+
visitMembers: xcodeTargetMemberVisitor(objects)
|
|
3455
3683
|
};
|
|
3456
3684
|
loaded.set(projectFile, { digest, project: result });
|
|
3457
3685
|
return result;
|
|
@@ -3471,14 +3699,14 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3471
3699
|
const configs = list(configList?.buildConfigurations).map(project.object);
|
|
3472
3700
|
const config = configs.find((entry) => entry?.name === configuration) ?? configs.find((entry) => entry?.name === str(configList?.defaultConfigurationName));
|
|
3473
3701
|
if (!config) return [];
|
|
3474
|
-
const
|
|
3702
|
+
const name2 = str(config.name) ?? configuration;
|
|
3475
3703
|
const base = str(config.baseConfigurationReference);
|
|
3476
3704
|
const anchor = str(config.baseConfigurationReferenceAnchor);
|
|
3477
3705
|
const relative2 = str(config.baseConfigurationReferenceRelativePath);
|
|
3478
3706
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
3479
3707
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
3480
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative2 ?
|
|
3481
|
-
if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !
|
|
3708
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path25.resolve(directory, relative2) : null;
|
|
3709
|
+
if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !fs14.existsSync(baseFile)))
|
|
3482
3710
|
throw new Error(
|
|
3483
3711
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
|
|
3484
3712
|
);
|
|
@@ -3486,14 +3714,14 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3486
3714
|
const fromFile = baseFile ? readXcconfig(baseFile, read) : {};
|
|
3487
3715
|
xcconfigs.push(...read);
|
|
3488
3716
|
return [
|
|
3489
|
-
applyConditions(fromFile,
|
|
3717
|
+
applyConditions(fromFile, name2),
|
|
3490
3718
|
applyConditions(
|
|
3491
3719
|
Object.fromEntries(
|
|
3492
3720
|
Object.entries(own).flatMap(
|
|
3493
3721
|
([key, value]) => typeof value === "string" ? [[key, value]] : Array.isArray(value) ? [[key, list(value).join(" ")]] : []
|
|
3494
3722
|
)
|
|
3495
3723
|
),
|
|
3496
|
-
|
|
3724
|
+
name2
|
|
3497
3725
|
)
|
|
3498
3726
|
];
|
|
3499
3727
|
};
|
|
@@ -3514,12 +3742,20 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3514
3742
|
resolving.add(marker);
|
|
3515
3743
|
const value = expand(
|
|
3516
3744
|
levels[at][key],
|
|
3517
|
-
(
|
|
3745
|
+
(name2) => name2 === "inherited" || name2 === key ? valueAt(key, at - 1) : valueAt(name2, levels.length - 1)
|
|
3518
3746
|
);
|
|
3519
3747
|
resolving.delete(marker);
|
|
3520
3748
|
return value;
|
|
3521
3749
|
};
|
|
3750
|
+
let developerDir;
|
|
3522
3751
|
const derivedSettings = {
|
|
3752
|
+
DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? (developerDir ?? (developerDir = process.platform === "darwin" ? (
|
|
3753
|
+
// runner-toolchain-platform: darwin
|
|
3754
|
+
execFileSync9("xcode-select", ["-p"], {
|
|
3755
|
+
encoding: "utf8",
|
|
3756
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
3757
|
+
}).trim()
|
|
3758
|
+
) : "")),
|
|
3523
3759
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
3524
3760
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
3525
3761
|
EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
|
|
@@ -3557,26 +3793,26 @@ function settingList(value) {
|
|
|
3557
3793
|
return items2;
|
|
3558
3794
|
}
|
|
3559
3795
|
function expandSearchPath(directory, rules2) {
|
|
3560
|
-
if (
|
|
3796
|
+
if (path25.basename(directory) !== "**") return [directory];
|
|
3561
3797
|
const expanded = [];
|
|
3562
3798
|
const seen = /* @__PURE__ */ new Set();
|
|
3563
|
-
const queue = [
|
|
3799
|
+
const queue = [path25.dirname(directory)];
|
|
3564
3800
|
for (let at = 0; at < queue.length; at++) {
|
|
3565
3801
|
const current = queue[at];
|
|
3566
3802
|
let real;
|
|
3567
3803
|
try {
|
|
3568
|
-
real =
|
|
3804
|
+
real = fs14.realpathSync(current);
|
|
3569
3805
|
} catch {
|
|
3570
3806
|
continue;
|
|
3571
3807
|
}
|
|
3572
|
-
if (!
|
|
3808
|
+
if (!fs14.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
3573
3809
|
seen.add(real);
|
|
3574
3810
|
expanded.push(current);
|
|
3575
|
-
for (const entry of
|
|
3811
|
+
for (const entry of fs14.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
3576
3812
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
3577
3813
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
3578
3814
|
continue;
|
|
3579
|
-
queue.push(
|
|
3815
|
+
queue.push(path25.join(current, entry.name));
|
|
3580
3816
|
}
|
|
3581
3817
|
}
|
|
3582
3818
|
return expanded;
|
|
@@ -3611,19 +3847,53 @@ function expand(value, lookup) {
|
|
|
3611
3847
|
return value.replace(
|
|
3612
3848
|
/\$(?:\(([A-Za-z_][A-Za-z0-9_]*)((?::[^)]*)?)\)|\{([A-Za-z_][A-Za-z0-9_]*)((?::[^}]*)?)\}|([A-Za-z_][A-Za-z0-9_]*))/g,
|
|
3613
3849
|
(_match, paren, parenOps, brace, braceOps, bare) => {
|
|
3614
|
-
const
|
|
3850
|
+
const name2 = paren ?? brace ?? bare;
|
|
3615
3851
|
const operators = parenOps ?? braceOps ?? "";
|
|
3616
|
-
return operators.split(":").slice(1).reduce((current, operator) => applyOperator(current, operator), lookup(
|
|
3852
|
+
return operators.split(":").slice(1).reduce((current, operator) => applyOperator(current, operator), lookup(name2));
|
|
3617
3853
|
}
|
|
3618
3854
|
);
|
|
3619
3855
|
}
|
|
3620
3856
|
var preparedSourcePhases = /* @__PURE__ */ new Map();
|
|
3857
|
+
function shellAssetCatalogs(script, settings, projectDir) {
|
|
3858
|
+
const assigned = /* @__PURE__ */ new Map();
|
|
3859
|
+
const catalogs = [];
|
|
3860
|
+
const resolve = (raw) => {
|
|
3861
|
+
if (raw.startsWith("'")) return raw.slice(1, -1);
|
|
3862
|
+
const lookup = (key) => assigned.get(key) ?? settings(key);
|
|
3863
|
+
const shell = (raw.startsWith('"') ? raw.slice(1, -1) : raw).replace(
|
|
3864
|
+
/\$\{([A-Za-z_][A-Za-z0-9_]*):-([^{}`]*)\}/g,
|
|
3865
|
+
(_match, key, fallback) => lookup(key) || fallback
|
|
3866
|
+
);
|
|
3867
|
+
if (/\$\{[A-Za-z_][A-Za-z0-9_]*(?::?[-+=?]|[#%/^,])/.test(shell)) return null;
|
|
3868
|
+
const value = expand(shell, lookup);
|
|
3869
|
+
return /[$`]/.test(value) ? null : value;
|
|
3870
|
+
};
|
|
3871
|
+
for (const raw of script.split(/\r?\n/)) {
|
|
3872
|
+
const line = raw.trim();
|
|
3873
|
+
const assignment = /^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=("[^"`]*"|'[^']*'|[^\s;`]+)$/.exec(line);
|
|
3874
|
+
if (assignment) {
|
|
3875
|
+
const value = resolve(assignment[2]);
|
|
3876
|
+
if (value !== null) assigned.set(assignment[1], value);
|
|
3877
|
+
else assigned.delete(assignment[1]);
|
|
3878
|
+
continue;
|
|
3879
|
+
}
|
|
3880
|
+
const compile = /^(?:xcrun\s+)?actool\s+(.*)$/.exec(line);
|
|
3881
|
+
if (!compile) continue;
|
|
3882
|
+
const tokens = compile[1].match(/"[^"`]*"|'[^']*'|[^\s;`]+/g) ?? [];
|
|
3883
|
+
for (const token of tokens) {
|
|
3884
|
+
if (token.startsWith("-")) break;
|
|
3885
|
+
const file = resolve(token);
|
|
3886
|
+
if (file?.endsWith(".xcassets")) catalogs.push(path25.resolve(projectDir, file));
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
return catalogs;
|
|
3890
|
+
}
|
|
3621
3891
|
function shellCopies(script, settings, projectDir) {
|
|
3622
3892
|
const assigned = /* @__PURE__ */ new Map();
|
|
3623
3893
|
const copies = [];
|
|
3624
3894
|
let resolved = true;
|
|
3625
|
-
const lookup = (
|
|
3626
|
-
const value = assigned.get(
|
|
3895
|
+
const lookup = (name2) => {
|
|
3896
|
+
const value = assigned.get(name2) ?? settings(name2);
|
|
3627
3897
|
if (value === "") resolved = false;
|
|
3628
3898
|
return value;
|
|
3629
3899
|
};
|
|
@@ -3658,14 +3928,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
3658
3928
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
3659
3929
|
return [];
|
|
3660
3930
|
copies.push({
|
|
3661
|
-
from:
|
|
3662
|
-
to:
|
|
3931
|
+
from: path25.resolve(projectDir, operands[0]),
|
|
3932
|
+
to: path25.resolve(projectDir, operands[1])
|
|
3663
3933
|
});
|
|
3664
3934
|
}
|
|
3665
3935
|
return copies;
|
|
3666
3936
|
}
|
|
3667
3937
|
function fileListEntries(file, absolute) {
|
|
3668
|
-
return
|
|
3938
|
+
return fs14.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
3669
3939
|
}
|
|
3670
3940
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
3671
3941
|
const { project, target, id: targetId } = ref;
|
|
@@ -3678,16 +3948,22 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3678
3948
|
const copiedFiles = [];
|
|
3679
3949
|
let generatedInfoPlist = false;
|
|
3680
3950
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
3681
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
3951
|
+
const infoPlistOutput = declaredInfoPlist ? path25.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
3682
3952
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
3683
3953
|
for (const phaseId of list(target.buildPhases)) {
|
|
3684
3954
|
const phase = project.object(phaseId);
|
|
3685
3955
|
if (phase?.isa !== "PBXShellScriptBuildPhase") continue;
|
|
3686
3956
|
const script = str(phase.name) ?? phaseId;
|
|
3957
|
+
for (const catalog of shellAssetCatalogs(
|
|
3958
|
+
str(phase.shellScript) ?? "",
|
|
3959
|
+
settings,
|
|
3960
|
+
project.projectDir
|
|
3961
|
+
))
|
|
3962
|
+
for (const file of walkFiles(catalog)) resources.add(file);
|
|
3687
3963
|
copiedFiles.push(
|
|
3688
3964
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
3689
3965
|
);
|
|
3690
|
-
const absolute = (raw) =>
|
|
3966
|
+
const absolute = (raw) => path25.resolve(project.projectDir, expand(raw, settings));
|
|
3691
3967
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
3692
3968
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
3693
3969
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -3696,7 +3972,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3696
3972
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
3697
3973
|
).map((raw) => {
|
|
3698
3974
|
const file = absolute(raw);
|
|
3699
|
-
if (!
|
|
3975
|
+
if (!fs14.existsSync(file)) {
|
|
3700
3976
|
return { file, entries: [] };
|
|
3701
3977
|
}
|
|
3702
3978
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -3708,22 +3984,32 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3708
3984
|
...fileLists.get("OUTPUT").flatMap((item) => item.entries)
|
|
3709
3985
|
];
|
|
3710
3986
|
if (allOutputs.includes(infoPlistOutput)) generatedInfoPlist = true;
|
|
3711
|
-
for (const
|
|
3712
|
-
if (
|
|
3713
|
-
scriptForOutput.set(
|
|
3987
|
+
for (const output2 of allOutputs)
|
|
3988
|
+
if (output2.endsWith(".swift") && !scriptForOutput.has(output2))
|
|
3989
|
+
scriptForOutput.set(output2, script);
|
|
3714
3990
|
const inputFiles = [
|
|
3715
3991
|
...inputs,
|
|
3716
3992
|
...fileLists.get("INPUT").flatMap((item) => [item.file, ...item.entries]),
|
|
3717
3993
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
3718
3994
|
];
|
|
3719
3995
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
3720
|
-
for (const file of inputFiles) if (
|
|
3996
|
+
for (const file of inputFiles) if (fs14.existsSync(file)) projectInputs.add(file);
|
|
3721
3997
|
}
|
|
3722
3998
|
if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
3723
|
-
const
|
|
3999
|
+
const configuration = settings("CONFIGURATION");
|
|
4000
|
+
if (preparedXcodePhase(
|
|
4001
|
+
project.projectFile,
|
|
4002
|
+
targetId,
|
|
4003
|
+
phaseId,
|
|
4004
|
+
configuration,
|
|
4005
|
+
allOutputs,
|
|
4006
|
+
false
|
|
4007
|
+
))
|
|
4008
|
+
continue;
|
|
4009
|
+
const phaseDir = path25.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
3724
4010
|
for (const lists of fileLists.values())
|
|
3725
4011
|
for (const { file } of lists)
|
|
3726
|
-
if (!
|
|
4012
|
+
if (!fs14.existsSync(file))
|
|
3727
4013
|
throw new Error(
|
|
3728
4014
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
3729
4015
|
);
|
|
@@ -3742,74 +4028,91 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3742
4028
|
const lists = fileLists.get(kind);
|
|
3743
4029
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
3744
4030
|
lists.forEach((_item, index) => {
|
|
3745
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
4031
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path25.join(
|
|
3746
4032
|
phaseDir,
|
|
3747
4033
|
`${kind}-${index}.xcfilelist`
|
|
3748
4034
|
);
|
|
3749
4035
|
});
|
|
3750
4036
|
}
|
|
3751
|
-
const signature =
|
|
4037
|
+
const signature = createHash13("sha256").update(
|
|
3752
4038
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
3753
4039
|
);
|
|
3754
4040
|
for (const file of inputFiles) {
|
|
3755
4041
|
signature.update(file);
|
|
3756
|
-
if (
|
|
3757
|
-
const stat =
|
|
4042
|
+
if (fs14.existsSync(file)) {
|
|
4043
|
+
const stat = fs14.statSync(file);
|
|
3758
4044
|
signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
|
|
3759
4045
|
} else signature.update("missing");
|
|
3760
4046
|
}
|
|
3761
4047
|
const stamp = signature.digest("hex");
|
|
3762
4048
|
const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
3763
|
-
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) =>
|
|
4049
|
+
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs14.existsSync(file))) {
|
|
4050
|
+
preparedXcodePhase(
|
|
4051
|
+
project.projectFile,
|
|
4052
|
+
targetId,
|
|
4053
|
+
phaseId,
|
|
4054
|
+
configuration,
|
|
4055
|
+
allOutputs,
|
|
4056
|
+
true
|
|
4057
|
+
);
|
|
3764
4058
|
continue;
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
4059
|
+
}
|
|
4060
|
+
fs14.mkdirSync(phaseDir, { recursive: true });
|
|
4061
|
+
fs14.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
4062
|
+
fs14.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
4063
|
+
for (const output2 of allOutputs)
|
|
4064
|
+
fs14.mkdirSync(path25.dirname(output2), { recursive: true });
|
|
3770
4065
|
for (const [kind, lists] of fileLists)
|
|
3771
4066
|
lists.forEach((item, index) => {
|
|
3772
|
-
|
|
4067
|
+
fs14.writeFileSync(
|
|
3773
4068
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
3774
4069
|
`${item.entries.join("\n")}
|
|
3775
4070
|
`
|
|
3776
4071
|
);
|
|
3777
4072
|
});
|
|
3778
4073
|
try {
|
|
3779
|
-
|
|
4074
|
+
execFileSync9(
|
|
3780
4075
|
str(phase.shellPath) ?? "/bin/sh",
|
|
3781
4076
|
["-c", str(phase.shellScript) ?? ""],
|
|
3782
4077
|
{
|
|
3783
4078
|
cwd: project.projectDir,
|
|
3784
4079
|
env,
|
|
3785
4080
|
stdio: ["ignore", "pipe", "pipe"],
|
|
3786
|
-
maxBuffer: Infinity
|
|
4081
|
+
maxBuffer: Infinity,
|
|
4082
|
+
timeout: runScriptTimeoutMs
|
|
3787
4083
|
}
|
|
3788
4084
|
);
|
|
3789
4085
|
} catch (error) {
|
|
3790
|
-
const
|
|
4086
|
+
const output2 = error instanceof Error ? `${error.message}
|
|
3791
4087
|
${"stdout" in error ? String(error.stdout) : ""}${"stderr" in error ? String(error.stderr) : ""}` : String(error);
|
|
3792
4088
|
throw new Error(
|
|
3793
4089
|
`${targetName}: Run Script "${script}" failed preparing generated outputs:
|
|
3794
|
-
${
|
|
4090
|
+
${output2}`
|
|
3795
4091
|
);
|
|
3796
4092
|
}
|
|
3797
4093
|
const missing = allOutputs.filter(
|
|
3798
|
-
(file) => file === infoPlistOutput && !
|
|
4094
|
+
(file) => file === infoPlistOutput && !fs14.existsSync(file)
|
|
3799
4095
|
);
|
|
3800
4096
|
if (missing.length > 0)
|
|
3801
4097
|
throw new Error(
|
|
3802
4098
|
`${targetName}: Run Script "${script}" did not produce ${missing.join(", ")}`
|
|
3803
4099
|
);
|
|
3804
4100
|
preparedSourcePhases.set(key, stamp);
|
|
4101
|
+
preparedXcodePhase(
|
|
4102
|
+
project.projectFile,
|
|
4103
|
+
targetId,
|
|
4104
|
+
phaseId,
|
|
4105
|
+
configuration,
|
|
4106
|
+
allOutputs,
|
|
4107
|
+
true
|
|
4108
|
+
);
|
|
3805
4109
|
}
|
|
3806
4110
|
}
|
|
3807
|
-
|
|
3808
|
-
project.objects,
|
|
4111
|
+
project.visitMembers(
|
|
3809
4112
|
targetId,
|
|
3810
4113
|
project.resolvePath,
|
|
3811
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
3812
|
-
|
|
4114
|
+
(file) => isDirectory(file) ? walkFiles(file) : fs14.existsSync(file) ? [file] : [],
|
|
4115
|
+
path25.join,
|
|
3813
4116
|
(file, kind) => {
|
|
3814
4117
|
if (kind === "header") {
|
|
3815
4118
|
headers.add(file);
|
|
@@ -3819,9 +4122,9 @@ ${output}`
|
|
|
3819
4122
|
resources.add(file);
|
|
3820
4123
|
return;
|
|
3821
4124
|
}
|
|
3822
|
-
if (!
|
|
4125
|
+
if (!fs14.existsSync(file)) {
|
|
3823
4126
|
if (options.requireSources === false) return;
|
|
3824
|
-
const script = scriptForOutput.get(
|
|
4127
|
+
const script = scriptForOutput.get(path25.normalize(file));
|
|
3825
4128
|
throw new Error(
|
|
3826
4129
|
script ? `${targetName}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName}: missing source ${file}`
|
|
3827
4130
|
);
|
|
@@ -3830,14 +4133,6 @@ ${output}`
|
|
|
3830
4133
|
if (file.endsWith(".swift")) sources.add(file);
|
|
3831
4134
|
}
|
|
3832
4135
|
);
|
|
3833
|
-
for (const [file] of scriptForOutput) {
|
|
3834
|
-
if (sources.has(file) || allSources.has(file)) continue;
|
|
3835
|
-
if (!fs4.existsSync(file)) continue;
|
|
3836
|
-
const canonical = fs4.realpathSync(file);
|
|
3837
|
-
if (sources.has(canonical) || allSources.has(canonical)) continue;
|
|
3838
|
-
allSources.add(canonical);
|
|
3839
|
-
sources.add(canonical);
|
|
3840
|
-
}
|
|
3841
4136
|
return {
|
|
3842
4137
|
sources: [...sources].sort(),
|
|
3843
4138
|
resources: [...resources].sort(),
|
|
@@ -3850,37 +4145,37 @@ ${output}`
|
|
|
3850
4145
|
function commonAncestor(dirs) {
|
|
3851
4146
|
let common = dirs[0];
|
|
3852
4147
|
for (const dir of dirs) {
|
|
3853
|
-
while (common !==
|
|
3854
|
-
common =
|
|
4148
|
+
while (common !== path25.dirname(common) && path25.relative(common, dir).startsWith(".."))
|
|
4149
|
+
common = path25.dirname(common);
|
|
3855
4150
|
}
|
|
3856
4151
|
return common;
|
|
3857
4152
|
}
|
|
3858
|
-
var isPodsProject = (xcodeproj) =>
|
|
4153
|
+
var isPodsProject = (xcodeproj) => path25.basename(xcodeproj) === "Pods.xcodeproj" && path25.basename(path25.dirname(xcodeproj)) === "Pods";
|
|
3859
4154
|
function installedPodsSandbox(pods) {
|
|
3860
|
-
const podfileLock =
|
|
3861
|
-
const manifestLock =
|
|
3862
|
-
if (!
|
|
4155
|
+
const podfileLock = path25.join(path25.dirname(pods), "Podfile.lock");
|
|
4156
|
+
const manifestLock = path25.join(pods, "Manifest.lock");
|
|
4157
|
+
if (!fs14.existsSync(podfileLock))
|
|
3863
4158
|
throw new Error(
|
|
3864
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
4159
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${path25.dirname(pods)}`
|
|
3865
4160
|
);
|
|
3866
|
-
if (!
|
|
4161
|
+
if (!fs14.existsSync(manifestLock) || !fs14.readFileSync(manifestLock).equals(fs14.readFileSync(podfileLock)))
|
|
3867
4162
|
throw new Error(
|
|
3868
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
4163
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path25.dirname(pods)}`
|
|
3869
4164
|
);
|
|
3870
4165
|
const specChecksums = {};
|
|
3871
|
-
const lines =
|
|
4166
|
+
const lines = fs14.readFileSync(manifestLock, "utf8").split("\n");
|
|
3872
4167
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
3873
4168
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
3874
4169
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
3875
4170
|
if (!entry) break;
|
|
3876
4171
|
specChecksums[entry[1]] = entry[2];
|
|
3877
4172
|
}
|
|
3878
|
-
const specs =
|
|
4173
|
+
const specs = path25.join(pods, "Local Podspecs");
|
|
3879
4174
|
return {
|
|
3880
4175
|
podfileLock,
|
|
3881
4176
|
manifestLock,
|
|
3882
4177
|
specChecksums,
|
|
3883
|
-
localPodspecs: isDirectory(specs) ?
|
|
4178
|
+
localPodspecs: isDirectory(specs) ? fs14.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => path25.join(specs, name2)) : []
|
|
3884
4179
|
};
|
|
3885
4180
|
}
|
|
3886
4181
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -3892,14 +4187,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
3892
4187
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
3893
4188
|
if (installedPods && isPodsProject(xcodeproj))
|
|
3894
4189
|
throw new Error(
|
|
3895
|
-
`${
|
|
4190
|
+
`${path25.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path25.dirname(path25.dirname(xcodeproj))}`
|
|
3896
4191
|
);
|
|
3897
4192
|
return;
|
|
3898
4193
|
}
|
|
3899
|
-
const key =
|
|
3900
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
4194
|
+
const key = fs14.realpathSync(xcodeproj);
|
|
4195
|
+
if (projectAt.has(key) || !installedPods && key.split(path25.sep).includes("Pods"))
|
|
3901
4196
|
return;
|
|
3902
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
4197
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(path25.dirname(key));
|
|
3903
4198
|
const project = loadProject(key);
|
|
3904
4199
|
projectAt.set(key, project);
|
|
3905
4200
|
projects.push(project);
|
|
@@ -3915,12 +4210,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
3915
4210
|
for (const reference of listed)
|
|
3916
4211
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
3917
4212
|
if (projects.length === 0) {
|
|
3918
|
-
throw new Error(`${
|
|
4213
|
+
throw new Error(`${path25.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
3919
4214
|
}
|
|
3920
|
-
const podfile =
|
|
3921
|
-
if (installedPods && !cocoapods &&
|
|
4215
|
+
const podfile = path25.join(path25.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
4216
|
+
if (installedPods && !cocoapods && fs14.existsSync(podfile))
|
|
3922
4217
|
throw new Error(
|
|
3923
|
-
`${podfile} is not installed into ${
|
|
4218
|
+
`${podfile} is not installed into ${path25.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path25.dirname(podfile)} and open the workspace it writes`
|
|
3924
4219
|
);
|
|
3925
4220
|
return { listed, projects, projectAt, cocoapods };
|
|
3926
4221
|
}
|
|
@@ -3949,14 +4244,134 @@ function isIosAppTarget(ref, options = {}) {
|
|
|
3949
4244
|
const sdk = get("SDKROOT");
|
|
3950
4245
|
return sdk === "auto" ? settingList(get("SUPPORTED_PLATFORMS")).some(isIosPlatform) : sdk === "" || isIosPlatform(sdk);
|
|
3951
4246
|
}
|
|
3952
|
-
function isIosPlatform(
|
|
3953
|
-
return
|
|
4247
|
+
function isIosPlatform(name2) {
|
|
4248
|
+
return name2.startsWith("iphoneos") || name2.startsWith("iphonesimulator");
|
|
3954
4249
|
}
|
|
3955
4250
|
function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
3956
4251
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
|
|
3957
4252
|
}
|
|
4253
|
+
function defaultXcodeAppTarget(xcodeproj) {
|
|
4254
|
+
const project = loadProject(fs14.realpathSync(xcodeproj));
|
|
4255
|
+
for (const [id, target] of Object.entries(project.objects)) {
|
|
4256
|
+
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
4257
|
+
if (isIosAppTarget({ project, id, target }, { requireSources: false }))
|
|
4258
|
+
return str(target.name);
|
|
4259
|
+
}
|
|
4260
|
+
}
|
|
4261
|
+
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
4262
|
+
const container = fs14.realpathSync(xcodeprojOrWorkspace);
|
|
4263
|
+
const { projects } = workspaceProjects(container);
|
|
4264
|
+
const containers = [
|
|
4265
|
+
.../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
|
|
4266
|
+
];
|
|
4267
|
+
const found = containers.flatMap(
|
|
4268
|
+
(dir) => [
|
|
4269
|
+
path25.join(dir, "xcshareddata"),
|
|
4270
|
+
...isDirectory(path25.join(dir, "xcuserdata")) ? fs14.readdirSync(path25.join(dir, "xcuserdata")).sort().map((user) => path25.join(dir, "xcuserdata", user)) : []
|
|
4271
|
+
].map((data) => ({
|
|
4272
|
+
dir,
|
|
4273
|
+
file: path25.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
4274
|
+
}))
|
|
4275
|
+
).find((candidate) => fs14.existsSync(candidate.file));
|
|
4276
|
+
if (!found) {
|
|
4277
|
+
const known = containers.flatMap(
|
|
4278
|
+
(dir) => fs14.existsSync(path25.join(dir, "xcshareddata", "xcschemes")) ? fs14.readdirSync(path25.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
|
|
4279
|
+
);
|
|
4280
|
+
throw new Error(
|
|
4281
|
+
`${path25.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
4282
|
+
);
|
|
4283
|
+
}
|
|
4284
|
+
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
4285
|
+
fs14.readFileSync(found.file, "utf8")
|
|
4286
|
+
);
|
|
4287
|
+
const attribute = (text2, name3) => {
|
|
4288
|
+
const value = new RegExp(`\\b${name3}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
|
|
4289
|
+
return value === void 0 ? void 0 : decodeXml(value);
|
|
4290
|
+
};
|
|
4291
|
+
const runnable = launch ? /<BuildableProductRunnable\b[\s\S]*?<BuildableReference\b([^>]*)>/.exec(launch[2]) : null;
|
|
4292
|
+
const configuration = launch ? attribute(launch[1], "buildConfiguration") : void 0;
|
|
4293
|
+
const blueprint = runnable ? attribute(runnable[1], "BlueprintIdentifier") : void 0;
|
|
4294
|
+
const referenced = runnable ? attribute(runnable[1], "ReferencedContainer") : void 0;
|
|
4295
|
+
if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
|
|
4296
|
+
throw new Error(`scheme ${scheme} runs no application target`);
|
|
4297
|
+
}
|
|
4298
|
+
const projectPath = path25.resolve(
|
|
4299
|
+
path25.dirname(found.dir),
|
|
4300
|
+
referenced.slice("container:".length)
|
|
4301
|
+
);
|
|
4302
|
+
const project = projects.find(
|
|
4303
|
+
(candidate) => fs14.existsSync(projectPath) && candidate.xcodeproj === fs14.realpathSync(projectPath)
|
|
4304
|
+
);
|
|
4305
|
+
const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
|
|
4306
|
+
const name2 = target && str(target.target.name);
|
|
4307
|
+
if (!name2) throw new Error(`scheme ${scheme} runs a target no project here declares`);
|
|
4308
|
+
return { target: name2, configuration };
|
|
4309
|
+
}
|
|
4310
|
+
var NativeAppTargetSelectionError = class extends Error {
|
|
4311
|
+
};
|
|
4312
|
+
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
4313
|
+
const nested = path25.join(projectRoot, "ios");
|
|
4314
|
+
const iosRoot = fs14.existsSync(nested) ? nested : projectRoot;
|
|
4315
|
+
const projects = fs14.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
4316
|
+
if (projects.length === 0) return null;
|
|
4317
|
+
if (projects.length > 1 && !iosTarget) {
|
|
4318
|
+
throw new NativeAppTargetSelectionError(
|
|
4319
|
+
`native app identity requires a selected Xcode project; set withPeach's iosTarget to an app target in one of: ${projects.map((entry) => entry.name).join(", ")}`
|
|
4320
|
+
);
|
|
4321
|
+
}
|
|
4322
|
+
let project = projects[0];
|
|
4323
|
+
if (iosTarget && projects.length > 1) {
|
|
4324
|
+
const matches = projects.filter(
|
|
4325
|
+
(entry) => listXcodeAppTargets(path25.join(iosRoot, entry.name), {
|
|
4326
|
+
requireSources: false
|
|
4327
|
+
}).includes(iosTarget)
|
|
4328
|
+
);
|
|
4329
|
+
if (matches.length === 0)
|
|
4330
|
+
throw new Error(`native app identity has no application target ${iosTarget}`);
|
|
4331
|
+
if (matches.length > 1)
|
|
4332
|
+
throw new Error(
|
|
4333
|
+
`native app identity target ${iosTarget} is ambiguous across ${matches.map((entry) => entry.name).join(", ")}`
|
|
4334
|
+
);
|
|
4335
|
+
project = matches[0];
|
|
4336
|
+
}
|
|
4337
|
+
const xcodeproj = path25.join(iosRoot, project.name);
|
|
4338
|
+
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
4339
|
+
let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
|
|
4340
|
+
if (!target) throw new Error("native app identity has no iOS application target");
|
|
4341
|
+
if (!iosTarget) {
|
|
4342
|
+
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
4343
|
+
const container = fs14.existsSync(workspace) ? workspace : xcodeproj;
|
|
4344
|
+
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
4345
|
+
if (fs14.existsSync(path25.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
4346
|
+
return true;
|
|
4347
|
+
const users = path25.join(dir, "xcuserdata");
|
|
4348
|
+
return fs14.existsSync(users) && fs14.readdirSync(users).some(
|
|
4349
|
+
(user) => fs14.existsSync(path25.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
4350
|
+
);
|
|
4351
|
+
});
|
|
4352
|
+
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
4353
|
+
}
|
|
4354
|
+
if (!appTargets.includes(target))
|
|
4355
|
+
throw new Error(`native app identity has no application target ${target}`);
|
|
4356
|
+
return { xcodeproj, target };
|
|
4357
|
+
}
|
|
4358
|
+
var workspaceResolvedFile = (xcodeprojOrWorkspace) => path25.join(
|
|
4359
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path25.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
4360
|
+
"xcshareddata",
|
|
4361
|
+
"swiftpm",
|
|
4362
|
+
"Package.resolved"
|
|
4363
|
+
);
|
|
4364
|
+
var SwiftPackageResolutionRequired = class extends Error {
|
|
4365
|
+
constructor(requirements, destination) {
|
|
4366
|
+
super(
|
|
4367
|
+
`the project has no Package.resolved: ${destination}; await prepareXcodeSwiftPackages first`
|
|
4368
|
+
);
|
|
4369
|
+
this.requirements = requirements;
|
|
4370
|
+
this.destination = destination;
|
|
4371
|
+
}
|
|
4372
|
+
};
|
|
3958
4373
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
3959
|
-
const xcodeprojOrWorkspace =
|
|
4374
|
+
const xcodeprojOrWorkspace = fs14.realpathSync(input);
|
|
3960
4375
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
3961
4376
|
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
3962
4377
|
xcodeprojOrWorkspace,
|
|
@@ -3965,7 +4380,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3965
4380
|
const allTargets = projects.flatMap(projectTargets);
|
|
3966
4381
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
3967
4382
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
3968
|
-
const container =
|
|
4383
|
+
const container = path25.basename(xcodeprojOrWorkspace);
|
|
3969
4384
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
3970
4385
|
if (named.length !== 1) {
|
|
3971
4386
|
throw new Error(
|
|
@@ -3978,15 +4393,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3978
4393
|
for (const ref of allTargets) {
|
|
3979
4394
|
const product = ref.project.object(str(ref.target.productReference));
|
|
3980
4395
|
const file = str(product?.path);
|
|
3981
|
-
if (file && !byProduct.has(
|
|
3982
|
-
byProduct.set(
|
|
4396
|
+
if (file && !byProduct.has(path25.basename(file)))
|
|
4397
|
+
byProduct.set(path25.basename(file), ref);
|
|
3983
4398
|
}
|
|
3984
4399
|
const proxied = (project, proxyId) => {
|
|
3985
4400
|
const proxy = project.object(proxyId);
|
|
3986
4401
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
3987
4402
|
const portal = str(proxy.containerPortal);
|
|
3988
4403
|
const portalPath = project.resolvePath(portal ?? "");
|
|
3989
|
-
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath &&
|
|
4404
|
+
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && fs14.existsSync(portalPath) ? projectAt.get(fs14.realpathSync(portalPath)) : void 0;
|
|
3990
4405
|
const remote = str(proxy.remoteGlobalIDString);
|
|
3991
4406
|
if (!owner || !remote) return void 0;
|
|
3992
4407
|
return projectTargets(owner).find(
|
|
@@ -3998,16 +4413,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3998
4413
|
const found = [];
|
|
3999
4414
|
for (const dependencyId of list(target.dependencies)) {
|
|
4000
4415
|
const dependency = project.object(dependencyId);
|
|
4001
|
-
|
|
4002
|
-
const
|
|
4416
|
+
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
|
|
4417
|
+
const direct = str(dependency.target);
|
|
4418
|
+
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
|
|
4003
4419
|
if (resolved) found.push(resolved);
|
|
4004
4420
|
}
|
|
4005
4421
|
for (const phaseId of list(target.buildPhases)) {
|
|
4006
4422
|
const phase = project.object(phaseId);
|
|
4007
4423
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
4008
4424
|
for (const buildFileId of list(phase.files)) {
|
|
4009
|
-
const
|
|
4010
|
-
|
|
4425
|
+
const buildFile = project.object(buildFileId);
|
|
4426
|
+
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
4427
|
+
const file = project.object(str(buildFile.fileRef));
|
|
4428
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path25.basename(str(file.path) ?? "")) : void 0;
|
|
4011
4429
|
if (resolved) found.push(resolved);
|
|
4012
4430
|
}
|
|
4013
4431
|
}
|
|
@@ -4029,8 +4447,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4029
4447
|
if (phase?.isa !== "PBXHeadersBuildPhase") return [];
|
|
4030
4448
|
return list(phase.files).flatMap((id) => {
|
|
4031
4449
|
const file = ref.project.object(id);
|
|
4032
|
-
|
|
4033
|
-
const
|
|
4450
|
+
if (!file || !xcodeBuildFileBuildsForIos(file)) return [];
|
|
4451
|
+
const resolved = ref.project.resolvePath(str(file.fileRef) ?? "");
|
|
4452
|
+
const attributes = isDict(file.settings) ? list(file.settings.ATTRIBUTES) : [];
|
|
4034
4453
|
if (!resolved) return [];
|
|
4035
4454
|
return [
|
|
4036
4455
|
{
|
|
@@ -4040,24 +4459,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4040
4459
|
];
|
|
4041
4460
|
});
|
|
4042
4461
|
});
|
|
4043
|
-
const
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4462
|
+
const productNames = /* @__PURE__ */ new Map();
|
|
4463
|
+
const productName = (ref) => {
|
|
4464
|
+
const key = `${ref.project.xcodeproj}\0${ref.id}`;
|
|
4465
|
+
const cached = productNames.get(key);
|
|
4466
|
+
if (cached !== void 0) return cached;
|
|
4467
|
+
const product = targetSettings(
|
|
4468
|
+
ref,
|
|
4469
|
+
configuration,
|
|
4470
|
+
{ TARGET_NAME: str(ref.target.name) ?? ref.id },
|
|
4471
|
+
options
|
|
4472
|
+
).get("PRODUCT_NAME");
|
|
4473
|
+
productNames.set(key, product);
|
|
4474
|
+
return product;
|
|
4475
|
+
};
|
|
4049
4476
|
const syncHeaderCache = /* @__PURE__ */ new Map();
|
|
4050
4477
|
const synchronizedHeaders = (ref) => {
|
|
4051
4478
|
const key = `${ref.project.xcodeproj}\0${ref.id}`;
|
|
4052
4479
|
const cached = syncHeaderCache.get(key);
|
|
4053
4480
|
if (cached) return cached;
|
|
4054
4481
|
const found = [];
|
|
4055
|
-
|
|
4056
|
-
ref.project.objects,
|
|
4482
|
+
ref.project.visitMembers(
|
|
4057
4483
|
ref.id,
|
|
4058
4484
|
ref.project.resolvePath,
|
|
4059
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
4060
|
-
|
|
4485
|
+
(file) => isDirectory(file) ? walkFiles(file) : fs14.existsSync(file) ? [file] : [],
|
|
4486
|
+
path25.join,
|
|
4061
4487
|
(file, kind) => {
|
|
4062
4488
|
if (kind === "header") found.push(file);
|
|
4063
4489
|
}
|
|
@@ -4073,13 +4499,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4073
4499
|
for (const ref of projectTargets(project)) {
|
|
4074
4500
|
const product = productName(ref);
|
|
4075
4501
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
4076
|
-
const
|
|
4077
|
-
if (!entries.has(
|
|
4078
|
-
entries.set(
|
|
4502
|
+
const name2 = path25.basename(file);
|
|
4503
|
+
if (!entries.has(name2))
|
|
4504
|
+
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
4079
4505
|
}
|
|
4080
4506
|
for (const file of synchronizedHeaders(ref)) {
|
|
4081
|
-
const
|
|
4082
|
-
if (!entries.has(
|
|
4507
|
+
const name2 = path25.basename(file);
|
|
4508
|
+
if (!entries.has(name2)) entries.set(name2, file);
|
|
4083
4509
|
}
|
|
4084
4510
|
}
|
|
4085
4511
|
for (const ref of projectTargets(project)) {
|
|
@@ -4088,29 +4514,29 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4088
4514
|
if (folder === null) continue;
|
|
4089
4515
|
for (const file of walkFiles(folder)) {
|
|
4090
4516
|
if (!HEADER_FILE.test(file)) continue;
|
|
4091
|
-
const
|
|
4092
|
-
if (!entries.has(
|
|
4517
|
+
const name2 = path25.basename(file);
|
|
4518
|
+
if (!entries.has(name2)) entries.set(name2, file);
|
|
4093
4519
|
}
|
|
4094
4520
|
}
|
|
4095
4521
|
}
|
|
4096
4522
|
for (const id of Object.keys(project.objects)) {
|
|
4097
4523
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
4098
4524
|
const file = project.resolvePath(id);
|
|
4099
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
4100
|
-
entries.set(
|
|
4525
|
+
if (file && HEADER_FILE.test(file) && !entries.has(path25.basename(file)))
|
|
4526
|
+
entries.set(path25.basename(file), file);
|
|
4101
4527
|
}
|
|
4102
4528
|
const map = [...entries];
|
|
4103
4529
|
projectHeaderMaps.set(project, map);
|
|
4104
4530
|
return map;
|
|
4105
4531
|
};
|
|
4106
4532
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
4107
|
-
const buildDir = (project) =>
|
|
4533
|
+
const buildDir = (project) => path25.join(project.projectDir, ".build/peach-xcode/Build");
|
|
4108
4534
|
const podsBuild = {
|
|
4109
|
-
SYMROOT:
|
|
4110
|
-
OBJROOT:
|
|
4535
|
+
SYMROOT: path25.join(buildDir(app.project), "Products"),
|
|
4536
|
+
OBJROOT: path25.join(buildDir(app.project), "Intermediates.noindex")
|
|
4111
4537
|
};
|
|
4112
4538
|
const moduleTarget = (ref) => {
|
|
4113
|
-
const
|
|
4539
|
+
const name2 = str(ref.target.name) ?? ref.id;
|
|
4114
4540
|
const {
|
|
4115
4541
|
get: settings2,
|
|
4116
4542
|
keys,
|
|
@@ -4119,18 +4545,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4119
4545
|
ref,
|
|
4120
4546
|
configuration,
|
|
4121
4547
|
{
|
|
4122
|
-
TARGET_NAME:
|
|
4548
|
+
TARGET_NAME: name2,
|
|
4123
4549
|
TARGETNAME: "$(TARGET_NAME)",
|
|
4124
4550
|
PROJECT: "$(PROJECT_NAME)",
|
|
4125
|
-
PROJECT_NAME:
|
|
4551
|
+
PROJECT_NAME: path25.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
4126
4552
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
4127
4553
|
SRCROOT: ref.project.projectDir,
|
|
4128
4554
|
SOURCE_ROOT: ref.project.projectDir,
|
|
4129
4555
|
PROJECT_DIR: ref.project.projectDir,
|
|
4130
|
-
SYMROOT:
|
|
4556
|
+
SYMROOT: path25.join(buildDir(ref.project), "Products"),
|
|
4131
4557
|
BUILD_DIR: "$(SYMROOT)",
|
|
4132
4558
|
BUILD_ROOT: "$(SYMROOT)",
|
|
4133
|
-
OBJROOT:
|
|
4559
|
+
OBJROOT: path25.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
4134
4560
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
4135
4561
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
4136
4562
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -4170,7 +4596,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4170
4596
|
xcconfigs
|
|
4171
4597
|
);
|
|
4172
4598
|
const searchRules = recursiveSearchRules(settings2);
|
|
4173
|
-
const absolute = (file) =>
|
|
4599
|
+
const absolute = (file) => path25.resolve(ref.project.projectDir, file);
|
|
4174
4600
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
4175
4601
|
const product = settings2("PRODUCT_NAME");
|
|
4176
4602
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -4190,18 +4616,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4190
4616
|
const outputUmbrella = outputs.find((file) => file.endsWith("-umbrella.h"));
|
|
4191
4617
|
const outputHeader = outputs.find((file) => file.endsWith(`/${moduleName}-Swift.h`));
|
|
4192
4618
|
if (!moduleMap2 || !umbrella || !outputModuleMap || !outputUmbrella || !outputHeader)
|
|
4193
|
-
throw new Error(`${
|
|
4619
|
+
throw new Error(`${name2}: incomplete CocoaPods Swift compatibility header phase`);
|
|
4194
4620
|
return [{ id, moduleMap: moduleMap2, umbrella, outputModuleMap, outputUmbrella, outputHeader }];
|
|
4195
4621
|
});
|
|
4196
4622
|
if (compatibilityPhases.length > 1)
|
|
4197
|
-
throw new Error(`${
|
|
4623
|
+
throw new Error(`${name2}: multiple CocoaPods Swift compatibility header phases`);
|
|
4198
4624
|
const compatibility = compatibilityPhases[0];
|
|
4199
4625
|
if (compatibility && members.sources.length === 0)
|
|
4200
4626
|
throw new Error(
|
|
4201
|
-
`${
|
|
4627
|
+
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
4202
4628
|
);
|
|
4203
4629
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
4204
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
4630
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path25.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
4205
4631
|
if (versioning) {
|
|
4206
4632
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
4207
4633
|
const custom = [
|
|
@@ -4214,7 +4640,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4214
4640
|
].filter((key) => settings2(key));
|
|
4215
4641
|
if (custom.length)
|
|
4216
4642
|
throw new Error(
|
|
4217
|
-
`${
|
|
4643
|
+
`${name2}: Xcode generates ${path25.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
4218
4644
|
);
|
|
4219
4645
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
4220
4646
|
const [major, minor] = version.split(".");
|
|
@@ -4227,39 +4653,39 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4227
4653
|
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
|
|
4228
4654
|
""
|
|
4229
4655
|
].join("\n");
|
|
4230
|
-
if (!
|
|
4231
|
-
|
|
4232
|
-
|
|
4656
|
+
if (!fs14.existsSync(versioning) || fs14.readFileSync(versioning, "utf8") !== unit) {
|
|
4657
|
+
fs14.mkdirSync(path25.dirname(versioning), { recursive: true });
|
|
4658
|
+
fs14.writeFileSync(versioning, unit);
|
|
4233
4659
|
}
|
|
4234
4660
|
allSources.push(versioning);
|
|
4235
4661
|
}
|
|
4236
4662
|
const implementations = allSources.filter(isSwiftNativeTranslationUnit);
|
|
4237
|
-
const native = implementations.length > 0;
|
|
4663
|
+
const native = implementations.length > 0 || Boolean(settings2("SWIFT_OBJC_BRIDGING_HEADER"));
|
|
4238
4664
|
if (native && building) {
|
|
4239
4665
|
if (list(ref.target.buildRules).length > 0)
|
|
4240
4666
|
throw new Error(
|
|
4241
|
-
`${
|
|
4667
|
+
`${name2}: Xcode's generated-files header map for build rules is not modeled`
|
|
4242
4668
|
);
|
|
4243
4669
|
if (settings2("ALWAYS_SEARCH_USER_PATHS") === "YES" && settings2("USER_HEADER_SEARCH_PATHS").trim())
|
|
4244
4670
|
throw new Error(
|
|
4245
|
-
`${
|
|
4671
|
+
`${name2}: ALWAYS_SEARCH_USER_PATHS=YES also searches USER_HEADER_SEARCH_PATHS for angle-bracket includes, which is not modeled`
|
|
4246
4672
|
);
|
|
4247
4673
|
}
|
|
4248
4674
|
const headerFiles = headerPhase(ref);
|
|
4249
4675
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
4250
4676
|
for (const { file, visibility } of headerFiles) {
|
|
4251
|
-
const
|
|
4677
|
+
const name3 = path25.basename(file);
|
|
4252
4678
|
const published = visibility !== "Project";
|
|
4253
|
-
if (!ownHeaders.has(
|
|
4254
|
-
ownHeaders.set(
|
|
4255
|
-
if (!published && !ownHeaders.has(`${product}/${
|
|
4256
|
-
ownHeaders.set(`${product}/${
|
|
4679
|
+
if (!ownHeaders.has(name3))
|
|
4680
|
+
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
4681
|
+
if (!published && !ownHeaders.has(`${product}/${name3}`))
|
|
4682
|
+
ownHeaders.set(`${product}/${name3}`, file);
|
|
4257
4683
|
}
|
|
4258
4684
|
for (const file of synchronizedHeaders(ref)) {
|
|
4259
|
-
const
|
|
4260
|
-
if (ownHeaders.has(
|
|
4261
|
-
ownHeaders.set(
|
|
4262
|
-
const qualified = `${product}/${
|
|
4685
|
+
const name3 = path25.basename(file);
|
|
4686
|
+
if (ownHeaders.has(name3)) continue;
|
|
4687
|
+
ownHeaders.set(name3, file);
|
|
4688
|
+
const qualified = `${product}/${name3}`;
|
|
4263
4689
|
if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file);
|
|
4264
4690
|
}
|
|
4265
4691
|
const nonFrameworkHeaders = /* @__PURE__ */ new Map();
|
|
@@ -4268,24 +4694,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4268
4694
|
const otherProduct = productName(other);
|
|
4269
4695
|
for (const { file, visibility } of headerPhase(other)) {
|
|
4270
4696
|
if (visibility === "Project") continue;
|
|
4271
|
-
const key = `${otherProduct}/${
|
|
4697
|
+
const key = `${otherProduct}/${path25.basename(file)}`;
|
|
4272
4698
|
if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
|
|
4273
4699
|
}
|
|
4274
4700
|
}
|
|
4275
|
-
const wrapper =
|
|
4701
|
+
const wrapper = path25.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
4276
4702
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
4277
|
-
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ?
|
|
4278
|
-
const frameworkCompatibility = frameworkUmbrella && moduleMap &&
|
|
4703
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path25.join(path25.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
4704
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap && fs14.existsSync(moduleMap) && fs14.existsSync(frameworkUmbrella) ? {
|
|
4279
4705
|
framework: true,
|
|
4280
4706
|
moduleMap,
|
|
4281
4707
|
umbrella: frameworkUmbrella,
|
|
4282
|
-
outputModuleMap:
|
|
4283
|
-
outputUmbrella:
|
|
4708
|
+
outputModuleMap: path25.join(wrapper, "Modules", "module.modulemap"),
|
|
4709
|
+
outputUmbrella: path25.join(
|
|
4284
4710
|
wrapper,
|
|
4285
4711
|
"Headers",
|
|
4286
|
-
|
|
4712
|
+
path25.basename(frameworkUmbrella)
|
|
4287
4713
|
),
|
|
4288
|
-
outputHeader:
|
|
4714
|
+
outputHeader: path25.join(
|
|
4289
4715
|
wrapper,
|
|
4290
4716
|
"Headers",
|
|
4291
4717
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
@@ -4299,10 +4725,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4299
4725
|
outputUmbrella: compatibility.outputUmbrella,
|
|
4300
4726
|
outputHeader: compatibility.outputHeader
|
|
4301
4727
|
} : frameworkCompatibility;
|
|
4302
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap &&
|
|
4728
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path25.relative(path25.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path25.sep)[0] !== ".." && fs14.existsSync(moduleMap) ? fs14.readdirSync(path25.dirname(moduleMap)).flatMap((entry) => {
|
|
4303
4729
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
4304
|
-
const file =
|
|
4305
|
-
return
|
|
4730
|
+
const file = path25.join(path25.dirname(moduleMap), entry);
|
|
4731
|
+
return fs14.existsSync(file) ? [file] : [];
|
|
4306
4732
|
}) : [];
|
|
4307
4733
|
const fileFlags = {};
|
|
4308
4734
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -4326,8 +4752,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4326
4752
|
settings: settings2,
|
|
4327
4753
|
keys,
|
|
4328
4754
|
module: {
|
|
4329
|
-
name,
|
|
4755
|
+
name: name2,
|
|
4330
4756
|
moduleName,
|
|
4757
|
+
...settings2("PODS_TARGET_SRCROOT") ? { podRoot: absolute(settings2("PODS_TARGET_SRCROOT")) } : {},
|
|
4331
4758
|
...members,
|
|
4332
4759
|
allSources,
|
|
4333
4760
|
languageMode: swiftVersion >= 6 ? 6 : 5,
|
|
@@ -4345,8 +4772,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4345
4772
|
packageProducts: Array(),
|
|
4346
4773
|
...members.sources.length > 0 ? {
|
|
4347
4774
|
swift: {
|
|
4348
|
-
flags:
|
|
4775
|
+
flags: [
|
|
4776
|
+
...settingList(settings2("SWIFT_OPTIMIZATION_LEVEL")),
|
|
4777
|
+
...settingList(settings2("OTHER_SWIFT_FLAGS"))
|
|
4778
|
+
],
|
|
4349
4779
|
includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
|
|
4780
|
+
cxxInterop: settings2("SWIFT_OBJC_INTEROP_MODE") === "objcxx",
|
|
4781
|
+
cxxStandard: cxxStandard && cxxStandard !== "compiler-default" ? CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard : null,
|
|
4350
4782
|
compatibility: swiftCompatibility
|
|
4351
4783
|
}
|
|
4352
4784
|
} : {},
|
|
@@ -4358,29 +4790,21 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4358
4790
|
),
|
|
4359
4791
|
...podHeaders.filter((file) => HEADER_FILE.test(file))
|
|
4360
4792
|
],
|
|
4361
|
-
headers
|
|
4362
|
-
.../* @__PURE__ */ new Set([
|
|
4363
|
-
...headers,
|
|
4364
|
-
...Object.keys(ref.project.objects).flatMap((id) => {
|
|
4365
|
-
const file = ref.project.resolvePath(id);
|
|
4366
|
-
return file && HEADER_FILE.test(file) && fs4.existsSync(file) ? [file] : [];
|
|
4367
|
-
})
|
|
4368
|
-
])
|
|
4369
|
-
],
|
|
4793
|
+
headers,
|
|
4370
4794
|
prefixHeader: settings2("GCC_PREFIX_HEADER") ? absolute(settings2("GCC_PREFIX_HEADER")) : null,
|
|
4371
4795
|
bridgingHeader: settings2("SWIFT_OBJC_BRIDGING_HEADER") ? absolute(settings2("SWIFT_OBJC_BRIDGING_HEADER")) : null,
|
|
4372
4796
|
// xcode searches its products' include directory before
|
|
4373
4797
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
4374
4798
|
headerSearchPaths: [
|
|
4375
|
-
|
|
4799
|
+
path25.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
4376
4800
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
4377
4801
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
4378
4802
|
),
|
|
4379
|
-
|
|
4803
|
+
path25.join(
|
|
4380
4804
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
4381
4805
|
settings2("CURRENT_ARCH")
|
|
4382
4806
|
),
|
|
4383
|
-
|
|
4807
|
+
path25.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
4384
4808
|
settings2("DERIVED_FILE_DIR")
|
|
4385
4809
|
],
|
|
4386
4810
|
userHeaderSearchPaths: settingList(
|
|
@@ -4424,10 +4848,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4424
4848
|
...headerFiles.flatMap(
|
|
4425
4849
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
4426
4850
|
[
|
|
4427
|
-
|
|
4851
|
+
path25.join(
|
|
4428
4852
|
wrapper,
|
|
4429
4853
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
4430
|
-
|
|
4854
|
+
path25.basename(file)
|
|
4431
4855
|
),
|
|
4432
4856
|
file
|
|
4433
4857
|
]
|
|
@@ -4441,7 +4865,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4441
4865
|
return [];
|
|
4442
4866
|
const destination = expand(
|
|
4443
4867
|
str(phase.dstPath) ?? "",
|
|
4444
|
-
(
|
|
4868
|
+
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? path25.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? path25.join(wrapper, "PrivateHeaders") : settings2(name3)
|
|
4445
4869
|
);
|
|
4446
4870
|
return list(phase.files).flatMap((id) => {
|
|
4447
4871
|
const file = ref.project.resolvePath(
|
|
@@ -4449,18 +4873,21 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4449
4873
|
);
|
|
4450
4874
|
return file && HEADER_FILE.test(file) ? [
|
|
4451
4875
|
[
|
|
4452
|
-
|
|
4876
|
+
path25.resolve(
|
|
4453
4877
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
4454
4878
|
destination,
|
|
4455
|
-
|
|
4879
|
+
path25.basename(file)
|
|
4456
4880
|
),
|
|
4457
4881
|
file
|
|
4458
4882
|
]
|
|
4459
4883
|
] : [];
|
|
4460
4884
|
});
|
|
4461
4885
|
}),
|
|
4462
|
-
...moduleMap ? [[
|
|
4463
|
-
]) : Object.fromEntries(
|
|
4886
|
+
...moduleMap ? [[path25.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
4887
|
+
]) : Object.fromEntries([
|
|
4888
|
+
...podHeaders.map((file) => [file, file]),
|
|
4889
|
+
...moduleMap ? [[moduleMap, moduleMap]] : []
|
|
4890
|
+
])
|
|
4464
4891
|
}
|
|
4465
4892
|
} : {}
|
|
4466
4893
|
}
|
|
@@ -4468,10 +4895,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4468
4895
|
};
|
|
4469
4896
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
4470
4897
|
const { settings, keys: settingKeys, module } = builtTargets.at(-1);
|
|
4471
|
-
const
|
|
4898
|
+
const nativeTargets = /* @__PURE__ */ new Set();
|
|
4899
|
+
const includeNativeTarget = (ref) => {
|
|
4900
|
+
if (nativeTargets.has(ref)) return;
|
|
4901
|
+
nativeTargets.add(ref);
|
|
4902
|
+
for (const dependency of dependenciesOf(ref)) includeNativeTarget(dependency);
|
|
4903
|
+
};
|
|
4904
|
+
for (const { ref, module: module2 } of builtTargets)
|
|
4905
|
+
if (options.nativeModules?.includes(module2.moduleName)) includeNativeTarget(ref);
|
|
4906
|
+
const selectedTargets = options.nativeModules ? builtTargets.filter((target) => nativeTargets.has(target.ref)) : builtTargets;
|
|
4907
|
+
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module2 }) => ({ ref, framework: module2 }));
|
|
4472
4908
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
4473
|
-
const podSourceDirs =
|
|
4474
|
-
({ ref,
|
|
4909
|
+
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
4910
|
+
({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path25.dirname(file)).filter((dir) => fs14.existsSync(dir)) : []
|
|
4475
4911
|
);
|
|
4476
4912
|
const expandValue = (value, settings2) => {
|
|
4477
4913
|
if (typeof value === "string") return expand(value, settings2);
|
|
@@ -4487,26 +4923,28 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4487
4923
|
const bundleTargets = builtTargets.filter(
|
|
4488
4924
|
({ ref }) => ref.target.productType === RESOURCE_BUNDLE
|
|
4489
4925
|
);
|
|
4490
|
-
for (const owner of options.installedPods ?
|
|
4926
|
+
for (const owner of options.installedPods ? selectedTargets : []) {
|
|
4491
4927
|
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
4492
4928
|
const phase = owner.ref.project.object(phaseId);
|
|
4493
4929
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
4494
4930
|
continue;
|
|
4495
|
-
const absolute = (raw) =>
|
|
4931
|
+
const absolute = (raw) => path25.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
4496
4932
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
4497
4933
|
const file = absolute(raw);
|
|
4498
4934
|
xcconfigs.add(file);
|
|
4499
4935
|
return fileListEntries(file, absolute);
|
|
4500
4936
|
});
|
|
4501
|
-
const inputs =
|
|
4502
|
-
(
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4937
|
+
const inputs = [
|
|
4938
|
+
...list(phase.inputPaths).map(absolute),
|
|
4939
|
+
...entries(list(phase.inputFileListPaths))
|
|
4940
|
+
].filter((file) => file.endsWith(".bundle"));
|
|
4941
|
+
const outputs = [
|
|
4942
|
+
...list(phase.outputPaths).map(absolute),
|
|
4943
|
+
...entries(list(phase.outputFileListPaths))
|
|
4944
|
+
].filter((file) => file.endsWith(".bundle"));
|
|
4507
4945
|
if (inputs.length !== outputs.length)
|
|
4508
4946
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
4509
|
-
const destinationRoot =
|
|
4947
|
+
const destinationRoot = path25.join(
|
|
4510
4948
|
owner.settings("TARGET_BUILD_DIR"),
|
|
4511
4949
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
4512
4950
|
);
|
|
@@ -4515,41 +4953,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4515
4953
|
const file = str(
|
|
4516
4954
|
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
4517
4955
|
);
|
|
4518
|
-
return file &&
|
|
4956
|
+
return file && path25.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
4519
4957
|
});
|
|
4520
|
-
if (!product)
|
|
4958
|
+
if (!product && !isDirectory(input2))
|
|
4521
4959
|
throw new Error(
|
|
4522
4960
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
4523
4961
|
);
|
|
4524
|
-
const destination =
|
|
4525
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
4962
|
+
const destination = path25.relative(destinationRoot, outputs[index]);
|
|
4963
|
+
if (destination === ".." || destination.startsWith(`..${path25.sep}`) || path25.isAbsolute(destination) || path25.basename(input2) !== path25.basename(destination))
|
|
4526
4964
|
throw new Error(
|
|
4527
4965
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
4528
4966
|
);
|
|
4529
|
-
const infoFile =
|
|
4967
|
+
const infoFile = product ? path25.resolve(
|
|
4530
4968
|
product.ref.project.projectDir,
|
|
4531
4969
|
product.settings("INFOPLIST_FILE")
|
|
4532
|
-
);
|
|
4533
|
-
xcconfigs.add(infoFile);
|
|
4534
|
-
const parsed = plist2.parse(fs4.readFileSync(infoFile, "utf8"));
|
|
4535
|
-
const infoPlist = plist2.build(expandValue(parsed, product.settings));
|
|
4970
|
+
) : null;
|
|
4971
|
+
if (infoFile) xcconfigs.add(infoFile);
|
|
4536
4972
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
4537
|
-
const bundlePath = prefix + destination.split(
|
|
4973
|
+
const bundlePath = prefix + destination.split(path25.sep).join("/");
|
|
4538
4974
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
4539
4975
|
throw new Error(
|
|
4540
4976
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
4541
4977
|
);
|
|
4542
4978
|
resourceProducts.push({
|
|
4543
4979
|
path: bundlePath,
|
|
4544
|
-
|
|
4545
|
-
|
|
4980
|
+
...product ? {
|
|
4981
|
+
resources: product.module.resources,
|
|
4982
|
+
infoPlist: plist2.build(
|
|
4983
|
+
expandValue(
|
|
4984
|
+
plist2.parse(fs14.readFileSync(infoFile, "utf8")),
|
|
4985
|
+
product.settings
|
|
4986
|
+
)
|
|
4987
|
+
)
|
|
4988
|
+
} : {
|
|
4989
|
+
resources: fs14.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path25.join(entry.parentPath, entry.name)).sort(),
|
|
4990
|
+
sourceRoot: input2
|
|
4991
|
+
}
|
|
4546
4992
|
});
|
|
4547
4993
|
}
|
|
4548
4994
|
}
|
|
4549
4995
|
}
|
|
4550
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
4996
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? path25.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
4551
4997
|
const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
4552
|
-
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(
|
|
4998
|
+
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(fs14.readFileSync(infoPlistFile, "utf8")) : {};
|
|
4553
4999
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
4554
5000
|
throw new Error(`${module.name} Info.plist must contain a dictionary`);
|
|
4555
5001
|
}
|
|
@@ -4578,7 +5024,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4578
5024
|
};
|
|
4579
5025
|
}
|
|
4580
5026
|
const localPackageDirs = [
|
|
4581
|
-
...listed.filter((reference) =>
|
|
5027
|
+
...listed.filter((reference) => fs14.existsSync(path25.join(reference, "Package.swift"))),
|
|
4582
5028
|
...projects.flatMap(
|
|
4583
5029
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
4584
5030
|
if (!isDict(entry)) return [];
|
|
@@ -4588,19 +5034,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4588
5034
|
const packages = [];
|
|
4589
5035
|
while (pending.length > 0) {
|
|
4590
5036
|
const dir = pending.pop();
|
|
4591
|
-
if (
|
|
5037
|
+
if (fs14.existsSync(path25.join(dir, "Package.swift"))) {
|
|
4592
5038
|
packages.push(dir);
|
|
4593
5039
|
continue;
|
|
4594
5040
|
}
|
|
4595
5041
|
if (!isDirectory(dir)) continue;
|
|
4596
|
-
for (const child of
|
|
5042
|
+
for (const child of fs14.readdirSync(dir, { withFileTypes: true }))
|
|
4597
5043
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
4598
|
-
pending.push(
|
|
5044
|
+
pending.push(path25.join(dir, child.name));
|
|
4599
5045
|
}
|
|
4600
5046
|
return packages;
|
|
4601
5047
|
}
|
|
4602
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
4603
|
-
return candidate &&
|
|
5048
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path25.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
5049
|
+
return candidate && fs14.existsSync(path25.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
4604
5050
|
})
|
|
4605
5051
|
)
|
|
4606
5052
|
];
|
|
@@ -4620,14 +5066,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4620
5066
|
const qualifiedProductKeys = /* @__PURE__ */ new Set();
|
|
4621
5067
|
const linkedProductKeys = /* @__PURE__ */ new Set();
|
|
4622
5068
|
const binaryFrameworks = /* @__PURE__ */ new Map();
|
|
4623
|
-
for (const { ref, settings: settings2 } of
|
|
4624
|
-
const absolute = (raw) =>
|
|
5069
|
+
for (const { ref, settings: settings2 } of selectedTargets) {
|
|
5070
|
+
const absolute = (raw) => path25.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
4625
5071
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
4626
5072
|
const dir = absolute(raw);
|
|
4627
|
-
const modulemap =
|
|
4628
|
-
if (!
|
|
4629
|
-
const
|
|
4630
|
-
if (
|
|
5073
|
+
const modulemap = path25.join(dir, "module.modulemap");
|
|
5074
|
+
if (!fs14.existsSync(modulemap)) continue;
|
|
5075
|
+
const name2 = moduleMapName(fs14.readFileSync(modulemap, "utf8"));
|
|
5076
|
+
if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, dir);
|
|
4631
5077
|
}
|
|
4632
5078
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
4633
5079
|
const phase = ref.project.object(phaseId);
|
|
@@ -4635,31 +5081,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4635
5081
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
4636
5082
|
for (const raw of list(phase.inputFileListPaths)) {
|
|
4637
5083
|
const file = absolute(raw);
|
|
4638
|
-
if (!
|
|
5084
|
+
if (!fs14.existsSync(file)) continue;
|
|
4639
5085
|
xcconfigs.add(file);
|
|
4640
5086
|
inputs.push(...fileListEntries(file, absolute));
|
|
4641
5087
|
}
|
|
4642
5088
|
for (const file of inputs) {
|
|
4643
|
-
const
|
|
4644
|
-
if (
|
|
5089
|
+
const name2 = /([^/]+)\.xcframework$/.exec(file)?.[1];
|
|
5090
|
+
if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, file);
|
|
4645
5091
|
}
|
|
4646
5092
|
}
|
|
4647
5093
|
}
|
|
4648
5094
|
const productsByTarget = /* @__PURE__ */ new Map();
|
|
4649
5095
|
for (const ref of order) {
|
|
4650
5096
|
const { project, target } = ref;
|
|
5097
|
+
const productPlatforms = /* @__PURE__ */ new Map();
|
|
4651
5098
|
const productRef = (id) => {
|
|
4652
|
-
const
|
|
4653
|
-
|
|
5099
|
+
const entry = project.object(id);
|
|
5100
|
+
const ref2 = str(entry?.productRef);
|
|
5101
|
+
if (!entry || !ref2) return [];
|
|
5102
|
+
const builds = xcodeBuildFileBuildsForIos(entry);
|
|
5103
|
+
productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
|
|
5104
|
+
return builds ? [ref2] : [];
|
|
4654
5105
|
};
|
|
4655
|
-
const
|
|
4656
|
-
...list(target.packageProductDependencies),
|
|
5106
|
+
const referencedProducts = [
|
|
4657
5107
|
...list(target.dependencies).flatMap(productRef),
|
|
4658
5108
|
...list(target.buildPhases).flatMap((id) => {
|
|
4659
5109
|
const phase = project.object(id);
|
|
4660
5110
|
return phase?.isa === "PBXFrameworksBuildPhase" ? list(phase.files).flatMap(productRef) : [];
|
|
4661
5111
|
})
|
|
4662
5112
|
];
|
|
5113
|
+
const productDependencies = [
|
|
5114
|
+
...list(target.packageProductDependencies).filter(
|
|
5115
|
+
(id) => productPlatforms.get(id) !== false
|
|
5116
|
+
),
|
|
5117
|
+
...referencedProducts
|
|
5118
|
+
];
|
|
4663
5119
|
const ownProducts = [];
|
|
4664
5120
|
const ownKeys = /* @__PURE__ */ new Set();
|
|
4665
5121
|
for (const dependencyId of new Set(productDependencies)) {
|
|
@@ -4674,7 +5130,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4674
5130
|
product,
|
|
4675
5131
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
4676
5132
|
kind: "local",
|
|
4677
|
-
dir:
|
|
5133
|
+
dir: path25.resolve(
|
|
4678
5134
|
project.projectDir,
|
|
4679
5135
|
str(reference.relativePath) ?? ""
|
|
4680
5136
|
)
|
|
@@ -4694,24 +5150,26 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4694
5150
|
const phase = project.object(phaseId);
|
|
4695
5151
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
4696
5152
|
for (const buildFileId of list(phase.files)) {
|
|
4697
|
-
const
|
|
5153
|
+
const buildFile = project.object(buildFileId);
|
|
5154
|
+
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
5155
|
+
const fileId = str(buildFile.fileRef);
|
|
4698
5156
|
const file = project.object(fileId);
|
|
4699
|
-
const
|
|
5157
|
+
const tree2 = str(file?.sourceTree);
|
|
4700
5158
|
const rawPath = str(file?.path) ?? "";
|
|
4701
|
-
const
|
|
4702
|
-
if (file?.isa !== "PBXFileReference" || !
|
|
4703
|
-
if (
|
|
5159
|
+
const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
5160
|
+
if (file?.isa !== "PBXFileReference" || !name2) continue;
|
|
5161
|
+
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "SDKROOT" || tree2 === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
|
|
4704
5162
|
// however it is rooted: xcode links -framework <name> from the sdk
|
|
4705
5163
|
// and a stale group-relative path to it contributes nothing.
|
|
4706
5164
|
/\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
|
|
4707
|
-
byProduct.has(
|
|
5165
|
+
byProduct.has(path25.basename(rawPath)))
|
|
4708
5166
|
continue;
|
|
4709
5167
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
4710
|
-
if (fileId && resolved !== null && !
|
|
5168
|
+
if (fileId && resolved !== null && !fs14.existsSync(resolved))
|
|
4711
5169
|
throw new Error(
|
|
4712
|
-
`${str(target.name) ?? "target"}: linked framework ${
|
|
5170
|
+
`${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
4713
5171
|
);
|
|
4714
|
-
if (!binaryFrameworks.get(
|
|
5172
|
+
if (!binaryFrameworks.get(name2)) binaryFrameworks.set(name2, resolved);
|
|
4715
5173
|
}
|
|
4716
5174
|
}
|
|
4717
5175
|
}
|
|
@@ -4725,33 +5183,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4725
5183
|
}
|
|
4726
5184
|
for (const built of builtTargets)
|
|
4727
5185
|
built.module.packageProducts = productsByTarget.get(built.ref) ?? [];
|
|
4728
|
-
const resolvedFile =
|
|
4729
|
-
|
|
4730
|
-
"xcshareddata",
|
|
4731
|
-
"swiftpm",
|
|
4732
|
-
"Package.resolved"
|
|
4733
|
-
);
|
|
4734
|
-
let packageResolved = fs4.existsSync(resolvedFile) ? [fs4.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path5.join(dir, "Package.resolved")))].filter((file) => fs4.existsSync(file)).map((file) => fs4.realpathSync(file)).sort();
|
|
5186
|
+
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
5187
|
+
let packageResolved = fs14.existsSync(resolvedFile) ? [fs14.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path25.join(dir, "Package.resolved")))].filter((file) => fs14.existsSync(file)).map((file) => fs14.realpathSync(file)).sort();
|
|
4735
5188
|
if (packageResolved.length === 0) {
|
|
4736
5189
|
const requirements = remotePackageRequirements(projects);
|
|
4737
5190
|
if (requirements.length > 0) {
|
|
4738
|
-
|
|
4739
|
-
|
|
5191
|
+
if (options.deferPackageResolution)
|
|
5192
|
+
throw new SwiftPackageResolutionRequired(requirements, resolvedFile);
|
|
4740
5193
|
}
|
|
4741
5194
|
}
|
|
4742
5195
|
const used = order.map((ref) => ref.project);
|
|
4743
5196
|
return {
|
|
4744
5197
|
...module,
|
|
5198
|
+
moduleMapSources: Object.fromEntries(
|
|
5199
|
+
builtTargets.flatMap(({ module: module2 }) => {
|
|
5200
|
+
const compatibility = module2.swift?.compatibility;
|
|
5201
|
+
return compatibility ? [[compatibility.outputModuleMap, compatibility.moduleMap]] : [];
|
|
5202
|
+
})
|
|
5203
|
+
),
|
|
5204
|
+
...options.nativeModules ? {
|
|
5205
|
+
sources: [],
|
|
5206
|
+
allSources: [],
|
|
5207
|
+
resources: [],
|
|
5208
|
+
objc: void 0,
|
|
5209
|
+
swift: void 0
|
|
5210
|
+
} : {},
|
|
4745
5211
|
rootDir: commonAncestor(
|
|
4746
5212
|
[
|
|
4747
|
-
workspace ?
|
|
5213
|
+
workspace ? path25.dirname(workspace) : app.project.projectDir,
|
|
4748
5214
|
...used.map((project) => project.projectDir),
|
|
4749
5215
|
...localPackageDirs,
|
|
4750
5216
|
...linkedProducts.flatMap(
|
|
4751
|
-
({ source }) => source.kind === "local" &&
|
|
5217
|
+
({ source }) => source.kind === "local" && fs14.existsSync(source.dir) ? [source.dir] : []
|
|
4752
5218
|
),
|
|
4753
5219
|
...new Set(podSourceDirs)
|
|
4754
|
-
].map((dir) =>
|
|
5220
|
+
].map((dir) => fs14.realpathSync(dir))
|
|
4755
5221
|
),
|
|
4756
5222
|
projectFiles: [
|
|
4757
5223
|
.../* @__PURE__ */ new Set([
|
|
@@ -4769,9 +5235,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4769
5235
|
resourceProducts,
|
|
4770
5236
|
linkedProducts,
|
|
4771
5237
|
localPackageDirs: [
|
|
4772
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
5238
|
+
...new Set(localPackageDirs.map((dir) => fs14.realpathSync(dir)))
|
|
4773
5239
|
].sort(),
|
|
4774
|
-
binaryFrameworks: [...binaryFrameworks].map(([
|
|
5240
|
+
binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
4775
5241
|
packageResolved,
|
|
4776
5242
|
appTargets: appTargetNames,
|
|
4777
5243
|
configuration,
|
|
@@ -4784,6 +5250,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4784
5250
|
function nonEmptyString2(value) {
|
|
4785
5251
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
4786
5252
|
}
|
|
5253
|
+
function stampNativeBuildSdk(identity) {
|
|
5254
|
+
const dtPlatformVersion = identity.dtPlatformVersion ?? NATIVE_GRAPH_SDK_VERSION;
|
|
5255
|
+
return {
|
|
5256
|
+
...identity,
|
|
5257
|
+
dtPlatformVersion,
|
|
5258
|
+
infoPlistStrings: {
|
|
5259
|
+
...identity.infoPlistStrings,
|
|
5260
|
+
DTPlatformVersion: dtPlatformVersion
|
|
5261
|
+
}
|
|
5262
|
+
};
|
|
5263
|
+
}
|
|
4787
5264
|
function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSource) {
|
|
4788
5265
|
if (app.infoPlist === null)
|
|
4789
5266
|
throw new Error(
|
|
@@ -4809,8 +5286,8 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4809
5286
|
const icons = dictionary.CFBundleIcons;
|
|
4810
5287
|
const alternates = isRecord(icons) ? icons.CFBundleAlternateIcons : void 0;
|
|
4811
5288
|
if (isRecord(alternates)) {
|
|
4812
|
-
for (const
|
|
4813
|
-
if (
|
|
5289
|
+
for (const name2 of Object.keys(alternates)) {
|
|
5290
|
+
if (name2) alternateIconNames.add(name2);
|
|
4814
5291
|
}
|
|
4815
5292
|
}
|
|
4816
5293
|
const alternateSetting = settings?.("ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES") ?? "";
|
|
@@ -4848,9 +5325,9 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4848
5325
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
|
|
4849
5326
|
const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
|
|
4850
5327
|
const rootModuleName = readRootModuleName(
|
|
4851
|
-
app.allSources.filter((file) =>
|
|
5328
|
+
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && fs15.existsSync(file)).map((file) => fs15.readFileSync(file, "utf8"))
|
|
4852
5329
|
);
|
|
4853
|
-
return {
|
|
5330
|
+
return stampNativeBuildSdk({
|
|
4854
5331
|
applicationName,
|
|
4855
5332
|
...applicationDisplayName ? { applicationDisplayName } : {},
|
|
4856
5333
|
...rootModuleName ? { rootModuleName } : {},
|
|
@@ -4869,7 +5346,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4869
5346
|
googleSignIn: readGoogleSignInConfiguration(
|
|
4870
5347
|
dictionary,
|
|
4871
5348
|
Object.fromEntries(
|
|
4872
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(
|
|
5349
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(fs15.readFileSync(file, "utf8"))])
|
|
4873
5350
|
)
|
|
4874
5351
|
),
|
|
4875
5352
|
supportedInterfaceOrientations,
|
|
@@ -4878,11 +5355,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4878
5355
|
alternateIconNames: [...alternateIconNames],
|
|
4879
5356
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
4880
5357
|
app.resources,
|
|
4881
|
-
(file) =>
|
|
5358
|
+
(file) => fs15.readFileSync(file, "utf8"),
|
|
4882
5359
|
(file) => {
|
|
4883
|
-
const extension =
|
|
5360
|
+
const extension = path26.extname(file).toLowerCase();
|
|
4884
5361
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
4885
|
-
return `data:${contentType};base64,${
|
|
5362
|
+
return `data:${contentType};base64,${fs15.readFileSync(file).toString("base64")}`;
|
|
4886
5363
|
},
|
|
4887
5364
|
icons,
|
|
4888
5365
|
app.appIconName,
|
|
@@ -4898,10 +5375,8 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4898
5375
|
backgroundTaskIdentifiers,
|
|
4899
5376
|
backgroundModes,
|
|
4900
5377
|
appIntentIdentifiers
|
|
4901
|
-
};
|
|
5378
|
+
});
|
|
4902
5379
|
}
|
|
4903
|
-
var NativeAppTargetSelectionError = class extends Error {
|
|
4904
|
-
};
|
|
4905
5380
|
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
|
|
4906
5381
|
const read = selectNativeAppIdentityReader(platform, {
|
|
4907
5382
|
android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
|
|
@@ -4913,25 +5388,32 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
4913
5388
|
const read = selectNativeAppIdentityReader(platform, {
|
|
4914
5389
|
android: () => null,
|
|
4915
5390
|
ios: () => {
|
|
4916
|
-
const
|
|
4917
|
-
|
|
5391
|
+
const nested = path26.join(projectRoot, "ios");
|
|
5392
|
+
const iosRoot = fs15.existsSync(nested) ? nested : projectRoot;
|
|
5393
|
+
const prefix = iosRoot === nested ? "ios/" : "";
|
|
4918
5394
|
const files = {};
|
|
4919
|
-
for (const entry of
|
|
5395
|
+
for (const entry of fs15.readdirSync(iosRoot, { withFileTypes: true })) {
|
|
4920
5396
|
if (entry.name === "Pods") continue;
|
|
4921
5397
|
if (entry.isDirectory()) {
|
|
4922
5398
|
const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
|
|
4923
|
-
for (const
|
|
4924
|
-
const relative2 =
|
|
4925
|
-
const file =
|
|
4926
|
-
if (
|
|
5399
|
+
for (const name2 of names) {
|
|
5400
|
+
const relative2 = `${prefix}${entry.name}/${name2}`;
|
|
5401
|
+
const file = path26.join(projectRoot, relative2);
|
|
5402
|
+
if (fs15.existsSync(file)) files[relative2] = fs15.readFileSync(file, "utf8");
|
|
4927
5403
|
}
|
|
4928
5404
|
} else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
|
|
4929
|
-
const relative2 =
|
|
4930
|
-
const file =
|
|
4931
|
-
if (
|
|
5405
|
+
const relative2 = `${prefix}${entry.name}`;
|
|
5406
|
+
const file = path26.join(projectRoot, relative2);
|
|
5407
|
+
if (fs15.existsSync(file)) files[relative2] = fs15.readFileSync(file, "utf8");
|
|
4932
5408
|
}
|
|
4933
5409
|
}
|
|
4934
|
-
|
|
5410
|
+
const identity = extractNativeAppIdentityFromFiles(
|
|
5411
|
+
files,
|
|
5412
|
+
"ios",
|
|
5413
|
+
parseInfoPlist,
|
|
5414
|
+
iosTarget
|
|
5415
|
+
);
|
|
5416
|
+
return identity ? stampNativeBuildSdk(identity) : null;
|
|
4935
5417
|
}
|
|
4936
5418
|
});
|
|
4937
5419
|
return read ? read() : null;
|
|
@@ -4939,41 +5421,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
4939
5421
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
4940
5422
|
const files = {};
|
|
4941
5423
|
if (androidMergedManifest) {
|
|
4942
|
-
const file =
|
|
4943
|
-
if (!
|
|
4944
|
-
files[androidMergedManifest] =
|
|
5424
|
+
const file = path26.resolve(projectRoot, androidMergedManifest);
|
|
5425
|
+
if (!fs15.existsSync(file)) return null;
|
|
5426
|
+
files[androidMergedManifest] = fs15.readFileSync(file, "utf8");
|
|
4945
5427
|
} else {
|
|
4946
|
-
const androidRoot =
|
|
4947
|
-
if (!
|
|
5428
|
+
const androidRoot = path26.join(projectRoot, "android");
|
|
5429
|
+
if (!fs15.existsSync(androidRoot)) return null;
|
|
4948
5430
|
const collect = (directory) => {
|
|
4949
|
-
for (const entry of
|
|
4950
|
-
const file =
|
|
5431
|
+
for (const entry of fs15.readdirSync(directory, { withFileTypes: true })) {
|
|
5432
|
+
const file = path26.join(directory, entry.name);
|
|
4951
5433
|
if (entry.isDirectory()) collect(file);
|
|
4952
5434
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
4953
|
-
files[
|
|
5435
|
+
files[path26.relative(projectRoot, file).split(path26.sep).join("/")] = fs15.readFileSync(file, "utf8");
|
|
4954
5436
|
}
|
|
4955
5437
|
};
|
|
4956
|
-
for (const module of
|
|
5438
|
+
for (const module of fs15.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
4957
5439
|
if (!module.isDirectory()) continue;
|
|
4958
|
-
const outputs =
|
|
5440
|
+
const outputs = path26.join(
|
|
4959
5441
|
androidRoot,
|
|
4960
5442
|
module.name,
|
|
4961
5443
|
"build/intermediates/merged_manifests"
|
|
4962
5444
|
);
|
|
4963
|
-
if (
|
|
5445
|
+
if (fs15.existsSync(outputs)) collect(outputs);
|
|
4964
5446
|
}
|
|
4965
5447
|
}
|
|
4966
5448
|
for (const manifest of Object.keys(files)) {
|
|
4967
5449
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
4968
5450
|
if (!resourceDirectory) continue;
|
|
4969
|
-
const absolute =
|
|
4970
|
-
if (!
|
|
4971
|
-
for (const entry of
|
|
5451
|
+
const absolute = path26.resolve(projectRoot, resourceDirectory);
|
|
5452
|
+
if (!fs15.existsSync(absolute)) continue;
|
|
5453
|
+
for (const entry of fs15.readdirSync(absolute, { withFileTypes: true })) {
|
|
4972
5454
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
4973
|
-
for (const resource of
|
|
5455
|
+
for (const resource of fs15.readdirSync(path26.join(absolute, entry.name))) {
|
|
4974
5456
|
if (!resource.endsWith(".xml")) continue;
|
|
4975
5457
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
4976
|
-
files[file] =
|
|
5458
|
+
files[file] = fs15.readFileSync(path26.resolve(projectRoot, file), "utf8");
|
|
4977
5459
|
}
|
|
4978
5460
|
}
|
|
4979
5461
|
}
|
|
@@ -4990,7 +5472,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
4990
5472
|
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
4991
5473
|
if (!app) return null;
|
|
4992
5474
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
4993
|
-
const projectManifestPath =
|
|
5475
|
+
const projectManifestPath = path26.join(projectRoot, "package.json");
|
|
4994
5476
|
const projectRequire = createRequire(projectManifestPath);
|
|
4995
5477
|
let reanimatedManifestPath;
|
|
4996
5478
|
try {
|
|
@@ -5004,30 +5486,30 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5004
5486
|
throw error;
|
|
5005
5487
|
}
|
|
5006
5488
|
const installedManifest = JSON.parse(
|
|
5007
|
-
|
|
5489
|
+
fs15.readFileSync(reanimatedManifestPath, "utf8")
|
|
5008
5490
|
);
|
|
5009
5491
|
const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
5010
5492
|
if (!installedVersion) throw new Error("Reanimated package version is malformed");
|
|
5011
5493
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
5012
5494
|
const defaults = JSON.parse(
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5495
|
+
fs15.readFileSync(
|
|
5496
|
+
path26.join(
|
|
5497
|
+
path26.dirname(reanimatedManifestPath),
|
|
5016
5498
|
"src/featureFlags/staticFlags.json"
|
|
5017
5499
|
),
|
|
5018
5500
|
"utf8"
|
|
5019
5501
|
)
|
|
5020
5502
|
);
|
|
5021
5503
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
5022
|
-
const manifest = JSON.parse(
|
|
5504
|
+
const manifest = JSON.parse(fs15.readFileSync(projectManifestPath, "utf8"));
|
|
5023
5505
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
5024
5506
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
5025
5507
|
if (overrides !== void 0 && !isRecord(overrides)) {
|
|
5026
5508
|
throw new Error("Reanimated static flag overrides are malformed");
|
|
5027
5509
|
}
|
|
5028
5510
|
const flags = {};
|
|
5029
|
-
for (const [
|
|
5030
|
-
flags[
|
|
5511
|
+
for (const [name2, value] of Object.entries({ ...defaults, ...overrides })) {
|
|
5512
|
+
flags[name2] = String(value) === "true";
|
|
5031
5513
|
}
|
|
5032
5514
|
if (flags.USE_LEGACY_LAYOUT_ANIMATIONS_PROXY && flags.ENABLE_SHARED_ELEMENT_TRANSITIONS) {
|
|
5033
5515
|
throw new Error(
|
|
@@ -5042,40 +5524,9 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5042
5524
|
return { ...identity, reanimatedStaticFeatureFlags: flags };
|
|
5043
5525
|
}
|
|
5044
5526
|
function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
5045
|
-
const
|
|
5046
|
-
if (!
|
|
5047
|
-
|
|
5048
|
-
if (projects.length === 0) return null;
|
|
5049
|
-
if (projects.length > 1 && !iosTarget) {
|
|
5050
|
-
throw new NativeAppTargetSelectionError(
|
|
5051
|
-
`native app identity requires a selected Xcode project; set withPeach's iosTarget to an app target in one of: ${projects.map((entry) => entry.name).join(", ")}`
|
|
5052
|
-
);
|
|
5053
|
-
}
|
|
5054
|
-
let project = projects[0];
|
|
5055
|
-
if (iosTarget && projects.length > 1) {
|
|
5056
|
-
const matches = projects.filter(
|
|
5057
|
-
(entry) => listXcodeAppTargets(path6.join(iosRoot, entry.name), {
|
|
5058
|
-
requireSources: false
|
|
5059
|
-
}).includes(iosTarget)
|
|
5060
|
-
);
|
|
5061
|
-
if (matches.length === 0) {
|
|
5062
|
-
throw new Error(`native app identity has no application target ${iosTarget}`);
|
|
5063
|
-
}
|
|
5064
|
-
if (matches.length > 1) {
|
|
5065
|
-
throw new Error(
|
|
5066
|
-
`native app identity target ${iosTarget} is ambiguous across ${matches.map((entry) => entry.name).join(", ")}`
|
|
5067
|
-
);
|
|
5068
|
-
}
|
|
5069
|
-
project = matches[0];
|
|
5070
|
-
}
|
|
5071
|
-
const xcodeproj = path6.join(iosRoot, project.name);
|
|
5072
|
-
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
5073
|
-
if (!iosTarget && appTargets.length > 1) {
|
|
5074
|
-
throw new NativeAppTargetSelectionError(
|
|
5075
|
-
`native app identity requires a selected app target; set withPeach's iosTarget to one of: ${appTargets.join(", ")}`
|
|
5076
|
-
);
|
|
5077
|
-
}
|
|
5078
|
-
return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
|
|
5527
|
+
const selected = selectIosAppTarget(projectRoot, iosTarget);
|
|
5528
|
+
if (!selected) return null;
|
|
5529
|
+
return readXcodeAppTarget(selected.xcodeproj, selected.target, "Release", {
|
|
5079
5530
|
requireSources: false,
|
|
5080
5531
|
prepareGeneratedSources: true,
|
|
5081
5532
|
environment
|