appium-xcuitest-driver 13.6.1 → 13.7.0
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 +6 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.d.ts +6 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js +64 -7
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/device-settings.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/device-settings.js +10 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/device-settings.js.map +1 -1
- package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi.ts +76 -7
- package/node_modules/@appium/base-driver/lib/basedriver/device-settings.ts +14 -2
- package/node_modules/@appium/base-driver/package.json +6 -6
- package/node_modules/@appium/support/build/lib/console.d.ts +3 -1
- package/node_modules/@appium/support/build/lib/console.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/console.js.map +1 -1
- package/node_modules/@appium/support/build/lib/index.d.ts +30 -30
- package/node_modules/@appium/support/build/lib/internal/move-operation.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/internal/move-operation.js +7 -6
- package/node_modules/@appium/support/build/lib/internal/move-operation.js.map +1 -1
- package/node_modules/@appium/support/lib/console.ts +6 -4
- package/node_modules/@appium/support/lib/internal/move-operation.ts +6 -5
- package/node_modules/@appium/support/package.json +8 -7
- package/node_modules/appium-ios-remotexpc/CHANGELOG.md +14 -0
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/afc/codec.d.ts +2 -1
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/afc/codec.d.ts.map +1 -1
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/afc/codec.js +7 -9
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/afc/codec.js.map +1 -1
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/zipconduit/index.d.ts.map +1 -1
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/zipconduit/index.js +14 -5
- package/node_modules/appium-ios-remotexpc/build/src/services/ios/zipconduit/index.js.map +1 -1
- package/node_modules/appium-ios-remotexpc/package.json +2 -2
- package/node_modules/appium-ios-remotexpc/src/services/ios/afc/codec.ts +7 -9
- package/node_modules/appium-ios-remotexpc/src/services/ios/zipconduit/index.ts +13 -5
- package/node_modules/appium-remote-debugger/CHANGELOG.md +16 -0
- package/node_modules/appium-remote-debugger/package.json +3 -3
- package/node_modules/appium-webdriveragent/CHANGELOG.md +37 -0
- package/node_modules/appium-webdriveragent/Scripts/build.sh +112 -15
- package/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj/project.pbxproj +18 -6
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +12 -7
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIElement+FBClassChain.h +52 -37
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIElement+FBClassChain.m +188 -19
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.m +17 -6
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.m +12 -12
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIElementQuery+FBHelpers.h +9 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Commands/FBElementCommands.m +25 -23
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Info.plist +2 -2
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Routing/FBXCElementSnapshot.h +1 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBClassChainQueryParser.h +34 -1
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBClassChainQueryParser.m +307 -463
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBConfiguration.h +9 -11
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBDisplayGeometry.h +25 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBDisplayGeometry.m +349 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBGestureCoordinateContext.h +3 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBGestureCoordinateContext.m +28 -11
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBScreen.h +5 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBScreen.m +26 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities/FBXPath.m +23 -6
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBAlertTests.m +9 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m +8 -8
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBConfigurationTests.m +13 -7
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBDisplayGestureTests.m +24 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBElementSwipingTests.m +16 -6
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m +7 -15
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.h +14 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +10 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBKeyboardTests.m +6 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBPasteboardTests.m +6 -3
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBSafariAlertTests.m +5 -4
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBScreenTests.m +209 -107
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBScrollingTests.m +1 -11
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBSessionIntegrationTests.m +8 -13
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBTapTest.m +44 -51
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBVoiceOverTests.m +7 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +31 -1
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m +12 -1
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/XCUIDeviceRotationTests.m +89 -91
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +90 -0
- package/node_modules/appium-webdriveragent/WebDriverAgentTests/UnitTests/FBClassChainTests.m +467 -0
- package/node_modules/appium-webdriveragent/package.json +2 -2
- package/node_modules/bare-fs/binding.c +192 -79
- package/node_modules/bare-fs/index.js +22 -8
- package/node_modules/bare-fs/package.json +1 -1
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/brace-expansion/README.md +3 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +1 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js +1 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.d.ts +1 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +1 -0
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/path-to-regexp/Readme.md +1 -7
- package/node_modules/path-to-regexp/dist/index.d.ts +7 -12
- package/node_modules/path-to-regexp/dist/index.js +99 -99
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +9 -8
- package/node_modules/tar-stream/extract.js +27 -6
- package/node_modules/tar-stream/headers.js +4 -4
- package/node_modules/tar-stream/pack.js +1 -1
- package/node_modules/tar-stream/package.json +1 -1
- package/package.json +4 -4
- package/node_modules/@appium/base-driver/node_modules/asyncbox/LICENSE +0 -203
- package/node_modules/@appium/base-driver/node_modules/asyncbox/README.md +0 -272
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +0 -9
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +0 -39
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +0 -9
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncmap.js +0 -30
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/errors.d.ts +0 -27
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/errors.js +0 -55
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/errors.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/index.d.ts +0 -12
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/index.js +0 -28
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/index.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/limit-function.js +0 -15
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/lock.d.ts +0 -74
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/lock.js +0 -296
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/lock.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +0 -15
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/long-sleep.js +0 -36
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/retry.d.ts +0 -17
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/retry.js +0 -57
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/retry.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +0 -20
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/sleep.js +0 -61
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/sleep.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +0 -18
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +0 -51
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +0 -16
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/with-timeout.js +0 -45
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/package.json +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +0 -9
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncfilter.js +0 -36
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +0 -9
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncmap.js +0 -27
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/errors.d.ts +0 -27
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/errors.js +0 -46
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/errors.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/index.d.ts +0 -12
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/index.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/index.js +0 -10
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/index.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/limit-function.js +0 -12
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/limit-function.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/lock.d.ts +0 -74
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/lock.js +0 -292
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/lock.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +0 -15
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/long-sleep.js +0 -33
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/retry.d.ts +0 -17
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/retry.js +0 -53
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/retry.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/sleep.d.ts +0 -20
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/sleep.js +0 -58
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/sleep.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js +0 -2
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +0 -18
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +0 -48
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +0 -16
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/with-timeout.js +0 -42
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/package.json +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/asyncfilter.ts +0 -42
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/asyncmap.ts +0 -33
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/errors.ts +0 -51
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/index.ts +0 -28
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/limit-function.ts +0 -18
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/lock.ts +0 -362
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/long-sleep.ts +0 -38
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/retry.ts +0 -61
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/sleep.ts +0 -79
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/types.ts +0 -88
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/wait-for-condition.ts +0 -52
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/with-timeout.ts +0 -43
- package/node_modules/@appium/base-driver/node_modules/asyncbox/package.json +0 -74
- package/node_modules/@appium/base-driver/node_modules/p-limit/index.d.ts +0 -138
- package/node_modules/@appium/base-driver/node_modules/p-limit/index.js +0 -148
- package/node_modules/@appium/base-driver/node_modules/p-limit/license +0 -9
- package/node_modules/@appium/base-driver/node_modules/p-limit/package.json +0 -58
- package/node_modules/@appium/base-driver/node_modules/p-limit/readme.md +0 -183
- package/node_modules/@appium/support/node_modules/asyncbox/LICENSE +0 -203
- package/node_modules/@appium/support/node_modules/asyncbox/README.md +0 -272
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +0 -9
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +0 -39
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +0 -9
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.js +0 -30
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.d.ts +0 -27
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.js +0 -55
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.d.ts +0 -12
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.js +0 -28
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.js +0 -15
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.d.ts +0 -74
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.js +0 -296
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +0 -15
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.js +0 -36
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.d.ts +0 -17
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.js +0 -57
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +0 -20
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.js +0 -61
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +0 -18
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +0 -51
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +0 -16
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.js +0 -45
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +0 -9
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.js +0 -36
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +0 -9
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.js +0 -27
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.d.ts +0 -27
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.js +0 -46
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.d.ts +0 -12
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.js +0 -10
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.js +0 -12
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.d.ts +0 -74
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.js +0 -292
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +0 -15
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.js +0 -33
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.d.ts +0 -17
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.js +0 -53
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.d.ts +0 -20
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.js +0 -58
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js +0 -2
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +0 -18
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +0 -48
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +0 -16
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.js +0 -42
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncfilter.ts +0 -42
- package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncmap.ts +0 -33
- package/node_modules/@appium/support/node_modules/asyncbox/lib/errors.ts +0 -51
- package/node_modules/@appium/support/node_modules/asyncbox/lib/index.ts +0 -28
- package/node_modules/@appium/support/node_modules/asyncbox/lib/limit-function.ts +0 -18
- package/node_modules/@appium/support/node_modules/asyncbox/lib/lock.ts +0 -362
- package/node_modules/@appium/support/node_modules/asyncbox/lib/long-sleep.ts +0 -38
- package/node_modules/@appium/support/node_modules/asyncbox/lib/retry.ts +0 -61
- package/node_modules/@appium/support/node_modules/asyncbox/lib/sleep.ts +0 -79
- package/node_modules/@appium/support/node_modules/asyncbox/lib/types.ts +0 -88
- package/node_modules/@appium/support/node_modules/asyncbox/lib/wait-for-condition.ts +0 -52
- package/node_modules/@appium/support/node_modules/asyncbox/lib/with-timeout.ts +0 -43
- package/node_modules/@appium/support/node_modules/asyncbox/package.json +0 -74
- package/node_modules/@appium/support/node_modules/p-limit/index.d.ts +0 -138
- package/node_modules/@appium/support/node_modules/p-limit/index.js +0 -148
- package/node_modules/@appium/support/node_modules/p-limit/license +0 -9
- package/node_modules/@appium/support/node_modules/p-limit/package.json +0 -58
- package/node_modules/@appium/support/node_modules/p-limit/readme.md +0 -183
- package/node_modules/@appium/support/node_modules/teen_process/CHANGELOG.md +0 -1122
- package/node_modules/@appium/support/node_modules/teen_process/LICENSE +0 -201
- package/node_modules/@appium/support/node_modules/teen_process/README.md +0 -270
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/circular-buffer.d.ts +0 -13
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/circular-buffer.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/circular-buffer.js +0 -57
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/circular-buffer.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/exec.d.ts +0 -33
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/exec.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/exec.js +0 -154
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/exec.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/helpers.d.ts +0 -2
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/helpers.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/helpers.js +0 -47
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/helpers.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/index.d.ts +0 -5
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/index.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/index.js +0 -10
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/index.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/subprocess.d.ts +0 -125
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/subprocess.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/subprocess.js +0 -311
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/subprocess.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/types.d.ts +0 -71
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/types.js +0 -3
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/lib/types.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/cjs/package.json +0 -3
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/circular-buffer.d.ts +0 -13
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/circular-buffer.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/circular-buffer.js +0 -53
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/circular-buffer.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/exec.d.ts +0 -33
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/exec.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/exec.js +0 -151
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/exec.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/helpers.d.ts +0 -2
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/helpers.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/helpers.js +0 -41
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/helpers.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/index.d.ts +0 -5
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/index.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/index.js +0 -4
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/index.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/subprocess.d.ts +0 -125
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/subprocess.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/subprocess.js +0 -307
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/subprocess.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/types.d.ts +0 -71
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/types.js +0 -2
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/lib/types.js.map +0 -1
- package/node_modules/@appium/support/node_modules/teen_process/build/esm/package.json +0 -3
- package/node_modules/@appium/support/node_modules/teen_process/lib/circular-buffer.ts +0 -60
- package/node_modules/@appium/support/node_modules/teen_process/lib/exec.ts +0 -176
- package/node_modules/@appium/support/node_modules/teen_process/lib/helpers.ts +0 -45
- package/node_modules/@appium/support/node_modules/teen_process/lib/index.ts +0 -4
- package/node_modules/@appium/support/node_modules/teen_process/lib/subprocess.ts +0 -358
- package/node_modules/@appium/support/node_modules/teen_process/lib/types.ts +0 -83
- package/node_modules/@appium/support/node_modules/teen_process/package.json +0 -81
- package/node_modules/appium-ios-remotexpc/node_modules/path-to-regexp/LICENSE +0 -21
- package/node_modules/appium-ios-remotexpc/node_modules/path-to-regexp/Readme.md +0 -218
- package/node_modules/appium-ios-remotexpc/node_modules/path-to-regexp/dist/index.d.ts +0 -142
- package/node_modules/appium-ios-remotexpc/node_modules/path-to-regexp/dist/index.js +0 -431
- package/node_modules/appium-ios-remotexpc/node_modules/path-to-regexp/dist/index.js.map +0 -1
- package/node_modules/appium-ios-remotexpc/node_modules/path-to-regexp/package.json +0 -65
- package/node_modules/yocto-queue/index.d.ts +0 -75
- package/node_modules/yocto-queue/index.js +0 -90
- package/node_modules/yocto-queue/license +0 -9
- package/node_modules/yocto-queue/package.json +0 -48
- package/node_modules/yocto-queue/readme.md +0 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [13.7.0](https://github.com/appium/appium-xcuitest-driver/compare/v13.6.1...v13.7.0) (2026-11-24)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* bump appium-webdriveragent to 17.1.0 and document class chain axes ([#3162](https://github.com/appium/appium-xcuitest-driver/issues/3162)) ([78eec36](https://github.com/appium/appium-xcuitest-driver/commit/78eec369f45a5dedfad8845154fdc8968f93aa6c))
|
|
6
|
+
|
|
1
7
|
## [13.6.1](https://github.com/appium/appium-xcuitest-driver/compare/v13.6.0...v13.6.1) (2026-11-21)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
@@ -3,6 +3,12 @@ import type { BaseDriver } from '../driver.js';
|
|
|
3
3
|
type BidiSubscriptionDriver = {
|
|
4
4
|
bidiEventSubs: Record<string, string[]>;
|
|
5
5
|
};
|
|
6
|
+
/** The maximum number of subscriptions of a driver */
|
|
7
|
+
export declare const MAX_BIDI_SUBSCRIPTIONS = 100;
|
|
8
|
+
/** The maximum number of (event, context) pairs of all the subscriptions of a driver, and of items in a list */
|
|
9
|
+
export declare const MAX_BIDI_SUBSCRIPTION_ENTRIES = 1000;
|
|
10
|
+
/** The maximum length of an event name, a context or a subscription ID */
|
|
11
|
+
export declare const MAX_BIDI_NAME_LENGTH = 256;
|
|
6
12
|
export declare function clearBidiSubscriptions(driver: BidiSubscriptionDriver): void;
|
|
7
13
|
declare module '../driver.js' {
|
|
8
14
|
interface BaseDriver<C extends Constraints> extends IBidiCommands {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAG5E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,KAAK,sBAAsB,GAAG;IAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAG5E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,KAAK,sBAAsB,GAAG;IAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAAC,CAAC;AAMxE,sDAAsD;AACtD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,gHAAgH;AAChH,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAClD,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAG3E;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,UAAU,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,aAAa;KAAG;CACrE;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,WAAW,EACvD,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EACnB,MAAM,EAAE,MAAM,EAAE,EAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAAC,CAuCjC;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,CAAC,SAAS,WAAW,EACzD,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EACnB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,aAAa,CAAC,EAAE,MAAM,EAAE,GACvB,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAQlG"}
|
|
@@ -2,6 +2,13 @@ import { util } from '@appium/support';
|
|
|
2
2
|
import { errors } from '../../protocol/errors.js';
|
|
3
3
|
// Keep each subscription separate: removing one ID must not remove overlapping subscriptions.
|
|
4
4
|
const subscriptionsByDriver = new WeakMap();
|
|
5
|
+
// The subscriptions are checked for every emitted event, so the state a client can create is bounded
|
|
6
|
+
/** The maximum number of subscriptions of a driver */
|
|
7
|
+
export const MAX_BIDI_SUBSCRIPTIONS = 100;
|
|
8
|
+
/** The maximum number of (event, context) pairs of all the subscriptions of a driver, and of items in a list */
|
|
9
|
+
export const MAX_BIDI_SUBSCRIPTION_ENTRIES = 1000;
|
|
10
|
+
/** The maximum length of an event name, a context or a subscription ID */
|
|
11
|
+
export const MAX_BIDI_NAME_LENGTH = 256;
|
|
5
12
|
export function clearBidiSubscriptions(driver) {
|
|
6
13
|
subscriptionsByDriver.delete(driver);
|
|
7
14
|
driver.bidiEventSubs = {};
|
|
@@ -29,11 +36,21 @@ export async function bidiSubscribe(events, contexts, userContexts) {
|
|
|
29
36
|
}
|
|
30
37
|
contexts ??= [''];
|
|
31
38
|
assertStringList(events, 'events');
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
assertContexts(contexts);
|
|
40
|
+
const uniqueEvents = util.uniq(events);
|
|
41
|
+
const uniqueContexts = util.uniq(contexts);
|
|
42
|
+
const subscriptions = getSubscriptions(this);
|
|
43
|
+
const entries = uniqueEvents.length * Math.max(uniqueContexts.length, 1) + countEntries(subscriptions);
|
|
44
|
+
if (entries > MAX_BIDI_SUBSCRIPTION_ENTRIES) {
|
|
45
|
+
throw new errors.InvalidArgumentError(`The subscriptions cannot cover more than ${MAX_BIDI_SUBSCRIPTION_ENTRIES} combinations of an event ` +
|
|
46
|
+
`and a context, unsubscribe from some of them first`);
|
|
47
|
+
}
|
|
48
|
+
// nothing is changed unless the request is going to be accepted
|
|
49
|
+
if (subscriptions.size >= MAX_BIDI_SUBSCRIPTIONS && !releaseEmptySubscription(subscriptions)) {
|
|
50
|
+
throw new errors.InvalidArgumentError(`Cannot create more than ${MAX_BIDI_SUBSCRIPTIONS} subscriptions, unsubscribe from some of them first`);
|
|
34
51
|
}
|
|
35
52
|
const subscription = util.uuidV4();
|
|
36
|
-
|
|
53
|
+
subscriptions.set(subscription, new Map(uniqueEvents.map((event) => [event, [...uniqueContexts]])));
|
|
37
54
|
refreshEventSubscriptions(this);
|
|
38
55
|
return { subscription };
|
|
39
56
|
}
|
|
@@ -49,12 +66,11 @@ export async function bidiUnsubscribe(events, contexts, subscriptions) {
|
|
|
49
66
|
if (subscriptions === undefined) {
|
|
50
67
|
const contextsToRemove = contexts === undefined ? [''] : contexts;
|
|
51
68
|
assertStringList(events, 'events');
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
69
|
+
assertContexts(contextsToRemove);
|
|
70
|
+
const contextsToRemoveSet = new Set(contextsToRemove);
|
|
55
71
|
for (const subscription of registered.values()) {
|
|
56
72
|
for (const event of events) {
|
|
57
|
-
const remaining = subscription.get(event)?.filter((context) => !
|
|
73
|
+
const remaining = subscription.get(event)?.filter((context) => !contextsToRemoveSet.has(context));
|
|
58
74
|
if (remaining?.length) {
|
|
59
75
|
subscription.set(event, remaining);
|
|
60
76
|
}
|
|
@@ -104,9 +120,50 @@ function getSubscriptions(driver) {
|
|
|
104
120
|
return subscriptions;
|
|
105
121
|
}
|
|
106
122
|
function assertStringList(value, name) {
|
|
123
|
+
assertListSize(value, name);
|
|
107
124
|
if (!Array.isArray(value) || !value.length || value.some((item) => typeof item !== 'string' || !item.length)) {
|
|
108
125
|
throw new errors.InvalidArgumentError(`${name} must be a non-empty array of non-empty strings`);
|
|
109
126
|
}
|
|
127
|
+
assertNameLengths(value, name);
|
|
128
|
+
}
|
|
129
|
+
function assertContexts(value) {
|
|
130
|
+
assertListSize(value, 'contexts');
|
|
131
|
+
if (!Array.isArray(value) || value.some((context) => typeof context !== 'string')) {
|
|
132
|
+
throw new errors.InvalidArgumentError('contexts must be an array of strings');
|
|
133
|
+
}
|
|
134
|
+
assertNameLengths(value, 'contexts');
|
|
135
|
+
}
|
|
136
|
+
// Checked before the items are scanned, so that an oversized list is rejected in constant time
|
|
137
|
+
function assertListSize(value, name) {
|
|
138
|
+
if (Array.isArray(value) && value.length > MAX_BIDI_SUBSCRIPTION_ENTRIES) {
|
|
139
|
+
throw new errors.InvalidArgumentError(`${name} must not have more than ${MAX_BIDI_SUBSCRIPTION_ENTRIES} items`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function assertNameLengths(items, name) {
|
|
143
|
+
if (items.some((item) => item.length > MAX_BIDI_NAME_LENGTH)) {
|
|
144
|
+
throw new errors.InvalidArgumentError(`The items of ${name} must not be longer than ${MAX_BIDI_NAME_LENGTH} characters`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// A subscription without contexts still keeps its event, so it counts as one entry
|
|
148
|
+
function countEntries(subscriptions) {
|
|
149
|
+
let count = 0;
|
|
150
|
+
for (const subscription of subscriptions.values()) {
|
|
151
|
+
for (const contexts of subscription.values()) {
|
|
152
|
+
count += Math.max(contexts.length, 1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return count;
|
|
156
|
+
}
|
|
157
|
+
// The legacy unsubscribe by event names leaves the emptied subscriptions registered, so that their
|
|
158
|
+
// IDs stay valid. The oldest of them gives way when the limit is reached.
|
|
159
|
+
function releaseEmptySubscription(subscriptions) {
|
|
160
|
+
for (const [id, subscription] of subscriptions) {
|
|
161
|
+
if (!subscription.size) {
|
|
162
|
+
subscriptions.delete(id);
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
110
167
|
}
|
|
111
168
|
function refreshEventSubscriptions(driver) {
|
|
112
169
|
const events = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi.js","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAGrC,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAKhD,8FAA8F;AAC9F,MAAM,qBAAqB,GAAG,IAAI,OAAO,EAA8C,CAAC;AAExF,MAAM,UAAU,sBAAsB,CAAC,MAA8B;IACnE,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,CAAC,aAAa,GAAG,EAAE,CAAC;AAC5B,CAAC;AAMD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAEjC,MAAgB,EAChB,QAAmB,EACnB,YAAuB;IAEvB,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,MAAM,CAAC,oBAAoB,CAAC,kDAAkD,CAAC,CAAC;QAC5F,CAAC;QACD,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;YAC5B,CAAC,YAAY,CAAC,MAAM;YACpB,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAC9E,CAAC;YACD,M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AE,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC;YAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACzC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,QAAQ,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IACD,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-settings.d.ts","sourceRoot":"","sources":["../../../lib/basedriver/device-settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAE,sBAAsB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAKzF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAElD;;GAEG;AACH,qBAAa,cAAc,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAC9F,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;IACvB,SAAS,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEvD;;;;;OAKG;gBACS,eAAe,GAAE,CAAW,EAAE,gBAAgB,GAAE,sBAAsB,CAAC,CAAC,CAAkB;IAKtG;;;;OAIG;IACG,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"device-settings.d.ts","sourceRoot":"","sources":["../../../lib/basedriver/device-settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAE,sBAAsB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAKzF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAElD;;GAEG;AACH,qBAAa,cAAc,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAC9F,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;IACvB,SAAS,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEvD;;;;;OAKG;gBACS,eAAe,GAAE,CAAW,EAAE,gBAAgB,GAAE,sBAAsB,CAAC,CAAC,CAAkB;IAKtG;;;;OAIG;IACG,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAsC3C,WAAW,IAAI,CAAC;CAGjB"}
|
|
@@ -30,11 +30,20 @@ export class DeviceSettings {
|
|
|
30
30
|
if (!util.isPlainObject(newSettings)) {
|
|
31
31
|
throw new errors.InvalidArgumentError(`Settings update should be called with valid JSON. Got ` + `${JSON.stringify(newSettings)} instead`);
|
|
32
32
|
}
|
|
33
|
+
// every key is validated up front so a rejected update is all-or-nothing:
|
|
34
|
+
// no part of the payload reaches the listener or the store. An own
|
|
35
|
+
// `__proto__` key (e.g. from JSON.parse) is the only hazard - assigning it
|
|
36
|
+
// rewrites the prototype of the settings object itself, while
|
|
37
|
+
// `constructor`/`prototype` as own keys are plain data properties
|
|
38
|
+
const keys = Object.keys(newSettings);
|
|
39
|
+
if (keys.includes('__proto__')) {
|
|
40
|
+
throw new errors.InvalidArgumentError(`Settings updates must not use the '__proto__' key, because assigning it would rewrite the prototype of the settings object`);
|
|
41
|
+
}
|
|
33
42
|
if (node.getObjectSize({ ...this._settings, ...newSettings }) >= MAX_SETTINGS_SIZE) {
|
|
34
43
|
throw new errors.InvalidArgumentError(`New settings cannot be applied, because the overall ` +
|
|
35
44
|
`object size exceeds the allowed limit of ${util.toReadableSizeString(MAX_SETTINGS_SIZE)}`);
|
|
36
45
|
}
|
|
37
|
-
for (const prop
|
|
46
|
+
for (const prop of keys) {
|
|
38
47
|
if (this._settings[prop] !== undefined) {
|
|
39
48
|
if (this._settings[prop] === newSettings[prop]) {
|
|
40
49
|
log.debug(`The value of '${prop}' setting did not change. Skipping the update for it`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-settings.js","sourceRoot":"","sources":["../../../lib/basedriver/device-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAE3D;;GAEG;AACH,MAAM,OAAO,cAAc;IACf,SAAS,CAAI;IACb,iBAAiB,CAA4B;IAEvD;;;;;OAKG;IACH,YAAY,kBAAqB,EAAO,EAAE,mBAA8C,KAAK,IAAI,EAAE,GAAE,CAAC;QACpG,IAAI,CAAC,SAAS,GAAG,EAAC,GAAG,eAAe,EAAC,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,WAAc;QACzB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,MAAM,CAAC,oBAAoB,CACnC,wDAAwD,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CACpG,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,aAAa,CAAC,EAAC,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,WAAW,EAAC,CAAC,IAAI,iBAAiB,EAAE,CAAC;YACjF,MAAM,IAAI,MAAM,CAAC,oBAAoB,CACnC,sDAAsD;gBACpD,4CAA4C,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,CAC7F,CAAC;QACJ,CAAC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C,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,WAAW,EAAC,CAAC,IAAI,iBAAiB,EAAE,CAAC;YACjF,MAAM,IAAI,MAAM,CAAC,oBAAoB,CACnC,sDAAsD;gBACpD,4CAA4C,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,CAC7F,CAAC;QACJ,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;gBACvC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC/C,GAAG,CAAC,KAAK,CAAC,iBAAiB,IAAI,sDAAsD,CAAC,CAAC;oBACvF,SAAS;gBACX,CAAC;YACH,CAAC;YACD,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAe,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YACtF,IAAI,CAAC,SAAqC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -9,6 +9,14 @@ type BidiSubscriptionDriver = {bidiEventSubs: Record<string, string[]>};
|
|
|
9
9
|
// Keep each subscription separate: removing one ID must not remove overlapping subscriptions.
|
|
10
10
|
const subscriptionsByDriver = new WeakMap<object, Map<string, Map<string, string[]>>>();
|
|
11
11
|
|
|
12
|
+
// The subscriptions are checked for every emitted event, so the state a client can create is bounded
|
|
13
|
+
/** The maximum number of subscriptions of a driver */
|
|
14
|
+
export const MAX_BIDI_SUBSCRIPTIONS = 100;
|
|
15
|
+
/** The maximum number of (event, context) pairs of all the subscriptions of a driver, and of items in a list */
|
|
16
|
+
export const MAX_BIDI_SUBSCRIPTION_ENTRIES = 1000;
|
|
17
|
+
/** The maximum length of an event name, a context or a subscription ID */
|
|
18
|
+
export const MAX_BIDI_NAME_LENGTH = 256;
|
|
19
|
+
|
|
12
20
|
export function clearBidiSubscriptions(driver: BidiSubscriptionDriver): void {
|
|
13
21
|
subscriptionsByDriver.delete(driver);
|
|
14
22
|
driver.bidiEventSubs = {};
|
|
@@ -48,11 +56,25 @@ export async function bidiSubscribe<C extends Constraints>(
|
|
|
48
56
|
}
|
|
49
57
|
contexts ??= [''];
|
|
50
58
|
assertStringList(events, 'events');
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
assertContexts(contexts);
|
|
60
|
+
const uniqueEvents = util.uniq(events);
|
|
61
|
+
const uniqueContexts = util.uniq(contexts);
|
|
62
|
+
const subscriptions = getSubscriptions(this);
|
|
63
|
+
const entries = uniqueEvents.length * Math.max(uniqueContexts.length, 1) + countEntries(subscriptions);
|
|
64
|
+
if (entries > MAX_BIDI_SUBSCRIPTION_ENTRIES) {
|
|
65
|
+
throw new errors.InvalidArgumentError(
|
|
66
|
+
`The subscriptions cannot cover more than ${MAX_BIDI_SUBSCRIPTION_ENTRIES} combinations of an event ` +
|
|
67
|
+
`and a context, unsubscribe from some of them first`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
// nothing is changed unless the request is going to be accepted
|
|
71
|
+
if (subscriptions.size >= MAX_BIDI_SUBSCRIPTIONS && !releaseEmptySubscription(subscriptions)) {
|
|
72
|
+
throw new errors.InvalidArgumentError(
|
|
73
|
+
`Cannot create more than ${MAX_BIDI_SUBSCRIPTIONS} subscriptions, unsubscribe from some of them first`,
|
|
74
|
+
);
|
|
53
75
|
}
|
|
54
76
|
const subscription = util.uuidV4();
|
|
55
|
-
|
|
77
|
+
subscriptions.set(subscription, new Map(uniqueEvents.map((event) => [event, [...uniqueContexts]])));
|
|
56
78
|
refreshEventSubscriptions(this);
|
|
57
79
|
return {subscription};
|
|
58
80
|
}
|
|
@@ -74,12 +96,11 @@ export async function bidiUnsubscribe<C extends Constraints>(
|
|
|
74
96
|
if (subscriptions === undefined) {
|
|
75
97
|
const contextsToRemove = contexts === undefined ? [''] : contexts;
|
|
76
98
|
assertStringList(events, 'events');
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
99
|
+
assertContexts(contextsToRemove);
|
|
100
|
+
const contextsToRemoveSet = new Set(contextsToRemove);
|
|
80
101
|
for (const subscription of registered.values()) {
|
|
81
102
|
for (const event of events) {
|
|
82
|
-
const remaining = subscription.get(event)?.filter((context) => !
|
|
103
|
+
const remaining = subscription.get(event)?.filter((context) => !contextsToRemoveSet.has(context));
|
|
83
104
|
if (remaining?.length) {
|
|
84
105
|
subscription.set(event, remaining);
|
|
85
106
|
} else {
|
|
@@ -132,9 +153,57 @@ function getSubscriptions(driver: object): Map<string, Map<string, string[]>> {
|
|
|
132
153
|
}
|
|
133
154
|
|
|
134
155
|
function assertStringList(value: unknown, name: string): asserts value is string[] {
|
|
156
|
+
assertListSize(value, name);
|
|
135
157
|
if (!Array.isArray(value) || !value.length || value.some((item) => typeof item !== 'string' || !item.length)) {
|
|
136
158
|
throw new errors.InvalidArgumentError(`${name} must be a non-empty array of non-empty strings`);
|
|
137
159
|
}
|
|
160
|
+
assertNameLengths(value, name);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function assertContexts(value: unknown): asserts value is string[] {
|
|
164
|
+
assertListSize(value, 'contexts');
|
|
165
|
+
if (!Array.isArray(value) || value.some((context) => typeof context !== 'string')) {
|
|
166
|
+
throw new errors.InvalidArgumentError('contexts must be an array of strings');
|
|
167
|
+
}
|
|
168
|
+
assertNameLengths(value, 'contexts');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Checked before the items are scanned, so that an oversized list is rejected in constant time
|
|
172
|
+
function assertListSize(value: unknown, name: string): void {
|
|
173
|
+
if (Array.isArray(value) && value.length > MAX_BIDI_SUBSCRIPTION_ENTRIES) {
|
|
174
|
+
throw new errors.InvalidArgumentError(`${name} must not have more than ${MAX_BIDI_SUBSCRIPTION_ENTRIES} items`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function assertNameLengths(items: string[], name: string): void {
|
|
179
|
+
if (items.some((item) => item.length > MAX_BIDI_NAME_LENGTH)) {
|
|
180
|
+
throw new errors.InvalidArgumentError(
|
|
181
|
+
`The items of ${name} must not be longer than ${MAX_BIDI_NAME_LENGTH} characters`,
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// A subscription without contexts still keeps its event, so it counts as one entry
|
|
187
|
+
function countEntries(subscriptions: Map<string, Map<string, string[]>>): number {
|
|
188
|
+
let count = 0;
|
|
189
|
+
for (const subscription of subscriptions.values()) {
|
|
190
|
+
for (const contexts of subscription.values()) {
|
|
191
|
+
count += Math.max(contexts.length, 1);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return count;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// The legacy unsubscribe by event names leaves the emptied subscriptions registered, so that their
|
|
198
|
+
// IDs stay valid. The oldest of them gives way when the limit is reached.
|
|
199
|
+
function releaseEmptySubscription(subscriptions: Map<string, Map<string, string[]>>): boolean {
|
|
200
|
+
for (const [id, subscription] of subscriptions) {
|
|
201
|
+
if (!subscription.size) {
|
|
202
|
+
subscriptions.delete(id);
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return false;
|
|
138
207
|
}
|
|
139
208
|
|
|
140
209
|
function refreshEventSubscriptions(driver: BidiSubscriptionDriver): void {
|
|
@@ -39,6 +39,18 @@ export class DeviceSettings<T extends StringRecord = StringRecord> implements ID
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
// every key is validated up front so a rejected update is all-or-nothing:
|
|
43
|
+
// no part of the payload reaches the listener or the store. An own
|
|
44
|
+
// `__proto__` key (e.g. from JSON.parse) is the only hazard - assigning it
|
|
45
|
+
// rewrites the prototype of the settings object itself, while
|
|
46
|
+
// `constructor`/`prototype` as own keys are plain data properties
|
|
47
|
+
const keys = Object.keys(newSettings);
|
|
48
|
+
if (keys.includes('__proto__')) {
|
|
49
|
+
throw new errors.InvalidArgumentError(
|
|
50
|
+
`Settings updates must not use the '__proto__' key, because assigning it would rewrite the prototype of the settings object`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
if (node.getObjectSize({...this._settings, ...newSettings}) >= MAX_SETTINGS_SIZE) {
|
|
43
55
|
throw new errors.InvalidArgumentError(
|
|
44
56
|
`New settings cannot be applied, because the overall ` +
|
|
@@ -46,7 +58,7 @@ export class DeviceSettings<T extends StringRecord = StringRecord> implements ID
|
|
|
46
58
|
);
|
|
47
59
|
}
|
|
48
60
|
|
|
49
|
-
for (const prop
|
|
61
|
+
for (const prop of keys) {
|
|
50
62
|
if (this._settings[prop] !== undefined) {
|
|
51
63
|
if (this._settings[prop] === newSettings[prop]) {
|
|
52
64
|
log.debug(`The value of '${prop}' setting did not change. Skipping the update for it`);
|
|
@@ -54,7 +66,7 @@ export class DeviceSettings<T extends StringRecord = StringRecord> implements ID
|
|
|
54
66
|
}
|
|
55
67
|
}
|
|
56
68
|
await this._onSettingsUpdate(prop as keyof T, newSettings[prop], this._settings[prop]);
|
|
57
|
-
this._settings[prop] = newSettings[prop];
|
|
69
|
+
(this._settings as Record<string, unknown>)[prop] = newSettings[prop];
|
|
58
70
|
}
|
|
59
71
|
}
|
|
60
72
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/base-driver",
|
|
3
|
-
"version": "11.0.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
|
+
"gitHead": "e72b4765eb4c400989728a02059075604dadceef",
|
|
5
5
|
"description": "Base driver class for Appium drivers",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"android",
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"test:types": "tsd"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@appium/support": "^8.0.
|
|
57
|
-
"@appium/types": "
|
|
58
|
-
"asyncbox": "^
|
|
56
|
+
"@appium/support": "^8.0.1",
|
|
57
|
+
"@appium/types": "~2.0.0",
|
|
58
|
+
"asyncbox": "^7.0.0",
|
|
59
59
|
"axios": "^1.20.0",
|
|
60
60
|
"lru-cache": "^11.5.2",
|
|
61
|
-
"path-to-regexp": "^
|
|
61
|
+
"path-to-regexp": "^9.0.0",
|
|
62
62
|
"picomatch": "^4.0.7"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type InspectOptions } from 'node:util';
|
|
2
2
|
import type { JsonValue } from '@appium/types';
|
|
3
|
+
/** @deprecated Has no effect in recent Node.js versions. Will be removed in a future release. */
|
|
4
|
+
export type DeprecatedTextStyle = 'framed' | 'overlined';
|
|
3
5
|
/** ANSI styles supported by Node's `util.styleText`. `grey` is accepted as an alias for `gray`. */
|
|
4
|
-
export type TextStyle = 'reset' | 'bold' | 'dim' | 'italic' | 'underline' | 'blink' | 'inverse' | 'hidden' | 'strikethrough' | 'doubleunderline' | 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'grey' | 'bgBlack' | 'bgRed' | 'bgGreen' | 'bgYellow' | 'bgBlue' | 'bgMagenta' | 'bgCyan' | 'bgWhite' | '
|
|
6
|
+
export type TextStyle = 'reset' | 'bold' | 'dim' | 'italic' | 'underline' | 'blink' | 'inverse' | 'hidden' | 'strikethrough' | 'doubleunderline' | 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'grey' | 'bgBlack' | 'bgRed' | 'bgGreen' | 'bgYellow' | 'bgBlue' | 'bgMagenta' | 'bgCyan' | 'bgWhite' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright' | DeprecatedTextStyle;
|
|
5
7
|
/** Applies terminal styling via Node's `util.styleText`. */
|
|
6
8
|
export declare function styleText(style: TextStyle, text: string): string;
|
|
7
9
|
/** Removes ANSI escape sequences (CSI and OSC) from a string. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../lib/console.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,cAAc,EAA6B,MAAM,WAAW,CAAC;AAE1E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAI7C,mGAAmG;AACnG,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,MAAM,GACN,KAAK,GACL,QAAQ,GACR,WAAW,GACX,OAAO,GACP,SAAS,GACT,QAAQ,GACR,eAAe,GACf,iBAAiB,GACjB,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,SAAS,GACT,
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../lib/console.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,cAAc,EAA6B,MAAM,WAAW,CAAC;AAE1E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAI7C,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzD,mGAAmG;AACnG,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,MAAM,GACN,KAAK,GACL,QAAQ,GACR,WAAW,GACX,OAAO,GACP,SAAS,GACT,QAAQ,GACR,eAAe,GACf,iBAAiB,GACjB,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS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AI5B,oDAAoD;IACpD,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI/C,0BAA0B;IAC1B,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI9C,2CAA2C;IAC3C,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIjD,gCAAgC;IAChC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI;IAIhD,wBAAwB;IACxB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,0BAA0B;IAC1B,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,8CAA8C;IAC9C,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAGlD;AAED,eAAO,MAAM,OAAO,YAAmB,CAAC;AACxC,OAAO,EAAC,UAAU,EAAE,UAAU,IAAI,OAAO,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../lib/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAsB,SAAS,IAAI,aAAa,EAAC,MAAM,WAAW,CAAC;AAI1E,OAAO,EAAC,kBAAkB,EAAE,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../lib/console.ts"],"names":[],"mappings":"AAAA,OAAO,EA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,CAAC"}
|
|
@@ -16,43 +16,43 @@ declare const _default: {
|
|
|
16
16
|
system: typeof system;
|
|
17
17
|
util: typeof util;
|
|
18
18
|
fs: {
|
|
19
|
-
hasAccess(filePath: import("fs").PathLike): Promise<boolean>;
|
|
20
|
-
isExecutable(filePath: import("fs").PathLike): Promise<boolean>;
|
|
21
|
-
exists(filePath: import("fs").PathLike): Promise<boolean>;
|
|
22
|
-
rimraf(filepath: import("fs").PathLike, opts?: import("./fs.js").RimrafOptions): Promise<void>;
|
|
23
|
-
rimrafSync(filepath: import("fs").PathLike, opts?: import("./fs.js").RimrafOptions): void;
|
|
24
|
-
mkdir(filepath: string | Buffer | URL, opts?: import("fs").MakeDirectoryOptions): Promise<string | undefined>;
|
|
19
|
+
hasAccess(filePath: import("node:fs").PathLike): Promise<boolean>;
|
|
20
|
+
isExecutable(filePath: import("node:fs").PathLike): Promise<boolean>;
|
|
21
|
+
exists(filePath: import("node:fs").PathLike): Promise<boolean>;
|
|
22
|
+
rimraf(filepath: import("node:fs").PathLike, opts?: import("./fs.js").RimrafOptions): Promise<void>;
|
|
23
|
+
rimrafSync(filepath: import("node:fs").PathLike, opts?: import("./fs.js").RimrafOptions): void;
|
|
24
|
+
mkdir(filepath: string | Buffer | URL, opts?: import("node:fs").MakeDirectoryOptions): Promise<string | undefined>;
|
|
25
25
|
copyFile(source: string, destination: string, opts?: import("./fs.js").CopyFileOptions): Promise<void>;
|
|
26
|
-
md5(filePath: import("fs").PathLike): Promise<string>;
|
|
26
|
+
md5(filePath: import("node:fs").PathLike): Promise<string>;
|
|
27
27
|
mv(from: string, to: string, opts?: import("./fs.js").MvOptions): Promise<void>;
|
|
28
28
|
which: typeof import("which");
|
|
29
29
|
glob: import("./fs.js").GlobFn;
|
|
30
30
|
sanitizeName: typeof import("sanitize-filename");
|
|
31
|
-
hash(filePath: import("fs").PathLike, algorithm?: string): Promise<string>;
|
|
31
|
+
hash(filePath: import("node:fs").PathLike, algorithm?: string): Promise<string>;
|
|
32
32
|
walk(dir: string, opts?: import("./internal/walker.js").WalkOptions): import("./internal/walker.js").Walker;
|
|
33
|
-
mkdirp(dir: import("fs").PathLike): Promise<string | undefined>;
|
|
33
|
+
mkdirp(dir: import("node:fs").PathLike): Promise<string | undefined>;
|
|
34
34
|
walkDir(dir: string, recursive: boolean, callback: import("./fs.js").WalkDirCallback): Promise<string | null>;
|
|
35
|
-
access: typeof import("fs/promises").access;
|
|
36
|
-
appendFile: typeof import("fs/promises").appendFile;
|
|
37
|
-
chmod: typeof import("fs/promises").chmod;
|
|
38
|
-
close: typeof import("fs").close.__promisify__;
|
|
39
|
-
constants: typeof import("fs").constants;
|
|
40
|
-
createWriteStream: typeof import("fs").createWriteStream;
|
|
41
|
-
createReadStream: typeof import("fs").createReadStream;
|
|
42
|
-
lstat: typeof import("fs/promises").lstat;
|
|
43
|
-
open: typeof import("fs").open.__promisify__;
|
|
44
|
-
openFile: typeof import("fs/promises").open;
|
|
45
|
-
readdir: typeof import("fs/promises").readdir;
|
|
46
|
-
read: typeof import("fs").read.__promisify__;
|
|
47
|
-
readFile: typeof import("fs/promises").readFile;
|
|
48
|
-
readlink: typeof import("fs/promises").readlink;
|
|
49
|
-
realpath: typeof import("fs/promises").realpath;
|
|
50
|
-
rename: typeof import("fs/promises").rename;
|
|
51
|
-
stat: typeof import("fs/promises").stat;
|
|
52
|
-
symlink: typeof import("fs/promises").symlink;
|
|
53
|
-
unlink: typeof import("fs/promises").unlink;
|
|
54
|
-
write: typeof import("fs").write.__promisify__;
|
|
55
|
-
writeFile: typeof import("fs/promises").writeFile;
|
|
35
|
+
access: typeof import("node:fs/promises").access;
|
|
36
|
+
appendFile: typeof import("node:fs/promises").appendFile;
|
|
37
|
+
chmod: typeof import("node:fs/promises").chmod;
|
|
38
|
+
close: typeof import("node:fs").close.__promisify__;
|
|
39
|
+
constants: typeof import("node:fs").constants;
|
|
40
|
+
createWriteStream: typeof import("node:fs").createWriteStream;
|
|
41
|
+
createReadStream: typeof import("node:fs").createReadStream;
|
|
42
|
+
lstat: typeof import("node:fs/promises").lstat;
|
|
43
|
+
open: typeof import("node:fs").open.__promisify__;
|
|
44
|
+
openFile: typeof import("node:fs/promises").open;
|
|
45
|
+
readdir: typeof import("node:fs/promises").readdir;
|
|
46
|
+
read: typeof import("node:fs").read.__promisify__;
|
|
47
|
+
readFile: typeof import("node:fs/promises").readFile;
|
|
48
|
+
readlink: typeof import("node:fs/promises").readlink;
|
|
49
|
+
realpath: typeof import("node:fs/promises").realpath;
|
|
50
|
+
rename: typeof import("node:fs/promises").rename;
|
|
51
|
+
stat: typeof import("node:fs/promises").stat;
|
|
52
|
+
symlink: typeof import("node:fs/promises").symlink;
|
|
53
|
+
unlink: typeof import("node:fs/promises").unlink;
|
|
54
|
+
write: typeof import("node:fs").write.__promisify__;
|
|
55
|
+
writeFile: typeof import("node:fs/promises").writeFile;
|
|
56
56
|
};
|
|
57
57
|
plist: typeof plist;
|
|
58
58
|
logger: typeof logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move-operation.d.ts","sourceRoot":"","sources":["../../../lib/internal/move-operation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"move-operation.d.ts","sourceRoot":"","sources":["../../../lib/internal/move-operation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAGzC,oCAAoC;AACpC,MAAM,WAAW,SAAS;IACxB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,oFAAoF;AACpF,qBAAa,aAAa;IAEtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAHF,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,MAAM;IAG7B,yEAAyE;IACnE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAwBb,cAAc;YAcd,mBAAmB;YAiBnB,mBAAmB;YAmBnB,aAAa;YAsBb,4BAA4B;YAkB5B,iBAAiB;YAQjB,UAAU;CAqBzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { promises as fsPromises } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { isWindows } from './platform.js';
|
|
4
3
|
import { isSubPath } from './sub-path.js';
|
|
5
4
|
/** Encapsulates a move and its options, including recursive directory transfers. */
|
|
6
5
|
export class MoveOperation {
|
|
@@ -59,7 +58,9 @@ export class MoveOperation {
|
|
|
59
58
|
// File and symlink moves replace the destination entry itself.
|
|
60
59
|
let toStat;
|
|
61
60
|
try {
|
|
62
|
-
toStat =
|
|
61
|
+
toStat = fromStat.isDirectory()
|
|
62
|
+
? await fsPromises.stat(to, { bigint: true })
|
|
63
|
+
: await fsPromises.lstat(to, { bigint: true });
|
|
63
64
|
}
|
|
64
65
|
catch (err) {
|
|
65
66
|
if (!isErrnoException(err) || err.code !== 'ENOENT') {
|
|
@@ -72,12 +73,12 @@ export class MoveOperation {
|
|
|
72
73
|
const { from, to } = this;
|
|
73
74
|
const fromName = path.basename(from);
|
|
74
75
|
const toName = path.basename(to);
|
|
75
|
-
if (
|
|
76
|
-
fromName !== toName &&
|
|
76
|
+
if (fromName !== toName &&
|
|
77
77
|
fromName.toLowerCase() === toName.toLowerCase() &&
|
|
78
78
|
(await fsPromises.realpath(path.dirname(from))) === (await fsPromises.realpath(path.dirname(to)))) {
|
|
79
|
-
// Windows
|
|
80
|
-
// either path: rename changes the spelling, and cleanup would delete
|
|
79
|
+
// Case-insensitive volumes (Windows, macOS by default) preserve spelling even when names identify
|
|
80
|
+
// the same entry. Do not remove either path: rename changes the spelling, and cleanup would delete
|
|
81
|
+
// the renamed entry.
|
|
81
82
|
const toEntry = await fsPromises.lstat(to, { bigint: true });
|
|
82
83
|
if (fromStat.dev === toEntry.dev && fromStat.ino === toEntry.ino) {
|
|
83
84
|
await fsPromises.rename(from, to);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move-operation.js","sourceRoot":"","sources":["../../../lib/internal/move-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,QAAQ,IAAI,UAAU,EAAa,MAAM,SAAS,CAAC;AAC5F,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"move-operation.js","sourceRoot":"","sources":["../../../lib/internal/move-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,QAAQ,IAAI,UAAU,EAAa,MAAM,SAAS,CAAC;AAC5F,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAUxC,oFAAoF;AACpF,MAAM,OAAO,aAAa;IAEL;IACA;IACA;IACA;IAJnB,YACmB,IAAY,EACZ,EAAU,EACV,IAAe,EACf,EAAU;QAHV,SAAI,GAAJ,IAAI,CAAQ;QACZ,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAW;QACf,OAAE,GAAF,EAAE,CAAQ;IAC1B,CAAC;IAEJ,yEAAyE;IACzE,KAAK,CAAC,IAAI;QACR,MAAM,EAAC,IAAI,EAAE,EAAE,EAAC,GAAG,IAAI,CAAC;QACxB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACxD,mFAAmF;QACnF,IAAI,MAAM,IAAI,QAAQ,CAAC,GAAG,KAAK,MAAM,CAAC,GA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|
|
6
6
|
import {isUnicodeSupported, NullWritable, streamSupportsColor, stripAnsi} from './internal/index.js';
|
|
7
7
|
|
|
8
|
+
/** @deprecated Has no effect in recent Node.js versions. Will be removed in a future release. */
|
|
9
|
+
export type DeprecatedTextStyle = 'framed' | 'overlined';
|
|
10
|
+
|
|
8
11
|
/** ANSI styles supported by Node's `util.styleText`. `grey` is accepted as an alias for `gray`. */
|
|
9
12
|
export type TextStyle =
|
|
10
13
|
| 'reset'
|
|
@@ -35,20 +38,19 @@ export type TextStyle =
|
|
|
35
38
|
| 'bgMagenta'
|
|
36
39
|
| 'bgCyan'
|
|
37
40
|
| 'bgWhite'
|
|
38
|
-
| 'framed'
|
|
39
|
-
| 'overlined'
|
|
40
41
|
| 'redBright'
|
|
41
42
|
| 'greenBright'
|
|
42
43
|
| 'yellowBright'
|
|
43
44
|
| 'blueBright'
|
|
44
45
|
| 'magentaBright'
|
|
45
46
|
| 'cyanBright'
|
|
46
|
-
| 'whiteBright'
|
|
47
|
+
| 'whiteBright'
|
|
48
|
+
| DeprecatedTextStyle;
|
|
47
49
|
|
|
48
50
|
/** Applies terminal styling via Node's `util.styleText`. */
|
|
49
51
|
export function styleText(style: TextStyle, text: string): string {
|
|
50
52
|
const format = style === 'grey' ? 'gray' : style;
|
|
51
|
-
return nodeStyleText(format, text);
|
|
53
|
+
return nodeStyleText(format as Parameters<typeof nodeStyleText>[0], text);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/** Removes ANSI escape sequences (CSI and OSC) from a string. */
|