peachsim 0.1.1674 → 0.1.1692
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/cli/commands/control.ts +13 -1
- package/cli/commands/coverage-swift.ts +150 -27
- package/cli/commands/coverage.ts +219 -20
- package/cli/commands/detect.ts +10 -6
- package/cli/commands/inspect/actions.ts +1 -0
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/wait-ready.ts +7 -0
- package/cli/commands/screenshot.ts +12 -0
- package/cli/outbound-endpoints.ts +12 -0
- package/detox/index.ts +11 -1
- package/detox/jest-environment.cjs +14 -0
- 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 +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +4833 -2432
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- 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 +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +6 -4
- package/dist-lib/detox/jest-environment.cjs +14 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3785 -1737
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +4253 -2205
- package/dist-lib/host/fetch-proxy-handler.cjs +20 -7
- 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 +1 -1
- package/dist-lib/index.cjs +2065 -796
- 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 +1 -1
- package/dist-lib/menu.mjs +1 -1
- 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 +6325 -4287
- package/dist-lib/native-app-identity-project.cjs +192 -55
- package/dist-lib/native-app-identity-project.mjs +235 -86
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- 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 +27 -23
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +156 -87
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +3 -2
- package/dist-lib/sdk.mjs +3 -2
- package/dist-lib/skills.cjs +5036 -2833
- package/dist-lib/swift-compile.cjs +2937 -437
- package/dist-lib/swift-compile.mjs +2932 -435
- package/dist-lib/swift-package.cjs +137 -49
- package/dist-lib/swift-package.mjs +132 -49
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +26 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6005 -1725
- package/dist-lib/vite.cjs +1911 -776
- package/dist-lib/worklet-executable.cjs +7 -4
- package/dist-lib/worklet-executable.mjs +7 -4
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +24 -2
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +8 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +60 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +117 -2
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
- package/sdk/ios/usr/include/arm/param.h +151 -0
- package/sdk/ios/usr/include/complex.h +167 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +8 -0
- package/sdk/ios/usr/include/dlfcn.h +1 -2
- package/sdk/ios/usr/include/mach/mach_types.h +1 -0
- package/sdk/ios/usr/include/machine/param.h +42 -0
- package/sdk/ios/usr/include/math.h +835 -2
- package/sdk/ios/usr/include/net/if.h +1 -2
- package/sdk/ios/usr/include/peach/pthread.h +4 -4
- package/sdk/ios/usr/include/pthread/qos.h +304 -0
- package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
- package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
- package/sdk/ios/usr/include/sys/cdefs.h +3 -1
- package/sdk/ios/usr/include/sys/param.h +235 -0
- package/sdk/ios/usr/include/sys/proc.h +1 -0
- package/sdk/ios/usr/include/sys/qos.h +151 -12
- package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
- package/sdk/ios/wasm/include/fcntl.h +11 -0
- package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
- package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
- package/sdk/ios/wasm/include/machine/_types.h +153 -0
- package/sdk/ios/wasm/include/machine/endian.h +2 -0
- package/sdk/ios/wasm/include/machine/limits.h +2 -0
- package/sdk/ios/wasm/include/machine/types.h +30 -0
- package/sdk/ios/wasm/include/poll.h +8 -0
- package/sdk/ios/wasm/include/pthread.h +50 -0
- package/sdk/ios/wasm/include/signal.h +72 -0
- package/sdk/ios/wasm/include/stdlib.h +3 -0
- package/sdk/ios/wasm/include/string.h +10 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
- package/sdk/ios/wasm/include/sys/mman.h +122 -0
- package/sdk/ios/wasm/include/sys/select.h +37 -0
- package/sdk/ios/wasm/include/sys/signal.h +259 -0
- package/sdk/ios/wasm/include/sys/socket.h +8 -0
- package/sdk/ios/wasm/include/sys/types.h +14 -0
- package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
- package/sdk/ios/wasm/include/sys/uio.h +11 -0
- package/sdk/ios/wasm/include/sys/wait.h +89 -0
- package/sdk/ios/wasm/include/time.h +8 -0
- package/sdk/ios/wasm/include/unistd.h +17 -0
- package/src/bridge-contract.ts +2 -0
- package/src/chromium-admission.ts +10 -5
- package/src/device-catalog.ts +4 -4
- package/src/generated/swift-c-predefines.json +1988 -0
- package/src/host/fetch-proxy-handler.ts +20 -0
- package/src/metro-plugin.ts +5 -2
- package/src/nitro-adapter.lock.json +6 -6
- package/src/nitro-bundle.ts +1 -0
- package/src/nitro-compile.ts +67 -2
- package/src/nitroContract.ts +18 -2
- package/src/numbered-lock.ts +72 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
- package/src/react-native-coverage/capability-source-references.ts +50 -13
- package/src/react-native-coverage/native-source-credit.ts +126 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
- package/src/react-native-coverage/native-surface.ts +49 -0
- package/src/react-native-coverage/verified-reach.ts +22 -2
- package/src/runtime-assets.ts +17 -0
- package/src/swift-compile.ts +530 -97
- package/src/swift-coverage/indexing.ts +17 -1
- package/src/swift-coverage/package.ts +3 -1
- package/src/swift-coverage/sdk.ts +71 -0
- package/src/swift-coverage/source.ts +74 -2
- package/src/swift-coverage/types.ts +6 -0
- package/src/swift-coverage/xcode-assets.ts +62 -2
- package/src/swift-coverage/xcode-packages.ts +11 -6
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-host.ts +457 -62
- package/src/swift-objc-compile.ts +26 -26
- package/src/swift-objc-metadata.ts +2 -8
- package/src/swift-objc-platform.ts +53 -0
- package/src/swift-objc-standin.ts +66 -12
- package/src/swift-package-manifest.ts +196 -28
- package/src/swift-package.ts +186 -60
- package/src/swift-packages.ts +298 -88
- package/src/swift-source-file.ts +10 -15
- package/src/swift-source-pods.ts +288 -0
- package/src/swift-standins.ts +87 -13
- package/src/swift-submit.ts +5 -0
- package/src/swift-toolchain.ts +32 -10
- package/src/swiftContract.ts +160 -75
- package/src/target-matcher.ts +15 -2
- package/src/vite-plugin-one.ts +5 -4
- package/src/worker-system-chunks.ts +7 -1
- package/src/worklet-executable.ts +7 -3
- package/src/xcode-json-project.ts +14 -2
- package/src/xcode-project.ts +193 -69
|
@@ -49,6 +49,9 @@ export interface SwiftManifestTarget {
|
|
|
49
49
|
mainActorIsolation: boolean
|
|
50
50
|
defines: SwiftManifestSetting[]
|
|
51
51
|
libraries: SwiftManifestSetting[]
|
|
52
|
+
experimentalFeatures: SwiftManifestSetting[]
|
|
53
|
+
upcomingFeatures: SwiftManifestSetting[]
|
|
54
|
+
swiftFlags: { flags: string[]; configuration: 'debug' | 'release' | null }[]
|
|
52
55
|
nativeSettings: {
|
|
53
56
|
tool: 'c' | 'cxx'
|
|
54
57
|
flags: string[]
|
|
@@ -56,6 +59,8 @@ export interface SwiftManifestTarget {
|
|
|
56
59
|
}[]
|
|
57
60
|
/** true when the target declares `resources:`. */
|
|
58
61
|
declaresResources: boolean
|
|
62
|
+
/** explicit process/copy inputs, relative to the target directory. */
|
|
63
|
+
resourcePaths: string[]
|
|
59
64
|
/** coverage must not silently omit plugin-generated input or Swift flags. */
|
|
60
65
|
hasPluginUsages: boolean
|
|
61
66
|
unsupportedSwiftSettings: string[]
|
|
@@ -77,7 +82,10 @@ export interface SwiftManifestToolchain {
|
|
|
77
82
|
export interface SwiftPackageManifest {
|
|
78
83
|
toolchain: SwiftManifestToolchain
|
|
79
84
|
name: string
|
|
85
|
+
toolsVersion: string
|
|
80
86
|
dir: string
|
|
87
|
+
/** the iOS version the manifest declares in platforms, null when it declares none. */
|
|
88
|
+
iosDeployment: string | null
|
|
81
89
|
/** library product name to the targets it vends. */
|
|
82
90
|
products: Map<string, string[]>
|
|
83
91
|
targets: Map<string, SwiftManifestTarget>
|
|
@@ -85,6 +93,51 @@ export interface SwiftPackageManifest {
|
|
|
85
93
|
packages: Map<string, { url: string } | { dir: string }>
|
|
86
94
|
}
|
|
87
95
|
|
|
96
|
+
/** resolve an unqualified product against its declared package providers. */
|
|
97
|
+
export function swiftProductDependency<T extends { manifest: SwiftPackageManifest }>(
|
|
98
|
+
manifest: SwiftPackageManifest,
|
|
99
|
+
dependency: Extract<SwiftTargetDependency, { kind: 'product' }>,
|
|
100
|
+
load: (source: { url: string } | { dir: string }) => T | string,
|
|
101
|
+
): T | string
|
|
102
|
+
export function swiftProductDependency<T extends { manifest: SwiftPackageManifest }>(
|
|
103
|
+
manifest: SwiftPackageManifest,
|
|
104
|
+
dependency: Extract<SwiftTargetDependency, { kind: 'product' }>,
|
|
105
|
+
load: (source: { url: string } | { dir: string }) => T | string | undefined,
|
|
106
|
+
): T | string | undefined
|
|
107
|
+
export function swiftProductDependency<T extends { manifest: SwiftPackageManifest }>(
|
|
108
|
+
manifest: SwiftPackageManifest,
|
|
109
|
+
dependency: Extract<SwiftTargetDependency, { kind: 'product' }>,
|
|
110
|
+
load: (source: { url: string } | { dir: string }) => T | string | undefined,
|
|
111
|
+
): T | string | undefined {
|
|
112
|
+
if (dependency.package !== null) {
|
|
113
|
+
const source = manifest.packages.get(dependency.package)
|
|
114
|
+
return source
|
|
115
|
+
? load(source)
|
|
116
|
+
: `${manifest.name} names no package ${dependency.package}`
|
|
117
|
+
}
|
|
118
|
+
const sources = new Map(
|
|
119
|
+
[...manifest.packages.values()].map((source) => [
|
|
120
|
+
'dir' in source ? source.dir : source.url,
|
|
121
|
+
source,
|
|
122
|
+
]),
|
|
123
|
+
)
|
|
124
|
+
const matches: T[] = []
|
|
125
|
+
const failures: string[] = []
|
|
126
|
+
let unresolved = false
|
|
127
|
+
for (const source of sources.values()) {
|
|
128
|
+
const loaded = load(source)
|
|
129
|
+
if (typeof loaded === 'string') failures.push(loaded)
|
|
130
|
+
else if (loaded?.manifest.products.has(dependency.name)) matches.push(loaded)
|
|
131
|
+
else if (loaded === undefined) unresolved = true
|
|
132
|
+
}
|
|
133
|
+
if (matches.length > 1)
|
|
134
|
+
return `ambiguous library product ${dependency.name} is vended by ${matches.map(({ manifest }) => manifest.dir).join(', ')}`
|
|
135
|
+
if (matches[0]) return matches[0]
|
|
136
|
+
if (failures.length) return failures.join('; ')
|
|
137
|
+
if (unresolved) return undefined
|
|
138
|
+
return `${manifest.name} has no dependency vending ${dependency.name}`
|
|
139
|
+
}
|
|
140
|
+
|
|
88
141
|
// the dump's tagged unions: `{ "<case>": [payload...] }`
|
|
89
142
|
type Json = null | boolean | number | string | Json[] | { [key: string]: Json }
|
|
90
143
|
const record = (value: Json | undefined): Record<string, Json> =>
|
|
@@ -187,26 +240,34 @@ function defaultTraits(manifest: Record<string, Json>): Set<string> {
|
|
|
187
240
|
return enabled
|
|
188
241
|
}
|
|
189
242
|
|
|
190
|
-
// a condition holds
|
|
243
|
+
// a condition holds when it names no platforms or names the destination, and its
|
|
191
244
|
// traits, if any, include one the package enables by default
|
|
192
|
-
function
|
|
245
|
+
function linksOnPlatform(
|
|
246
|
+
condition: Json | undefined,
|
|
247
|
+
traits: Set<string>,
|
|
248
|
+
platform: string,
|
|
249
|
+
): boolean {
|
|
193
250
|
const { platformNames, traits: needed } = record(condition)
|
|
194
251
|
const platforms = array(platformNames)
|
|
195
|
-
if (platforms.length > 0 && !platforms.includes(
|
|
252
|
+
if (platforms.length > 0 && !platforms.includes(platform)) return false
|
|
196
253
|
const gates = array(needed)
|
|
197
254
|
return gates.length === 0 || gates.some((name) => traits.has(string(name) ?? ''))
|
|
198
255
|
}
|
|
199
256
|
|
|
200
257
|
/** the manifest of the package at `dir`, evaluated once per manifest content. */
|
|
201
|
-
export function swiftPackageManifest(
|
|
258
|
+
export function swiftPackageManifest(
|
|
259
|
+
dir: string,
|
|
260
|
+
platform = 'ios',
|
|
261
|
+
): SwiftPackageManifest {
|
|
202
262
|
dir = fs.realpathSync(dir)
|
|
203
263
|
const { key, raw, toolchain } = dump(dir)
|
|
204
|
-
const
|
|
264
|
+
const evaluatedKey = `${key}:${platform}`
|
|
265
|
+
const known = evaluated.get(evaluatedKey)
|
|
205
266
|
if (known) return known
|
|
206
267
|
const traits = defaultTraits(raw)
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
)
|
|
268
|
+
const toolsVersion = string(record(raw.toolsVersion)._version) ?? '5.0'
|
|
269
|
+
const [tools = 5, minor = 0] = toolsVersion.split('.').map(Number)
|
|
270
|
+
const namedProducts = tools > 5 || (tools === 5 && minor >= 2)
|
|
210
271
|
const declaredModeValues = array(raw.swiftLanguageVersions).flatMap(
|
|
211
272
|
(mode) => string(mode) ?? [],
|
|
212
273
|
)
|
|
@@ -265,24 +326,24 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
265
326
|
for (const dependency of array(target.dependencies)) {
|
|
266
327
|
const { target: local, product, byName } = record(dependency)
|
|
267
328
|
const payload = array(local ?? product ?? byName)
|
|
268
|
-
if (!
|
|
329
|
+
if (!linksOnPlatform(payload[payload.length - 1], traits, platform)) continue
|
|
269
330
|
const dependencyName = string(payload[0])
|
|
270
331
|
if (!dependencyName) continue
|
|
271
332
|
if (product)
|
|
272
333
|
dependencies.push({
|
|
273
334
|
kind: 'product',
|
|
274
335
|
name: dependencyName,
|
|
275
|
-
package:
|
|
336
|
+
package: string(payload[1])?.toLowerCase() ?? null,
|
|
276
337
|
})
|
|
277
|
-
//
|
|
278
|
-
//
|
|
338
|
+
// tools 5.2 introduced target-based resolution, where a by-name
|
|
339
|
+
// product must match its package's dependency resolution name.
|
|
279
340
|
else if (local || names.has(dependencyName))
|
|
280
341
|
dependencies.push({ kind: 'target', name: dependencyName })
|
|
281
342
|
else
|
|
282
343
|
dependencies.push({
|
|
283
344
|
kind: 'product',
|
|
284
345
|
name: dependencyName,
|
|
285
|
-
package: dependencyName.toLowerCase(),
|
|
346
|
+
package: namedProducts ? dependencyName.toLowerCase() : null,
|
|
286
347
|
})
|
|
287
348
|
}
|
|
288
349
|
let languageMode = packageMode
|
|
@@ -298,6 +359,9 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
298
359
|
let mainActorIsolation = false
|
|
299
360
|
const defines: SwiftManifestSetting[] = []
|
|
300
361
|
const libraries: SwiftManifestSetting[] = []
|
|
362
|
+
const experimentalFeatures: SwiftManifestSetting[] = []
|
|
363
|
+
const upcomingFeatures: SwiftManifestSetting[] = []
|
|
364
|
+
const swiftFlags: SwiftManifestTarget['swiftFlags'] = []
|
|
301
365
|
const nativeSettings: SwiftManifestTarget['nativeSettings'] = []
|
|
302
366
|
const unsupportedSwiftSettings: string[] = []
|
|
303
367
|
for (const [tool, standard] of [
|
|
@@ -312,6 +376,12 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
312
376
|
const settingKind = record(rawKind)
|
|
313
377
|
if (tool === 'swift') {
|
|
314
378
|
const kinds = Object.keys(settingKind)
|
|
379
|
+
// a feature is a name with an optional =value (StrictConcurrency=complete).
|
|
380
|
+
const feature = (kind: string) =>
|
|
381
|
+
/^[A-Za-z_][A-Za-z0-9_]*(?:=[A-Za-z_][A-Za-z0-9_.-]*)?$/.test(
|
|
382
|
+
string(record(settingKind[kind])._0) ?? '',
|
|
383
|
+
)
|
|
384
|
+
const unsafe = record(settingKind.unsafeFlags)._0
|
|
315
385
|
const supported =
|
|
316
386
|
kinds.length === 1 &&
|
|
317
387
|
((kinds[0] === 'define' &&
|
|
@@ -324,11 +394,20 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
324
394
|
Object.keys(record(condition)).length === 0 &&
|
|
325
395
|
['MainActor', 'nonisolated'].includes(
|
|
326
396
|
string(record(settingKind.defaultIsolation)._0) ?? '',
|
|
327
|
-
))
|
|
397
|
+
)) ||
|
|
398
|
+
(kinds[0] === 'enableExperimentalFeature' &&
|
|
399
|
+
feature('enableExperimentalFeature')) ||
|
|
400
|
+
(kinds[0] === 'enableUpcomingFeature' && feature('enableUpcomingFeature')) ||
|
|
401
|
+
(kinds[0] === 'unsafeFlags' &&
|
|
402
|
+
Array.isArray(unsafe) &&
|
|
403
|
+
unsafe.every((flag) => typeof flag === 'string')))
|
|
328
404
|
if (!supported)
|
|
329
405
|
unsupportedSwiftSettings.push(JSON.stringify({ kind: rawKind, condition }))
|
|
330
406
|
}
|
|
331
|
-
if (
|
|
407
|
+
if (
|
|
408
|
+
(tool === 'c' || tool === 'cxx') &&
|
|
409
|
+
linksOnPlatform(condition, traits, platform)
|
|
410
|
+
) {
|
|
332
411
|
const config = string(record(condition).config)
|
|
333
412
|
const header = string(record(settingKind.headerSearchPath)._0)
|
|
334
413
|
const definition = string(record(settingKind.define)._0)
|
|
@@ -365,7 +444,7 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
365
444
|
define &&
|
|
366
445
|
string(tool) === 'swift' &&
|
|
367
446
|
/^[A-Za-z_][A-Za-z0-9_]*$/.test(define) &&
|
|
368
|
-
|
|
447
|
+
linksOnPlatform(condition, traits, platform)
|
|
369
448
|
) {
|
|
370
449
|
const config = string(record(condition).config)
|
|
371
450
|
defines.push({
|
|
@@ -373,8 +452,33 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
373
452
|
configuration: config === 'debug' || config === 'release' ? config : null,
|
|
374
453
|
})
|
|
375
454
|
}
|
|
455
|
+
// experimental and upcoming features and raw swift flags ride the same
|
|
456
|
+
// conditions a define does; a target that needs BuiltinModule or library
|
|
457
|
+
// evolution compiles with it exactly as swiftpm builds it.
|
|
458
|
+
if (string(tool) === 'swift' && linksOnPlatform(condition, traits, platform)) {
|
|
459
|
+
const config = string(record(condition).config)
|
|
460
|
+
const configuration = config === 'debug' || config === 'release' ? config : null
|
|
461
|
+
for (const [kind, into] of [
|
|
462
|
+
['enableExperimentalFeature', experimentalFeatures],
|
|
463
|
+
['enableUpcomingFeature', upcomingFeatures],
|
|
464
|
+
] as const) {
|
|
465
|
+
const name = string(record(settingKind[kind])._0)
|
|
466
|
+
if (name && /^[A-Za-z_][A-Za-z0-9_]*(?:=[A-Za-z_][A-Za-z0-9_.-]*)?$/.test(name))
|
|
467
|
+
into.push({ name, configuration })
|
|
468
|
+
}
|
|
469
|
+
const flags = record(settingKind.unsafeFlags)._0
|
|
470
|
+
if (Array.isArray(flags) && flags.every((flag) => typeof flag === 'string'))
|
|
471
|
+
swiftFlags.push({
|
|
472
|
+
flags: flags.filter((flag): flag is string => typeof flag === 'string'),
|
|
473
|
+
configuration,
|
|
474
|
+
})
|
|
475
|
+
}
|
|
376
476
|
const library = string(record(settingKind.linkedLibrary)._0)
|
|
377
|
-
if (
|
|
477
|
+
if (
|
|
478
|
+
library &&
|
|
479
|
+
string(tool) === 'linker' &&
|
|
480
|
+
linksOnPlatform(condition, traits, platform)
|
|
481
|
+
) {
|
|
378
482
|
const config = string(record(condition).config)
|
|
379
483
|
libraries.push({
|
|
380
484
|
name: library,
|
|
@@ -400,8 +504,14 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
400
504
|
mainActorIsolation,
|
|
401
505
|
defines,
|
|
402
506
|
libraries,
|
|
507
|
+
experimentalFeatures,
|
|
508
|
+
upcomingFeatures,
|
|
509
|
+
swiftFlags,
|
|
403
510
|
nativeSettings,
|
|
404
511
|
declaresResources: array(target.resources).length > 0,
|
|
512
|
+
resourcePaths: array(target.resources).flatMap(
|
|
513
|
+
(resource) => string(record(resource).path) ?? [],
|
|
514
|
+
),
|
|
405
515
|
hasPluginUsages: array(target.pluginUsages).length > 0,
|
|
406
516
|
unsupportedSwiftSettings,
|
|
407
517
|
publicHeadersPath: string(target.publicHeadersPath) ?? 'include',
|
|
@@ -411,31 +521,83 @@ export function swiftPackageManifest(dir: string): SwiftPackageManifest {
|
|
|
411
521
|
}
|
|
412
522
|
const name = string(raw.name)
|
|
413
523
|
if (!name) throw new Error(`swiftpm returned no package name for ${dir}`)
|
|
414
|
-
const
|
|
415
|
-
|
|
524
|
+
const iosDeployment =
|
|
525
|
+
array(raw.platforms)
|
|
526
|
+
.map(record)
|
|
527
|
+
.flatMap((platform) =>
|
|
528
|
+
platform.platformName === 'ios' ? (string(platform.version) ?? []) : [],
|
|
529
|
+
)[0] ?? null
|
|
530
|
+
const manifest = {
|
|
531
|
+
name,
|
|
532
|
+
toolsVersion,
|
|
533
|
+
dir,
|
|
534
|
+
iosDeployment,
|
|
535
|
+
products,
|
|
536
|
+
targets,
|
|
537
|
+
packages,
|
|
538
|
+
toolchain,
|
|
539
|
+
}
|
|
540
|
+
evaluated.set(evaluatedKey, manifest)
|
|
416
541
|
return manifest
|
|
417
542
|
}
|
|
418
543
|
|
|
419
544
|
const within = (file: string, roots: string[]) =>
|
|
420
545
|
roots.some((root) => file === root || file.startsWith(`${root}${path.sep}`))
|
|
421
546
|
|
|
422
|
-
function walk(
|
|
547
|
+
function walk(
|
|
548
|
+
dir: string,
|
|
549
|
+
boundary: string,
|
|
550
|
+
ancestors: ReadonlySet<string> = new Set(),
|
|
551
|
+
resources = false,
|
|
552
|
+
): string[] {
|
|
423
553
|
if (!fs.existsSync(dir)) return []
|
|
554
|
+
const real = fs.realpathSync(dir)
|
|
555
|
+
const relative = path.relative(boundary, real)
|
|
556
|
+
if (
|
|
557
|
+
relative === '..' ||
|
|
558
|
+
relative.startsWith(`..${path.sep}`) ||
|
|
559
|
+
path.isAbsolute(relative)
|
|
560
|
+
)
|
|
561
|
+
throw new Error(`swift package input escapes ${boundary}: ${dir}`)
|
|
424
562
|
if (fs.statSync(dir).isFile()) return [dir]
|
|
563
|
+
if (ancestors.has(real))
|
|
564
|
+
throw new Error(`swift package input has a directory cycle: ${dir}`)
|
|
565
|
+
const parents = new Set([...ancestors, real])
|
|
425
566
|
const out: string[] = []
|
|
426
567
|
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
427
|
-
if (entry.name.startsWith('.')) continue
|
|
568
|
+
if (!resources && entry.name.startsWith('.')) continue
|
|
569
|
+
// swiftpm never assigns a documentation catalog's contents to a target
|
|
570
|
+
// (`swift package describe` omits them; other dotted directories stay).
|
|
571
|
+
if (!resources && entry.isDirectory() && entry.name.endsWith('.docc')) continue
|
|
428
572
|
const full = path.join(dir, entry.name)
|
|
429
|
-
if (entry.isDirectory()
|
|
573
|
+
if (entry.isDirectory() || entry.isSymbolicLink())
|
|
574
|
+
out.push(...walk(full, boundary, parents, resources))
|
|
430
575
|
else if (entry.isFile()) out.push(full)
|
|
431
576
|
}
|
|
432
577
|
return out
|
|
433
578
|
}
|
|
434
579
|
|
|
580
|
+
/** original resource bytes are independent of the target's explicit sources. */
|
|
581
|
+
export function swiftTargetResourceFiles(
|
|
582
|
+
manifest: SwiftPackageManifest,
|
|
583
|
+
target: SwiftManifestTarget,
|
|
584
|
+
): string[] {
|
|
585
|
+
const excluded = target.exclude.map((file) => path.resolve(target.dir, file))
|
|
586
|
+
return [
|
|
587
|
+
...new Set(
|
|
588
|
+
target.resourcePaths.flatMap((resource) =>
|
|
589
|
+
walk(path.resolve(target.dir, resource), manifest.dir, new Set(), true),
|
|
590
|
+
),
|
|
591
|
+
),
|
|
592
|
+
]
|
|
593
|
+
.filter((file) => !within(file, excluded))
|
|
594
|
+
.sort()
|
|
595
|
+
}
|
|
596
|
+
|
|
435
597
|
/**
|
|
436
598
|
* the files swiftpm assigns a target, absolute and sorted: its `sources:`
|
|
437
|
-
* (else its whole directory), less its `exclude
|
|
438
|
-
* the package's other targets nested inside it.
|
|
599
|
+
* (else its whole directory), plus its public headers, less its `exclude:`, documentation catalogs
|
|
600
|
+
* and the directories of the package's other targets nested inside it.
|
|
439
601
|
*/
|
|
440
602
|
export function swiftTargetFiles(
|
|
441
603
|
manifest: SwiftPackageManifest,
|
|
@@ -452,10 +614,16 @@ export function swiftTargetFiles(
|
|
|
452
614
|
: [],
|
|
453
615
|
),
|
|
454
616
|
]
|
|
455
|
-
return
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
617
|
+
return [
|
|
618
|
+
...new Set(
|
|
619
|
+
[
|
|
620
|
+
...included.flatMap((directory) => walk(directory, manifest.dir)),
|
|
621
|
+
...walk(path.resolve(target.dir, target.publicHeadersPath), manifest.dir).filter(
|
|
622
|
+
(file) => /\.(?:h|hh|hpp|hxx|inc|inl|modulemap)$/.test(file),
|
|
623
|
+
),
|
|
624
|
+
].filter((file) => !within(file, excluded)),
|
|
625
|
+
),
|
|
626
|
+
].sort()
|
|
459
627
|
}
|
|
460
628
|
|
|
461
629
|
/** validated membership from SwiftPM's PackageBuilder, never a second directory walker. */
|