peachsim 0.1.1744 → 0.1.1801
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/cli/account-gate.ts +97 -0
- package/cli/app-catalog.ts +24 -0
- package/cli/app-stubs.ts +7 -0
- package/cli/auth.ts +48 -18
- package/cli/bin.ts +35 -2
- package/cli/bridge-flow-runner.ts +174 -6
- package/cli/cloud-dispatch.ts +0 -3
- package/cli/command-registry.ts +2 -6
- package/cli/commands/auth.ts +68 -3
- package/cli/commands/compat.ts +1116 -0
- package/cli/commands/control.ts +90 -13
- package/cli/commands/coverage.ts +85 -116
- package/cli/commands/detox.ts +20 -20
- package/cli/commands/device.ts +31 -27
- package/cli/commands/doctor.ts +76 -1032
- package/cli/commands/flow.ts +80 -41
- package/cli/commands/guest-host.ts +2 -2
- package/cli/commands/inspect/core.ts +8 -7
- package/cli/commands/inspect/settling.ts +60 -25
- package/cli/commands/inspect/wait-ready.ts +6 -4
- package/cli/commands/inspect/wait-selector.ts +32 -18
- package/cli/commands/inspect.ts +8 -6
- package/cli/commands/kotlin.ts +15 -6
- package/cli/commands/logout.ts +4 -2
- package/cli/commands/maestro-compare.ts +19 -37
- package/cli/commands/maestro-generate.ts +4 -4
- package/cli/commands/maestro.ts +56 -37
- package/cli/commands/package.ts +136 -57
- package/cli/commands/preview.ts +10 -1
- package/cli/commands/{film.ts → record-three.ts} +33 -28
- package/cli/commands/record.ts +41 -39
- package/cli/commands/screenshots.ts +4 -0
- package/cli/commands/setup.ts +38 -1
- package/cli/commands/shell-url.ts +49 -24
- package/cli/commands/swift.ts +29 -11
- package/cli/commands/test.ts +43 -13
- package/cli/commands/upload.ts +12 -9
- package/cli/drivers/playwright-core-pin.ts +2 -2
- package/cli/flow-export.ts +1 -1
- package/cli/flow-file.ts +1 -1
- package/cli/internal-child.ts +3 -8
- package/cli/maestro-compare.ts +73 -7
- package/cli/maestro-js.ts +1 -1
- package/cli/maestro-report.ts +1 -1
- package/cli/maestro-workspace.ts +66 -4
- package/cli/main.ts +22 -55
- package/cli/native-input.ts +13 -20
- package/cli/outbound-endpoints.ts +40 -7
- package/cli/output-redaction.ts +8 -3
- package/cli/packaged-app-launcher.ts +40 -28
- package/cli/prompt.ts +20 -0
- package/cli/recording-access.ts +7 -7
- package/cli/run-registry.ts +1 -1
- package/cli/scene-video.ts +0 -4
- package/cli/ws-bridge.ts +7 -4
- package/detox/index.ts +293 -50
- package/detox/jest-preset.cjs +6 -0
- package/detox/launch-permissions.ts +1 -21
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -8
- package/dist-lib/bridge-contract.mjs +2 -7
- package/dist-lib/bundle-channel.cjs +45273 -38265
- package/dist-lib/capture-contract.cjs +37 -14
- package/dist-lib/capture-contract.mjs +36 -13
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +2 -2
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +562 -126
- package/dist-lib/detox/jest-preset.cjs +6 -0
- package/dist-lib/dev-bundle-resolution.cjs +18 -13
- package/dist-lib/expo-swift-bundle.cjs +28566 -23874
- package/dist-lib/expo-swift-metadata.cjs +104 -2
- package/dist-lib/expo-swift-metadata.mjs +104 -2
- package/dist-lib/home-paths.cjs +8 -5
- package/dist-lib/host/bridge-host.cjs +36618 -29846
- package/dist-lib/host/fetch-proxy-handler.cjs +23 -20
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +5 -2
- package/dist-lib/index.cjs +1921 -1549
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +21 -7
- package/dist-lib/menu.mjs +21 -7
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1877 -1584
- package/dist-lib/native-app-identity-project.cjs +1274 -951
- package/dist-lib/native-app-identity-project.mjs +1414 -963
- package/dist-lib/native-app-identity.cjs +64 -58
- package/dist-lib/native-app-identity.mjs +64 -58
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -33
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +484 -280
- package/dist-lib/react-native-host-modules.cjs +3 -1
- package/dist-lib/react-native-host-modules.mjs +3 -1
- package/dist-lib/reap-browser.cjs +23 -26
- package/dist-lib/scripts/dev-server-scanner.cjs +13 -10
- package/dist-lib/sdk.cjs +69 -36
- package/dist-lib/sdk.mjs +69 -36
- package/dist-lib/skills.cjs +33781 -27141
- package/dist-lib/swift-compile.cjs +3759 -2520
- package/dist-lib/swift-compile.mjs +3680 -2441
- package/dist-lib/swift-package.cjs +33 -1
- package/dist-lib/swift-package.mjs +31 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +102 -5
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +16480 -14579
- package/dist-lib/vite.cjs +269 -295
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/secure-item-store.d.ts +38 -0
- package/dist-types/packages/peach-compat/src/stubs/ring-mode-state.d.ts +4 -0
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +21 -12
- package/dist-types/packages/peach-engine/src/billing/plans.d.ts +1 -2
- package/dist-types/packages/peach-engine/src/capture/browser-composite-provider.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/capture/browser-composite.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/animated-driven-style.d.ts +10 -10
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +6 -2
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/lottie-runtime.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/native-animation-driver.d.ts +18 -1
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +71 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +31 -3
- package/dist-types/packages/peach-engine/src/engine/paint-boundary-types.d.ts +0 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +7 -2
- package/dist-types/packages/peach-engine/src/engine/portals.d.ts +2 -4
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +7 -1
- package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-velocity.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/engine/secureItemHostContract.d.ts +30 -0
- package/dist-types/packages/peach-engine/src/engine/shell-owned-values.d.ts +55 -0
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +85 -26
- package/dist-types/packages/peach-engine/src/graphite-stats-fields.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/ios/aux-home-scene.d.ts +3 -4
- package/dist-types/packages/peach-engine/src/ios/aux-shell-animated-sources.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/ios/home-app-catalog.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/ios/photo-store.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/ios/photoLibraryContract.d.ts +15 -0
- package/dist-types/packages/peach-engine/src/ios/shell-controller-types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/metro-asset-path.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-worker-init.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +31 -12
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-presentation.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/render-worker/expo-widgetContract.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/expo-widgets-activityContract.d.ts +15 -0
- package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +12 -2
- package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +30 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -9
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror-tenant.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +8 -4
- package/dist-types/packages/peach-engine/src/render-worker/shell-scene-schema.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/render-worker/text-inputContract.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +10 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-sab.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +4 -0
- package/dist-types/packages/peach-globals/src/eventBridgeContract.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +7 -0
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -1
- package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +5 -1
- package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +3 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +23 -1
- package/dist-types/packages/peach-kit/src/internal.d.ts +2 -1
- package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +2 -0
- package/dist-types/packages/peach-kit/src/ui/keyboard-toolbar.d.ts +5 -0
- package/install.sh +20 -1
- package/package.json +6 -5
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h +629 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionDeprecated.h +90 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionRoute.h +256 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h +1006 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVFAudio.apinotes +246 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVFAudio.h +5 -0
- package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAnimation.h +52 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioSession.h +11 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h +264 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h +88 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSession.h +1360 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSessionPreset.h +167 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h +13 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMediaFormat.h +508 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataItem.h +1 -1
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h +31 -0
- package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVSampleBufferDisplayLayer.h +18 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureDeviceDirectionCoordinator.h +113 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEvent.h +82 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEventInteraction.h +114 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEventSound.h +50 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVError.h +51 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVInputPickerInteraction.h +93 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h +39 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes +112 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h +110 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h +79 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKitTypes.h +54 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVLegibleMediaOptionsMenuController.h +193 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController.h +271 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController_AVSampleBufferDisplayLayerSupport.h +135 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController_VideoCallSupport.h +66 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackRouteSelecting.h +46 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h +71 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackUserInterfaceControllable.h +551 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h +42 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h +704 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h +186 -0
- package/sdk/ios/System/Library/Frameworks/AVKit.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/AudioSessionTypes.h +104 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h +1621 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes +42 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAttribute.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCharacteristic.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDescriptor.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBService.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreRequest.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFRunLoop.h +195 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h +220 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h +501 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +3 -18
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMBase.h +443 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h +8 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h +996 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMTime.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h +3 -0
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFMessage.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFPayload.h +2 -2
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFReaderSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCReaderSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularData.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h +1811 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontCollection.h +360 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h +574 -17
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManagerErrors.h +109 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFrame.h +336 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h +203 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTGlyphInfo.h +264 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h +531 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTParagraphStyle.h +496 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRubyAnnotation.h +326 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRun.h +547 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h +496 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTTextTab.h +158 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h +286 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +80 -1
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h +1833 -0
- package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/SFNTTypes.h +482 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DDDevicePickerViewController.h +41 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DeviceDiscoveryUI.h +9 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DeviceDiscoveryUIDefines.h +14 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Modules/DeviceDiscoveryUI.swiftcrossimport/SwiftUI.swiftoverlay +4 -0
- package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +49 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h +2 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSRegularExpression.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSUbiquitousKeyValueStore.h +30 -0
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievement.h +3 -3
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKBasePlayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallenge.h +6 -6
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h +4 -4
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLocalPlayer.h +6 -6
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmaker.h +2 -2
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKNotificationBanner.h +1 -1
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPlayer.h +3 -3
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGame.h +2 -2
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatch.h +4 -4
- package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatchmakerViewController.h +3 -3
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalType.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h +6 -6
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h +5 -5
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h +14 -14
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h +1 -1
- package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h +20 -20
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +1 -1
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageMetadata.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h +2 -0
- package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/ImageIOBase.h +6 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSBase.h +195 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContext.h +245 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContextRef.h +178 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSExport.h +151 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSManagedValue.h +81 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSObjectRef.h +755 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSStringRef.h +148 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSStringRefCF.h +60 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSTypedArray.h +180 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSValue.h +824 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSValueRef.h +555 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSVirtualMachine.h +92 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JavaScript.h +37 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JavaScriptCore.h +38 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/WebKitAvailability.h +36 -0
- package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Modules/module.modulemap +8 -0
- package/sdk/ios/System/Library/Frameworks/MobileCoreServices.framework/Headers/UTType.h +19 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCAdvertiserAssistant.h +76 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCBrowserViewController.h +88 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCError.h +34 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCNearbyServiceAdvertiser.h +84 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCNearbyServiceBrowser.h +94 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCPeerID.h +37 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCSession.h +215 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MultipeerConnectivity.apinotes +5 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MultipeerConnectivity.h +15 -0
- package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotHelper.h +1 -1
- package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +1 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h +6 -6
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +2 -2
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h +2 -2
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h +4 -4
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +2 -2
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitDeprecated.h +3 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSLayoutManager.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +172 -27
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSText.h +59 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextContainer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextList.h +63 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextStorage.h +10 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSToolbar+UIKitAdditions.h +142 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +20 -20
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAction.h +103 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UICommand.h +131 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +8 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFont.h +80 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFontDescriptor.h +191 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGeometry.h +259 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +9 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +5 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +6 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInteraction.h +37 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +4248 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +66 -102
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h +55 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UILayoutGuide.h +62 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenu.h +283 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuDisplayPreferences.h +27 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuElement.h +86 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuLeaf.h +68 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +3 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +2 -0
- package/sdk/ios/System/Library/Frameworks/UIKitText.framework/Headers/UIKitText.apinotes +135 -0
- package/sdk/ios/System/Library/Frameworks/UIKitText.framework/Modules/module.modulemap +8 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTAdditions.h +167 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTCoreTypes.h +1332 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes +53 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.h +18 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNError.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotification.h +27 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAction.h +69 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationActionIcon.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttachment.h +44 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttributedMessageContext.h +24 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationCategory.h +82 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h +152 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationRequest.h +34 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationResponse.h +41 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationServiceExtension.h +27 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSettings.h +90 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSound.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationTrigger.h +64 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h +107 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes +17 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCDefines.h +14 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSession.h +200 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSessionFile.h +30 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSessionUserInfoTransfer.h +22 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WatchConnectivity.apinotes +19 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WatchConnectivity.h +15 -0
- package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h +120 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardList.h +77 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardListItem.h +54 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleList.h +37 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleListStore.h +47 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorld.h +87 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorldConfiguration.h +71 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContextMenuElementInfo.h +47 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDOMNodeSnapshot.h +57 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDataDetectorTypes.h +60 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h +67 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h +146 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKError.h +71 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindConfiguration.h +52 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindResult.h +41 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFormInfo.h +63 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFoundation.h +72 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h +62 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKHTTPCookieStore.h +108 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKImmersiveEnvironment.h +50 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKImmersiveEnvironmentDelegate.h +69 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKJSHandle.h +80 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigation.h +45 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h +118 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationDelegate.h +219 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationResponse.h +60 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h +47 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPDFConfiguration.h +49 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h +117 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewActionItem.h +39 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewActionItemIdentifiers.h +38 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewElementInfo.h +43 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKProcessPool.h +39 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessage.h +64 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessageHandler.h +52 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessageHandlerWithReply.h +95 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSecurityOrigin.h +57 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSnapshotConfiguration.h +59 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h +316 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKURLSchemeHandler.h +61 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKURLSchemeTask.h +75 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserContentController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h +76 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h +237 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h +164 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h +106 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h +790 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h +255 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h +89 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h +207 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h +90 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h +43 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h +175 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h +99 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h +95 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h +396 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h +94 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h +170 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h +87 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h +800 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h +275 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h +150 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataRecord.h +90 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h +137 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWindowFeatures.h +72 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes +204 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h +93 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h +3 -0
- package/sdk/ios/System/Library/Frameworks/WebKit.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/WiFiAware.framework/Modules/WiFiAware.swiftmodule/arm64-apple-ios-simulator.swiftinterface +605 -0
- package/sdk/ios/System/Library/Frameworks/_DeviceDiscoveryUI_SwiftUI.framework/Modules/_DeviceDiscoveryUI_SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +79 -0
- package/sdk/ios/usr/include/MacTypes.h +8 -0
- package/sdk/ios/usr/include/objc/NSObjCRuntime.h +5 -0
- package/sdk/ios/wasm/include/fcntl.h +1 -0
- package/sdk/ios/wasm/include/pthread.h +2 -0
- package/sdk/ios/wasm/include/stdlib.h +1 -0
- package/sdk/native-hashes.json +11 -1
- package/skills/contrast/SKILL.md +4 -9
- package/skills/peach-perf/SKILL.md +3 -1
- package/skills/peach-perf/references/profiling.md +1 -1
- package/skills/peach-test/SKILL.md +20 -17
- package/skills/peach-test/references/detox.md +7 -7
- package/skills/peach-test/references/maestro.md +20 -18
- package/src/admitted-mac-build.ts +7 -0
- package/src/android-autolinking.ts +2 -2
- package/src/android-drawables.ts +5 -5
- package/src/android-string-value.ts +1 -1
- package/src/android-strings.ts +1 -1
- package/src/android-theme.ts +2 -2
- package/src/appPackageContract.ts +1 -1
- package/src/bridge-contract.ts +12 -16
- package/src/build-cache.ts +65 -0
- package/src/bundle-channel.mjs +69 -9
- package/src/capture-contract.ts +55 -17
- package/src/chromium-admission.ts +24 -21
- package/src/conformance-comparison-contract.ts +105 -40
- package/src/dev-bundle-resolution.ts +23 -10
- package/src/device-catalog.ts +35 -2
- package/src/disk-cleanup.ts +18 -8
- package/src/expo-autolinking.ts +24 -0
- package/src/expo-discovery-cache.ts +168 -23
- package/src/expo-native-workspace.ts +551 -191
- package/src/expo-swift-host.ts +711 -314
- package/src/expo-swift-ready.ts +39 -5
- package/src/expo-widget-assets.ts +2 -2
- package/src/expo-widgets-bundle.ts +56 -0
- package/src/expo-workspace-exclusion.ts +62 -0
- package/src/expoSwiftContract.ts +27 -4
- package/src/forked-script-contract.ts +3 -0
- package/src/home-paths.ts +10 -6
- package/src/host/bridge-host.ts +27 -0
- package/src/host/network-policy.ts +1 -1
- package/src/kotlin-app.ts +9 -11
- package/src/kotlin-host.ts +2 -2
- package/src/launchMetadataContract.ts +5 -0
- package/src/menu.ts +19 -5
- package/src/native-app-identity-project.ts +35 -49
- package/src/native-app-identity.ts +5 -6
- package/src/native-firebase-config.ts +10 -48
- package/src/native-prebuilt.ts +3 -2
- package/src/native-slices.ts +39 -0
- package/src/native-static-libraries.ts +73 -0
- package/src/nitro-adapter.lock.json +249 -249
- package/src/nitro-adapter.ts +16 -5
- package/src/nitro-bundle.ts +35 -16
- package/src/nitro-compile.ts +254 -16
- package/src/nitro-compiler-digest.ts +39 -0
- package/src/nitro-dependencies.ts +368 -28
- package/src/nitro-source.ts +432 -77
- package/src/nitro-superset.lock.json +27 -36
- package/src/nitro-superset.ts +6 -0
- package/src/nitroAdapterContract.ts +52 -0
- package/src/nitroContract.ts +40 -4
- package/src/numbered-lock.ts +2 -2
- package/src/one-native-app-accent.ts +32 -0
- package/src/one-widget-discovery.ts +6 -1
- package/src/one-widget-metadata.ts +2 -2
- package/src/portable-expo-contract.ts +103 -0
- package/src/portable-expo-workspace.ts +94 -0
- package/src/prepared-native-inventory.ts +93 -0
- package/src/prepared-xcode-phases.ts +194 -0
- package/src/process-group.ts +8 -15
- package/src/process-table.ts +117 -0
- package/src/react-native-bridge-modules.ts +240 -14
- package/src/react-native-coverage/native-typescript-parser.ts +11 -2
- package/src/react-native-coverage/verified-reach.ts +12 -6
- package/src/react-native-host-modules.ts +2 -0
- package/src/reap-browser.ts +13 -9
- package/src/retired-cache-directory.ts +34 -0
- package/src/runtime-assets.ts +1 -0
- package/src/screenshots/orchestrate.ts +4 -0
- package/src/screenshots/schema.ts +2 -2
- package/src/storageSnapshotContract.ts +9 -2
- package/src/stub-pattern-matcher.ts +53 -19
- package/src/swift-compile.ts +1011 -327
- package/src/swift-compiler-digest.ts +3 -0
- package/src/swift-coverage/indexing.ts +1 -1
- package/src/swift-coverage/xcode-asset-symbols.ts +72 -39
- package/src/swift-coverage/xcode-assets.ts +2 -1
- package/src/swift-cxx-declarations.ts +114 -130
- package/src/swift-cxx-standin.ts +3 -3
- package/src/swift-darwin-records.ts +88 -0
- package/src/swift-distribution.lock.json +15 -12
- package/src/swift-distribution.ts +25 -9
- package/src/swift-host.ts +443 -142
- package/src/swift-icu.ts +72 -4
- package/src/swift-link-roots.ts +2 -0
- package/src/swift-objc-compile.ts +312 -65
- package/src/swift-objc-import.ts +8 -1
- package/src/swift-objc-standin.ts +20 -2
- package/src/swift-package-manifest.ts +189 -57
- package/src/swift-package.ts +51 -0
- package/src/swift-packages.ts +117 -45
- package/src/swift-pdf-raster.ts +7 -4
- package/src/swift-project-user.ts +183 -0
- package/src/swift-reproducible.ts +26 -0
- package/src/swift-root-lock.ts +34 -62
- package/src/swift-shared-sdk.ts +232 -21
- package/src/swift-source-pods.ts +9 -2
- package/src/swift-standin-emit.ts +248 -7
- package/src/swift-standins.ts +130 -108
- package/src/swift-submit.ts +3 -0
- package/src/swift-toolchain.ts +109 -8
- package/src/swift-wasm-prune.ts +210 -55
- package/src/swiftContract.ts +14 -0
- package/src/swiftGuestImageContract.ts +113 -0
- package/src/turbo-bundle.ts +5 -8
- package/src/turbo-codegen-intake.ts +134 -0
- package/src/turbo-compile.ts +198 -21
- package/src/turbo-native-libraries.ts +98 -0
- package/src/turbo-runtime.lock.json +25 -18
- package/src/turbo-source.ts +1519 -147
- package/src/vite-plugin-one.ts +25 -3
- package/src/vite-plugin-swift.ts +5 -1
- package/src/vite-plugin.ts +40 -18
- package/src/worker-system-chunks.ts +103 -15
- package/src/worklets-babel.ts +50 -29
- package/src/xcode-header-search.ts +15 -5
- package/src/xcode-project.ts +444 -88
- package/src/xcode-target-members.ts +72 -63
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-resample.d.ts +0 -44
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { isRecord } from './is-record'
|
|
5
|
+
import type { PreparedSwiftPin, PreparedXcodePhase } from './prepared-xcode-phases'
|
|
6
|
+
|
|
7
|
+
export interface PortableExpoWorkspaceManifest {
|
|
8
|
+
format: 'peach-expo-workspace-v1'
|
|
9
|
+
sourceHash: string
|
|
10
|
+
configHash: string
|
|
11
|
+
archiveHash: string
|
|
12
|
+
checkoutsArchiveHash: string
|
|
13
|
+
interfacesArchiveHash: string
|
|
14
|
+
interfacesHash: string
|
|
15
|
+
producerRoot: string
|
|
16
|
+
swiftDistribution: string
|
|
17
|
+
selected: string[]
|
|
18
|
+
inventory: { name: string; sha256: string }[]
|
|
19
|
+
app: string
|
|
20
|
+
workspace: string
|
|
21
|
+
interfaces: string
|
|
22
|
+
checkouts: string
|
|
23
|
+
pins: PreparedSwiftPin[]
|
|
24
|
+
phases: PreparedXcodePhase[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const digest = (value: unknown): value is string =>
|
|
28
|
+
typeof value === 'string' && /^[a-f0-9]{64}$/.test(value)
|
|
29
|
+
|
|
30
|
+
function isManifest(value: unknown): value is PortableExpoWorkspaceManifest {
|
|
31
|
+
return (
|
|
32
|
+
isRecord(value) &&
|
|
33
|
+
value.format === 'peach-expo-workspace-v1' &&
|
|
34
|
+
digest(value.sourceHash) &&
|
|
35
|
+
digest(value.configHash) &&
|
|
36
|
+
digest(value.archiveHash) &&
|
|
37
|
+
digest(value.checkoutsArchiveHash) &&
|
|
38
|
+
digest(value.interfacesArchiveHash) &&
|
|
39
|
+
digest(value.interfacesHash) &&
|
|
40
|
+
typeof value.producerRoot === 'string' &&
|
|
41
|
+
path.isAbsolute(value.producerRoot) &&
|
|
42
|
+
typeof value.swiftDistribution === 'string' &&
|
|
43
|
+
typeof value.app === 'string' &&
|
|
44
|
+
typeof value.workspace === 'string' &&
|
|
45
|
+
typeof value.interfaces === 'string' &&
|
|
46
|
+
typeof value.checkouts === 'string' &&
|
|
47
|
+
Array.isArray(value.pins) &&
|
|
48
|
+
value.pins.every(
|
|
49
|
+
(pin) =>
|
|
50
|
+
isRecord(pin) &&
|
|
51
|
+
typeof pin.identity === 'string' &&
|
|
52
|
+
/^[a-z0-9][a-z0-9._-]*$/.test(pin.identity) &&
|
|
53
|
+
!pin.identity.includes('..') &&
|
|
54
|
+
typeof pin.location === 'string' &&
|
|
55
|
+
typeof pin.revision === 'string' &&
|
|
56
|
+
/^[a-f0-9]{40,64}$/.test(pin.revision),
|
|
57
|
+
) &&
|
|
58
|
+
Array.isArray(value.selected) &&
|
|
59
|
+
value.selected.every((item) => typeof item === 'string') &&
|
|
60
|
+
Array.isArray(value.inventory) &&
|
|
61
|
+
value.inventory.every(
|
|
62
|
+
(item) => isRecord(item) && typeof item.name === 'string' && digest(item.sha256),
|
|
63
|
+
) &&
|
|
64
|
+
Array.isArray(value.phases) &&
|
|
65
|
+
value.phases.every(
|
|
66
|
+
(phase) =>
|
|
67
|
+
isRecord(phase) &&
|
|
68
|
+
typeof phase.project === 'string' &&
|
|
69
|
+
typeof phase.target === 'string' &&
|
|
70
|
+
typeof phase.phase === 'string' &&
|
|
71
|
+
typeof phase.configuration === 'string' &&
|
|
72
|
+
Array.isArray(phase.outputs) &&
|
|
73
|
+
phase.outputs.every(
|
|
74
|
+
(item) =>
|
|
75
|
+
isRecord(item) &&
|
|
76
|
+
typeof item.path === 'string' &&
|
|
77
|
+
(item.sha256 === null || digest(item.sha256)),
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function readPortableExpoManifest(file: string): PortableExpoWorkspaceManifest {
|
|
84
|
+
const value: unknown = JSON.parse(fs.readFileSync(file, 'utf8'))
|
|
85
|
+
if (!isManifest(value))
|
|
86
|
+
throw new Error(`invalid prepared Expo workspace manifest: ${file}`)
|
|
87
|
+
return value
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function portableInterfaceHash(directory: string): string {
|
|
91
|
+
const hash = createHash('sha256')
|
|
92
|
+
for (const entry of fs
|
|
93
|
+
.readdirSync(directory, { withFileTypes: true })
|
|
94
|
+
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
95
|
+
if (!entry.isFile())
|
|
96
|
+
throw new Error(`invalid prepared Swift interface: ${entry.name}`)
|
|
97
|
+
const bytes = fs.readFileSync(path.join(directory, entry.name))
|
|
98
|
+
hash
|
|
99
|
+
.update(`${Buffer.byteLength(entry.name)}:${entry.name}:${bytes.length}:`)
|
|
100
|
+
.update(bytes)
|
|
101
|
+
}
|
|
102
|
+
return hash.digest('hex')
|
|
103
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { isRecord } from './is-record'
|
|
5
|
+
import { readExpoConfigAsync } from './native-firebase-config'
|
|
6
|
+
import { portableInterfaceHash, readPortableExpoManifest } from './portable-expo-contract'
|
|
7
|
+
import { preparedNativeInventory } from './prepared-native-inventory'
|
|
8
|
+
import { registerPreparedXcodePhases } from './prepared-xcode-phases'
|
|
9
|
+
import lock from './swift-distribution.lock.json' with { type: 'json' }
|
|
10
|
+
|
|
11
|
+
function stable(value: unknown, app: string): string {
|
|
12
|
+
if (typeof value === 'string') return JSON.stringify(value.split(app).join('$APP'))
|
|
13
|
+
if (Array.isArray(value)) return `[${value.map((item) => stable(item, app)).join(',')}]`
|
|
14
|
+
if (isRecord(value))
|
|
15
|
+
return `{${Object.keys(value)
|
|
16
|
+
.sort()
|
|
17
|
+
.map((key) => `${JSON.stringify(key)}:${stable(value[key], app)}`)
|
|
18
|
+
.join(',')}}`
|
|
19
|
+
return JSON.stringify(value) ?? 'null'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function portableExpoConfigHash(app: string): Promise<string> {
|
|
23
|
+
const config = await readExpoConfigAsync(app)
|
|
24
|
+
return createHash('sha256')
|
|
25
|
+
.update(stable(config, fs.realpathSync(app)))
|
|
26
|
+
.digest('hex')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function contained(root: string, relative: string): string {
|
|
30
|
+
if (path.isAbsolute(relative))
|
|
31
|
+
throw new Error(`absolute prepared workspace path: ${relative}`)
|
|
32
|
+
const file = fs.realpathSync(path.resolve(root, relative))
|
|
33
|
+
const within = path.relative(root, file)
|
|
34
|
+
if (within === '..' || within.startsWith(`..${path.sep}`) || path.isAbsolute(within))
|
|
35
|
+
throw new Error(`prepared workspace path escapes its archive: ${relative}`)
|
|
36
|
+
return file
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// the directory is supplied by the private producer's verified archive handoff.
|
|
40
|
+
// a miss is an error: using a different app or silently preparing locally
|
|
41
|
+
// would change the selected source graph.
|
|
42
|
+
export async function portableExpoWorkspace(
|
|
43
|
+
app: string,
|
|
44
|
+
sourceHash: string,
|
|
45
|
+
signal?: AbortSignal,
|
|
46
|
+
): Promise<{ app: string; workspace: string; work: string; identity: string }> {
|
|
47
|
+
const directory = process.env.PEACH_PREPARED_NATIVE_WORKSPACES
|
|
48
|
+
if (!directory) throw new Error(`missing prepared Expo workspace for ${sourceHash}`)
|
|
49
|
+
const configHash = await portableExpoConfigHash(app)
|
|
50
|
+
const mismatches: string[] = []
|
|
51
|
+
for (const name of fs.readdirSync(directory).sort()) {
|
|
52
|
+
signal?.throwIfAborted()
|
|
53
|
+
const root = fs.realpathSync(path.join(directory, name))
|
|
54
|
+
const file = path.join(root, 'manifest.json')
|
|
55
|
+
if (!fs.existsSync(file)) continue
|
|
56
|
+
const value = readPortableExpoManifest(file)
|
|
57
|
+
if (value.sourceHash !== sourceHash) continue
|
|
58
|
+
if (value.configHash !== configHash) {
|
|
59
|
+
mismatches.push(
|
|
60
|
+
`${name}: Expo config ${configHash} differs from ${value.configHash}`,
|
|
61
|
+
)
|
|
62
|
+
continue
|
|
63
|
+
}
|
|
64
|
+
if (value.swiftDistribution !== lock.id) {
|
|
65
|
+
mismatches.push(
|
|
66
|
+
`${name}: Swift distribution ${lock.id} differs from ${value.swiftDistribution}`,
|
|
67
|
+
)
|
|
68
|
+
continue
|
|
69
|
+
}
|
|
70
|
+
const actual = await preparedNativeInventory(app, value.selected, signal)
|
|
71
|
+
if (JSON.stringify(actual) !== JSON.stringify(value.inventory)) {
|
|
72
|
+
const expected = new Map(value.inventory.map(({ name, sha256 }) => [name, sha256]))
|
|
73
|
+
const found = new Map(actual.map(({ name, sha256 }) => [name, sha256]))
|
|
74
|
+
const changed = [...new Set([...expected.keys(), ...found.keys()])].filter(
|
|
75
|
+
(packageName) => expected.get(packageName) !== found.get(packageName),
|
|
76
|
+
)
|
|
77
|
+
mismatches.push(`${name}: native packages differ: ${changed.join(', ')}`)
|
|
78
|
+
continue
|
|
79
|
+
}
|
|
80
|
+
const work = contained(root, 'work')
|
|
81
|
+
const preparedApp = contained(work, value.app)
|
|
82
|
+
const workspace = contained(work, value.workspace)
|
|
83
|
+
const interfaces = contained(root, value.interfaces)
|
|
84
|
+
const checkouts = contained(root, value.checkouts)
|
|
85
|
+
if (portableInterfaceHash(interfaces) !== value.interfacesHash)
|
|
86
|
+
throw new Error(`prepared Swift interface digest mismatch: ${interfaces}`)
|
|
87
|
+
registerPreparedXcodePhases(work, value.phases, interfaces, checkouts, value.pins)
|
|
88
|
+
const identity = createHash('sha256').update(JSON.stringify(value)).digest('hex')
|
|
89
|
+
return { app: preparedApp, workspace, work, identity }
|
|
90
|
+
}
|
|
91
|
+
throw new Error(
|
|
92
|
+
`missing matching prepared Expo workspace for ${sourceHash}${mismatches.length ? ` (${mismatches.join('; ')})` : ''}`,
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process'
|
|
2
|
+
import { createHash } from 'node:crypto'
|
|
3
|
+
import fs from 'node:fs'
|
|
4
|
+
import { createRequire } from 'node:module'
|
|
5
|
+
import path from 'node:path'
|
|
6
|
+
import { setImmediate } from 'node:timers/promises'
|
|
7
|
+
import { promisify } from 'node:util'
|
|
8
|
+
import { autolinkerAppleFlags } from './expo-autolinking'
|
|
9
|
+
import { isRecord } from './is-record'
|
|
10
|
+
import { iosAutolinkedDependencies } from './nitro-source'
|
|
11
|
+
|
|
12
|
+
// a podspec can refer to any file in its package. include whole packages, not
|
|
13
|
+
// only the files the producer selected: adding a file can change a source glob.
|
|
14
|
+
export async function preparedNativeInventory(
|
|
15
|
+
app: string,
|
|
16
|
+
selected: readonly string[],
|
|
17
|
+
signal?: AbortSignal,
|
|
18
|
+
): Promise<{ name: string; sha256: string }[]> {
|
|
19
|
+
const require = createRequire(path.join(app, 'package.json'))
|
|
20
|
+
const linked = await iosAutolinkedDependencies(app, signal)
|
|
21
|
+
signal?.throwIfAborted()
|
|
22
|
+
const roots = new Map(linked.map(({ name, root }) => [name, root]))
|
|
23
|
+
const expo = require.resolve('expo-modules-autolinking/package.json', {
|
|
24
|
+
paths: [path.dirname(require.resolve('expo/package.json'))],
|
|
25
|
+
})
|
|
26
|
+
const cli = path.join(path.dirname(expo), 'bin/expo-modules-autolinking.js')
|
|
27
|
+
const searched = await promisify(execFile)(
|
|
28
|
+
'node',
|
|
29
|
+
[cli, 'search', ...autolinkerAppleFlags(expo, app), '--json'],
|
|
30
|
+
{ cwd: app, signal, maxBuffer: 8 * 1024 * 1024 },
|
|
31
|
+
)
|
|
32
|
+
const search: unknown = JSON.parse(searched.stdout)
|
|
33
|
+
if (!isRecord(search)) throw new Error(`${app}: invalid Expo autolinking search`)
|
|
34
|
+
for (const [name, entry] of Object.entries(search)) {
|
|
35
|
+
if (!isRecord(entry) || typeof entry.path !== 'string')
|
|
36
|
+
throw new Error(`${app}: invalid Expo autolinking entry ${name}`)
|
|
37
|
+
const existing = roots.get(name)
|
|
38
|
+
if (existing && fs.realpathSync(existing) !== fs.realpathSync(entry.path))
|
|
39
|
+
throw new Error(`${app}: inconsistent autolinking paths for ${name}`)
|
|
40
|
+
roots.set(name, entry.path)
|
|
41
|
+
}
|
|
42
|
+
for (const name of selected) {
|
|
43
|
+
if (roots.has(name)) continue
|
|
44
|
+
const manifest = require.resolve(`${name}/package.json`)
|
|
45
|
+
roots.set(name, path.dirname(manifest))
|
|
46
|
+
}
|
|
47
|
+
const result: { name: string; sha256: string }[] = []
|
|
48
|
+
for (const [name, root] of [...roots].sort(([a], [b]) => a.localeCompare(b))) {
|
|
49
|
+
await setImmediate(undefined, { signal })
|
|
50
|
+
const hash = createHash('sha256')
|
|
51
|
+
const canonicalRoot = fs.realpathSync(root)
|
|
52
|
+
const walk = (directory: string, relative: string) => {
|
|
53
|
+
signal?.throwIfAborted()
|
|
54
|
+
for (const entry of fs
|
|
55
|
+
.readdirSync(directory, { withFileTypes: true })
|
|
56
|
+
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
57
|
+
if (
|
|
58
|
+
entry.name === 'node_modules' ||
|
|
59
|
+
entry.name === '.git' ||
|
|
60
|
+
entry.name === '.DS_Store'
|
|
61
|
+
)
|
|
62
|
+
continue
|
|
63
|
+
const file = path.join(directory, entry.name)
|
|
64
|
+
const key = path.posix.join(relative, entry.name)
|
|
65
|
+
hash.update(`${Buffer.byteLength(key)}:${key}\0`)
|
|
66
|
+
if (entry.isSymbolicLink()) {
|
|
67
|
+
const target = fs.readlinkSync(file)
|
|
68
|
+
const destination = fs.realpathSync(file)
|
|
69
|
+
const within = path.relative(canonicalRoot, destination)
|
|
70
|
+
if (
|
|
71
|
+
within === '..' ||
|
|
72
|
+
within.startsWith(`..${path.sep}`) ||
|
|
73
|
+
path.isAbsolute(within) ||
|
|
74
|
+
within
|
|
75
|
+
.split(path.sep)
|
|
76
|
+
.some((part) => part === 'node_modules' || part === '.git')
|
|
77
|
+
)
|
|
78
|
+
throw new Error(`${name}: package link escapes its fingerprint: ${file}`)
|
|
79
|
+
hash.update(`link:${Buffer.byteLength(target)}:${target}\0`)
|
|
80
|
+
} else if (entry.isDirectory()) {
|
|
81
|
+
hash.update('directory\0')
|
|
82
|
+
walk(file, key)
|
|
83
|
+
} else if (entry.isFile()) {
|
|
84
|
+
const bytes = fs.readFileSync(file)
|
|
85
|
+
hash.update(`file:${bytes.length}:`).update(bytes)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
walk(root, '')
|
|
90
|
+
result.push({ name, sha256: hash.digest('hex') })
|
|
91
|
+
}
|
|
92
|
+
return result
|
|
93
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
|
|
5
|
+
export interface PreparedXcodePhase {
|
|
6
|
+
project: string
|
|
7
|
+
target: string
|
|
8
|
+
phase: string
|
|
9
|
+
configuration: string
|
|
10
|
+
outputs: { path: string; sha256: string | null }[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface PreparedSwiftPin {
|
|
14
|
+
identity: string
|
|
15
|
+
location: string
|
|
16
|
+
revision: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const workspaces = new Map<
|
|
20
|
+
string,
|
|
21
|
+
{
|
|
22
|
+
phases: PreparedXcodePhase[]
|
|
23
|
+
interfaces: string
|
|
24
|
+
checkouts: string
|
|
25
|
+
pins: PreparedSwiftPin[]
|
|
26
|
+
}
|
|
27
|
+
>()
|
|
28
|
+
let recording: { root: string; phases: PreparedXcodePhase[] } | undefined
|
|
29
|
+
|
|
30
|
+
function relativeFile(root: string, file: string): string {
|
|
31
|
+
const relative = path.relative(root, file)
|
|
32
|
+
if (
|
|
33
|
+
!relative ||
|
|
34
|
+
relative === '..' ||
|
|
35
|
+
relative.startsWith(`..${path.sep}`) ||
|
|
36
|
+
path.isAbsolute(relative)
|
|
37
|
+
)
|
|
38
|
+
throw new Error(`prepared Xcode output is outside its workspace: ${file}`)
|
|
39
|
+
return relative.split(path.sep).join('/')
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function output(root: string, file: string) {
|
|
43
|
+
const relative = relativeFile(root, file)
|
|
44
|
+
const stat = fs.statSync(file, { throwIfNoEntry: false })
|
|
45
|
+
if (!stat) return { path: relative, sha256: null }
|
|
46
|
+
if (!stat.isFile()) throw new Error(`prepared Xcode output is not a file: ${file}`)
|
|
47
|
+
relativeFile(root, fs.realpathSync(file))
|
|
48
|
+
const bytes = fs.readFileSync(file)
|
|
49
|
+
const prefix = Buffer.from(root)
|
|
50
|
+
const hash = createHash('sha256')
|
|
51
|
+
let offset = 0
|
|
52
|
+
for (
|
|
53
|
+
let index = bytes.indexOf(prefix);
|
|
54
|
+
index !== -1;
|
|
55
|
+
index = bytes.indexOf(prefix, offset)
|
|
56
|
+
) {
|
|
57
|
+
hash.update(bytes.subarray(offset, index)).update('\0workspace\0')
|
|
58
|
+
offset = index + prefix.length
|
|
59
|
+
}
|
|
60
|
+
hash.update(bytes.subarray(offset))
|
|
61
|
+
return {
|
|
62
|
+
path: relative,
|
|
63
|
+
sha256: hash.digest('hex'),
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export async function recordPreparedXcodePhases<T>(root: string, run: () => T) {
|
|
68
|
+
if (recording) throw new Error('already recording prepared Xcode phases')
|
|
69
|
+
const current: { root: string; phases: PreparedXcodePhase[] } = {
|
|
70
|
+
root: fs.realpathSync(root),
|
|
71
|
+
phases: [],
|
|
72
|
+
}
|
|
73
|
+
recording = current
|
|
74
|
+
try {
|
|
75
|
+
const result = await run()
|
|
76
|
+
return { result, phases: current.phases }
|
|
77
|
+
} finally {
|
|
78
|
+
recording = undefined
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function registerPreparedXcodePhases(
|
|
83
|
+
root: string,
|
|
84
|
+
phases: PreparedXcodePhase[],
|
|
85
|
+
interfaces: string,
|
|
86
|
+
checkouts: string,
|
|
87
|
+
pins: PreparedSwiftPin[],
|
|
88
|
+
) {
|
|
89
|
+
workspaces.set(fs.realpathSync(root), { phases, interfaces, checkouts, pins })
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function preparedXcodeInterfaces(project: string): string | undefined {
|
|
93
|
+
for (const [root, workspace] of workspaces) {
|
|
94
|
+
const relative = path.relative(root, project)
|
|
95
|
+
if (
|
|
96
|
+
relative !== '..' &&
|
|
97
|
+
!relative.startsWith(`..${path.sep}`) &&
|
|
98
|
+
!path.isAbsolute(relative)
|
|
99
|
+
)
|
|
100
|
+
return workspace.interfaces
|
|
101
|
+
}
|
|
102
|
+
return undefined
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function preparedSwiftCheckouts(project: string): string | undefined {
|
|
106
|
+
for (const [root, workspace] of workspaces) {
|
|
107
|
+
const relative = path.relative(root, project)
|
|
108
|
+
if (
|
|
109
|
+
relative !== '..' &&
|
|
110
|
+
!relative.startsWith(`..${path.sep}`) &&
|
|
111
|
+
!path.isAbsolute(relative)
|
|
112
|
+
)
|
|
113
|
+
return workspace.checkouts
|
|
114
|
+
}
|
|
115
|
+
return undefined
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function preparedSwiftPin(
|
|
119
|
+
checkouts: string,
|
|
120
|
+
identity: string,
|
|
121
|
+
location: string,
|
|
122
|
+
revision: string,
|
|
123
|
+
): boolean {
|
|
124
|
+
for (const workspace of workspaces.values()) {
|
|
125
|
+
if (workspace.checkouts !== checkouts) continue
|
|
126
|
+
const pin = workspace.pins.find((item) => item.identity === identity)
|
|
127
|
+
if (!pin || pin.location !== location || pin.revision !== revision)
|
|
128
|
+
throw new Error(`prepared Swift package pin mismatch: ${identity}`)
|
|
129
|
+
if (!fs.existsSync(path.join(checkouts, identity, 'Package.swift')))
|
|
130
|
+
throw new Error(`prepared Swift package is missing: ${identity}`)
|
|
131
|
+
return true
|
|
132
|
+
}
|
|
133
|
+
return false
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function preparedXcodePhase(
|
|
137
|
+
project: string,
|
|
138
|
+
target: string,
|
|
139
|
+
phase: string,
|
|
140
|
+
configuration: string,
|
|
141
|
+
outputs: string[],
|
|
142
|
+
recorded: boolean,
|
|
143
|
+
): boolean {
|
|
144
|
+
const root =
|
|
145
|
+
recording?.root ??
|
|
146
|
+
[...workspaces.keys()].find((root) => {
|
|
147
|
+
const relative = path.relative(root, project)
|
|
148
|
+
return (
|
|
149
|
+
relative !== '..' &&
|
|
150
|
+
!relative.startsWith(`..${path.sep}`) &&
|
|
151
|
+
!path.isAbsolute(relative)
|
|
152
|
+
)
|
|
153
|
+
})
|
|
154
|
+
if (!root) return false
|
|
155
|
+
const entry = {
|
|
156
|
+
project: relativeFile(root, project),
|
|
157
|
+
target,
|
|
158
|
+
phase,
|
|
159
|
+
configuration,
|
|
160
|
+
outputs: outputs.map((file) => output(root, file)),
|
|
161
|
+
}
|
|
162
|
+
if (recorded) {
|
|
163
|
+
if (recording) {
|
|
164
|
+
const previous = recording.phases.find(
|
|
165
|
+
(item) =>
|
|
166
|
+
item.project === entry.project &&
|
|
167
|
+
item.target === target &&
|
|
168
|
+
item.phase === phase &&
|
|
169
|
+
item.configuration === configuration,
|
|
170
|
+
)
|
|
171
|
+
if (previous && JSON.stringify(previous.outputs) !== JSON.stringify(entry.outputs))
|
|
172
|
+
throw new Error(
|
|
173
|
+
`Xcode phase produced inconsistent outputs: ${project} ${target} ${phase}`,
|
|
174
|
+
)
|
|
175
|
+
if (!previous) recording.phases.push(entry)
|
|
176
|
+
}
|
|
177
|
+
return false
|
|
178
|
+
}
|
|
179
|
+
if (recording) return false
|
|
180
|
+
const expected = workspaces
|
|
181
|
+
.get(root)
|
|
182
|
+
?.phases.find(
|
|
183
|
+
(item) =>
|
|
184
|
+
item.project === entry.project &&
|
|
185
|
+
item.target === target &&
|
|
186
|
+
item.phase === phase &&
|
|
187
|
+
item.configuration === configuration,
|
|
188
|
+
)
|
|
189
|
+
if (!expected || JSON.stringify(expected.outputs) !== JSON.stringify(entry.outputs))
|
|
190
|
+
throw new Error(
|
|
191
|
+
`prepared Xcode phase does not match its attested outputs: ${project} ${target} ${phase}`,
|
|
192
|
+
)
|
|
193
|
+
return true
|
|
194
|
+
}
|
package/src/process-group.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { tmpdir } from 'node:os'
|
|
|
11
11
|
import { join } from 'node:path'
|
|
12
12
|
import { Duplex } from 'node:stream'
|
|
13
13
|
import { setTimeout as sleep } from 'node:timers/promises'
|
|
14
|
+
import { readProcessTable } from './process-table.ts'
|
|
14
15
|
|
|
15
16
|
const GRACEFUL_TIMEOUT_MS = 3_000
|
|
16
17
|
const FORCED_EXIT_TIMEOUT_MS = 1_000
|
|
@@ -194,23 +195,15 @@ function processesHaveExited(pids: number[], pgid: number): boolean {
|
|
|
194
195
|
}
|
|
195
196
|
})
|
|
196
197
|
if (!mayExist) return true
|
|
197
|
-
const result = spawnSync('ps', ['-A', '-o', 'pid=,pgid=,stat='], {
|
|
198
|
-
encoding: 'utf8',
|
|
199
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
200
|
-
timeout: FORCED_EXIT_TIMEOUT_MS,
|
|
201
|
-
killSignal: 'SIGKILL',
|
|
202
|
-
})
|
|
203
|
-
// an unreadable process table cannot confirm exit.
|
|
204
|
-
if (result.error || result.status !== 0) return false
|
|
205
198
|
const knownPids = new Set(pids)
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
(Number(group) === pgid || knownPids.has(Number(pid))) &&
|
|
210
|
-
state !== undefined &&
|
|
211
|
-
!state.startsWith('Z')
|
|
199
|
+
try {
|
|
200
|
+
return !readProcessTable(FORCED_EXIT_TIMEOUT_MS).some(
|
|
201
|
+
(row) => (row.pgid === pgid || knownPids.has(row.pid)) && !row.zombie,
|
|
212
202
|
)
|
|
213
|
-
}
|
|
203
|
+
} catch {
|
|
204
|
+
// an unreadable process table cannot confirm exit.
|
|
205
|
+
return false
|
|
206
|
+
}
|
|
214
207
|
}
|
|
215
208
|
|
|
216
209
|
export function groupIsEmpty(pgid: number): boolean {
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process'
|
|
2
|
+
import { readFileSync, readdirSync } from 'node:fs'
|
|
3
|
+
import { endianness } from 'node:os'
|
|
4
|
+
|
|
5
|
+
export interface ProcessRow {
|
|
6
|
+
pid: number
|
|
7
|
+
pgid: number
|
|
8
|
+
zombie: boolean
|
|
9
|
+
start: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// auxv reports the kernel's clock tick rate without requiring getconf. the
|
|
13
|
+
// shipped linux runtimes are 64-bit; both supported architectures use elf64.
|
|
14
|
+
function linuxClockTicks(): number {
|
|
15
|
+
const auxv = readFileSync('/proc/self/auxv')
|
|
16
|
+
const word = (offset: number) =>
|
|
17
|
+
endianness() === 'LE' ? auxv.readBigUInt64LE(offset) : auxv.readBigUInt64BE(offset)
|
|
18
|
+
for (let offset = 0; offset + 16 <= auxv.length; offset += 16) {
|
|
19
|
+
if (word(offset) !== 17n) continue // at_clktck
|
|
20
|
+
const ticks = Number(word(offset + 8))
|
|
21
|
+
if (!Number.isSafeInteger(ticks) || ticks <= 0)
|
|
22
|
+
throw new Error('unreadable process clock tick rate')
|
|
23
|
+
return ticks
|
|
24
|
+
}
|
|
25
|
+
throw new Error('missing process clock tick rate')
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let clockTicks: number | undefined
|
|
29
|
+
|
|
30
|
+
// an unreadable table throws. only a process that exited during the scan can
|
|
31
|
+
// disappear, so permissions and malformed rows never look like an empty group.
|
|
32
|
+
// a named pid limits reads to that identity; groups use the full table.
|
|
33
|
+
export function readProcessTable(timeoutMs = 10_000, pid?: number): ProcessRow[] {
|
|
34
|
+
if (process.platform === 'linux') {
|
|
35
|
+
clockTicks ??= linuxClockTicks()
|
|
36
|
+
const boot = /^btime (\d+)$/m.exec(readFileSync('/proc/stat', 'utf8'))
|
|
37
|
+
if (!boot) throw new Error('unreadable process boot time')
|
|
38
|
+
const bootMs = Number(boot[1]) * 1000
|
|
39
|
+
const deadline = Date.now() + timeoutMs
|
|
40
|
+
const rows: ProcessRow[] = []
|
|
41
|
+
const names = pid === undefined ? readdirSync('/proc') : [String(pid)]
|
|
42
|
+
for (const name of names) {
|
|
43
|
+
if (!/^\d+$/.test(name)) continue
|
|
44
|
+
if (Date.now() >= deadline)
|
|
45
|
+
throw new Error('process inspection exceeded its deadline')
|
|
46
|
+
let stat: string
|
|
47
|
+
try {
|
|
48
|
+
stat = readFileSync(`/proc/${name}/stat`, 'utf8')
|
|
49
|
+
} catch (error) {
|
|
50
|
+
if (error instanceof Error && 'code' in error && error.code === 'ENOENT') continue
|
|
51
|
+
throw error
|
|
52
|
+
}
|
|
53
|
+
// comm can contain spaces, newlines and parentheses; fields begin after
|
|
54
|
+
// its final closing parenthesis. state is field 3, pgrp 5, starttime 22.
|
|
55
|
+
const fields = stat
|
|
56
|
+
.slice(stat.lastIndexOf(')') + 2)
|
|
57
|
+
.trim()
|
|
58
|
+
.split(/\s+/)
|
|
59
|
+
const pgid = Number(fields[2])
|
|
60
|
+
const ticks = Number(fields[19])
|
|
61
|
+
if (!fields[0] || !Number.isSafeInteger(pgid) || !Number.isSafeInteger(ticks))
|
|
62
|
+
throw new Error(`unreadable process table row for ${name}`)
|
|
63
|
+
rows.push({
|
|
64
|
+
pid: Number(name),
|
|
65
|
+
pgid,
|
|
66
|
+
zombie: fields[0] === 'Z' || fields[0] === 'X',
|
|
67
|
+
start: bootMs + (ticks * 1000) / clockTicks,
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
return rows
|
|
71
|
+
}
|
|
72
|
+
const result = spawnSync(
|
|
73
|
+
'ps',
|
|
74
|
+
[
|
|
75
|
+
...(pid === undefined ? ['-A'] : ['-p', String(pid)]),
|
|
76
|
+
'-o',
|
|
77
|
+
'pid=,pgid=,stat=,lstart=',
|
|
78
|
+
],
|
|
79
|
+
{
|
|
80
|
+
encoding: 'utf8',
|
|
81
|
+
env: { ...process.env, LC_ALL: 'C', TZ: 'UTC' },
|
|
82
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
83
|
+
timeout: timeoutMs,
|
|
84
|
+
killSignal: 'SIGKILL',
|
|
85
|
+
},
|
|
86
|
+
)
|
|
87
|
+
// ps returns one when the selected process has exited.
|
|
88
|
+
if (
|
|
89
|
+
!result.error &&
|
|
90
|
+
pid !== undefined &&
|
|
91
|
+
result.status === 1 &&
|
|
92
|
+
!result.stdout.trim() &&
|
|
93
|
+
!result.stderr.trim()
|
|
94
|
+
)
|
|
95
|
+
return []
|
|
96
|
+
if (result.error || result.status !== 0)
|
|
97
|
+
throw new Error(
|
|
98
|
+
result.error?.message || result.stderr.trim() || `ps exited ${result.status}`,
|
|
99
|
+
)
|
|
100
|
+
const rows = result.stdout
|
|
101
|
+
.split('\n')
|
|
102
|
+
.filter((line) => line.trim())
|
|
103
|
+
.map((line) => {
|
|
104
|
+
const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(.+?)\s*$/.exec(line)
|
|
105
|
+
if (!match) throw new Error(`unreadable process table row: ${line}`)
|
|
106
|
+
const start = Date.parse(`${match[4]} UTC`)
|
|
107
|
+
if (Number.isNaN(start))
|
|
108
|
+
throw new Error(`unreadable process start time "${match[4]}"`)
|
|
109
|
+
return {
|
|
110
|
+
pid: Number(match[1]),
|
|
111
|
+
pgid: Number(match[2]),
|
|
112
|
+
zombie: match[3]!.startsWith('Z'),
|
|
113
|
+
start,
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
return pid === undefined ? rows : rows.filter((row) => row.pid === pid)
|
|
117
|
+
}
|