@limrun/appium-xcuitest-driver 10.4.3-lim.1
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/CHANGELOG.md +2600 -0
- package/LICENSE +201 -0
- package/README.md +55 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +41 -0
- package/build/lib/app-infos-cache.d.ts +62 -0
- package/build/lib/app-infos-cache.d.ts.map +1 -0
- package/build/lib/app-infos-cache.js +180 -0
- package/build/lib/app-infos-cache.js.map +1 -0
- package/build/lib/app-utils.d.ts +89 -0
- package/build/lib/app-utils.d.ts.map +1 -0
- package/build/lib/app-utils.js +657 -0
- package/build/lib/app-utils.js.map +1 -0
- package/build/lib/commands/active-app-info.d.ts +9 -0
- package/build/lib/commands/active-app-info.d.ts.map +1 -0
- package/build/lib/commands/active-app-info.js +14 -0
- package/build/lib/commands/active-app-info.js.map +1 -0
- package/build/lib/commands/advanced-battery-types.d.ts +444 -0
- package/build/lib/commands/advanced-battery-types.d.ts.map +1 -0
- package/build/lib/commands/advanced-battery-types.js +8 -0
- package/build/lib/commands/advanced-battery-types.js.map +1 -0
- package/build/lib/commands/alert.d.ts +45 -0
- package/build/lib/commands/alert.d.ts.map +1 -0
- package/build/lib/commands/alert.js +87 -0
- package/build/lib/commands/alert.js.map +1 -0
- package/build/lib/commands/app-management.d.ts +153 -0
- package/build/lib/commands/app-management.d.ts.map +1 -0
- package/build/lib/commands/app-management.js +323 -0
- package/build/lib/commands/app-management.js.map +1 -0
- package/build/lib/commands/app-strings.d.ts +16 -0
- package/build/lib/commands/app-strings.d.ts.map +1 -0
- package/build/lib/commands/app-strings.js +30 -0
- package/build/lib/commands/app-strings.js.map +1 -0
- package/build/lib/commands/appearance.d.ts +22 -0
- package/build/lib/commands/appearance.d.ts.map +1 -0
- package/build/lib/commands/appearance.js +74 -0
- package/build/lib/commands/appearance.js.map +1 -0
- package/build/lib/commands/audit.d.ts +43 -0
- package/build/lib/commands/audit.d.ts.map +1 -0
- package/build/lib/commands/audit.js +31 -0
- package/build/lib/commands/audit.js.map +1 -0
- package/build/lib/commands/battery.d.ts +13 -0
- package/build/lib/commands/battery.d.ts.map +1 -0
- package/build/lib/commands/battery.js +49 -0
- package/build/lib/commands/battery.js.map +1 -0
- package/build/lib/commands/bidi/constants.d.ts +6 -0
- package/build/lib/commands/bidi/constants.d.ts.map +1 -0
- package/build/lib/commands/bidi/constants.js +10 -0
- package/build/lib/commands/bidi/constants.js.map +1 -0
- package/build/lib/commands/bidi/models.d.ts +9 -0
- package/build/lib/commands/bidi/models.d.ts.map +1 -0
- package/build/lib/commands/bidi/models.js +54 -0
- package/build/lib/commands/bidi/models.js.map +1 -0
- package/build/lib/commands/bidi/types.d.ts +26 -0
- package/build/lib/commands/bidi/types.d.ts.map +1 -0
- package/build/lib/commands/bidi/types.js +4 -0
- package/build/lib/commands/bidi/types.js.map +1 -0
- package/build/lib/commands/biometric.d.ts +32 -0
- package/build/lib/commands/biometric.d.ts.map +1 -0
- package/build/lib/commands/biometric.js +54 -0
- package/build/lib/commands/biometric.js.map +1 -0
- package/build/lib/commands/certificate.d.ts +50 -0
- package/build/lib/commands/certificate.d.ts.map +1 -0
- package/build/lib/commands/certificate.js +454 -0
- package/build/lib/commands/certificate.js.map +1 -0
- package/build/lib/commands/clipboard.d.ts +21 -0
- package/build/lib/commands/clipboard.d.ts.map +1 -0
- package/build/lib/commands/clipboard.js +36 -0
- package/build/lib/commands/clipboard.js.map +1 -0
- package/build/lib/commands/condition.d.ts +102 -0
- package/build/lib/commands/condition.d.ts.map +1 -0
- package/build/lib/commands/condition.js +146 -0
- package/build/lib/commands/condition.js.map +1 -0
- package/build/lib/commands/content-size.d.ts +30 -0
- package/build/lib/commands/content-size.d.ts.map +1 -0
- package/build/lib/commands/content-size.js +67 -0
- package/build/lib/commands/content-size.js.map +1 -0
- package/build/lib/commands/context.d.ts +191 -0
- package/build/lib/commands/context.d.ts.map +1 -0
- package/build/lib/commands/context.js +625 -0
- package/build/lib/commands/context.js.map +1 -0
- package/build/lib/commands/deviceInfo.d.ts +12 -0
- package/build/lib/commands/deviceInfo.d.ts.map +1 -0
- package/build/lib/commands/deviceInfo.js +25 -0
- package/build/lib/commands/deviceInfo.js.map +1 -0
- package/build/lib/commands/element.d.ts +108 -0
- package/build/lib/commands/element.d.ts.map +1 -0
- package/build/lib/commands/element.js +395 -0
- package/build/lib/commands/element.js.map +1 -0
- package/build/lib/commands/enum.d.ts +105 -0
- package/build/lib/commands/enum.d.ts.map +1 -0
- package/build/lib/commands/enum.js +113 -0
- package/build/lib/commands/enum.js.map +1 -0
- package/build/lib/commands/execute.d.ts +33 -0
- package/build/lib/commands/execute.d.ts.map +1 -0
- package/build/lib/commands/execute.js +142 -0
- package/build/lib/commands/execute.js.map +1 -0
- package/build/lib/commands/file-movement.d.ts +90 -0
- package/build/lib/commands/file-movement.d.ts.map +1 -0
- package/build/lib/commands/file-movement.js +477 -0
- package/build/lib/commands/file-movement.js.map +1 -0
- package/build/lib/commands/find.d.ts +21 -0
- package/build/lib/commands/find.d.ts.map +1 -0
- package/build/lib/commands/find.js +199 -0
- package/build/lib/commands/find.js.map +1 -0
- package/build/lib/commands/general.d.ts +137 -0
- package/build/lib/commands/general.d.ts.map +1 -0
- package/build/lib/commands/general.js +270 -0
- package/build/lib/commands/general.js.map +1 -0
- package/build/lib/commands/geolocation.d.ts +57 -0
- package/build/lib/commands/geolocation.d.ts.map +1 -0
- package/build/lib/commands/geolocation.js +58 -0
- package/build/lib/commands/geolocation.js.map +1 -0
- package/build/lib/commands/gesture.d.ts +283 -0
- package/build/lib/commands/gesture.d.ts.map +1 -0
- package/build/lib/commands/gesture.js +565 -0
- package/build/lib/commands/gesture.js.map +1 -0
- package/build/lib/commands/hid-event.d.ts +2773 -0
- package/build/lib/commands/hid-event.d.ts.map +1 -0
- package/build/lib/commands/hid-event.js +1633 -0
- package/build/lib/commands/hid-event.js.map +1 -0
- package/build/lib/commands/increase-contrast.d.ts +24 -0
- package/build/lib/commands/increase-contrast.d.ts.map +1 -0
- package/build/lib/commands/increase-contrast.js +49 -0
- package/build/lib/commands/increase-contrast.js.map +1 -0
- package/build/lib/commands/iohid.d.ts +1372 -0
- package/build/lib/commands/iohid.d.ts.map +1 -0
- package/build/lib/commands/iohid.js +63 -0
- package/build/lib/commands/iohid.js.map +1 -0
- package/build/lib/commands/keyboard.d.ts +32 -0
- package/build/lib/commands/keyboard.d.ts.map +1 -0
- package/build/lib/commands/keyboard.js +67 -0
- package/build/lib/commands/keyboard.js.map +1 -0
- package/build/lib/commands/keychains.d.ts +10 -0
- package/build/lib/commands/keychains.d.ts.map +1 -0
- package/build/lib/commands/keychains.js +22 -0
- package/build/lib/commands/keychains.js.map +1 -0
- package/build/lib/commands/localization.d.ts +17 -0
- package/build/lib/commands/localization.d.ts.map +1 -0
- package/build/lib/commands/localization.js +34 -0
- package/build/lib/commands/localization.js.map +1 -0
- package/build/lib/commands/location.d.ts +40 -0
- package/build/lib/commands/location.d.ts.map +1 -0
- package/build/lib/commands/location.js +121 -0
- package/build/lib/commands/location.js.map +1 -0
- package/build/lib/commands/lock.d.ts +23 -0
- package/build/lib/commands/lock.d.ts.map +1 -0
- package/build/lib/commands/lock.js +49 -0
- package/build/lib/commands/lock.js.map +1 -0
- package/build/lib/commands/log.d.ts +68 -0
- package/build/lib/commands/log.d.ts.map +1 -0
- package/build/lib/commands/log.js +287 -0
- package/build/lib/commands/log.js.map +1 -0
- package/build/lib/commands/memory.d.ts +11 -0
- package/build/lib/commands/memory.d.ts.map +1 -0
- package/build/lib/commands/memory.js +49 -0
- package/build/lib/commands/memory.js.map +1 -0
- package/build/lib/commands/navigation.d.ts +44 -0
- package/build/lib/commands/navigation.d.ts.map +1 -0
- package/build/lib/commands/navigation.js +121 -0
- package/build/lib/commands/navigation.js.map +1 -0
- package/build/lib/commands/notifications.d.ts +28 -0
- package/build/lib/commands/notifications.d.ts.map +1 -0
- package/build/lib/commands/notifications.js +64 -0
- package/build/lib/commands/notifications.js.map +1 -0
- package/build/lib/commands/pasteboard.d.ts +23 -0
- package/build/lib/commands/pasteboard.d.ts.map +1 -0
- package/build/lib/commands/pasteboard.js +43 -0
- package/build/lib/commands/pasteboard.js.map +1 -0
- package/build/lib/commands/pcap.d.ts +54 -0
- package/build/lib/commands/pcap.d.ts.map +1 -0
- package/build/lib/commands/pcap.js +149 -0
- package/build/lib/commands/pcap.js.map +1 -0
- package/build/lib/commands/performance.d.ts +85 -0
- package/build/lib/commands/performance.d.ts.map +1 -0
- package/build/lib/commands/performance.js +331 -0
- package/build/lib/commands/performance.js.map +1 -0
- package/build/lib/commands/permissions.d.ts +36 -0
- package/build/lib/commands/permissions.d.ts.map +1 -0
- package/build/lib/commands/permissions.js +80 -0
- package/build/lib/commands/permissions.js.map +1 -0
- package/build/lib/commands/proxy-helper.d.ts +15 -0
- package/build/lib/commands/proxy-helper.d.ts.map +1 -0
- package/build/lib/commands/proxy-helper.js +117 -0
- package/build/lib/commands/proxy-helper.js.map +1 -0
- package/build/lib/commands/record-audio.d.ts +69 -0
- package/build/lib/commands/record-audio.d.ts.map +1 -0
- package/build/lib/commands/record-audio.js +228 -0
- package/build/lib/commands/record-audio.js.map +1 -0
- package/build/lib/commands/recordscreen.d.ts +89 -0
- package/build/lib/commands/recordscreen.d.ts.map +1 -0
- package/build/lib/commands/recordscreen.js +326 -0
- package/build/lib/commands/recordscreen.js.map +1 -0
- package/build/lib/commands/screenshots.d.ts +16 -0
- package/build/lib/commands/screenshots.d.ts.map +1 -0
- package/build/lib/commands/screenshots.js +129 -0
- package/build/lib/commands/screenshots.js.map +1 -0
- package/build/lib/commands/simctl.d.ts +27 -0
- package/build/lib/commands/simctl.d.ts.map +1 -0
- package/build/lib/commands/simctl.js +65 -0
- package/build/lib/commands/simctl.js.map +1 -0
- package/build/lib/commands/source.d.ts +16 -0
- package/build/lib/commands/source.d.ts.map +1 -0
- package/build/lib/commands/source.js +128 -0
- package/build/lib/commands/source.js.map +1 -0
- package/build/lib/commands/timeouts.d.ts +53 -0
- package/build/lib/commands/timeouts.d.ts.map +1 -0
- package/build/lib/commands/timeouts.js +71 -0
- package/build/lib/commands/timeouts.js.map +1 -0
- package/build/lib/commands/types.d.ts +539 -0
- package/build/lib/commands/types.d.ts.map +1 -0
- package/build/lib/commands/types.js +3 -0
- package/build/lib/commands/types.js.map +1 -0
- package/build/lib/commands/web.d.ts +297 -0
- package/build/lib/commands/web.d.ts.map +1 -0
- package/build/lib/commands/web.js +1029 -0
- package/build/lib/commands/web.js.map +1 -0
- package/build/lib/commands/xctest-record-screen.d.ts +92 -0
- package/build/lib/commands/xctest-record-screen.d.ts.map +1 -0
- package/build/lib/commands/xctest-record-screen.js +193 -0
- package/build/lib/commands/xctest-record-screen.js.map +1 -0
- package/build/lib/commands/xctest.d.ts +71 -0
- package/build/lib/commands/xctest.d.ts.map +1 -0
- package/build/lib/commands/xctest.js +257 -0
- package/build/lib/commands/xctest.js.map +1 -0
- package/build/lib/css-converter.d.ts +10 -0
- package/build/lib/css-converter.d.ts.map +1 -0
- package/build/lib/css-converter.js +258 -0
- package/build/lib/css-converter.js.map +1 -0
- package/build/lib/desired-caps.d.ts +506 -0
- package/build/lib/desired-caps.d.ts.map +1 -0
- package/build/lib/desired-caps.js +400 -0
- package/build/lib/desired-caps.js.map +1 -0
- package/build/lib/device-connections-factory.d.ts +13 -0
- package/build/lib/device-connections-factory.d.ts.map +1 -0
- package/build/lib/device-connections-factory.js +244 -0
- package/build/lib/device-connections-factory.js.map +1 -0
- package/build/lib/device-log/helpers.d.ts +10 -0
- package/build/lib/device-log/helpers.d.ts.map +1 -0
- package/build/lib/device-log/helpers.js +37 -0
- package/build/lib/device-log/helpers.js.map +1 -0
- package/build/lib/device-log/ios-crash-log.d.ts +34 -0
- package/build/lib/device-log/ios-crash-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-crash-log.js +141 -0
- package/build/lib/device-log/ios-crash-log.js.map +1 -0
- package/build/lib/device-log/ios-device-log.d.ts +19 -0
- package/build/lib/device-log/ios-device-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-device-log.js +42 -0
- package/build/lib/device-log/ios-device-log.js.map +1 -0
- package/build/lib/device-log/ios-log.d.ts +24 -0
- package/build/lib/device-log/ios-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-log.js +50 -0
- package/build/lib/device-log/ios-log.js.map +1 -0
- package/build/lib/device-log/ios-performance-log.d.ts +18 -0
- package/build/lib/device-log/ios-performance-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-performance-log.js +43 -0
- package/build/lib/device-log/ios-performance-log.js.map +1 -0
- package/build/lib/device-log/ios-simulator-log.d.ts +38 -0
- package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-simulator-log.js +184 -0
- package/build/lib/device-log/ios-simulator-log.js.map +1 -0
- package/build/lib/device-log/line-consuming-log.d.ts +9 -0
- package/build/lib/device-log/line-consuming-log.d.ts.map +1 -0
- package/build/lib/device-log/line-consuming-log.js +16 -0
- package/build/lib/device-log/line-consuming-log.js.map +1 -0
- package/build/lib/device-log/safari-console-log.d.ts +67 -0
- package/build/lib/device-log/safari-console-log.d.ts.map +1 -0
- package/build/lib/device-log/safari-console-log.js +81 -0
- package/build/lib/device-log/safari-console-log.js.map +1 -0
- package/build/lib/device-log/safari-network-log.d.ts +75 -0
- package/build/lib/device-log/safari-network-log.d.ts.map +1 -0
- package/build/lib/device-log/safari-network-log.js +47 -0
- package/build/lib/device-log/safari-network-log.js.map +1 -0
- package/build/lib/doctor/checks.d.ts +3 -0
- package/build/lib/doctor/checks.d.ts.map +1 -0
- package/build/lib/doctor/checks.js +39 -0
- package/build/lib/doctor/checks.js.map +1 -0
- package/build/lib/doctor/optional-checks.d.ts +46 -0
- package/build/lib/doctor/optional-checks.d.ts.map +1 -0
- package/build/lib/doctor/optional-checks.js +129 -0
- package/build/lib/doctor/optional-checks.js.map +1 -0
- package/build/lib/doctor/required-checks.d.ts +42 -0
- package/build/lib/doctor/required-checks.d.ts.map +1 -0
- package/build/lib/doctor/required-checks.js +94 -0
- package/build/lib/doctor/required-checks.js.map +1 -0
- package/build/lib/doctor/utils.d.ts +8 -0
- package/build/lib/doctor/utils.d.ts.map +1 -0
- package/build/lib/doctor/utils.js +21 -0
- package/build/lib/doctor/utils.js.map +1 -0
- package/build/lib/driver.d.ts +2429 -0
- package/build/lib/driver.d.ts.map +1 -0
- package/build/lib/driver.js +1967 -0
- package/build/lib/driver.js.map +1 -0
- package/build/lib/execute-method-map.d.ts +552 -0
- package/build/lib/execute-method-map.d.ts.map +1 -0
- package/build/lib/execute-method-map.js +586 -0
- package/build/lib/execute-method-map.js.map +1 -0
- package/build/lib/ios-fs-helpers.d.ts +75 -0
- package/build/lib/ios-fs-helpers.d.ts.map +1 -0
- package/build/lib/ios-fs-helpers.js +370 -0
- package/build/lib/ios-fs-helpers.js.map +1 -0
- package/build/lib/ios-generic-simulators.d.ts +6 -0
- package/build/lib/ios-generic-simulators.d.ts.map +1 -0
- package/build/lib/ios-generic-simulators.js +14 -0
- package/build/lib/ios-generic-simulators.js.map +1 -0
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +6 -0
- package/build/lib/logger.js.map +1 -0
- package/build/lib/method-map.d.ts +229 -0
- package/build/lib/method-map.d.ts.map +1 -0
- package/build/lib/method-map.js +200 -0
- package/build/lib/method-map.js.map +1 -0
- package/build/lib/real-device-clients/base-device-client.d.ts +22 -0
- package/build/lib/real-device-clients/base-device-client.d.ts.map +1 -0
- package/build/lib/real-device-clients/base-device-client.js +14 -0
- package/build/lib/real-device-clients/base-device-client.js.map +1 -0
- package/build/lib/real-device-clients/py-ios-device-client.d.ts +21 -0
- package/build/lib/real-device-clients/py-ios-device-client.d.ts.map +1 -0
- package/build/lib/real-device-clients/py-ios-device-client.js +125 -0
- package/build/lib/real-device-clients/py-ios-device-client.js.map +1 -0
- package/build/lib/real-device-management.d.ts +53 -0
- package/build/lib/real-device-management.d.ts.map +1 -0
- package/build/lib/real-device-management.js +128 -0
- package/build/lib/real-device-management.js.map +1 -0
- package/build/lib/real-device.d.ts +112 -0
- package/build/lib/real-device.d.ts.map +1 -0
- package/build/lib/real-device.js +352 -0
- package/build/lib/real-device.js.map +1 -0
- package/build/lib/simulator-management.d.ts +96 -0
- package/build/lib/simulator-management.d.ts.map +1 -0
- package/build/lib/simulator-management.js +278 -0
- package/build/lib/simulator-management.js.map +1 -0
- package/build/lib/stubs.d.ts +3 -0
- package/build/lib/stubs.d.ts.map +1 -0
- package/build/lib/stubs.js +3 -0
- package/build/lib/stubs.js.map +1 -0
- package/build/lib/types.d.ts +31 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/lib/utils.d.ts +191 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +549 -0
- package/build/lib/utils.js.map +1 -0
- package/build/lib/xcrun.d.ts +3 -0
- package/build/lib/xcrun.d.ts.map +1 -0
- package/build/lib/xcrun.js +17 -0
- package/build/lib/xcrun.js.map +1 -0
- package/index.js +7 -0
- package/lib/app-infos-cache.js +187 -0
- package/lib/app-utils.js +710 -0
- package/lib/commands/active-app-info.js +12 -0
- package/lib/commands/advanced-battery-types.ts +454 -0
- package/lib/commands/alert.js +88 -0
- package/lib/commands/app-management.js +346 -0
- package/lib/commands/app-strings.js +30 -0
- package/lib/commands/appearance.js +71 -0
- package/lib/commands/audit.js +31 -0
- package/lib/commands/battery.js +45 -0
- package/lib/commands/bidi/constants.ts +6 -0
- package/lib/commands/bidi/models.ts +55 -0
- package/lib/commands/bidi/types.ts +31 -0
- package/lib/commands/biometric.js +53 -0
- package/lib/commands/certificate.js +497 -0
- package/lib/commands/clipboard.js +35 -0
- package/lib/commands/condition.js +155 -0
- package/lib/commands/content-size.js +68 -0
- package/lib/commands/context.js +705 -0
- package/lib/commands/deviceInfo.js +27 -0
- package/lib/commands/element.js +423 -0
- package/lib/commands/enum.ts +108 -0
- package/lib/commands/execute.js +153 -0
- package/lib/commands/file-movement.js +510 -0
- package/lib/commands/find.js +205 -0
- package/lib/commands/general.js +278 -0
- package/lib/commands/geolocation.js +56 -0
- package/lib/commands/gesture.js +596 -0
- package/lib/commands/hid-event.ts +1634 -0
- package/lib/commands/increase-contrast.js +50 -0
- package/lib/commands/iohid.js +64 -0
- package/lib/commands/keyboard.js +62 -0
- package/lib/commands/keychains.js +18 -0
- package/lib/commands/localization.js +30 -0
- package/lib/commands/location.js +131 -0
- package/lib/commands/lock.js +46 -0
- package/lib/commands/log.js +327 -0
- package/lib/commands/memory.js +51 -0
- package/lib/commands/navigation.js +125 -0
- package/lib/commands/notifications.js +66 -0
- package/lib/commands/pasteboard.js +42 -0
- package/lib/commands/pcap.js +168 -0
- package/lib/commands/performance.js +392 -0
- package/lib/commands/permissions.js +85 -0
- package/lib/commands/proxy-helper.js +122 -0
- package/lib/commands/record-audio.js +264 -0
- package/lib/commands/recordscreen.js +391 -0
- package/lib/commands/screenshots.js +137 -0
- package/lib/commands/simctl.js +71 -0
- package/lib/commands/source.js +131 -0
- package/lib/commands/timeouts.js +68 -0
- package/lib/commands/types.ts +648 -0
- package/lib/commands/web.js +1113 -0
- package/lib/commands/xctest-record-screen.js +204 -0
- package/lib/commands/xctest.js +285 -0
- package/lib/css-converter.js +311 -0
- package/lib/desired-caps.js +396 -0
- package/lib/device-connections-factory.js +269 -0
- package/lib/device-log/helpers.ts +40 -0
- package/lib/device-log/ios-crash-log.ts +166 -0
- package/lib/device-log/ios-device-log.ts +51 -0
- package/lib/device-log/ios-log.ts +70 -0
- package/lib/device-log/ios-performance-log.ts +50 -0
- package/lib/device-log/ios-simulator-log.ts +202 -0
- package/lib/device-log/line-consuming-log.ts +16 -0
- package/lib/device-log/safari-console-log.ts +117 -0
- package/lib/device-log/safari-network-log.ts +120 -0
- package/lib/doctor/checks.ts +3 -0
- package/lib/doctor/optional-checks.ts +173 -0
- package/lib/doctor/required-checks.ts +120 -0
- package/lib/doctor/utils.ts +18 -0
- package/lib/driver.js +2316 -0
- package/lib/execute-method-map.ts +585 -0
- package/lib/ios-fs-helpers.js +355 -0
- package/lib/ios-generic-simulators.js +11 -0
- package/lib/logger.js +5 -0
- package/lib/method-map.js +196 -0
- package/lib/real-device-clients/base-device-client.ts +34 -0
- package/lib/real-device-clients/py-ios-device-client.ts +149 -0
- package/lib/real-device-management.js +133 -0
- package/lib/real-device.js +347 -0
- package/lib/simulator-management.js +324 -0
- package/lib/stubs.ts +3 -0
- package/lib/types.ts +33 -0
- package/lib/utils.js +551 -0
- package/lib/xcrun.js +16 -0
- package/package.json +175 -0
- package/scripts/build-docs.js +56 -0
- package/scripts/build-wda.js +42 -0
- package/scripts/download-wda-sim.mjs +68 -0
- package/scripts/image-mounter.mjs +239 -0
- package/scripts/open-wda.mjs +15 -0
- package/scripts/tunnel-creation.mjs +359 -0
- package/scripts/utils.js +16 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LogEntry } from '../commands/types';
|
|
2
|
+
export declare const DEFAULT_LOG_LEVEL = "ALL";
|
|
3
|
+
export declare const MAX_JSON_LOG_LENGTH = 200;
|
|
4
|
+
export declare const MAX_BUFFERED_EVENTS_COUNT = 5000;
|
|
5
|
+
export declare function toLogEntry(message: string, timestamp: number, level?: string): LogEntry;
|
|
6
|
+
export interface GrepOptions {
|
|
7
|
+
caseInsensitive?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function grepFile(fullPath: string, str: string, opts?: GrepOptions): Promise<boolean>;
|
|
10
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../lib/device-log/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAKlD,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AACvC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAA0B,GAAG,QAAQ,CAM1G;AAED,MAAM,WAAW,WAAW;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAsB,QAAQ,CAC5B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,OAAO,CAAC,CAclB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MAX_BUFFERED_EVENTS_COUNT = exports.MAX_JSON_LOG_LENGTH = exports.DEFAULT_LOG_LEVEL = void 0;
|
|
7
|
+
exports.toLogEntry = toLogEntry;
|
|
8
|
+
exports.grepFile = grepFile;
|
|
9
|
+
const support_1 = require("appium/support");
|
|
10
|
+
const node_readline_1 = require("node:readline");
|
|
11
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
12
|
+
exports.DEFAULT_LOG_LEVEL = 'ALL';
|
|
13
|
+
exports.MAX_JSON_LOG_LENGTH = 200;
|
|
14
|
+
exports.MAX_BUFFERED_EVENTS_COUNT = 5000;
|
|
15
|
+
function toLogEntry(message, timestamp, level = exports.DEFAULT_LOG_LEVEL) {
|
|
16
|
+
return {
|
|
17
|
+
timestamp,
|
|
18
|
+
level,
|
|
19
|
+
message,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
async function grepFile(fullPath, str, opts = {}) {
|
|
23
|
+
const input = support_1.fs.createReadStream(fullPath);
|
|
24
|
+
const rl = (0, node_readline_1.createInterface)({ input });
|
|
25
|
+
return await new Promise((resolve, reject) => {
|
|
26
|
+
input.once('error', reject);
|
|
27
|
+
rl.on('line', (line) => {
|
|
28
|
+
if (opts.caseInsensitive && lodash_1.default.toLower(line).includes(lodash_1.default.toLower(str))
|
|
29
|
+
|| !opts.caseInsensitive && line.includes(str)) {
|
|
30
|
+
resolve(true);
|
|
31
|
+
input.close();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
input.once('end', () => resolve(false));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../lib/device-log/helpers.ts"],"names":[],"mappings":";;;;;;AASA,gCAMC;AAMD,4BAkBC;AAtCD,4CAAoC;AACpC,iDAAgD;AAChD,oDAAuB;AAEV,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAC1B,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAC1B,QAAA,yBAAyB,GAAG,IAAI,CAAC;AAE9C,SAAgB,UAAU,CAAC,OAAe,EAAE,SAAiB,EAAE,QAAgB,yBAAiB;IAC9F,OAAO;QACL,SAAS;QACT,KAAK;QACL,OAAO;KACR,CAAC;AACJ,CAAC;AAMM,KAAK,UAAU,QAAQ,CAC5B,QAAgB,EAChB,GAAW,EACX,OAAoB,EAAE;IAEtB,MAAM,KAAK,GAAG,YAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,EAAE,GAAG,IAAA,+BAAe,EAAC,EAAC,KAAK,EAAC,CAAC,CAAC;IACpC,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACrB,IAAI,IAAI,CAAC,eAAe,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,gBAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;mBAC7D,CAAC,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnD,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IOSLog } from './ios-log';
|
|
2
|
+
import type { AppiumLogger } from '@appium/types';
|
|
3
|
+
import type { Simulator } from '@limrun/appium-ios-simulator';
|
|
4
|
+
import type { LogEntry } from '../commands/types';
|
|
5
|
+
type TSerializedEntry = [string, number];
|
|
6
|
+
export interface IOSCrashLogOptions {
|
|
7
|
+
/** UDID of a real device */
|
|
8
|
+
udid?: string;
|
|
9
|
+
/** Simulator instance */
|
|
10
|
+
sim?: Simulator;
|
|
11
|
+
log: AppiumLogger;
|
|
12
|
+
}
|
|
13
|
+
export declare class IOSCrashLog extends IOSLog<TSerializedEntry, TSerializedEntry> {
|
|
14
|
+
private readonly _udid;
|
|
15
|
+
private readonly _realDeviceClient;
|
|
16
|
+
private readonly _logDir;
|
|
17
|
+
private readonly _sim;
|
|
18
|
+
private _recentCrashFiles;
|
|
19
|
+
private _started;
|
|
20
|
+
constructor(opts: IOSCrashLogOptions);
|
|
21
|
+
startCapture(): Promise<void>;
|
|
22
|
+
stopCapture(): Promise<void>;
|
|
23
|
+
get isCapturing(): boolean;
|
|
24
|
+
getLogs(): Promise<LogEntry[]>;
|
|
25
|
+
protected _serializeEntry(value: TSerializedEntry): TSerializedEntry;
|
|
26
|
+
protected _deserializeEntry(value: TSerializedEntry): LogEntry;
|
|
27
|
+
private _serializeCrashes;
|
|
28
|
+
private _gatherFromRealDevice;
|
|
29
|
+
private _gatherFromSimulator;
|
|
30
|
+
private _listCrashFiles;
|
|
31
|
+
private _isRealDevice;
|
|
32
|
+
}
|
|
33
|
+
export default IOSCrashLog;
|
|
34
|
+
//# sourceMappingURL=ios-crash-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-crash-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-crash-log.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQlD,KAAK,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,qBAAa,WAAY,SAAQ,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACzE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;IAC3C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA0B;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;IAC7C,OAAO,CAAC,iBAAiB,CAAW;IACpC,OAAO,CAAC,QAAQ,CAAU;gBAEd,IAAI,EAAE,kBAAkB;IAoBrB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAK7B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAa,WAAW,IAAI,OAAO,CAElC;IAEc,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;cAa1B,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB;cAI1D,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,QAAQ;YAKzD,iBAAiB;YA0BjB,qBAAqB;YAerB,oBAAoB;YAsBpB,eAAe;IAM7B,OAAO,CAAC,aAAa;CAGtB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IOSCrashLog = void 0;
|
|
7
|
+
const support_1 = require("appium/support");
|
|
8
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
11
|
+
const py_ios_device_client_1 = require("../real-device-clients/py-ios-device-client");
|
|
12
|
+
const ios_log_1 = require("./ios-log");
|
|
13
|
+
const helpers_1 = require("./helpers");
|
|
14
|
+
// The file format has been changed from '.crash' to '.ips' since Monterey.
|
|
15
|
+
const CRASH_REPORTS_GLOB_PATTERN = '**/*.@(crash|ips)';
|
|
16
|
+
// The size of a single diagnostic report might be hundreds of kilobytes.
|
|
17
|
+
// Thus we do not want to store too many items in the memory at once.
|
|
18
|
+
const MAX_RECENT_ITEMS = 20;
|
|
19
|
+
class IOSCrashLog extends ios_log_1.IOSLog {
|
|
20
|
+
_udid;
|
|
21
|
+
_realDeviceClient;
|
|
22
|
+
_logDir;
|
|
23
|
+
_sim;
|
|
24
|
+
_recentCrashFiles;
|
|
25
|
+
_started;
|
|
26
|
+
constructor(opts) {
|
|
27
|
+
super({
|
|
28
|
+
log: opts.log,
|
|
29
|
+
maxBufferSize: MAX_RECENT_ITEMS,
|
|
30
|
+
});
|
|
31
|
+
this._udid = opts.udid;
|
|
32
|
+
this._sim = opts.sim;
|
|
33
|
+
this._realDeviceClient = this._isRealDevice()
|
|
34
|
+
? new py_ios_device_client_1.Pyidevice({
|
|
35
|
+
udid: this._udid,
|
|
36
|
+
log: opts.log,
|
|
37
|
+
})
|
|
38
|
+
: null;
|
|
39
|
+
this._logDir = this._isRealDevice()
|
|
40
|
+
? null
|
|
41
|
+
: path_1.default.resolve(process.env.HOME || '/', 'Library', 'Logs', 'DiagnosticReports');
|
|
42
|
+
this._recentCrashFiles = [];
|
|
43
|
+
this._started = false;
|
|
44
|
+
}
|
|
45
|
+
async startCapture() {
|
|
46
|
+
this._recentCrashFiles = await this._listCrashFiles(false);
|
|
47
|
+
this._started = true;
|
|
48
|
+
}
|
|
49
|
+
async stopCapture() {
|
|
50
|
+
this._started = false;
|
|
51
|
+
}
|
|
52
|
+
get isCapturing() {
|
|
53
|
+
return this._started;
|
|
54
|
+
}
|
|
55
|
+
async getLogs() {
|
|
56
|
+
const crashFiles = (await this._listCrashFiles(true)).slice(-MAX_RECENT_ITEMS);
|
|
57
|
+
const diffFiles = lodash_1.default.difference(crashFiles, this._recentCrashFiles);
|
|
58
|
+
if (lodash_1.default.isEmpty(diffFiles)) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
this.log.debug(`Found ${support_1.util.pluralize('fresh crash report', diffFiles.length, true)}`);
|
|
62
|
+
await this._serializeCrashes(diffFiles);
|
|
63
|
+
this._recentCrashFiles = crashFiles;
|
|
64
|
+
return super.getLogs();
|
|
65
|
+
}
|
|
66
|
+
_serializeEntry(value) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
_deserializeEntry(value) {
|
|
70
|
+
const [message, timestamp] = value;
|
|
71
|
+
return (0, helpers_1.toLogEntry)(message, timestamp);
|
|
72
|
+
}
|
|
73
|
+
async _serializeCrashes(paths) {
|
|
74
|
+
const tmpRoot = await support_1.tempDir.openDir();
|
|
75
|
+
try {
|
|
76
|
+
for (const filePath of paths) {
|
|
77
|
+
let fullPath = filePath;
|
|
78
|
+
if (this._isRealDevice()) {
|
|
79
|
+
const fileName = filePath;
|
|
80
|
+
try {
|
|
81
|
+
await this._realDeviceClient.exportCrash(fileName, tmpRoot);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
this.log.warn(`Cannot export the crash report '${fileName}'. Skipping it. ` +
|
|
85
|
+
`Original error: ${e.message}`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
fullPath = path_1.default.join(tmpRoot, fileName);
|
|
89
|
+
}
|
|
90
|
+
const { ctime } = await support_1.fs.stat(fullPath);
|
|
91
|
+
this.broadcast([await support_1.fs.readFile(fullPath, 'utf8'), ctime.getTime()]);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
finally {
|
|
95
|
+
await support_1.fs.rimraf(tmpRoot);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async _gatherFromRealDevice(strict) {
|
|
99
|
+
if (!this._realDeviceClient) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
if (!await this._realDeviceClient.assertExists(strict)) {
|
|
103
|
+
this.log.info(`The ${lodash_1.default.toLower(this._realDeviceClient.constructor.name)} tool is not present in PATH. ` +
|
|
104
|
+
`Skipping crash logs collection for real devices.`);
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
return await this._realDeviceClient.listCrashes();
|
|
108
|
+
}
|
|
109
|
+
async _gatherFromSimulator() {
|
|
110
|
+
if (!this._logDir || !this._sim || !(await support_1.fs.exists(this._logDir))) {
|
|
111
|
+
this.log.debug(`Crash reports root '${this._logDir}' does not exist. Got nothing to gather.`);
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
const foundFiles = await support_1.fs.glob(CRASH_REPORTS_GLOB_PATTERN, {
|
|
115
|
+
cwd: this._logDir,
|
|
116
|
+
absolute: true,
|
|
117
|
+
});
|
|
118
|
+
const simUdid = this._sim.udid;
|
|
119
|
+
// For Simulator only include files, that contain current UDID
|
|
120
|
+
return await bluebird_1.default.filter(foundFiles, async (filePath) => {
|
|
121
|
+
try {
|
|
122
|
+
return await (0, helpers_1.grepFile)(filePath, simUdid, { caseInsensitive: true });
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
this.log.warn(err);
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
async _listCrashFiles(strict) {
|
|
131
|
+
return this._isRealDevice()
|
|
132
|
+
? await this._gatherFromRealDevice(strict)
|
|
133
|
+
: await this._gatherFromSimulator();
|
|
134
|
+
}
|
|
135
|
+
_isRealDevice() {
|
|
136
|
+
return Boolean(this._udid);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.IOSCrashLog = IOSCrashLog;
|
|
140
|
+
exports.default = IOSCrashLog;
|
|
141
|
+
//# sourceMappingURL=ios-crash-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-crash-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-crash-log.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAiD;AACjD,wDAAyB;AACzB,gDAAwB;AACxB,oDAAuB;AACvB,sFAAsE;AACtE,uCAAiC;AACjC,uCAAiD;AAMjD,2EAA2E;AAC3E,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AACvD,yEAAyE;AACzE,qEAAqE;AACrE,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAY5B,MAAa,WAAY,SAAQ,gBAA0C;IACxD,KAAK,CAAqB;IAC1B,iBAAiB,CAA0B;IAC3C,OAAO,CAAgB;IACvB,IAAI,CAAwB;IACrC,iBAAiB,CAAW;IAC5B,QAAQ,CAAU;IAE1B,YAAY,IAAwB;QAClC,KAAK,CAAC;YACJ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AG,MAAM,YAAE,CAAC,IAAI,CAAC,0BAA0B,EAAE;YAC3D,GAAG,EAAE,IAAI,CAAC,OAAO;YACjB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,MAAM,OAAO,GAAI,IAAI,CAAC,IAAkB,CAAC,IAAI,CAAC;QAC9C,8DAA8D;QAC9D,OAAO,MAAM,kBAAC,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;YACnD,IAAI,CAAC;gBACH,OAAO,MAAM,IAAA,kBAAQ,EAAC,QAAQ,EAAE,OAAO,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC,CAAC,CAAC;YACpE,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,MAAe;QAC3C,OAAO,IAAI,CAAC,aAAa,EAAE;YACzB,CAAC,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC;YAC1C,CAAC,CAAC,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;IACxC,CAAC;IAEO,aAAa;QACnB,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF;AAvID,kCAuIC;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LineConsumingLog } from './line-consuming-log';
|
|
2
|
+
import type { AppiumLogger } from '@appium/types';
|
|
3
|
+
export interface IOSDeviceLogOpts {
|
|
4
|
+
udid: string;
|
|
5
|
+
showLogs?: boolean;
|
|
6
|
+
log: AppiumLogger;
|
|
7
|
+
}
|
|
8
|
+
export declare class IOSDeviceLog extends LineConsumingLog {
|
|
9
|
+
private readonly udid;
|
|
10
|
+
private readonly showLogs;
|
|
11
|
+
private service;
|
|
12
|
+
constructor(opts: IOSDeviceLogOpts);
|
|
13
|
+
startCapture(): Promise<void>;
|
|
14
|
+
get isCapturing(): boolean;
|
|
15
|
+
stopCapture(): Promise<void>;
|
|
16
|
+
private onLog;
|
|
17
|
+
}
|
|
18
|
+
export default IOSDeviceLog;
|
|
19
|
+
//# sourceMappingURL=ios-device-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-device-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-device-log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,OAAO,CAAa;gBAEhB,IAAI,EAAE,gBAAgB;IAOnB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5C,IAAa,WAAW,IAAI,OAAO,CAElC;IAEc,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3C,OAAO,CAAC,KAAK;CAMd;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IOSDeviceLog = void 0;
|
|
4
|
+
const appium_ios_device_1 = require("appium-ios-device");
|
|
5
|
+
const line_consuming_log_1 = require("./line-consuming-log");
|
|
6
|
+
class IOSDeviceLog extends line_consuming_log_1.LineConsumingLog {
|
|
7
|
+
udid;
|
|
8
|
+
showLogs;
|
|
9
|
+
service;
|
|
10
|
+
constructor(opts) {
|
|
11
|
+
super({ log: opts.log });
|
|
12
|
+
this.udid = opts.udid;
|
|
13
|
+
this.showLogs = !!opts.showLogs;
|
|
14
|
+
this.service = null;
|
|
15
|
+
}
|
|
16
|
+
async startCapture() {
|
|
17
|
+
if (this.service) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.service = await appium_ios_device_1.services.startSyslogService(this.udid);
|
|
21
|
+
this.service.start(this.onLog.bind(this));
|
|
22
|
+
}
|
|
23
|
+
get isCapturing() {
|
|
24
|
+
return !!this.service;
|
|
25
|
+
}
|
|
26
|
+
async stopCapture() {
|
|
27
|
+
if (!this.service) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this.service.close();
|
|
31
|
+
this.service = null;
|
|
32
|
+
}
|
|
33
|
+
onLog(logLine) {
|
|
34
|
+
this.broadcast(logLine);
|
|
35
|
+
if (this.showLogs) {
|
|
36
|
+
this.log.info(`[IOS_SYSLOG_ROW] ${logLine}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.IOSDeviceLog = IOSDeviceLog;
|
|
41
|
+
exports.default = IOSDeviceLog;
|
|
42
|
+
//# sourceMappingURL=ios-device-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-device-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-device-log.ts"],"names":[],"mappings":";;;AAAA,yDAA2C;AAC3C,6DAAwD;AASxD,MAAa,YAAa,SAAQ,qCAAgB;IAC/B,IAAI,CAAS;IACb,QAAQ,CAAU;IAC3B,OAAO,CAAa;IAE5B,YAAY,IAAsB;QAChC,KAAK,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAC,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAEQ,KAAK,CAAC,YAAY;QACzB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,MAAM,4BAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,IAAa,WAAW;QACtB,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEQ,KAAK,CAAC,WAAW;QACxB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAEO,KAAK,CAAC,OAAe;QAC3B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACxB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;CACF;AAtCD,oCAsCC;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import type { LogEntry } from '../commands/types';
|
|
3
|
+
import type { AppiumLogger } from '@appium/types';
|
|
4
|
+
export interface IOSLogOptions {
|
|
5
|
+
maxBufferSize?: number;
|
|
6
|
+
log?: AppiumLogger;
|
|
7
|
+
}
|
|
8
|
+
export declare abstract class IOSLog<TRawEntry, TSerializedEntry extends object> extends EventEmitter {
|
|
9
|
+
private maxBufferSize;
|
|
10
|
+
private logs;
|
|
11
|
+
private _log;
|
|
12
|
+
constructor(opts?: IOSLogOptions);
|
|
13
|
+
abstract startCapture(): Promise<void>;
|
|
14
|
+
abstract stopCapture(): Promise<void>;
|
|
15
|
+
abstract get isCapturing(): boolean;
|
|
16
|
+
get log(): AppiumLogger;
|
|
17
|
+
getLogs(): Promise<LogEntry[]>;
|
|
18
|
+
protected abstract _serializeEntry(value: TRawEntry): TSerializedEntry;
|
|
19
|
+
protected abstract _deserializeEntry(value: TSerializedEntry): LogEntry;
|
|
20
|
+
protected _clearEntries(): void;
|
|
21
|
+
protected broadcast(entry: TRawEntry): void;
|
|
22
|
+
}
|
|
23
|
+
export default IOSLog;
|
|
24
|
+
//# sourceMappingURL=ios-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMlD,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,YAAY,CAAC;CACpB;AAED,8BAAsB,MAAM,CAC1B,SAAS,EACT,gBAAgB,SAAS,MAAM,CAC/B,SAAQ,YAAY;IACpB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,IAAI,CAAqC;IACjD,OAAO,CAAC,IAAI,CAAe;gBAEf,IAAI,GAAE,aAAkB;IASpC,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IACrC,QAAQ,KAAK,WAAW,IAAI,OAAO,CAAC;IAEpC,IAAI,GAAG,IAAI,YAAY,CAEtB;IAEK,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IASpC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,gBAAgB;IACtE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,QAAQ;IAEvE,SAAS,CAAC,aAAa;IAIvB,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;CAY5C;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IOSLog = void 0;
|
|
4
|
+
const events_1 = require("events");
|
|
5
|
+
const lru_cache_1 = require("lru-cache");
|
|
6
|
+
const support_1 = require("appium/support");
|
|
7
|
+
// We keep only the most recent log entries to avoid out of memory error
|
|
8
|
+
const MAX_LOG_ENTRIES_COUNT = 10000;
|
|
9
|
+
class IOSLog extends events_1.EventEmitter {
|
|
10
|
+
maxBufferSize;
|
|
11
|
+
logs;
|
|
12
|
+
_log;
|
|
13
|
+
constructor(opts = {}) {
|
|
14
|
+
super();
|
|
15
|
+
this.maxBufferSize = opts.maxBufferSize ?? MAX_LOG_ENTRIES_COUNT;
|
|
16
|
+
this.logs = new lru_cache_1.LRUCache({
|
|
17
|
+
max: this.maxBufferSize,
|
|
18
|
+
});
|
|
19
|
+
this._log = opts.log ?? support_1.logger.getLogger(this.constructor.name);
|
|
20
|
+
}
|
|
21
|
+
get log() {
|
|
22
|
+
return this._log;
|
|
23
|
+
}
|
|
24
|
+
async getLogs() {
|
|
25
|
+
const result = [];
|
|
26
|
+
for (const value of this.logs.rvalues()) {
|
|
27
|
+
result.push(this._deserializeEntry(value));
|
|
28
|
+
}
|
|
29
|
+
this._clearEntries();
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
_clearEntries() {
|
|
33
|
+
this.logs.clear();
|
|
34
|
+
}
|
|
35
|
+
broadcast(entry) {
|
|
36
|
+
let recentIndex = -1;
|
|
37
|
+
for (const key of this.logs.keys()) {
|
|
38
|
+
recentIndex = key;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
const serializedEntry = this._serializeEntry(entry);
|
|
42
|
+
this.logs.set(++recentIndex, serializedEntry);
|
|
43
|
+
if (this.listenerCount('output')) {
|
|
44
|
+
this.emit('output', this._deserializeEntry(serializedEntry));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.IOSLog = IOSLog;
|
|
49
|
+
exports.default = IOSLog;
|
|
50
|
+
//# sourceMappingURL=ios-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-log.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AACpC,yCAAqC;AAGrC,4CAAsC;AAEtC,wEAAwE;AACxE,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAOpC,MAAsB,MAGpB,SAAQ,qBAAY;IACZ,aAAa,CAAS;IACtB,IAAI,CAAqC;IACzC,IAAI,CAAe;IAE3B,YAAY,OAAsB,EAAE;QAClC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,qBAAqB,CAAC;QACjE,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAQ,CAAC;YACvB,GAAG,EAAE,IAAI,CAAC,aAAa;SACxB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,gBAAM,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAMD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAe,EAAE,CAAC;QAC9B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAyB,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAKS,aAAa;QACrB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IAES,SAAS,CAAC,KAAgB;QAClC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC;QACrB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACnC,WAAW,GAAG,GAAG,CAAC;YAClB,MAAM;QACR,CAAC;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CACF;AArDD,wBAqDC;AAED,kBAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AppiumLogger } from '@appium/types';
|
|
2
|
+
import { LineConsumingLog } from './line-consuming-log';
|
|
3
|
+
export interface IOSPerformanceLogOptions {
|
|
4
|
+
remoteDebugger: any;
|
|
5
|
+
maxEvents?: number;
|
|
6
|
+
log: AppiumLogger;
|
|
7
|
+
}
|
|
8
|
+
export declare class IOSPerformanceLog extends LineConsumingLog {
|
|
9
|
+
private readonly remoteDebugger;
|
|
10
|
+
private _started;
|
|
11
|
+
constructor(opts: IOSPerformanceLogOptions);
|
|
12
|
+
startCapture(): Promise<void>;
|
|
13
|
+
stopCapture(): Promise<void>;
|
|
14
|
+
get isCapturing(): boolean;
|
|
15
|
+
private onTimelineEvent;
|
|
16
|
+
}
|
|
17
|
+
export default IOSPerformanceLog;
|
|
18
|
+
//# sourceMappingURL=ios-performance-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-performance-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-performance-log.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,GAAG,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAM;IACrC,OAAO,CAAC,QAAQ,CAAU;gBAEd,IAAI,EAAE,wBAAwB;IAS3B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAO7B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAa,WAAW,IAAI,OAAO,CAElC;IAED,OAAO,CAAC,eAAe;CAKxB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IOSPerformanceLog = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const helpers_1 = require("./helpers");
|
|
9
|
+
const line_consuming_log_1 = require("./line-consuming-log");
|
|
10
|
+
class IOSPerformanceLog extends line_consuming_log_1.LineConsumingLog {
|
|
11
|
+
remoteDebugger;
|
|
12
|
+
_started;
|
|
13
|
+
constructor(opts) {
|
|
14
|
+
super({
|
|
15
|
+
maxBufferSize: opts.maxEvents ?? helpers_1.MAX_BUFFERED_EVENTS_COUNT,
|
|
16
|
+
log: opts.log,
|
|
17
|
+
});
|
|
18
|
+
this.remoteDebugger = opts.remoteDebugger;
|
|
19
|
+
this._started = false;
|
|
20
|
+
}
|
|
21
|
+
async startCapture() {
|
|
22
|
+
this.log.debug('Starting performance (Timeline) log capture');
|
|
23
|
+
this._clearEntries();
|
|
24
|
+
await this.remoteDebugger.startTimeline(this.onTimelineEvent.bind(this));
|
|
25
|
+
this._started = true;
|
|
26
|
+
}
|
|
27
|
+
async stopCapture() {
|
|
28
|
+
this.log.debug('Stopping performance (Timeline) log capture');
|
|
29
|
+
await this.remoteDebugger.stopTimeline();
|
|
30
|
+
this._started = false;
|
|
31
|
+
}
|
|
32
|
+
get isCapturing() {
|
|
33
|
+
return this._started;
|
|
34
|
+
}
|
|
35
|
+
onTimelineEvent(event) {
|
|
36
|
+
const serializedEntry = JSON.stringify(event);
|
|
37
|
+
this.broadcast(serializedEntry);
|
|
38
|
+
this.log.debug(`Received Timeline event: ${lodash_1.default.truncate(serializedEntry, { length: helpers_1.MAX_JSON_LOG_LENGTH })}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.IOSPerformanceLog = IOSPerformanceLog;
|
|
42
|
+
exports.default = IOSPerformanceLog;
|
|
43
|
+
//# sourceMappingURL=ios-performance-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-performance-log.js","sourceRoot":"","sources":["../../../lib/device-log/ios-performance-log.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAEvB,uCAA2E;AAC3E,6DAAwD;AASxD,MAAa,iBAAkB,SAAQ,qCAAgB;IACpC,cAAc,CAAM;IAC7B,QAAQ,CAAU;IAE1B,YAAY,IAA8B;QACxC,KAAK,C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|
3
|
+
import type { AppiumLogger } from '@appium/types';
|
|
4
|
+
export interface IOSSimulatorLogOptions {
|
|
5
|
+
sim: Simulator;
|
|
6
|
+
showLogs?: boolean;
|
|
7
|
+
iosSimulatorLogsPredicate?: string;
|
|
8
|
+
simulatorLogLevel?: string;
|
|
9
|
+
log: AppiumLogger;
|
|
10
|
+
iosSyslogFile?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class IOSSimulatorLog extends LineConsumingLog {
|
|
13
|
+
private readonly sim;
|
|
14
|
+
private readonly showLogs;
|
|
15
|
+
private readonly predicate?;
|
|
16
|
+
private readonly logLevel?;
|
|
17
|
+
private proc;
|
|
18
|
+
private readonly iosSyslogFile?;
|
|
19
|
+
private syslogLogger;
|
|
20
|
+
constructor(opts: IOSSimulatorLogOptions);
|
|
21
|
+
startCapture(): Promise<void>;
|
|
22
|
+
stopCapture(): Promise<void>;
|
|
23
|
+
get isCapturing(): boolean;
|
|
24
|
+
private clearExistingSyslog;
|
|
25
|
+
private shutdownSyslogger;
|
|
26
|
+
private onOutput;
|
|
27
|
+
/**
|
|
28
|
+
* Writes the given log row to the dedicated iOS syslog file if the logger is active.
|
|
29
|
+
* @param {string} logRow - The log line to write.
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
private writeToSyslogFile;
|
|
33
|
+
private killLogSubProcess;
|
|
34
|
+
private finishStartingLogCapture;
|
|
35
|
+
private cleanupObsoleteLogStreams;
|
|
36
|
+
}
|
|
37
|
+
export default IOSSimulatorLog;
|
|
38
|
+
//# sourceMappingURL=ios-simulator-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-simulator-log.d.ts","sourceRoot":"","sources":["../../../lib/device-log/ios-simulator-log.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,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