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
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -14,8 +14,8 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
14
14
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
15
|
};
|
|
16
16
|
var __export = (target, all) => {
|
|
17
|
-
for (var
|
|
18
|
-
__defProp(target,
|
|
17
|
+
for (var name2 in all)
|
|
18
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
19
19
|
};
|
|
20
20
|
var __copyProps = (to, from, except, desc) => {
|
|
21
21
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "
|
|
42
|
+
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" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -111,8 +111,8 @@ var require_parse = __commonJS({
|
|
|
111
111
|
}
|
|
112
112
|
return root;
|
|
113
113
|
};
|
|
114
|
-
function internalize(holder,
|
|
115
|
-
const value = holder[
|
|
114
|
+
function internalize(holder, name2, reviver) {
|
|
115
|
+
const value = holder[name2];
|
|
116
116
|
if (value != null && typeof value === "object") {
|
|
117
117
|
if (Array.isArray(value)) {
|
|
118
118
|
for (let i = 0; i < value.length; i++) {
|
|
@@ -145,7 +145,7 @@ var require_parse = __commonJS({
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
return reviver.call(holder,
|
|
148
|
+
return reviver.call(holder, name2, value);
|
|
149
149
|
}
|
|
150
150
|
var lexState;
|
|
151
151
|
var buffer;
|
|
@@ -1171,9 +1171,9 @@ __export(native_app_identity_project_exports, {
|
|
|
1171
1171
|
});
|
|
1172
1172
|
module.exports = __toCommonJS(native_app_identity_project_exports);
|
|
1173
1173
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1174
|
-
var
|
|
1174
|
+
var import_node_fs6 = __toESM(require("node:fs"), 1);
|
|
1175
1175
|
var import_node_module = require("node:module");
|
|
1176
|
-
var
|
|
1176
|
+
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
1177
1177
|
|
|
1178
1178
|
// src/android-app-identity.ts
|
|
1179
1179
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -1182,7 +1182,7 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
1182
1182
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1183
1183
|
function compileAndroidStringValue(text2, where) {
|
|
1184
1184
|
if (/^\s*[@?]/.test(text2))
|
|
1185
|
-
throw new Error(`${where} is a resource reference, not resolved by
|
|
1185
|
+
throw new Error(`${where} is a resource reference, not resolved by Peach yet`);
|
|
1186
1186
|
const out = [];
|
|
1187
1187
|
let quoted = false;
|
|
1188
1188
|
for (let index = 0; index < text2.length; index++) {
|
|
@@ -1250,18 +1250,18 @@ function parseXml(text2, file) {
|
|
|
1250
1250
|
if (!match)
|
|
1251
1251
|
throw new Error(`${file}: unreadable markup at ${body.slice(open, open + 40)}`);
|
|
1252
1252
|
index = TAG.lastIndex;
|
|
1253
|
-
const [, closing,
|
|
1254
|
-
if (!
|
|
1253
|
+
const [, closing, name2, rawAttributes, selfClosing] = match;
|
|
1254
|
+
if (!name2) continue;
|
|
1255
1255
|
if (closing) {
|
|
1256
1256
|
const element2 = stack.pop();
|
|
1257
|
-
if (element2?.name !==
|
|
1258
|
-
throw new Error(`${file}: </${
|
|
1257
|
+
if (element2?.name !== name2)
|
|
1258
|
+
throw new Error(`${file}: </${name2}> closes <${element2?.name}>`);
|
|
1259
1259
|
continue;
|
|
1260
1260
|
}
|
|
1261
1261
|
const attributes = {};
|
|
1262
1262
|
for (const [, key, double, single] of (rawAttributes ?? "").matchAll(ATTRIBUTE))
|
|
1263
1263
|
if (key) attributes[key] = decodeXmlText(double ?? single ?? "", file);
|
|
1264
|
-
const element = { name, attributes, children: [], text: "" };
|
|
1264
|
+
const element = { name: name2, attributes, children: [], text: "" };
|
|
1265
1265
|
stack.at(-1)?.children.push(element);
|
|
1266
1266
|
if (!selfClosing) stack.push(element);
|
|
1267
1267
|
}
|
|
@@ -1277,7 +1277,7 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1277
1277
|
const manifest = document.children[0];
|
|
1278
1278
|
if (manifest.name !== "manifest") return null;
|
|
1279
1279
|
const androidPrefix = Object.entries(manifest.attributes).find(
|
|
1280
|
-
([
|
|
1280
|
+
([name2, value]) => name2.startsWith("xmlns:") && value === "http://schemas.android.com/apk/res/android"
|
|
1281
1281
|
)?.[0].slice("xmlns:".length);
|
|
1282
1282
|
if (!androidPrefix) return null;
|
|
1283
1283
|
const attribute = `${androidPrefix}:`;
|
|
@@ -1288,8 +1288,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1288
1288
|
if (!application || !bundleIdentifier || !appVersion || !buildVersion || !/^[1-9][0-9]*$/.test(buildVersion) || [bundleIdentifier, appVersion].some((value) => /\$\{|^[@?]/.test(value)))
|
|
1289
1289
|
return null;
|
|
1290
1290
|
const toolsPrefixes = Object.entries(manifest.attributes).filter(
|
|
1291
|
-
([
|
|
1292
|
-
).map(([
|
|
1291
|
+
([name2, value]) => name2.startsWith("xmlns:") && value === "http://schemas.android.com/tools"
|
|
1292
|
+
).map(([name2]) => `${name2.slice("xmlns:".length)}:`);
|
|
1293
1293
|
const androidManifestPermissions = [];
|
|
1294
1294
|
for (const element of manifest.children) {
|
|
1295
1295
|
if (!["uses-permission", "uses-permission-sdk-23", "uses-permission-sdk-m"].includes(
|
|
@@ -1300,12 +1300,12 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1300
1300
|
(key) => toolsPrefixes.some((prefix) => key.startsWith(prefix))
|
|
1301
1301
|
))
|
|
1302
1302
|
return null;
|
|
1303
|
-
const
|
|
1303
|
+
const name2 = element.attributes[`${attribute}name`];
|
|
1304
1304
|
const max = element.attributes[`${attribute}maxSdkVersion`];
|
|
1305
|
-
if (!
|
|
1305
|
+
if (!name2 || /\$\{|^[@?]/.test(name2) || element.attributes[`${attribute}requiredFeature`] !== void 0 || element.attributes[`${attribute}requiredNotFeature`] !== void 0 || max !== void 0 && !/^\d+$/.test(max))
|
|
1306
1306
|
return null;
|
|
1307
1307
|
androidManifestPermissions.push({
|
|
1308
|
-
name,
|
|
1308
|
+
name: name2,
|
|
1309
1309
|
minSdkVersion: element.name === "uses-permission" ? 1 : 23,
|
|
1310
1310
|
...max === void 0 ? {} : { maxSdkVersion: Number(max) }
|
|
1311
1311
|
});
|
|
@@ -1329,15 +1329,15 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1329
1329
|
const root = document2.children[0];
|
|
1330
1330
|
if (document2.children.length === 1 && root?.name === "resources") {
|
|
1331
1331
|
const qualified = Object.entries(files).filter(
|
|
1332
|
-
([
|
|
1333
|
-
).flatMap(([
|
|
1332
|
+
([name2]) => name2.startsWith(`${resourceDirectory}/values-`) && name2.endsWith(".xml")
|
|
1333
|
+
).flatMap(([name2, source2]) => parseXml(source2, name2).children).flatMap((root2) => root2.children);
|
|
1334
1334
|
const visited = /* @__PURE__ */ new Set();
|
|
1335
1335
|
while (label?.startsWith("@string/") && !visited.has(label)) {
|
|
1336
1336
|
visited.add(label);
|
|
1337
|
-
const
|
|
1338
|
-
if (qualified.some((element) => element.attributes.name ===
|
|
1337
|
+
const name2 = label.slice("@string/".length);
|
|
1338
|
+
if (qualified.some((element) => element.attributes.name === name2)) break;
|
|
1339
1339
|
const matches = root.children.filter(
|
|
1340
|
-
(element) => (element.name === "string" || element.name === "item" && element.attributes.type === "string") && element.attributes.name ===
|
|
1340
|
+
(element) => (element.name === "string" || element.name === "item" && element.attributes.type === "string") && element.attributes.name === name2
|
|
1341
1341
|
);
|
|
1342
1342
|
const value = matches.length === 1 ? matches[0] : void 0;
|
|
1343
1343
|
if (!value || value.children.length) break;
|
|
@@ -1395,13 +1395,13 @@ function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, pr
|
|
|
1395
1395
|
const alternates = Object.fromEntries(
|
|
1396
1396
|
Object.entries(
|
|
1397
1397
|
isRecord(dictionary.CFBundleAlternateIcons) ? dictionary.CFBundleAlternateIcons : {}
|
|
1398
|
-
).map(([
|
|
1398
|
+
).map(([name2, declaration]) => [resolveReference(name2), declaration])
|
|
1399
1399
|
);
|
|
1400
1400
|
const resolve = (declaration, defaultName) => {
|
|
1401
1401
|
const entry = isRecord(declaration) ? declaration : {};
|
|
1402
|
-
const
|
|
1402
|
+
const name2 = typeof entry.CFBundleIconName === "string" ? resolveReference(entry.CFBundleIconName) : resolveReference(defaultName);
|
|
1403
1403
|
const catalogs = resources.filter(
|
|
1404
|
-
(file) => file.endsWith(`/${
|
|
1404
|
+
(file) => file.endsWith(`/${name2}.appiconset/Contents.json`)
|
|
1405
1405
|
);
|
|
1406
1406
|
const populatedCatalogs = [];
|
|
1407
1407
|
for (const catalog of catalogs) {
|
|
@@ -1422,7 +1422,7 @@ function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, pr
|
|
|
1422
1422
|
if (catalogCandidates.length > 0) populatedCatalogs.push(catalogCandidates);
|
|
1423
1423
|
}
|
|
1424
1424
|
if (populatedCatalogs.length > 1)
|
|
1425
|
-
throw new Error(`native app icon catalog ${
|
|
1425
|
+
throw new Error(`native app icon catalog ${name2} is ambiguous`);
|
|
1426
1426
|
const candidates = [];
|
|
1427
1427
|
if (populatedCatalogs.length === 1) {
|
|
1428
1428
|
candidates.push(...populatedCatalogs[0]);
|
|
@@ -1452,9 +1452,9 @@ function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, pr
|
|
|
1452
1452
|
return {
|
|
1453
1453
|
...primary.length ? { primary } : {},
|
|
1454
1454
|
alternates: Object.fromEntries(
|
|
1455
|
-
alternateNames.flatMap((
|
|
1456
|
-
const images = resolve(alternates[
|
|
1457
|
-
return images.length ? [[
|
|
1455
|
+
alternateNames.flatMap((name2) => {
|
|
1456
|
+
const images = resolve(alternates[name2], name2);
|
|
1457
|
+
return images.length ? [[name2, images]] : [];
|
|
1458
1458
|
})
|
|
1459
1459
|
)
|
|
1460
1460
|
};
|
|
@@ -1576,10 +1576,10 @@ function xcodePathResolver(objects, projectDir, join2) {
|
|
|
1576
1576
|
let result = null;
|
|
1577
1577
|
if (isDict(entry)) {
|
|
1578
1578
|
const own = str(entry.path) ?? "";
|
|
1579
|
-
const
|
|
1580
|
-
if (
|
|
1581
|
-
else if (
|
|
1582
|
-
else if (
|
|
1579
|
+
const tree2 = str(entry.sourceTree) ?? "<group>";
|
|
1580
|
+
if (tree2 === "<absolute>") result = own;
|
|
1581
|
+
else if (tree2 === "SOURCE_ROOT") result = join2(projectDir, own);
|
|
1582
|
+
else if (tree2 === "<group>") {
|
|
1583
1583
|
const parent = parents.get(id);
|
|
1584
1584
|
const base = parent ? resolve(parent) : projectDir;
|
|
1585
1585
|
if (base !== null) result = join2(base, own);
|
|
@@ -1597,62 +1597,69 @@ function xcodeBuildFileBuildsForIos(buildFile) {
|
|
|
1597
1597
|
].filter((filter) => !!filter);
|
|
1598
1598
|
return !filters.length || filters.includes("ios");
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
if (phase.isa !== "PBXSourcesBuildPhase" && phase.isa !== "PBXResourcesBuildPhase")
|
|
1607
|
-
continue;
|
|
1608
|
-
for (const buildFileId of list(phase.files)) {
|
|
1609
|
-
const buildFile = objects[buildFileId];
|
|
1610
|
-
if (!isDict(buildFile) || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
1611
|
-
const refId = str(buildFile.fileRef);
|
|
1612
|
-
if (!refId) continue;
|
|
1613
|
-
const entry = objects[refId];
|
|
1614
|
-
const refs = isDict(entry) && entry.isa === "PBXVariantGroup" ? list(entry.children) : [refId];
|
|
1615
|
-
for (const id of refs) {
|
|
1616
|
-
const file = resolvePath(id);
|
|
1617
|
-
if (file === null) continue;
|
|
1618
|
-
if (phase.isa === "PBXSourcesBuildPhase") visit(file, "source");
|
|
1619
|
-
else for (const inner of filesUnder(file)) visit(inner, "resource");
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1600
|
+
function xcodeTargetMemberVisitor(objects) {
|
|
1601
|
+
const synchronizedGroups = [];
|
|
1602
|
+
for (const id of Object.keys(objects)) {
|
|
1603
|
+
const group = objects[id];
|
|
1604
|
+
if (isDict(group) && group.isa === "PBXFileSystemSynchronizedRootGroup")
|
|
1605
|
+
synchronizedGroups.push({ id, group });
|
|
1622
1606
|
}
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
if (!isDict(
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1607
|
+
return (targetId, resolvePath, filesUnder, join2, visit) => {
|
|
1608
|
+
const target = objects[targetId];
|
|
1609
|
+
if (!isDict(target)) return;
|
|
1610
|
+
for (const phaseId of list(target.buildPhases)) {
|
|
1611
|
+
const phase = objects[phaseId];
|
|
1612
|
+
if (!isDict(phase)) continue;
|
|
1613
|
+
if (phase.isa !== "PBXSourcesBuildPhase" && phase.isa !== "PBXResourcesBuildPhase")
|
|
1614
|
+
continue;
|
|
1615
|
+
for (const buildFileId of list(phase.files)) {
|
|
1616
|
+
const buildFile = objects[buildFileId];
|
|
1617
|
+
if (!isDict(buildFile) || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
1618
|
+
const refId = str(buildFile.fileRef);
|
|
1619
|
+
if (!refId) continue;
|
|
1620
|
+
const entry = objects[refId];
|
|
1621
|
+
const refs = isDict(entry) && entry.isa === "PBXVariantGroup" ? list(entry.children) : [refId];
|
|
1622
|
+
for (const id of refs) {
|
|
1623
|
+
const file = resolvePath(id);
|
|
1624
|
+
if (file === null) continue;
|
|
1625
|
+
if (phase.isa === "PBXSourcesBuildPhase") visit(file, "source");
|
|
1626
|
+
else for (const inner of filesUnder(file)) visit(inner, "resource");
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1635
1629
|
}
|
|
1636
|
-
const
|
|
1637
|
-
for (const
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
);
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
if (!
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1630
|
+
const owned = new Set(list(target.fileSystemSynchronizedGroups));
|
|
1631
|
+
for (const { id: groupId, group } of synchronizedGroups) {
|
|
1632
|
+
const folder = resolvePath(groupId);
|
|
1633
|
+
if (folder === null) continue;
|
|
1634
|
+
const prefix = folder === "" ? "" : `${folder.replace(/\/$/, "")}/`;
|
|
1635
|
+
const exceptions = /* @__PURE__ */ new Set();
|
|
1636
|
+
for (const exceptionId of list(group.exceptions)) {
|
|
1637
|
+
const exception = objects[exceptionId];
|
|
1638
|
+
if (!isDict(exception) || exception.target !== targetId) continue;
|
|
1639
|
+
for (const relative of list(exception.membershipExceptions))
|
|
1640
|
+
exceptions.add(relative);
|
|
1641
|
+
}
|
|
1642
|
+
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative) => filesUnder(join2(folder, relative)));
|
|
1643
|
+
for (const file of members) {
|
|
1644
|
+
const relative = file.slice(prefix.length);
|
|
1645
|
+
const excepted = [...exceptions].some(
|
|
1646
|
+
(exception) => relative === exception || relative.startsWith(`${exception}/`)
|
|
1650
1647
|
);
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1648
|
+
if (owned.has(groupId) === excepted || NEVER_MEMBER.test(relative)) continue;
|
|
1649
|
+
if (file.endsWith(".swift")) {
|
|
1650
|
+
if (!relative.split("/").some((segment) => BUNDLE_DIR.test(segment)))
|
|
1651
|
+
visit(file, "source");
|
|
1652
|
+
} else if (/\.(h|hh|hpp|hxx|pch)$/.test(file)) {
|
|
1653
|
+
visit(
|
|
1654
|
+
file,
|
|
1655
|
+
relative.split("/").some((segment) => BUNDLE_DIR.test(segment)) ? "resource" : "header"
|
|
1656
|
+
);
|
|
1657
|
+
} else if (/\.(m|mm|c|cc|cpp|cxx|metal)$/.test(file)) {
|
|
1658
|
+
visit(file, "source");
|
|
1659
|
+
} else visit(file, "resource");
|
|
1660
|
+
}
|
|
1654
1661
|
}
|
|
1655
|
-
}
|
|
1662
|
+
};
|
|
1656
1663
|
}
|
|
1657
1664
|
|
|
1658
1665
|
// src/native-app-identity.ts
|
|
@@ -1763,13 +1770,13 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
|
|
|
1763
1770
|
(candidate) => candidate.name === "Release" && named(candidate.settings)
|
|
1764
1771
|
)?.settings ?? null;
|
|
1765
1772
|
}
|
|
1766
|
-
var APP_DELEGATE_PATH_RE = /(?:^|\/)ios\/([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
1773
|
+
var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
1767
1774
|
function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
|
|
1768
1775
|
const pbxprojPath = Object.keys(files).find(
|
|
1769
|
-
(
|
|
1776
|
+
(path10) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path10)
|
|
1770
1777
|
) ?? Object.keys(files).find(
|
|
1771
|
-
(
|
|
1772
|
-
) ?? Object.keys(files).find((
|
|
1778
|
+
(path10) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path10)
|
|
1779
|
+
) ?? Object.keys(files).find((path10) => /(?:^|\/)project\.pbxproj$/.test(path10));
|
|
1773
1780
|
if (!pbxprojPath) return null;
|
|
1774
1781
|
const pbxproj = files[pbxprojPath];
|
|
1775
1782
|
let objects = {};
|
|
@@ -1811,8 +1818,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1811
1818
|
} else if (applicationTargetNames.size === 1) {
|
|
1812
1819
|
targetName = [...applicationTargetNames][0];
|
|
1813
1820
|
} else if (applicationTargetNames.size > 1) {
|
|
1814
|
-
const delegateTargets = Object.keys(files).filter((
|
|
1815
|
-
(
|
|
1821
|
+
const delegateTargets = Object.keys(files).filter((path10) => !path10.includes("/Pods/")).map((path10) => path10.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
|
|
1822
|
+
(name2) => typeof name2 === "string" && applicationTargetNames.has(name2)
|
|
1816
1823
|
);
|
|
1817
1824
|
if (delegateTargets.length === 1) {
|
|
1818
1825
|
targetName = delegateTargets[0];
|
|
@@ -1916,8 +1923,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1916
1923
|
const icons = dictionary.CFBundleIcons;
|
|
1917
1924
|
const alternates = isRecord(icons) ? icons.CFBundleAlternateIcons : void 0;
|
|
1918
1925
|
const alternateIconNames = /* @__PURE__ */ new Set();
|
|
1919
|
-
for (const
|
|
1920
|
-
const resolved = resolveBuildSetting(
|
|
1926
|
+
for (const name2 of isRecord(alternates) ? Object.keys(alternates) : []) {
|
|
1927
|
+
const resolved = resolveBuildSetting(name2, settings);
|
|
1921
1928
|
if (resolved === null) throw new Error("native alternate icon name is unresolved");
|
|
1922
1929
|
alternateIconNames.add(resolved);
|
|
1923
1930
|
}
|
|
@@ -2027,15 +2034,14 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2027
2034
|
isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
|
|
2028
2035
|
);
|
|
2029
2036
|
const paths = Object.keys(files);
|
|
2030
|
-
|
|
2031
|
-
objects,
|
|
2037
|
+
xcodeTargetMemberVisitor(objects)(
|
|
2032
2038
|
selectedTarget.id,
|
|
2033
2039
|
xcodePathResolver(objects, projectDir, join2),
|
|
2034
2040
|
(file) => {
|
|
2035
2041
|
if (Object.hasOwn(files, file)) return [file];
|
|
2036
2042
|
const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
2037
2043
|
return paths.filter(
|
|
2038
|
-
(
|
|
2044
|
+
(path10) => path10.startsWith(prefix) && !/(?:^|\/)\./.test(path10.slice(prefix.length))
|
|
2039
2045
|
);
|
|
2040
2046
|
},
|
|
2041
2047
|
join2,
|
|
@@ -2046,7 +2052,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2046
2052
|
}
|
|
2047
2053
|
const rootModuleName = readRootModuleName(
|
|
2048
2054
|
Object.entries(files).filter(
|
|
2049
|
-
([
|
|
2055
|
+
([path10]) => !path10.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path10) || path10.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
|
|
2050
2056
|
).map(([, source]) => source)
|
|
2051
2057
|
);
|
|
2052
2058
|
return {
|
|
@@ -2137,22 +2143,332 @@ function parsePlistSource(source) {
|
|
|
2137
2143
|
return import_plist.default.parse(source);
|
|
2138
2144
|
}
|
|
2139
2145
|
|
|
2146
|
+
// src/swift-objc-standin.ts
|
|
2147
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2148
|
+
var import_node_crypto = require("node:crypto");
|
|
2149
|
+
|
|
2150
|
+
// src/swift-objc-platform.ts
|
|
2151
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2152
|
+
|
|
2153
|
+
// src/swift-toolchain.ts
|
|
2154
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2155
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
2156
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
2157
|
+
function peachsimPackageRoot() {
|
|
2158
|
+
let dir = __sootsim_import_meta_dirname;
|
|
2159
|
+
while (!import_node_fs.default.existsSync(import_node_path.default.join(dir, "package.json")) && dir !== import_node_path.default.dirname(dir))
|
|
2160
|
+
dir = import_node_path.default.dirname(dir);
|
|
2161
|
+
return dir;
|
|
2162
|
+
}
|
|
2163
|
+
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2164
|
+
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
2165
|
+
var compilerArchives = {
|
|
2166
|
+
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
2167
|
+
identity: "0b2d0a9011c88e66",
|
|
2168
|
+
hosts: {
|
|
2169
|
+
"darwin-arm64": {
|
|
2170
|
+
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
2171
|
+
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
2172
|
+
},
|
|
2173
|
+
"linux-x64": {
|
|
2174
|
+
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
2175
|
+
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
2176
|
+
},
|
|
2177
|
+
"linux-arm64": {
|
|
2178
|
+
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
2179
|
+
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
"swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
|
|
2184
|
+
identity: "f7c03c3f59ec5d83",
|
|
2185
|
+
hosts: {
|
|
2186
|
+
"darwin-arm64": {
|
|
2187
|
+
checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
|
|
2188
|
+
manifest: "2a7754e6e365bf71ae6b6aefbbd810123795c73d43fb902a8a972d009d72790f"
|
|
2189
|
+
},
|
|
2190
|
+
"linux-x64": {
|
|
2191
|
+
checksum: "5ffa3b54d54583c1d6a38b708693072db4d088ba4bf5966b17014c068b2db641",
|
|
2192
|
+
manifest: "1b23ea52c5570de4697481a54bd0b0a0bcd6b54feccb7b0bb940d3643dec82cb"
|
|
2193
|
+
},
|
|
2194
|
+
"linux-arm64": {
|
|
2195
|
+
checksum: "29b0b97b7b0db4475dbe55f7011e57f493fed9f3482a6705becebd8b68c90bab",
|
|
2196
|
+
manifest: "3fdab1132715f5899de1bb1d7ddcd52cf540295ab86586c72f49502f37a403a1"
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
},
|
|
2200
|
+
"swift-6.4.0-RELEASE-custom-3e3dca8fd1d82975": {
|
|
2201
|
+
identity: "3e3dca8fd1d82975",
|
|
2202
|
+
hosts: {
|
|
2203
|
+
"darwin-arm64": {
|
|
2204
|
+
checksum: "dfad56454f5e1e465071ff708bf485be65b438cf55d02b04d26d17d26df9f54a",
|
|
2205
|
+
manifest: "82c35e43ed81101bea500100356a555d8266e1987d5ca7605aaa4df747c38f81"
|
|
2206
|
+
},
|
|
2207
|
+
"linux-x64": {
|
|
2208
|
+
checksum: "d3f5908d097fdc1337ff979114e605bcc758052e32f9d5d760574153d58ce6db",
|
|
2209
|
+
manifest: "a03caf181177f3d68a45b5246d0f0a26d8a5fa9ff33cf44c44e6942b73363bae"
|
|
2210
|
+
},
|
|
2211
|
+
"linux-arm64": {
|
|
2212
|
+
checksum: "8fceafca152dd0692aa6bb51236fc362a4caeeef37fc22cb5ef6aa3d0d5b3df3",
|
|
2213
|
+
manifest: "3115bc496fd8e907a16992dfc5c85b3e0798d3b58ddf1d6dace63842aed8e53b"
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
"swift-6.4.0-RELEASE-custom-b082ac5437336790": {
|
|
2218
|
+
identity: "b082ac5437336790",
|
|
2219
|
+
hosts: {
|
|
2220
|
+
"darwin-arm64": {
|
|
2221
|
+
checksum: "85e601982321d3a6f81f05928bc9bbe7a61bc75b27ce24508e79f6b5b537254d",
|
|
2222
|
+
manifest: "c889a70c6bba48eb0e5e218a5c0077eb557082fed5c5c58d10f07a941975080e"
|
|
2223
|
+
},
|
|
2224
|
+
"linux-x64": {
|
|
2225
|
+
checksum: "54c7988622d201e4ba6c83ca75e7b28c658b39cf1ea8b95ea88807afe33aa465",
|
|
2226
|
+
manifest: "bfd725c3b07a3624bb44c8e3a1b7ddf1eddde4fc9565e23740a9cee832c94583"
|
|
2227
|
+
},
|
|
2228
|
+
"linux-arm64": {
|
|
2229
|
+
checksum: "bd729fd73dc9953306eafd87eda79462b836b3cb127c73108327d7256b15f501",
|
|
2230
|
+
manifest: "e7f8827cca0f249a5b4a4750f6324f75633b374985fa0b93e650ee8bfcabeb39"
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
"swift-6.4.0-RELEASE-custom-9cdaffdb6b37fb47": {
|
|
2235
|
+
identity: "9cdaffdb6b37fb47",
|
|
2236
|
+
hosts: {
|
|
2237
|
+
"darwin-arm64": {
|
|
2238
|
+
checksum: "fdd3f88cf76a8dc2083275d4253255030068a25b5ba68acbf59e0407c45677dd",
|
|
2239
|
+
manifest: "f50c68faf91f7d2a6ea5bcd4da4573a49dd00ad9f334b27d3f9ddb08b65e46cc"
|
|
2240
|
+
},
|
|
2241
|
+
"linux-x64": {
|
|
2242
|
+
checksum: "f29f9efc598b17f33d802467676ba282441a8c3c6fa67e307c4a1e6130509d73",
|
|
2243
|
+
manifest: "f907727c5a4af58ccad7ccbb043a21289d7eb37d166536a90b3c3848f95df816"
|
|
2244
|
+
},
|
|
2245
|
+
"linux-arm64": {
|
|
2246
|
+
checksum: "7d4a8a1f90dd6c86804ceb43f8b9cf680b9778d4640a2eb6da5cb333a599f23a",
|
|
2247
|
+
manifest: "a3224cd5c09a92f66cacd0395058b2c43fa103a92bb168280132bbd0febd1575"
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
},
|
|
2251
|
+
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
2252
|
+
identity: SWIFT_HOST_COMPILER_ID,
|
|
2253
|
+
hosts: {
|
|
2254
|
+
"darwin-arm64": {
|
|
2255
|
+
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
2256
|
+
manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
|
|
2257
|
+
},
|
|
2258
|
+
"linux-x64": {
|
|
2259
|
+
checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
|
|
2260
|
+
manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
|
|
2261
|
+
},
|
|
2262
|
+
"linux-arm64": {
|
|
2263
|
+
checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
|
|
2264
|
+
manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
// src/swift-objc-sdk.ts
|
|
2271
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2272
|
+
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
2273
|
+
|
|
2274
|
+
// src/swift-objc-sdk-tree.ts
|
|
2275
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2276
|
+
var import_node_fs2 = require("node:fs");
|
|
2277
|
+
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
2278
|
+
function readIosSdkTree(root) {
|
|
2279
|
+
return (0, import_node_fs2.readdirSync)(root, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => {
|
|
2280
|
+
const file = import_node_path2.default.join(entry.parentPath, entry.name);
|
|
2281
|
+
return [
|
|
2282
|
+
import_node_path2.default.relative(root, file).split(import_node_path2.default.sep).join("/"),
|
|
2283
|
+
(0, import_node_fs2.readFileSync)(file, "utf8")
|
|
2284
|
+
];
|
|
2285
|
+
}).sort(([a], [b]) => a < b ? -1 : 1);
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
// src/swift-objc-sdk.ts
|
|
2289
|
+
var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
|
|
2290
|
+
var OVERLAY_PATH = /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/;
|
|
2291
|
+
var tree = typeof __PEACH_BUNDLED_IOS_SDK__ === "undefined" ? readIosSdkTree(import_node_path3.default.join(peachsimPackageRoot(), "sdk", "ios")) : Object.entries(__PEACH_BUNDLED_IOS_SDK__).sort(([a], [b]) => a < b ? -1 : 1);
|
|
2292
|
+
var IOS_SDK_HEADERS = {};
|
|
2293
|
+
var IOS_SDK_OVERLAYS = {};
|
|
2294
|
+
for (const [file, text2] of tree) {
|
|
2295
|
+
const module2 = OVERLAY_PATH.exec(file)?.[1];
|
|
2296
|
+
if (module2 === void 0) {
|
|
2297
|
+
IOS_SDK_HEADERS[file] = text2;
|
|
2298
|
+
continue;
|
|
2299
|
+
}
|
|
2300
|
+
const header = `// swift-interface-format-version: 1.0
|
|
2301
|
+
// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module2}
|
|
2302
|
+
`;
|
|
2303
|
+
if (!text2.startsWith(header))
|
|
2304
|
+
throw new Error(`sdk overlay ${file} has the wrong interface header`);
|
|
2305
|
+
IOS_SDK_OVERLAYS[module2] = text2.slice(header.length);
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
// src/swift-package.ts
|
|
2309
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2310
|
+
var SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS = [
|
|
2311
|
+
".c",
|
|
2312
|
+
".cc",
|
|
2313
|
+
".cpp",
|
|
2314
|
+
".cxx",
|
|
2315
|
+
".m",
|
|
2316
|
+
".mm"
|
|
2317
|
+
];
|
|
2318
|
+
function isSwiftNativeTranslationUnit(file) {
|
|
2319
|
+
return SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS.some(
|
|
2320
|
+
(extension) => file.endsWith(extension)
|
|
2321
|
+
);
|
|
2322
|
+
}
|
|
2323
|
+
var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
2324
|
+
...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
|
|
2325
|
+
".s",
|
|
2326
|
+
".S",
|
|
2327
|
+
".h",
|
|
2328
|
+
".hh",
|
|
2329
|
+
".hpp",
|
|
2330
|
+
".hxx",
|
|
2331
|
+
".pch",
|
|
2332
|
+
".inc",
|
|
2333
|
+
".inl",
|
|
2334
|
+
".ipp",
|
|
2335
|
+
".def",
|
|
2336
|
+
".modulemap"
|
|
2337
|
+
];
|
|
2338
|
+
function moduleMapTokens(text2) {
|
|
2339
|
+
return (text2.match(/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|[\w.*]+|[{}\[\]]/g) ?? []).filter((token) => !token.startsWith("/"));
|
|
2340
|
+
}
|
|
2341
|
+
function moduleMapName(text2) {
|
|
2342
|
+
const tokens = moduleMapTokens(text2);
|
|
2343
|
+
const index = tokens.findIndex(
|
|
2344
|
+
(token, i) => token === "module" && tokens[i - 1] !== "extern"
|
|
2345
|
+
);
|
|
2346
|
+
return index < 0 ? void 0 : tokens[index + 1];
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
// src/swift-objc-standin.ts
|
|
2350
|
+
var NATIVE_GRAPH_SDK_VERSION = "27.1";
|
|
2351
|
+
var WASI_EMULATION = [
|
|
2352
|
+
"_WASI_EMULATED_SIGNAL",
|
|
2353
|
+
"_WASI_EMULATED_MMAN",
|
|
2354
|
+
"_WASI_EMULATED_PROCESS_CLOCKS"
|
|
2355
|
+
];
|
|
2356
|
+
var WASI_EMULATION_FLAGS = WASI_EMULATION.map((name2) => `-D${name2}`);
|
|
2357
|
+
var NATIVE_GRAPH_INPUTS = {
|
|
2358
|
+
sdk: NATIVE_GRAPH_SDK_VERSION,
|
|
2359
|
+
settings: "e68503e5e534e9194af5efe8c636ca8b824e2d8237c5f38ec84aa4d155bc8418",
|
|
2360
|
+
build: "ff785237ba22f1d8f347a5c4f4c68400a387c6d935ef3a443545a72faef57e70",
|
|
2361
|
+
compiler: "Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)",
|
|
2362
|
+
target: IOS_SDK_TARGET
|
|
2363
|
+
};
|
|
2364
|
+
var NATIVE_GRAPH_ID = (0, import_node_crypto.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
2365
|
+
function stripExternalSourceMarks(text2) {
|
|
2366
|
+
return text2.split("\n").map(
|
|
2367
|
+
(line) => line.startsWith("#define PEACH_SWIFT_CLASS(") ? line : line.replace(/PEACH_SWIFT_CLASS\(\w+\)\s*/g, "")
|
|
2368
|
+
).join("\n");
|
|
2369
|
+
}
|
|
2370
|
+
function iosSdkEntries() {
|
|
2371
|
+
const overlays = Object.entries(IOS_SDK_OVERLAYS).map(
|
|
2372
|
+
([module2, text2]) => [
|
|
2373
|
+
`usr/lib/swift/${module2}.swiftmodule/arm64-apple-ios-simulator.swiftinterface`,
|
|
2374
|
+
`// swift-interface-format-version: 1.0
|
|
2375
|
+
// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module2}
|
|
2376
|
+
${text2}`
|
|
2377
|
+
]
|
|
2378
|
+
);
|
|
2379
|
+
const headers = Object.entries(IOS_SDK_HEADERS).map(
|
|
2380
|
+
([file, text2]) => [file, stripExternalSourceMarks(text2)]
|
|
2381
|
+
);
|
|
2382
|
+
return [...headers, ...overlays].sort(([a], [b]) => a < b ? -1 : 1);
|
|
2383
|
+
}
|
|
2384
|
+
var IOS_SDK_ID = (0, import_node_crypto.createHash)("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
|
|
2385
|
+
|
|
2140
2386
|
// src/xcode-project.ts
|
|
2141
2387
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2142
|
-
var
|
|
2143
|
-
var
|
|
2144
|
-
var
|
|
2145
|
-
var
|
|
2388
|
+
var import_node_child_process3 = require("node:child_process");
|
|
2389
|
+
var import_node_crypto4 = require("node:crypto");
|
|
2390
|
+
var import_node_fs5 = __toESM(require("node:fs"), 1);
|
|
2391
|
+
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
2146
2392
|
var import_plist2 = __toESM(require("plist"), 1);
|
|
2147
2393
|
|
|
2394
|
+
// src/prepared-xcode-phases.ts
|
|
2395
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2396
|
+
var import_node_crypto2 = require("node:crypto");
|
|
2397
|
+
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
2398
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
2399
|
+
var workspaces = /* @__PURE__ */ new Map();
|
|
2400
|
+
var recording;
|
|
2401
|
+
function relativeFile(root, file) {
|
|
2402
|
+
const relative = import_node_path4.default.relative(root, file);
|
|
2403
|
+
if (!relative || relative === ".." || relative.startsWith(`..${import_node_path4.default.sep}`) || import_node_path4.default.isAbsolute(relative))
|
|
2404
|
+
throw new Error(`prepared Xcode output is outside its workspace: ${file}`);
|
|
2405
|
+
return relative.split(import_node_path4.default.sep).join("/");
|
|
2406
|
+
}
|
|
2407
|
+
function output(root, file) {
|
|
2408
|
+
const relative = relativeFile(root, file);
|
|
2409
|
+
const stat = import_node_fs3.default.statSync(file, { throwIfNoEntry: false });
|
|
2410
|
+
if (!stat) return { path: relative, sha256: null };
|
|
2411
|
+
if (!stat.isFile()) throw new Error(`prepared Xcode output is not a file: ${file}`);
|
|
2412
|
+
relativeFile(root, import_node_fs3.default.realpathSync(file));
|
|
2413
|
+
const bytes = import_node_fs3.default.readFileSync(file);
|
|
2414
|
+
const prefix = Buffer.from(root);
|
|
2415
|
+
const hash = (0, import_node_crypto2.createHash)("sha256");
|
|
2416
|
+
let offset = 0;
|
|
2417
|
+
for (let index = bytes.indexOf(prefix); index !== -1; index = bytes.indexOf(prefix, offset)) {
|
|
2418
|
+
hash.update(bytes.subarray(offset, index)).update("\0workspace\0");
|
|
2419
|
+
offset = index + prefix.length;
|
|
2420
|
+
}
|
|
2421
|
+
hash.update(bytes.subarray(offset));
|
|
2422
|
+
return {
|
|
2423
|
+
path: relative,
|
|
2424
|
+
sha256: hash.digest("hex")
|
|
2425
|
+
};
|
|
2426
|
+
}
|
|
2427
|
+
function preparedXcodePhase(project, target, phase, configuration, outputs, recorded) {
|
|
2428
|
+
const root = recording?.root ?? [...workspaces.keys()].find((root2) => {
|
|
2429
|
+
const relative = import_node_path4.default.relative(root2, project);
|
|
2430
|
+
return relative !== ".." && !relative.startsWith(`..${import_node_path4.default.sep}`) && !import_node_path4.default.isAbsolute(relative);
|
|
2431
|
+
});
|
|
2432
|
+
if (!root) return false;
|
|
2433
|
+
const entry = {
|
|
2434
|
+
project: relativeFile(root, project),
|
|
2435
|
+
target,
|
|
2436
|
+
phase,
|
|
2437
|
+
configuration,
|
|
2438
|
+
outputs: outputs.map((file) => output(root, file))
|
|
2439
|
+
};
|
|
2440
|
+
if (recorded) {
|
|
2441
|
+
if (recording) {
|
|
2442
|
+
const previous = recording.phases.find(
|
|
2443
|
+
(item) => item.project === entry.project && item.target === target && item.phase === phase && item.configuration === configuration
|
|
2444
|
+
);
|
|
2445
|
+
if (previous && JSON.stringify(previous.outputs) !== JSON.stringify(entry.outputs))
|
|
2446
|
+
throw new Error(
|
|
2447
|
+
`Xcode phase produced inconsistent outputs: ${project} ${target} ${phase}`
|
|
2448
|
+
);
|
|
2449
|
+
if (!previous) recording.phases.push(entry);
|
|
2450
|
+
}
|
|
2451
|
+
return false;
|
|
2452
|
+
}
|
|
2453
|
+
if (recording) return false;
|
|
2454
|
+
const expected = workspaces.get(root)?.phases.find(
|
|
2455
|
+
(item) => item.project === entry.project && item.target === target && item.phase === phase && item.configuration === configuration
|
|
2456
|
+
);
|
|
2457
|
+
if (!expected || JSON.stringify(expected.outputs) !== JSON.stringify(entry.outputs))
|
|
2458
|
+
throw new Error(
|
|
2459
|
+
`prepared Xcode phase does not match its attested outputs: ${project} ${target} ${phase}`
|
|
2460
|
+
);
|
|
2461
|
+
return true;
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2148
2464
|
// src/swift-coverage/xcode-assets.ts
|
|
2149
2465
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2150
2466
|
|
|
2151
2467
|
// src/swift-coverage/provenance.ts
|
|
2152
2468
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2153
|
-
var
|
|
2154
|
-
var
|
|
2155
|
-
var
|
|
2469
|
+
var import_node_crypto3 = require("node:crypto");
|
|
2470
|
+
var import_node_fs4 = require("node:fs");
|
|
2471
|
+
var import_node_path5 = require("node:path");
|
|
2156
2472
|
var SWIFT_COVERAGE_DIGEST_SOURCES = [
|
|
2157
2473
|
"swift-coverage/indexdump.ts",
|
|
2158
2474
|
"swift-coverage/indexing.ts",
|
|
@@ -2182,11 +2498,11 @@ function swiftCoverageSourceDigests(srcDir) {
|
|
|
2182
2498
|
return Object.fromEntries(
|
|
2183
2499
|
SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
|
|
2184
2500
|
file,
|
|
2185
|
-
(0,
|
|
2501
|
+
(0, import_node_crypto3.createHash)("sha256").update((0, import_node_fs4.readFileSync)((0, import_node_path5.join)(srcDir, file))).digest("hex")
|
|
2186
2502
|
])
|
|
2187
2503
|
);
|
|
2188
2504
|
}
|
|
2189
|
-
var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0,
|
|
2505
|
+
var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path5.join)(__sootsim_import_meta_dirname, ".."));
|
|
2190
2506
|
|
|
2191
2507
|
// src/swift-coverage/xcode-asset-symbols.ts
|
|
2192
2508
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -2366,503 +2682,285 @@ var assetSymbolSettingKeys = [
|
|
|
2366
2682
|
"ASSETCATALOG_OTHER_FLAGS"
|
|
2367
2683
|
];
|
|
2368
2684
|
|
|
2369
|
-
// src/swift-package.ts
|
|
2685
|
+
// src/swift-package-manifest.ts
|
|
2370
2686
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2371
|
-
var
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
);
|
|
2383
|
-
}
|
|
2384
|
-
var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
2385
|
-
...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
|
|
2386
|
-
".s",
|
|
2387
|
-
".S",
|
|
2388
|
-
".h",
|
|
2389
|
-
".hh",
|
|
2390
|
-
".hpp",
|
|
2391
|
-
".hxx",
|
|
2392
|
-
".pch",
|
|
2393
|
-
".inc",
|
|
2394
|
-
".inl",
|
|
2395
|
-
".modulemap"
|
|
2396
|
-
];
|
|
2397
|
-
function moduleMapTokens(text2) {
|
|
2398
|
-
return (text2.match(/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|[\w.*]+|[{}\[\]]/g) ?? []).filter((token) => !token.startsWith("/"));
|
|
2687
|
+
var import_node_child_process2 = require("node:child_process");
|
|
2688
|
+
var import_node_path7 = __toESM(require("node:path"), 1);
|
|
2689
|
+
var import_node_util2 = require("node:util");
|
|
2690
|
+
|
|
2691
|
+
// src/home-paths.ts
|
|
2692
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2693
|
+
var import_node_os = require("node:os");
|
|
2694
|
+
var import_node_path6 = __toESM(require("node:path"), 1);
|
|
2695
|
+
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
2696
|
+
function ambientHomeDir() {
|
|
2697
|
+
return import_node_path6.default.join((0, import_node_os.homedir)(), ".peach");
|
|
2399
2698
|
}
|
|
2400
|
-
function
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
);
|
|
2405
|
-
return index < 0 ? void 0 : tokens[index + 1];
|
|
2699
|
+
function rnxHomeDir() {
|
|
2700
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
2701
|
+
if (override && override.length > 0) return import_node_path6.default.resolve(override);
|
|
2702
|
+
return ambientHomeDir();
|
|
2406
2703
|
}
|
|
2407
|
-
function
|
|
2408
|
-
|
|
2409
|
-
return (path7.split("/").pop() ?? path7).replace(/\.git$/, "").toLowerCase();
|
|
2704
|
+
function cacheDir() {
|
|
2705
|
+
return import_node_path6.default.join(rnxHomeDir(), "cache");
|
|
2410
2706
|
}
|
|
2707
|
+
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
2708
|
+
|
|
2709
|
+
// src/swift-distribution.ts
|
|
2710
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2711
|
+
|
|
2712
|
+
// ../contrast-runtime-delivery/src/index.ts
|
|
2713
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2714
|
+
|
|
2715
|
+
// src/process-group.ts
|
|
2716
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2717
|
+
|
|
2718
|
+
// src/process-table.ts
|
|
2719
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2720
|
+
|
|
2721
|
+
// ../contrast-runtime-delivery/src/product.ts
|
|
2722
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2723
|
+
|
|
2724
|
+
// ../contrast-runtime-delivery/src/version.ts
|
|
2725
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2726
|
+
|
|
2727
|
+
// cli/drivers/linux-browser-libs.ts
|
|
2728
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2729
|
+
|
|
2730
|
+
// cli/cli-update.ts
|
|
2731
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2732
|
+
|
|
2733
|
+
// src/automatic-update-policy.ts
|
|
2734
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2735
|
+
|
|
2736
|
+
// src/cli-version.ts
|
|
2737
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2738
|
+
|
|
2739
|
+
// src/public-brand.ts
|
|
2740
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2741
|
+
var name = "Peach";
|
|
2742
|
+
var peachPublicBrand = Object.freeze({
|
|
2743
|
+
name,
|
|
2744
|
+
packageName: "peachsim",
|
|
2745
|
+
commandName: "peach",
|
|
2746
|
+
domain: "peachsim.com",
|
|
2747
|
+
origin: "https://peachsim.com",
|
|
2748
|
+
boxOrigin: "https://rnx-box.contrast.dev"
|
|
2749
|
+
});
|
|
2750
|
+
|
|
2751
|
+
// cli/commands/inspect/env.ts
|
|
2752
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2753
|
+
|
|
2754
|
+
// cli/cli-update.ts
|
|
2755
|
+
var CLI_UPDATE_CHECK_INTERVAL_MS = 20 * 60 * 60 * 1e3;
|
|
2756
|
+
var CLI_UPDATE_NOTIFICATION_COOLDOWN_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
2757
|
+
|
|
2758
|
+
// src/swift-compile.ts
|
|
2759
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2760
|
+
var import_node_os2 = __toESM(require("node:os"), 1);
|
|
2761
|
+
|
|
2762
|
+
// src/admitted-mac-build.ts
|
|
2763
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2764
|
+
|
|
2765
|
+
// src/retired-cache-directory.ts
|
|
2766
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2767
|
+
|
|
2768
|
+
// src/process-liveness.ts
|
|
2769
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2770
|
+
|
|
2771
|
+
// src/swift-compiler-digest.ts
|
|
2772
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2773
|
+
|
|
2774
|
+
// src/swift-darwin-records.ts
|
|
2775
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2776
|
+
|
|
2777
|
+
// src/swift-objc-runtime.ts
|
|
2778
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2779
|
+
|
|
2780
|
+
// src/swift-shared-sdk.ts
|
|
2781
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2782
|
+
|
|
2783
|
+
// src/swift-design-time.ts
|
|
2784
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2411
2785
|
|
|
2412
|
-
// src/swift-
|
|
2786
|
+
// src/swift-distribution-contract.ts
|
|
2787
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2788
|
+
|
|
2789
|
+
// src/swift-icu.ts
|
|
2413
2790
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2414
2791
|
var import_node_child_process = require("node:child_process");
|
|
2415
|
-
var
|
|
2416
|
-
var
|
|
2417
|
-
var
|
|
2792
|
+
var import_node_util = require("node:util");
|
|
2793
|
+
var import_node_zlib = require("node:zlib");
|
|
2794
|
+
var run = (0, import_node_util.promisify)(import_node_child_process.execFile);
|
|
2795
|
+
var deflate = (0, import_node_util.promisify)(import_node_zlib.gzip);
|
|
2796
|
+
var compressBrotli = (0, import_node_util.promisify)(import_node_zlib.brotliCompress);
|
|
2797
|
+
var inflateGzip = (0, import_node_util.promisify)(import_node_zlib.gunzip);
|
|
2418
2798
|
|
|
2419
|
-
// src/
|
|
2799
|
+
// src/swift-link-roots.ts
|
|
2800
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2801
|
+
|
|
2802
|
+
// src/swift-objc-import.ts
|
|
2803
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2804
|
+
|
|
2805
|
+
// src/swift-project-user.ts
|
|
2806
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2807
|
+
|
|
2808
|
+
// src/swift-reproducible.ts
|
|
2809
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2810
|
+
|
|
2811
|
+
// src/swift-root-lock.ts
|
|
2812
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2813
|
+
|
|
2814
|
+
// src/swift-wasm-prune.ts
|
|
2815
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2816
|
+
var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
|
|
2817
|
+
"libFoundation",
|
|
2818
|
+
"lib_FoundationCollections",
|
|
2819
|
+
"libswift_StringProcessing",
|
|
2820
|
+
"libswift_RegexParser",
|
|
2821
|
+
"libswiftObservation",
|
|
2822
|
+
"libswiftSynchronization",
|
|
2823
|
+
"libswiftCxx",
|
|
2824
|
+
"libswiftCxxStdlib",
|
|
2825
|
+
"libswiftWASILibc",
|
|
2826
|
+
"libswift_Builtin_float",
|
|
2827
|
+
"libObjectiveC"
|
|
2828
|
+
]);
|
|
2829
|
+
var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
|
|
2830
|
+
...[...PRUNED_SDK_ARCHIVES].map((a) => `-l${a.slice(3)}`),
|
|
2831
|
+
"-lswiftCore",
|
|
2832
|
+
"-lswift_Concurrency"
|
|
2833
|
+
]);
|
|
2834
|
+
|
|
2835
|
+
// src/swiftContract.ts
|
|
2836
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2837
|
+
|
|
2838
|
+
// src/wasm-optimize.ts
|
|
2839
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2840
|
+
var import_wasm_opt = require("wasm-opt");
|
|
2841
|
+
var FEATURES = [
|
|
2842
|
+
"threads",
|
|
2843
|
+
"bulk-memory",
|
|
2844
|
+
"bulk-memory-opt",
|
|
2845
|
+
"call-indirect-overlong",
|
|
2846
|
+
"exception-handling",
|
|
2847
|
+
"multivalue",
|
|
2848
|
+
"mutable-globals",
|
|
2849
|
+
"nontrapping-float-to-int",
|
|
2850
|
+
"reference-types",
|
|
2851
|
+
"sign-ext"
|
|
2852
|
+
];
|
|
2853
|
+
var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${import_wasm_opt.BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
|
|
2854
|
+
|
|
2855
|
+
// src/xcode-header-search.ts
|
|
2420
2856
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2421
|
-
var import_node_os = require("node:os");
|
|
2422
|
-
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
2423
|
-
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
2424
|
-
function ambientHomeDir() {
|
|
2425
|
-
return import_node_path2.default.join((0, import_node_os.homedir)(), ".peach");
|
|
2426
|
-
}
|
|
2427
|
-
function rnxHomeDir() {
|
|
2428
|
-
const override = process.env[PEACH_HOME_ENV];
|
|
2429
|
-
if (override && override.length > 0) return import_node_path2.default.resolve(override);
|
|
2430
|
-
return ambientHomeDir();
|
|
2431
|
-
}
|
|
2432
|
-
function cacheDir() {
|
|
2433
|
-
return import_node_path2.default.join(rnxHomeDir(), "cache");
|
|
2434
|
-
}
|
|
2435
|
-
var BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
2436
|
-
function buildersRootEnv() {
|
|
2437
|
-
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
2438
|
-
return root ? root : null;
|
|
2439
|
-
}
|
|
2440
|
-
function swiftCacheDir() {
|
|
2441
|
-
const root = buildersRootEnv();
|
|
2442
|
-
return root ? import_node_path2.default.join(root, "peach-cache") : cacheDir();
|
|
2443
|
-
}
|
|
2444
|
-
function swiftPackageCacheOptions() {
|
|
2445
|
-
const root = import_node_path2.default.join(swiftCacheDir(), "swiftpm");
|
|
2446
|
-
return ["cache", "config", "security"].flatMap((name) => [
|
|
2447
|
-
`--${name}-path`,
|
|
2448
|
-
import_node_path2.default.join(root, name)
|
|
2449
|
-
]);
|
|
2450
|
-
}
|
|
2451
|
-
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
2452
2857
|
|
|
2453
|
-
// src/swift-
|
|
2454
|
-
var
|
|
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
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
"Darwin",
|
|
2505
|
-
"MachO",
|
|
2506
|
-
"PeachObjCRuntime",
|
|
2507
|
-
"PeachObjC",
|
|
2508
|
-
"UIUtilities",
|
|
2509
|
-
"UIKitEnums",
|
|
2510
|
-
"UIKitCore",
|
|
2511
|
-
"PeachICU",
|
|
2512
|
-
"PeachCMark",
|
|
2513
|
-
"CoreImage",
|
|
2514
|
-
"QuartzCore",
|
|
2515
|
-
"CoreGraphics",
|
|
2516
|
-
"AppTrackingTransparency",
|
|
2517
|
-
"StoreKit",
|
|
2518
|
-
"_StoreKit_SwiftUI",
|
|
2519
|
-
"WeatherKit",
|
|
2520
|
-
"DeviceCheck",
|
|
2521
|
-
"PassKit",
|
|
2522
|
-
"Translation",
|
|
2523
|
-
"TipKit",
|
|
2524
|
-
"CoreSpotlight",
|
|
2525
|
-
"CoreVideo",
|
|
2526
|
-
"CoreMedia",
|
|
2527
|
-
"VideoToolbox",
|
|
2528
|
-
"AdSupport",
|
|
2529
|
-
"BackgroundTasks",
|
|
2530
|
-
"LocalAuthentication",
|
|
2531
|
-
"CoreMotion",
|
|
2532
|
-
"MessageUI",
|
|
2533
|
-
"GameController",
|
|
2534
|
-
"GameKit",
|
|
2535
|
-
"MetricKit",
|
|
2536
|
-
"Metal",
|
|
2537
|
-
"AuthenticationServices",
|
|
2538
|
-
"os",
|
|
2539
|
-
"Charts",
|
|
2540
|
-
"Symbols",
|
|
2541
|
-
"UniformTypeIdentifiers",
|
|
2542
|
-
"WidgetKit",
|
|
2543
|
-
"ActivityKit",
|
|
2544
|
-
"SwiftData",
|
|
2545
|
-
"UIKit",
|
|
2546
|
-
"React",
|
|
2547
|
-
"Combine",
|
|
2548
|
-
"PeachFoundationCombine",
|
|
2549
|
-
"AppIntents",
|
|
2550
|
-
"PhotosUI",
|
|
2551
|
-
"AVFoundation",
|
|
2552
|
-
"AVFAudio",
|
|
2553
|
-
"UserNotifications",
|
|
2554
|
-
"Network",
|
|
2555
|
-
"NetworkExtension",
|
|
2556
|
-
"OSLog",
|
|
2557
|
-
"PeachSecurityRuntime",
|
|
2558
|
-
"Accelerate",
|
|
2559
|
-
"CoreText",
|
|
2560
|
-
"CFNetwork",
|
|
2561
|
-
"CommonCrypto",
|
|
2562
|
-
"PeachCodec",
|
|
2563
|
-
"Compression",
|
|
2564
|
-
"zlib",
|
|
2565
|
-
"CryptoKit",
|
|
2566
|
-
"TikTokBusinessSDK",
|
|
2567
|
-
"nSure",
|
|
2568
|
-
"Statsig",
|
|
2569
|
-
"TOCropViewController",
|
|
2570
|
-
"RiveRuntime",
|
|
2571
|
-
"AVRouting",
|
|
2572
|
-
"CoreData",
|
|
2573
|
-
"PDFKit",
|
|
2574
|
-
"ModelIOEnums",
|
|
2575
|
-
"ModelIO",
|
|
2576
|
-
"MetalKit",
|
|
2577
|
-
"DatadogCore",
|
|
2578
|
-
"DatadogLogs",
|
|
2579
|
-
"DatadogRUM",
|
|
2580
|
-
"DatadogTrace",
|
|
2581
|
-
"AppLovinSDK",
|
|
2582
|
-
"GoogleMobileAds",
|
|
2583
|
-
"AppsFlyerLib",
|
|
2584
|
-
"FBSDKCoreKit",
|
|
2585
|
-
"FBAEMKit",
|
|
2586
|
-
"FBSDKCoreKit_Basics",
|
|
2858
|
+
// src/swift-compile.ts
|
|
2859
|
+
var admittedCores = Number(process.env.TM_EXEC_CPU_CORES);
|
|
2860
|
+
var BUILD_JOBS = String(
|
|
2861
|
+
Math.min(
|
|
2862
|
+
4,
|
|
2863
|
+
Math.max(1, Math.floor(import_node_os2.default.availableParallelism() / 2)),
|
|
2864
|
+
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
2865
|
+
)
|
|
2866
|
+
);
|
|
2867
|
+
var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
2868
|
+
GameplayKit: [],
|
|
2869
|
+
simd: [],
|
|
2870
|
+
ModelIO: ["simd"],
|
|
2871
|
+
GLKit: ["ModelIO"],
|
|
2872
|
+
Accelerate: [],
|
|
2873
|
+
CryptoKit: [],
|
|
2874
|
+
CommonCrypto: [],
|
|
2875
|
+
ImagePlayground: [],
|
|
2876
|
+
QuickLookThumbnailing: [],
|
|
2877
|
+
libxml2: [],
|
|
2878
|
+
Compression: [],
|
|
2879
|
+
zlib: [],
|
|
2880
|
+
TikTokBusinessSDK: [],
|
|
2881
|
+
nSure: [],
|
|
2882
|
+
Statsig: [],
|
|
2883
|
+
TOCropViewController: [],
|
|
2884
|
+
RiveRuntime: ["MetalKit"],
|
|
2885
|
+
MetalKit: ["ModelIO"],
|
|
2886
|
+
DatadogCore: [],
|
|
2887
|
+
DatadogLogs: ["DatadogCore"],
|
|
2888
|
+
DatadogRUM: ["DatadogCore"],
|
|
2889
|
+
DatadogTrace: ["DatadogCore"],
|
|
2890
|
+
DatadogCrashReporting: ["DatadogCore"],
|
|
2891
|
+
Amplitude: [],
|
|
2892
|
+
AppLovinSDK: [],
|
|
2893
|
+
AppsFlyerLib: [],
|
|
2894
|
+
FBSDKCoreKit: ["FBAEMKit", "FBSDKCoreKit_Basics"],
|
|
2895
|
+
FBAEMKit: ["FBSDKCoreKit_Basics"],
|
|
2896
|
+
FBSDKCoreKit_Basics: [],
|
|
2897
|
+
Intercom: [],
|
|
2898
|
+
FirebaseCore: [],
|
|
2899
|
+
FirebaseSharedSwift: ["FirebaseCore"],
|
|
2900
|
+
FirebaseRemoteConfig: ["FirebaseCore", "FirebaseSharedSwift"],
|
|
2901
|
+
FirebaseFirestoreInternal: ["FirebaseCore"],
|
|
2902
|
+
FirebaseAnalytics: ["FirebaseCore"],
|
|
2903
|
+
FirebaseAppCheck: ["FirebaseCore"],
|
|
2904
|
+
FirebaseAuth: ["FirebaseCore"],
|
|
2905
|
+
FirebaseCrashlytics: ["FirebaseCore"],
|
|
2906
|
+
FirebaseFirestore: ["FirebaseCore", "FirebaseSharedSwift", "FirebaseFirestoreInternal"],
|
|
2907
|
+
FirebaseStorage: ["FirebaseCore"],
|
|
2908
|
+
Firebase: [
|
|
2587
2909
|
"FirebaseCore",
|
|
2588
|
-
"FirebaseSharedSwift",
|
|
2589
|
-
"FirebaseRemoteConfig",
|
|
2590
|
-
"FirebaseFirestoreInternal",
|
|
2591
2910
|
"FirebaseAnalytics",
|
|
2592
2911
|
"FirebaseAppCheck",
|
|
2593
2912
|
"FirebaseAuth",
|
|
2594
2913
|
"FirebaseCrashlytics",
|
|
2595
2914
|
"FirebaseFirestore",
|
|
2596
|
-
"
|
|
2597
|
-
"
|
|
2598
|
-
"Intercom",
|
|
2599
|
-
"FBAudienceNetwork",
|
|
2600
|
-
"NaturalLanguage",
|
|
2601
|
-
"AVKit",
|
|
2602
|
-
"SafariServices",
|
|
2603
|
-
"QuickLook",
|
|
2604
|
-
"CoreHaptics",
|
|
2605
|
-
"WebKit",
|
|
2606
|
-
"Photos",
|
|
2607
|
-
"LinkPresentation",
|
|
2608
|
-
"FoundationModels",
|
|
2609
|
-
"CoreTransferable",
|
|
2610
|
-
"AudioToolbox",
|
|
2611
|
-
"MediaToolbox",
|
|
2612
|
-
"CoreAudioTypes",
|
|
2613
|
-
"AudioUnit",
|
|
2614
|
-
"Intents",
|
|
2615
|
-
"IntentsUI",
|
|
2616
|
-
"WatchConnectivity",
|
|
2617
|
-
"ReplayKit",
|
|
2618
|
-
"CoreServices",
|
|
2619
|
-
"MobileCoreServices",
|
|
2620
|
-
"CoreTelephony",
|
|
2621
|
-
"SystemConfiguration",
|
|
2622
|
-
"ImageIO",
|
|
2623
|
-
"CoreLocationEnums",
|
|
2624
|
-
"CoreLocation",
|
|
2625
|
-
"MapKit",
|
|
2626
|
-
"One",
|
|
2627
|
-
"simd",
|
|
2628
|
-
"GLKit",
|
|
2629
|
-
"GameplayKit",
|
|
2630
|
-
"SpriteKit",
|
|
2631
|
-
"PeachBox2D"
|
|
2915
|
+
"FirebaseRemoteConfig",
|
|
2916
|
+
"FirebaseStorage"
|
|
2632
2917
|
],
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
deviceModel: ["string"],
|
|
2636
|
-
systemName: ["string"],
|
|
2637
|
-
systemVersion: ["string"],
|
|
2638
|
-
screenMetrics: ["array"],
|
|
2639
|
-
colorScheme: ["string:light", "string:dark"],
|
|
2640
|
-
semanticColors: ["object"],
|
|
2641
|
-
imageAssets: ["object"],
|
|
2642
|
-
locale: ["string"],
|
|
2643
|
-
dynamicTypeSize: [
|
|
2644
|
-
"string:xSmall",
|
|
2645
|
-
"string:small",
|
|
2646
|
-
"string:medium",
|
|
2647
|
-
"string:large",
|
|
2648
|
-
"string:xLarge",
|
|
2649
|
-
"string:xxLarge",
|
|
2650
|
-
"string:xxxLarge",
|
|
2651
|
-
"string:accessibility1",
|
|
2652
|
-
"string:accessibility2",
|
|
2653
|
-
"string:accessibility3",
|
|
2654
|
-
"string:accessibility4",
|
|
2655
|
-
"string:accessibility5"
|
|
2656
|
-
],
|
|
2657
|
-
horizontalSizeClass: ["string:compact", "string:regular"],
|
|
2658
|
-
verticalSizeClass: ["string:compact", "string:regular"],
|
|
2659
|
-
accessibilityReduceMotion: ["bool"],
|
|
2660
|
-
hinge: ["null", "object"]
|
|
2661
|
-
},
|
|
2662
|
-
hosts: {
|
|
2663
|
-
"darwin-arm64": {
|
|
2664
|
-
sha256: "e0cb6487e64d3089d0795817b5f7543db57552bf1e21da7847351aee3b9227d0",
|
|
2665
|
-
size: 90762105
|
|
2666
|
-
},
|
|
2667
|
-
"linux-x64": {
|
|
2668
|
-
sha256: "fcadab7f519c456fd2ff7a780f36001cd2c51a90a29938684d0f2ab94c377440",
|
|
2669
|
-
size: 93479763
|
|
2670
|
-
},
|
|
2671
|
-
"linux-arm64": {
|
|
2672
|
-
sha256: "9a225586903eca8a4b13e03301814883e743a33cdbfc4b9eced867facff5472b",
|
|
2673
|
-
size: 92973106
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
};
|
|
2677
|
-
|
|
2678
|
-
// src/swift-toolchain.ts
|
|
2679
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2680
|
-
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
2681
|
-
var import_node_os2 = __toESM(require("node:os"), 1);
|
|
2682
|
-
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
2683
|
-
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2684
|
-
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
2685
|
-
var compilerArchives = {
|
|
2686
|
-
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
2687
|
-
identity: "0b2d0a9011c88e66",
|
|
2688
|
-
hosts: {
|
|
2689
|
-
"darwin-arm64": {
|
|
2690
|
-
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
2691
|
-
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
2692
|
-
},
|
|
2693
|
-
"linux-x64": {
|
|
2694
|
-
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
2695
|
-
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
2696
|
-
},
|
|
2697
|
-
"linux-arm64": {
|
|
2698
|
-
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
2699
|
-
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
},
|
|
2703
|
-
"swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
|
|
2704
|
-
identity: "f7c03c3f59ec5d83",
|
|
2705
|
-
hosts: {
|
|
2706
|
-
"darwin-arm64": {
|
|
2707
|
-
checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
|
|
2708
|
-
manifest: "2a7754e6e365bf71ae6b6aefbbd810123795c73d43fb902a8a972d009d72790f"
|
|
2709
|
-
},
|
|
2710
|
-
"linux-x64": {
|
|
2711
|
-
checksum: "5ffa3b54d54583c1d6a38b708693072db4d088ba4bf5966b17014c068b2db641",
|
|
2712
|
-
manifest: "1b23ea52c5570de4697481a54bd0b0a0bcd6b54feccb7b0bb940d3643dec82cb"
|
|
2713
|
-
},
|
|
2714
|
-
"linux-arm64": {
|
|
2715
|
-
checksum: "29b0b97b7b0db4475dbe55f7011e57f493fed9f3482a6705becebd8b68c90bab",
|
|
2716
|
-
manifest: "3fdab1132715f5899de1bb1d7ddcd52cf540295ab86586c72f49502f37a403a1"
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2719
|
-
},
|
|
2720
|
-
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
2721
|
-
identity: SWIFT_HOST_COMPILER_ID,
|
|
2722
|
-
hosts: {
|
|
2723
|
-
"darwin-arm64": {
|
|
2724
|
-
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
2725
|
-
manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
|
|
2726
|
-
},
|
|
2727
|
-
"linux-x64": {
|
|
2728
|
-
checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
|
|
2729
|
-
manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
|
|
2730
|
-
},
|
|
2731
|
-
"linux-arm64": {
|
|
2732
|
-
checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
|
|
2733
|
-
manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
|
|
2734
|
-
}
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2918
|
+
GoogleMobileAds: [],
|
|
2919
|
+
FBAudienceNetwork: []
|
|
2737
2920
|
};
|
|
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
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
};
|
|
2774
|
-
}
|
|
2921
|
+
var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
2922
|
+
var FOUNDATION_IMPLICIT_MODULES = [
|
|
2923
|
+
"PeachObjC",
|
|
2924
|
+
"Dispatch",
|
|
2925
|
+
"FoundationNetworking",
|
|
2926
|
+
"PeachFoundationCombine",
|
|
2927
|
+
"Darwin"
|
|
2928
|
+
];
|
|
2929
|
+
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
2930
|
+
(module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
|
|
2931
|
+
).join("");
|
|
2932
|
+
var compilerSourceDigest = true ? "8c46343a35b3db15f9074886c9d1ed86fa0e14a331bdb02ed609062eec316d8c" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
2933
|
+
var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
2934
|
+
"CFAllocator",
|
|
2935
|
+
"CFArray",
|
|
2936
|
+
"CFAttributedString",
|
|
2937
|
+
"CFBoolean",
|
|
2938
|
+
"CFData",
|
|
2939
|
+
"CFDate",
|
|
2940
|
+
"CFDictionary",
|
|
2941
|
+
"CFError",
|
|
2942
|
+
"CFMutableData",
|
|
2943
|
+
"CFNumber",
|
|
2944
|
+
"CFSet",
|
|
2945
|
+
"CFString",
|
|
2946
|
+
"CFURL"
|
|
2947
|
+
].map((name2) => `import class CoreFoundation.${name2}`).concat([
|
|
2948
|
+
"import typealias CoreFoundation.CFPropertyList",
|
|
2949
|
+
"import typealias CoreFoundation.CFTypeRef",
|
|
2950
|
+
"import CoreGraphics"
|
|
2951
|
+
]).join("; ");
|
|
2952
|
+
var ROOT_LOCKS = Symbol.for("peachsim.swiftCompile.rootLocks");
|
|
2953
|
+
var host = globalThis;
|
|
2954
|
+
var rootLocks = host[ROOT_LOCKS] ??= /* @__PURE__ */ new Map();
|
|
2955
|
+
var SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
|
|
2775
2956
|
|
|
2776
2957
|
// src/swift-package-manifest.ts
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
}
|
|
2780
|
-
function swiftPackageFailure(error) {
|
|
2781
|
-
if (!(error instanceof Error)) return String(error);
|
|
2782
|
-
const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
|
|
2783
|
-
return stderr || error.message;
|
|
2784
|
-
}
|
|
2785
|
-
var cacheDir2 = import_node_path4.default.join(cacheDir(), "swift-manifests");
|
|
2786
|
-
var requirementClause = (item) => {
|
|
2787
|
-
const url = JSON.stringify(item.url);
|
|
2788
|
-
const requirement = item.requirement;
|
|
2789
|
-
if (requirement.kind === "upToNextMajorVersion")
|
|
2790
|
-
return `.package(url: ${url}, from: ${JSON.stringify(requirement.minimumVersion)})`;
|
|
2791
|
-
if (requirement.kind === "upToNextMinorVersion")
|
|
2792
|
-
return `.package(url: ${url}, .upToNextMinor(from: ${JSON.stringify(requirement.minimumVersion)}))`;
|
|
2793
|
-
if (requirement.kind === "versionRange")
|
|
2794
|
-
return `.package(url: ${url}, ${JSON.stringify(requirement.minimumVersion)}..<${JSON.stringify(requirement.maximumVersion)})`;
|
|
2795
|
-
if (requirement.kind === "exactVersion")
|
|
2796
|
-
return `.package(url: ${url}, exact: ${JSON.stringify(requirement.version)})`;
|
|
2797
|
-
if (requirement.kind === "branch")
|
|
2798
|
-
return `.package(url: ${url}, branch: ${JSON.stringify(requirement.branch)})`;
|
|
2799
|
-
return `.package(url: ${url}, revision: ${JSON.stringify(requirement.revision)})`;
|
|
2800
|
-
};
|
|
2801
|
-
function resolveSwiftPackageRequirements(requirements, destination) {
|
|
2802
|
-
const repository = (url) => url.replace(/(?:\.git)?\/?$/, "");
|
|
2803
|
-
const chosen = /* @__PURE__ */ new Map();
|
|
2804
|
-
for (const item of requirements) {
|
|
2805
|
-
const identity = swiftPackageIdentity(item.url);
|
|
2806
|
-
const previous = chosen.get(identity);
|
|
2807
|
-
if (previous && (repository(previous.url) !== repository(item.url) || JSON.stringify(previous.requirement) !== JSON.stringify(item.requirement)))
|
|
2808
|
-
throw new Error(
|
|
2809
|
-
`conflicting requirements for ${identity}: ${previous.url} ${JSON.stringify(previous.requirement)}; ${item.url} ${JSON.stringify(item.requirement)}`
|
|
2810
|
-
);
|
|
2811
|
-
if (!previous) chosen.set(identity, item);
|
|
2812
|
-
}
|
|
2813
|
-
const clauses = [...chosen.values()].sort(
|
|
2814
|
-
(a, b) => swiftPackageIdentity(a.url).localeCompare(swiftPackageIdentity(b.url))
|
|
2815
|
-
).map(requirementClause);
|
|
2816
|
-
const manifest = `// swift-tools-version:5.9
|
|
2817
|
-
import PackageDescription
|
|
2818
|
-
let package = Package(
|
|
2819
|
-
name: "Resolve",
|
|
2820
|
-
dependencies: [
|
|
2821
|
-
${clauses.join(",\n ")},
|
|
2822
|
-
]
|
|
2823
|
-
)
|
|
2824
|
-
`;
|
|
2825
|
-
const dir = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(import_node_os3.default.tmpdir(), "peach-resolve-"));
|
|
2826
|
-
try {
|
|
2827
|
-
import_node_fs3.default.writeFileSync(import_node_path4.default.join(dir, "Package.swift"), manifest);
|
|
2828
|
-
try {
|
|
2829
|
-
(0, import_node_child_process.execFileSync)(
|
|
2830
|
-
swiftCommand(),
|
|
2831
|
-
[
|
|
2832
|
-
"package",
|
|
2833
|
-
...swiftPackageCacheOptions(),
|
|
2834
|
-
"--package-path",
|
|
2835
|
-
dir,
|
|
2836
|
-
"--scratch-path",
|
|
2837
|
-
import_node_path4.default.join(dir, ".build"),
|
|
2838
|
-
"resolve"
|
|
2839
|
-
],
|
|
2840
|
-
{
|
|
2841
|
-
encoding: "utf8",
|
|
2842
|
-
env: { ...swiftEnvironment(), GIT_TERMINAL_PROMPT: "0" },
|
|
2843
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
2844
|
-
maxBuffer: 32 * 1024 * 1024
|
|
2845
|
-
}
|
|
2846
|
-
);
|
|
2847
|
-
} catch (error) {
|
|
2848
|
-
throw new Error(
|
|
2849
|
-
`swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
|
|
2850
|
-
{ cause: error }
|
|
2851
|
-
);
|
|
2852
|
-
}
|
|
2853
|
-
const resolved = import_node_path4.default.join(dir, "Package.resolved");
|
|
2854
|
-
if (!import_node_fs3.default.existsSync(resolved))
|
|
2855
|
-
throw new Error("swift package resolve wrote no Package.resolved");
|
|
2856
|
-
import_node_fs3.default.mkdirSync(import_node_path4.default.dirname(destination), { recursive: true });
|
|
2857
|
-
import_node_fs3.default.copyFileSync(resolved, destination);
|
|
2858
|
-
} finally {
|
|
2859
|
-
import_node_fs3.default.rmSync(dir, { recursive: true, force: true });
|
|
2860
|
-
}
|
|
2861
|
-
}
|
|
2958
|
+
var cacheDir2 = import_node_path7.default.join(cacheDir(), "swift-manifests");
|
|
2959
|
+
var execFileAsync = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
|
|
2862
2960
|
|
|
2863
2961
|
// src/xcode-json-project.ts
|
|
2864
2962
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2865
|
-
var
|
|
2963
|
+
var import_node_path8 = __toESM(require("node:path"), 1);
|
|
2866
2964
|
var import_json5 = __toESM(require_lib(), 1);
|
|
2867
2965
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2868
2966
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -2920,7 +3018,7 @@ var PHASE_ISA = {
|
|
|
2920
3018
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
2921
3019
|
const json = import_json5.default.parse(source);
|
|
2922
3020
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
2923
|
-
const projectDir =
|
|
3021
|
+
const projectDir = import_node_path8.default.dirname(xcodeproj);
|
|
2924
3022
|
const objects = {};
|
|
2925
3023
|
let next = 0;
|
|
2926
3024
|
const add = (entry, id) => {
|
|
@@ -2933,7 +3031,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2933
3031
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
2934
3032
|
if (base) {
|
|
2935
3033
|
if (base[1] === "PROJECT")
|
|
2936
|
-
return { sourceTree: "<absolute>", path:
|
|
3034
|
+
return { sourceTree: "<absolute>", path: import_node_path8.default.join(projectDir, base[2]) };
|
|
2937
3035
|
if (base[1] === "PRODUCTS")
|
|
2938
3036
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
2939
3037
|
return null;
|
|
@@ -2941,7 +3039,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2941
3039
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
2942
3040
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
2943
3041
|
if (unescaped.startsWith("~")) return null;
|
|
2944
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
3042
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path8.default.join(groupDir, unescaped) };
|
|
2945
3043
|
};
|
|
2946
3044
|
const memberships = [];
|
|
2947
3045
|
const folders = [];
|
|
@@ -2952,8 +3050,8 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2952
3050
|
const kind = text(entry.kind) ?? "file-reference";
|
|
2953
3051
|
const raw = text(entry.path) ?? "";
|
|
2954
3052
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
2955
|
-
const
|
|
2956
|
-
const node = { id: "", name, dir: null, parent, children: [] };
|
|
3053
|
+
const name2 = text(entry.name) ?? import_node_path8.default.basename(raw);
|
|
3054
|
+
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
2957
3055
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
2958
3056
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
2959
3057
|
const childIds = walk(items(entry.children), node);
|
|
@@ -2966,7 +3064,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2966
3064
|
isa: kind === "variant-group" ? "PBXVariantGroup" : "PBXGroup",
|
|
2967
3065
|
children: childIds,
|
|
2968
3066
|
...kind === "variant-group" ? {} : { sourceTree: "<absolute>", path: node.dir ?? "" },
|
|
2969
|
-
name
|
|
3067
|
+
name: name2
|
|
2970
3068
|
},
|
|
2971
3069
|
text(entry.id)
|
|
2972
3070
|
);
|
|
@@ -2984,7 +3082,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
2984
3082
|
{
|
|
2985
3083
|
isa: "PBXFileReference",
|
|
2986
3084
|
...located ?? { sourceTree: "SDKROOT", path: raw },
|
|
2987
|
-
name
|
|
3085
|
+
name: name2
|
|
2988
3086
|
},
|
|
2989
3087
|
text(entry.id)
|
|
2990
3088
|
);
|
|
@@ -3036,8 +3134,8 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3036
3134
|
return node;
|
|
3037
3135
|
};
|
|
3038
3136
|
const configurations = items(json.configurations).flatMap((entry) => {
|
|
3039
|
-
const
|
|
3040
|
-
return
|
|
3137
|
+
const name2 = isObject(entry) ? text(entry.name) : text(entry);
|
|
3138
|
+
return name2 ? [{ name: name2, file: isObject(entry) ? entry.file : void 0 }] : [];
|
|
3041
3139
|
});
|
|
3042
3140
|
const settingsOf = (value) => Object.fromEntries(
|
|
3043
3141
|
Object.entries(isObject(value) ? value : {}).flatMap(
|
|
@@ -3052,14 +3150,14 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3052
3150
|
const configurationList = (settings, specialized) => add({
|
|
3053
3151
|
isa: "XCConfigurationList",
|
|
3054
3152
|
defaultConfigurationName: text(json["default-configuration"]) ?? "Debug",
|
|
3055
|
-
buildConfigurations: configurations.map(({ name, file }) => {
|
|
3056
|
-
const reference = specialized.has(
|
|
3153
|
+
buildConfigurations: configurations.map(({ name: name2, file }) => {
|
|
3154
|
+
const reference = specialized.has(name2) ? specialized.get(name2) : file;
|
|
3057
3155
|
const base = lookup(reference);
|
|
3058
3156
|
const anchor = isObject(reference) ? lookupNode(reference.anchor, root)?.id : null;
|
|
3059
3157
|
const relative = isObject(reference) ? text(reference["relative-path"]) : null;
|
|
3060
3158
|
return add({
|
|
3061
3159
|
isa: "XCBuildConfiguration",
|
|
3062
|
-
name,
|
|
3160
|
+
name: name2,
|
|
3063
3161
|
buildSettings: settings,
|
|
3064
3162
|
...base ? { baseConfigurationReference: base } : anchor && relative ? {
|
|
3065
3163
|
baseConfigurationReferenceAnchor: anchor,
|
|
@@ -3073,13 +3171,13 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3073
3171
|
if (!isObject(entry)) continue;
|
|
3074
3172
|
const repository = text(entry.repository);
|
|
3075
3173
|
const local = text(entry.path);
|
|
3076
|
-
const
|
|
3174
|
+
const name2 = local !== void 0 ? import_node_path8.default.basename(import_node_path8.default.resolve(import_node_path8.default.dirname(xcodeproj), local)) : import_node_path8.default.basename(repository ?? "").replace(/\.git$/, "");
|
|
3077
3175
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
3078
3176
|
isa: "XCRemoteSwiftPackageReference",
|
|
3079
3177
|
repositoryURL: repository ?? "",
|
|
3080
3178
|
...remoteVersionRequirement(entry)
|
|
3081
3179
|
});
|
|
3082
|
-
packageIds.set(
|
|
3180
|
+
packageIds.set(name2.toLowerCase(), id);
|
|
3083
3181
|
}
|
|
3084
3182
|
const productDependency = (entry) => add({
|
|
3085
3183
|
isa: "XCSwiftPackageProductDependency",
|
|
@@ -3099,12 +3197,12 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3099
3197
|
const targets = [];
|
|
3100
3198
|
for (const entry of items(json.targets)) {
|
|
3101
3199
|
if (!isObject(entry)) continue;
|
|
3102
|
-
const
|
|
3200
|
+
const name2 = text(entry.name) ?? "";
|
|
3103
3201
|
const productType = text(entry["product-type"]);
|
|
3104
3202
|
const target = {
|
|
3105
3203
|
isa: text(entry.kind) === "aggregate" ? "PBXAggregateTarget" : "PBXNativeTarget",
|
|
3106
|
-
name,
|
|
3107
|
-
productName:
|
|
3204
|
+
name: name2,
|
|
3205
|
+
productName: name2,
|
|
3108
3206
|
productType: productType ? `com.apple.product-type.${productType}` : text(entry["full-product-type"]) ?? "",
|
|
3109
3207
|
buildPhases: [],
|
|
3110
3208
|
dependencies: [],
|
|
@@ -3114,7 +3212,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3114
3212
|
const product = lookup(entry.product);
|
|
3115
3213
|
if (product) target.productReference = product;
|
|
3116
3214
|
const id = add(target, text(entry.id));
|
|
3117
|
-
targetIds.set(
|
|
3215
|
+
targetIds.set(name2, id);
|
|
3118
3216
|
targets.push({ id, target, entry });
|
|
3119
3217
|
for (const phase of items(entry["build-phases"])) {
|
|
3120
3218
|
const kind = isObject(phase) ? text(phase.kind) : text(phase);
|
|
@@ -3126,7 +3224,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3126
3224
|
isObject(phase) ? text(phase.id) : void 0
|
|
3127
3225
|
);
|
|
3128
3226
|
target.buildPhases.push(phaseId);
|
|
3129
|
-
phases.set([
|
|
3227
|
+
phases.set([name2, kind, phaseName].filter(Boolean).join("/"), phaseId);
|
|
3130
3228
|
phases.set(`id:${phaseId}`, phaseId);
|
|
3131
3229
|
}
|
|
3132
3230
|
}
|
|
@@ -3142,7 +3240,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3142
3240
|
files?.push(add({ isa: "PBXBuildFile", fileRef: refId }));
|
|
3143
3241
|
}
|
|
3144
3242
|
for (const { target, entry } of targets) {
|
|
3145
|
-
const
|
|
3243
|
+
const name2 = text(entry.name) ?? "";
|
|
3146
3244
|
target.buildConfigurationList = configurationList(
|
|
3147
3245
|
settingsOf(entry["build-settings"]),
|
|
3148
3246
|
new Map(
|
|
@@ -3180,7 +3278,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3180
3278
|
const dependency = productDependency(member);
|
|
3181
3279
|
target.packageProductDependencies.push(dependency);
|
|
3182
3280
|
const buildFile = member["build-phase"];
|
|
3183
|
-
phaseFiles(isObject(buildFile) ? buildFile["build-phase"] : buildFile,
|
|
3281
|
+
phaseFiles(isObject(buildFile) ? buildFile["build-phase"] : buildFile, name2)?.push(
|
|
3184
3282
|
add({ isa: "PBXBuildFile", productRef: dependency })
|
|
3185
3283
|
);
|
|
3186
3284
|
}
|
|
@@ -3248,6 +3346,7 @@ function isJsonObject(value) {
|
|
|
3248
3346
|
|
|
3249
3347
|
// src/xcode-project.ts
|
|
3250
3348
|
var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
|
|
3349
|
+
var runScriptTimeoutMs = 10 * 60 * 1e3;
|
|
3251
3350
|
var CXX_STANDARD_ALIASES = {
|
|
3252
3351
|
"c++0x": "c++11",
|
|
3253
3352
|
"gnu++0x": "gnu++11"
|
|
@@ -3282,28 +3381,28 @@ var CONDITIONS = {
|
|
|
3282
3381
|
variant: "normal"
|
|
3283
3382
|
};
|
|
3284
3383
|
function walkFiles(dir) {
|
|
3285
|
-
if (!
|
|
3384
|
+
if (!import_node_fs5.default.existsSync(dir)) return [];
|
|
3286
3385
|
const out = [];
|
|
3287
|
-
for (const entry of
|
|
3386
|
+
for (const entry of import_node_fs5.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
3288
3387
|
if (entry.name.startsWith(".")) continue;
|
|
3289
|
-
const full =
|
|
3388
|
+
const full = import_node_path9.default.join(dir, entry.name);
|
|
3290
3389
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
3291
3390
|
else if (entry.isFile()) out.push(full);
|
|
3292
3391
|
}
|
|
3293
3392
|
return out;
|
|
3294
3393
|
}
|
|
3295
|
-
var isDirectory = (dir) =>
|
|
3394
|
+
var isDirectory = (dir) => import_node_fs5.default.existsSync(dir) && import_node_fs5.default.statSync(dir).isDirectory();
|
|
3296
3395
|
function readXcconfig(file, read) {
|
|
3297
|
-
if (read.includes(file) || !
|
|
3396
|
+
if (read.includes(file) || !import_node_fs5.default.existsSync(file)) return {};
|
|
3298
3397
|
read.push(file);
|
|
3299
3398
|
const settings = {};
|
|
3300
|
-
for (const raw of
|
|
3399
|
+
for (const raw of import_node_fs5.default.readFileSync(file, "utf8").split("\n")) {
|
|
3301
3400
|
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
3302
3401
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
3303
3402
|
if (include) {
|
|
3304
3403
|
Object.assign(
|
|
3305
3404
|
settings,
|
|
3306
|
-
readXcconfig(
|
|
3405
|
+
readXcconfig(import_node_path9.default.resolve(import_node_path9.default.dirname(file), include[1]), read)
|
|
3307
3406
|
);
|
|
3308
3407
|
continue;
|
|
3309
3408
|
}
|
|
@@ -3323,8 +3422,8 @@ function applyConditions(raw, configuration) {
|
|
|
3323
3422
|
continue;
|
|
3324
3423
|
}
|
|
3325
3424
|
const matches = [...key.slice(bracket).matchAll(/\[([^=\]]+)=([^\]]*)\]/g)].every(
|
|
3326
|
-
([,
|
|
3327
|
-
const actual =
|
|
3425
|
+
([, name2, pattern]) => {
|
|
3426
|
+
const actual = name2 === "config" ? configuration : CONDITIONS[name2];
|
|
3328
3427
|
return actual !== void 0 && new RegExp(
|
|
3329
3428
|
`^${pattern.replace(/[.+^${}()|\\]/g, "\\$&").replaceAll("*", ".*").replaceAll("?", ".")}$`
|
|
3330
3429
|
).test(actual);
|
|
@@ -3353,22 +3452,22 @@ function decodeXml(text2) {
|
|
|
3353
3452
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
3354
3453
|
}
|
|
3355
3454
|
function workspaceReferences(workspace) {
|
|
3356
|
-
const data =
|
|
3357
|
-
if (!
|
|
3455
|
+
const data = import_node_path9.default.join(workspace, "contents.xcworkspacedata");
|
|
3456
|
+
if (!import_node_fs5.default.existsSync(data))
|
|
3358
3457
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
3359
|
-
const container =
|
|
3458
|
+
const container = import_node_path9.default.dirname(workspace);
|
|
3360
3459
|
const locate = (location, base) => {
|
|
3361
3460
|
const colon = location.indexOf(":");
|
|
3362
3461
|
const kind = location.slice(0, colon);
|
|
3363
3462
|
const rest = location.slice(colon + 1);
|
|
3364
|
-
if (kind === "group") return
|
|
3365
|
-
if (kind === "container" || kind === "self") return
|
|
3366
|
-
if (kind === "absolute") return
|
|
3367
|
-
throw new Error(`${
|
|
3463
|
+
if (kind === "group") return import_node_path9.default.resolve(base, rest);
|
|
3464
|
+
if (kind === "container" || kind === "self") return import_node_path9.default.resolve(container, rest);
|
|
3465
|
+
if (kind === "absolute") return import_node_path9.default.resolve(rest);
|
|
3466
|
+
throw new Error(`${import_node_path9.default.basename(workspace)} has an unsupported location ${location}`);
|
|
3368
3467
|
};
|
|
3369
3468
|
const groups = [container];
|
|
3370
3469
|
const references = [];
|
|
3371
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
3470
|
+
for (const [, closing, tag, attributes, selfClosing] of import_node_fs5.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
3372
3471
|
if (closing) {
|
|
3373
3472
|
if (tag === "Group") groups.pop();
|
|
3374
3473
|
continue;
|
|
@@ -3418,9 +3517,9 @@ function remotePackageRequirements(projects) {
|
|
|
3418
3517
|
}
|
|
3419
3518
|
var loaded = /* @__PURE__ */ new Map();
|
|
3420
3519
|
function xcodeProjectFile(xcodeproj) {
|
|
3421
|
-
for (const
|
|
3422
|
-
const file =
|
|
3423
|
-
if (
|
|
3520
|
+
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
3521
|
+
const file = import_node_path9.default.join(xcodeproj, name2);
|
|
3522
|
+
if (import_node_fs5.default.existsSync(file)) return file;
|
|
3424
3523
|
}
|
|
3425
3524
|
return null;
|
|
3426
3525
|
}
|
|
@@ -3428,8 +3527,8 @@ function loadProject(xcodeproj) {
|
|
|
3428
3527
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
3429
3528
|
if (!projectFile)
|
|
3430
3529
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
3431
|
-
const source =
|
|
3432
|
-
const digest = (0,
|
|
3530
|
+
const source = import_node_fs5.default.readFileSync(projectFile, "utf8");
|
|
3531
|
+
const digest = (0, import_node_crypto4.createHash)("sha256").update(source).digest("hex");
|
|
3433
3532
|
const cached = loaded.get(projectFile);
|
|
3434
3533
|
if (cached?.digest === digest) return cached.project;
|
|
3435
3534
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -3445,10 +3544,10 @@ function loadProject(xcodeproj) {
|
|
|
3445
3544
|
if (!project || project.isa !== "PBXProject") {
|
|
3446
3545
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
3447
3546
|
}
|
|
3448
|
-
const projectDir =
|
|
3449
|
-
|
|
3547
|
+
const projectDir = import_node_fs5.default.realpathSync(
|
|
3548
|
+
import_node_path9.default.resolve(import_node_path9.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
3450
3549
|
);
|
|
3451
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
3550
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path9.default.join);
|
|
3452
3551
|
const result = {
|
|
3453
3552
|
xcodeproj,
|
|
3454
3553
|
projectFile,
|
|
@@ -3456,7 +3555,8 @@ function loadProject(xcodeproj) {
|
|
|
3456
3555
|
project,
|
|
3457
3556
|
projectDir,
|
|
3458
3557
|
object,
|
|
3459
|
-
resolvePath
|
|
3558
|
+
resolvePath,
|
|
3559
|
+
visitMembers: xcodeTargetMemberVisitor(objects)
|
|
3460
3560
|
};
|
|
3461
3561
|
loaded.set(projectFile, { digest, project: result });
|
|
3462
3562
|
return result;
|
|
@@ -3476,14 +3576,14 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3476
3576
|
const configs = list(configList?.buildConfigurations).map(project.object);
|
|
3477
3577
|
const config = configs.find((entry) => entry?.name === configuration) ?? configs.find((entry) => entry?.name === str(configList?.defaultConfigurationName));
|
|
3478
3578
|
if (!config) return [];
|
|
3479
|
-
const
|
|
3579
|
+
const name2 = str(config.name) ?? configuration;
|
|
3480
3580
|
const base = str(config.baseConfigurationReference);
|
|
3481
3581
|
const anchor = str(config.baseConfigurationReferenceAnchor);
|
|
3482
3582
|
const relative = str(config.baseConfigurationReferenceRelativePath);
|
|
3483
3583
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
3484
3584
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
3485
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative ?
|
|
3486
|
-
if (options.requireSources !== false && (base || anchor || relative) && (!baseFile || !
|
|
3585
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative ? import_node_path9.default.resolve(directory, relative) : null;
|
|
3586
|
+
if (options.requireSources !== false && (base || anchor || relative) && (!baseFile || !import_node_fs5.default.existsSync(baseFile)))
|
|
3487
3587
|
throw new Error(
|
|
3488
3588
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative ?? anchor}'`
|
|
3489
3589
|
);
|
|
@@ -3491,14 +3591,14 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3491
3591
|
const fromFile = baseFile ? readXcconfig(baseFile, read) : {};
|
|
3492
3592
|
xcconfigs.push(...read);
|
|
3493
3593
|
return [
|
|
3494
|
-
applyConditions(fromFile,
|
|
3594
|
+
applyConditions(fromFile, name2),
|
|
3495
3595
|
applyConditions(
|
|
3496
3596
|
Object.fromEntries(
|
|
3497
3597
|
Object.entries(own).flatMap(
|
|
3498
3598
|
([key, value]) => typeof value === "string" ? [[key, value]] : Array.isArray(value) ? [[key, list(value).join(" ")]] : []
|
|
3499
3599
|
)
|
|
3500
3600
|
),
|
|
3501
|
-
|
|
3601
|
+
name2
|
|
3502
3602
|
)
|
|
3503
3603
|
];
|
|
3504
3604
|
};
|
|
@@ -3519,12 +3619,20 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3519
3619
|
resolving.add(marker);
|
|
3520
3620
|
const value = expand(
|
|
3521
3621
|
levels[at][key],
|
|
3522
|
-
(
|
|
3622
|
+
(name2) => name2 === "inherited" || name2 === key ? valueAt(key, at - 1) : valueAt(name2, levels.length - 1)
|
|
3523
3623
|
);
|
|
3524
3624
|
resolving.delete(marker);
|
|
3525
3625
|
return value;
|
|
3526
3626
|
};
|
|
3627
|
+
let developerDir;
|
|
3527
3628
|
const derivedSettings = {
|
|
3629
|
+
DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? (developerDir ??= process.platform === "darwin" ? (
|
|
3630
|
+
// runner-toolchain-platform: darwin
|
|
3631
|
+
(0, import_node_child_process3.execFileSync)("xcode-select", ["-p"], {
|
|
3632
|
+
encoding: "utf8",
|
|
3633
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
3634
|
+
}).trim()
|
|
3635
|
+
) : ""),
|
|
3528
3636
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
3529
3637
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
3530
3638
|
EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
|
|
@@ -3562,26 +3670,26 @@ function settingList(value) {
|
|
|
3562
3670
|
return items2;
|
|
3563
3671
|
}
|
|
3564
3672
|
function expandSearchPath(directory, rules2) {
|
|
3565
|
-
if (
|
|
3673
|
+
if (import_node_path9.default.basename(directory) !== "**") return [directory];
|
|
3566
3674
|
const expanded = [];
|
|
3567
3675
|
const seen = /* @__PURE__ */ new Set();
|
|
3568
|
-
const queue = [
|
|
3676
|
+
const queue = [import_node_path9.default.dirname(directory)];
|
|
3569
3677
|
for (let at = 0; at < queue.length; at++) {
|
|
3570
3678
|
const current = queue[at];
|
|
3571
3679
|
let real;
|
|
3572
3680
|
try {
|
|
3573
|
-
real =
|
|
3681
|
+
real = import_node_fs5.default.realpathSync(current);
|
|
3574
3682
|
} catch {
|
|
3575
3683
|
continue;
|
|
3576
3684
|
}
|
|
3577
|
-
if (!
|
|
3685
|
+
if (!import_node_fs5.default.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
3578
3686
|
seen.add(real);
|
|
3579
3687
|
expanded.push(current);
|
|
3580
|
-
for (const entry of
|
|
3688
|
+
for (const entry of import_node_fs5.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
3581
3689
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
3582
3690
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
3583
3691
|
continue;
|
|
3584
|
-
queue.push(
|
|
3692
|
+
queue.push(import_node_path9.default.join(current, entry.name));
|
|
3585
3693
|
}
|
|
3586
3694
|
}
|
|
3587
3695
|
return expanded;
|
|
@@ -3616,19 +3724,53 @@ function expand(value, lookup) {
|
|
|
3616
3724
|
return value.replace(
|
|
3617
3725
|
/\$(?:\(([A-Za-z_][A-Za-z0-9_]*)((?::[^)]*)?)\)|\{([A-Za-z_][A-Za-z0-9_]*)((?::[^}]*)?)\}|([A-Za-z_][A-Za-z0-9_]*))/g,
|
|
3618
3726
|
(_match, paren, parenOps, brace, braceOps, bare) => {
|
|
3619
|
-
const
|
|
3727
|
+
const name2 = paren ?? brace ?? bare;
|
|
3620
3728
|
const operators = parenOps ?? braceOps ?? "";
|
|
3621
|
-
return operators.split(":").slice(1).reduce((current, operator) => applyOperator(current, operator), lookup(
|
|
3729
|
+
return operators.split(":").slice(1).reduce((current, operator) => applyOperator(current, operator), lookup(name2));
|
|
3622
3730
|
}
|
|
3623
3731
|
);
|
|
3624
3732
|
}
|
|
3625
3733
|
var preparedSourcePhases = /* @__PURE__ */ new Map();
|
|
3734
|
+
function shellAssetCatalogs(script, settings, projectDir) {
|
|
3735
|
+
const assigned = /* @__PURE__ */ new Map();
|
|
3736
|
+
const catalogs = [];
|
|
3737
|
+
const resolve = (raw) => {
|
|
3738
|
+
if (raw.startsWith("'")) return raw.slice(1, -1);
|
|
3739
|
+
const lookup = (key) => assigned.get(key) ?? settings(key);
|
|
3740
|
+
const shell = (raw.startsWith('"') ? raw.slice(1, -1) : raw).replace(
|
|
3741
|
+
/\$\{([A-Za-z_][A-Za-z0-9_]*):-([^{}`]*)\}/g,
|
|
3742
|
+
(_match, key, fallback) => lookup(key) || fallback
|
|
3743
|
+
);
|
|
3744
|
+
if (/\$\{[A-Za-z_][A-Za-z0-9_]*(?::?[-+=?]|[#%/^,])/.test(shell)) return null;
|
|
3745
|
+
const value = expand(shell, lookup);
|
|
3746
|
+
return /[$`]/.test(value) ? null : value;
|
|
3747
|
+
};
|
|
3748
|
+
for (const raw of script.split(/\r?\n/)) {
|
|
3749
|
+
const line = raw.trim();
|
|
3750
|
+
const assignment = /^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=("[^"`]*"|'[^']*'|[^\s;`]+)$/.exec(line);
|
|
3751
|
+
if (assignment) {
|
|
3752
|
+
const value = resolve(assignment[2]);
|
|
3753
|
+
if (value !== null) assigned.set(assignment[1], value);
|
|
3754
|
+
else assigned.delete(assignment[1]);
|
|
3755
|
+
continue;
|
|
3756
|
+
}
|
|
3757
|
+
const compile = /^(?:xcrun\s+)?actool\s+(.*)$/.exec(line);
|
|
3758
|
+
if (!compile) continue;
|
|
3759
|
+
const tokens = compile[1].match(/"[^"`]*"|'[^']*'|[^\s;`]+/g) ?? [];
|
|
3760
|
+
for (const token of tokens) {
|
|
3761
|
+
if (token.startsWith("-")) break;
|
|
3762
|
+
const file = resolve(token);
|
|
3763
|
+
if (file?.endsWith(".xcassets")) catalogs.push(import_node_path9.default.resolve(projectDir, file));
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
return catalogs;
|
|
3767
|
+
}
|
|
3626
3768
|
function shellCopies(script, settings, projectDir) {
|
|
3627
3769
|
const assigned = /* @__PURE__ */ new Map();
|
|
3628
3770
|
const copies = [];
|
|
3629
3771
|
let resolved = true;
|
|
3630
|
-
const lookup = (
|
|
3631
|
-
const value = assigned.get(
|
|
3772
|
+
const lookup = (name2) => {
|
|
3773
|
+
const value = assigned.get(name2) ?? settings(name2);
|
|
3632
3774
|
if (value === "") resolved = false;
|
|
3633
3775
|
return value;
|
|
3634
3776
|
};
|
|
@@ -3663,14 +3805,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
3663
3805
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
3664
3806
|
return [];
|
|
3665
3807
|
copies.push({
|
|
3666
|
-
from:
|
|
3667
|
-
to:
|
|
3808
|
+
from: import_node_path9.default.resolve(projectDir, operands[0]),
|
|
3809
|
+
to: import_node_path9.default.resolve(projectDir, operands[1])
|
|
3668
3810
|
});
|
|
3669
3811
|
}
|
|
3670
3812
|
return copies;
|
|
3671
3813
|
}
|
|
3672
3814
|
function fileListEntries(file, absolute) {
|
|
3673
|
-
return
|
|
3815
|
+
return import_node_fs5.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
3674
3816
|
}
|
|
3675
3817
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
3676
3818
|
const { project, target, id: targetId } = ref;
|
|
@@ -3683,16 +3825,22 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3683
3825
|
const copiedFiles = [];
|
|
3684
3826
|
let generatedInfoPlist = false;
|
|
3685
3827
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
3686
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
3828
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path9.default.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
3687
3829
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
3688
3830
|
for (const phaseId of list(target.buildPhases)) {
|
|
3689
3831
|
const phase = project.object(phaseId);
|
|
3690
3832
|
if (phase?.isa !== "PBXShellScriptBuildPhase") continue;
|
|
3691
3833
|
const script = str(phase.name) ?? phaseId;
|
|
3834
|
+
for (const catalog of shellAssetCatalogs(
|
|
3835
|
+
str(phase.shellScript) ?? "",
|
|
3836
|
+
settings,
|
|
3837
|
+
project.projectDir
|
|
3838
|
+
))
|
|
3839
|
+
for (const file of walkFiles(catalog)) resources.add(file);
|
|
3692
3840
|
copiedFiles.push(
|
|
3693
3841
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
3694
3842
|
);
|
|
3695
|
-
const absolute = (raw) =>
|
|
3843
|
+
const absolute = (raw) => import_node_path9.default.resolve(project.projectDir, expand(raw, settings));
|
|
3696
3844
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
3697
3845
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
3698
3846
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -3701,7 +3849,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3701
3849
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
3702
3850
|
).map((raw) => {
|
|
3703
3851
|
const file = absolute(raw);
|
|
3704
|
-
if (!
|
|
3852
|
+
if (!import_node_fs5.default.existsSync(file)) {
|
|
3705
3853
|
return { file, entries: [] };
|
|
3706
3854
|
}
|
|
3707
3855
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -3713,22 +3861,32 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3713
3861
|
...fileLists.get("OUTPUT").flatMap((item) => item.entries)
|
|
3714
3862
|
];
|
|
3715
3863
|
if (allOutputs.includes(infoPlistOutput)) generatedInfoPlist = true;
|
|
3716
|
-
for (const
|
|
3717
|
-
if (
|
|
3718
|
-
scriptForOutput.set(
|
|
3864
|
+
for (const output2 of allOutputs)
|
|
3865
|
+
if (output2.endsWith(".swift") && !scriptForOutput.has(output2))
|
|
3866
|
+
scriptForOutput.set(output2, script);
|
|
3719
3867
|
const inputFiles = [
|
|
3720
3868
|
...inputs,
|
|
3721
3869
|
...fileLists.get("INPUT").flatMap((item) => [item.file, ...item.entries]),
|
|
3722
3870
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
3723
3871
|
];
|
|
3724
3872
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
3725
|
-
for (const file of inputFiles) if (
|
|
3873
|
+
for (const file of inputFiles) if (import_node_fs5.default.existsSync(file)) projectInputs.add(file);
|
|
3726
3874
|
}
|
|
3727
3875
|
if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
3728
|
-
const
|
|
3876
|
+
const configuration = settings("CONFIGURATION");
|
|
3877
|
+
if (preparedXcodePhase(
|
|
3878
|
+
project.projectFile,
|
|
3879
|
+
targetId,
|
|
3880
|
+
phaseId,
|
|
3881
|
+
configuration,
|
|
3882
|
+
allOutputs,
|
|
3883
|
+
false
|
|
3884
|
+
))
|
|
3885
|
+
continue;
|
|
3886
|
+
const phaseDir = import_node_path9.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
3729
3887
|
for (const lists of fileLists.values())
|
|
3730
3888
|
for (const { file } of lists)
|
|
3731
|
-
if (!
|
|
3889
|
+
if (!import_node_fs5.default.existsSync(file))
|
|
3732
3890
|
throw new Error(
|
|
3733
3891
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
3734
3892
|
);
|
|
@@ -3747,74 +3905,91 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3747
3905
|
const lists = fileLists.get(kind);
|
|
3748
3906
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
3749
3907
|
lists.forEach((_item, index) => {
|
|
3750
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
3908
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path9.default.join(
|
|
3751
3909
|
phaseDir,
|
|
3752
3910
|
`${kind}-${index}.xcfilelist`
|
|
3753
3911
|
);
|
|
3754
3912
|
});
|
|
3755
3913
|
}
|
|
3756
|
-
const signature = (0,
|
|
3914
|
+
const signature = (0, import_node_crypto4.createHash)("sha256").update(
|
|
3757
3915
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
3758
3916
|
);
|
|
3759
3917
|
for (const file of inputFiles) {
|
|
3760
3918
|
signature.update(file);
|
|
3761
|
-
if (
|
|
3762
|
-
const stat =
|
|
3919
|
+
if (import_node_fs5.default.existsSync(file)) {
|
|
3920
|
+
const stat = import_node_fs5.default.statSync(file);
|
|
3763
3921
|
signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
|
|
3764
3922
|
} else signature.update("missing");
|
|
3765
3923
|
}
|
|
3766
3924
|
const stamp = signature.digest("hex");
|
|
3767
3925
|
const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
3768
|
-
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) =>
|
|
3926
|
+
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs5.default.existsSync(file))) {
|
|
3927
|
+
preparedXcodePhase(
|
|
3928
|
+
project.projectFile,
|
|
3929
|
+
targetId,
|
|
3930
|
+
phaseId,
|
|
3931
|
+
configuration,
|
|
3932
|
+
allOutputs,
|
|
3933
|
+
true
|
|
3934
|
+
);
|
|
3769
3935
|
continue;
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3936
|
+
}
|
|
3937
|
+
import_node_fs5.default.mkdirSync(phaseDir, { recursive: true });
|
|
3938
|
+
import_node_fs5.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
3939
|
+
import_node_fs5.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
3940
|
+
for (const output2 of allOutputs)
|
|
3941
|
+
import_node_fs5.default.mkdirSync(import_node_path9.default.dirname(output2), { recursive: true });
|
|
3775
3942
|
for (const [kind, lists] of fileLists)
|
|
3776
3943
|
lists.forEach((item, index) => {
|
|
3777
|
-
|
|
3944
|
+
import_node_fs5.default.writeFileSync(
|
|
3778
3945
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
3779
3946
|
`${item.entries.join("\n")}
|
|
3780
3947
|
`
|
|
3781
3948
|
);
|
|
3782
3949
|
});
|
|
3783
3950
|
try {
|
|
3784
|
-
(0,
|
|
3951
|
+
(0, import_node_child_process3.execFileSync)(
|
|
3785
3952
|
str(phase.shellPath) ?? "/bin/sh",
|
|
3786
3953
|
["-c", str(phase.shellScript) ?? ""],
|
|
3787
3954
|
{
|
|
3788
3955
|
cwd: project.projectDir,
|
|
3789
3956
|
env,
|
|
3790
3957
|
stdio: ["ignore", "pipe", "pipe"],
|
|
3791
|
-
maxBuffer: Infinity
|
|
3958
|
+
maxBuffer: Infinity,
|
|
3959
|
+
timeout: runScriptTimeoutMs
|
|
3792
3960
|
}
|
|
3793
3961
|
);
|
|
3794
3962
|
} catch (error) {
|
|
3795
|
-
const
|
|
3963
|
+
const output2 = error instanceof Error ? `${error.message}
|
|
3796
3964
|
${"stdout" in error ? String(error.stdout) : ""}${"stderr" in error ? String(error.stderr) : ""}` : String(error);
|
|
3797
3965
|
throw new Error(
|
|
3798
3966
|
`${targetName}: Run Script "${script}" failed preparing generated outputs:
|
|
3799
|
-
${
|
|
3967
|
+
${output2}`
|
|
3800
3968
|
);
|
|
3801
3969
|
}
|
|
3802
3970
|
const missing = allOutputs.filter(
|
|
3803
|
-
(file) => file === infoPlistOutput && !
|
|
3971
|
+
(file) => file === infoPlistOutput && !import_node_fs5.default.existsSync(file)
|
|
3804
3972
|
);
|
|
3805
3973
|
if (missing.length > 0)
|
|
3806
3974
|
throw new Error(
|
|
3807
3975
|
`${targetName}: Run Script "${script}" did not produce ${missing.join(", ")}`
|
|
3808
3976
|
);
|
|
3809
3977
|
preparedSourcePhases.set(key, stamp);
|
|
3978
|
+
preparedXcodePhase(
|
|
3979
|
+
project.projectFile,
|
|
3980
|
+
targetId,
|
|
3981
|
+
phaseId,
|
|
3982
|
+
configuration,
|
|
3983
|
+
allOutputs,
|
|
3984
|
+
true
|
|
3985
|
+
);
|
|
3810
3986
|
}
|
|
3811
3987
|
}
|
|
3812
|
-
|
|
3813
|
-
project.objects,
|
|
3988
|
+
project.visitMembers(
|
|
3814
3989
|
targetId,
|
|
3815
3990
|
project.resolvePath,
|
|
3816
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
3817
|
-
|
|
3991
|
+
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs5.default.existsSync(file) ? [file] : [],
|
|
3992
|
+
import_node_path9.default.join,
|
|
3818
3993
|
(file, kind) => {
|
|
3819
3994
|
if (kind === "header") {
|
|
3820
3995
|
headers.add(file);
|
|
@@ -3824,9 +3999,9 @@ ${output}`
|
|
|
3824
3999
|
resources.add(file);
|
|
3825
4000
|
return;
|
|
3826
4001
|
}
|
|
3827
|
-
if (!
|
|
4002
|
+
if (!import_node_fs5.default.existsSync(file)) {
|
|
3828
4003
|
if (options.requireSources === false) return;
|
|
3829
|
-
const script = scriptForOutput.get(
|
|
4004
|
+
const script = scriptForOutput.get(import_node_path9.default.normalize(file));
|
|
3830
4005
|
throw new Error(
|
|
3831
4006
|
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}`
|
|
3832
4007
|
);
|
|
@@ -3835,14 +4010,6 @@ ${output}`
|
|
|
3835
4010
|
if (file.endsWith(".swift")) sources.add(file);
|
|
3836
4011
|
}
|
|
3837
4012
|
);
|
|
3838
|
-
for (const [file] of scriptForOutput) {
|
|
3839
|
-
if (sources.has(file) || allSources.has(file)) continue;
|
|
3840
|
-
if (!import_node_fs4.default.existsSync(file)) continue;
|
|
3841
|
-
const canonical = import_node_fs4.default.realpathSync(file);
|
|
3842
|
-
if (sources.has(canonical) || allSources.has(canonical)) continue;
|
|
3843
|
-
allSources.add(canonical);
|
|
3844
|
-
sources.add(canonical);
|
|
3845
|
-
}
|
|
3846
4013
|
return {
|
|
3847
4014
|
sources: [...sources].sort(),
|
|
3848
4015
|
resources: [...resources].sort(),
|
|
@@ -3855,37 +4022,37 @@ ${output}`
|
|
|
3855
4022
|
function commonAncestor(dirs) {
|
|
3856
4023
|
let common = dirs[0];
|
|
3857
4024
|
for (const dir of dirs) {
|
|
3858
|
-
while (common !==
|
|
3859
|
-
common =
|
|
4025
|
+
while (common !== import_node_path9.default.dirname(common) && import_node_path9.default.relative(common, dir).startsWith(".."))
|
|
4026
|
+
common = import_node_path9.default.dirname(common);
|
|
3860
4027
|
}
|
|
3861
4028
|
return common;
|
|
3862
4029
|
}
|
|
3863
|
-
var isPodsProject = (xcodeproj) =>
|
|
4030
|
+
var isPodsProject = (xcodeproj) => import_node_path9.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path9.default.basename(import_node_path9.default.dirname(xcodeproj)) === "Pods";
|
|
3864
4031
|
function installedPodsSandbox(pods) {
|
|
3865
|
-
const podfileLock =
|
|
3866
|
-
const manifestLock =
|
|
3867
|
-
if (!
|
|
4032
|
+
const podfileLock = import_node_path9.default.join(import_node_path9.default.dirname(pods), "Podfile.lock");
|
|
4033
|
+
const manifestLock = import_node_path9.default.join(pods, "Manifest.lock");
|
|
4034
|
+
if (!import_node_fs5.default.existsSync(podfileLock))
|
|
3868
4035
|
throw new Error(
|
|
3869
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
4036
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path9.default.dirname(pods)}`
|
|
3870
4037
|
);
|
|
3871
|
-
if (!
|
|
4038
|
+
if (!import_node_fs5.default.existsSync(manifestLock) || !import_node_fs5.default.readFileSync(manifestLock).equals(import_node_fs5.default.readFileSync(podfileLock)))
|
|
3872
4039
|
throw new Error(
|
|
3873
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
4040
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path9.default.dirname(pods)}`
|
|
3874
4041
|
);
|
|
3875
4042
|
const specChecksums = {};
|
|
3876
|
-
const lines =
|
|
4043
|
+
const lines = import_node_fs5.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
3877
4044
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
3878
4045
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
3879
4046
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
3880
4047
|
if (!entry) break;
|
|
3881
4048
|
specChecksums[entry[1]] = entry[2];
|
|
3882
4049
|
}
|
|
3883
|
-
const specs =
|
|
4050
|
+
const specs = import_node_path9.default.join(pods, "Local Podspecs");
|
|
3884
4051
|
return {
|
|
3885
4052
|
podfileLock,
|
|
3886
4053
|
manifestLock,
|
|
3887
4054
|
specChecksums,
|
|
3888
|
-
localPodspecs: isDirectory(specs) ?
|
|
4055
|
+
localPodspecs: isDirectory(specs) ? import_node_fs5.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path9.default.join(specs, name2)) : []
|
|
3889
4056
|
};
|
|
3890
4057
|
}
|
|
3891
4058
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -3897,14 +4064,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
3897
4064
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
3898
4065
|
if (installedPods && isPodsProject(xcodeproj))
|
|
3899
4066
|
throw new Error(
|
|
3900
|
-
`${
|
|
4067
|
+
`${import_node_path9.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path9.default.dirname(import_node_path9.default.dirname(xcodeproj))}`
|
|
3901
4068
|
);
|
|
3902
4069
|
return;
|
|
3903
4070
|
}
|
|
3904
|
-
const key =
|
|
3905
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
4071
|
+
const key = import_node_fs5.default.realpathSync(xcodeproj);
|
|
4072
|
+
if (projectAt.has(key) || !installedPods && key.split(import_node_path9.default.sep).includes("Pods"))
|
|
3906
4073
|
return;
|
|
3907
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
4074
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path9.default.dirname(key));
|
|
3908
4075
|
const project = loadProject(key);
|
|
3909
4076
|
projectAt.set(key, project);
|
|
3910
4077
|
projects.push(project);
|
|
@@ -3920,12 +4087,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
3920
4087
|
for (const reference of listed)
|
|
3921
4088
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
3922
4089
|
if (projects.length === 0) {
|
|
3923
|
-
throw new Error(`${
|
|
4090
|
+
throw new Error(`${import_node_path9.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
3924
4091
|
}
|
|
3925
|
-
const podfile =
|
|
3926
|
-
if (installedPods && !cocoapods &&
|
|
4092
|
+
const podfile = import_node_path9.default.join(import_node_path9.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
4093
|
+
if (installedPods && !cocoapods && import_node_fs5.default.existsSync(podfile))
|
|
3927
4094
|
throw new Error(
|
|
3928
|
-
`${podfile} is not installed into ${
|
|
4095
|
+
`${podfile} is not installed into ${import_node_path9.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path9.default.dirname(podfile)} and open the workspace it writes`
|
|
3929
4096
|
);
|
|
3930
4097
|
return { listed, projects, projectAt, cocoapods };
|
|
3931
4098
|
}
|
|
@@ -3954,14 +4121,134 @@ function isIosAppTarget(ref, options = {}) {
|
|
|
3954
4121
|
const sdk = get("SDKROOT");
|
|
3955
4122
|
return sdk === "auto" ? settingList(get("SUPPORTED_PLATFORMS")).some(isIosPlatform) : sdk === "" || isIosPlatform(sdk);
|
|
3956
4123
|
}
|
|
3957
|
-
function isIosPlatform(
|
|
3958
|
-
return
|
|
4124
|
+
function isIosPlatform(name2) {
|
|
4125
|
+
return name2.startsWith("iphoneos") || name2.startsWith("iphonesimulator");
|
|
3959
4126
|
}
|
|
3960
4127
|
function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
3961
4128
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
|
|
3962
4129
|
}
|
|
4130
|
+
function defaultXcodeAppTarget(xcodeproj) {
|
|
4131
|
+
const project = loadProject(import_node_fs5.default.realpathSync(xcodeproj));
|
|
4132
|
+
for (const [id, target] of Object.entries(project.objects)) {
|
|
4133
|
+
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
4134
|
+
if (isIosAppTarget({ project, id, target }, { requireSources: false }))
|
|
4135
|
+
return str(target.name);
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4138
|
+
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
4139
|
+
const container = import_node_fs5.default.realpathSync(xcodeprojOrWorkspace);
|
|
4140
|
+
const { projects } = workspaceProjects(container);
|
|
4141
|
+
const containers = [
|
|
4142
|
+
.../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
|
|
4143
|
+
];
|
|
4144
|
+
const found = containers.flatMap(
|
|
4145
|
+
(dir) => [
|
|
4146
|
+
import_node_path9.default.join(dir, "xcshareddata"),
|
|
4147
|
+
...isDirectory(import_node_path9.default.join(dir, "xcuserdata")) ? import_node_fs5.default.readdirSync(import_node_path9.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path9.default.join(dir, "xcuserdata", user)) : []
|
|
4148
|
+
].map((data) => ({
|
|
4149
|
+
dir,
|
|
4150
|
+
file: import_node_path9.default.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
4151
|
+
}))
|
|
4152
|
+
).find((candidate) => import_node_fs5.default.existsSync(candidate.file));
|
|
4153
|
+
if (!found) {
|
|
4154
|
+
const known = containers.flatMap(
|
|
4155
|
+
(dir) => import_node_fs5.default.existsSync(import_node_path9.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs5.default.readdirSync(import_node_path9.default.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
|
|
4156
|
+
);
|
|
4157
|
+
throw new Error(
|
|
4158
|
+
`${import_node_path9.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
4159
|
+
);
|
|
4160
|
+
}
|
|
4161
|
+
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
4162
|
+
import_node_fs5.default.readFileSync(found.file, "utf8")
|
|
4163
|
+
);
|
|
4164
|
+
const attribute = (text2, name3) => {
|
|
4165
|
+
const value = new RegExp(`\\b${name3}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
|
|
4166
|
+
return value === void 0 ? void 0 : decodeXml(value);
|
|
4167
|
+
};
|
|
4168
|
+
const runnable = launch ? /<BuildableProductRunnable\b[\s\S]*?<BuildableReference\b([^>]*)>/.exec(launch[2]) : null;
|
|
4169
|
+
const configuration = launch ? attribute(launch[1], "buildConfiguration") : void 0;
|
|
4170
|
+
const blueprint = runnable ? attribute(runnable[1], "BlueprintIdentifier") : void 0;
|
|
4171
|
+
const referenced = runnable ? attribute(runnable[1], "ReferencedContainer") : void 0;
|
|
4172
|
+
if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
|
|
4173
|
+
throw new Error(`scheme ${scheme} runs no application target`);
|
|
4174
|
+
}
|
|
4175
|
+
const projectPath = import_node_path9.default.resolve(
|
|
4176
|
+
import_node_path9.default.dirname(found.dir),
|
|
4177
|
+
referenced.slice("container:".length)
|
|
4178
|
+
);
|
|
4179
|
+
const project = projects.find(
|
|
4180
|
+
(candidate) => import_node_fs5.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs5.default.realpathSync(projectPath)
|
|
4181
|
+
);
|
|
4182
|
+
const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
|
|
4183
|
+
const name2 = target && str(target.target.name);
|
|
4184
|
+
if (!name2) throw new Error(`scheme ${scheme} runs a target no project here declares`);
|
|
4185
|
+
return { target: name2, configuration };
|
|
4186
|
+
}
|
|
4187
|
+
var NativeAppTargetSelectionError = class extends Error {
|
|
4188
|
+
};
|
|
4189
|
+
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
4190
|
+
const nested = import_node_path9.default.join(projectRoot, "ios");
|
|
4191
|
+
const iosRoot = import_node_fs5.default.existsSync(nested) ? nested : projectRoot;
|
|
4192
|
+
const projects = import_node_fs5.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
4193
|
+
if (projects.length === 0) return null;
|
|
4194
|
+
if (projects.length > 1 && !iosTarget) {
|
|
4195
|
+
throw new NativeAppTargetSelectionError(
|
|
4196
|
+
`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(", ")}`
|
|
4197
|
+
);
|
|
4198
|
+
}
|
|
4199
|
+
let project = projects[0];
|
|
4200
|
+
if (iosTarget && projects.length > 1) {
|
|
4201
|
+
const matches = projects.filter(
|
|
4202
|
+
(entry) => listXcodeAppTargets(import_node_path9.default.join(iosRoot, entry.name), {
|
|
4203
|
+
requireSources: false
|
|
4204
|
+
}).includes(iosTarget)
|
|
4205
|
+
);
|
|
4206
|
+
if (matches.length === 0)
|
|
4207
|
+
throw new Error(`native app identity has no application target ${iosTarget}`);
|
|
4208
|
+
if (matches.length > 1)
|
|
4209
|
+
throw new Error(
|
|
4210
|
+
`native app identity target ${iosTarget} is ambiguous across ${matches.map((entry) => entry.name).join(", ")}`
|
|
4211
|
+
);
|
|
4212
|
+
project = matches[0];
|
|
4213
|
+
}
|
|
4214
|
+
const xcodeproj = import_node_path9.default.join(iosRoot, project.name);
|
|
4215
|
+
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
4216
|
+
let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
|
|
4217
|
+
if (!target) throw new Error("native app identity has no iOS application target");
|
|
4218
|
+
if (!iosTarget) {
|
|
4219
|
+
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
4220
|
+
const container = import_node_fs5.default.existsSync(workspace) ? workspace : xcodeproj;
|
|
4221
|
+
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
4222
|
+
if (import_node_fs5.default.existsSync(import_node_path9.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
4223
|
+
return true;
|
|
4224
|
+
const users = import_node_path9.default.join(dir, "xcuserdata");
|
|
4225
|
+
return import_node_fs5.default.existsSync(users) && import_node_fs5.default.readdirSync(users).some(
|
|
4226
|
+
(user) => import_node_fs5.default.existsSync(import_node_path9.default.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
4227
|
+
);
|
|
4228
|
+
});
|
|
4229
|
+
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
4230
|
+
}
|
|
4231
|
+
if (!appTargets.includes(target))
|
|
4232
|
+
throw new Error(`native app identity has no application target ${target}`);
|
|
4233
|
+
return { xcodeproj, target };
|
|
4234
|
+
}
|
|
4235
|
+
var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path9.default.join(
|
|
4236
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path9.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
4237
|
+
"xcshareddata",
|
|
4238
|
+
"swiftpm",
|
|
4239
|
+
"Package.resolved"
|
|
4240
|
+
);
|
|
4241
|
+
var SwiftPackageResolutionRequired = class extends Error {
|
|
4242
|
+
constructor(requirements, destination) {
|
|
4243
|
+
super(
|
|
4244
|
+
`the project has no Package.resolved: ${destination}; await prepareXcodeSwiftPackages first`
|
|
4245
|
+
);
|
|
4246
|
+
this.requirements = requirements;
|
|
4247
|
+
this.destination = destination;
|
|
4248
|
+
}
|
|
4249
|
+
};
|
|
3963
4250
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
3964
|
-
const xcodeprojOrWorkspace =
|
|
4251
|
+
const xcodeprojOrWorkspace = import_node_fs5.default.realpathSync(input);
|
|
3965
4252
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
3966
4253
|
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
3967
4254
|
xcodeprojOrWorkspace,
|
|
@@ -3970,7 +4257,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3970
4257
|
const allTargets = projects.flatMap(projectTargets);
|
|
3971
4258
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
3972
4259
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
3973
|
-
const container =
|
|
4260
|
+
const container = import_node_path9.default.basename(xcodeprojOrWorkspace);
|
|
3974
4261
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
3975
4262
|
if (named.length !== 1) {
|
|
3976
4263
|
throw new Error(
|
|
@@ -3983,15 +4270,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3983
4270
|
for (const ref of allTargets) {
|
|
3984
4271
|
const product = ref.project.object(str(ref.target.productReference));
|
|
3985
4272
|
const file = str(product?.path);
|
|
3986
|
-
if (file && !byProduct.has(
|
|
3987
|
-
byProduct.set(
|
|
4273
|
+
if (file && !byProduct.has(import_node_path9.default.basename(file)))
|
|
4274
|
+
byProduct.set(import_node_path9.default.basename(file), ref);
|
|
3988
4275
|
}
|
|
3989
4276
|
const proxied = (project, proxyId) => {
|
|
3990
4277
|
const proxy = project.object(proxyId);
|
|
3991
4278
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
3992
4279
|
const portal = str(proxy.containerPortal);
|
|
3993
4280
|
const portalPath = project.resolvePath(portal ?? "");
|
|
3994
|
-
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath &&
|
|
4281
|
+
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs5.default.existsSync(portalPath) ? projectAt.get(import_node_fs5.default.realpathSync(portalPath)) : void 0;
|
|
3995
4282
|
const remote = str(proxy.remoteGlobalIDString);
|
|
3996
4283
|
if (!owner || !remote) return void 0;
|
|
3997
4284
|
return projectTargets(owner).find(
|
|
@@ -4003,16 +4290,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4003
4290
|
const found = [];
|
|
4004
4291
|
for (const dependencyId of list(target.dependencies)) {
|
|
4005
4292
|
const dependency = project.object(dependencyId);
|
|
4006
|
-
|
|
4007
|
-
const
|
|
4293
|
+
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
|
|
4294
|
+
const direct = str(dependency.target);
|
|
4295
|
+
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
|
|
4008
4296
|
if (resolved) found.push(resolved);
|
|
4009
4297
|
}
|
|
4010
4298
|
for (const phaseId of list(target.buildPhases)) {
|
|
4011
4299
|
const phase = project.object(phaseId);
|
|
4012
4300
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
4013
4301
|
for (const buildFileId of list(phase.files)) {
|
|
4014
|
-
const
|
|
4015
|
-
|
|
4302
|
+
const buildFile = project.object(buildFileId);
|
|
4303
|
+
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
4304
|
+
const file = project.object(str(buildFile.fileRef));
|
|
4305
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path9.default.basename(str(file.path) ?? "")) : void 0;
|
|
4016
4306
|
if (resolved) found.push(resolved);
|
|
4017
4307
|
}
|
|
4018
4308
|
}
|
|
@@ -4034,8 +4324,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4034
4324
|
if (phase?.isa !== "PBXHeadersBuildPhase") return [];
|
|
4035
4325
|
return list(phase.files).flatMap((id) => {
|
|
4036
4326
|
const file = ref.project.object(id);
|
|
4037
|
-
|
|
4038
|
-
const
|
|
4327
|
+
if (!file || !xcodeBuildFileBuildsForIos(file)) return [];
|
|
4328
|
+
const resolved = ref.project.resolvePath(str(file.fileRef) ?? "");
|
|
4329
|
+
const attributes = isDict(file.settings) ? list(file.settings.ATTRIBUTES) : [];
|
|
4039
4330
|
if (!resolved) return [];
|
|
4040
4331
|
return [
|
|
4041
4332
|
{
|
|
@@ -4045,24 +4336,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4045
4336
|
];
|
|
4046
4337
|
});
|
|
4047
4338
|
});
|
|
4048
|
-
const
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4339
|
+
const productNames = /* @__PURE__ */ new Map();
|
|
4340
|
+
const productName = (ref) => {
|
|
4341
|
+
const key = `${ref.project.xcodeproj}\0${ref.id}`;
|
|
4342
|
+
const cached = productNames.get(key);
|
|
4343
|
+
if (cached !== void 0) return cached;
|
|
4344
|
+
const product = targetSettings(
|
|
4345
|
+
ref,
|
|
4346
|
+
configuration,
|
|
4347
|
+
{ TARGET_NAME: str(ref.target.name) ?? ref.id },
|
|
4348
|
+
options
|
|
4349
|
+
).get("PRODUCT_NAME");
|
|
4350
|
+
productNames.set(key, product);
|
|
4351
|
+
return product;
|
|
4352
|
+
};
|
|
4054
4353
|
const syncHeaderCache = /* @__PURE__ */ new Map();
|
|
4055
4354
|
const synchronizedHeaders = (ref) => {
|
|
4056
4355
|
const key = `${ref.project.xcodeproj}\0${ref.id}`;
|
|
4057
4356
|
const cached = syncHeaderCache.get(key);
|
|
4058
4357
|
if (cached) return cached;
|
|
4059
4358
|
const found = [];
|
|
4060
|
-
|
|
4061
|
-
ref.project.objects,
|
|
4359
|
+
ref.project.visitMembers(
|
|
4062
4360
|
ref.id,
|
|
4063
4361
|
ref.project.resolvePath,
|
|
4064
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
4065
|
-
|
|
4362
|
+
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs5.default.existsSync(file) ? [file] : [],
|
|
4363
|
+
import_node_path9.default.join,
|
|
4066
4364
|
(file, kind) => {
|
|
4067
4365
|
if (kind === "header") found.push(file);
|
|
4068
4366
|
}
|
|
@@ -4078,13 +4376,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4078
4376
|
for (const ref of projectTargets(project)) {
|
|
4079
4377
|
const product = productName(ref);
|
|
4080
4378
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
4081
|
-
const
|
|
4082
|
-
if (!entries.has(
|
|
4083
|
-
entries.set(
|
|
4379
|
+
const name2 = import_node_path9.default.basename(file);
|
|
4380
|
+
if (!entries.has(name2))
|
|
4381
|
+
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
4084
4382
|
}
|
|
4085
4383
|
for (const file of synchronizedHeaders(ref)) {
|
|
4086
|
-
const
|
|
4087
|
-
if (!entries.has(
|
|
4384
|
+
const name2 = import_node_path9.default.basename(file);
|
|
4385
|
+
if (!entries.has(name2)) entries.set(name2, file);
|
|
4088
4386
|
}
|
|
4089
4387
|
}
|
|
4090
4388
|
for (const ref of projectTargets(project)) {
|
|
@@ -4093,29 +4391,29 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4093
4391
|
if (folder === null) continue;
|
|
4094
4392
|
for (const file of walkFiles(folder)) {
|
|
4095
4393
|
if (!HEADER_FILE.test(file)) continue;
|
|
4096
|
-
const
|
|
4097
|
-
if (!entries.has(
|
|
4394
|
+
const name2 = import_node_path9.default.basename(file);
|
|
4395
|
+
if (!entries.has(name2)) entries.set(name2, file);
|
|
4098
4396
|
}
|
|
4099
4397
|
}
|
|
4100
4398
|
}
|
|
4101
4399
|
for (const id of Object.keys(project.objects)) {
|
|
4102
4400
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
4103
4401
|
const file = project.resolvePath(id);
|
|
4104
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
4105
|
-
entries.set(
|
|
4402
|
+
if (file && HEADER_FILE.test(file) && !entries.has(import_node_path9.default.basename(file)))
|
|
4403
|
+
entries.set(import_node_path9.default.basename(file), file);
|
|
4106
4404
|
}
|
|
4107
4405
|
const map = [...entries];
|
|
4108
4406
|
projectHeaderMaps.set(project, map);
|
|
4109
4407
|
return map;
|
|
4110
4408
|
};
|
|
4111
4409
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
4112
|
-
const buildDir = (project) =>
|
|
4410
|
+
const buildDir = (project) => import_node_path9.default.join(project.projectDir, ".build/peach-xcode/Build");
|
|
4113
4411
|
const podsBuild = {
|
|
4114
|
-
SYMROOT:
|
|
4115
|
-
OBJROOT:
|
|
4412
|
+
SYMROOT: import_node_path9.default.join(buildDir(app.project), "Products"),
|
|
4413
|
+
OBJROOT: import_node_path9.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
4116
4414
|
};
|
|
4117
4415
|
const moduleTarget = (ref) => {
|
|
4118
|
-
const
|
|
4416
|
+
const name2 = str(ref.target.name) ?? ref.id;
|
|
4119
4417
|
const {
|
|
4120
4418
|
get: settings2,
|
|
4121
4419
|
keys,
|
|
@@ -4124,18 +4422,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4124
4422
|
ref,
|
|
4125
4423
|
configuration,
|
|
4126
4424
|
{
|
|
4127
|
-
TARGET_NAME:
|
|
4425
|
+
TARGET_NAME: name2,
|
|
4128
4426
|
TARGETNAME: "$(TARGET_NAME)",
|
|
4129
4427
|
PROJECT: "$(PROJECT_NAME)",
|
|
4130
|
-
PROJECT_NAME:
|
|
4428
|
+
PROJECT_NAME: import_node_path9.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
4131
4429
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
4132
4430
|
SRCROOT: ref.project.projectDir,
|
|
4133
4431
|
SOURCE_ROOT: ref.project.projectDir,
|
|
4134
4432
|
PROJECT_DIR: ref.project.projectDir,
|
|
4135
|
-
SYMROOT:
|
|
4433
|
+
SYMROOT: import_node_path9.default.join(buildDir(ref.project), "Products"),
|
|
4136
4434
|
BUILD_DIR: "$(SYMROOT)",
|
|
4137
4435
|
BUILD_ROOT: "$(SYMROOT)",
|
|
4138
|
-
OBJROOT:
|
|
4436
|
+
OBJROOT: import_node_path9.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
4139
4437
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
4140
4438
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
4141
4439
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -4175,7 +4473,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4175
4473
|
xcconfigs
|
|
4176
4474
|
);
|
|
4177
4475
|
const searchRules = recursiveSearchRules(settings2);
|
|
4178
|
-
const absolute = (file) =>
|
|
4476
|
+
const absolute = (file) => import_node_path9.default.resolve(ref.project.projectDir, file);
|
|
4179
4477
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
4180
4478
|
const product = settings2("PRODUCT_NAME");
|
|
4181
4479
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -4195,18 +4493,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4195
4493
|
const outputUmbrella = outputs.find((file) => file.endsWith("-umbrella.h"));
|
|
4196
4494
|
const outputHeader = outputs.find((file) => file.endsWith(`/${moduleName}-Swift.h`));
|
|
4197
4495
|
if (!moduleMap2 || !umbrella || !outputModuleMap || !outputUmbrella || !outputHeader)
|
|
4198
|
-
throw new Error(`${
|
|
4496
|
+
throw new Error(`${name2}: incomplete CocoaPods Swift compatibility header phase`);
|
|
4199
4497
|
return [{ id, moduleMap: moduleMap2, umbrella, outputModuleMap, outputUmbrella, outputHeader }];
|
|
4200
4498
|
});
|
|
4201
4499
|
if (compatibilityPhases.length > 1)
|
|
4202
|
-
throw new Error(`${
|
|
4500
|
+
throw new Error(`${name2}: multiple CocoaPods Swift compatibility header phases`);
|
|
4203
4501
|
const compatibility = compatibilityPhases[0];
|
|
4204
4502
|
if (compatibility && members.sources.length === 0)
|
|
4205
4503
|
throw new Error(
|
|
4206
|
-
`${
|
|
4504
|
+
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
4207
4505
|
);
|
|
4208
4506
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
4209
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
4507
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path9.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
4210
4508
|
if (versioning) {
|
|
4211
4509
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
4212
4510
|
const custom = [
|
|
@@ -4219,7 +4517,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4219
4517
|
].filter((key) => settings2(key));
|
|
4220
4518
|
if (custom.length)
|
|
4221
4519
|
throw new Error(
|
|
4222
|
-
`${
|
|
4520
|
+
`${name2}: Xcode generates ${import_node_path9.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
4223
4521
|
);
|
|
4224
4522
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
4225
4523
|
const [major, minor] = version.split(".");
|
|
@@ -4232,39 +4530,39 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4232
4530
|
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
|
|
4233
4531
|
""
|
|
4234
4532
|
].join("\n");
|
|
4235
|
-
if (!
|
|
4236
|
-
|
|
4237
|
-
|
|
4533
|
+
if (!import_node_fs5.default.existsSync(versioning) || import_node_fs5.default.readFileSync(versioning, "utf8") !== unit) {
|
|
4534
|
+
import_node_fs5.default.mkdirSync(import_node_path9.default.dirname(versioning), { recursive: true });
|
|
4535
|
+
import_node_fs5.default.writeFileSync(versioning, unit);
|
|
4238
4536
|
}
|
|
4239
4537
|
allSources.push(versioning);
|
|
4240
4538
|
}
|
|
4241
4539
|
const implementations = allSources.filter(isSwiftNativeTranslationUnit);
|
|
4242
|
-
const native = implementations.length > 0;
|
|
4540
|
+
const native = implementations.length > 0 || Boolean(settings2("SWIFT_OBJC_BRIDGING_HEADER"));
|
|
4243
4541
|
if (native && building) {
|
|
4244
4542
|
if (list(ref.target.buildRules).length > 0)
|
|
4245
4543
|
throw new Error(
|
|
4246
|
-
`${
|
|
4544
|
+
`${name2}: Xcode's generated-files header map for build rules is not modeled`
|
|
4247
4545
|
);
|
|
4248
4546
|
if (settings2("ALWAYS_SEARCH_USER_PATHS") === "YES" && settings2("USER_HEADER_SEARCH_PATHS").trim())
|
|
4249
4547
|
throw new Error(
|
|
4250
|
-
`${
|
|
4548
|
+
`${name2}: ALWAYS_SEARCH_USER_PATHS=YES also searches USER_HEADER_SEARCH_PATHS for angle-bracket includes, which is not modeled`
|
|
4251
4549
|
);
|
|
4252
4550
|
}
|
|
4253
4551
|
const headerFiles = headerPhase(ref);
|
|
4254
4552
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
4255
4553
|
for (const { file, visibility } of headerFiles) {
|
|
4256
|
-
const
|
|
4554
|
+
const name3 = import_node_path9.default.basename(file);
|
|
4257
4555
|
const published = visibility !== "Project";
|
|
4258
|
-
if (!ownHeaders.has(
|
|
4259
|
-
ownHeaders.set(
|
|
4260
|
-
if (!published && !ownHeaders.has(`${product}/${
|
|
4261
|
-
ownHeaders.set(`${product}/${
|
|
4556
|
+
if (!ownHeaders.has(name3))
|
|
4557
|
+
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
4558
|
+
if (!published && !ownHeaders.has(`${product}/${name3}`))
|
|
4559
|
+
ownHeaders.set(`${product}/${name3}`, file);
|
|
4262
4560
|
}
|
|
4263
4561
|
for (const file of synchronizedHeaders(ref)) {
|
|
4264
|
-
const
|
|
4265
|
-
if (ownHeaders.has(
|
|
4266
|
-
ownHeaders.set(
|
|
4267
|
-
const qualified = `${product}/${
|
|
4562
|
+
const name3 = import_node_path9.default.basename(file);
|
|
4563
|
+
if (ownHeaders.has(name3)) continue;
|
|
4564
|
+
ownHeaders.set(name3, file);
|
|
4565
|
+
const qualified = `${product}/${name3}`;
|
|
4268
4566
|
if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file);
|
|
4269
4567
|
}
|
|
4270
4568
|
const nonFrameworkHeaders = /* @__PURE__ */ new Map();
|
|
@@ -4273,24 +4571,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4273
4571
|
const otherProduct = productName(other);
|
|
4274
4572
|
for (const { file, visibility } of headerPhase(other)) {
|
|
4275
4573
|
if (visibility === "Project") continue;
|
|
4276
|
-
const key = `${otherProduct}/${
|
|
4574
|
+
const key = `${otherProduct}/${import_node_path9.default.basename(file)}`;
|
|
4277
4575
|
if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
|
|
4278
4576
|
}
|
|
4279
4577
|
}
|
|
4280
|
-
const wrapper =
|
|
4578
|
+
const wrapper = import_node_path9.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
4281
4579
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
4282
|
-
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ?
|
|
4283
|
-
const frameworkCompatibility = frameworkUmbrella && moduleMap &&
|
|
4580
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path9.default.join(import_node_path9.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
4581
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs5.default.existsSync(moduleMap) && import_node_fs5.default.existsSync(frameworkUmbrella) ? {
|
|
4284
4582
|
framework: true,
|
|
4285
4583
|
moduleMap,
|
|
4286
4584
|
umbrella: frameworkUmbrella,
|
|
4287
|
-
outputModuleMap:
|
|
4288
|
-
outputUmbrella:
|
|
4585
|
+
outputModuleMap: import_node_path9.default.join(wrapper, "Modules", "module.modulemap"),
|
|
4586
|
+
outputUmbrella: import_node_path9.default.join(
|
|
4289
4587
|
wrapper,
|
|
4290
4588
|
"Headers",
|
|
4291
|
-
|
|
4589
|
+
import_node_path9.default.basename(frameworkUmbrella)
|
|
4292
4590
|
),
|
|
4293
|
-
outputHeader:
|
|
4591
|
+
outputHeader: import_node_path9.default.join(
|
|
4294
4592
|
wrapper,
|
|
4295
4593
|
"Headers",
|
|
4296
4594
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
@@ -4304,10 +4602,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4304
4602
|
outputUmbrella: compatibility.outputUmbrella,
|
|
4305
4603
|
outputHeader: compatibility.outputHeader
|
|
4306
4604
|
} : frameworkCompatibility;
|
|
4307
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap &&
|
|
4605
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path9.default.relative(import_node_path9.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path9.default.sep)[0] !== ".." && import_node_fs5.default.existsSync(moduleMap) ? import_node_fs5.default.readdirSync(import_node_path9.default.dirname(moduleMap)).flatMap((entry) => {
|
|
4308
4606
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
4309
|
-
const file =
|
|
4310
|
-
return
|
|
4607
|
+
const file = import_node_path9.default.join(import_node_path9.default.dirname(moduleMap), entry);
|
|
4608
|
+
return import_node_fs5.default.existsSync(file) ? [file] : [];
|
|
4311
4609
|
}) : [];
|
|
4312
4610
|
const fileFlags = {};
|
|
4313
4611
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -4331,8 +4629,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4331
4629
|
settings: settings2,
|
|
4332
4630
|
keys,
|
|
4333
4631
|
module: {
|
|
4334
|
-
name,
|
|
4632
|
+
name: name2,
|
|
4335
4633
|
moduleName,
|
|
4634
|
+
...settings2("PODS_TARGET_SRCROOT") ? { podRoot: absolute(settings2("PODS_TARGET_SRCROOT")) } : {},
|
|
4336
4635
|
...members,
|
|
4337
4636
|
allSources,
|
|
4338
4637
|
languageMode: swiftVersion >= 6 ? 6 : 5,
|
|
@@ -4350,8 +4649,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4350
4649
|
packageProducts: Array(),
|
|
4351
4650
|
...members.sources.length > 0 ? {
|
|
4352
4651
|
swift: {
|
|
4353
|
-
flags:
|
|
4652
|
+
flags: [
|
|
4653
|
+
...settingList(settings2("SWIFT_OPTIMIZATION_LEVEL")),
|
|
4654
|
+
...settingList(settings2("OTHER_SWIFT_FLAGS"))
|
|
4655
|
+
],
|
|
4354
4656
|
includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
|
|
4657
|
+
cxxInterop: settings2("SWIFT_OBJC_INTEROP_MODE") === "objcxx",
|
|
4658
|
+
cxxStandard: cxxStandard && cxxStandard !== "compiler-default" ? CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard : null,
|
|
4355
4659
|
compatibility: swiftCompatibility
|
|
4356
4660
|
}
|
|
4357
4661
|
} : {},
|
|
@@ -4363,29 +4667,21 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4363
4667
|
),
|
|
4364
4668
|
...podHeaders.filter((file) => HEADER_FILE.test(file))
|
|
4365
4669
|
],
|
|
4366
|
-
headers
|
|
4367
|
-
.../* @__PURE__ */ new Set([
|
|
4368
|
-
...headers,
|
|
4369
|
-
...Object.keys(ref.project.objects).flatMap((id) => {
|
|
4370
|
-
const file = ref.project.resolvePath(id);
|
|
4371
|
-
return file && HEADER_FILE.test(file) && import_node_fs4.default.existsSync(file) ? [file] : [];
|
|
4372
|
-
})
|
|
4373
|
-
])
|
|
4374
|
-
],
|
|
4670
|
+
headers,
|
|
4375
4671
|
prefixHeader: settings2("GCC_PREFIX_HEADER") ? absolute(settings2("GCC_PREFIX_HEADER")) : null,
|
|
4376
4672
|
bridgingHeader: settings2("SWIFT_OBJC_BRIDGING_HEADER") ? absolute(settings2("SWIFT_OBJC_BRIDGING_HEADER")) : null,
|
|
4377
4673
|
// xcode searches its products' include directory before
|
|
4378
4674
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
4379
4675
|
headerSearchPaths: [
|
|
4380
|
-
|
|
4676
|
+
import_node_path9.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
4381
4677
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
4382
4678
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
4383
4679
|
),
|
|
4384
|
-
|
|
4680
|
+
import_node_path9.default.join(
|
|
4385
4681
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
4386
4682
|
settings2("CURRENT_ARCH")
|
|
4387
4683
|
),
|
|
4388
|
-
|
|
4684
|
+
import_node_path9.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
4389
4685
|
settings2("DERIVED_FILE_DIR")
|
|
4390
4686
|
],
|
|
4391
4687
|
userHeaderSearchPaths: settingList(
|
|
@@ -4429,10 +4725,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4429
4725
|
...headerFiles.flatMap(
|
|
4430
4726
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
4431
4727
|
[
|
|
4432
|
-
|
|
4728
|
+
import_node_path9.default.join(
|
|
4433
4729
|
wrapper,
|
|
4434
4730
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
4435
|
-
|
|
4731
|
+
import_node_path9.default.basename(file)
|
|
4436
4732
|
),
|
|
4437
4733
|
file
|
|
4438
4734
|
]
|
|
@@ -4446,7 +4742,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4446
4742
|
return [];
|
|
4447
4743
|
const destination = expand(
|
|
4448
4744
|
str(phase.dstPath) ?? "",
|
|
4449
|
-
(
|
|
4745
|
+
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path9.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path9.default.join(wrapper, "PrivateHeaders") : settings2(name3)
|
|
4450
4746
|
);
|
|
4451
4747
|
return list(phase.files).flatMap((id) => {
|
|
4452
4748
|
const file = ref.project.resolvePath(
|
|
@@ -4454,18 +4750,21 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4454
4750
|
);
|
|
4455
4751
|
return file && HEADER_FILE.test(file) ? [
|
|
4456
4752
|
[
|
|
4457
|
-
|
|
4753
|
+
import_node_path9.default.resolve(
|
|
4458
4754
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
4459
4755
|
destination,
|
|
4460
|
-
|
|
4756
|
+
import_node_path9.default.basename(file)
|
|
4461
4757
|
),
|
|
4462
4758
|
file
|
|
4463
4759
|
]
|
|
4464
4760
|
] : [];
|
|
4465
4761
|
});
|
|
4466
4762
|
}),
|
|
4467
|
-
...moduleMap ? [[
|
|
4468
|
-
]) : Object.fromEntries(
|
|
4763
|
+
...moduleMap ? [[import_node_path9.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
4764
|
+
]) : Object.fromEntries([
|
|
4765
|
+
...podHeaders.map((file) => [file, file]),
|
|
4766
|
+
...moduleMap ? [[moduleMap, moduleMap]] : []
|
|
4767
|
+
])
|
|
4469
4768
|
}
|
|
4470
4769
|
} : {}
|
|
4471
4770
|
}
|
|
@@ -4473,10 +4772,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4473
4772
|
};
|
|
4474
4773
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
4475
4774
|
const { settings, keys: settingKeys, module: module2 } = builtTargets.at(-1);
|
|
4476
|
-
const
|
|
4775
|
+
const nativeTargets = /* @__PURE__ */ new Set();
|
|
4776
|
+
const includeNativeTarget = (ref) => {
|
|
4777
|
+
if (nativeTargets.has(ref)) return;
|
|
4778
|
+
nativeTargets.add(ref);
|
|
4779
|
+
for (const dependency of dependenciesOf(ref)) includeNativeTarget(dependency);
|
|
4780
|
+
};
|
|
4781
|
+
for (const { ref, module: module3 } of builtTargets)
|
|
4782
|
+
if (options.nativeModules?.includes(module3.moduleName)) includeNativeTarget(ref);
|
|
4783
|
+
const selectedTargets = options.nativeModules ? builtTargets.filter((target) => nativeTargets.has(target.ref)) : builtTargets;
|
|
4784
|
+
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
|
|
4477
4785
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
4478
|
-
const podSourceDirs =
|
|
4479
|
-
({ ref,
|
|
4786
|
+
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
4787
|
+
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path9.default.dirname(file)).filter((dir) => import_node_fs5.default.existsSync(dir)) : []
|
|
4480
4788
|
);
|
|
4481
4789
|
const expandValue = (value, settings2) => {
|
|
4482
4790
|
if (typeof value === "string") return expand(value, settings2);
|
|
@@ -4492,26 +4800,28 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4492
4800
|
const bundleTargets = builtTargets.filter(
|
|
4493
4801
|
({ ref }) => ref.target.productType === RESOURCE_BUNDLE
|
|
4494
4802
|
);
|
|
4495
|
-
for (const owner of options.installedPods ?
|
|
4803
|
+
for (const owner of options.installedPods ? selectedTargets : []) {
|
|
4496
4804
|
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
4497
4805
|
const phase = owner.ref.project.object(phaseId);
|
|
4498
4806
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
4499
4807
|
continue;
|
|
4500
|
-
const absolute = (raw) =>
|
|
4808
|
+
const absolute = (raw) => import_node_path9.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
4501
4809
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
4502
4810
|
const file = absolute(raw);
|
|
4503
4811
|
xcconfigs.add(file);
|
|
4504
4812
|
return fileListEntries(file, absolute);
|
|
4505
4813
|
});
|
|
4506
|
-
const inputs =
|
|
4507
|
-
(
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4814
|
+
const inputs = [
|
|
4815
|
+
...list(phase.inputPaths).map(absolute),
|
|
4816
|
+
...entries(list(phase.inputFileListPaths))
|
|
4817
|
+
].filter((file) => file.endsWith(".bundle"));
|
|
4818
|
+
const outputs = [
|
|
4819
|
+
...list(phase.outputPaths).map(absolute),
|
|
4820
|
+
...entries(list(phase.outputFileListPaths))
|
|
4821
|
+
].filter((file) => file.endsWith(".bundle"));
|
|
4512
4822
|
if (inputs.length !== outputs.length)
|
|
4513
4823
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
4514
|
-
const destinationRoot =
|
|
4824
|
+
const destinationRoot = import_node_path9.default.join(
|
|
4515
4825
|
owner.settings("TARGET_BUILD_DIR"),
|
|
4516
4826
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
4517
4827
|
);
|
|
@@ -4520,41 +4830,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4520
4830
|
const file = str(
|
|
4521
4831
|
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
4522
4832
|
);
|
|
4523
|
-
return file &&
|
|
4833
|
+
return file && import_node_path9.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
4524
4834
|
});
|
|
4525
|
-
if (!product)
|
|
4835
|
+
if (!product && !isDirectory(input2))
|
|
4526
4836
|
throw new Error(
|
|
4527
4837
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
4528
4838
|
);
|
|
4529
|
-
const destination =
|
|
4530
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
4839
|
+
const destination = import_node_path9.default.relative(destinationRoot, outputs[index]);
|
|
4840
|
+
if (destination === ".." || destination.startsWith(`..${import_node_path9.default.sep}`) || import_node_path9.default.isAbsolute(destination) || import_node_path9.default.basename(input2) !== import_node_path9.default.basename(destination))
|
|
4531
4841
|
throw new Error(
|
|
4532
4842
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
4533
4843
|
);
|
|
4534
|
-
const infoFile =
|
|
4844
|
+
const infoFile = product ? import_node_path9.default.resolve(
|
|
4535
4845
|
product.ref.project.projectDir,
|
|
4536
4846
|
product.settings("INFOPLIST_FILE")
|
|
4537
|
-
);
|
|
4538
|
-
xcconfigs.add(infoFile);
|
|
4539
|
-
const parsed = import_plist2.default.parse(import_node_fs4.default.readFileSync(infoFile, "utf8"));
|
|
4540
|
-
const infoPlist = import_plist2.default.build(expandValue(parsed, product.settings));
|
|
4847
|
+
) : null;
|
|
4848
|
+
if (infoFile) xcconfigs.add(infoFile);
|
|
4541
4849
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
4542
|
-
const bundlePath = prefix + destination.split(
|
|
4850
|
+
const bundlePath = prefix + destination.split(import_node_path9.default.sep).join("/");
|
|
4543
4851
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
4544
4852
|
throw new Error(
|
|
4545
4853
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
4546
4854
|
);
|
|
4547
4855
|
resourceProducts.push({
|
|
4548
4856
|
path: bundlePath,
|
|
4549
|
-
|
|
4550
|
-
|
|
4857
|
+
...product ? {
|
|
4858
|
+
resources: product.module.resources,
|
|
4859
|
+
infoPlist: import_plist2.default.build(
|
|
4860
|
+
expandValue(
|
|
4861
|
+
import_plist2.default.parse(import_node_fs5.default.readFileSync(infoFile, "utf8")),
|
|
4862
|
+
product.settings
|
|
4863
|
+
)
|
|
4864
|
+
)
|
|
4865
|
+
} : {
|
|
4866
|
+
resources: import_node_fs5.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path9.default.join(entry.parentPath, entry.name)).sort(),
|
|
4867
|
+
sourceRoot: input2
|
|
4868
|
+
}
|
|
4551
4869
|
});
|
|
4552
4870
|
}
|
|
4553
4871
|
}
|
|
4554
4872
|
}
|
|
4555
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
4873
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path9.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
4556
4874
|
const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
4557
|
-
const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist2.default.parse(
|
|
4875
|
+
const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist2.default.parse(import_node_fs5.default.readFileSync(infoPlistFile, "utf8")) : {};
|
|
4558
4876
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
4559
4877
|
throw new Error(`${module2.name} Info.plist must contain a dictionary`);
|
|
4560
4878
|
}
|
|
@@ -4583,7 +4901,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4583
4901
|
};
|
|
4584
4902
|
}
|
|
4585
4903
|
const localPackageDirs = [
|
|
4586
|
-
...listed.filter((reference) =>
|
|
4904
|
+
...listed.filter((reference) => import_node_fs5.default.existsSync(import_node_path9.default.join(reference, "Package.swift"))),
|
|
4587
4905
|
...projects.flatMap(
|
|
4588
4906
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
4589
4907
|
if (!isDict(entry)) return [];
|
|
@@ -4593,19 +4911,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4593
4911
|
const packages = [];
|
|
4594
4912
|
while (pending.length > 0) {
|
|
4595
4913
|
const dir = pending.pop();
|
|
4596
|
-
if (
|
|
4914
|
+
if (import_node_fs5.default.existsSync(import_node_path9.default.join(dir, "Package.swift"))) {
|
|
4597
4915
|
packages.push(dir);
|
|
4598
4916
|
continue;
|
|
4599
4917
|
}
|
|
4600
4918
|
if (!isDirectory(dir)) continue;
|
|
4601
|
-
for (const child of
|
|
4919
|
+
for (const child of import_node_fs5.default.readdirSync(dir, { withFileTypes: true }))
|
|
4602
4920
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
4603
|
-
pending.push(
|
|
4921
|
+
pending.push(import_node_path9.default.join(dir, child.name));
|
|
4604
4922
|
}
|
|
4605
4923
|
return packages;
|
|
4606
4924
|
}
|
|
4607
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
4608
|
-
return candidate &&
|
|
4925
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path9.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
4926
|
+
return candidate && import_node_fs5.default.existsSync(import_node_path9.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
4609
4927
|
})
|
|
4610
4928
|
)
|
|
4611
4929
|
];
|
|
@@ -4625,14 +4943,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4625
4943
|
const qualifiedProductKeys = /* @__PURE__ */ new Set();
|
|
4626
4944
|
const linkedProductKeys = /* @__PURE__ */ new Set();
|
|
4627
4945
|
const binaryFrameworks = /* @__PURE__ */ new Map();
|
|
4628
|
-
for (const { ref, settings: settings2 } of
|
|
4629
|
-
const absolute = (raw) =>
|
|
4946
|
+
for (const { ref, settings: settings2 } of selectedTargets) {
|
|
4947
|
+
const absolute = (raw) => import_node_path9.default.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
4630
4948
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
4631
4949
|
const dir = absolute(raw);
|
|
4632
|
-
const modulemap =
|
|
4633
|
-
if (!
|
|
4634
|
-
const
|
|
4635
|
-
if (
|
|
4950
|
+
const modulemap = import_node_path9.default.join(dir, "module.modulemap");
|
|
4951
|
+
if (!import_node_fs5.default.existsSync(modulemap)) continue;
|
|
4952
|
+
const name2 = moduleMapName(import_node_fs5.default.readFileSync(modulemap, "utf8"));
|
|
4953
|
+
if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, dir);
|
|
4636
4954
|
}
|
|
4637
4955
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
4638
4956
|
const phase = ref.project.object(phaseId);
|
|
@@ -4640,31 +4958,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4640
4958
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
4641
4959
|
for (const raw of list(phase.inputFileListPaths)) {
|
|
4642
4960
|
const file = absolute(raw);
|
|
4643
|
-
if (!
|
|
4961
|
+
if (!import_node_fs5.default.existsSync(file)) continue;
|
|
4644
4962
|
xcconfigs.add(file);
|
|
4645
4963
|
inputs.push(...fileListEntries(file, absolute));
|
|
4646
4964
|
}
|
|
4647
4965
|
for (const file of inputs) {
|
|
4648
|
-
const
|
|
4649
|
-
if (
|
|
4966
|
+
const name2 = /([^/]+)\.xcframework$/.exec(file)?.[1];
|
|
4967
|
+
if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, file);
|
|
4650
4968
|
}
|
|
4651
4969
|
}
|
|
4652
4970
|
}
|
|
4653
4971
|
const productsByTarget = /* @__PURE__ */ new Map();
|
|
4654
4972
|
for (const ref of order) {
|
|
4655
4973
|
const { project, target } = ref;
|
|
4974
|
+
const productPlatforms = /* @__PURE__ */ new Map();
|
|
4656
4975
|
const productRef = (id) => {
|
|
4657
|
-
const
|
|
4658
|
-
|
|
4976
|
+
const entry = project.object(id);
|
|
4977
|
+
const ref2 = str(entry?.productRef);
|
|
4978
|
+
if (!entry || !ref2) return [];
|
|
4979
|
+
const builds = xcodeBuildFileBuildsForIos(entry);
|
|
4980
|
+
productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
|
|
4981
|
+
return builds ? [ref2] : [];
|
|
4659
4982
|
};
|
|
4660
|
-
const
|
|
4661
|
-
...list(target.packageProductDependencies),
|
|
4983
|
+
const referencedProducts = [
|
|
4662
4984
|
...list(target.dependencies).flatMap(productRef),
|
|
4663
4985
|
...list(target.buildPhases).flatMap((id) => {
|
|
4664
4986
|
const phase = project.object(id);
|
|
4665
4987
|
return phase?.isa === "PBXFrameworksBuildPhase" ? list(phase.files).flatMap(productRef) : [];
|
|
4666
4988
|
})
|
|
4667
4989
|
];
|
|
4990
|
+
const productDependencies = [
|
|
4991
|
+
...list(target.packageProductDependencies).filter(
|
|
4992
|
+
(id) => productPlatforms.get(id) !== false
|
|
4993
|
+
),
|
|
4994
|
+
...referencedProducts
|
|
4995
|
+
];
|
|
4668
4996
|
const ownProducts = [];
|
|
4669
4997
|
const ownKeys = /* @__PURE__ */ new Set();
|
|
4670
4998
|
for (const dependencyId of new Set(productDependencies)) {
|
|
@@ -4679,7 +5007,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4679
5007
|
product,
|
|
4680
5008
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
4681
5009
|
kind: "local",
|
|
4682
|
-
dir:
|
|
5010
|
+
dir: import_node_path9.default.resolve(
|
|
4683
5011
|
project.projectDir,
|
|
4684
5012
|
str(reference.relativePath) ?? ""
|
|
4685
5013
|
)
|
|
@@ -4699,24 +5027,26 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4699
5027
|
const phase = project.object(phaseId);
|
|
4700
5028
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
4701
5029
|
for (const buildFileId of list(phase.files)) {
|
|
4702
|
-
const
|
|
5030
|
+
const buildFile = project.object(buildFileId);
|
|
5031
|
+
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
5032
|
+
const fileId = str(buildFile.fileRef);
|
|
4703
5033
|
const file = project.object(fileId);
|
|
4704
|
-
const
|
|
5034
|
+
const tree2 = str(file?.sourceTree);
|
|
4705
5035
|
const rawPath = str(file?.path) ?? "";
|
|
4706
|
-
const
|
|
4707
|
-
if (file?.isa !== "PBXFileReference" || !
|
|
4708
|
-
if (
|
|
5036
|
+
const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
5037
|
+
if (file?.isa !== "PBXFileReference" || !name2) continue;
|
|
5038
|
+
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "SDKROOT" || tree2 === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
|
|
4709
5039
|
// however it is rooted: xcode links -framework <name> from the sdk
|
|
4710
5040
|
// and a stale group-relative path to it contributes nothing.
|
|
4711
5041
|
/\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
|
|
4712
|
-
byProduct.has(
|
|
5042
|
+
byProduct.has(import_node_path9.default.basename(rawPath)))
|
|
4713
5043
|
continue;
|
|
4714
5044
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
4715
|
-
if (fileId && resolved !== null && !
|
|
5045
|
+
if (fileId && resolved !== null && !import_node_fs5.default.existsSync(resolved))
|
|
4716
5046
|
throw new Error(
|
|
4717
|
-
`${str(target.name) ?? "target"}: linked framework ${
|
|
5047
|
+
`${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
4718
5048
|
);
|
|
4719
|
-
if (!binaryFrameworks.get(
|
|
5049
|
+
if (!binaryFrameworks.get(name2)) binaryFrameworks.set(name2, resolved);
|
|
4720
5050
|
}
|
|
4721
5051
|
}
|
|
4722
5052
|
}
|
|
@@ -4730,33 +5060,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4730
5060
|
}
|
|
4731
5061
|
for (const built of builtTargets)
|
|
4732
5062
|
built.module.packageProducts = productsByTarget.get(built.ref) ?? [];
|
|
4733
|
-
const resolvedFile =
|
|
4734
|
-
|
|
4735
|
-
"xcshareddata",
|
|
4736
|
-
"swiftpm",
|
|
4737
|
-
"Package.resolved"
|
|
4738
|
-
);
|
|
4739
|
-
let packageResolved = import_node_fs4.default.existsSync(resolvedFile) ? [import_node_fs4.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path6.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs4.default.existsSync(file)).map((file) => import_node_fs4.default.realpathSync(file)).sort();
|
|
5063
|
+
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
5064
|
+
let packageResolved = import_node_fs5.default.existsSync(resolvedFile) ? [import_node_fs5.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path9.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs5.default.existsSync(file)).map((file) => import_node_fs5.default.realpathSync(file)).sort();
|
|
4740
5065
|
if (packageResolved.length === 0) {
|
|
4741
5066
|
const requirements = remotePackageRequirements(projects);
|
|
4742
5067
|
if (requirements.length > 0) {
|
|
4743
|
-
|
|
4744
|
-
|
|
5068
|
+
if (options.deferPackageResolution)
|
|
5069
|
+
throw new SwiftPackageResolutionRequired(requirements, resolvedFile);
|
|
4745
5070
|
}
|
|
4746
5071
|
}
|
|
4747
5072
|
const used = order.map((ref) => ref.project);
|
|
4748
5073
|
return {
|
|
4749
5074
|
...module2,
|
|
5075
|
+
moduleMapSources: Object.fromEntries(
|
|
5076
|
+
builtTargets.flatMap(({ module: module3 }) => {
|
|
5077
|
+
const compatibility = module3.swift?.compatibility;
|
|
5078
|
+
return compatibility ? [[compatibility.outputModuleMap, compatibility.moduleMap]] : [];
|
|
5079
|
+
})
|
|
5080
|
+
),
|
|
5081
|
+
...options.nativeModules ? {
|
|
5082
|
+
sources: [],
|
|
5083
|
+
allSources: [],
|
|
5084
|
+
resources: [],
|
|
5085
|
+
objc: void 0,
|
|
5086
|
+
swift: void 0
|
|
5087
|
+
} : {},
|
|
4750
5088
|
rootDir: commonAncestor(
|
|
4751
5089
|
[
|
|
4752
|
-
workspace ?
|
|
5090
|
+
workspace ? import_node_path9.default.dirname(workspace) : app.project.projectDir,
|
|
4753
5091
|
...used.map((project) => project.projectDir),
|
|
4754
5092
|
...localPackageDirs,
|
|
4755
5093
|
...linkedProducts.flatMap(
|
|
4756
|
-
({ source }) => source.kind === "local" &&
|
|
5094
|
+
({ source }) => source.kind === "local" && import_node_fs5.default.existsSync(source.dir) ? [source.dir] : []
|
|
4757
5095
|
),
|
|
4758
5096
|
...new Set(podSourceDirs)
|
|
4759
|
-
].map((dir) =>
|
|
5097
|
+
].map((dir) => import_node_fs5.default.realpathSync(dir))
|
|
4760
5098
|
),
|
|
4761
5099
|
projectFiles: [
|
|
4762
5100
|
.../* @__PURE__ */ new Set([
|
|
@@ -4774,9 +5112,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4774
5112
|
resourceProducts,
|
|
4775
5113
|
linkedProducts,
|
|
4776
5114
|
localPackageDirs: [
|
|
4777
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
5115
|
+
...new Set(localPackageDirs.map((dir) => import_node_fs5.default.realpathSync(dir)))
|
|
4778
5116
|
].sort(),
|
|
4779
|
-
binaryFrameworks: [...binaryFrameworks].map(([
|
|
5117
|
+
binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
4780
5118
|
packageResolved,
|
|
4781
5119
|
appTargets: appTargetNames,
|
|
4782
5120
|
configuration,
|
|
@@ -4789,6 +5127,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4789
5127
|
function nonEmptyString2(value) {
|
|
4790
5128
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
4791
5129
|
}
|
|
5130
|
+
function stampNativeBuildSdk(identity) {
|
|
5131
|
+
const dtPlatformVersion = identity.dtPlatformVersion ?? NATIVE_GRAPH_SDK_VERSION;
|
|
5132
|
+
return {
|
|
5133
|
+
...identity,
|
|
5134
|
+
dtPlatformVersion,
|
|
5135
|
+
infoPlistStrings: {
|
|
5136
|
+
...identity.infoPlistStrings,
|
|
5137
|
+
DTPlatformVersion: dtPlatformVersion
|
|
5138
|
+
}
|
|
5139
|
+
};
|
|
5140
|
+
}
|
|
4792
5141
|
function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSource) {
|
|
4793
5142
|
if (app.infoPlist === null)
|
|
4794
5143
|
throw new Error(
|
|
@@ -4814,8 +5163,8 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4814
5163
|
const icons = dictionary.CFBundleIcons;
|
|
4815
5164
|
const alternates = isRecord(icons) ? icons.CFBundleAlternateIcons : void 0;
|
|
4816
5165
|
if (isRecord(alternates)) {
|
|
4817
|
-
for (const
|
|
4818
|
-
if (
|
|
5166
|
+
for (const name2 of Object.keys(alternates)) {
|
|
5167
|
+
if (name2) alternateIconNames.add(name2);
|
|
4819
5168
|
}
|
|
4820
5169
|
}
|
|
4821
5170
|
const alternateSetting = settings?.("ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES") ?? "";
|
|
@@ -4853,9 +5202,9 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4853
5202
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
|
|
4854
5203
|
const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
|
|
4855
5204
|
const rootModuleName = readRootModuleName(
|
|
4856
|
-
app.allSources.filter((file) =>
|
|
5205
|
+
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs6.default.existsSync(file)).map((file) => import_node_fs6.default.readFileSync(file, "utf8"))
|
|
4857
5206
|
);
|
|
4858
|
-
return {
|
|
5207
|
+
return stampNativeBuildSdk({
|
|
4859
5208
|
applicationName,
|
|
4860
5209
|
...applicationDisplayName ? { applicationDisplayName } : {},
|
|
4861
5210
|
...rootModuleName ? { rootModuleName } : {},
|
|
@@ -4874,7 +5223,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4874
5223
|
googleSignIn: readGoogleSignInConfiguration(
|
|
4875
5224
|
dictionary,
|
|
4876
5225
|
Object.fromEntries(
|
|
4877
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(
|
|
5226
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs6.default.readFileSync(file, "utf8"))])
|
|
4878
5227
|
)
|
|
4879
5228
|
),
|
|
4880
5229
|
supportedInterfaceOrientations,
|
|
@@ -4883,11 +5232,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4883
5232
|
alternateIconNames: [...alternateIconNames],
|
|
4884
5233
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
4885
5234
|
app.resources,
|
|
4886
|
-
(file) =>
|
|
5235
|
+
(file) => import_node_fs6.default.readFileSync(file, "utf8"),
|
|
4887
5236
|
(file) => {
|
|
4888
|
-
const extension =
|
|
5237
|
+
const extension = import_node_path10.default.extname(file).toLowerCase();
|
|
4889
5238
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
4890
|
-
return `data:${contentType};base64,${
|
|
5239
|
+
return `data:${contentType};base64,${import_node_fs6.default.readFileSync(file).toString("base64")}`;
|
|
4891
5240
|
},
|
|
4892
5241
|
icons,
|
|
4893
5242
|
app.appIconName,
|
|
@@ -4903,10 +5252,8 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4903
5252
|
backgroundTaskIdentifiers,
|
|
4904
5253
|
backgroundModes,
|
|
4905
5254
|
appIntentIdentifiers
|
|
4906
|
-
};
|
|
5255
|
+
});
|
|
4907
5256
|
}
|
|
4908
|
-
var NativeAppTargetSelectionError = class extends Error {
|
|
4909
|
-
};
|
|
4910
5257
|
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
|
|
4911
5258
|
const read = selectNativeAppIdentityReader(platform, {
|
|
4912
5259
|
android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
|
|
@@ -4918,25 +5265,32 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
4918
5265
|
const read = selectNativeAppIdentityReader(platform, {
|
|
4919
5266
|
android: () => null,
|
|
4920
5267
|
ios: () => {
|
|
4921
|
-
const
|
|
4922
|
-
|
|
5268
|
+
const nested = import_node_path10.default.join(projectRoot, "ios");
|
|
5269
|
+
const iosRoot = import_node_fs6.default.existsSync(nested) ? nested : projectRoot;
|
|
5270
|
+
const prefix = iosRoot === nested ? "ios/" : "";
|
|
4923
5271
|
const files = {};
|
|
4924
|
-
for (const entry of
|
|
5272
|
+
for (const entry of import_node_fs6.default.readdirSync(iosRoot, { withFileTypes: true })) {
|
|
4925
5273
|
if (entry.name === "Pods") continue;
|
|
4926
5274
|
if (entry.isDirectory()) {
|
|
4927
5275
|
const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
|
|
4928
|
-
for (const
|
|
4929
|
-
const relative =
|
|
4930
|
-
const file =
|
|
4931
|
-
if (
|
|
5276
|
+
for (const name2 of names) {
|
|
5277
|
+
const relative = `${prefix}${entry.name}/${name2}`;
|
|
5278
|
+
const file = import_node_path10.default.join(projectRoot, relative);
|
|
5279
|
+
if (import_node_fs6.default.existsSync(file)) files[relative] = import_node_fs6.default.readFileSync(file, "utf8");
|
|
4932
5280
|
}
|
|
4933
5281
|
} else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
|
|
4934
|
-
const relative =
|
|
4935
|
-
const file =
|
|
4936
|
-
if (
|
|
5282
|
+
const relative = `${prefix}${entry.name}`;
|
|
5283
|
+
const file = import_node_path10.default.join(projectRoot, relative);
|
|
5284
|
+
if (import_node_fs6.default.existsSync(file)) files[relative] = import_node_fs6.default.readFileSync(file, "utf8");
|
|
4937
5285
|
}
|
|
4938
5286
|
}
|
|
4939
|
-
|
|
5287
|
+
const identity = extractNativeAppIdentityFromFiles(
|
|
5288
|
+
files,
|
|
5289
|
+
"ios",
|
|
5290
|
+
parseInfoPlist,
|
|
5291
|
+
iosTarget
|
|
5292
|
+
);
|
|
5293
|
+
return identity ? stampNativeBuildSdk(identity) : null;
|
|
4940
5294
|
}
|
|
4941
5295
|
});
|
|
4942
5296
|
return read ? read() : null;
|
|
@@ -4944,41 +5298,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
4944
5298
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
4945
5299
|
const files = {};
|
|
4946
5300
|
if (androidMergedManifest) {
|
|
4947
|
-
const file =
|
|
4948
|
-
if (!
|
|
4949
|
-
files[androidMergedManifest] =
|
|
5301
|
+
const file = import_node_path10.default.resolve(projectRoot, androidMergedManifest);
|
|
5302
|
+
if (!import_node_fs6.default.existsSync(file)) return null;
|
|
5303
|
+
files[androidMergedManifest] = import_node_fs6.default.readFileSync(file, "utf8");
|
|
4950
5304
|
} else {
|
|
4951
|
-
const androidRoot =
|
|
4952
|
-
if (!
|
|
5305
|
+
const androidRoot = import_node_path10.default.join(projectRoot, "android");
|
|
5306
|
+
if (!import_node_fs6.default.existsSync(androidRoot)) return null;
|
|
4953
5307
|
const collect = (directory) => {
|
|
4954
|
-
for (const entry of
|
|
4955
|
-
const file =
|
|
5308
|
+
for (const entry of import_node_fs6.default.readdirSync(directory, { withFileTypes: true })) {
|
|
5309
|
+
const file = import_node_path10.default.join(directory, entry.name);
|
|
4956
5310
|
if (entry.isDirectory()) collect(file);
|
|
4957
5311
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
4958
|
-
files[
|
|
5312
|
+
files[import_node_path10.default.relative(projectRoot, file).split(import_node_path10.default.sep).join("/")] = import_node_fs6.default.readFileSync(file, "utf8");
|
|
4959
5313
|
}
|
|
4960
5314
|
};
|
|
4961
|
-
for (const module2 of
|
|
5315
|
+
for (const module2 of import_node_fs6.default.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
4962
5316
|
if (!module2.isDirectory()) continue;
|
|
4963
|
-
const outputs =
|
|
5317
|
+
const outputs = import_node_path10.default.join(
|
|
4964
5318
|
androidRoot,
|
|
4965
5319
|
module2.name,
|
|
4966
5320
|
"build/intermediates/merged_manifests"
|
|
4967
5321
|
);
|
|
4968
|
-
if (
|
|
5322
|
+
if (import_node_fs6.default.existsSync(outputs)) collect(outputs);
|
|
4969
5323
|
}
|
|
4970
5324
|
}
|
|
4971
5325
|
for (const manifest of Object.keys(files)) {
|
|
4972
5326
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
4973
5327
|
if (!resourceDirectory) continue;
|
|
4974
|
-
const absolute =
|
|
4975
|
-
if (!
|
|
4976
|
-
for (const entry of
|
|
5328
|
+
const absolute = import_node_path10.default.resolve(projectRoot, resourceDirectory);
|
|
5329
|
+
if (!import_node_fs6.default.existsSync(absolute)) continue;
|
|
5330
|
+
for (const entry of import_node_fs6.default.readdirSync(absolute, { withFileTypes: true })) {
|
|
4977
5331
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
4978
|
-
for (const resource of
|
|
5332
|
+
for (const resource of import_node_fs6.default.readdirSync(import_node_path10.default.join(absolute, entry.name))) {
|
|
4979
5333
|
if (!resource.endsWith(".xml")) continue;
|
|
4980
5334
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
4981
|
-
files[file] =
|
|
5335
|
+
files[file] = import_node_fs6.default.readFileSync(import_node_path10.default.resolve(projectRoot, file), "utf8");
|
|
4982
5336
|
}
|
|
4983
5337
|
}
|
|
4984
5338
|
}
|
|
@@ -4995,7 +5349,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
4995
5349
|
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
4996
5350
|
if (!app) return null;
|
|
4997
5351
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
4998
|
-
const projectManifestPath =
|
|
5352
|
+
const projectManifestPath = import_node_path10.default.join(projectRoot, "package.json");
|
|
4999
5353
|
const projectRequire = (0, import_node_module.createRequire)(projectManifestPath);
|
|
5000
5354
|
let reanimatedManifestPath;
|
|
5001
5355
|
try {
|
|
@@ -5009,30 +5363,30 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5009
5363
|
throw error;
|
|
5010
5364
|
}
|
|
5011
5365
|
const installedManifest = JSON.parse(
|
|
5012
|
-
|
|
5366
|
+
import_node_fs6.default.readFileSync(reanimatedManifestPath, "utf8")
|
|
5013
5367
|
);
|
|
5014
5368
|
const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
5015
5369
|
if (!installedVersion) throw new Error("Reanimated package version is malformed");
|
|
5016
5370
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
5017
5371
|
const defaults = JSON.parse(
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5372
|
+
import_node_fs6.default.readFileSync(
|
|
5373
|
+
import_node_path10.default.join(
|
|
5374
|
+
import_node_path10.default.dirname(reanimatedManifestPath),
|
|
5021
5375
|
"src/featureFlags/staticFlags.json"
|
|
5022
5376
|
),
|
|
5023
5377
|
"utf8"
|
|
5024
5378
|
)
|
|
5025
5379
|
);
|
|
5026
5380
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
5027
|
-
const manifest = JSON.parse(
|
|
5381
|
+
const manifest = JSON.parse(import_node_fs6.default.readFileSync(projectManifestPath, "utf8"));
|
|
5028
5382
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
5029
5383
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
5030
5384
|
if (overrides !== void 0 && !isRecord(overrides)) {
|
|
5031
5385
|
throw new Error("Reanimated static flag overrides are malformed");
|
|
5032
5386
|
}
|
|
5033
5387
|
const flags = {};
|
|
5034
|
-
for (const [
|
|
5035
|
-
flags[
|
|
5388
|
+
for (const [name2, value] of Object.entries({ ...defaults, ...overrides })) {
|
|
5389
|
+
flags[name2] = String(value) === "true";
|
|
5036
5390
|
}
|
|
5037
5391
|
if (flags.USE_LEGACY_LAYOUT_ANIMATIONS_PROXY && flags.ENABLE_SHARED_ELEMENT_TRANSITIONS) {
|
|
5038
5392
|
throw new Error(
|
|
@@ -5047,40 +5401,9 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5047
5401
|
return { ...identity, reanimatedStaticFeatureFlags: flags };
|
|
5048
5402
|
}
|
|
5049
5403
|
function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
5050
|
-
const
|
|
5051
|
-
if (!
|
|
5052
|
-
|
|
5053
|
-
if (projects.length === 0) return null;
|
|
5054
|
-
if (projects.length > 1 && !iosTarget) {
|
|
5055
|
-
throw new NativeAppTargetSelectionError(
|
|
5056
|
-
`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(", ")}`
|
|
5057
|
-
);
|
|
5058
|
-
}
|
|
5059
|
-
let project = projects[0];
|
|
5060
|
-
if (iosTarget && projects.length > 1) {
|
|
5061
|
-
const matches = projects.filter(
|
|
5062
|
-
(entry) => listXcodeAppTargets(import_node_path7.default.join(iosRoot, entry.name), {
|
|
5063
|
-
requireSources: false
|
|
5064
|
-
}).includes(iosTarget)
|
|
5065
|
-
);
|
|
5066
|
-
if (matches.length === 0) {
|
|
5067
|
-
throw new Error(`native app identity has no application target ${iosTarget}`);
|
|
5068
|
-
}
|
|
5069
|
-
if (matches.length > 1) {
|
|
5070
|
-
throw new Error(
|
|
5071
|
-
`native app identity target ${iosTarget} is ambiguous across ${matches.map((entry) => entry.name).join(", ")}`
|
|
5072
|
-
);
|
|
5073
|
-
}
|
|
5074
|
-
project = matches[0];
|
|
5075
|
-
}
|
|
5076
|
-
const xcodeproj = import_node_path7.default.join(iosRoot, project.name);
|
|
5077
|
-
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
5078
|
-
if (!iosTarget && appTargets.length > 1) {
|
|
5079
|
-
throw new NativeAppTargetSelectionError(
|
|
5080
|
-
`native app identity requires a selected app target; set withPeach's iosTarget to one of: ${appTargets.join(", ")}`
|
|
5081
|
-
);
|
|
5082
|
-
}
|
|
5083
|
-
return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
|
|
5404
|
+
const selected = selectIosAppTarget(projectRoot, iosTarget);
|
|
5405
|
+
if (!selected) return null;
|
|
5406
|
+
return readXcodeAppTarget(selected.xcodeproj, selected.target, "Release", {
|
|
5084
5407
|
requireSources: false,
|
|
5085
5408
|
prepareGeneratedSources: true,
|
|
5086
5409
|
environment
|