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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -27,8 +27,13 @@ __export(swift_package_exports, {
|
|
|
27
27
|
SWIFT_NATIVE_SOURCE_EXTENSIONS: () => SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
28
28
|
clangMacroSetting: () => clangMacroSetting,
|
|
29
29
|
isSwiftManifestFile: () => isSwiftManifestFile,
|
|
30
|
+
isSwiftNativeTranslationUnit: () => isSwiftNativeTranslationUnit,
|
|
31
|
+
manifestCalls: () => manifestCalls,
|
|
32
|
+
moduleMapName: () => moduleMapName,
|
|
30
33
|
swiftImplicitResourcePaths: () => swiftImplicitResourcePaths,
|
|
31
34
|
swiftManifestCxxLanguageStandard: () => swiftManifestCxxLanguageStandard,
|
|
35
|
+
swiftManifestDeclarations: () => swiftManifestDeclarations,
|
|
36
|
+
swiftManifestPackages: () => swiftManifestPackages,
|
|
32
37
|
swiftManifestTargets: () => swiftManifestTargets,
|
|
33
38
|
swiftMetalSourceFiles: () => swiftMetalSourceFiles,
|
|
34
39
|
swiftObjCResourceAccessor: () => swiftObjCResourceAccessor,
|
|
@@ -139,13 +144,31 @@ function splitManifestArguments(source) {
|
|
|
139
144
|
if (final) arguments_.push(final);
|
|
140
145
|
return arguments_;
|
|
141
146
|
}
|
|
142
|
-
|
|
147
|
+
function swiftManifestPackages(manifest) {
|
|
148
|
+
return new Map(
|
|
149
|
+
manifestCalls(manifest, ["package"]).flatMap(({ flat }) => {
|
|
150
|
+
const directory = /\bpath\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
151
|
+
if (!directory) return [];
|
|
152
|
+
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1] ?? directory.split("/").pop();
|
|
153
|
+
return [[name.toLowerCase(), directory]];
|
|
154
|
+
})
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
var SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS = [
|
|
143
158
|
".c",
|
|
144
159
|
".cc",
|
|
145
160
|
".cpp",
|
|
146
161
|
".cxx",
|
|
147
162
|
".m",
|
|
148
|
-
".mm"
|
|
163
|
+
".mm"
|
|
164
|
+
];
|
|
165
|
+
function isSwiftNativeTranslationUnit(file) {
|
|
166
|
+
return SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS.some(
|
|
167
|
+
(extension) => file.endsWith(extension)
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
171
|
+
...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
|
|
149
172
|
".h",
|
|
150
173
|
".hh",
|
|
151
174
|
".hpp",
|
|
@@ -155,11 +178,15 @@ var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
|
155
178
|
".inl",
|
|
156
179
|
".modulemap"
|
|
157
180
|
];
|
|
181
|
+
function moduleMapName(text) {
|
|
182
|
+
return /(?:^|\s)module\s+(\w+)/.exec(text)?.[1];
|
|
183
|
+
}
|
|
158
184
|
function swiftTargetModuleName(name) {
|
|
159
185
|
return name.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
160
186
|
}
|
|
161
187
|
function swiftPackageIdentity(url) {
|
|
162
|
-
|
|
188
|
+
const path = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
189
|
+
return (path.split("/").pop() ?? path).replace(/\.git$/, "").toLowerCase();
|
|
163
190
|
}
|
|
164
191
|
function clangMacroSetting(macro) {
|
|
165
192
|
const [name, ...value] = macro.split("=");
|
|
@@ -173,21 +200,45 @@ var swiftEscapes = {
|
|
|
173
200
|
r: "\r",
|
|
174
201
|
t: " "
|
|
175
202
|
};
|
|
203
|
+
function bracketBody(text, openIndex) {
|
|
204
|
+
let depth = 1;
|
|
205
|
+
let index = openIndex;
|
|
206
|
+
for (; index < text.length && depth > 0; index++) {
|
|
207
|
+
const char = text[index];
|
|
208
|
+
if (char === '"') {
|
|
209
|
+
for (index++; index < text.length && text[index] !== '"'; index++)
|
|
210
|
+
if (text[index] === "\\") index++;
|
|
211
|
+
} else if (char === "[") depth++;
|
|
212
|
+
else if (char === "]") depth--;
|
|
213
|
+
}
|
|
214
|
+
return text.slice(openIndex, index - 1);
|
|
215
|
+
}
|
|
216
|
+
function settingsBlocks(call, tool) {
|
|
217
|
+
const bodies = [];
|
|
218
|
+
for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g")))
|
|
219
|
+
bodies.push(bracketBody(call, open.index + open[0].length));
|
|
220
|
+
return bodies;
|
|
221
|
+
}
|
|
222
|
+
function settingFeatures(call, setting) {
|
|
223
|
+
const found = [];
|
|
224
|
+
for (const body of settingsBlocks(call, "swift")) {
|
|
225
|
+
if (setting === ".unsafeFlags") {
|
|
226
|
+
for (const open of body.matchAll(/\.unsafeFlags\(\s*\[/g))
|
|
227
|
+
for (const match of bracketBody(body, open.index + open[0].length).matchAll(
|
|
228
|
+
/"((?:[^"\\]|\\.)*)"/g
|
|
229
|
+
))
|
|
230
|
+
found.push(JSON.parse(`"${match[1]}"`));
|
|
231
|
+
} else {
|
|
232
|
+
const name = "([A-Za-z_][A-Za-z0-9_]*(?:=[A-Za-z_][A-Za-z0-9_.-]*)?)";
|
|
233
|
+
const pattern = setting === ".enableExperimentalFeature" ? new RegExp(`\\.enableExperimentalFeature\\(\\s*"${name}"\\s*\\)`, "g") : new RegExp(`\\.enableUpcomingFeature\\(\\s*"${name}"\\s*\\)`, "g");
|
|
234
|
+
for (const match of body.matchAll(pattern)) found.push(match[1]);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return found;
|
|
238
|
+
}
|
|
176
239
|
function settingDefines(call, tool) {
|
|
177
240
|
const defines = [];
|
|
178
|
-
for (const
|
|
179
|
-
let depth = 1;
|
|
180
|
-
let index = open.index + open[0].length;
|
|
181
|
-
const start = index;
|
|
182
|
-
for (; index < call.length && depth > 0; index++) {
|
|
183
|
-
const char = call[index];
|
|
184
|
-
if (char === '"') {
|
|
185
|
-
for (index++; index < call.length && call[index] !== '"'; index++)
|
|
186
|
-
if (call[index] === "\\") index++;
|
|
187
|
-
} else if (char === "[") depth++;
|
|
188
|
-
else if (char === "]") depth--;
|
|
189
|
-
}
|
|
190
|
-
const body = call.slice(start, index - 1);
|
|
241
|
+
for (const body of settingsBlocks(call, tool)) {
|
|
191
242
|
for (const match of body.matchAll(
|
|
192
243
|
/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"((?:[^"\\]|\\.)*)"\s*)?\)/g
|
|
193
244
|
)) {
|
|
@@ -206,26 +257,61 @@ function settingDefines(call, tool) {
|
|
|
206
257
|
}
|
|
207
258
|
return defines;
|
|
208
259
|
}
|
|
209
|
-
function
|
|
260
|
+
function swiftManifestDeclarations(manifest, resourcePaths = []) {
|
|
210
261
|
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
211
262
|
const targets = [];
|
|
212
|
-
const
|
|
263
|
+
for (const declaration of manifestCalls(manifest, [
|
|
213
264
|
"executableTarget",
|
|
214
265
|
"target",
|
|
215
266
|
"systemLibrary"
|
|
216
|
-
])
|
|
217
|
-
|
|
218
|
-
declarations.flatMap(({ flat }) => {
|
|
219
|
-
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
220
|
-
return name ? [name] : [];
|
|
221
|
-
})
|
|
222
|
-
);
|
|
223
|
-
for (const { kind, flat, call } of declarations) {
|
|
224
|
-
const executable = kind === "executableTarget";
|
|
267
|
+
])) {
|
|
268
|
+
const { kind, flat } = declaration;
|
|
225
269
|
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
226
270
|
if (!name) continue;
|
|
227
271
|
const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
|
|
228
272
|
const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
273
|
+
const exclude = /\bexclude\s*:\s*\[/.exec(flat);
|
|
274
|
+
const excluded = [
|
|
275
|
+
...(exclude ? bracketBody(flat, exclude.index + exclude[0].length) : "").matchAll(
|
|
276
|
+
/"([^"]+)"/g
|
|
277
|
+
)
|
|
278
|
+
].map((match) => match[1].replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
279
|
+
const prefix = targetPath === "." ? "" : `${targetPath}/`;
|
|
280
|
+
const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
|
|
281
|
+
if (!file.startsWith(prefix)) return false;
|
|
282
|
+
const relative = file.slice(prefix.length);
|
|
283
|
+
if (excluded.some(
|
|
284
|
+
(exclude2) => relative === exclude2 || relative.startsWith(`${exclude2}/`)
|
|
285
|
+
))
|
|
286
|
+
return false;
|
|
287
|
+
return true;
|
|
288
|
+
});
|
|
289
|
+
targets.push({
|
|
290
|
+
...declaration,
|
|
291
|
+
name,
|
|
292
|
+
path: targetPath,
|
|
293
|
+
executable: kind === "executableTarget",
|
|
294
|
+
resources,
|
|
295
|
+
exclude: excluded
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
return targets;
|
|
299
|
+
}
|
|
300
|
+
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
301
|
+
const targets = [];
|
|
302
|
+
const declarations = swiftManifestDeclarations(manifest, resourcePaths);
|
|
303
|
+
const targetNames = new Set(declarations.map(({ name }) => name));
|
|
304
|
+
for (const {
|
|
305
|
+
kind,
|
|
306
|
+
flat,
|
|
307
|
+
call,
|
|
308
|
+
name,
|
|
309
|
+
path: targetPath,
|
|
310
|
+
executable,
|
|
311
|
+
resources,
|
|
312
|
+
exclude: excluded
|
|
313
|
+
} of declarations) {
|
|
314
|
+
const publicHeadersPath = /\bpublicHeadersPath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
|
|
229
315
|
const languageMode = Number(
|
|
230
316
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
231
317
|
);
|
|
@@ -234,50 +320,47 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
234
320
|
call.replace(/"(?:\\.|[^"\\])*"/g, "")
|
|
235
321
|
);
|
|
236
322
|
const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
|
|
323
|
+
const experimentalFeatures = settingFeatures(call, ".enableExperimentalFeature");
|
|
324
|
+
const upcomingFeatures = settingFeatures(call, ".enableUpcomingFeature");
|
|
325
|
+
const swiftFlags = settingFeatures(call, ".unsafeFlags");
|
|
237
326
|
const cDefines = settingDefines(call, "c");
|
|
238
327
|
const cxxDefines = settingDefines(call, "cxx");
|
|
239
328
|
const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
|
|
240
329
|
(match) => match[1]
|
|
241
330
|
);
|
|
242
|
-
const excluded = [
|
|
243
|
-
...(/\bexclude\s*:\s*\[([^\]]*)\]/.exec(flat)?.[1] ?? "").matchAll(/"([^"]+)"/g)
|
|
244
|
-
].map((match) => match[1].replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
245
|
-
const prefix = targetPath === "." ? "" : `${targetPath}/`;
|
|
246
|
-
const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
|
|
247
|
-
if (!file.startsWith(prefix)) return false;
|
|
248
|
-
const relative = file.slice(prefix.length);
|
|
249
|
-
if (excluded.some(
|
|
250
|
-
(exclude) => relative === exclude || relative.startsWith(`${exclude}/`)
|
|
251
|
-
))
|
|
252
|
-
return false;
|
|
253
|
-
return true;
|
|
254
|
-
});
|
|
255
331
|
const targetArguments = splitManifestArguments(call.slice(0, -1));
|
|
256
332
|
const dependencyArgument = targetArguments.find(
|
|
257
333
|
(argument) => /^dependencies\s*:/.test(argument)
|
|
258
334
|
);
|
|
259
335
|
const dependencyList = dependencyArgument?.replace(/^dependencies\s*:\s*/, "").trim();
|
|
260
|
-
const
|
|
336
|
+
const dependencies = [];
|
|
261
337
|
if (dependencyList?.startsWith("[") && dependencyList.endsWith("]")) {
|
|
262
338
|
for (const dependency of splitManifestArguments(dependencyList.slice(1, -1))) {
|
|
339
|
+
const product = /^\.product\s*\(\s*name\s*:\s*"([^"]+)"\s*,\s*package\s*:\s*"([^"]+)"\s*\)$/.exec(
|
|
340
|
+
dependency
|
|
341
|
+
);
|
|
342
|
+
if (product) {
|
|
343
|
+
dependencies.push({ kind: "product", name: product[1], package: product[2] });
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
263
346
|
const dependencyName = /^"([^"]+)"$/.exec(dependency)?.[1] ?? /^\.(?:target|byName)\s*\(\s*name\s*:\s*"([^"]+)"/.exec(dependency)?.[1];
|
|
264
347
|
if (dependencyName && targetNames.has(dependencyName))
|
|
265
|
-
|
|
348
|
+
dependencies.push({ kind: "target", name: dependencyName });
|
|
266
349
|
}
|
|
267
350
|
}
|
|
268
|
-
const dependencies = [...dependencyNames].map((name2) => ({
|
|
269
|
-
kind: "target",
|
|
270
|
-
name: name2
|
|
271
|
-
}));
|
|
272
351
|
targets.push({
|
|
273
352
|
name,
|
|
274
353
|
path: targetPath,
|
|
275
354
|
executable,
|
|
276
355
|
...kind === "systemLibrary" ? { systemLibrary: true } : {},
|
|
356
|
+
...publicHeadersPath === void 0 ? {} : { publicHeadersPath },
|
|
277
357
|
languageMode,
|
|
278
358
|
mainActorIsolation,
|
|
279
359
|
...cxxInterop ? { cxxInterop: true } : {},
|
|
280
360
|
...defines.length === 0 ? {} : { defines },
|
|
361
|
+
...experimentalFeatures.length === 0 ? {} : { experimentalFeatures },
|
|
362
|
+
...upcomingFeatures.length === 0 ? {} : { upcomingFeatures },
|
|
363
|
+
...swiftFlags.length === 0 ? {} : { swiftFlags },
|
|
281
364
|
...cDefines.length === 0 ? {} : { cDefines },
|
|
282
365
|
...cxxDefines.length === 0 ? {} : { cxxDefines },
|
|
283
366
|
...linkedLibraries.length === 0 ? {} : { linkedLibraries },
|
|
@@ -296,7 +379,7 @@ function swiftManifestCxxLanguageStandard(manifest) {
|
|
|
296
379
|
}
|
|
297
380
|
function swiftResourceBundles(files, resourcePaths = []) {
|
|
298
381
|
const manifest = files["Package.swift"] ?? "";
|
|
299
|
-
const targets =
|
|
382
|
+
const targets = swiftManifestDeclarations(manifest, resourcePaths).filter(
|
|
300
383
|
(target) => target.resources
|
|
301
384
|
);
|
|
302
385
|
if (targets.length === 0) return [];
|
|
@@ -413,7 +496,7 @@ function swiftMetalSourceFiles(files) {
|
|
|
413
496
|
}
|
|
414
497
|
function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
415
498
|
const targets = swiftManifestTargets(manifest, resourcePaths);
|
|
416
|
-
return targets.length === 1 && targets[0].executable && targets[0].path === "." && targets[0].languageMode === 5 && !targets[0].mainActorIsolation && !targets[0].defines?.length && !targets[0].linkedLibraries?.length && !targets[0].cxxInterop && !swiftManifestCxxLanguageStandard(manifest) ? [] : targets;
|
|
499
|
+
return targets.length === 1 && targets[0].executable && targets[0].path === "." && targets[0].languageMode === 5 && !targets[0].mainActorIsolation && !targets[0].defines?.length && !targets[0].experimentalFeatures?.length && !targets[0].upcomingFeatures?.length && !targets[0].swiftFlags?.length && !targets[0].linkedLibraries?.length && !targets[0].cxxInterop && !swiftManifestCxxLanguageStandard(manifest) ? [] : targets;
|
|
417
500
|
}
|
|
418
501
|
// Annotate the CommonJS export names for ESM import in node:
|
|
419
502
|
0 && (module.exports = {
|
|
@@ -422,8 +505,13 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
|
422
505
|
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
423
506
|
clangMacroSetting,
|
|
424
507
|
isSwiftManifestFile,
|
|
508
|
+
isSwiftNativeTranslationUnit,
|
|
509
|
+
manifestCalls,
|
|
510
|
+
moduleMapName,
|
|
425
511
|
swiftImplicitResourcePaths,
|
|
426
512
|
swiftManifestCxxLanguageStandard,
|
|
513
|
+
swiftManifestDeclarations,
|
|
514
|
+
swiftManifestPackages,
|
|
427
515
|
swiftManifestTargets,
|
|
428
516
|
swiftMetalSourceFiles,
|
|
429
517
|
swiftObjCResourceAccessor,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-package.ts
|
|
4
4
|
function isSwiftManifestFile(file) {
|
|
@@ -99,13 +99,31 @@ function splitManifestArguments(source) {
|
|
|
99
99
|
if (final) arguments_.push(final);
|
|
100
100
|
return arguments_;
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
function swiftManifestPackages(manifest) {
|
|
103
|
+
return new Map(
|
|
104
|
+
manifestCalls(manifest, ["package"]).flatMap(({ flat }) => {
|
|
105
|
+
const directory = /\bpath\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
106
|
+
if (!directory) return [];
|
|
107
|
+
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1] ?? directory.split("/").pop();
|
|
108
|
+
return [[name.toLowerCase(), directory]];
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
var SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS = [
|
|
103
113
|
".c",
|
|
104
114
|
".cc",
|
|
105
115
|
".cpp",
|
|
106
116
|
".cxx",
|
|
107
117
|
".m",
|
|
108
|
-
".mm"
|
|
118
|
+
".mm"
|
|
119
|
+
];
|
|
120
|
+
function isSwiftNativeTranslationUnit(file) {
|
|
121
|
+
return SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS.some(
|
|
122
|
+
(extension) => file.endsWith(extension)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
126
|
+
...SWIFT_NATIVE_TRANSLATION_UNIT_EXTENSIONS,
|
|
109
127
|
".h",
|
|
110
128
|
".hh",
|
|
111
129
|
".hpp",
|
|
@@ -115,11 +133,15 @@ var SWIFT_NATIVE_SOURCE_EXTENSIONS = [
|
|
|
115
133
|
".inl",
|
|
116
134
|
".modulemap"
|
|
117
135
|
];
|
|
136
|
+
function moduleMapName(text) {
|
|
137
|
+
return /(?:^|\s)module\s+(\w+)/.exec(text)?.[1];
|
|
138
|
+
}
|
|
118
139
|
function swiftTargetModuleName(name) {
|
|
119
140
|
return name.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
120
141
|
}
|
|
121
142
|
function swiftPackageIdentity(url) {
|
|
122
|
-
|
|
143
|
+
const path = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
144
|
+
return (path.split("/").pop() ?? path).replace(/\.git$/, "").toLowerCase();
|
|
123
145
|
}
|
|
124
146
|
function clangMacroSetting(macro) {
|
|
125
147
|
const [name, ...value] = macro.split("=");
|
|
@@ -133,21 +155,45 @@ var swiftEscapes = {
|
|
|
133
155
|
r: "\r",
|
|
134
156
|
t: " "
|
|
135
157
|
};
|
|
158
|
+
function bracketBody(text, openIndex) {
|
|
159
|
+
let depth = 1;
|
|
160
|
+
let index = openIndex;
|
|
161
|
+
for (; index < text.length && depth > 0; index++) {
|
|
162
|
+
const char = text[index];
|
|
163
|
+
if (char === '"') {
|
|
164
|
+
for (index++; index < text.length && text[index] !== '"'; index++)
|
|
165
|
+
if (text[index] === "\\") index++;
|
|
166
|
+
} else if (char === "[") depth++;
|
|
167
|
+
else if (char === "]") depth--;
|
|
168
|
+
}
|
|
169
|
+
return text.slice(openIndex, index - 1);
|
|
170
|
+
}
|
|
171
|
+
function settingsBlocks(call, tool) {
|
|
172
|
+
const bodies = [];
|
|
173
|
+
for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g")))
|
|
174
|
+
bodies.push(bracketBody(call, open.index + open[0].length));
|
|
175
|
+
return bodies;
|
|
176
|
+
}
|
|
177
|
+
function settingFeatures(call, setting) {
|
|
178
|
+
const found = [];
|
|
179
|
+
for (const body of settingsBlocks(call, "swift")) {
|
|
180
|
+
if (setting === ".unsafeFlags") {
|
|
181
|
+
for (const open of body.matchAll(/\.unsafeFlags\(\s*\[/g))
|
|
182
|
+
for (const match of bracketBody(body, open.index + open[0].length).matchAll(
|
|
183
|
+
/"((?:[^"\\]|\\.)*)"/g
|
|
184
|
+
))
|
|
185
|
+
found.push(JSON.parse(`"${match[1]}"`));
|
|
186
|
+
} else {
|
|
187
|
+
const name = "([A-Za-z_][A-Za-z0-9_]*(?:=[A-Za-z_][A-Za-z0-9_.-]*)?)";
|
|
188
|
+
const pattern = setting === ".enableExperimentalFeature" ? new RegExp(`\\.enableExperimentalFeature\\(\\s*"${name}"\\s*\\)`, "g") : new RegExp(`\\.enableUpcomingFeature\\(\\s*"${name}"\\s*\\)`, "g");
|
|
189
|
+
for (const match of body.matchAll(pattern)) found.push(match[1]);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return found;
|
|
193
|
+
}
|
|
136
194
|
function settingDefines(call, tool) {
|
|
137
195
|
const defines = [];
|
|
138
|
-
for (const
|
|
139
|
-
let depth = 1;
|
|
140
|
-
let index = open.index + open[0].length;
|
|
141
|
-
const start = index;
|
|
142
|
-
for (; index < call.length && depth > 0; index++) {
|
|
143
|
-
const char = call[index];
|
|
144
|
-
if (char === '"') {
|
|
145
|
-
for (index++; index < call.length && call[index] !== '"'; index++)
|
|
146
|
-
if (call[index] === "\\") index++;
|
|
147
|
-
} else if (char === "[") depth++;
|
|
148
|
-
else if (char === "]") depth--;
|
|
149
|
-
}
|
|
150
|
-
const body = call.slice(start, index - 1);
|
|
196
|
+
for (const body of settingsBlocks(call, tool)) {
|
|
151
197
|
for (const match of body.matchAll(
|
|
152
198
|
/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"((?:[^"\\]|\\.)*)"\s*)?\)/g
|
|
153
199
|
)) {
|
|
@@ -166,26 +212,61 @@ function settingDefines(call, tool) {
|
|
|
166
212
|
}
|
|
167
213
|
return defines;
|
|
168
214
|
}
|
|
169
|
-
function
|
|
215
|
+
function swiftManifestDeclarations(manifest, resourcePaths = []) {
|
|
170
216
|
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
171
217
|
const targets = [];
|
|
172
|
-
const
|
|
218
|
+
for (const declaration of manifestCalls(manifest, [
|
|
173
219
|
"executableTarget",
|
|
174
220
|
"target",
|
|
175
221
|
"systemLibrary"
|
|
176
|
-
])
|
|
177
|
-
|
|
178
|
-
declarations.flatMap(({ flat }) => {
|
|
179
|
-
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
180
|
-
return name ? [name] : [];
|
|
181
|
-
})
|
|
182
|
-
);
|
|
183
|
-
for (const { kind, flat, call } of declarations) {
|
|
184
|
-
const executable = kind === "executableTarget";
|
|
222
|
+
])) {
|
|
223
|
+
const { kind, flat } = declaration;
|
|
185
224
|
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
186
225
|
if (!name) continue;
|
|
187
226
|
const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
|
|
188
227
|
const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
228
|
+
const exclude = /\bexclude\s*:\s*\[/.exec(flat);
|
|
229
|
+
const excluded = [
|
|
230
|
+
...(exclude ? bracketBody(flat, exclude.index + exclude[0].length) : "").matchAll(
|
|
231
|
+
/"([^"]+)"/g
|
|
232
|
+
)
|
|
233
|
+
].map((match) => match[1].replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
234
|
+
const prefix = targetPath === "." ? "" : `${targetPath}/`;
|
|
235
|
+
const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
|
|
236
|
+
if (!file.startsWith(prefix)) return false;
|
|
237
|
+
const relative = file.slice(prefix.length);
|
|
238
|
+
if (excluded.some(
|
|
239
|
+
(exclude2) => relative === exclude2 || relative.startsWith(`${exclude2}/`)
|
|
240
|
+
))
|
|
241
|
+
return false;
|
|
242
|
+
return true;
|
|
243
|
+
});
|
|
244
|
+
targets.push({
|
|
245
|
+
...declaration,
|
|
246
|
+
name,
|
|
247
|
+
path: targetPath,
|
|
248
|
+
executable: kind === "executableTarget",
|
|
249
|
+
resources,
|
|
250
|
+
exclude: excluded
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
return targets;
|
|
254
|
+
}
|
|
255
|
+
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
256
|
+
const targets = [];
|
|
257
|
+
const declarations = swiftManifestDeclarations(manifest, resourcePaths);
|
|
258
|
+
const targetNames = new Set(declarations.map(({ name }) => name));
|
|
259
|
+
for (const {
|
|
260
|
+
kind,
|
|
261
|
+
flat,
|
|
262
|
+
call,
|
|
263
|
+
name,
|
|
264
|
+
path: targetPath,
|
|
265
|
+
executable,
|
|
266
|
+
resources,
|
|
267
|
+
exclude: excluded
|
|
268
|
+
} of declarations) {
|
|
269
|
+
const publicHeadersPath = /\bpublicHeadersPath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
|
|
189
270
|
const languageMode = Number(
|
|
190
271
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
191
272
|
);
|
|
@@ -194,50 +275,47 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
194
275
|
call.replace(/"(?:\\.|[^"\\])*"/g, "")
|
|
195
276
|
);
|
|
196
277
|
const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
|
|
278
|
+
const experimentalFeatures = settingFeatures(call, ".enableExperimentalFeature");
|
|
279
|
+
const upcomingFeatures = settingFeatures(call, ".enableUpcomingFeature");
|
|
280
|
+
const swiftFlags = settingFeatures(call, ".unsafeFlags");
|
|
197
281
|
const cDefines = settingDefines(call, "c");
|
|
198
282
|
const cxxDefines = settingDefines(call, "cxx");
|
|
199
283
|
const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
|
|
200
284
|
(match) => match[1]
|
|
201
285
|
);
|
|
202
|
-
const excluded = [
|
|
203
|
-
...(/\bexclude\s*:\s*\[([^\]]*)\]/.exec(flat)?.[1] ?? "").matchAll(/"([^"]+)"/g)
|
|
204
|
-
].map((match) => match[1].replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
205
|
-
const prefix = targetPath === "." ? "" : `${targetPath}/`;
|
|
206
|
-
const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
|
|
207
|
-
if (!file.startsWith(prefix)) return false;
|
|
208
|
-
const relative = file.slice(prefix.length);
|
|
209
|
-
if (excluded.some(
|
|
210
|
-
(exclude) => relative === exclude || relative.startsWith(`${exclude}/`)
|
|
211
|
-
))
|
|
212
|
-
return false;
|
|
213
|
-
return true;
|
|
214
|
-
});
|
|
215
286
|
const targetArguments = splitManifestArguments(call.slice(0, -1));
|
|
216
287
|
const dependencyArgument = targetArguments.find(
|
|
217
288
|
(argument) => /^dependencies\s*:/.test(argument)
|
|
218
289
|
);
|
|
219
290
|
const dependencyList = dependencyArgument?.replace(/^dependencies\s*:\s*/, "").trim();
|
|
220
|
-
const
|
|
291
|
+
const dependencies = [];
|
|
221
292
|
if (dependencyList?.startsWith("[") && dependencyList.endsWith("]")) {
|
|
222
293
|
for (const dependency of splitManifestArguments(dependencyList.slice(1, -1))) {
|
|
294
|
+
const product = /^\.product\s*\(\s*name\s*:\s*"([^"]+)"\s*,\s*package\s*:\s*"([^"]+)"\s*\)$/.exec(
|
|
295
|
+
dependency
|
|
296
|
+
);
|
|
297
|
+
if (product) {
|
|
298
|
+
dependencies.push({ kind: "product", name: product[1], package: product[2] });
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
223
301
|
const dependencyName = /^"([^"]+)"$/.exec(dependency)?.[1] ?? /^\.(?:target|byName)\s*\(\s*name\s*:\s*"([^"]+)"/.exec(dependency)?.[1];
|
|
224
302
|
if (dependencyName && targetNames.has(dependencyName))
|
|
225
|
-
|
|
303
|
+
dependencies.push({ kind: "target", name: dependencyName });
|
|
226
304
|
}
|
|
227
305
|
}
|
|
228
|
-
const dependencies = [...dependencyNames].map((name2) => ({
|
|
229
|
-
kind: "target",
|
|
230
|
-
name: name2
|
|
231
|
-
}));
|
|
232
306
|
targets.push({
|
|
233
307
|
name,
|
|
234
308
|
path: targetPath,
|
|
235
309
|
executable,
|
|
236
310
|
...kind === "systemLibrary" ? { systemLibrary: true } : {},
|
|
311
|
+
...publicHeadersPath === void 0 ? {} : { publicHeadersPath },
|
|
237
312
|
languageMode,
|
|
238
313
|
mainActorIsolation,
|
|
239
314
|
...cxxInterop ? { cxxInterop: true } : {},
|
|
240
315
|
...defines.length === 0 ? {} : { defines },
|
|
316
|
+
...experimentalFeatures.length === 0 ? {} : { experimentalFeatures },
|
|
317
|
+
...upcomingFeatures.length === 0 ? {} : { upcomingFeatures },
|
|
318
|
+
...swiftFlags.length === 0 ? {} : { swiftFlags },
|
|
241
319
|
...cDefines.length === 0 ? {} : { cDefines },
|
|
242
320
|
...cxxDefines.length === 0 ? {} : { cxxDefines },
|
|
243
321
|
...linkedLibraries.length === 0 ? {} : { linkedLibraries },
|
|
@@ -256,7 +334,7 @@ function swiftManifestCxxLanguageStandard(manifest) {
|
|
|
256
334
|
}
|
|
257
335
|
function swiftResourceBundles(files, resourcePaths = []) {
|
|
258
336
|
const manifest = files["Package.swift"] ?? "";
|
|
259
|
-
const targets =
|
|
337
|
+
const targets = swiftManifestDeclarations(manifest, resourcePaths).filter(
|
|
260
338
|
(target) => target.resources
|
|
261
339
|
);
|
|
262
340
|
if (targets.length === 0) return [];
|
|
@@ -373,7 +451,7 @@ function swiftMetalSourceFiles(files) {
|
|
|
373
451
|
}
|
|
374
452
|
function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
375
453
|
const targets = swiftManifestTargets(manifest, resourcePaths);
|
|
376
|
-
return targets.length === 1 && targets[0].executable && targets[0].path === "." && targets[0].languageMode === 5 && !targets[0].mainActorIsolation && !targets[0].defines?.length && !targets[0].linkedLibraries?.length && !targets[0].cxxInterop && !swiftManifestCxxLanguageStandard(manifest) ? [] : targets;
|
|
454
|
+
return targets.length === 1 && targets[0].executable && targets[0].path === "." && targets[0].languageMode === 5 && !targets[0].mainActorIsolation && !targets[0].defines?.length && !targets[0].experimentalFeatures?.length && !targets[0].upcomingFeatures?.length && !targets[0].swiftFlags?.length && !targets[0].linkedLibraries?.length && !targets[0].cxxInterop && !swiftManifestCxxLanguageStandard(manifest) ? [] : targets;
|
|
377
455
|
}
|
|
378
456
|
export {
|
|
379
457
|
OBJC_RESOURCE_ACCESSOR_BODY,
|
|
@@ -381,8 +459,13 @@ export {
|
|
|
381
459
|
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
382
460
|
clangMacroSetting,
|
|
383
461
|
isSwiftManifestFile,
|
|
462
|
+
isSwiftNativeTranslationUnit,
|
|
463
|
+
manifestCalls,
|
|
464
|
+
moduleMapName,
|
|
384
465
|
swiftImplicitResourcePaths,
|
|
385
466
|
swiftManifestCxxLanguageStandard,
|
|
467
|
+
swiftManifestDeclarations,
|
|
468
|
+
swiftManifestPackages,
|
|
386
469
|
swiftManifestTargets,
|
|
387
470
|
swiftMetalSourceFiles,
|
|
388
471
|
swiftObjCResourceAccessor,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1692 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|