appium-uiautomator2-driver 8.7.1 → 8.7.3
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 +12 -0
- package/README.md +1 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts +12 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts.map +1 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js +33 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js.map +1 -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 +49 -12
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/driver.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js +2 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts +17 -6
- package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/middleware.js +11 -7
- package/node_modules/@appium/base-driver/build/lib/express/middleware.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/server.d.ts +1 -0
- package/node_modules/@appium/base-driver/build/lib/express/server.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/server.js +4 -3
- package/node_modules/@appium/base-driver/build/lib/express/server.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts +1 -2
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js +8 -3
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js.map +1 -1
- package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi-subscriptions.ts +36 -0
- package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi.ts +56 -12
- package/node_modules/@appium/base-driver/lib/basedriver/driver.ts +2 -0
- package/node_modules/@appium/base-driver/lib/express/middleware.ts +32 -12
- package/node_modules/@appium/base-driver/lib/express/server.ts +7 -2
- package/node_modules/@appium/base-driver/lib/protocol/bidi-commands.ts +9 -3
- package/node_modules/@appium/base-driver/node_modules/axios/CHANGELOG.md +1934 -0
- package/node_modules/@appium/base-driver/node_modules/axios/LICENSE +7 -0
- package/node_modules/@appium/base-driver/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/@appium/base-driver/node_modules/axios/README.md +2851 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.js +5807 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js +5 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/browser/axios.cjs +5829 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.js +5850 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js +3 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/@appium/base-driver/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/node_modules/@appium/base-driver/node_modules/axios/index.d.cts +766 -0
- package/node_modules/@appium/base-driver/node_modules/axios/index.d.ts +787 -0
- package/node_modules/@appium/base-driver/node_modules/axios/index.js +45 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/README.md +36 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/fetch.js +696 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/http.js +1490 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/xhr.js +277 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/axios.js +89 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CancelToken.js +135 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CanceledError.js +22 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/Axios.js +306 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosError.js +219 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/InterceptorManager.js +171 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/buildFullPath.js +76 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/dispatchRequest.js +95 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/mergeConfig.js +174 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/settle.js +27 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/index.js +178 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/transitional.js +10 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/env/data.js +1 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/bind.js +14 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/buildURL.js +69 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/combineURLs.js +23 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/composeSignals.js +68 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/cookies.js +64 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/spread.js +28 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/throttle.js +45 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toFormData.js +279 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/validator.js +112 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/index.js +13 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/index.js +7 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/index.js +37 -0
- package/node_modules/@appium/base-driver/node_modules/axios/lib/utils.js +1150 -0
- package/node_modules/@appium/base-driver/node_modules/axios/package.json +203 -0
- package/node_modules/@appium/base-driver/package.json +6 -6
- package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/npm.js +2 -1
- package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
- package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/util.js +13 -1
- package/node_modules/@appium/support/build/lib/util.js.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
- package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.js +193 -64
- package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
- package/node_modules/@appium/support/lib/npm.ts +2 -1
- package/node_modules/@appium/support/lib/util.ts +13 -1
- package/node_modules/@appium/support/lib/zip.ts +231 -71
- package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +1934 -0
- package/node_modules/@appium/support/node_modules/axios/LICENSE +7 -0
- package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/@appium/support/node_modules/axios/README.md +2851 -0
- package/node_modules/@appium/support/node_modules/axios/dist/axios.js +5807 -0
- package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +5 -0
- package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +5829 -0
- package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +5850 -0
- package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +3 -0
- package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/node_modules/@appium/support/node_modules/axios/index.d.cts +766 -0
- package/node_modules/@appium/support/node_modules/axios/index.d.ts +787 -0
- package/node_modules/@appium/support/node_modules/axios/index.js +45 -0
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +36 -0
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +696 -0
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +1490 -0
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +277 -0
- package/node_modules/@appium/support/node_modules/axios/lib/axios.js +89 -0
- package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +135 -0
- package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +22 -0
- package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +306 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +219 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +171 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +76 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +95 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +174 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +27 -0
- package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +178 -0
- package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +10 -0
- package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +1 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +14 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +69 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +23 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +68 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +64 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +28 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +45 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +279 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +112 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +13 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +7 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +37 -0
- package/node_modules/@appium/support/node_modules/axios/lib/utils.js +1150 -0
- package/node_modules/@appium/support/node_modules/axios/package.json +203 -0
- package/node_modules/@appium/support/package.json +6 -6
- package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
- package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
- package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
- package/node_modules/@appium/types/package.json +2 -2
- package/node_modules/appium-adb/CHANGELOG.md +14 -0
- package/node_modules/appium-adb/build/lib/tools/aab-utils.js +1 -1
- package/node_modules/appium-adb/build/lib/tools/aab-utils.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/apks-utils.js +1 -1
- package/node_modules/appium-adb/build/lib/tools/apks-utils.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.d.ts +8 -0
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.js +15 -14
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.js.map +1 -1
- package/node_modules/appium-adb/lib/tools/aab-utils.ts +1 -1
- package/node_modules/appium-adb/lib/tools/apks-utils.ts +1 -1
- package/node_modules/appium-adb/lib/tools/lockmgmt.ts +16 -17
- package/node_modules/appium-adb/package.json +4 -6
- package/node_modules/appium-chromedriver/CHANGELOG.md +22 -0
- package/node_modules/appium-chromedriver/config/mapping.json +1 -0
- package/node_modules/appium-chromedriver/package.json +4 -4
- package/node_modules/appium-uiautomator2-server/CHANGELOG.md +37 -0
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk +0 -0
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk.idsig +0 -0
- package/node_modules/appium-uiautomator2-server/apks/{appium-uiautomator2-server-v10.7.1.apk → appium-uiautomator2-server-v10.7.6.apk} +0 -0
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v10.7.6.apk.idsig +0 -0
- package/node_modules/appium-uiautomator2-server/package.json +3 -3
- package/node_modules/axios/README.md +41 -106
- package/node_modules/axios/dist/axios.js +931 -278
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +948 -268
- package/node_modules/axios/dist/esm/axios.js +948 -268
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +925 -242
- package/node_modules/axios/index.d.cts +20 -1
- package/node_modules/axios/index.d.ts +18 -1
- package/node_modules/axios/lib/adapters/fetch.js +73 -20
- package/node_modules/axios/lib/adapters/http.js +145 -26
- package/node_modules/axios/lib/adapters/xhr.js +120 -13
- package/node_modules/axios/lib/core/Axios.js +67 -12
- package/node_modules/axios/lib/core/AxiosError.js +59 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +17 -4
- package/node_modules/axios/lib/core/InterceptorManager.js +13 -2
- package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
- package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +20 -0
- package/node_modules/axios/lib/core/mergeConfig.js +183 -120
- package/node_modules/axios/lib/defaults/transitional.js +1 -0
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +11 -2
- package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -1
- package/node_modules/axios/lib/helpers/composeSignals.js +6 -3
- package/node_modules/axios/lib/helpers/cookies.js +30 -6
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +34 -7
- package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -1
- package/node_modules/axios/lib/helpers/fromDataURI.js +8 -2
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +4 -9
- package/node_modules/axios/lib/helpers/parseHeaders.js +2 -1
- package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
- package/node_modules/axios/lib/helpers/resolveConfig.js +16 -3
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +16 -1
- package/node_modules/axios/lib/utils.js +61 -10
- package/node_modules/axios/package.json +1 -2
- package/node_modules/body-parser/README.md +17 -13
- package/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/body-parser/package.json +7 -12
- package/node_modules/io.appium.settings/CHANGELOG.md +15 -0
- package/node_modules/io.appium.settings/README.md +8 -7
- package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
- package/node_modules/io.appium.settings/package.json +4 -4
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/CHANGELOG.md +45 -22
- package/node_modules/qs/README.md +26 -1
- package/node_modules/qs/dist/qs.js +27 -27
- package/node_modules/qs/eslint.config.mjs +61 -50
- package/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/qs/lib/parse.js +13 -6
- package/node_modules/qs/lib/stringify.js +5 -3
- package/node_modules/qs/lib/utils.js +15 -7
- package/node_modules/qs/package.json +6 -6
- package/node_modules/qs/test/parse.js +266 -2
- package/node_modules/qs/test/stringify.js +222 -0
- package/node_modules/qs/test/utils.js +61 -3
- package/node_modules/shell-quote/README.md +37 -4
- package/node_modules/shell-quote/package.json +10 -6
- package/node_modules/shell-quote/parse.d.ts +1 -1
- package/node_modules/shell-quote/parse.js +63 -11
- package/node_modules/shell-quote/quote.d.ts +2 -1
- package/node_modules/shell-quote/quote.js +23 -3
- package/node_modules/uuid/package.json +17 -17
- package/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/node_modules/xpath/package.json +1 -1
- package/node_modules/xpath/xpath.d.ts +59 -0
- package/package.json +5 -5
- package/node_modules/@appium/base-driver/node_modules/asyncbox/LICENSE +0 -203
- package/node_modules/@appium/base-driver/node_modules/asyncbox/README.md +0 -215
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.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/package.json +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.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/package.json +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/asyncbox.ts +0 -382
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/types.ts +0 -88
- package/node_modules/@appium/base-driver/node_modules/asyncbox/package.json +0 -74
- package/node_modules/@appium/support/node_modules/asyncbox/LICENSE +0 -203
- package/node_modules/@appium/support/node_modules/asyncbox/README.md +0 -215
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.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/package.json +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.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/package.json +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncbox.ts +0 -382
- package/node_modules/@appium/support/node_modules/asyncbox/lib/types.ts +0 -88
- package/node_modules/@appium/support/node_modules/asyncbox/package.json +0 -74
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v10.7.1.apk.idsig +0 -0
- package/node_modules/shell-quote/.nycrc +0 -14
- package/node_modules/shell-quote/eslint.config.mjs +0 -29
- package/node_modules/shell-quote/security.md +0 -11
- package/node_modules/shell-quote/test/comment.js +0 -16
- package/node_modules/shell-quote/test/env.js +0 -52
- package/node_modules/shell-quote/test/env_fn.js +0 -21
- package/node_modules/shell-quote/test/op.js +0 -102
- package/node_modules/shell-quote/test/parse.js +0 -149
- package/node_modules/shell-quote/test/quote.js +0 -145
- package/node_modules/shell-quote/test/set.js +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [8.7.3](https://github.com/appium/appium-uiautomator2-driver/compare/v8.7.2...v8.7.3) (2026-10-28)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* bump server to 10.7.6 to fix [#988](https://github.com/appium/appium-uiautomator2-driver/issues/988) ([#1071](https://github.com/appium/appium-uiautomator2-driver/issues/1071)) ([bf13583](https://github.com/appium/appium-uiautomator2-driver/commit/bf13583bbb4cc50722e83a8ca98427129b48fdfd))
|
|
6
|
+
|
|
7
|
+
## [8.7.2](https://github.com/appium/appium-uiautomator2-driver/compare/v8.7.1...v8.7.2) (2026-10-27)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* dummy new line to kick a release again ([#1068](https://github.com/appium/appium-uiautomator2-driver/issues/1068)) ([3ea9527](https://github.com/appium/appium-uiautomator2-driver/commit/3ea9527a462fef830e9487a44057cd72c117489e))
|
|
12
|
+
|
|
1
13
|
## [8.7.1](https://github.com/appium/appium-uiautomator2-driver/compare/v8.7.0...v8.7.1) (2026-10-26)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
package/README.md
CHANGED
package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type BidiSubscriptionDriver = {
|
|
2
|
+
bidiEventSubs: Record<string, string[]>;
|
|
3
|
+
};
|
|
4
|
+
type Subscriptions = Map<string, Map<string, string[]>>;
|
|
5
|
+
/** Get (or lazily create) the subscription registry of the given driver */
|
|
6
|
+
export declare function getSubscriptions(driver: object): Subscriptions;
|
|
7
|
+
/** Recompute `bidiEventSubs` as the union of all registered subscriptions */
|
|
8
|
+
export declare function refreshEventSubscriptions(driver: BidiSubscriptionDriver): void;
|
|
9
|
+
/** Forget all subscriptions, e.g. when the session ends */
|
|
10
|
+
export declare function clearBidiSubscriptions(driver: BidiSubscriptionDriver): void;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=bidi-subscriptions.d.ts.map
|
package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bidi-subscriptions.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi-subscriptions.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAAC,CAAC;AAGxE,KAAK,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAIxD,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAO9D;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAS9E;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAG3E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSubscriptions = getSubscriptions;
|
|
4
|
+
exports.refreshEventSubscriptions = refreshEventSubscriptions;
|
|
5
|
+
exports.clearBidiSubscriptions = clearBidiSubscriptions;
|
|
6
|
+
const support_1 = require("@appium/support");
|
|
7
|
+
const subscriptionsByDriver = new WeakMap();
|
|
8
|
+
/** Get (or lazily create) the subscription registry of the given driver */
|
|
9
|
+
function getSubscriptions(driver) {
|
|
10
|
+
let subscriptions = subscriptionsByDriver.get(driver);
|
|
11
|
+
if (!subscriptions) {
|
|
12
|
+
subscriptions = new Map();
|
|
13
|
+
subscriptionsByDriver.set(driver, subscriptions);
|
|
14
|
+
}
|
|
15
|
+
return subscriptions;
|
|
16
|
+
}
|
|
17
|
+
/** Recompute `bidiEventSubs` as the union of all registered subscriptions */
|
|
18
|
+
function refreshEventSubscriptions(driver) {
|
|
19
|
+
const events = new Map();
|
|
20
|
+
for (const subscription of getSubscriptions(driver).values()) {
|
|
21
|
+
for (const [event, contexts] of subscription) {
|
|
22
|
+
events.set(event, support_1.util.uniq([...(events.get(event) ?? []), ...contexts]));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// Object.fromEntries defines own properties, so names like '__proto__' stay safe
|
|
26
|
+
driver.bidiEventSubs = Object.fromEntries(events);
|
|
27
|
+
}
|
|
28
|
+
/** Forget all subscriptions, e.g. when the session ends */
|
|
29
|
+
function clearBidiSubscriptions(driver) {
|
|
30
|
+
subscriptionsByDriver.delete(driver);
|
|
31
|
+
driver.bidiEventSubs = {};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=bidi-subscriptions.js.map
|
package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bidi-subscriptions.js","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi-subscriptions.ts"],"names":[],"mappings":";;AAUA,4CAOC;AAGD,8DASC;AAGD,wDAGC;AAnCD,6CAAqC;AAOrC,MAAM,qBAA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M,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAgB,aAAa,EAAC,MAAM,eAAe,CAAC;AAO5E,OAAO,QAAQ,WAAW,CAAC;IAEzB,UAAU,UAAU,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,aAAa;KAAG;CACrE"}
|
|
@@ -1,25 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const support_1 = require("@appium/support");
|
|
4
|
+
const errors_1 = require("../../protocol/errors");
|
|
5
|
+
const bidi_subscriptions_1 = require("./bidi-subscriptions");
|
|
4
6
|
const mixin_1 = require("./mixin");
|
|
7
|
+
function assertStringList(value, name) {
|
|
8
|
+
if (!Array.isArray(value) || !value.length || value.some((item) => typeof item !== 'string' || !item.length)) {
|
|
9
|
+
throw new errors_1.errors.InvalidArgumentError(`${name} must be a non-empty array of non-empty strings`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function assertContexts(value) {
|
|
13
|
+
if (!Array.isArray(value) || value.some((context) => typeof context !== 'string')) {
|
|
14
|
+
throw new errors_1.errors.InvalidArgumentError('contexts must be an array of strings');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
5
17
|
const BidiCommands = {
|
|
6
18
|
async bidiSubscribe(events, contexts = ['']) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
assertStringList(events, 'events');
|
|
20
|
+
assertContexts(contexts);
|
|
21
|
+
const subscription = support_1.util.uuidV4();
|
|
22
|
+
(0, bidi_subscriptions_1.getSubscriptions)(this).set(subscription, new Map(events.map((event) => [event, [...contexts]])));
|
|
23
|
+
(0, bidi_subscriptions_1.refreshEventSubscriptions)(this);
|
|
24
|
+
return { subscription };
|
|
12
25
|
},
|
|
13
|
-
async bidiUnsubscribe(events, contexts
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
async bidiUnsubscribe(events, contexts, subscriptions) {
|
|
27
|
+
const registered = (0, bidi_subscriptions_1.getSubscriptions)(this);
|
|
28
|
+
if (subscriptions === undefined) {
|
|
29
|
+
const contextsToRemove = contexts ?? [''];
|
|
30
|
+
assertStringList(events, 'events');
|
|
31
|
+
assertContexts(contextsToRemove);
|
|
32
|
+
for (const subscription of registered.values()) {
|
|
33
|
+
for (const event of events) {
|
|
34
|
+
const remaining = subscription.get(event)?.filter((c) => !contextsToRemove.includes(c));
|
|
35
|
+
if (remaining?.length) {
|
|
36
|
+
subscription.set(event, remaining);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
subscription.delete(event);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
17
42
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
43
|
+
(0, bidi_subscriptions_1.refreshEventSubscriptions)(this);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
assertStringList(subscriptions, 'subscriptions');
|
|
47
|
+
if (events !== undefined || contexts !== undefined) {
|
|
48
|
+
throw new errors_1.errors.InvalidArgumentError('subscriptions cannot be combined with events or contexts');
|
|
49
|
+
}
|
|
50
|
+
// validate everything before removing anything
|
|
51
|
+
for (const id of subscriptions) {
|
|
52
|
+
if (!registered.has(id)) {
|
|
53
|
+
throw new errors_1.errors.InvalidArgumentError(`Unknown subscription id: ${id}`);
|
|
21
54
|
}
|
|
22
55
|
}
|
|
56
|
+
for (const id of subscriptions) {
|
|
57
|
+
registered.delete(id);
|
|
58
|
+
}
|
|
59
|
+
(0, bidi_subscriptions_1.refreshEventSubscriptions)(this);
|
|
23
60
|
},
|
|
24
61
|
async bidiStatus() {
|
|
25
62
|
const result = await this.getStatus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi.js","sourceRoot":"","sources":["../../../../lib/basedriver/commands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AAe,UAAU,CAAC"}
|
|
@@ -46,6 +46,7 @@ const session_1 = require("../helpers/session");
|
|
|
46
46
|
const protocol_1 = require("../protocol");
|
|
47
47
|
const utils_1 = require("../utils");
|
|
48
48
|
const capabilities_2 = require("./capabilities");
|
|
49
|
+
const bidi_subscriptions_1 = require("./commands/bidi-subscriptions");
|
|
49
50
|
const core_1 = require("./core");
|
|
50
51
|
const helpers = __importStar(require("./helpers"));
|
|
51
52
|
const EVENT_SESSION_INIT = 'newSessionRequested';
|
|
@@ -330,6 +331,7 @@ class BaseDriver extends core_1.DriverCore {
|
|
|
330
331
|
}
|
|
331
332
|
}
|
|
332
333
|
this.sessionId = null;
|
|
334
|
+
(0, bidi_subscriptions_1.clearBidiSubscriptions)(this);
|
|
333
335
|
}
|
|
334
336
|
logExtraCaps(caps) {
|
|
335
337
|
const knownCaps = Object.keys(this._desiredCapConstraints);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../../lib/basedriver/driver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,yCAiBuB;AAGvB,0DAA2D;AAC3D,8EAA8E;AAC9E,oEAAsE;AACtE,gDAAiD;AACjD,0CAA8E;AAC9E,oCAA2C;AAC3C,iDAAiE;AACjE,iCAAkC;AAClC,mDAAqC;AAIrC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AACjD,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAChD,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AACxD,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AACtD,MAAM,4BAA4B,GAAG,sBAAsB,CAAC;AAE5D,MAAa,UAQX,SAAQ,iBAAuB;IAG/B,OAAO,CAAqB;IAC5B,IAAI,CAAgB;IACpB,YAAY,CAAoB;IAChC,qBAAqB,CAAK;IAC1B,MAAM,CAAgB;IACtB,UAAU,CAAU;IACpB,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AAC,sBAAsB,CAC/B,8CAA8C,GAAG,wBAAwB,QAAQ,CAAC,OAAO,EAAE,EAC3F,QAAQ,CACT,CACF,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAqB;QACxC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,mDAAmD,CAAC,CAAC;QACzF,CAAC;QACD,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,gDAAgD,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,CAAC;CACF;AAtZD,gCAsZC;AAED,6CAA2B;AAE3B,kBAAe,UAAU,CAAC"}
|
|
@@ -25,24 +25,35 @@ export declare function handleLogContext(req: Request, _res: Response, next: Nex
|
|
|
25
25
|
* Ensures requests default to JSON content-type when none is provided.
|
|
26
26
|
*/
|
|
27
27
|
export declare function defaultToJSONContentType(req: Request, _res: Response, next: NextFunction): void;
|
|
28
|
+
/** Options for {@linkcode tryHandleWebSocketUpgrade} */
|
|
29
|
+
export interface WebSocketUpgradeOpts {
|
|
30
|
+
/** Incoming HTTP request */
|
|
31
|
+
req: IncomingMessage;
|
|
32
|
+
/** Network socket */
|
|
33
|
+
socket: Duplex;
|
|
34
|
+
/** First packet of the upgraded stream */
|
|
35
|
+
head: Buffer;
|
|
36
|
+
/** Path-to-WebSocket-server mapping */
|
|
37
|
+
webSocketsMapping: StringRecord<WSServer>;
|
|
38
|
+
/** Whether upgrades carrying an `Origin` header are accepted */
|
|
39
|
+
allowCors?: boolean;
|
|
40
|
+
}
|
|
28
41
|
/**
|
|
29
42
|
* Attempts to handle a WebSocket upgrade by matching the request path against registered handlers.
|
|
30
43
|
*
|
|
31
|
-
* @param
|
|
32
|
-
* @param socket - Network socket
|
|
33
|
-
* @param head - First packet of the upgraded stream
|
|
34
|
-
* @param webSocketsMapping - Path-to-WebSocket-server mapping
|
|
44
|
+
* @param opts - Upgrade options
|
|
35
45
|
* @returns `true` if the upgrade was handled; `false` otherwise
|
|
36
46
|
*/
|
|
37
|
-
export declare function tryHandleWebSocketUpgrade(req
|
|
47
|
+
export declare function tryHandleWebSocketUpgrade({ req, socket, head, webSocketsMapping, allowCors, }: WebSocketUpgradeOpts): boolean;
|
|
38
48
|
/**
|
|
39
49
|
* Express middleware wrapper around {@link tryHandleWebSocketUpgrade}.
|
|
40
50
|
* Delegates WebSocket upgrades to the mapping and falls through to `next()` otherwise.
|
|
41
51
|
*
|
|
42
52
|
* @param webSocketsMapping - Path-to-WebSocket-server mapping
|
|
53
|
+
* @param allowCors - Whether upgrades carrying an `Origin` header are accepted
|
|
43
54
|
* @returns Express request handler
|
|
44
55
|
*/
|
|
45
|
-
export declare function handleUpgrade(webSocketsMapping: StringRecord<WSServer
|
|
56
|
+
export declare function handleUpgrade(webSocketsMapping: StringRecord<WSServer>, allowCors?: boolean): RequestHandler;
|
|
46
57
|
/**
|
|
47
58
|
* Final error-handling middleware.
|
|
48
59
|
* Logs uncaught errors and returns a W3C-formatted error response unless headers were already sent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../lib/express/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGxC,OAAO,KAAK,EAAC,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,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;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAiBvF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAK/F;AAED,wDAAwD;AACxD,MAAM,WAAW,oBAAoB;IACnC,4BAA4B;IAC5B,GAAG,EAAE,eAAe,CAAC;IACrB,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,iBAAiB,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC1C,gEAAgE;IAChE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,GAAG,EACH,MAAM,EACN,IAAI,EACJ,iBAAiB,EACjB,SAAiB,GAClB,EAAE,oBAAoB,GAAG,OAAO,CA4BhC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,iBAAiB,EAAE,YAAY,CAAC,QAAQ,CAAC,EAAE,SAAS,UAAQ,GAAG,cAAc,CAS1G;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAWlG;AAUD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAIjE"}
|
|
@@ -80,16 +80,19 @@ function defaultToJSONContentType(req, _res, next) {
|
|
|
80
80
|
/**
|
|
81
81
|
* Attempts to handle a WebSocket upgrade by matching the request path against registered handlers.
|
|
82
82
|
*
|
|
83
|
-
* @param
|
|
84
|
-
* @param socket - Network socket
|
|
85
|
-
* @param head - First packet of the upgraded stream
|
|
86
|
-
* @param webSocketsMapping - Path-to-WebSocket-server mapping
|
|
83
|
+
* @param opts - Upgrade options
|
|
87
84
|
* @returns `true` if the upgrade was handled; `false` otherwise
|
|
88
85
|
*/
|
|
89
|
-
function tryHandleWebSocketUpgrade(req, socket, head, webSocketsMapping) {
|
|
86
|
+
function tryHandleWebSocketUpgrade({ req, socket, head, webSocketsMapping, allowCors = false, }) {
|
|
90
87
|
if (String(req.headers?.upgrade ?? '').toLowerCase() !== 'websocket') {
|
|
91
88
|
return false;
|
|
92
89
|
}
|
|
90
|
+
// WebSocket handshakes are not subject to the Same-Origin Policy; browsers always send Origin
|
|
91
|
+
if (!allowCors && req.headers.origin !== undefined) {
|
|
92
|
+
logger_1.log.warn(`Rejecting the WebSocket upgrade from the browser origin '${req.headers.origin}'`);
|
|
93
|
+
socket.end('HTTP/1.1 403 Forbidden\r\nConnection: close\r\nContent-Length: 0\r\n\r\n');
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
93
96
|
let currentPathname;
|
|
94
97
|
try {
|
|
95
98
|
currentPathname = new URL(req.url ?? '', 'http://localhost').pathname;
|
|
@@ -113,11 +116,12 @@ function tryHandleWebSocketUpgrade(req, socket, head, webSocketsMapping) {
|
|
|
113
116
|
* Delegates WebSocket upgrades to the mapping and falls through to `next()` otherwise.
|
|
114
117
|
*
|
|
115
118
|
* @param webSocketsMapping - Path-to-WebSocket-server mapping
|
|
119
|
+
* @param allowCors - Whether upgrades carrying an `Origin` header are accepted
|
|
116
120
|
* @returns Express request handler
|
|
117
121
|
*/
|
|
118
|
-
function handleUpgrade(webSocketsMapping) {
|
|
122
|
+
function handleUpgrade(webSocketsMapping, allowCors = false) {
|
|
119
123
|
function handleUpgradeMiddleware(req, res, next) {
|
|
120
|
-
if (tryHandleWebSocketUpgrade(req, req.socket, Buffer.from(''), webSocketsMapping)) {
|
|
124
|
+
if (tryHandleWebSocketUpgrade({ req, socket: req.socket, head: Buffer.from(''), webSocketsMapping, allowCors })) {
|
|
121
125
|
return;
|
|
122
126
|
}
|
|
123
127
|
next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../lib/express/middleware.ts"],"names":[],"mappings":";;;AAqBA,4CAaC;AASD,oEAeC;AAMD,4CAiBC;AAKD,4DAKC;
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../lib/express/middleware.ts"],"names":[],"mappings":";;;AAqBA,4CAaC;AASD,oEAeC;AAMD,4CAiBC;AAKD,4DAKC;AAsBD,8DAkCC;AAUD,sCASC;AAMD,0CAWC;AAcD,0CAIC;AAtMD,6CAAqC;AAGrC,0CAAmC;AACnC,qCAA6B;AAC7B,6CAAgD;AAAxC,gHAAA,iBAAiB,OAAA;AAEzB,mDAAqC;AAErC,gDAAiD;AACjD,+CAA0D;AAE1D,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEhD;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;IAC9E,GAAG,CAAC,MAAM,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;IAC/C,GAAG,CAAC,MAAM,CAAC,8BAA8B,EAAE,iCAAiC,CAAC,CAAC;IAC9E,GAAG,CAAC,MAAM,CACR,8BAA8B,EAC9B,mFAAmF,CACpF,CAAC;IAEF,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC7B,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACpB,OAAO;IACT,CAAC;IACD,IAAI,EAAE,CAAC;AACT,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,4BAA4B,CAAC,QAAgB;IAC3D,SAAS,mCAAmC,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;QAC1F,MAAM,0BAA0B,GAAG,IAAI,MAAM,CAC3C,IAAI,cAAI,CAAC,YAAY,CAAC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,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,iBAAiB,CAAC,EAAE,YAAY,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,+FAA+F;IAC/F,WAAW,EAAE,MAAM,CAAC;CACrB;AAQD,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAuEpE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAmD/D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAe1D"}
|
|
@@ -38,6 +38,7 @@ async function server(opts) {
|
|
|
38
38
|
const appiumServer = configureHttp({
|
|
39
39
|
httpServer,
|
|
40
40
|
reject,
|
|
41
|
+
allowCors,
|
|
41
42
|
keepAliveTimeout,
|
|
42
43
|
gracefulShutdownTimeout: cliArgs.shutdownTimeout,
|
|
43
44
|
});
|
|
@@ -99,7 +100,7 @@ function configureServer(opts) {
|
|
|
99
100
|
// When shouldUpgradeCallback is available, upgrades are handled directly on the HTTP server
|
|
100
101
|
// to avoid Express middleware timeout issues with long-lived connections
|
|
101
102
|
if (useLegacyUpgradeHandler) {
|
|
102
|
-
app.use((0, middleware_1.handleUpgrade)(webSocketsMapping));
|
|
103
|
+
app.use((0, middleware_1.handleUpgrade)(webSocketsMapping, allowCors));
|
|
103
104
|
}
|
|
104
105
|
if (allowCors) {
|
|
105
106
|
app.use(middleware_1.allowCrossDomain);
|
|
@@ -178,7 +179,7 @@ async function createServer(app, cliArgs) {
|
|
|
178
179
|
* @param opts - Configuration options
|
|
179
180
|
* @returns The same server instance typed as AppiumServer
|
|
180
181
|
*/
|
|
181
|
-
function configureHttp({ httpServer, reject, keepAliveTimeout, gracefulShutdownTimeout, }) {
|
|
182
|
+
function configureHttp({ httpServer, reject, allowCors, keepAliveTimeout, gracefulShutdownTimeout, }) {
|
|
182
183
|
const appiumServer = httpServer;
|
|
183
184
|
appiumServer.webSocketsMapping = {};
|
|
184
185
|
appiumServer.frontRouter = express_1.default.Router();
|
|
@@ -196,7 +197,7 @@ function configureHttp({ httpServer, reject, keepAliveTimeout, gracefulShutdownT
|
|
|
196
197
|
// shouldUpgradeCallback only returns a boolean to indicate if the upgrade should proceed
|
|
197
198
|
appiumServer.shouldUpgradeCallback = (req) => String(req.headers?.upgrade ?? '').toLowerCase() === 'websocket';
|
|
198
199
|
appiumServer.on('upgrade', (req, socket, head) => {
|
|
199
|
-
if (!(0, middleware_1.tryHandleWebSocketUpgrade)(req, socket, head, appiumServer.webSocketsMapping)) {
|
|
200
|
+
if (!(0, middleware_1.tryHandleWebSocketUpgrade)({ req, socket, head, webSocketsMapping: appiumServer.webSocketsMapping, allowCors })) {
|
|
200
201
|
socket.destroy();
|
|
201
202
|
}
|
|
202
203
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../lib/express/server.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../lib/express/server.ts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AC"}
|
|
@@ -10,8 +10,7 @@ export declare const BIDI_COMMANDS: {
|
|
|
10
10
|
readonly unsubscribe: {
|
|
11
11
|
readonly command: "bidiUnsubscribe";
|
|
12
12
|
readonly params: {
|
|
13
|
-
readonly
|
|
14
|
-
readonly optional: readonly ["contexts"];
|
|
13
|
+
readonly optional: readonly ["events", "contexts", "subscriptions"];
|
|
15
14
|
};
|
|
16
15
|
};
|
|
17
16
|
readonly status: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi-commands.d.ts","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bidi-commands.d.ts","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBQ,CAAC"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BIDI_COMMANDS = void 0;
|
|
4
|
-
const
|
|
4
|
+
const SUBSCRIBE_PARAMS = {
|
|
5
5
|
required: ['events'],
|
|
6
6
|
optional: ['contexts'],
|
|
7
7
|
};
|
|
8
|
+
// `subscriptions` and `events` are alternative spec forms; `contexts` is a non-standard
|
|
9
|
+
// addition to `events`. `subscriptions` excludes the others, which bidiUnsubscribe validates.
|
|
10
|
+
const UNSUBSCRIBE_PARAMS = {
|
|
11
|
+
optional: ['events', 'contexts', 'subscriptions'],
|
|
12
|
+
};
|
|
8
13
|
exports.BIDI_COMMANDS = {
|
|
9
14
|
session: {
|
|
10
15
|
subscribe: {
|
|
11
16
|
command: 'bidiSubscribe',
|
|
12
|
-
params:
|
|
17
|
+
params: SUBSCRIBE_PARAMS,
|
|
13
18
|
},
|
|
14
19
|
unsubscribe: {
|
|
15
20
|
command: 'bidiUnsubscribe',
|
|
16
|
-
params:
|
|
21
|
+
params: UNSUBSCRIBE_PARAMS,
|
|
17
22
|
},
|
|
18
23
|
status: {
|
|
19
24
|
command: 'bidiStatus',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi-commands.js","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":";;;AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"bidi-commands.js","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACd,CAAC;AAEX,wFAAwF;AACxF,8FAA8F;AAC9F,MAAM,kBAAkB,GAAG;IACzB,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC;CACzC,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,SAAS,EAAE;YACT,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,gBAAgB;SACzB;QACD,WAAW,EAAE;YACX,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,kBAAkB;SAC3B;QACD,MAAM,EAAE;YACN,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE,EAAE;SACX;KACF;IACD,eAAe,EAAE;QACf,QAAQ,EAAE;YACR,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE;gBACN,QAAQ,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;gBAC5B,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF;KACF;CAC+B,CAAC;AAEnC,8CAA8C;AAC9C,mDAAmD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {util} from '@appium/support';
|
|
2
|
+
|
|
3
|
+
type BidiSubscriptionDriver = {bidiEventSubs: Record<string, string[]>};
|
|
4
|
+
|
|
5
|
+
// subscription id -> event name -> contexts; kept per id so removing one keeps overlapping ones
|
|
6
|
+
type Subscriptions = Map<string, Map<string, string[]>>;
|
|
7
|
+
|
|
8
|
+
const subscriptionsByDriver = new WeakMap<object, Subscriptions>();
|
|
9
|
+
|
|
10
|
+
/** Get (or lazily create) the subscription registry of the given driver */
|
|
11
|
+
export function getSubscriptions(driver: object): Subscriptions {
|
|
12
|
+
let subscriptions = subscriptionsByDriver.get(driver);
|
|
13
|
+
if (!subscriptions) {
|
|
14
|
+
subscriptions = new Map();
|
|
15
|
+
subscriptionsByDriver.set(driver, subscriptions);
|
|
16
|
+
}
|
|
17
|
+
return subscriptions;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Recompute `bidiEventSubs` as the union of all registered subscriptions */
|
|
21
|
+
export function refreshEventSubscriptions(driver: BidiSubscriptionDriver): void {
|
|
22
|
+
const events = new Map<string, string[]>();
|
|
23
|
+
for (const subscription of getSubscriptions(driver).values()) {
|
|
24
|
+
for (const [event, contexts] of subscription) {
|
|
25
|
+
events.set(event, util.uniq([...(events.get(event) ?? []), ...contexts]));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// Object.fromEntries defines own properties, so names like '__proto__' stay safe
|
|
29
|
+
driver.bidiEventSubs = Object.fromEntries(events);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Forget all subscriptions, e.g. when the session ends */
|
|
33
|
+
export function clearBidiSubscriptions(driver: BidiSubscriptionDriver): void {
|
|
34
|
+
subscriptionsByDriver.delete(driver);
|
|
35
|
+
driver.bidiEventSubs = {};
|
|
36
|
+
}
|