appium-espresso-driver 9.3.7 → 9.3.9
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/build/lib/commands/context.d.ts +1 -1
- package/build/lib/commands/context.js +1 -1
- package/build/lib/commands/element.d.ts +10 -10
- package/build/lib/commands/element.js +10 -10
- package/build/lib/commands/idling-resources.d.ts +1 -1
- package/build/lib/commands/idling-resources.js +1 -1
- package/build/lib/commands/misc.d.ts +5 -4
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +3 -3
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/server/runner.d.ts.map +1 -1
- package/build/lib/commands/server/runner.js +3 -1
- package/build/lib/commands/server/runner.js.map +1 -1
- package/build/lib/commands/services.d.ts +2 -2
- package/build/lib/commands/services.js +2 -2
- package/build/lib/driver.js +1 -1
- package/build/lib/driver.js.map +1 -1
- package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
- package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
- package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
- package/lib/commands/context.ts +1 -1
- package/lib/commands/element.ts +10 -10
- package/lib/commands/idling-resources.ts +1 -1
- package/lib/commands/misc.ts +5 -4
- package/lib/commands/server/runner.ts +3 -1
- package/lib/commands/services.ts +2 -2
- package/lib/driver.ts +1 -1
- 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-android-driver/CHANGELOG.md +6 -0
- package/node_modules/appium-android-driver/build/lib/commands/context/exports.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/context/exports.js +9 -5
- package/node_modules/appium-android-driver/build/lib/commands/context/exports.js.map +1 -1
- package/node_modules/appium-android-driver/lib/commands/context/exports.ts +9 -5
- package/node_modules/appium-android-driver/package.json +1 -1
- package/node_modules/appium-chromedriver/CHANGELOG.md +14 -0
- package/node_modules/appium-chromedriver/build/lib/commands/version.d.ts.map +1 -1
- package/node_modules/appium-chromedriver/build/lib/commands/version.js +9 -0
- package/node_modules/appium-chromedriver/build/lib/commands/version.js.map +1 -1
- package/node_modules/appium-chromedriver/config/mapping.json +1 -0
- package/node_modules/appium-chromedriver/lib/commands/version.ts +10 -0
- package/node_modules/appium-chromedriver/package.json +2 -2
- 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/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/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/io.appium.settings/CHANGELOG.md +7 -0
- package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
- package/node_modules/io.appium.settings/package.json +2 -2
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- 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/package.json +5 -5
- 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/on-finished/HISTORY.md +0 -98
- 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
|
@@ -742,7 +742,7 @@ test('encode', function (t) {
|
|
|
742
742
|
loneExpected += 'a';
|
|
743
743
|
}
|
|
744
744
|
loneBoundary += '\uD83DX';
|
|
745
|
-
loneExpected += '%
|
|
745
|
+
loneExpected += '%EF%BF%BDX';
|
|
746
746
|
|
|
747
747
|
t.equal(
|
|
748
748
|
utils.encode(loneBoundary),
|
|
@@ -750,6 +750,17 @@ test('encode', function (t) {
|
|
|
750
750
|
'a lone high surrogate at a chunk boundary encodes the same as mid-chunk'
|
|
751
751
|
);
|
|
752
752
|
|
|
753
|
+
t.equal(
|
|
754
|
+
utils.encode(loneBoundary.slice(0, 1023) + '\uDC00X'),
|
|
755
|
+
loneExpected.slice(0, 1023) + '%EF%BF%BDX',
|
|
756
|
+
'a lone low surrogate at a chunk boundary does not consume the next character'
|
|
757
|
+
);
|
|
758
|
+
t.equal(
|
|
759
|
+
utils.encode(loneBoundary.slice(0, 1024)),
|
|
760
|
+
loneExpected.slice(0, 1023) + '%EF%BF%BD',
|
|
761
|
+
'a lone high surrogate ending a string of exactly one chunk encodes as U+FFFD'
|
|
762
|
+
);
|
|
763
|
+
|
|
753
764
|
t.equal(
|
|
754
765
|
utils.encode('\x28\x29'),
|
|
755
766
|
'%28%29',
|
|
@@ -761,8 +772,30 @@ test('encode', function (t) {
|
|
|
761
772
|
'does not encode parens in RFC1738'
|
|
762
773
|
);
|
|
763
774
|
|
|
775
|
+
t.equal(
|
|
776
|
+
utils.encode('~*()'),
|
|
777
|
+
'~%2A%28%29',
|
|
778
|
+
'leaves `~` unencoded, and encodes `*` and parens, by default'
|
|
779
|
+
);
|
|
780
|
+
t.equal(
|
|
781
|
+
utils.encode('~*()', null, null, null, 'RFC3986'),
|
|
782
|
+
'~%2A%28%29',
|
|
783
|
+
'leaves `~` unencoded, and encodes `*` and parens, in RFC3986'
|
|
784
|
+
);
|
|
785
|
+
t.equal(
|
|
786
|
+
utils.encode('~*() ', null, null, null, 'RFC1738'),
|
|
787
|
+
'~%2A()%20',
|
|
788
|
+
'leaves `~` and parens unencoded, and encodes `*` and spaces, in RFC1738'
|
|
789
|
+
);
|
|
790
|
+
|
|
764
791
|
// todo RFC1738 format
|
|
765
792
|
|
|
793
|
+
t.equal(
|
|
794
|
+
utils.encode('~*()', null, null, null, 'WHATWG'),
|
|
795
|
+
'%7E*%28%29',
|
|
796
|
+
'encodes `~` and parens, but not `*`, in WHATWG'
|
|
797
|
+
);
|
|
798
|
+
|
|
766
799
|
t.equal(
|
|
767
800
|
utils.encode('Āက豈'),
|
|
768
801
|
'%C4%80%E1%80%80%EF%A4%80',
|
|
@@ -771,8 +804,33 @@ test('encode', function (t) {
|
|
|
771
804
|
|
|
772
805
|
t.equal(
|
|
773
806
|
utils.encode('\uD83D \uDCA9'),
|
|
774
|
-
'%
|
|
775
|
-
'encodes lone surrogates'
|
|
807
|
+
'%EF%BF%BD%20%EF%BF%BD',
|
|
808
|
+
'encodes lone surrogates as U+FFFD, without consuming the next character'
|
|
809
|
+
);
|
|
810
|
+
t.equal(
|
|
811
|
+
utils.encode('\uDCA9\uD83D'),
|
|
812
|
+
'%EF%BF%BD%EF%BF%BD',
|
|
813
|
+
'encodes a reversed surrogate pair as two U+FFFD'
|
|
814
|
+
);
|
|
815
|
+
t.equal(
|
|
816
|
+
utils.encode('x\uD83D'),
|
|
817
|
+
'x%EF%BF%BD',
|
|
818
|
+
'encodes a trailing lone high surrogate as U+FFFD'
|
|
819
|
+
);
|
|
820
|
+
t.equal(
|
|
821
|
+
utils.encode('\uD83D\uD83D\uDCA9'),
|
|
822
|
+
'%EF%BF%BD%F0%9F%92%A9',
|
|
823
|
+
'a lone high surrogate does not prevent the following pair from encoding'
|
|
824
|
+
);
|
|
825
|
+
t.equal(
|
|
826
|
+
utils.encode('\uD83D\uE000'),
|
|
827
|
+
'%EF%BF%BD%EE%80%80',
|
|
828
|
+
'a high surrogate followed by a code unit above the low surrogate range is not combined'
|
|
829
|
+
);
|
|
830
|
+
t.equal(
|
|
831
|
+
utils.encode('\uDC00\uDC00'),
|
|
832
|
+
'%EF%BF%BD%EF%BF%BD',
|
|
833
|
+
'a low surrogate followed by a low surrogate is not combined'
|
|
776
834
|
);
|
|
777
835
|
|
|
778
836
|
t.end();
|
|
@@ -39,6 +39,20 @@ output
|
|
|
39
39
|
[ 'a', 'b c', '$def', "it's great" ]
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
## parse with ANSI-C quoting
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
var parse = require('shell-quote/parse');
|
|
46
|
+
var xs = parse("echo $'it\\'s a \\n test'");
|
|
47
|
+
console.dir(xs);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
output
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
[ 'echo', "it's a \n test" ]
|
|
54
|
+
```
|
|
55
|
+
|
|
42
56
|
## parse with an environment variable
|
|
43
57
|
|
|
44
58
|
```js
|
|
@@ -123,10 +137,13 @@ commands.
|
|
|
123
137
|
|
|
124
138
|
Each entry of `args` may be a string, or one of the object shapes that
|
|
125
139
|
`parse` emits: `{ op }` (where `op` is one of the control operators
|
|
126
|
-
`||`, `&&`, `;;`, `|&`, `<(`, `<<<`,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
140
|
+
`||`, `&&`, `;;&`, `;;`, `;&`, `|&`, `<(`, `>(`, `<<<`, `<<-`,
|
|
141
|
+
`<<`, `>>`, `>&`, `>|`, `&>>`, `&>`, `<&`, `<>`, `&`, `;`, `(`,
|
|
142
|
+
`)`, `|`, `<`, `>`),
|
|
143
|
+
`{ op: 'glob', pattern }`, or `{ comment }`. Any
|
|
144
|
+
other object shape, an unrecognized `op`, a `pattern`/`comment`
|
|
145
|
+
containing line terminators, or a string containing line terminators
|
|
146
|
+
anywhere after a `{ comment }` throws a `TypeError`.
|
|
130
147
|
|
|
131
148
|
The output is POSIX shell (`sh`/`bash`) quoting.
|
|
132
149
|
It is not valid for Windows `cmd.exe` or PowerShell,
|
|
@@ -158,6 +175,15 @@ Pass a string to use its characters as the `IFS` instead
|
|
|
158
175
|
(for example `{ splitUnquoted: ':' }`).
|
|
159
176
|
A quoted expansion (`"$VAR"`) is never split.
|
|
160
177
|
|
|
178
|
+
Bash [ANSI-C quoting](https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html)
|
|
179
|
+
(`$'...'`) is supported: escape sequences (such as `\n`, `\t`, `\\`, `\'`, `\"`,
|
|
180
|
+
`\xHH`, `\uHHHH`, `\UHHHHHHHH`, `\nnn`, and `\cx`) are decoded, an unrecognized
|
|
181
|
+
escape keeps its backslash, and the contents are never word-split and never
|
|
182
|
+
variable-expanded, so `${VAR}` inside `$'...'` stays literal. As in bash,
|
|
183
|
+
`$'...'` is not special inside double or single quotes, and a NUL ends the string.
|
|
184
|
+
Since the result is a JavaScript string, `\xHH` and `\nnn` produce the character
|
|
185
|
+
with that code (U+0000 to U+00FF), not a raw byte.
|
|
186
|
+
|
|
161
187
|
Only simple `$VARNAME` and `${VARNAME}` interpolation is supported.
|
|
162
188
|
Bash parameter expansion beyond a plain variable name is not evaluated:
|
|
163
189
|
forms such as array subscripts (`${arr[i]}`), length (`${#arr[@]}`),
|
|
@@ -186,6 +212,13 @@ parses as:
|
|
|
186
212
|
[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ]
|
|
187
213
|
```
|
|
188
214
|
|
|
215
|
+
The here-document operators (`<<` and `<<-`) are emitted like any other operator,
|
|
216
|
+
followed by the delimiter word.
|
|
217
|
+
The here-document body is not recognized:
|
|
218
|
+
a newline is whitespace to `parse`,
|
|
219
|
+
so the lines after the command are parsed as ordinary tokens,
|
|
220
|
+
subject to quoting, comments, globs, and variable expansion.
|
|
221
|
+
|
|
189
222
|
# install
|
|
190
223
|
|
|
191
224
|
With [npm](http://npmjs.org) do:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shell-quote",
|
|
3
3
|
"description": "quote and parse shell commands",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.12.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "James Halliday",
|
|
7
7
|
"email": "mail@substack.net",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
44
|
-
"@ljharb/eslint-config": "^22.2.
|
|
44
|
+
"@ljharb/eslint-config": "^22.2.5",
|
|
45
45
|
"@ljharb/tsconfig": "^0.3.2",
|
|
46
|
-
"auto-changelog": "^2.
|
|
47
|
-
"eslint": "^10.
|
|
48
|
-
"evalmd": "^0.0.
|
|
46
|
+
"auto-changelog": "^2.7.0",
|
|
47
|
+
"eslint": "^10.11.0",
|
|
48
|
+
"evalmd": "^0.0.22",
|
|
49
49
|
"in-publish": "^2.0.1",
|
|
50
50
|
"jiti": "^0.0.0",
|
|
51
51
|
"npmignore": "^0.3.5",
|
|
@@ -66,8 +66,12 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"ignore": [
|
|
68
68
|
".github/workflows",
|
|
69
|
+
".nycrc",
|
|
70
|
+
"eslint.config.mjs",
|
|
69
71
|
"example",
|
|
70
|
-
"CHANGELOG.md"
|
|
72
|
+
"CHANGELOG.md",
|
|
73
|
+
"security.md",
|
|
74
|
+
"test"
|
|
71
75
|
]
|
|
72
76
|
},
|
|
73
77
|
"engines": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare namespace parse {
|
|
2
2
|
/** A shell control operator. */
|
|
3
3
|
export interface ControlOperator {
|
|
4
|
-
op: '||' | '&&' | ';;' | '|&' | '<(' | '<<<' | '>>' | '>&' | '<&' | '&' | ';' | '(' | ')' | '|' | '<' | '>';
|
|
4
|
+
op: '||' | '&&' | ';;&' | ';;' | ';&' | '|&' | '<(' | '>(' | '<<<' | '<<-' | '<<' | '>>' | '>&' | '>|' | '&>>' | '&>' | '<&' | '<>' | '&' | ';' | '(' | ')' | '|' | '<' | '>';
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/** A glob pattern parsed from the shell command. */
|
|
@@ -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
|
}
|
|
@@ -75,11 +75,24 @@ class WebSocket extends EventEmitter {
|
|
|
75
75
|
this._redirects = 0;
|
|
76
76
|
|
|
77
77
|
if (protocols === undefined) {
|
|
78
|
-
protocols
|
|
78
|
+
if (!options || options.protocols === undefined) {
|
|
79
|
+
protocols = [];
|
|
80
|
+
} else if (Array.isArray(options.protocols)) {
|
|
81
|
+
protocols = options.protocols;
|
|
82
|
+
} else {
|
|
83
|
+
protocols = [options.protocols];
|
|
84
|
+
}
|
|
79
85
|
} else if (!Array.isArray(protocols)) {
|
|
80
86
|
if (typeof protocols === 'object' && protocols !== null) {
|
|
81
87
|
options = protocols;
|
|
82
|
-
|
|
88
|
+
|
|
89
|
+
if (options.protocols === undefined) {
|
|
90
|
+
protocols = [];
|
|
91
|
+
} else if (Array.isArray(options.protocols)) {
|
|
92
|
+
protocols = options.protocols;
|
|
93
|
+
} else {
|
|
94
|
+
protocols = [options.protocols];
|
|
95
|
+
}
|
|
83
96
|
} else {
|
|
84
97
|
protocols = [protocols];
|
|
85
98
|
}
|
|
@@ -318,7 +331,6 @@ class WebSocket extends EventEmitter {
|
|
|
318
331
|
return;
|
|
319
332
|
}
|
|
320
333
|
|
|
321
|
-
this._readyState = WebSocket.CLOSING;
|
|
322
334
|
this._sender.close(code, data, !this._isServer, (err) => {
|
|
323
335
|
//
|
|
324
336
|
// This error is handled by the `'error'` listener on the socket. We only
|
|
@@ -336,6 +348,7 @@ class WebSocket extends EventEmitter {
|
|
|
336
348
|
}
|
|
337
349
|
});
|
|
338
350
|
|
|
351
|
+
this._readyState = WebSocket.CLOSING;
|
|
339
352
|
setCloseTimer(this);
|
|
340
353
|
}
|
|
341
354
|
|
|
@@ -681,6 +694,7 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
681
694
|
socketPath: undefined,
|
|
682
695
|
hostname: undefined,
|
|
683
696
|
protocol: undefined,
|
|
697
|
+
protocols: undefined,
|
|
684
698
|
timeout: undefined,
|
|
685
699
|
method: 'GET',
|
|
686
700
|
host: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-espresso-driver",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.9",
|
|
4
4
|
"description": "Espresso integration for Appium",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"appium-adb": "16.1.0",
|
|
58
|
-
"appium-android-driver": "14.2.
|
|
59
|
-
"asyncbox": "6.
|
|
60
|
-
"axios": "1.
|
|
58
|
+
"appium-android-driver": "14.2.5",
|
|
59
|
+
"asyncbox": "6.5.0",
|
|
60
|
+
"axios": "1.21.0",
|
|
61
61
|
"commander": "14.0.3",
|
|
62
|
-
"io.appium.settings": "8.4.
|
|
62
|
+
"io.appium.settings": "8.4.3",
|
|
63
63
|
"portscanner": "2.2.0",
|
|
64
64
|
"semver": "7.8.5",
|
|
65
65
|
"teen_process": "4.2.1"
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { CancellablePromise, LongSleepOptions, MapFilterOptions, SleepOptions, WaitForConditionOptions } from './types.js';
|
|
2
|
-
/** Error thrown by {@link withTimeout} when the deadline is exceeded. */
|
|
3
|
-
export declare class TimeoutError extends Error {
|
|
4
|
-
constructor(message?: string);
|
|
5
|
-
}
|
|
6
|
-
/** Thrown when a promise is cancelled via `cancel`. */
|
|
7
|
-
export declare class PromiseCancellationError extends Error {
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* An async/await version of `setTimeout`. The returned promise has a `cancel()` method that clears
|
|
12
|
-
* the timer and usually rejects with {@link PromiseCancellationError} unless you use the object form with
|
|
13
|
-
* `cancelError: null` to resolve on cancel.
|
|
14
|
-
*
|
|
15
|
-
* @param ms - Milliseconds to wait
|
|
16
|
-
* @returns A thenable you can `await`; call `.cancel()` to abort early.
|
|
17
|
-
*/
|
|
18
|
-
export declare function sleep(ms: number): CancellablePromise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Object form: `ms` plus optional `cancelError` (non-empty string or `Error`, `null` to resolve on
|
|
21
|
-
* cancel, or omitted / `undefined` / `''` for default {@link PromiseCancellationError}). Any non-array
|
|
22
|
-
* object with a finite `ms` is accepted at runtime (including class instances), matching structural typing.
|
|
23
|
-
*
|
|
24
|
-
* @param options - Duration and optional cancellation behavior
|
|
25
|
-
* @returns A thenable you can `await`; call `.cancel()` to abort early.
|
|
26
|
-
*/
|
|
27
|
-
export declare function sleep(options: SleepOptions): CancellablePromise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Resolves with `promise` or rejects if it does not settle before `timeoutMs`.
|
|
30
|
-
*
|
|
31
|
-
* If the deadline passes first: with no third argument (or a falsy non-error value), rejects
|
|
32
|
-
* with {@link TimeoutError} whose message includes `timeoutMs`; with a non-empty string,
|
|
33
|
-
* rejects with {@link TimeoutError} using that message; with an `Error` instance, rejects
|
|
34
|
-
* with that same instance.
|
|
35
|
-
*
|
|
36
|
-
* @param promise - Promise to race against the timeout.
|
|
37
|
-
* @param timeoutMs - Maximum time in milliseconds before rejecting if `promise` has not settled.
|
|
38
|
-
* @param messageOrError - Optional override for the timeout rejection: custom {@link TimeoutError}
|
|
39
|
-
* message when the string is non-empty, or an existing `Error` to reject with verbatim.
|
|
40
|
-
* Omitted, `undefined`, or other falsy non-error values use the default timeout message (includes `timeoutMs`).
|
|
41
|
-
*/
|
|
42
|
-
export declare function withTimeout<T>(promise: Promise<T>, timeoutMs: number, messageOrError?: string | Error): Promise<T>;
|
|
43
|
-
/**
|
|
44
|
-
* Sometimes `Promise.delay` or `setTimeout` are inaccurate for large wait
|
|
45
|
-
* times. To safely wait for these long times (e.g. in the 5+ minute range), you
|
|
46
|
-
* can use `longSleep`.
|
|
47
|
-
*
|
|
48
|
-
* You can also pass a `progressCb` option which is a callback function that
|
|
49
|
-
* receives an object with the properties `elapsedMs`, `timeLeft`, and
|
|
50
|
-
* `progress`. This will be called on every wait interval so you can do your
|
|
51
|
-
* wait logging or whatever.
|
|
52
|
-
* @param ms - The number of milliseconds to wait
|
|
53
|
-
* @param options - Options for controlling the long sleep behavior
|
|
54
|
-
*/
|
|
55
|
-
export declare function longSleep(ms: number, { thresholdMs, intervalMs, progressCb }?: LongSleepOptions): Promise<void>;
|
|
56
|
-
/**
|
|
57
|
-
* An async/await way of running a method until it doesn't throw an error
|
|
58
|
-
* @param times - The maximum number of times to retry the function
|
|
59
|
-
* @param fn - The async function to retry
|
|
60
|
-
* @param args - Arguments to pass to the function
|
|
61
|
-
*/
|
|
62
|
-
export declare function retry<T = any>(times: number, fn: (...args: any[]) => Promise<T>, ...args: any[]): Promise<T | null>;
|
|
63
|
-
/**
|
|
64
|
-
* You can also use `retryInterval` to add a sleep in between retries. This can
|
|
65
|
-
* be useful if you want to throttle how fast we retry.
|
|
66
|
-
* @param times - The maximum number of times to retry the function
|
|
67
|
-
* @param sleepMs - The number of milliseconds to wait between retries
|
|
68
|
-
* @param fn - The async function to retry
|
|
69
|
-
* @param args - Arguments to pass to the function
|
|
70
|
-
*/
|
|
71
|
-
export declare function retryInterval<T = any>(times: number, sleepMs: number, fn: (...args: any[]) => Promise<T>, ...args: any[]): Promise<T | null>;
|
|
72
|
-
/**
|
|
73
|
-
* Similar to `Array.prototype.map`; runs in parallel, serial, or with custom concurrency pool
|
|
74
|
-
* @param coll - The collection to map over
|
|
75
|
-
* @param mapper - The function to apply to each element
|
|
76
|
-
* @param options - Options for controlling parallelism (default: true - fully parallel)
|
|
77
|
-
*/
|
|
78
|
-
export declare function asyncmap<T, R>(coll: T[], mapper: (value: T) => R | Promise<R>, options?: MapFilterOptions): Promise<R[]>;
|
|
79
|
-
/**
|
|
80
|
-
* Similar to `Array.prototype.filter`; runs in parallel, serial, or with custom concurrency pool
|
|
81
|
-
* @param coll - The collection to filter
|
|
82
|
-
* @param filter - The function to test each element
|
|
83
|
-
* @param options - Options for controlling parallelism (default: true - fully parallel)
|
|
84
|
-
*/
|
|
85
|
-
export declare function asyncfilter<T>(coll: T[], filter: (value: T) => boolean | Promise<boolean>, options?: MapFilterOptions): Promise<T[]>;
|
|
86
|
-
/**
|
|
87
|
-
* Takes a condition (a function returning a boolean or boolean promise), and
|
|
88
|
-
* waits until the condition is true.
|
|
89
|
-
*
|
|
90
|
-
* Throws a `/Condition unmet/` error if the condition has not been satisfied
|
|
91
|
-
* within the allocated time, unless an error is provided in the options, as the
|
|
92
|
-
* `error` property, which is either thrown itself, or used as the message.
|
|
93
|
-
*
|
|
94
|
-
* The condition result is returned if it is not falsy. If the condition throws an
|
|
95
|
-
* error then this exception will be immediately passed through.
|
|
96
|
-
*
|
|
97
|
-
* The default options are: `{ waitMs: 5000, intervalMs: 500 }`
|
|
98
|
-
* @param condFn - The condition function to evaluate
|
|
99
|
-
* @param options - Options for controlling the wait behavior
|
|
100
|
-
*/
|
|
101
|
-
export declare function waitForCondition<T>(condFn: () => Promise<T> | T, options?: WaitForConditionOptions): Promise<T>;
|
|
102
|
-
export type { CancellablePromise, Progress, ProgressCallback, LongSleepOptions, SleepArg, SleepOptions, WaitForConditionOptions, } from './types.js';
|
|
103
|
-
//# sourceMappingURL=asyncbox.d.ts.map
|