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
package/README.md
CHANGED
|
@@ -196,7 +196,7 @@ directory do not establish that association.
|
|
|
196
196
|
`peach open ./App.swift` compiles the selected Swift application entry locally
|
|
197
197
|
and opens it through the Swift guest host. SwiftPM directories (or their
|
|
198
198
|
`Package.swift`), Xcode projects and workspaces use the same project compiler,
|
|
199
|
-
resource discovery and watcher
|
|
199
|
+
resource discovery and watcher. Select an Xcode application
|
|
200
200
|
with `--scheme <name>` or `--target <name>`. Android app module directories
|
|
201
201
|
containing `src/main/AndroidManifest.xml` use the existing Kotlin compiler and
|
|
202
202
|
guest host; `--activity <name>` selects the activity. These native commands stay
|
|
@@ -212,11 +212,10 @@ config dictionary is empty and the app can select its own public defaults.
|
|
|
212
212
|
Preserve failures from those endpoints rather than remapping them to a successful
|
|
213
213
|
local response. The same flag is available on `peach flow`.
|
|
214
214
|
|
|
215
|
-
A project with several Xcode application targets
|
|
216
|
-
|
|
217
|
-
`peach flow` and `peach
|
|
218
|
-
bundle id and display name.
|
|
219
|
-
reads the runtime defaults.
|
|
215
|
+
A project with several Xcode application targets uses the first application
|
|
216
|
+
scheme selected by Expo's iOS runner. `peach open <app-port> --ios-target <name>`
|
|
217
|
+
(also on `peach flow` and `peach test`) selects another target and reads
|
|
218
|
+
its version, build, bundle id and display name.
|
|
220
219
|
|
|
221
220
|
**The daemon is one process** — `SootSimBridgeHost` (`src/host/bridge-host.ts`).
|
|
222
221
|
`peach serve` runs it in the foreground; the background daemon is the *same
|
|
@@ -531,7 +530,7 @@ peach open 8081 # load a running metro/expo dev server
|
|
|
531
530
|
peach open /settings # route via React Native Linking
|
|
532
531
|
peach describe # dump UI tree
|
|
533
532
|
peach get errors 5 # recent runtime failures
|
|
534
|
-
peach
|
|
533
|
+
peach compat # check what of this app Peach runs
|
|
535
534
|
peach support report "…" # preview an opt-in compatibility report
|
|
536
535
|
peach find --testid cta # inspect one node deeply
|
|
537
536
|
peach debug enable animated,layout
|
|
@@ -542,10 +541,10 @@ peach shell window --x 120 --y 140 --scale fit # place/scale desktop sim window
|
|
|
542
541
|
peach debug snapshot before
|
|
543
542
|
peach debug snapshot after
|
|
544
543
|
peach debug diff before after
|
|
545
|
-
peach
|
|
546
|
-
peach
|
|
547
|
-
peach
|
|
548
|
-
peach
|
|
544
|
+
peach test start # begin a Maestro draft
|
|
545
|
+
peach test keep # persist the last action
|
|
546
|
+
peach test end --output .maestro/login.yaml --validate
|
|
547
|
+
peach test e2e/ # run Detox/Jest suites against Peach
|
|
549
548
|
```
|
|
550
549
|
|
|
551
550
|
See the full command reference via `peach --help` or at
|
|
@@ -672,8 +671,8 @@ no code changes — just add one line to your jest config:
|
|
|
672
671
|
Or use the CLI directly:
|
|
673
672
|
|
|
674
673
|
```sh
|
|
675
|
-
peach
|
|
676
|
-
peach
|
|
674
|
+
peach test e2e/ # run e2e/ tests and launch a shell
|
|
675
|
+
peach test init --detox # scaffold a config + sample test
|
|
677
676
|
```
|
|
678
677
|
|
|
679
678
|
`device.launchApp()` reuses a running guest by default. With a URL,
|
|
@@ -704,10 +703,10 @@ Maestro is Peach's single YAML test surface. Point it at your existing
|
|
|
704
703
|
`.maestro/` directory, generate a test, or author one from live actions:
|
|
705
704
|
|
|
706
705
|
```sh
|
|
707
|
-
peach
|
|
708
|
-
peach
|
|
709
|
-
peach
|
|
710
|
-
peach
|
|
706
|
+
peach test # discover .maestro/ workspace
|
|
707
|
+
peach test .maestro/ # explicit
|
|
708
|
+
peach test generate "verify login"
|
|
709
|
+
peach test --list-compat # see the verb support matrix
|
|
711
710
|
```
|
|
712
711
|
|
|
713
712
|
Directory discovery selects root YAML flows by default, as Maestro does.
|
|
@@ -740,9 +739,10 @@ peach screenshot --with-frame --output /tmp/peach-framed.png
|
|
|
740
739
|
peach record --duration 5 --output /tmp/peach-anim.mp4
|
|
741
740
|
```
|
|
742
741
|
|
|
743
|
-
`peach record` captures
|
|
744
|
-
|
|
745
|
-
|
|
742
|
+
`peach record` captures live video. Stateful recordings also capture the app's
|
|
743
|
+
scene when one is on screen, so `peach record stop --scene-only` can save it
|
|
744
|
+
for `peach record render`. Starting with `--scene-only` records only the scene.
|
|
745
|
+
Rendering a saved scene uses an isolated Chromium viewer.
|
|
746
746
|
|
|
747
747
|
`peach record status` queries the recorder on the tracked simulator. A video
|
|
748
748
|
whose stop reply timed out remains available: status reports processing or
|
|
@@ -863,7 +863,7 @@ verifies its sha256, and unpacks it under `~/.peach`:
|
|
|
863
863
|
├── electron/userData/ desktop app storage, with bounded browser caches
|
|
864
864
|
├── daemon.json lockfile: pid, ports, active runtime, heartbeat
|
|
865
865
|
├── cli-update.json cached standalone CLI version and notice state
|
|
866
|
-
├── automatic-cleanup-v1.json
|
|
866
|
+
├── automatic-cleanup-v1.json last complete safe cleanup
|
|
867
867
|
└── config.json user prefs: update channel, cdn origin override
|
|
868
868
|
```
|
|
869
869
|
|
|
@@ -905,13 +905,13 @@ Firebase unconditionally during launch. Completed compile conditional blocks
|
|
|
905
905
|
before that call are allowed. Initialization inside an open conditional block
|
|
906
906
|
or after a possible early return is rejected.
|
|
907
907
|
|
|
908
|
-
The first interactive CLI command after
|
|
909
|
-
requested work, then launches the same safe default plan in a detached
|
|
910
|
-
maintenance process. The app and terminal command are usable before the
|
|
911
|
-
filesystem scan begins. The worker prints the reclaimed size to stderr
|
|
912
|
-
completion,
|
|
913
|
-
served by a live daemon or development bridge are left untouched.
|
|
914
|
-
pass
|
|
908
|
+
The first interactive CLI command after a day without a complete cleanup finishes
|
|
909
|
+
its requested work, then launches the same safe default plan in a detached
|
|
910
|
+
maintenance process. The app and terminal command are usable before the
|
|
911
|
+
filesystem scan begins. The worker prints the reclaimed size to stderr and records
|
|
912
|
+
completion, suppressing another scan for 24 hours. Open browser profiles and a runtime
|
|
913
|
+
served by a live daemon or development bridge are left untouched. A deferred
|
|
914
|
+
pass becomes eligible again after 30 minutes. The explicit `peach cleanup --aggressive`
|
|
915
915
|
command remains the only path that removes the rollback runtime or user-created
|
|
916
916
|
recordings.
|
|
917
917
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// tests, recordings, headless opens and cloud commands need a signed-in Peach
|
|
2
|
+
// account on every machine. a key or login is verified online and the answer is
|
|
3
|
+
// kept, so a run works with no network between refreshes and through an outage
|
|
4
|
+
// on our side; a credential the server rejects stops at once.
|
|
5
|
+
//
|
|
6
|
+
// the gate is the shipped CLI's: a source checkout is our own private tree, and
|
|
7
|
+
// its CI runs from source with no account (specs/peach-onboarding/keys.md).
|
|
8
|
+
|
|
9
|
+
import { createHash } from 'node:crypto'
|
|
10
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
11
|
+
import path from 'node:path'
|
|
12
|
+
import { z } from 'zod'
|
|
13
|
+
import { rnxHomeDir } from '../src/home-paths'
|
|
14
|
+
import { authHeaderValue, resolveCliAuth } from './auth'
|
|
15
|
+
import { billingOriginFor } from './recording-access'
|
|
16
|
+
import { peachExit } from './run-rnx'
|
|
17
|
+
import { writeSecureJsonAtomic } from './secure-file'
|
|
18
|
+
import { IS_STANDALONE } from './standalone'
|
|
19
|
+
|
|
20
|
+
// a check younger than this needs no network.
|
|
21
|
+
const REFRESH_AFTER_MS = 24 * 60 * 60 * 1000
|
|
22
|
+
// past this a check must reach the server again before the command runs.
|
|
23
|
+
const VALID_FOR_MS = 7 * 24 * 60 * 60 * 1000
|
|
24
|
+
const VERIFY_TIMEOUT_MS = 4000
|
|
25
|
+
|
|
26
|
+
const checkSchema = z.object({
|
|
27
|
+
credential: z.string(),
|
|
28
|
+
origin: z.string(),
|
|
29
|
+
verifiedAt: z.number(),
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
type AccountCheck = z.infer<typeof checkSchema>
|
|
33
|
+
|
|
34
|
+
function checkFile(): string {
|
|
35
|
+
return path.join(rnxHomeDir(), 'account-check.json')
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// a missing or unreadable record is no record: the next check rewrites it.
|
|
39
|
+
function readCheck(): AccountCheck | null {
|
|
40
|
+
if (!existsSync(checkFile())) return null
|
|
41
|
+
try {
|
|
42
|
+
return checkSchema.parse(JSON.parse(readFileSync(checkFile(), 'utf8')))
|
|
43
|
+
} catch {
|
|
44
|
+
return null
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function stop(message: string): never {
|
|
49
|
+
process.stderr.write(`\n ${message}\n\n`)
|
|
50
|
+
peachExit(1)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const ACCOUNT_REQUIRED_HINT =
|
|
54
|
+
'sign in with `peach login`, or set PEACH_API_KEY to a free key (`peach auth key create`, or Billing → API Keys on peachsim.com)'
|
|
55
|
+
|
|
56
|
+
export async function requireAccount(commandLabel: string): Promise<void> {
|
|
57
|
+
if (!IS_STANDALONE) return
|
|
58
|
+
const auth = resolveCliAuth()
|
|
59
|
+
if (!auth) stop(`peach ${commandLabel} needs a Peach account: ${ACCOUNT_REQUIRED_HINT}`)
|
|
60
|
+
// a GitHub App repository authenticates with its installation token, which
|
|
61
|
+
// the cloud endpoints verify on use; it needs no stored key.
|
|
62
|
+
if (auth.kind === 'github') return
|
|
63
|
+
const header = authHeaderValue(auth)
|
|
64
|
+
const origin = await billingOriginFor(auth)
|
|
65
|
+
const credential = createHash('sha256').update(`${origin}\n${header}`).digest('hex')
|
|
66
|
+
const check = readCheck()
|
|
67
|
+
const known = check?.credential === credential ? check : null
|
|
68
|
+
const age = known ? Date.now() - known.verifiedAt : Infinity
|
|
69
|
+
if (age < REFRESH_AFTER_MS) return
|
|
70
|
+
|
|
71
|
+
let status: number | null = null
|
|
72
|
+
try {
|
|
73
|
+
const response = await fetch(`${origin}/api/sootsim/billing/subscription`, {
|
|
74
|
+
headers: { authorization: header },
|
|
75
|
+
signal: AbortSignal.timeout(VERIFY_TIMEOUT_MS),
|
|
76
|
+
})
|
|
77
|
+
status = response.status
|
|
78
|
+
} catch {
|
|
79
|
+
// unreachable: a recent check carries the run
|
|
80
|
+
}
|
|
81
|
+
if (status === 200) {
|
|
82
|
+
writeSecureJsonAtomic(checkFile(), {
|
|
83
|
+
credential,
|
|
84
|
+
origin,
|
|
85
|
+
verifiedAt: Date.now(),
|
|
86
|
+
} satisfies AccountCheck)
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
if (status === 401)
|
|
90
|
+
stop(
|
|
91
|
+
`peach ${commandLabel}: ${origin} did not accept this ${auth.kind === 'api-key' ? (auth.source === 'env' ? 'PEACH_API_KEY' : 'saved API key') : 'sign-in'}; ${ACCOUNT_REQUIRED_HINT}`,
|
|
92
|
+
)
|
|
93
|
+
if (age < VALID_FOR_MS) return
|
|
94
|
+
stop(
|
|
95
|
+
`peach ${commandLabel} could not reach ${origin} to verify your account${status ? ` (${status})` : ''}; connect once and run it again`,
|
|
96
|
+
)
|
|
97
|
+
}
|
package/cli/app-catalog.ts
CHANGED
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
enumerateBundleImages,
|
|
6
6
|
enumerateBundleSymbols,
|
|
7
7
|
} from '../../sootsim-swift/src/bundleAssets'
|
|
8
|
+
import {
|
|
9
|
+
ONE_NATIVE_APP_ACCENT_ROUTE,
|
|
10
|
+
parseOneNativeAppAccent,
|
|
11
|
+
} from '../src/one-native-app-accent'
|
|
8
12
|
import type { AppCatalog } from '#peach-cli-contract/engine/app-catalog-wire'
|
|
9
13
|
|
|
10
14
|
// the xcode build setting actool turns into the built Info.plist's
|
|
@@ -126,3 +130,23 @@ export function discoverAppCatalog(
|
|
|
126
130
|
accentName,
|
|
127
131
|
)
|
|
128
132
|
}
|
|
133
|
+
|
|
134
|
+
// a One app with no ios/ on disk: its dev server reports the accent its
|
|
135
|
+
// native.app declares, which `one prebuild` would write as AccentColor.
|
|
136
|
+
export async function discoverOneNativeAppCatalog(
|
|
137
|
+
metroOrigin: string,
|
|
138
|
+
): Promise<AppCatalog | null> {
|
|
139
|
+
const response = await fetch(`${metroOrigin}${ONE_NATIVE_APP_ACCENT_ROUTE}`, {
|
|
140
|
+
signal: AbortSignal.timeout(1500),
|
|
141
|
+
}).catch(() => null)
|
|
142
|
+
if (!response?.ok) return null
|
|
143
|
+
const accent = parseOneNativeAppAccent(await response.json())
|
|
144
|
+
return accent
|
|
145
|
+
? {
|
|
146
|
+
colors: { AccentColor: accent },
|
|
147
|
+
images: {},
|
|
148
|
+
symbols: {},
|
|
149
|
+
accentName: 'AccentColor',
|
|
150
|
+
}
|
|
151
|
+
: null
|
|
152
|
+
}
|
package/cli/app-stubs.ts
CHANGED
|
@@ -773,6 +773,13 @@ export function scanLocalNative(
|
|
|
773
773
|
if (known) {
|
|
774
774
|
// a native definition declares a name; only a javascript lookup says whether it is optional
|
|
775
775
|
if (!declaration) known.optional &&= optional
|
|
776
|
+
else {
|
|
777
|
+
const moduleDir = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`))
|
|
778
|
+
if (moduleDir && (file.endsWith('.swift') || !known.expoModule)) {
|
|
779
|
+
known.expoModule = relative(appDir, moduleDir) || '.'
|
|
780
|
+
known.swift = file.endsWith('.swift')
|
|
781
|
+
}
|
|
782
|
+
}
|
|
776
783
|
return
|
|
777
784
|
}
|
|
778
785
|
providers ??= dependencyNativeOwners(appDir, pkg)
|
package/cli/auth.ts
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
// peach cli auth resolution for cloud-hitting commands.
|
|
2
2
|
//
|
|
3
3
|
// priority order (first match wins):
|
|
4
|
-
// 1. PEACH_API_KEY — ci path
|
|
4
|
+
// 1. PEACH_API_KEY — ci path, then the key `peach setup` saved
|
|
5
5
|
// 2. CONTRAST_INSTALLATION_TOKEN/GITHUB_TOKEN + repo env — github action
|
|
6
6
|
// preview uploads from the Contrast runner, no extra secret
|
|
7
7
|
// 3. desktop session token from shared desktop auth (`peach login`)
|
|
8
8
|
//
|
|
9
9
|
// callers wanting an auth header: `authHeaderOrExit('upload')`.
|
|
10
10
|
|
|
11
|
+
import { existsSync, readFileSync, rmSync } from 'node:fs'
|
|
12
|
+
import path from 'node:path'
|
|
13
|
+
import { z } from 'zod'
|
|
11
14
|
import {
|
|
12
15
|
readSharedDesktopAuthSession,
|
|
13
16
|
sharedDesktopAuthAccounts,
|
|
14
17
|
} from '../src/auth/shared-session.ts'
|
|
18
|
+
import { rnxHomeDir } from '../src/home-paths'
|
|
15
19
|
import { rnxExit } from './run-rnx.ts'
|
|
16
|
-
|
|
17
|
-
export type CliApiKeyEnvName = 'PEACH_API_KEY'
|
|
20
|
+
import { writeSecureJsonAtomic } from './secure-file'
|
|
18
21
|
|
|
19
22
|
export type CliAuth =
|
|
20
|
-
| { kind: 'api-key'; secret: string; source: 'env'
|
|
23
|
+
| { kind: 'api-key'; secret: string; source: 'env' | 'saved' }
|
|
21
24
|
| {
|
|
22
25
|
kind: 'github'
|
|
23
26
|
token: string
|
|
@@ -103,26 +106,53 @@ function resolveGitHubActionsAuth(): CliAuth | null {
|
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
|
|
106
|
-
function isCliApiKeySecret(secret: string): boolean {
|
|
109
|
+
export function isCliApiKeySecret(secret: string): boolean {
|
|
107
110
|
return secret.startsWith('sk_rnx_')
|
|
108
111
|
}
|
|
109
112
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
// the name the welcome dialog downloads a new key as; `peach setup` looks for
|
|
114
|
+
// it in Downloads
|
|
115
|
+
export const DOWNLOADED_API_KEY_FILE = 'peach-api-key.txt'
|
|
116
|
+
|
|
117
|
+
const savedKeySchema = z.object({ secret: z.string() })
|
|
118
|
+
|
|
119
|
+
function savedApiKeyFile(): string {
|
|
120
|
+
return path.join(rnxHomeDir(), 'api-key.json')
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// the key in a text file, as the welcome dialog downloads it
|
|
124
|
+
export function readApiKeyFile(file: string): string | null {
|
|
125
|
+
if (!existsSync(file)) return null
|
|
126
|
+
const secret = readFileSync(file, 'utf8').trim()
|
|
127
|
+
return isCliApiKeySecret(secret) ? secret : null
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// `peach setup` saves a key so later shells need no export
|
|
131
|
+
export function saveApiKey(secret: string): void {
|
|
132
|
+
writeSecureJsonAtomic(savedApiKeyFile(), { secret })
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// `peach logout` drops it with the session; true when there was one
|
|
136
|
+
export function forgetApiKey(): boolean {
|
|
137
|
+
if (!existsSync(savedApiKeyFile())) return false
|
|
138
|
+
rmSync(savedApiKeyFile())
|
|
139
|
+
return true
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function readSavedApiKey(): string | null {
|
|
143
|
+
if (!existsSync(savedApiKeyFile())) return null
|
|
144
|
+
const saved = savedKeySchema.safeParse(
|
|
145
|
+
JSON.parse(readFileSync(savedApiKeyFile(), 'utf8')),
|
|
146
|
+
)
|
|
147
|
+
return saved.success && isCliApiKeySecret(saved.data.secret) ? saved.data.secret : null
|
|
114
148
|
}
|
|
115
149
|
|
|
116
150
|
export function resolveCliAuth(): CliAuth | null {
|
|
117
|
-
const envKey =
|
|
118
|
-
if (envKey)
|
|
119
|
-
return {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
source: 'env',
|
|
123
|
-
envName: envKey.envName,
|
|
124
|
-
}
|
|
125
|
-
}
|
|
151
|
+
const envKey = process.env.PEACH_API_KEY?.trim()
|
|
152
|
+
if (envKey && isCliApiKeySecret(envKey))
|
|
153
|
+
return { kind: 'api-key', secret: envKey, source: 'env' }
|
|
154
|
+
const savedKey = readSavedApiKey()
|
|
155
|
+
if (savedKey) return { kind: 'api-key', secret: savedKey, source: 'saved' }
|
|
126
156
|
const githubAuth = resolveGitHubActionsAuth()
|
|
127
157
|
if (githubAuth) return githubAuth
|
|
128
158
|
const session = readSharedDesktopAuthSession()
|
package/cli/bin.ts
CHANGED
|
@@ -10,8 +10,41 @@
|
|
|
10
10
|
// whole process, so the CLI itself lives in `./main` and is imported only once
|
|
11
11
|
// none of them has claimed the run.
|
|
12
12
|
|
|
13
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
14
|
+
import { homedir } from 'node:os'
|
|
15
|
+
import { basename, dirname, join } from 'node:path'
|
|
16
|
+
import { PEACH_FORKED_SCRIPT_ENV } from '../src/forked-script-contract'
|
|
17
|
+
import { isRecord } from '../src/is-record'
|
|
13
18
|
import { exitWithFlushedOutput } from '../src/process-output'
|
|
14
|
-
import {
|
|
19
|
+
import { RNX_INTERNAL_COMMAND } from './internal-child'
|
|
20
|
+
|
|
21
|
+
// the CLI inside a packaged app (Contents/Resources/bin/peach) runs in that
|
|
22
|
+
// app's home with its manifest, as the app's launcher runs its own serve, so
|
|
23
|
+
// the runtime the app ships serves every command; an explicit PEACH_HOME wins
|
|
24
|
+
const appResources = dirname(dirname(process.execPath))
|
|
25
|
+
const appManifest = join(appResources, 'peach-app.json')
|
|
26
|
+
if (
|
|
27
|
+
!process.env.PEACH_HOME &&
|
|
28
|
+
basename(dirname(process.execPath)) === 'bin' &&
|
|
29
|
+
existsSync(appManifest)
|
|
30
|
+
) {
|
|
31
|
+
const manifest: unknown = JSON.parse(readFileSync(appManifest, 'utf8'))
|
|
32
|
+
if (
|
|
33
|
+
!isRecord(manifest) ||
|
|
34
|
+
typeof manifest.identifier !== 'string' ||
|
|
35
|
+
!manifest.identifier
|
|
36
|
+
)
|
|
37
|
+
throw new Error(`invalid packaged app manifest ${appManifest}`)
|
|
38
|
+
process.env.PEACH_HOME = join(
|
|
39
|
+
homedir(),
|
|
40
|
+
'Library',
|
|
41
|
+
'Application Support',
|
|
42
|
+
manifest.identifier,
|
|
43
|
+
)
|
|
44
|
+
process.env.PEACH_APP_MANIFEST = appManifest
|
|
45
|
+
process.env.PEACH_UPDATE_CHECK = '0'
|
|
46
|
+
process.env.SOOTSIM_DEV = '0'
|
|
47
|
+
}
|
|
15
48
|
|
|
16
49
|
// a consumer such as head may close its pipe before the command finishes.
|
|
17
50
|
// exit directly: reporting this through stderr can fail on the same pipe.
|
|
@@ -63,7 +96,7 @@ if (process.argv[2] === '__cloud-confirm') {
|
|
|
63
96
|
// that must skip it.
|
|
64
97
|
const forkedScript = process.argv[2]
|
|
65
98
|
if (
|
|
66
|
-
process.env[
|
|
99
|
+
process.env[PEACH_FORKED_SCRIPT_ENV] === '1' &&
|
|
67
100
|
forkedScript &&
|
|
68
101
|
/\.(?:c|m)?js$/.test(forkedScript)
|
|
69
102
|
) {
|
|
@@ -704,8 +704,7 @@ export interface MaestroStep {
|
|
|
704
704
|
}
|
|
705
705
|
repeat?: {
|
|
706
706
|
times?: number | string
|
|
707
|
-
|
|
708
|
-
condition?: NonNullable<MaestroStep['when']>
|
|
707
|
+
while?: NonNullable<MaestroStep['when']>
|
|
709
708
|
commands: MaestroStep[]
|
|
710
709
|
}
|
|
711
710
|
// maestro retry: run the body, and on a failed step rerun the whole body.
|
|
@@ -736,6 +735,22 @@ export interface MaestroStep {
|
|
|
736
735
|
assertTreeContains?: string
|
|
737
736
|
// maestro parity verbs
|
|
738
737
|
stopApp?: boolean | string | { appId?: string }
|
|
738
|
+
// maestro killApp: on ios the same teardown as stopApp
|
|
739
|
+
killApp?: boolean | string | { appId?: string }
|
|
740
|
+
// maestro setLocation: coordinates may arrive as strings
|
|
741
|
+
setLocation?: { latitude: number | string; longitude: number | string }
|
|
742
|
+
// maestro travel: "lat,lon" points, speed in meters per second
|
|
743
|
+
travel?: { points: string[]; speed?: number | string }
|
|
744
|
+
// maestro reports airplane mode unavailable on ios simulators and moves on
|
|
745
|
+
setAirplaneMode?: string | { value?: string }
|
|
746
|
+
toggleAirplaneMode?: boolean
|
|
747
|
+
inputRandomText?: boolean | { length?: number | string }
|
|
748
|
+
inputRandomNumber?: boolean | { length?: number | string }
|
|
749
|
+
inputRandomEmail?: boolean
|
|
750
|
+
inputRandomPersonName?: boolean
|
|
751
|
+
inputRandomCityName?: boolean
|
|
752
|
+
inputRandomCountryName?: boolean
|
|
753
|
+
inputRandomColorName?: boolean
|
|
739
754
|
clearState?: boolean | { appId?: string }
|
|
740
755
|
clearKeychain?: boolean
|
|
741
756
|
copyTextFrom?: string | FlowTargetSelector
|
|
@@ -935,6 +950,68 @@ function parsePoint(
|
|
|
935
950
|
}
|
|
936
951
|
}
|
|
937
952
|
|
|
953
|
+
const RANDOM_INPUT_KEYS = [
|
|
954
|
+
'inputRandomText',
|
|
955
|
+
'inputRandomNumber',
|
|
956
|
+
'inputRandomEmail',
|
|
957
|
+
'inputRandomPersonName',
|
|
958
|
+
'inputRandomCityName',
|
|
959
|
+
'inputRandomCountryName',
|
|
960
|
+
'inputRandomColorName',
|
|
961
|
+
] as const
|
|
962
|
+
|
|
963
|
+
function randomInputKind(step: MaestroStep): (typeof RANDOM_INPUT_KEYS)[number] | null {
|
|
964
|
+
return RANDOM_INPUT_KEYS.find((key) => step[key] !== undefined) ?? null
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
const pick = (values: readonly string[]) =>
|
|
968
|
+
values[Math.floor(Math.random() * values.length)] ?? ''
|
|
969
|
+
|
|
970
|
+
// maestro InputRandomCommand.genRandomString over datafaker: text is
|
|
971
|
+
// `length` lowercase letters, a number has exactly `length` digits (both
|
|
972
|
+
// default to 8), and the named kinds draw from datafaker's word lists, of
|
|
973
|
+
// which these are a sample.
|
|
974
|
+
function randomInputText(step: MaestroStep): string {
|
|
975
|
+
const options = step.inputRandomText ?? step.inputRandomNumber
|
|
976
|
+
const requested =
|
|
977
|
+
typeof options === 'object' && options !== null ? Number(options.length) : NaN
|
|
978
|
+
const length = Number.isInteger(requested) && requested > 0 ? requested : 8
|
|
979
|
+
const firstNames = ['Ada', 'Grace', 'Alan', 'Linus', 'Maya', 'Omar', 'Priya', 'Kenji']
|
|
980
|
+
const lastNames = [
|
|
981
|
+
'Lovelace',
|
|
982
|
+
'Hopper',
|
|
983
|
+
'Turing',
|
|
984
|
+
'Okafor',
|
|
985
|
+
'Silva',
|
|
986
|
+
'Nguyen',
|
|
987
|
+
'Larsen',
|
|
988
|
+
]
|
|
989
|
+
switch (randomInputKind(step)) {
|
|
990
|
+
case 'inputRandomText':
|
|
991
|
+
return Array.from({ length }, () =>
|
|
992
|
+
String.fromCharCode(97 + Math.floor(Math.random() * 26)),
|
|
993
|
+
).join('')
|
|
994
|
+
case 'inputRandomNumber':
|
|
995
|
+
return Array.from({ length }, (_, i) =>
|
|
996
|
+
String(
|
|
997
|
+
i === 0 ? 1 + Math.floor(Math.random() * 9) : Math.floor(Math.random() * 10),
|
|
998
|
+
),
|
|
999
|
+
).join('')
|
|
1000
|
+
case 'inputRandomEmail':
|
|
1001
|
+
return `${pick(firstNames).toLowerCase()}.${pick(lastNames).toLowerCase()}@example.com`
|
|
1002
|
+
case 'inputRandomPersonName':
|
|
1003
|
+
return `${pick(firstNames)} ${pick(lastNames)}`
|
|
1004
|
+
case 'inputRandomCityName':
|
|
1005
|
+
return pick(['Lisbon', 'Osaka', 'Nairobi', 'Denver', 'Bergen', 'Quito'])
|
|
1006
|
+
case 'inputRandomCountryName':
|
|
1007
|
+
return pick(['Portugal', 'Japan', 'Kenya', 'Canada', 'Norway', 'Ecuador'])
|
|
1008
|
+
case 'inputRandomColorName':
|
|
1009
|
+
return pick(['red', 'teal', 'violet', 'orange', 'olive', 'navy'])
|
|
1010
|
+
default:
|
|
1011
|
+
throw new Error('not a random input step')
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
938
1015
|
// maestro accepts several commands as a bare YAML string (`- back`,
|
|
939
1016
|
// `- waitForAnimationToEnd`, `- scrollUp`, …). map the string to the
|
|
940
1017
|
// `{ verb: … }` object the dispatcher understands. directional `scroll*`
|
|
@@ -949,6 +1026,10 @@ function normalizeBareStringStep(verb: string): MaestroStep {
|
|
|
949
1026
|
return { waitForAnimationToEnd: true }
|
|
950
1027
|
case 'stopApp':
|
|
951
1028
|
return { stopApp: true }
|
|
1029
|
+
case 'killApp':
|
|
1030
|
+
return { killApp: true }
|
|
1031
|
+
case 'toggleAirplaneMode':
|
|
1032
|
+
return { toggleAirplaneMode: true }
|
|
952
1033
|
case 'clearState':
|
|
953
1034
|
return { clearState: true }
|
|
954
1035
|
case 'clearKeychain':
|
|
@@ -1025,7 +1106,7 @@ export class SootSimBridgeFlowRunner {
|
|
|
1025
1106
|
screenshotPathMode?: FlowScreenshotPathMode
|
|
1026
1107
|
// flow-wide default for screenshot layers — applied to every
|
|
1027
1108
|
// takeScreenshot step unless that step has its own `layers:`. set by
|
|
1028
|
-
// `peach
|
|
1109
|
+
// `peach test --no-shell` to produce clean tenant-only captures
|
|
1029
1110
|
// (useful when a stuck shell overlay would otherwise pollute the
|
|
1030
1111
|
// demo asset set).
|
|
1031
1112
|
screenshotLayers?: 'full' | 'tenant' | 'shell'
|
|
@@ -3169,6 +3250,71 @@ export class SootSimBridgeFlowRunner {
|
|
|
3169
3250
|
this.appStopped = true
|
|
3170
3251
|
}
|
|
3171
3252
|
|
|
3253
|
+
// maestro setLocation: the device location every app reads, as
|
|
3254
|
+
// `peach location set` sets it.
|
|
3255
|
+
async setLocation(latitude: number, longitude: number) {
|
|
3256
|
+
if (!Number.isFinite(latitude) || !Number.isFinite(longitude)) {
|
|
3257
|
+
throw new Error(`setLocation needs numeric latitude and longitude`)
|
|
3258
|
+
}
|
|
3259
|
+
const result: unknown = await this.bridge.send({
|
|
3260
|
+
type: 'location',
|
|
3261
|
+
simId: this.opts.simId,
|
|
3262
|
+
location: { action: 'set', latitude, longitude },
|
|
3263
|
+
})
|
|
3264
|
+
if (isObjectRecord(result) && result.ok === false) {
|
|
3265
|
+
throw new Error(`setLocation failed: ${String(result.error ?? 'unknown error')}`)
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
// maestro travel (Traveller.kt): set the first point, then cross each leg
|
|
3270
|
+
// in 50 straight lat/lon steps spread over the leg's distance / speed.
|
|
3271
|
+
// the distance is maestro's own, which converts its deltas to radians
|
|
3272
|
+
// twice, so legs take as long as they do on maestro.
|
|
3273
|
+
async travel(points: string[], speed: number) {
|
|
3274
|
+
if (!Number.isFinite(speed) || speed <= 0) {
|
|
3275
|
+
throw new Error(`travel speed must be a positive number of meters per second`)
|
|
3276
|
+
}
|
|
3277
|
+
const coords = points.map((point) => {
|
|
3278
|
+
const parts = point.split(',')
|
|
3279
|
+
const latitude = Number(parts[0])
|
|
3280
|
+
const longitude = Number(parts[1])
|
|
3281
|
+
if (
|
|
3282
|
+
parts.length !== 2 ||
|
|
3283
|
+
!Number.isFinite(latitude) ||
|
|
3284
|
+
!Number.isFinite(longitude)
|
|
3285
|
+
) {
|
|
3286
|
+
throw new Error(`invalid travel point: ${point}`)
|
|
3287
|
+
}
|
|
3288
|
+
return { latitude, longitude }
|
|
3289
|
+
})
|
|
3290
|
+
if (coords.length === 0) return
|
|
3291
|
+
await this.setLocation(coords[0].latitude, coords[0].longitude)
|
|
3292
|
+
for (let i = 1; i < coords.length; i++) {
|
|
3293
|
+
const from = coords[i - 1]
|
|
3294
|
+
const to = coords[i]
|
|
3295
|
+
const oLat = (from.latitude * Math.PI) / 180
|
|
3296
|
+
const oLon = (from.longitude * Math.PI) / 180
|
|
3297
|
+
const aLat = (to.latitude * Math.PI) / 180
|
|
3298
|
+
const aLon = (to.longitude * Math.PI) / 180
|
|
3299
|
+
const toRadians = (degrees: number) => (degrees * Math.PI) / 180
|
|
3300
|
+
const dLat = toRadians(aLat - oLat)
|
|
3301
|
+
const dLon = toRadians(aLon - oLon)
|
|
3302
|
+
const a =
|
|
3303
|
+
Math.sin(dLat / 2) ** 2 +
|
|
3304
|
+
Math.cos(toRadians(oLat)) * Math.cos(toRadians(aLat)) * Math.sin(dLon / 2) ** 2
|
|
3305
|
+
const distance = 6_371_000 * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
|
|
3306
|
+
const steps = 50
|
|
3307
|
+
const sleepMs = Math.trunc(Math.trunc((distance / speed) * 1000) / steps)
|
|
3308
|
+
for (let step = 1; step <= steps; step++) {
|
|
3309
|
+
await this.setLocation(
|
|
3310
|
+
from.latitude + ((to.latitude - from.latitude) / steps) * step,
|
|
3311
|
+
from.longitude + ((to.longitude - from.longitude) / steps) * step,
|
|
3312
|
+
)
|
|
3313
|
+
await sleep(sleepMs)
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3172
3318
|
// maestro clearState: wipe app-owned storage and relaunch fresh.
|
|
3173
3319
|
async clearState() {
|
|
3174
3320
|
await this.resetGuestAppData()
|
|
@@ -3471,6 +3617,8 @@ export class SootSimBridgeFlowRunner {
|
|
|
3471
3617
|
// past 10s, and continues as maestro does on a screen still moving.
|
|
3472
3618
|
step.waitForAnimationToEnd ||
|
|
3473
3619
|
step.advanceAnimationClock ||
|
|
3620
|
+
// travel lasts as long as its legs take at the flow's speed
|
|
3621
|
+
step.travel ||
|
|
3474
3622
|
// assertions wait out maestro's lookup window, longer than 10s, and
|
|
3475
3623
|
// every query they make times out on its own, so they report their
|
|
3476
3624
|
// own failure instead of the watchdog's guess.
|
|
@@ -3672,7 +3820,7 @@ export class SootSimBridgeFlowRunner {
|
|
|
3672
3820
|
} else if (step.repeat && Array.isArray(step.repeat.commands)) {
|
|
3673
3821
|
// align with upstream Orchestra.repeatCommand: `times` is OPTIONAL (when
|
|
3674
3822
|
// absent → Int.MAX_VALUE, i.e. bounded only by the condition), and a
|
|
3675
|
-
// `
|
|
3823
|
+
// `while` predicate runs the body `while (cond && i < maxRuns)`.
|
|
3676
3824
|
// `times` may arrive as a `${...}`-interpolated string. the `commands`
|
|
3677
3825
|
// guard distinguishes this command-repeat from `tapOn: { repeat: N }`,
|
|
3678
3826
|
// which is a tap-count and is handled inside tapOn, not here.
|
|
@@ -3684,7 +3832,7 @@ export class SootSimBridgeFlowRunner {
|
|
|
3684
3832
|
if (!Number.isFinite(maxRuns)) {
|
|
3685
3833
|
throw new Error(`repeat.times is not a number: ${rawTimes}`)
|
|
3686
3834
|
}
|
|
3687
|
-
const condition = step.repeat.
|
|
3835
|
+
const condition = step.repeat.while
|
|
3688
3836
|
const checkCondition = async (): Promise<boolean> => {
|
|
3689
3837
|
if (!condition) return true
|
|
3690
3838
|
return this.evaluateWhen(condition)
|
|
@@ -3701,8 +3849,28 @@ export class SootSimBridgeFlowRunner {
|
|
|
3701
3849
|
}
|
|
3702
3850
|
i++
|
|
3703
3851
|
}
|
|
3704
|
-
} else if (step.stopApp !== undefined) {
|
|
3852
|
+
} else if (step.stopApp !== undefined || step.killApp !== undefined) {
|
|
3705
3853
|
await this.stopApp()
|
|
3854
|
+
} else if (step.setLocation) {
|
|
3855
|
+
await this.setLocation(
|
|
3856
|
+
Number(step.setLocation.latitude),
|
|
3857
|
+
Number(step.setLocation.longitude),
|
|
3858
|
+
)
|
|
3859
|
+
} else if (step.travel) {
|
|
3860
|
+
await this.travel(step.travel.points, Number(step.travel.speed ?? 4))
|
|
3861
|
+
} else if (step.setAirplaneMode !== undefined || step.toggleAirplaneMode) {
|
|
3862
|
+
const value =
|
|
3863
|
+
typeof step.setAirplaneMode === 'object'
|
|
3864
|
+
? step.setAirplaneMode.value
|
|
3865
|
+
: step.setAirplaneMode
|
|
3866
|
+
if (value !== undefined && value !== 'enabled' && value !== 'disabled') {
|
|
3867
|
+
throw new Error(
|
|
3868
|
+
`setAirplaneMode expects enabled or disabled, got ${String(value)}`,
|
|
3869
|
+
)
|
|
3870
|
+
}
|
|
3871
|
+
console.log('[flow] airplane mode is not available on iOS simulators')
|
|
3872
|
+
} else if (randomInputKind(step)) {
|
|
3873
|
+
await this.inputText(randomInputText(step))
|
|
3706
3874
|
} else if (step.retry && Array.isArray(step.retry.commands)) {
|
|
3707
3875
|
// maestro retryCommand: rerun the whole body when any step in it fails,
|
|
3708
3876
|
// up to maxRetries times after the first attempt. the body is replayed
|