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.
Files changed (467) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/context.d.ts +1 -1
  3. package/build/lib/commands/context.js +1 -1
  4. package/build/lib/commands/element.d.ts +10 -10
  5. package/build/lib/commands/element.js +10 -10
  6. package/build/lib/commands/idling-resources.d.ts +1 -1
  7. package/build/lib/commands/idling-resources.js +1 -1
  8. package/build/lib/commands/misc.d.ts +5 -4
  9. package/build/lib/commands/misc.d.ts.map +1 -1
  10. package/build/lib/commands/misc.js +3 -3
  11. package/build/lib/commands/misc.js.map +1 -1
  12. package/build/lib/commands/server/runner.d.ts.map +1 -1
  13. package/build/lib/commands/server/runner.js +3 -1
  14. package/build/lib/commands/server/runner.js.map +1 -1
  15. package/build/lib/commands/services.d.ts +2 -2
  16. package/build/lib/commands/services.js +2 -2
  17. package/build/lib/driver.js +1 -1
  18. package/build/lib/driver.js.map +1 -1
  19. package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
  20. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
  21. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
  22. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  23. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
  24. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  25. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  26. package/lib/commands/context.ts +1 -1
  27. package/lib/commands/element.ts +10 -10
  28. package/lib/commands/idling-resources.ts +1 -1
  29. package/lib/commands/misc.ts +5 -4
  30. package/lib/commands/server/runner.ts +3 -1
  31. package/lib/commands/services.ts +2 -2
  32. package/lib/driver.ts +1 -1
  33. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts +12 -0
  34. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts.map +1 -0
  35. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js +33 -0
  36. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js.map +1 -0
  37. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.d.ts.map +1 -1
  38. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js +49 -12
  39. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js.map +1 -1
  40. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.d.ts.map +1 -1
  41. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js +2 -0
  42. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js.map +1 -1
  43. package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts +17 -6
  44. package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts.map +1 -1
  45. package/node_modules/@appium/base-driver/build/lib/express/middleware.js +11 -7
  46. package/node_modules/@appium/base-driver/build/lib/express/middleware.js.map +1 -1
  47. package/node_modules/@appium/base-driver/build/lib/express/server.d.ts +1 -0
  48. package/node_modules/@appium/base-driver/build/lib/express/server.d.ts.map +1 -1
  49. package/node_modules/@appium/base-driver/build/lib/express/server.js +4 -3
  50. package/node_modules/@appium/base-driver/build/lib/express/server.js.map +1 -1
  51. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts +1 -2
  52. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts.map +1 -1
  53. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js +8 -3
  54. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js.map +1 -1
  55. package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi-subscriptions.ts +36 -0
  56. package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi.ts +56 -12
  57. package/node_modules/@appium/base-driver/lib/basedriver/driver.ts +2 -0
  58. package/node_modules/@appium/base-driver/lib/express/middleware.ts +32 -12
  59. package/node_modules/@appium/base-driver/lib/express/server.ts +7 -2
  60. package/node_modules/@appium/base-driver/lib/protocol/bidi-commands.ts +9 -3
  61. package/node_modules/@appium/base-driver/node_modules/axios/CHANGELOG.md +1934 -0
  62. package/node_modules/@appium/base-driver/node_modules/axios/LICENSE +7 -0
  63. package/node_modules/@appium/base-driver/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  64. package/node_modules/@appium/base-driver/node_modules/axios/README.md +2851 -0
  65. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.js +5807 -0
  66. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js +5 -0
  67. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js.map +1 -0
  68. package/node_modules/@appium/base-driver/node_modules/axios/dist/browser/axios.cjs +5829 -0
  69. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.js +5850 -0
  70. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js +3 -0
  71. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  72. package/node_modules/@appium/base-driver/node_modules/axios/dist/node/axios.cjs +6808 -0
  73. package/node_modules/@appium/base-driver/node_modules/axios/index.d.cts +766 -0
  74. package/node_modules/@appium/base-driver/node_modules/axios/index.d.ts +787 -0
  75. package/node_modules/@appium/base-driver/node_modules/axios/index.js +45 -0
  76. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/README.md +36 -0
  77. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/adapters.js +132 -0
  78. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/fetch.js +696 -0
  79. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/http.js +1490 -0
  80. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/xhr.js +277 -0
  81. package/node_modules/@appium/base-driver/node_modules/axios/lib/axios.js +89 -0
  82. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  83. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  84. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/isCancel.js +5 -0
  85. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/Axios.js +306 -0
  86. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosError.js +219 -0
  87. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  88. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  89. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/README.md +8 -0
  90. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/buildFullPath.js +76 -0
  91. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  92. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/mergeConfig.js +174 -0
  93. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/methodList.js +17 -0
  94. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  95. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/settle.js +27 -0
  96. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/transformData.js +28 -0
  97. package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/index.js +178 -0
  98. package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/transitional.js +10 -0
  99. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/README.md +3 -0
  100. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/classes/FormData.js +2 -0
  101. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/data.js +1 -0
  102. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  103. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  104. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  105. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  106. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/README.md +7 -0
  107. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  108. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/bind.js +14 -0
  109. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/buildURL.js +69 -0
  110. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/callbackify.js +18 -0
  111. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  112. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  113. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/cookies.js +64 -0
  114. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  115. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  116. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  117. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  118. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  119. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  120. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  121. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  122. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  123. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/null.js +2 -0
  124. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  125. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  126. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  127. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/readBlob.js +15 -0
  128. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  129. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  130. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  131. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/speedometer.js +55 -0
  132. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/spread.js +28 -0
  133. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/throttle.js +45 -0
  134. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toFormData.js +279 -0
  135. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  136. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/trackStream.js +89 -0
  137. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/validator.js +112 -0
  138. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  139. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  140. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  141. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/index.js +13 -0
  142. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/common/utils.js +52 -0
  143. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/index.js +7 -0
  144. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  145. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  146. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  147. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/index.js +37 -0
  148. package/node_modules/@appium/base-driver/node_modules/axios/lib/utils.js +1150 -0
  149. package/node_modules/@appium/base-driver/node_modules/axios/package.json +203 -0
  150. package/node_modules/@appium/base-driver/package.json +6 -6
  151. package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
  152. package/node_modules/@appium/support/build/lib/npm.js +2 -1
  153. package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
  154. package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
  155. package/node_modules/@appium/support/build/lib/util.js +13 -1
  156. package/node_modules/@appium/support/build/lib/util.js.map +1 -1
  157. package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
  158. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  159. package/node_modules/@appium/support/build/lib/zip.js +193 -64
  160. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  161. package/node_modules/@appium/support/lib/npm.ts +2 -1
  162. package/node_modules/@appium/support/lib/util.ts +13 -1
  163. package/node_modules/@appium/support/lib/zip.ts +231 -71
  164. package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +1934 -0
  165. package/node_modules/@appium/support/node_modules/axios/LICENSE +7 -0
  166. package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  167. package/node_modules/@appium/support/node_modules/axios/README.md +2851 -0
  168. package/node_modules/@appium/support/node_modules/axios/dist/axios.js +5807 -0
  169. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +5 -0
  170. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +1 -0
  171. package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +5829 -0
  172. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +5850 -0
  173. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +3 -0
  174. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  175. package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +6808 -0
  176. package/node_modules/@appium/support/node_modules/axios/index.d.cts +766 -0
  177. package/node_modules/@appium/support/node_modules/axios/index.d.ts +787 -0
  178. package/node_modules/@appium/support/node_modules/axios/index.js +45 -0
  179. package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +36 -0
  180. package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +132 -0
  181. package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +696 -0
  182. package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +1490 -0
  183. package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +277 -0
  184. package/node_modules/@appium/support/node_modules/axios/lib/axios.js +89 -0
  185. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  186. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  187. package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +5 -0
  188. package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +306 -0
  189. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +219 -0
  190. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  191. package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  192. package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +8 -0
  193. package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +76 -0
  194. package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  195. package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +174 -0
  196. package/node_modules/@appium/support/node_modules/axios/lib/core/methodList.js +17 -0
  197. package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  198. package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +27 -0
  199. package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +28 -0
  200. package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +178 -0
  201. package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +10 -0
  202. package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +3 -0
  203. package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +2 -0
  204. package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +1 -0
  205. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  206. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  207. package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  208. package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  209. package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +7 -0
  210. package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  211. package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +14 -0
  212. package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +69 -0
  213. package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +18 -0
  214. package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  215. package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  216. package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +64 -0
  217. package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  218. package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  219. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  220. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  221. package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  222. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  223. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  224. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  225. package/node_modules/@appium/support/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  226. package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +2 -0
  227. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  228. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  229. package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  230. package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +15 -0
  231. package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  232. package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  233. package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  234. package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +55 -0
  235. package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +28 -0
  236. package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +45 -0
  237. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +279 -0
  238. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  239. package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +89 -0
  240. package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +112 -0
  241. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  242. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  243. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  244. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +13 -0
  245. package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +52 -0
  246. package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +7 -0
  247. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  248. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  249. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  250. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +37 -0
  251. package/node_modules/@appium/support/node_modules/axios/lib/utils.js +1150 -0
  252. package/node_modules/@appium/support/node_modules/axios/package.json +203 -0
  253. package/node_modules/@appium/support/package.json +6 -6
  254. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
  255. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
  256. package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
  257. package/node_modules/@appium/types/package.json +2 -2
  258. package/node_modules/appium-android-driver/CHANGELOG.md +6 -0
  259. package/node_modules/appium-android-driver/build/lib/commands/context/exports.d.ts.map +1 -1
  260. package/node_modules/appium-android-driver/build/lib/commands/context/exports.js +9 -5
  261. package/node_modules/appium-android-driver/build/lib/commands/context/exports.js.map +1 -1
  262. package/node_modules/appium-android-driver/lib/commands/context/exports.ts +9 -5
  263. package/node_modules/appium-android-driver/package.json +1 -1
  264. package/node_modules/appium-chromedriver/CHANGELOG.md +14 -0
  265. package/node_modules/appium-chromedriver/build/lib/commands/version.d.ts.map +1 -1
  266. package/node_modules/appium-chromedriver/build/lib/commands/version.js +9 -0
  267. package/node_modules/appium-chromedriver/build/lib/commands/version.js.map +1 -1
  268. package/node_modules/appium-chromedriver/config/mapping.json +1 -0
  269. package/node_modules/appium-chromedriver/lib/commands/version.ts +10 -0
  270. package/node_modules/appium-chromedriver/package.json +2 -2
  271. package/node_modules/asyncbox/README.md +43 -0
  272. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +9 -0
  273. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
  274. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +35 -0
  275. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
  276. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +9 -0
  277. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
  278. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js +23 -0
  279. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
  280. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts +9 -0
  281. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
  282. package/node_modules/asyncbox/build/cjs/lib/errors.js +20 -0
  283. package/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
  284. package/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
  285. package/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
  286. package/node_modules/asyncbox/build/cjs/lib/index.js +24 -0
  287. package/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
  288. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
  289. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
  290. package/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
  291. package/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
  292. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts +74 -0
  293. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
  294. package/node_modules/asyncbox/build/cjs/lib/lock.js +295 -0
  295. package/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
  296. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +15 -0
  297. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
  298. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
  299. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
  300. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts +17 -0
  301. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
  302. package/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
  303. package/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
  304. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +20 -0
  305. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
  306. package/node_modules/asyncbox/build/cjs/lib/sleep.js +61 -0
  307. package/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
  308. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +18 -0
  309. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
  310. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +51 -0
  311. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
  312. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +16 -0
  313. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
  314. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js +45 -0
  315. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
  316. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
  317. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
  318. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js +32 -0
  319. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
  320. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +9 -0
  321. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
  322. package/node_modules/asyncbox/build/esm/lib/asyncmap.js +20 -0
  323. package/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
  324. package/node_modules/asyncbox/build/esm/lib/errors.d.ts +9 -0
  325. package/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
  326. package/node_modules/asyncbox/build/esm/lib/errors.js +15 -0
  327. package/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
  328. package/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
  329. package/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
  330. package/node_modules/asyncbox/build/esm/lib/index.js +10 -0
  331. package/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
  332. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
  333. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
  334. package/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
  335. package/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
  336. package/node_modules/asyncbox/build/esm/lib/lock.d.ts +74 -0
  337. package/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
  338. package/node_modules/asyncbox/build/esm/lib/lock.js +291 -0
  339. package/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
  340. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
  341. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
  342. package/node_modules/asyncbox/build/esm/lib/long-sleep.js +33 -0
  343. package/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
  344. package/node_modules/asyncbox/build/esm/lib/retry.d.ts +17 -0
  345. package/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
  346. package/node_modules/asyncbox/build/esm/lib/retry.js +53 -0
  347. package/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
  348. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts +20 -0
  349. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
  350. package/node_modules/asyncbox/build/esm/lib/sleep.js +58 -0
  351. package/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
  352. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
  353. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
  354. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +48 -0
  355. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
  356. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +16 -0
  357. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
  358. package/node_modules/asyncbox/build/esm/lib/with-timeout.js +42 -0
  359. package/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
  360. package/node_modules/asyncbox/lib/asyncfilter.ts +38 -0
  361. package/node_modules/asyncbox/lib/asyncmap.ts +29 -0
  362. package/node_modules/asyncbox/lib/errors.ts +15 -0
  363. package/node_modules/asyncbox/lib/index.ts +21 -0
  364. package/node_modules/asyncbox/lib/limit-function.ts +18 -0
  365. package/node_modules/asyncbox/lib/lock.ts +360 -0
  366. package/node_modules/asyncbox/lib/long-sleep.ts +38 -0
  367. package/node_modules/asyncbox/lib/retry.ts +61 -0
  368. package/node_modules/asyncbox/lib/sleep.ts +79 -0
  369. package/node_modules/asyncbox/lib/wait-for-condition.ts +52 -0
  370. package/node_modules/asyncbox/lib/with-timeout.ts +43 -0
  371. package/node_modules/asyncbox/package.json +8 -8
  372. package/node_modules/axios/README.md +41 -106
  373. package/node_modules/axios/dist/axios.js +931 -278
  374. package/node_modules/axios/dist/axios.min.js +2 -2
  375. package/node_modules/axios/dist/axios.min.js.map +1 -1
  376. package/node_modules/axios/dist/browser/axios.cjs +948 -268
  377. package/node_modules/axios/dist/esm/axios.js +948 -268
  378. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  379. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  380. package/node_modules/axios/dist/node/axios.cjs +925 -242
  381. package/node_modules/axios/index.d.cts +20 -1
  382. package/node_modules/axios/index.d.ts +18 -1
  383. package/node_modules/axios/lib/adapters/fetch.js +73 -20
  384. package/node_modules/axios/lib/adapters/http.js +145 -26
  385. package/node_modules/axios/lib/adapters/xhr.js +120 -13
  386. package/node_modules/axios/lib/core/Axios.js +67 -12
  387. package/node_modules/axios/lib/core/AxiosError.js +59 -0
  388. package/node_modules/axios/lib/core/AxiosHeaders.js +17 -4
  389. package/node_modules/axios/lib/core/InterceptorManager.js +13 -2
  390. package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  391. package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  392. package/node_modules/axios/lib/core/dispatchRequest.js +20 -0
  393. package/node_modules/axios/lib/core/mergeConfig.js +183 -120
  394. package/node_modules/axios/lib/defaults/transitional.js +1 -0
  395. package/node_modules/axios/lib/env/data.js +1 -1
  396. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +11 -2
  397. package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -1
  398. package/node_modules/axios/lib/helpers/composeSignals.js +6 -3
  399. package/node_modules/axios/lib/helpers/cookies.js +30 -6
  400. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +34 -7
  401. package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  402. package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -1
  403. package/node_modules/axios/lib/helpers/fromDataURI.js +8 -2
  404. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +4 -9
  405. package/node_modules/axios/lib/helpers/parseHeaders.js +2 -1
  406. package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  407. package/node_modules/axios/lib/helpers/resolveConfig.js +16 -3
  408. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +16 -1
  409. package/node_modules/axios/lib/utils.js +61 -10
  410. package/node_modules/axios/package.json +1 -2
  411. package/node_modules/body-parser/README.md +17 -13
  412. package/node_modules/body-parser/lib/read.js +74 -57
  413. package/node_modules/body-parser/lib/types/json.js +11 -11
  414. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  415. package/node_modules/body-parser/lib/utils.js +0 -15
  416. package/node_modules/body-parser/package.json +7 -12
  417. package/node_modules/follow-redirects/README.md +27 -1
  418. package/node_modules/follow-redirects/index.js +1 -5
  419. package/node_modules/follow-redirects/package.json +1 -1
  420. package/node_modules/io.appium.settings/CHANGELOG.md +7 -0
  421. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  422. package/node_modules/io.appium.settings/package.json +2 -2
  423. package/node_modules/on-finished/index.js +14 -2
  424. package/node_modules/on-finished/package.json +11 -7
  425. package/node_modules/qs/.editorconfig +1 -1
  426. package/node_modules/qs/CHANGELOG.md +45 -22
  427. package/node_modules/qs/README.md +26 -1
  428. package/node_modules/qs/dist/qs.js +27 -27
  429. package/node_modules/qs/eslint.config.mjs +61 -50
  430. package/node_modules/qs/lib/formats.js +7 -2
  431. package/node_modules/qs/lib/parse.js +13 -6
  432. package/node_modules/qs/lib/stringify.js +5 -3
  433. package/node_modules/qs/lib/utils.js +15 -7
  434. package/node_modules/qs/package.json +6 -6
  435. package/node_modules/qs/test/parse.js +266 -2
  436. package/node_modules/qs/test/stringify.js +222 -0
  437. package/node_modules/qs/test/utils.js +61 -3
  438. package/node_modules/shell-quote/README.md +37 -4
  439. package/node_modules/shell-quote/package.json +10 -6
  440. package/node_modules/shell-quote/parse.d.ts +1 -1
  441. package/node_modules/shell-quote/parse.js +63 -11
  442. package/node_modules/shell-quote/quote.d.ts +2 -1
  443. package/node_modules/shell-quote/quote.js +23 -3
  444. package/node_modules/uuid/package.json +17 -17
  445. package/node_modules/ws/lib/websocket.js +17 -3
  446. package/node_modules/ws/package.json +1 -1
  447. package/package.json +5 -5
  448. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  449. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  450. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
  451. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  452. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  453. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  454. package/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
  455. package/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  456. package/node_modules/asyncbox/lib/asyncbox.ts +0 -382
  457. package/node_modules/on-finished/HISTORY.md +0 -98
  458. package/node_modules/shell-quote/.nycrc +0 -14
  459. package/node_modules/shell-quote/eslint.config.mjs +0 -29
  460. package/node_modules/shell-quote/security.md +0 -11
  461. package/node_modules/shell-quote/test/comment.js +0 -16
  462. package/node_modules/shell-quote/test/env.js +0 -52
  463. package/node_modules/shell-quote/test/env_fn.js +0 -21
  464. package/node_modules/shell-quote/test/op.js +0 -102
  465. package/node_modules/shell-quote/test/parse.js +0 -149
  466. package/node_modules/shell-quote/test/quote.js +0 -145
  467. package/node_modules/shell-quote/test/set.js +0 -31
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../lib/express/server.ts"],"names":[],"mappings":";;;;;AA2GA,wBAsEC;AAOD,0CAmDC;AAQD,8CAeC;AAlQD,0DAA6B;AAE7B,6CAA0C;AAE1C,wFAAwF;AACxF,4EAA4E;AAC5E,6CAA2C;AAS3C,8DAAqC;AACrC,sDAA8B;AAE9B,sEAA6C;AAE7C,4CAA+C;AAC/C,2CAA2D;AAC3D,uDAAqE;AACrE,qCAA6B;AAC7B,6CAUsB;AACtB,2CAKqB;AAErB,MAAM,qBAAqB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;AA6D3D;;;GAGG;AACI,KAAK,UAAU,MAAM,CAAC,IAAgB;IAC3C,MAAM,EACJ,wBAAwB,EACxB,IAAI,EACJ,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,IAAI,EAChB,QAAQ,GAAG,6BAAiB,EAC5B,cAAc,GAAG,EAAE,EACnB,cAAc,GAAG,EAAE,EACnB,gBAAgB,G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CAAC,CAAC;QAC1C,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,UAAU,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC/C,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;QACrC,UAAU,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;IACD,wDAAwD;IACxD,UAAU,CAAC,cAAc,GAAG,gBAAgB,GAAG,CAAC,GAAG,IAAI,CAAC;IACxD,MAAM,YAAY,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,SAAS,wBAAwB,CAAC,MAAkB;IAClD,6DAA6D;IAC7D,oEAAoE;IACpE,IAAI,CAAC;QACH,OAAO,OAAQ,MAAuD,CAAC,qBAAqB,KAAK,WAAW,CAAC;IAC/G,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -10,8 +10,7 @@ export declare const BIDI_COMMANDS: {
10
10
  readonly unsubscribe: {
11
11
  readonly command: "bidiUnsubscribe";
12
12
  readonly params: {
13
- readonly required: readonly ["events"];
14
- readonly optional: readonly ["contexts"];
13
+ readonly optional: readonly ["events", "contexts", "subscriptions"];
15
14
  };
16
15
  };
17
16
  readonly status: {
@@ -1 +1 @@
1
- {"version":3,"file":"bidi-commands.d.ts","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBQ,CAAC"}
1
+ {"version":3,"file":"bidi-commands.d.ts","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBQ,CAAC"}
@@ -1,19 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BIDI_COMMANDS = void 0;
4
- const SUBSCRIPTION_REQUEST_PARAMS = {
4
+ const SUBSCRIBE_PARAMS = {
5
5
  required: ['events'],
6
6
  optional: ['contexts'],
7
7
  };
8
+ // `subscriptions` and `events` are alternative spec forms; `contexts` is a non-standard
9
+ // addition to `events`. `subscriptions` excludes the others, which bidiUnsubscribe validates.
10
+ const UNSUBSCRIBE_PARAMS = {
11
+ optional: ['events', 'contexts', 'subscriptions'],
12
+ };
8
13
  exports.BIDI_COMMANDS = {
9
14
  session: {
10
15
  subscribe: {
11
16
  command: 'bidiSubscribe',
12
- params: SUBSCRIPTION_REQUEST_PARAMS,
17
+ params: SUBSCRIBE_PARAMS,
13
18
  },
14
19
  unsubscribe: {
15
20
  command: 'bidiUnsubscribe',
16
- params: SUBSCRIPTION_REQUEST_PARAMS,
21
+ params: UNSUBSCRIBE_PARAMS,
17
22
  },
18
23
  status: {
19
24
  command: 'bidiStatus',
@@ -1 +1 @@
1
- {"version":3,"file":"bidi-commands.js","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":";;;AAEA,MAAM,2BAA2B,GAAG;IAClC,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACd,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,SAAS,EAAE;YACT,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,2BAA2B;SACpC;QACD,WAAW,EAAE;YACX,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,2BAA2B;SACpC;QACD,MAAM,EAAE;YACN,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE,EAAE;SACX;KACF;IACD,eAAe,EAAE;QACf,QAAQ,EAAE;YACR,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE;gBACN,QAAQ,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;gBAC5B,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF;KACF;CAC+B,CAAC;AAEnC,8CAA8C;AAC9C,mDAAmD"}
1
+ {"version":3,"file":"bidi-commands.js","sourceRoot":"","sources":["../../../lib/protocol/bidi-commands.ts"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACd,CAAC;AAEX,wFAAwF;AACxF,8FAA8F;AAC9F,MAAM,kBAAkB,GAAG;IACzB,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC;CACzC,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,SAAS,EAAE;YACT,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,gBAAgB;SACzB;QACD,WAAW,EAAE;YACX,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,kBAAkB;SAC3B;QACD,MAAM,EAAE;YACN,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE,EAAE;SACX;KACF;IACD,eAAe,EAAE;QACf,QAAQ,EAAE;YACR,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE;gBACN,QAAQ,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;gBAC5B,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF;KACF;CAC+B,CAAC;AAEnC,8CAA8C;AAC9C,mDAAmD"}
@@ -0,0 +1,36 @@
1
+ import {util} from '@appium/support';
2
+
3
+ type BidiSubscriptionDriver = {bidiEventSubs: Record<string, string[]>};
4
+
5
+ // subscription id -> event name -> contexts; kept per id so removing one keeps overlapping ones
6
+ type Subscriptions = Map<string, Map<string, string[]>>;
7
+
8
+ const subscriptionsByDriver = new WeakMap<object, Subscriptions>();
9
+
10
+ /** Get (or lazily create) the subscription registry of the given driver */
11
+ export function getSubscriptions(driver: object): Subscriptions {
12
+ let subscriptions = subscriptionsByDriver.get(driver);
13
+ if (!subscriptions) {
14
+ subscriptions = new Map();
15
+ subscriptionsByDriver.set(driver, subscriptions);
16
+ }
17
+ return subscriptions;
18
+ }
19
+
20
+ /** Recompute `bidiEventSubs` as the union of all registered subscriptions */
21
+ export function refreshEventSubscriptions(driver: BidiSubscriptionDriver): void {
22
+ const events = new Map<string, string[]>();
23
+ for (const subscription of getSubscriptions(driver).values()) {
24
+ for (const [event, contexts] of subscription) {
25
+ events.set(event, util.uniq([...(events.get(event) ?? []), ...contexts]));
26
+ }
27
+ }
28
+ // Object.fromEntries defines own properties, so names like '__proto__' stay safe
29
+ driver.bidiEventSubs = Object.fromEntries(events);
30
+ }
31
+
32
+ /** Forget all subscriptions, e.g. when the session ends */
33
+ export function clearBidiSubscriptions(driver: BidiSubscriptionDriver): void {
34
+ subscriptionsByDriver.delete(driver);
35
+ driver.bidiEventSubs = {};
36
+ }
@@ -1,7 +1,9 @@
1
1
  import {util} from '@appium/support';
2
2
  import type {Constraints, DriverStatus, IBidiCommands} from '@appium/types';
3
3
 
4
+ import {errors} from '../../protocol/errors';
4
5
  import type {BaseDriver} from '../driver';
6
+ import {getSubscriptions, refreshEventSubscriptions} from './bidi-subscriptions';
5
7
  import {mixin} from './mixin';
6
8
 
7
9
  declare module '../driver' {
@@ -9,25 +11,67 @@ declare module '../driver' {
9
11
  interface BaseDriver<C extends Constraints> extends IBidiCommands {}
10
12
  }
11
13
 
14
+ function assertStringList(value: unknown, name: string): asserts value is string[] {
15
+ if (!Array.isArray(value) || !value.length || value.some((item) => typeof item !== 'string' || !item.length)) {
16
+ throw new errors.InvalidArgumentError(`${name} must be a non-empty array of non-empty strings`);
17
+ }
18
+ }
19
+
20
+ function assertContexts(value: unknown): asserts value is string[] {
21
+ if (!Array.isArray(value) || value.some((context) => typeof context !== 'string')) {
22
+ throw new errors.InvalidArgumentError('contexts must be an array of strings');
23
+ }
24
+ }
25
+
12
26
  const BidiCommands: IBidiCommands = {
13
27
  async bidiSubscribe<C extends Constraints>(this: BaseDriver<C>, events: string[], contexts: string[] = ['']) {
14
- for (const event of events) {
15
- // a later subscribe for the same event must keep existing contexts; the spec appends subscriptions
16
- const existing = this.bidiEventSubs[event] ?? [];
17
- this.bidiEventSubs[event] = util.uniq([...existing, ...contexts]);
18
- }
28
+ assertStringList(events, 'events');
29
+ assertContexts(contexts);
30
+ const subscription = util.uuidV4();
31
+ getSubscriptions(this).set(subscription, new Map(events.map((event) => [event, [...contexts]])));
32
+ refreshEventSubscriptions(this);
33
+ return {subscription};
19
34
  },
20
35
 
21
- async bidiUnsubscribe<C extends Constraints>(this: BaseDriver<C>, events: string[], contexts: string[] = ['']) {
22
- for (const event of events) {
23
- if (!this.bidiEventSubs[event]) {
24
- continue;
36
+ async bidiUnsubscribe<C extends Constraints>(
37
+ this: BaseDriver<C>,
38
+ events?: string[],
39
+ contexts?: string[],
40
+ subscriptions?: string[],
41
+ ) {
42
+ const registered = getSubscriptions(this);
43
+ if (subscriptions === undefined) {
44
+ const contextsToRemove = contexts ?? [''];
45
+ assertStringList(events, 'events');
46
+ assertContexts(contextsToRemove);
47
+ for (const subscription of registered.values()) {
48
+ for (const event of events) {
49
+ const remaining = subscription.get(event)?.filter((c) => !contextsToRemove.includes(c));
50
+ if (remaining?.length) {
51
+ subscription.set(event, remaining);
52
+ } else {
53
+ subscription.delete(event);
54
+ }
55
+ }
25
56
  }
26
- this.bidiEventSubs[event] = this.bidiEventSubs[event].filter((c) => !contexts.includes(c));
27
- if (this.bidiEventSubs[event].length === 0) {
28
- delete this.bidiEventSubs[event];
57
+ refreshEventSubscriptions(this);
58
+ return;
59
+ }
60
+
61
+ assertStringList(subscriptions, 'subscriptions');
62
+ if (events !== undefined || contexts !== undefined) {
63
+ throw new errors.InvalidArgumentError('subscriptions cannot be combined with events or contexts');
64
+ }
65
+ // validate everything before removing anything
66
+ for (const id of subscriptions) {
67
+ if (!registered.has(id)) {
68
+ throw new errors.InvalidArgumentError(`Unknown subscription id: ${id}`);
29
69
  }
30
70
  }
71
+ for (const id of subscriptions) {
72
+ registered.delete(id);
73
+ }
74
+ refreshEventSubscriptions(this);
31
75
  },
32
76
 
33
77
  async bidiStatus<C extends Constraints>(this: BaseDriver<C>): Promise<DriverStatus> {
@@ -26,6 +26,7 @@ import {calcSignature} from '../helpers/session';
26
26
  import {DELETE_SESSION_COMMAND, determineProtocol, errors} from '../protocol';
27
27
  import {mergePlainObjects} from '../utils';
28
28
  import {processCapabilities, validateCaps} from './capabilities';
29
+ import {clearBidiSubscriptions} from './commands/bidi-subscriptions';
29
30
  import {DriverCore} from './core';
30
31
  import * as helpers from './helpers';
31
32
 
@@ -392,6 +393,7 @@ export class BaseDriver<
392
393
  }
393
394
  }
394
395
  this.sessionId = null;
396
+ clearBidiSubscriptions(this);
395
397
  }
396
398
 
397
399
  logExtraCaps(caps: Capabilities<C>) {
@@ -91,25 +91,44 @@ export function defaultToJSONContentType(req: Request, _res: Response, next: Nex
91
91
  next();
92
92
  }
93
93
 
94
+ /** Options for {@linkcode tryHandleWebSocketUpgrade} */
95
+ export interface WebSocketUpgradeOpts {
96
+ /** Incoming HTTP request */
97
+ req: IncomingMessage;
98
+ /** Network socket */
99
+ socket: Duplex;
100
+ /** First packet of the upgraded stream */
101
+ head: Buffer;
102
+ /** Path-to-WebSocket-server mapping */
103
+ webSocketsMapping: StringRecord<WSServer>;
104
+ /** Whether upgrades carrying an `Origin` header are accepted */
105
+ allowCors?: boolean;
106
+ }
107
+
94
108
  /**
95
109
  * Attempts to handle a WebSocket upgrade by matching the request path against registered handlers.
96
110
  *
97
- * @param req - Incoming HTTP request
98
- * @param socket - Network socket
99
- * @param head - First packet of the upgraded stream
100
- * @param webSocketsMapping - Path-to-WebSocket-server mapping
111
+ * @param opts - Upgrade options
101
112
  * @returns `true` if the upgrade was handled; `false` otherwise
102
113
  */
103
- export function tryHandleWebSocketUpgrade(
104
- req: IncomingMessage,
105
- socket: Duplex,
106
- head: Buffer,
107
- webSocketsMapping: StringRecord<WSServer>,
108
- ): boolean {
114
+ export function tryHandleWebSocketUpgrade({
115
+ req,
116
+ socket,
117
+ head,
118
+ webSocketsMapping,
119
+ allowCors = false,
120
+ }: WebSocketUpgradeOpts): boolean {
109
121
  if (String(req.headers?.upgrade ?? '').toLowerCase() !== 'websocket') {
110
122
  return false;
111
123
  }
112
124
 
125
+ // WebSocket handshakes are not subject to the Same-Origin Policy; browsers always send Origin
126
+ if (!allowCors && req.headers.origin !== undefined) {
127
+ log.warn(`Rejecting the WebSocket upgrade from the browser origin '${req.headers.origin}'`);
128
+ socket.end('HTTP/1.1 403 Forbidden\r\nConnection: close\r\nContent-Length: 0\r\n\r\n');
129
+ return true;
130
+ }
131
+
113
132
  let currentPathname: string;
114
133
  try {
115
134
  currentPathname = new URL(req.url ?? '', 'http://localhost').pathname;
@@ -133,11 +152,12 @@ export function tryHandleWebSocketUpgrade(
133
152
  * Delegates WebSocket upgrades to the mapping and falls through to `next()` otherwise.
134
153
  *
135
154
  * @param webSocketsMapping - Path-to-WebSocket-server mapping
155
+ * @param allowCors - Whether upgrades carrying an `Origin` header are accepted
136
156
  * @returns Express request handler
137
157
  */
138
- export function handleUpgrade(webSocketsMapping: StringRecord<WSServer>): RequestHandler {
158
+ export function handleUpgrade(webSocketsMapping: StringRecord<WSServer>, allowCors = false): RequestHandler {
139
159
  function handleUpgradeMiddleware(req: Request, res: Response, next: NextFunction): void {
140
- if (tryHandleWebSocketUpgrade(req, req.socket, Buffer.from(''), webSocketsMapping)) {
160
+ if (tryHandleWebSocketUpgrade({req, socket: req.socket, head: Buffer.from(''), webSocketsMapping, allowCors})) {
141
161
  return;
142
162
  }
143
163
  next();
@@ -88,6 +88,7 @@ export interface ConfigureServerInternalOpts extends ConfigureServerOpts {
88
88
  export interface ConfigureHttpOpts {
89
89
  httpServer: HttpServer;
90
90
  reject: (error?: unknown) => void;
91
+ allowCors?: boolean;
91
92
  keepAliveTimeout: number;
92
93
  gracefulShutdownTimeout?: number;
93
94
  }
@@ -131,6 +132,7 @@ export async function server(opts: ServerOpts): Promise<AppiumServer> {
131
132
  const appiumServer = configureHttp({
132
133
  httpServer,
133
134
  reject,
135
+ allowCors,
134
136
  keepAliveTimeout,
135
137
  gracefulShutdownTimeout: cliArgs.shutdownTimeout,
136
138
  });
@@ -207,7 +209,7 @@ export function configureServer(opts: ConfigureServerOpts): void {
207
209
  // When shouldUpgradeCallback is available, upgrades are handled directly on the HTTP server
208
210
  // to avoid Express middleware timeout issues with long-lived connections
209
211
  if (useLegacyUpgradeHandler) {
210
- app.use(handleUpgrade(webSocketsMapping));
212
+ app.use(handleUpgrade(webSocketsMapping, allowCors));
211
213
  }
212
214
  if (allowCors) {
213
215
  app.use(allowCrossDomain);
@@ -309,6 +311,7 @@ async function createServer(app: Express, cliArgs?: Partial<ServerArgs>): Promis
309
311
  function configureHttp({
310
312
  httpServer,
311
313
  reject,
314
+ allowCors,
312
315
  keepAliveTimeout,
313
316
  gracefulShutdownTimeout,
314
317
  }: ConfigureHttpOpts): AppiumServer {
@@ -332,7 +335,9 @@ function configureHttp({
332
335
  appiumServer as unknown as {shouldUpgradeCallback?: (req: http.IncomingMessage) => boolean}
333
336
  ).shouldUpgradeCallback = (req) => String(req.headers?.upgrade ?? '').toLowerCase() === 'websocket';
334
337
  appiumServer.on('upgrade', (req, socket, head) => {
335
- if (!tryHandleWebSocketUpgrade(req, socket, head, appiumServer.webSocketsMapping)) {
338
+ if (
339
+ !tryHandleWebSocketUpgrade({req, socket, head, webSocketsMapping: appiumServer.webSocketsMapping, allowCors})
340
+ ) {
336
341
  socket.destroy();
337
342
  }
338
343
  });
@@ -1,19 +1,25 @@
1
1
  import type {BidiModuleMap} from '@appium/types';
2
2
 
3
- const SUBSCRIPTION_REQUEST_PARAMS = {
3
+ const SUBSCRIBE_PARAMS = {
4
4
  required: ['events'],
5
5
  optional: ['contexts'],
6
6
  } as const;
7
7
 
8
+ // `subscriptions` and `events` are alternative spec forms; `contexts` is a non-standard
9
+ // addition to `events`. `subscriptions` excludes the others, which bidiUnsubscribe validates.
10
+ const UNSUBSCRIBE_PARAMS = {
11
+ optional: ['events', 'contexts', 'subscriptions'],
12
+ } as const;
13
+
8
14
  export const BIDI_COMMANDS = {
9
15
  session: {
10
16
  subscribe: {
11
17
  command: 'bidiSubscribe',
12
- params: SUBSCRIPTION_REQUEST_PARAMS,
18
+ params: SUBSCRIBE_PARAMS,
13
19
  },
14
20
  unsubscribe: {
15
21
  command: 'bidiUnsubscribe',
16
- params: SUBSCRIPTION_REQUEST_PARAMS,
22
+ params: UNSUBSCRIBE_PARAMS,
17
23
  },
18
24
  status: {
19
25
  command: 'bidiStatus',