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
package/cli/commands/control.ts
CHANGED
|
@@ -1829,8 +1829,10 @@ export function printOpenedSim(
|
|
|
1829
1829
|
if (json) process.stdout.write(`${payload}\n`)
|
|
1830
1830
|
return
|
|
1831
1831
|
}
|
|
1832
|
+
// the launch query carries kilobytes of app identity and fonts; the JSON
|
|
1833
|
+
// below keeps the full url, so the human line names only where it opened.
|
|
1832
1834
|
console.log(
|
|
1833
|
-
` ${mode === 'current sim' ? 'loaded' : 'opened'}: ${printableOpenUrl} [${mode}]`,
|
|
1835
|
+
` ${mode === 'current sim' ? 'loaded' : 'opened'}: ${urlWithoutQuery(printableOpenUrl)} [${mode}]`,
|
|
1834
1836
|
)
|
|
1835
1837
|
// agents pipe around the JSON to grab the id; humans just want to know
|
|
1836
1838
|
// the current sim got updated without scanning the JSON blob.
|
|
@@ -1840,6 +1842,16 @@ export function printOpenedSim(
|
|
|
1840
1842
|
else console.log(payload)
|
|
1841
1843
|
}
|
|
1842
1844
|
|
|
1845
|
+
function urlWithoutQuery(value: string | undefined): string | undefined {
|
|
1846
|
+
if (!value) return value
|
|
1847
|
+
try {
|
|
1848
|
+
const parsed = new URL(value)
|
|
1849
|
+
return `${parsed.origin}${parsed.pathname}`
|
|
1850
|
+
} catch {
|
|
1851
|
+
return value
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1843
1855
|
function printAgentHints(quiet: boolean): void {
|
|
1844
1856
|
if (quiet) return
|
|
1845
1857
|
console.log(' inspect messages: run `peach agent listen` when you finish your turn')
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process'
|
|
2
|
+
import { createHash } from 'node:crypto'
|
|
2
3
|
import { existsSync, mkdtempSync, readdirSync, realpathSync, rmSync } from 'node:fs'
|
|
3
4
|
import { tmpdir } from 'node:os'
|
|
4
5
|
import { dirname, join, relative, resolve, sep } from 'node:path'
|
|
6
|
+
import { pathToFileURL } from 'node:url'
|
|
7
|
+
import { VERIFIED_SURFACES } from '@peach/compat/verified-map'
|
|
8
|
+
import { loadSwiftSdkInventoryFragment } from '../../../peach-compat/src/capability-inventory'
|
|
9
|
+
import { swiftSdkIdentity } from '../../src/swift-coverage/indexing'
|
|
5
10
|
import { indexSwiftPackage } from '../../src/swift-coverage/package'
|
|
6
11
|
import { buildSwiftIndexReader } from '../../src/swift-coverage/reader'
|
|
12
|
+
import { readSwiftSdkSymbolCache } from '../../src/swift-coverage/sdk'
|
|
13
|
+
import { resolveSwiftFrontDoors } from '../../src/swift-coverage/source'
|
|
7
14
|
import { indexSwiftXcodeApp, xcodeMetadataFiles } from '../../src/swift-coverage/xcode'
|
|
8
15
|
import { localPackageModules } from '../../src/swift-coverage/xcode-packages'
|
|
9
16
|
import lock from '../../src/swift-distribution.lock.json' with { type: 'json' }
|
|
@@ -14,7 +21,9 @@ import {
|
|
|
14
21
|
import { readPackageFile } from '../../src/swift-source-file'
|
|
15
22
|
import { swiftCompilerInstallSteps, swiftToolchainBin } from '../../src/swift-toolchain'
|
|
16
23
|
import { findXcodeProject, readXcodeAppTarget } from '../../src/xcode-project'
|
|
24
|
+
import type { VerifiedFeatureCells } from '../../../../scripts/lib/verified-feature-cells'
|
|
17
25
|
import type { CoverageGraphRequest } from './coverage'
|
|
26
|
+
import type { VerifiedFeature } from '@peach/compat/verified-map-types'
|
|
18
27
|
|
|
19
28
|
// the existing build owners supply membership; requested roots select primaries,
|
|
20
29
|
// while every original target source remains available to the compiler.
|
|
@@ -123,6 +132,7 @@ export async function createSwiftCoverageReport(
|
|
|
123
132
|
},
|
|
124
133
|
})
|
|
125
134
|
if (result.status === 'unknown') return unknown(result.reasons.join('\n'))
|
|
135
|
+
const reach = await swiftSdkReach(result.index, tools)
|
|
126
136
|
return {
|
|
127
137
|
schemaVersion: 1,
|
|
128
138
|
input: {
|
|
@@ -131,16 +141,14 @@ export async function createSwiftCoverageReport(
|
|
|
131
141
|
requestedSources: requestedSources.length ? requestedSources : ['.'],
|
|
132
142
|
},
|
|
133
143
|
status: 'indexed' as const,
|
|
134
|
-
summary:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
verified: null,
|
|
139
|
-
},
|
|
144
|
+
summary: reach.summary,
|
|
145
|
+
sdk: reach.sdk,
|
|
146
|
+
possibleFeatures: reach.possibleFeatures,
|
|
147
|
+
features: reach.features,
|
|
140
148
|
project: result.project,
|
|
141
149
|
reader: tools.reader,
|
|
142
|
-
index:
|
|
143
|
-
unknowns: result.unknowns,
|
|
150
|
+
index: reach.index,
|
|
151
|
+
unknowns: [...result.unknowns, ...reach.unknowns],
|
|
144
152
|
}
|
|
145
153
|
}
|
|
146
154
|
const manifest = swiftPackageManifest(app)
|
|
@@ -193,7 +201,8 @@ export async function createSwiftCoverageReport(
|
|
|
193
201
|
)
|
|
194
202
|
if (!primaries.length)
|
|
195
203
|
return unknown('Requested source roots contain no SwiftPM target sources.')
|
|
196
|
-
const
|
|
204
|
+
const tools = swiftCoverageTools(work)
|
|
205
|
+
const { swiftc, sdk, nativeTarget, indexdump } = tools
|
|
197
206
|
const result = await indexSwiftPackage({
|
|
198
207
|
root: app,
|
|
199
208
|
target: target.name,
|
|
@@ -202,16 +211,12 @@ export async function createSwiftCoverageReport(
|
|
|
202
211
|
indexdump,
|
|
203
212
|
native: {
|
|
204
213
|
swiftc,
|
|
205
|
-
flags: [
|
|
206
|
-
'-target',
|
|
207
|
-
`${process.arch === 'arm64' ? 'arm64' : 'x86_64'}-apple-ios${version}-simulator`,
|
|
208
|
-
'-sdk',
|
|
209
|
-
sdk,
|
|
210
|
-
],
|
|
214
|
+
flags: ['-target', nativeTarget, '-sdk', sdk],
|
|
211
215
|
},
|
|
212
216
|
primaries,
|
|
213
217
|
})
|
|
214
218
|
if (result.status === 'unknown') return unknown(result.reasons.join('\n'))
|
|
219
|
+
const reach = await swiftSdkReach(result.index, tools)
|
|
215
220
|
return {
|
|
216
221
|
schemaVersion: 1,
|
|
217
222
|
input: {
|
|
@@ -220,16 +225,14 @@ export async function createSwiftCoverageReport(
|
|
|
220
225
|
requestedSources: requestedSources.length ? requestedSources : ['.'],
|
|
221
226
|
},
|
|
222
227
|
status: 'indexed' as const,
|
|
223
|
-
summary:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
verified: null,
|
|
228
|
-
},
|
|
228
|
+
summary: reach.summary,
|
|
229
|
+
sdk: reach.sdk,
|
|
230
|
+
possibleFeatures: reach.possibleFeatures,
|
|
231
|
+
features: reach.features,
|
|
229
232
|
package: result.package,
|
|
230
|
-
reader,
|
|
231
|
-
index:
|
|
232
|
-
unknowns: result.unknowns,
|
|
233
|
+
reader: tools.reader,
|
|
234
|
+
index: reach.index,
|
|
235
|
+
unknowns: [...result.unknowns, ...reach.unknowns],
|
|
233
236
|
}
|
|
234
237
|
} catch (error) {
|
|
235
238
|
return unknown(error instanceof Error ? error.message : String(error))
|
|
@@ -248,13 +251,117 @@ function swiftCoverageTools(work: string) {
|
|
|
248
251
|
['--sdk', 'iphonesimulator', '--show-sdk-version'],
|
|
249
252
|
{ encoding: 'utf8' },
|
|
250
253
|
).trim()
|
|
254
|
+
const nativeTarget = `${process.arch === 'arm64' ? 'arm64' : 'x86_64'}-apple-ios${version}-simulator`
|
|
255
|
+
const sdkIdentity = swiftSdkIdentity(swiftc, sdk, nativeTarget)
|
|
256
|
+
const sdkFingerprint = createHash('sha256')
|
|
257
|
+
.update(JSON.stringify(sdkIdentity))
|
|
258
|
+
.digest('hex')
|
|
251
259
|
const indexdump = join(work, 'indexdump')
|
|
252
260
|
const reader = buildSwiftIndexReader(
|
|
253
261
|
join(swiftToolchainBin(lock.release), 'swiftc'),
|
|
254
262
|
indexdump,
|
|
255
263
|
() => swiftCompilerInstallSteps(lock.release),
|
|
256
264
|
)
|
|
257
|
-
return {
|
|
265
|
+
return {
|
|
266
|
+
swiftc,
|
|
267
|
+
sdk,
|
|
268
|
+
version,
|
|
269
|
+
nativeTarget,
|
|
270
|
+
sdkIdentity,
|
|
271
|
+
sdkFingerprint,
|
|
272
|
+
sdkSymbols: readSwiftSdkSymbolCache(sdkFingerprint),
|
|
273
|
+
indexdump,
|
|
274
|
+
reader,
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// the SDK front doors each indexed reference reaches; mapped and verified shares stay unknown
|
|
279
|
+
async function swiftSdkReach(
|
|
280
|
+
index: Parameters<typeof resolveSwiftFrontDoors>[0],
|
|
281
|
+
tools: ReturnType<typeof swiftCoverageTools>,
|
|
282
|
+
) {
|
|
283
|
+
const inventory = await loadSwiftSdkInventoryFragment()
|
|
284
|
+
const reach = resolveSwiftFrontDoors(
|
|
285
|
+
index,
|
|
286
|
+
inventory.rows,
|
|
287
|
+
tools.sdkFingerprint,
|
|
288
|
+
VERIFIED_SURFACES.flatMap<VerifiedFeature>((surface) => surface.features),
|
|
289
|
+
tools.sdkSymbols,
|
|
290
|
+
)
|
|
291
|
+
const cells = reachedFeatureCells(await verifiedFeatureCellData(), reach.features)
|
|
292
|
+
const states = cells.flatMap((feature) => feature.cells.map((cell) => cell.state))
|
|
293
|
+
return {
|
|
294
|
+
summary: {
|
|
295
|
+
symbolicReferences: index.sites.length,
|
|
296
|
+
frontDoorReferences: reach.sites.filter((site) => site.frontDoorIds.length).length,
|
|
297
|
+
frontDoors: new Set(reach.sites.flatMap((site) => site.frontDoorIds)).size,
|
|
298
|
+
mappedFrontDoors: new Set(reach.sites.flatMap((site) => site.capabilityIds)).size,
|
|
299
|
+
unmappedReferences: reach.sites.filter((site) => site.mapping === 'unmapped')
|
|
300
|
+
.length,
|
|
301
|
+
possibleFeatures: reach.features.length,
|
|
302
|
+
cells: {
|
|
303
|
+
verified: states.filter((state) => state === 'verified').length,
|
|
304
|
+
failing: states.filter((state) => state === 'failing').length,
|
|
305
|
+
unknown: states.filter((state) => state === 'unknown').length,
|
|
306
|
+
},
|
|
307
|
+
mapped: null,
|
|
308
|
+
verified: null,
|
|
309
|
+
},
|
|
310
|
+
sdk: {
|
|
311
|
+
...tools.sdkIdentity,
|
|
312
|
+
fingerprint: tools.sdkFingerprint,
|
|
313
|
+
inventoryMatched: reach.sdkMatched,
|
|
314
|
+
},
|
|
315
|
+
possibleFeatures: reach.features,
|
|
316
|
+
features: cells,
|
|
317
|
+
index: { ...index, sites: reach.sites },
|
|
318
|
+
unknowns: [
|
|
319
|
+
...(reach.sdkMatched
|
|
320
|
+
? []
|
|
321
|
+
: [
|
|
322
|
+
'The installed SDK build and compiler do not match the retained Swift SDK inventory; all front doors remain unknown.',
|
|
323
|
+
]),
|
|
324
|
+
],
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
declare const __PEACH_VERIFIED_FEATURE_CELLS__: VerifiedFeatureCells | undefined
|
|
329
|
+
|
|
330
|
+
// the CLI build embeds the cells and states of the commit it builds; a source
|
|
331
|
+
// run computes the same data from the checkout, which the bundle never loads.
|
|
332
|
+
async function verifiedFeatureCellData(): Promise<VerifiedFeatureCells> {
|
|
333
|
+
if (typeof __PEACH_VERIFIED_FEATURE_CELLS__ === 'object')
|
|
334
|
+
return __PEACH_VERIFIED_FEATURE_CELLS__
|
|
335
|
+
const source = join(
|
|
336
|
+
import.meta.dirname,
|
|
337
|
+
'../../../../scripts/lib/verified-feature-cells.ts',
|
|
338
|
+
)
|
|
339
|
+
const { verifiedFeatureCells } = await import(pathToFileURL(source).href)
|
|
340
|
+
return verifiedFeatureCells()
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// each reached feature's cells and their published states
|
|
344
|
+
function reachedFeatureCells(data: VerifiedFeatureCells, ids: readonly string[]) {
|
|
345
|
+
return ids.flatMap((id) => {
|
|
346
|
+
const feature = data.features[id]
|
|
347
|
+
return feature
|
|
348
|
+
? [
|
|
349
|
+
{
|
|
350
|
+
id,
|
|
351
|
+
surface: feature.surface,
|
|
352
|
+
title: feature.title,
|
|
353
|
+
cells: feature.cells.map((cell) => ({
|
|
354
|
+
...cell,
|
|
355
|
+
state:
|
|
356
|
+
cell.state === 'verified' || cell.state === 'failing'
|
|
357
|
+
? cell.state
|
|
358
|
+
: 'unknown',
|
|
359
|
+
proofs: cell.proofs.map((href) => `https://peachsim.com${href}`),
|
|
360
|
+
})),
|
|
361
|
+
},
|
|
362
|
+
]
|
|
363
|
+
: []
|
|
364
|
+
})
|
|
258
365
|
}
|
|
259
366
|
|
|
260
367
|
export async function runSwiftCoverage(
|
|
@@ -273,7 +380,23 @@ export async function runSwiftCoverage(
|
|
|
273
380
|
console.log(
|
|
274
381
|
`Indexed ${report.index.input.sources.length} Swift module files: ${report.index.sites.length} explicit symbolic references.`,
|
|
275
382
|
)
|
|
276
|
-
console.log(
|
|
383
|
+
console.log(
|
|
384
|
+
`SDK front doors: ${report.summary.frontDoors}; possible features: ${report.summary.possibleFeatures}. Mapped and verified shares: unknown.`,
|
|
385
|
+
)
|
|
386
|
+
const { cells } = report.summary
|
|
387
|
+
if (cells)
|
|
388
|
+
console.log(
|
|
389
|
+
`Cells of the possible features: ${cells.verified} verified, ${cells.failing} failing, ${cells.unknown} unknown.`,
|
|
390
|
+
)
|
|
391
|
+
for (const feature of report.features ?? []) {
|
|
392
|
+
console.log(
|
|
393
|
+
` ${feature.id} (${feature.title})${feature.cells.length ? '' : ': no cells attached'}`,
|
|
394
|
+
)
|
|
395
|
+
for (const cell of feature.cells)
|
|
396
|
+
console.log(
|
|
397
|
+
` ${cell.state}${cell.stale ? ' (stale)' : ''} ${cell.key.slice(feature.id.length).trim()}; checkpoints: ${cell.checks}`,
|
|
398
|
+
)
|
|
399
|
+
}
|
|
277
400
|
for (const command of report.index.native.commands.filter(
|
|
278
401
|
(command) => command.code !== 0,
|
|
279
402
|
))
|
|
@@ -282,7 +405,7 @@ export async function runSwiftCoverage(
|
|
|
282
405
|
)
|
|
283
406
|
for (const site of report.index.sites)
|
|
284
407
|
console.log(
|
|
285
|
-
` ${site.file}:${site.line}:${site.col} ${site.name} (${site.usr}):
|
|
408
|
+
` ${site.file}:${site.line}:${site.col} ${site.name} (${site.usr}): ${site.frontDoorIds.join(', ') || 'SDK origin unknown'}; ${site.mapping}; native proof unknown`,
|
|
286
409
|
)
|
|
287
410
|
for (const limitation of [...report.unknowns, ...report.index.unknowns])
|
|
288
411
|
console.log(` ${limitation}`)
|
package/cli/commands/coverage.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto'
|
|
2
2
|
import { existsSync, lstatSync, readFileSync, readdirSync } from 'node:fs'
|
|
3
3
|
import { dirname, extname, isAbsolute, join, relative, resolve, sep } from 'node:path'
|
|
4
|
-
import { VERIFIED_SURFACES } from '@peach/compat/verified-map'
|
|
4
|
+
import { NATIVE_SOURCE_PACKAGES, VERIFIED_SURFACES } from '@peach/compat/verified-map'
|
|
5
5
|
import {
|
|
6
6
|
VERIFIED_AXES,
|
|
7
7
|
VERIFIED_SOURCE_API_ROOTS,
|
|
@@ -18,6 +18,18 @@ import {
|
|
|
18
18
|
type CapabilityReferenceCandidate,
|
|
19
19
|
type StaticValue,
|
|
20
20
|
} from '../../src/react-native-coverage/capability-source-references'
|
|
21
|
+
import {
|
|
22
|
+
creditFeature,
|
|
23
|
+
creditingReleases,
|
|
24
|
+
legacyArchitectureReason,
|
|
25
|
+
type ArchitectureSetting,
|
|
26
|
+
type FeatureCredit,
|
|
27
|
+
type ReactNativeHost,
|
|
28
|
+
} from '../../src/react-native-coverage/native-source-credit'
|
|
29
|
+
import {
|
|
30
|
+
installedNativeSurface,
|
|
31
|
+
type NativeSurface,
|
|
32
|
+
} from '../../src/react-native-coverage/native-surface'
|
|
21
33
|
import { withTypeScriptSourceParser } from '../../src/react-native-coverage/native-typescript-parser'
|
|
22
34
|
import { createProjectModuleResolver } from '../../src/react-native-coverage/project-aliases'
|
|
23
35
|
import {
|
|
@@ -25,7 +37,12 @@ import {
|
|
|
25
37
|
referenceFeatures,
|
|
26
38
|
} from '../../src/react-native-coverage/verified-reach'
|
|
27
39
|
import { coverageParserPath } from './coverage-parser'
|
|
28
|
-
import {
|
|
40
|
+
import {
|
|
41
|
+
readNativeProjectRenderer,
|
|
42
|
+
readProjectManifest,
|
|
43
|
+
resolveManifestVersions,
|
|
44
|
+
} from './detect'
|
|
45
|
+
import type { NativeSourcePackage } from '../../../peach-compat/src/native-source-ranges-types'
|
|
29
46
|
import type { ProjectManifest } from './projectReportContract'
|
|
30
47
|
|
|
31
48
|
const SOURCE_EXTENSIONS = new Set([
|
|
@@ -80,6 +97,13 @@ const inventorySchema = z.object({
|
|
|
80
97
|
),
|
|
81
98
|
})
|
|
82
99
|
|
|
100
|
+
interface VersionUnknownFeature {
|
|
101
|
+
feature: string
|
|
102
|
+
reason: string
|
|
103
|
+
// the native files that differ from the closest verified release, per group
|
|
104
|
+
differs: readonly { group: string; verifiedRelease: string; files: readonly string[] }[]
|
|
105
|
+
}
|
|
106
|
+
|
|
83
107
|
export interface CoverageGraphRequest {
|
|
84
108
|
entry?: string
|
|
85
109
|
platform: 'ios' | 'android'
|
|
@@ -339,11 +363,83 @@ export async function createCoverageReport(
|
|
|
339
363
|
Object.entries({
|
|
340
364
|
...ownerManifest.dependencies,
|
|
341
365
|
...ownerManifest.devDependencies,
|
|
342
|
-
}).filter(([name]) => names.has(name)),
|
|
366
|
+
}).filter(([name]) => names.has(name) || name === 'react-native'),
|
|
343
367
|
)
|
|
344
368
|
versionOwners.set(owner, resolveManifestVersions(owner, { dependencies }, lockfiles))
|
|
345
369
|
}
|
|
346
370
|
const definitions = new Map(inventory.rows.map((row) => [row.id, row]))
|
|
371
|
+
const nativeSources = new Map<string, NativeSourcePackage>(
|
|
372
|
+
Object.entries(NATIVE_SOURCE_PACKAGES).filter(([name]) => name !== 'react-native'),
|
|
373
|
+
)
|
|
374
|
+
const architectures = new Map<string, ArchitectureSetting>()
|
|
375
|
+
const architectureOf = (owner: string): ArchitectureSetting => {
|
|
376
|
+
const known = architectures.get(owner)
|
|
377
|
+
if (known) return known
|
|
378
|
+
let setting: ArchitectureSetting
|
|
379
|
+
try {
|
|
380
|
+
const dynamic = ['ts', 'js', 'cjs', 'mjs'].some((extension) =>
|
|
381
|
+
existsSync(join(owner, `app.config.${extension}`)),
|
|
382
|
+
)
|
|
383
|
+
// an app.config function can override app.json, so with one present only
|
|
384
|
+
// the ios project settles the renderer
|
|
385
|
+
const renderer = readNativeProjectRenderer(owner, 'ios', undefined, {
|
|
386
|
+
appJson: !dynamic,
|
|
387
|
+
})
|
|
388
|
+
setting =
|
|
389
|
+
renderer === undefined && dynamic
|
|
390
|
+
? {
|
|
391
|
+
unreadable:
|
|
392
|
+
'the iOS architecture is set by app.config code and no ios project declares it',
|
|
393
|
+
}
|
|
394
|
+
: { renderer }
|
|
395
|
+
} catch (error) {
|
|
396
|
+
setting = { unreadable: error instanceof Error ? error.message : String(error) }
|
|
397
|
+
}
|
|
398
|
+
architectures.set(owner, setting)
|
|
399
|
+
return setting
|
|
400
|
+
}
|
|
401
|
+
const nativeSurfaces = new Map<string, NativeSurface>()
|
|
402
|
+
const surfaceOf = (owner: string, packageName: string) => {
|
|
403
|
+
const key = `${owner}\0${packageName}`
|
|
404
|
+
const known = nativeSurfaces.get(key)
|
|
405
|
+
if (known) return known
|
|
406
|
+
const surface = installedNativeSurface(owner, packageName)
|
|
407
|
+
nativeSurfaces.set(key, surface)
|
|
408
|
+
return surface
|
|
409
|
+
}
|
|
410
|
+
const hostOf = (owner: string): ReactNativeHost => {
|
|
411
|
+
const reactNative = NATIVE_SOURCE_PACKAGES['react-native']
|
|
412
|
+
if (!reactNative) throw new Error('no native source ranges for react-native')
|
|
413
|
+
const installed = versionOwners.get(owner)?.['react-native']
|
|
414
|
+
return {
|
|
415
|
+
config: reactNative,
|
|
416
|
+
version:
|
|
417
|
+
installed && installed.source !== 'declared' ? installed.version : undefined,
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
const credits = new Map<string, FeatureCredit>()
|
|
421
|
+
const creditOf = (
|
|
422
|
+
config: NativeSourcePackage | undefined,
|
|
423
|
+
featureId: string,
|
|
424
|
+
version: string,
|
|
425
|
+
owner: string,
|
|
426
|
+
) => {
|
|
427
|
+
const key = `${config?.packageName ?? 'react-native'}\0${version}\0${featureId}\0${owner}`
|
|
428
|
+
const known = credits.get(key)
|
|
429
|
+
if (known) return known
|
|
430
|
+
// react native core credits every release the app builds on the new
|
|
431
|
+
// architecture; a library also needs identical native source
|
|
432
|
+
const legacy = config
|
|
433
|
+
? undefined
|
|
434
|
+
: legacyArchitectureReason(architectureOf(owner), hostOf(owner))
|
|
435
|
+
const credit: FeatureCredit = config
|
|
436
|
+
? creditFeature(config, featureId, version, architectureOf(owner), hostOf(owner))
|
|
437
|
+
: legacy
|
|
438
|
+
? { status: 'unknown', reason: legacy, differs: [] }
|
|
439
|
+
: { status: 'credited', verifiedRelease: hostOf(owner).config.reference }
|
|
440
|
+
credits.set(key, credit)
|
|
441
|
+
return credit
|
|
442
|
+
}
|
|
347
443
|
const allFeatures = surfaces.flatMap((surface) => surface.features)
|
|
348
444
|
const doorReferences = resolveCapabilityReferences(
|
|
349
445
|
inventory.rows,
|
|
@@ -376,14 +472,22 @@ export async function createCoverageReport(
|
|
|
376
472
|
dependency.source === 'declared' ||
|
|
377
473
|
!/^\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/.test(dependency.version)
|
|
378
474
|
? 'unknown'
|
|
379
|
-
:
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
:
|
|
475
|
+
: (row && reference.packageName === 'react-native') ||
|
|
476
|
+
((row || sourceApi) && nativeSources.has(reference.packageName))
|
|
477
|
+
? 'per-feature'
|
|
478
|
+
: sourceApi
|
|
479
|
+
? dependency.version === sourceApi.sourceApiVersion
|
|
480
|
+
? 'matched'
|
|
481
|
+
: 'mismatched'
|
|
482
|
+
: row
|
|
483
|
+
? resolveCompatVersionRange([row.supportedVersionRange], dependency.version)
|
|
484
|
+
.status
|
|
485
|
+
: 'unknown'
|
|
486
|
+
// a package outside the inventory is read from its installed files
|
|
487
|
+
const nativeSurface =
|
|
488
|
+
reference.state === 'attributed' || reference.state === 'excluded' || !owner
|
|
489
|
+
? null
|
|
490
|
+
: surfaceOf(owner, reference.packageName)
|
|
387
491
|
const features =
|
|
388
492
|
reference.state === 'attributed'
|
|
389
493
|
? referenceFeatures(allFeatures, reference.capabilityId, reference.value ?? null)
|
|
@@ -410,12 +514,15 @@ export async function createCoverageReport(
|
|
|
410
514
|
sourceApiIdentity: sourceApi?.sourceIdentity ?? null,
|
|
411
515
|
platformApplicable: sourceApi ? true : (row?.platforms.includes('ios') ?? null),
|
|
412
516
|
features,
|
|
517
|
+
nativeSurface,
|
|
413
518
|
mapping:
|
|
414
519
|
reference.state === 'excluded'
|
|
415
520
|
? 'excluded'
|
|
416
521
|
: reference.state !== 'attributed'
|
|
417
|
-
? '
|
|
418
|
-
|
|
522
|
+
? nativeSurface?.kind === 'none'
|
|
523
|
+
? 'no-native-surface'
|
|
524
|
+
: 'unknown-api'
|
|
525
|
+
: versionStatus !== 'matched' && versionStatus !== 'per-feature'
|
|
419
526
|
? 'unknown-version'
|
|
420
527
|
: !(sourceApi || row?.platforms.includes('ios'))
|
|
421
528
|
? 'other-platform'
|
|
@@ -437,16 +544,46 @@ export async function createCoverageReport(
|
|
|
437
544
|
])
|
|
438
545
|
const featureReach = new Map(allFeatures.map((feature) => [feature.id, feature]))
|
|
439
546
|
const references = doorReferences.map((reference) => {
|
|
440
|
-
if (reference.mapping !== 'mapped')
|
|
547
|
+
if (reference.mapping !== 'mapped')
|
|
548
|
+
return { ...reference, versionUnknownFeatures: [] }
|
|
441
549
|
const peers = mappedByPath.get(reference.path) ?? []
|
|
442
|
-
const
|
|
550
|
+
const reachable = reference.features.filter((id) => {
|
|
443
551
|
const feature = featureReach.get(id)
|
|
444
552
|
return feature !== undefined && fileReachesFeature(feature, peers)
|
|
445
553
|
})
|
|
554
|
+
const config = nativeSources.get(reference.packageName)
|
|
555
|
+
const owner = sourceOwners.get(reference.path)
|
|
556
|
+
// react native core and libraries with native source ranges are credited
|
|
557
|
+
// feature by feature: the app must build the new architecture, and a
|
|
558
|
+
// library release must share every executed native file with a verified one
|
|
559
|
+
if (reference.versionStatus !== 'per-feature' || !owner || !reference.packageVersion)
|
|
560
|
+
return {
|
|
561
|
+
...reference,
|
|
562
|
+
features: reachable,
|
|
563
|
+
versionUnknownFeatures: [],
|
|
564
|
+
mapping: reachable.length ? 'mapped' : 'unmapped-feature',
|
|
565
|
+
}
|
|
566
|
+
const features: string[] = []
|
|
567
|
+
const versionUnknownFeatures: VersionUnknownFeature[] = []
|
|
568
|
+
for (const id of reachable) {
|
|
569
|
+
const credit = creditOf(config, id, reference.packageVersion.version, owner)
|
|
570
|
+
if (credit.status === 'credited') features.push(id)
|
|
571
|
+
else
|
|
572
|
+
versionUnknownFeatures.push({
|
|
573
|
+
feature: id,
|
|
574
|
+
reason: credit.reason,
|
|
575
|
+
differs: credit.differs,
|
|
576
|
+
})
|
|
577
|
+
}
|
|
446
578
|
return {
|
|
447
579
|
...reference,
|
|
448
580
|
features,
|
|
449
|
-
|
|
581
|
+
versionUnknownFeatures,
|
|
582
|
+
mapping: features.length
|
|
583
|
+
? 'mapped'
|
|
584
|
+
: versionUnknownFeatures.length
|
|
585
|
+
? 'unknown-version'
|
|
586
|
+
: 'unmapped-feature',
|
|
450
587
|
}
|
|
451
588
|
})
|
|
452
589
|
const reached = new Set(
|
|
@@ -480,6 +617,43 @@ export async function createCoverageReport(
|
|
|
480
617
|
reason: 'source references do not select device, OS, settings or interaction cells',
|
|
481
618
|
proofUrl: 'https://peachsim.com/conformance',
|
|
482
619
|
}))
|
|
620
|
+
// one entry per package release and feature the scan could not credit
|
|
621
|
+
const versionUnknown = [
|
|
622
|
+
...Map.groupBy(
|
|
623
|
+
references.flatMap((reference) =>
|
|
624
|
+
reference.versionUnknownFeatures.map((entry) => ({
|
|
625
|
+
packageName: reference.packageName,
|
|
626
|
+
version: reference.packageVersion?.version ?? '',
|
|
627
|
+
...entry,
|
|
628
|
+
})),
|
|
629
|
+
),
|
|
630
|
+
(entry) => `${entry.packageName}\0${entry.version}\0${entry.feature}`,
|
|
631
|
+
).values(),
|
|
632
|
+
].map((group) => ({ ...group[0], references: group.length }))
|
|
633
|
+
// what a cell captured on one more release would credit, so the cheapest
|
|
634
|
+
// second release to capture on can be read from the apps scanned
|
|
635
|
+
const captureCandidates = [
|
|
636
|
+
...Map.groupBy(
|
|
637
|
+
versionUnknown.flatMap((entry) => {
|
|
638
|
+
const config = nativeSources.get(entry.packageName)
|
|
639
|
+
if (!config || !entry.differs.length) return []
|
|
640
|
+
return creditingReleases(config, entry.feature, entry.version).map((release) => ({
|
|
641
|
+
packageName: entry.packageName,
|
|
642
|
+
release,
|
|
643
|
+
feature: entry.feature,
|
|
644
|
+
references: entry.references,
|
|
645
|
+
}))
|
|
646
|
+
}),
|
|
647
|
+
(entry) => `${entry.packageName}\0${entry.release}`,
|
|
648
|
+
).values(),
|
|
649
|
+
]
|
|
650
|
+
.map((group) => ({
|
|
651
|
+
packageName: group[0]?.packageName ?? '',
|
|
652
|
+
release: group[0]?.release ?? '',
|
|
653
|
+
features: [...new Set(group.map((entry) => entry.feature))].sort(),
|
|
654
|
+
references: group.reduce((total, entry) => total + entry.references, 0),
|
|
655
|
+
}))
|
|
656
|
+
.sort((a, b) => b.references - a.references || b.release.localeCompare(a.release))
|
|
483
657
|
const packages = new Map<
|
|
484
658
|
string,
|
|
485
659
|
{
|
|
@@ -541,9 +715,14 @@ export async function createCoverageReport(
|
|
|
541
715
|
reference.mapping === 'unknown-version' ||
|
|
542
716
|
reference.mapping === 'unmapped-feature',
|
|
543
717
|
).length,
|
|
544
|
-
|
|
718
|
+
versionUnknownReferences: references.filter(
|
|
545
719
|
(reference) =>
|
|
546
|
-
reference.state === 'attributed' &&
|
|
720
|
+
reference.state === 'attributed' &&
|
|
721
|
+
(reference.versionStatus === 'unmatched' ||
|
|
722
|
+
reference.versionUnknownFeatures.length > 0),
|
|
723
|
+
).length,
|
|
724
|
+
noNativeSurfaceReferences: references.filter(
|
|
725
|
+
(reference) => reference.mapping === 'no-native-surface',
|
|
547
726
|
).length,
|
|
548
727
|
projectModuleReferences,
|
|
549
728
|
possibleFeatures: features.length,
|
|
@@ -570,6 +749,8 @@ export async function createCoverageReport(
|
|
|
570
749
|
})),
|
|
571
750
|
references,
|
|
572
751
|
features,
|
|
752
|
+
versionUnknown,
|
|
753
|
+
captureCandidates: captureCandidates.slice(0, 5),
|
|
573
754
|
unknowns,
|
|
574
755
|
limitations: [
|
|
575
756
|
...(graphRequest
|
|
@@ -580,9 +761,11 @@ export async function createCoverageReport(
|
|
|
580
761
|
: []),
|
|
581
762
|
'Application source is scanned conservatively, without compiling or executing the app. Source roots do not establish entrypoint reachability.',
|
|
582
763
|
'Transitive library source, computed loading, cross-file aliases and runtime values are not resolved. Their feature and scenario reach remains unknown.',
|
|
583
|
-
'Declared dependency ranges alone are not exact package versions. The installed or unambiguous lockfile version
|
|
764
|
+
'Declared dependency ranges alone are not exact package versions. The installed or unambiguous lockfile version is required.',
|
|
765
|
+
'React Native core features credit every resolved React Native release the app builds on the new iOS architecture. Libraries with native source ranges also require identical native and native-facing JavaScript source. A legacy or unreadable architecture and source differences remain version unknown.',
|
|
584
766
|
'This CLI inventory snapshot is not pinned to a selected runtime. Native fidelity and scenario verification remain unknown; no aggregate percentage is established.',
|
|
585
767
|
"Imports through the app's own tsconfig or jsconfig paths, baseUrl or package.json imports are application source, not packages, and are not counted as references. App-owned native modules behind such an alias are listed and stay unknown.",
|
|
768
|
+
'A package that ships no native code reads as no native surface. The scan does not follow it into its own source, so the React Native components it renders are not attributed. A package that is not installed is unread.',
|
|
586
769
|
'Swift source indexing is not included in this React Native source scan.',
|
|
587
770
|
],
|
|
588
771
|
}
|
|
@@ -657,7 +840,7 @@ export async function runCoverage(args: string[]): Promise<number> {
|
|
|
657
840
|
`Scanned ${report.input.files} source files: ${summary.references} package references (${summary.projectModuleReferences} imports of the app's own modules not counted).`,
|
|
658
841
|
)
|
|
659
842
|
console.log(
|
|
660
|
-
` mapped to a feature: ${summary.mappedReferences};
|
|
843
|
+
` mapped to a feature: ${summary.mappedReferences}; package ships no native code: ${summary.noNativeSurfaceReferences}; version unknown: ${summary.versionUnknownReferences}; other unknown or unmapped: ${Math.max(0, summary.unknownReferences - summary.versionUnknownReferences)}`,
|
|
661
844
|
)
|
|
662
845
|
console.log(
|
|
663
846
|
`Possible features: ${summary.possibleFeatures}. Mapped share: unknown. Verified share: unknown.`,
|
|
@@ -682,6 +865,22 @@ export async function runCoverage(args: string[]): Promise<number> {
|
|
|
682
865
|
)
|
|
683
866
|
if (report.packages.length > PACKAGE_LINES)
|
|
684
867
|
console.log(` ${report.packages.length - PACKAGE_LINES} more packages; use --json`)
|
|
868
|
+
const VERSION_LINES = 12
|
|
869
|
+
if (report.versionUnknown.length) {
|
|
870
|
+
console.log(
|
|
871
|
+
'Version unknown (native source not shown unchanged since a verified release):',
|
|
872
|
+
)
|
|
873
|
+
for (const entry of report.versionUnknown.slice(0, VERSION_LINES))
|
|
874
|
+
console.log(
|
|
875
|
+
` ${entry.packageName} ${entry.version} ${entry.feature}: ${entry.reason}`,
|
|
876
|
+
)
|
|
877
|
+
if (report.versionUnknown.length > VERSION_LINES)
|
|
878
|
+
console.log(` ${report.versionUnknown.length - VERSION_LINES} more; use --json`)
|
|
879
|
+
}
|
|
880
|
+
for (const candidate of report.captureCandidates)
|
|
881
|
+
console.log(
|
|
882
|
+
` a cell captured on ${candidate.packageName} ${candidate.release} would credit ${candidate.features.length} features (${candidate.references} references)`,
|
|
883
|
+
)
|
|
685
884
|
for (const module of report.localNativeModules)
|
|
686
885
|
console.log(
|
|
687
886
|
` app-owned native module ${module.module} (${module.path}): ${module.references} references, unknown`,
|
package/cli/commands/detect.ts
CHANGED
|
@@ -482,10 +482,12 @@ export function installedManifest(
|
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
// read only explicit static native build settings for the selected platform.
|
|
485
|
+
// `appJson: false` leaves out app.json, which a dynamic app config can override.
|
|
485
486
|
export function readNativeProjectRenderer(
|
|
486
487
|
dir: string,
|
|
487
488
|
platform: 'ios' | 'android',
|
|
488
489
|
files: RepoFileReader = nodeRepoFileReader,
|
|
490
|
+
{ appJson = true }: { appJson?: boolean } = {},
|
|
489
491
|
): NativeRenderer | undefined {
|
|
490
492
|
const declarations: Array<{ source: string; enabled: boolean }> = []
|
|
491
493
|
const add = (value: unknown, source: string, strings = false) => {
|
|
@@ -508,12 +510,14 @@ export function readNativeProjectRenderer(
|
|
|
508
510
|
throw new Error(`${path}: malformed native metadata`)
|
|
509
511
|
}
|
|
510
512
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
513
|
+
if (appJson) {
|
|
514
|
+
const expo = metadataValue(json('app.json'), 'expo')
|
|
515
|
+
add(metadataValue(expo, 'newArchEnabled'), 'app.json expo.newArchEnabled')
|
|
516
|
+
add(
|
|
517
|
+
metadataValue(metadataValue(expo, platform), 'newArchEnabled'),
|
|
518
|
+
`app.json expo.${platform}.newArchEnabled`,
|
|
519
|
+
)
|
|
520
|
+
}
|
|
517
521
|
if (platform === 'ios') {
|
|
518
522
|
add(
|
|
519
523
|
metadataValue(json('ios/Podfile.properties.json'), 'newArchEnabled'),
|