appium-mac2-driver 4.4.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/WebDriverAgentMac/IntegrationTests/AMWindowTests.m +427 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Commands/AMWindowCommands.m +63 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Commands/FBDebugCommands.m +2 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBCommandStatus.h +3 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBCommandStatus.m +13 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMScreenUtils.h +4 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMScreenUtils.m +23 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMSnapshotUtils.h +18 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMSnapshotUtils.m +43 -28
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMWindowUtils.h +111 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMWindowUtils.m +780 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMXCTAccessibility.h +61 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMXCTAccessibility.m +108 -0
- package/WebDriverAgentMac/WebDriverAgentMac.xcodeproj/project.pbxproj +20 -0
- package/build/lib/commands/native-record-screen.d.ts +2 -0
- package/build/lib/commands/native-record-screen.d.ts.map +1 -1
- package/build/lib/commands/native-record-screen.js.map +1 -1
- package/build/lib/commands/windows.d.ts +22 -0
- package/build/lib/commands/windows.d.ts.map +1 -0
- package/build/lib/commands/windows.js +32 -0
- package/build/lib/commands/windows.js.map +1 -0
- package/build/lib/driver.d.ts +12 -0
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +3 -0
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +9 -0
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +9 -0
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/session-claim-handler.d.ts.map +1 -1
- package/build/lib/session-claim-handler.js +1 -2
- package/build/lib/session-claim-handler.js.map +1 -1
- package/build/lib/types.d.ts +26 -0
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/wda-mac.d.ts +0 -1
- package/build/lib/wda-mac.d.ts.map +1 -1
- package/build/lib/wda-mac.js +1 -1
- package/lib/commands/native-record-screen.ts +2 -0
- package/lib/commands/windows.ts +44 -0
- package/lib/driver.ts +4 -0
- package/lib/execute-method-map.ts +9 -0
- package/lib/session-claim-handler.ts +1 -2
- package/lib/types.ts +28 -0
- package/lib/wda-mac.ts +1 -2
- 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-xcode/CHANGELOG.md +7 -0
- package/node_modules/appium-xcode/package.json +4 -4
- package/node_modules/asyncbox/README.md +43 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +9 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +35 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +9 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.js +23 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.d.ts +9 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.js +20 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
- package/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/index.js +24 -0
- package/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.d.ts +74 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.js +295 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +15 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.d.ts +17 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +20 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.js +61 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +18 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +51 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +16 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.js +45 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.js +32 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +9 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.js +20 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/errors.d.ts +9 -0
- package/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/errors.js +15 -0
- package/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
- package/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/index.js +10 -0
- package/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/lock.d.ts +74 -0
- package/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/lock.js +291 -0
- package/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.js +33 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/retry.d.ts +17 -0
- package/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/retry.js +53 -0
- package/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.d.ts +20 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.js +58 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +48 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +16 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.js +42 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
- package/node_modules/asyncbox/lib/asyncfilter.ts +38 -0
- package/node_modules/asyncbox/lib/asyncmap.ts +29 -0
- package/node_modules/asyncbox/lib/errors.ts +15 -0
- package/node_modules/asyncbox/lib/index.ts +21 -0
- package/node_modules/asyncbox/lib/limit-function.ts +18 -0
- package/node_modules/asyncbox/lib/lock.ts +360 -0
- package/node_modules/asyncbox/lib/long-sleep.ts +38 -0
- package/node_modules/asyncbox/lib/retry.ts +61 -0
- package/node_modules/asyncbox/lib/sleep.ts +79 -0
- package/node_modules/asyncbox/lib/wait-for-condition.ts +52 -0
- package/node_modules/asyncbox/lib/with-timeout.ts +43 -0
- package/node_modules/asyncbox/package.json +8 -8
- 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/bare-url/README.md +4 -0
- package/node_modules/bare-url/index.d.ts +3 -0
- package/node_modules/bare-url/index.js +42 -18
- package/node_modules/bare-url/lib/errors.js +4 -0
- package/node_modules/bare-url/package.json +1 -1
- package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/follow-redirects/README.md +27 -1
- package/node_modules/follow-redirects/index.js +1 -5
- package/node_modules/follow-redirects/package.json +1 -1
- 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/package.json +6 -7
- package/scripts/setup-accessibility.mjs +175 -0
- package/node_modules/async-lock/AUTHORS +0 -21
- package/node_modules/async-lock/History.md +0 -132
- package/node_modules/async-lock/LICENSE +0 -22
- package/node_modules/async-lock/README.md +0 -177
- package/node_modules/async-lock/index.js +0 -2
- package/node_modules/async-lock/lib/index.js +0 -312
- package/node_modules/async-lock/package.json +0 -48
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
- package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
- package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
- package/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
- package/node_modules/asyncbox/lib/asyncbox.ts +0 -382
- 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
|
@@ -8,24 +8,31 @@
|
|
|
8
8
|
* ParseEntry,
|
|
9
9
|
* } from './parse' */
|
|
10
10
|
|
|
11
|
-
// '<('
|
|
11
|
+
// '<(' and '>(' are process substitution operators and
|
|
12
12
|
// can be parsed the same as control operator
|
|
13
13
|
var CONTROL = /** @type {const} */ ('(?:') + /** @type {const} */ ([
|
|
14
14
|
'\\|\\|',
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
15
|
+
'\\&(?:\\&|>>?)', // `&&`, `&>`, and `&>>`
|
|
16
|
+
';;\\&?', // `;;` and `;;&`
|
|
17
|
+
'[;|]\\&', // `;&` and `|&`
|
|
18
18
|
'\\<\\(',
|
|
19
19
|
'\\<\\<\\<',
|
|
20
|
+
'\\<\\<-',
|
|
21
|
+
'\\<\\<(?!\\()', // `<<(` stays `<` and `<(`, as zsh reads it; other shells reject it
|
|
20
22
|
'>>',
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
+
'>[&|(]', // `>&`, `>|`, and `>(`
|
|
24
|
+
'<[&>]', // `<&` and `<>`
|
|
23
25
|
'[&;()|<>]'
|
|
24
26
|
]).join(/** @type {const} */ ('|')) + /** @type {const} */ (')');
|
|
25
27
|
var controlRE = new RegExp('^' + CONTROL + '$');
|
|
26
28
|
var META = /** @type {const} */ ('|&;()<> \\t');
|
|
27
29
|
var SINGLE_QUOTE = /** @type {const} */ ('\'([^\']*?)\'');
|
|
28
|
-
|
|
30
|
+
// bash ANSI-C quoting, `$'...'`: a backslash escapes the next character, including `'`
|
|
31
|
+
var ANSI_C_BODY = '(?:\\\\[\\s\\S]|[^\\\\\'])*?';
|
|
32
|
+
var ANSI_C_QUOTE = '\\$\'' + ANSI_C_BODY + '\'';
|
|
33
|
+
var ansiCAt = new RegExp('\\$\'' + ANSI_C_BODY + '(?:(\')|\\\\?$)', 'g');
|
|
34
|
+
var ANSI_C_LETTERS = 'abeEfnrtv';
|
|
35
|
+
var ANSI_C_CHARS = '\x07\b\x1B\x1B\f\n\r\t\v';
|
|
29
36
|
var hash = /^#$/;
|
|
30
37
|
|
|
31
38
|
var SQ = /** @type {const} */ ("'");
|
|
@@ -80,6 +87,46 @@ function getVar(env, pre, key) {
|
|
|
80
87
|
return pre + r;
|
|
81
88
|
}
|
|
82
89
|
|
|
90
|
+
var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @param {string} m
|
|
94
|
+
* @param {string} escape
|
|
95
|
+
*/
|
|
96
|
+
function expandAnsiCEscape(m, escape) {
|
|
97
|
+
var kind = escape.charAt(0);
|
|
98
|
+
if (kind === 'c') {
|
|
99
|
+
var ctrl = escape.charAt(1);
|
|
100
|
+
return ctrl === '?' ? '\x7F' : String.fromCharCode(ctrl.charCodeAt(0) & 0x1F);
|
|
101
|
+
}
|
|
102
|
+
if (kind === 'x' || kind === 'u' || kind === 'U') {
|
|
103
|
+
var cp = parseInt(escape.slice(1), 16);
|
|
104
|
+
if (cp > 0x10FFFF) {
|
|
105
|
+
return m;
|
|
106
|
+
}
|
|
107
|
+
return String.fromCharCode.apply(null, cp > 0xFFFF ? [0xD7C0 + (cp >> 10), 0xDC00 + (cp & 0x3FF)] : [cp]);
|
|
108
|
+
}
|
|
109
|
+
if (kind >= '0' && kind <= '7') {
|
|
110
|
+
return String.fromCharCode(parseInt(escape, 8) & 0xFF);
|
|
111
|
+
}
|
|
112
|
+
var letter = ANSI_C_LETTERS.indexOf(escape);
|
|
113
|
+
return letter < 0 ? escape : ANSI_C_CHARS.charAt(letter);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @param {string} body */
|
|
117
|
+
function expandAnsiC(body) {
|
|
118
|
+
return body.replace(ansiCEscape, expandAnsiCEscape).split('\0')[0]; // like bash, a NUL ends the string
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @param {string} s
|
|
123
|
+
* @param {number} i
|
|
124
|
+
*/
|
|
125
|
+
function closesAnsiC(s, i) {
|
|
126
|
+
ansiCAt.lastIndex = i;
|
|
127
|
+
return !!(/** @type {RegExpExecArray} */ (ansiCAt.exec(s)))[1];
|
|
128
|
+
}
|
|
129
|
+
|
|
83
130
|
/**
|
|
84
131
|
* @param {string} string
|
|
85
132
|
* @param {Env} [env]
|
|
@@ -92,11 +139,12 @@ function parseInternal(string, env, opts) {
|
|
|
92
139
|
}
|
|
93
140
|
var BS = opts.escape || '\\';
|
|
94
141
|
var ifs = opts.splitUnquoted === true ? ' \t\n' : (typeof opts.splitUnquoted === 'string' ? opts.splitUnquoted : '');
|
|
95
|
-
var BAREWORD = '(\\' + BS + '[\'"' + META + ']|[^\\s\'"' + META + '])+';
|
|
142
|
+
var BAREWORD = '(\\' + BS + '[\'"$\\' + BS + META + ']|\\$\\$|\\$(?!' + ANSI_C_QUOTE.slice(2) + ')|[^\\s\'"$' + META + '])+';
|
|
143
|
+
var DOUBLE_QUOTE = '"(?:\\' + BS + '[\\s\\S]|[^"\\' + BS + '])*"';
|
|
96
144
|
|
|
97
145
|
var chunker = new RegExp([
|
|
98
146
|
'(' + CONTROL + ')', // control chars
|
|
99
|
-
'(' + BAREWORD + '|' + DOUBLE_QUOTE + '|' + SINGLE_QUOTE + ')+'
|
|
147
|
+
'(' + ANSI_C_QUOTE + '|' + BAREWORD + '|' + DOUBLE_QUOTE + '|' + SINGLE_QUOTE + ')+'
|
|
100
148
|
].join('|'), 'g');
|
|
101
149
|
|
|
102
150
|
var matches = matchAll(string, chunker);
|
|
@@ -173,9 +221,8 @@ function parseInternal(string, env, opts) {
|
|
|
173
221
|
varend -= 1;
|
|
174
222
|
varname = s.slice(i, varend);
|
|
175
223
|
i = varend;
|
|
176
|
-
} else if ((/[
|
|
224
|
+
} else if ((/[*@#?$!-]/).test(char)) {
|
|
177
225
|
varname = char;
|
|
178
|
-
i += 1;
|
|
179
226
|
} else {
|
|
180
227
|
var slicedFromI = s.slice(i);
|
|
181
228
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
@@ -252,6 +299,11 @@ function parseInternal(string, env, opts) {
|
|
|
252
299
|
return /** @type {const} */ ([commentObj]);
|
|
253
300
|
} else if (c === BS) {
|
|
254
301
|
esc = true;
|
|
302
|
+
} else if (c === DS && s.charAt(i + 1) === SQ && closesAnsiC(s, i)) {
|
|
303
|
+
flushRun();
|
|
304
|
+
sawQuote = true;
|
|
305
|
+
out += expandAnsiC(s.slice(i + 2, ansiCAt.lastIndex - 1));
|
|
306
|
+
i = ansiCAt.lastIndex - 1;
|
|
255
307
|
} else if (c === DS) {
|
|
256
308
|
var value = parseEnvVar();
|
|
257
309
|
if (!ifs) {
|
|
@@ -5,7 +5,8 @@ import parse = require('./parse');
|
|
|
5
5
|
*
|
|
6
6
|
* Accepts strings and the object shapes that {@link parse} emits. Throws a
|
|
7
7
|
* `TypeError` for unrecognized object shapes, `op` values outside the
|
|
8
|
-
* allowlist,
|
|
8
|
+
* allowlist, `pattern`/`comment` values containing line terminators, or
|
|
9
|
+
* strings containing line terminators anywhere after a `comment`.
|
|
9
10
|
*
|
|
10
11
|
* @param args - Array of tokens to quote.
|
|
11
12
|
* @returns A shell-safe quoted string.
|
|
@@ -6,13 +6,22 @@
|
|
|
6
6
|
var OPS = /** @type {const} */ ([
|
|
7
7
|
'||',
|
|
8
8
|
'&&',
|
|
9
|
+
';;&',
|
|
9
10
|
';;',
|
|
11
|
+
';&',
|
|
10
12
|
'|&',
|
|
11
13
|
'<(',
|
|
14
|
+
'>(',
|
|
12
15
|
'<<<',
|
|
16
|
+
'<<-',
|
|
17
|
+
'<<',
|
|
13
18
|
'>>',
|
|
14
19
|
'>&',
|
|
20
|
+
'>|',
|
|
21
|
+
'&>>',
|
|
22
|
+
'&>',
|
|
15
23
|
'<&',
|
|
24
|
+
'<>',
|
|
16
25
|
'&',
|
|
17
26
|
';',
|
|
18
27
|
'(',
|
|
@@ -22,11 +31,15 @@ var OPS = /** @type {const} */ ([
|
|
|
22
31
|
'>'
|
|
23
32
|
]);
|
|
24
33
|
var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
|
|
25
|
-
var GLOB_SHELL_SPECIAL = /[\s#!"$&'()
|
|
34
|
+
var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
|
|
26
35
|
|
|
27
36
|
/** @type {typeof import('./quote')} */
|
|
28
37
|
module.exports = function quote(xs) {
|
|
38
|
+
var sawComment = false;
|
|
29
39
|
return xs.map(function (s) {
|
|
40
|
+
if (sawComment && typeof s === 'string' && LINE_TERMINATORS.test(s)) {
|
|
41
|
+
throw new TypeError('a token after a `comment` must not contain line terminators');
|
|
42
|
+
}
|
|
30
43
|
if (s === '') {
|
|
31
44
|
return /** @type {const} */ ('\'\'');
|
|
32
45
|
}
|
|
@@ -38,6 +51,9 @@ module.exports = function quote(xs) {
|
|
|
38
51
|
if (LINE_TERMINATORS.test(s.pattern)) {
|
|
39
52
|
throw new TypeError('glob `pattern` must not contain line terminators');
|
|
40
53
|
}
|
|
54
|
+
if (s.pattern === '') {
|
|
55
|
+
return /** @type {const} */ ('\'\'');
|
|
56
|
+
}
|
|
41
57
|
return s.pattern.replace(GLOB_SHELL_SPECIAL, '\\$&');
|
|
42
58
|
}
|
|
43
59
|
if ('op' in s && typeof s.op === 'string') {
|
|
@@ -50,15 +66,19 @@ module.exports = function quote(xs) {
|
|
|
50
66
|
if (LINE_TERMINATORS.test(s.comment)) {
|
|
51
67
|
throw new TypeError('`comment` must not contain line terminators');
|
|
52
68
|
}
|
|
69
|
+
sawComment = true;
|
|
53
70
|
return '#' + s.comment;
|
|
54
71
|
}
|
|
55
72
|
throw new TypeError('unrecognized object token shape');
|
|
56
73
|
}
|
|
74
|
+
if ((/'/).test(s) && (/!/).test(s)) {
|
|
75
|
+
return "'" + s.replace(/'/g, "'\"'\"'") + "'";
|
|
76
|
+
}
|
|
57
77
|
if ((/["\s\\]/).test(s) && !(/'/).test(s)) {
|
|
58
|
-
return "'" + s
|
|
78
|
+
return "'" + s + "'";
|
|
59
79
|
}
|
|
60
80
|
if ((/["'\s]/).test(s)) {
|
|
61
|
-
return '"' + s.replace(/(["
|
|
81
|
+
return '"' + s.replace(/(["\\$`])/g, '\\$1') + '"';
|
|
62
82
|
}
|
|
63
83
|
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, '$1\\$2');
|
|
64
84
|
}).join(' ');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uuid",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.3",
|
|
4
4
|
"description": "RFC9562 UUIDs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"funding": [
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"!**/test"
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@biomejs/biome": "2.
|
|
44
|
-
"@commitlint/cli": "
|
|
45
|
-
"@commitlint/config-conventional": "
|
|
46
|
-
"bundlewatch": "0.4.
|
|
47
|
-
"commander": "
|
|
48
|
-
"globals": "17.
|
|
49
|
-
"jest": "30.
|
|
50
|
-
"lefthook": "1.
|
|
51
|
-
"lint-staged": "
|
|
43
|
+
"@biomejs/biome": "2.5.13",
|
|
44
|
+
"@commitlint/cli": "21.2.2",
|
|
45
|
+
"@commitlint/config-conventional": "21.2.2",
|
|
46
|
+
"bundlewatch": "0.4.2",
|
|
47
|
+
"commander": "15.0.0",
|
|
48
|
+
"globals": "17.12.0",
|
|
49
|
+
"jest": "30.5.1",
|
|
50
|
+
"lefthook": "2.1.12",
|
|
51
|
+
"lint-staged": "17.5.1",
|
|
52
52
|
"neostandard": "0.13.0",
|
|
53
|
-
"npm-run-all2": "
|
|
54
|
-
"prettier": "3.
|
|
55
|
-
"publint": "0.3.
|
|
56
|
-
"release-please": "17.
|
|
53
|
+
"npm-run-all2": "9.0.3",
|
|
54
|
+
"prettier": "3.9.6",
|
|
55
|
+
"publint": "0.3.24",
|
|
56
|
+
"release-please": "17.11.2",
|
|
57
57
|
"runmd": "2.1.1",
|
|
58
58
|
"standard-version": "9.5.0",
|
|
59
59
|
"typescript": "5.4.3"
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"lint": "npm run biome:check",
|
|
85
85
|
"md": "runmd --watch --output=README.md README_js.md",
|
|
86
86
|
"prepack": "npm run build -- --no-pack",
|
|
87
|
-
"prepare": "lefthook install",
|
|
87
|
+
"prepare": "if [ -d .git ]; then npx lefthook install; fi",
|
|
88
88
|
"prepublishOnly": "npm run build",
|
|
89
89
|
"pretest:benchmark": "npm run build",
|
|
90
90
|
"pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**",
|
|
91
91
|
"pretest:node": "npm run build",
|
|
92
|
-
"pretest": "npm run build",
|
|
92
|
+
"pretest": "if [ -d .git ]; then npm run build; fi",
|
|
93
93
|
"release": "standard-version --no-verify",
|
|
94
94
|
"test:benchmark": "cd examples/benchmark && npm test",
|
|
95
95
|
"test:browser": "wdio run ./wdio.conf.js",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"postchangelog": "biome format --write CHANGELOG.md"
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
-
"packageManager": "npm@
|
|
114
|
+
"packageManager": "npm@12.0.2"
|
|
115
115
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-mac2-driver",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "XCTest-based Appium driver for macOS apps automation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"XCTest",
|
|
@@ -47,10 +47,9 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@appium/strongbox": "2.0.1",
|
|
49
49
|
"@colors/colors": "1.6.1",
|
|
50
|
-
"appium-xcode": "7.2.
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"axios": "1.20.0",
|
|
50
|
+
"appium-xcode": "7.2.4",
|
|
51
|
+
"asyncbox": "6.5.0",
|
|
52
|
+
"axios": "1.21.0",
|
|
54
53
|
"portscanner": "2.2.0",
|
|
55
54
|
"teen_process": "4.2.1"
|
|
56
55
|
},
|
|
@@ -69,7 +68,8 @@
|
|
|
69
68
|
],
|
|
70
69
|
"mainClass": "Mac2Driver",
|
|
71
70
|
"scripts": {
|
|
72
|
-
"open-wda": "./scripts/open-wda.mjs"
|
|
71
|
+
"open-wda": "./scripts/open-wda.mjs",
|
|
72
|
+
"setup-accessibility": "./scripts/setup-accessibility.mjs"
|
|
73
73
|
},
|
|
74
74
|
"doctor": {
|
|
75
75
|
"checks": [
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"@appium/strongbox",
|
|
83
83
|
"@colors/colors",
|
|
84
84
|
"appium-xcode",
|
|
85
|
-
"async-lock",
|
|
86
85
|
"asyncbox",
|
|
87
86
|
"axios",
|
|
88
87
|
"portscanner",
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import {fileURLToPath} from 'node:url';
|
|
5
|
+
|
|
6
|
+
import {logger} from 'appium/support.js';
|
|
7
|
+
import {exec} from 'teen_process';
|
|
8
|
+
|
|
9
|
+
const RUNNER_NAME = 'WebDriverAgentRunner-Runner.app';
|
|
10
|
+
const RUNNER_SCHEME = 'WebDriverAgentRunner';
|
|
11
|
+
// Keep the build arguments in sync with the driver, so it reuses this build without re-signing it
|
|
12
|
+
const DISABLE_STORE_ARG = 'COMPILER_INDEX_STORE_ENABLE=NO';
|
|
13
|
+
const XCODEPROJ_NAME = 'WebDriverAgentMac.xcodeproj';
|
|
14
|
+
const DERIVED_DATA_ROOT = path.join(os.homedir(), 'Library', 'Developer', 'Xcode', 'DerivedData');
|
|
15
|
+
const SETTINGS_URL = 'x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility';
|
|
16
|
+
const NO_OPEN_FLAG = '--no-open';
|
|
17
|
+
const RUNNER_PATH_ENV = 'WDA_RUNNER_PATH';
|
|
18
|
+
const KEEP_RUNNING_FLAG = '--keep-running';
|
|
19
|
+
const RUNNER_EXECUTABLE_FRAGMENT = `/${RUNNER_NAME}/Contents/MacOS/`;
|
|
20
|
+
|
|
21
|
+
const log = logger.getLogger('WDA');
|
|
22
|
+
|
|
23
|
+
async function exists(p) {
|
|
24
|
+
try {
|
|
25
|
+
await fs.access(p);
|
|
26
|
+
return true;
|
|
27
|
+
} catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Xcode stores the project path of each derived data folder in its info.plist
|
|
34
|
+
*/
|
|
35
|
+
async function readWorkspacePath(derivedDataDir) {
|
|
36
|
+
try {
|
|
37
|
+
const {stdout} = await exec('plutil', [
|
|
38
|
+
'-extract',
|
|
39
|
+
'WorkspacePath',
|
|
40
|
+
'raw',
|
|
41
|
+
'-o',
|
|
42
|
+
'-',
|
|
43
|
+
path.join(derivedDataDir, 'info.plist'),
|
|
44
|
+
]);
|
|
45
|
+
return stdout.trim();
|
|
46
|
+
} catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Finds the runner app built from the WebDriverAgent project of this driver.
|
|
53
|
+
* The newest one wins if there are many.
|
|
54
|
+
*/
|
|
55
|
+
async function findRunner(projectPath) {
|
|
56
|
+
let entries;
|
|
57
|
+
try {
|
|
58
|
+
entries = await fs.readdir(DERIVED_DATA_ROOT);
|
|
59
|
+
} catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const candidates = [];
|
|
63
|
+
for (const entry of entries.filter((name) => name.startsWith('WebDriverAgentMac-'))) {
|
|
64
|
+
const derivedDataDir = path.join(DERIVED_DATA_ROOT, entry);
|
|
65
|
+
const runnerPath = path.join(derivedDataDir, 'Build', 'Products', 'Debug', RUNNER_NAME);
|
|
66
|
+
if (!(await exists(runnerPath)) || (await readWorkspacePath(derivedDataDir)) !== projectPath) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
candidates.push({runnerPath, mtimeMs: (await fs.stat(runnerPath)).mtimeMs});
|
|
70
|
+
}
|
|
71
|
+
return candidates.sort((a, b) => b.mtimeMs - a.mtimeMs)[0]?.runnerPath ?? null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Stops the runner and the xcodebuild process that hosts it. macOS evaluates the permission
|
|
76
|
+
* when a process starts, so a runner started before the grant stays untrusted.
|
|
77
|
+
* Appium itself keeps running, but an active session loses its runner.
|
|
78
|
+
*/
|
|
79
|
+
async function stopRunningRunners() {
|
|
80
|
+
const {stdout} = await exec('ps', ['-axo', 'pid=,command=']);
|
|
81
|
+
const pids = [];
|
|
82
|
+
for (const line of stdout.split('\n')) {
|
|
83
|
+
const match = line.trim().match(/^(\d+)\s+(.*)$/);
|
|
84
|
+
if (!match) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const pid = Number(match[1]);
|
|
88
|
+
const command = match[2];
|
|
89
|
+
const isRunner = command.includes(RUNNER_EXECUTABLE_FRAGMENT);
|
|
90
|
+
const isHost =
|
|
91
|
+
/(^|\/)xcodebuild\s/.test(command) &&
|
|
92
|
+
command.includes('test-without-building') &&
|
|
93
|
+
command.includes(`-scheme ${RUNNER_SCHEME}`);
|
|
94
|
+
if ((isRunner || isHost) && pid !== process.pid && pid !== process.ppid) {
|
|
95
|
+
pids.push(pid);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
for (const pid of pids) {
|
|
99
|
+
try {
|
|
100
|
+
process.kill(pid, 'SIGTERM');
|
|
101
|
+
} catch (e) {
|
|
102
|
+
log.warn(`Cannot stop the process ${pid}: ${e.message}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (pids.length > 0) {
|
|
106
|
+
log.info(`Stopped the running WebDriverAgent processes: ${pids.join(', ')}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Builds the runner the same way the driver does
|
|
112
|
+
*/
|
|
113
|
+
async function buildRunner(projectPath) {
|
|
114
|
+
log.info(`Building ${RUNNER_NAME}. This may take a few minutes`);
|
|
115
|
+
try {
|
|
116
|
+
await exec(
|
|
117
|
+
'xcodebuild',
|
|
118
|
+
['build-for-testing', '-project', projectPath, '-scheme', RUNNER_SCHEME, DISABLE_STORE_ARG],
|
|
119
|
+
{cwd: path.dirname(projectPath)},
|
|
120
|
+
);
|
|
121
|
+
} catch (e) {
|
|
122
|
+
const output = String(e.stdout ?? '')
|
|
123
|
+
.trim()
|
|
124
|
+
.split('\n')
|
|
125
|
+
.slice(-20)
|
|
126
|
+
.join('\n');
|
|
127
|
+
throw new Error(`Cannot build ${RUNNER_NAME}: ${e.stderr || e.message}\n${output}`, {cause: e});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async function setupAccessibility() {
|
|
132
|
+
const args = process.argv.slice(2);
|
|
133
|
+
const shouldOpen = !args.includes(NO_OPEN_FLAG);
|
|
134
|
+
const shouldStop = !args.includes(KEEP_RUNNING_FLAG);
|
|
135
|
+
const explicitPath = args.find((arg) => !arg.startsWith('--')) ?? process.env[RUNNER_PATH_ENV];
|
|
136
|
+
|
|
137
|
+
if (shouldStop) {
|
|
138
|
+
await stopRunningRunners();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
142
|
+
const projectPath = path.resolve(__dirname, '..', 'WebDriverAgentMac', XCODEPROJ_NAME);
|
|
143
|
+
let runnerPath = explicitPath ? path.resolve(explicitPath) : await findRunner(projectPath);
|
|
144
|
+
if (!runnerPath && !explicitPath) {
|
|
145
|
+
await buildRunner(projectPath);
|
|
146
|
+
runnerPath = await findRunner(projectPath);
|
|
147
|
+
}
|
|
148
|
+
if (!runnerPath || !(await exists(runnerPath))) {
|
|
149
|
+
log.error(
|
|
150
|
+
`Cannot find ${RUNNER_NAME}${explicitPath ? ` at '${runnerPath}'` : ` built from '${projectPath}'`}. ` +
|
|
151
|
+
`If your Xcode derived data folder is not in '${DERIVED_DATA_ROOT}', ` +
|
|
152
|
+
`set the ${RUNNER_PATH_ENV} environment variable to the full path to ${RUNNER_NAME}.`,
|
|
153
|
+
);
|
|
154
|
+
process.exitCode = 1;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
log.info(`WebDriverAgent runner: '${runnerPath}'`);
|
|
159
|
+
log.info(
|
|
160
|
+
`Add the runner to System Settings > Privacy & Security > Accessibility and turn it on. ` +
|
|
161
|
+
`Then restart your Appium session. Do not rebuild the runner after granting the permission, ` +
|
|
162
|
+
`because the grant may be tied to the exact build.`,
|
|
163
|
+
);
|
|
164
|
+
if (!shouldOpen) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
// Selects the runner in Finder, so it can be dragged into the Accessibility list
|
|
168
|
+
await exec('open', ['-R', runnerPath]);
|
|
169
|
+
await exec('open', [SETTINGS_URL]);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
setupAccessibility().catch((e) => {
|
|
173
|
+
log.error(e.message);
|
|
174
|
+
process.exitCode = 1;
|
|
175
|
+
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Authors ordered by first contribution.
|
|
2
|
-
|
|
3
|
-
rain1017 (https://github.com/rain1017)
|
|
4
|
-
JonathanPicques (https://github.com/JonathanPicques)
|
|
5
|
-
Rogier Schouten (https://github.com/rogierschouten)
|
|
6
|
-
erikvold (https://github.com/erikvold)
|
|
7
|
-
Christian Passet (https://github.com/thePunIssuer)
|
|
8
|
-
Tanguy Krotoff (https://github.com/tkrotoff)
|
|
9
|
-
jtyers (https://github.com/jtyers)
|
|
10
|
-
Paul Roub (https://github.com/paulroub)
|
|
11
|
-
Geoff Whatley (https://github.com/meatwallace)
|
|
12
|
-
Patryk L. (https://github.com/LosTigeros)
|
|
13
|
-
Julian Saunderson (https://github.com/bitrivers)
|
|
14
|
-
Philipp Keck (https://github.com/Philipp91)
|
|
15
|
-
abozaralizadeh (https://github.com/abozaralizadeh)
|
|
16
|
-
ThePiz (https://github.com/ThePiz)
|
|
17
|
-
Luke Stead (https://github.com/luke-stead-sonocent)
|
|
18
|
-
Simeon Borko (https://github.com/simeonborko)
|
|
19
|
-
Tim Schmidt (https://github.com/taschmidt)
|
|
20
|
-
Motty Milshtein (https://github.com/mottymilshtein)
|
|
21
|
-
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
1.4.0
|
|
2
|
-
==================
|
|
3
|
-
* add execution timeout (thank you @mottymilshtein)
|
|
4
|
-
|
|
5
|
-
1.3.2
|
|
6
|
-
==================
|
|
7
|
-
* Handle errors from user-supplied callback better (Thank you @simeonborko)
|
|
8
|
-
* Ensure the array parameter does not get mutated for batch acquire (Thank you @taschmidt)
|
|
9
|
-
|
|
10
|
-
1.3.1
|
|
11
|
-
==================
|
|
12
|
-
* Show queue name in errors (thank you @luke-stead-sonocent)
|
|
13
|
-
|
|
14
|
-
1.3.0
|
|
15
|
-
==================
|
|
16
|
-
* Add maxOccupationTime option (Thank you @abozaralizadeh and @ThePiz)
|
|
17
|
-
|
|
18
|
-
1.2.8
|
|
19
|
-
==================
|
|
20
|
-
* Fix #37 process not set when acquiring lock (Thank you @Philipp91)
|
|
21
|
-
|
|
22
|
-
1.2.7
|
|
23
|
-
==================
|
|
24
|
-
DO NOT USE, erroneous publish
|
|
25
|
-
|
|
26
|
-
1.2.6
|
|
27
|
-
==================
|
|
28
|
-
* Fix `maxPending = Infinity` no longer allowed (thank you @coderaiser)
|
|
29
|
-
|
|
30
|
-
1.2.5
|
|
31
|
-
==================
|
|
32
|
-
* Allow `maxPending = 0` (thank you @bmrpatel)
|
|
33
|
-
* Upgrade dependencies
|
|
34
|
-
|
|
35
|
-
1.2.4
|
|
36
|
-
==================
|
|
37
|
-
* Be robust to lock names that are also Object keys - simpler solution, extra tests.
|
|
38
|
-
|
|
39
|
-
1.2.3
|
|
40
|
-
==================
|
|
41
|
-
* Be robust to lock names that are also Object keys.
|
|
42
|
-
* Upgrade dependencies
|
|
43
|
-
|
|
44
|
-
1.2.2
|
|
45
|
-
==================
|
|
46
|
-
* Fix grunt-env accidentally having become a dependency (#25)
|
|
47
|
-
|
|
48
|
-
1.2.1
|
|
49
|
-
==================
|
|
50
|
-
* Remove empty postinstall script (#24)
|
|
51
|
-
* Fixed some vulnerable dev dependencies
|
|
52
|
-
|
|
53
|
-
1.2.0
|
|
54
|
-
==================
|
|
55
|
-
* ES5 compatibility (#21)
|
|
56
|
-
|
|
57
|
-
1.1.4
|
|
58
|
-
==================
|
|
59
|
-
* Fix for #17, update dependencies
|
|
60
|
-
|
|
61
|
-
1.1.3
|
|
62
|
-
==================
|
|
63
|
-
* Fix for #14
|
|
64
|
-
|
|
65
|
-
1.1.1
|
|
66
|
-
==================
|
|
67
|
-
* Fix result Promise not resolving when locking empty key array
|
|
68
|
-
|
|
69
|
-
1.1.0 / 2017-10-17
|
|
70
|
-
==================
|
|
71
|
-
* Add option to add waiters to the front of the queue
|
|
72
|
-
|
|
73
|
-
1.1.0 / 2017-10-17
|
|
74
|
-
==================
|
|
75
|
-
* Add option to add waiters to the front of the queue
|
|
76
|
-
|
|
77
|
-
1.0.0 / 2017-06-29
|
|
78
|
-
==================
|
|
79
|
-
* Remove dependency on Q by using the global Promise variable by default. Thank you @erikvold (https://github.com/erikvold) for the PR
|
|
80
|
-
|
|
81
|
-
0.3.10 / 2017-06-27
|
|
82
|
-
==================
|
|
83
|
-
* Remove dependencies on Q-specific nodify(), try(), and defer() methods so that you can inject e.g. standard ES6 promises using `new AsyncLock({ Promise: Promise })`
|
|
84
|
-
|
|
85
|
-
0.3.9 / 2016-11-30
|
|
86
|
-
==================
|
|
87
|
-
* Referred to MIT license in package.json
|
|
88
|
-
* Update NPM module dependencies, remove no-longer-maintained blanket code coverage
|
|
89
|
-
* Change author to rogierschouten
|
|
90
|
-
* Fix invalid JSDoc comments (thanks @JonathanPicques)
|
|
91
|
-
* Bugfix: TypeError when locking multiple keys at once
|
|
92
|
-
|
|
93
|
-
0.3.7-0.3.8
|
|
94
|
-
==================
|
|
95
|
-
Unknown, previous author did not commit this to Github.
|
|
96
|
-
|
|
97
|
-
0.3.6 / 2015-09-07
|
|
98
|
-
==================
|
|
99
|
-
* Performance improvement
|
|
100
|
-
|
|
101
|
-
0.3.5 / 2015-06-15
|
|
102
|
-
==================
|
|
103
|
-
* Performance improvement
|
|
104
|
-
|
|
105
|
-
0.3.4 / 2015-06-09
|
|
106
|
-
==================
|
|
107
|
-
* Bug fix
|
|
108
|
-
|
|
109
|
-
0.3.3 / 2015-05-19
|
|
110
|
-
==================
|
|
111
|
-
* Bug fix
|
|
112
|
-
|
|
113
|
-
0.3.2 / 2015-05-08
|
|
114
|
-
==================
|
|
115
|
-
* Set default timeout to never
|
|
116
|
-
|
|
117
|
-
0.3.1 / 2015-04-15
|
|
118
|
-
==================
|
|
119
|
-
* Use your own promise
|
|
120
|
-
|
|
121
|
-
0.3.0 / 2015-03-06
|
|
122
|
-
==================
|
|
123
|
-
* Domain reentrant
|
|
124
|
-
|
|
125
|
-
0.2.0 / 2015-02-21
|
|
126
|
-
==================
|
|
127
|
-
* Support promise mode
|
|
128
|
-
* Pending task limit
|
|
129
|
-
|
|
130
|
-
0.1.0 / 2015-01-13
|
|
131
|
-
==================
|
|
132
|
-
* Initial version
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016 Rogier Schouten <github@workingcode.ninja>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|