appium-xcuitest-driver 12.22.0 → 12.22.2

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 (369) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/context.d.ts.map +1 -1
  3. package/build/lib/commands/context.js +120 -60
  4. package/build/lib/commands/context.js.map +1 -1
  5. package/lib/commands/context.ts +134 -71
  6. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts +12 -0
  7. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts.map +1 -0
  8. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js +33 -0
  9. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js.map +1 -0
  10. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.d.ts.map +1 -1
  11. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js +49 -12
  12. package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js.map +1 -1
  13. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.d.ts.map +1 -1
  14. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js +2 -0
  15. package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js.map +1 -1
  16. package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts +17 -6
  17. package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts.map +1 -1
  18. package/node_modules/@appium/base-driver/build/lib/express/middleware.js +11 -7
  19. package/node_modules/@appium/base-driver/build/lib/express/middleware.js.map +1 -1
  20. package/node_modules/@appium/base-driver/build/lib/express/server.d.ts +1 -0
  21. package/node_modules/@appium/base-driver/build/lib/express/server.d.ts.map +1 -1
  22. package/node_modules/@appium/base-driver/build/lib/express/server.js +4 -3
  23. package/node_modules/@appium/base-driver/build/lib/express/server.js.map +1 -1
  24. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts +1 -2
  25. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts.map +1 -1
  26. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js +8 -3
  27. package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js.map +1 -1
  28. package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi-subscriptions.ts +36 -0
  29. package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi.ts +56 -12
  30. package/node_modules/@appium/base-driver/lib/basedriver/driver.ts +2 -0
  31. package/node_modules/@appium/base-driver/lib/express/middleware.ts +32 -12
  32. package/node_modules/@appium/base-driver/lib/express/server.ts +7 -2
  33. package/node_modules/@appium/base-driver/lib/protocol/bidi-commands.ts +9 -3
  34. package/node_modules/@appium/base-driver/node_modules/axios/CHANGELOG.md +1934 -0
  35. package/node_modules/@appium/base-driver/node_modules/axios/LICENSE +7 -0
  36. package/node_modules/@appium/base-driver/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  37. package/node_modules/@appium/base-driver/node_modules/axios/README.md +2851 -0
  38. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.js +5807 -0
  39. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js +5 -0
  40. package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js.map +1 -0
  41. package/node_modules/@appium/base-driver/node_modules/axios/dist/browser/axios.cjs +5829 -0
  42. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.js +5850 -0
  43. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js +3 -0
  44. package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  45. package/node_modules/@appium/base-driver/node_modules/axios/dist/node/axios.cjs +6808 -0
  46. package/node_modules/@appium/base-driver/node_modules/axios/index.d.cts +766 -0
  47. package/node_modules/@appium/base-driver/node_modules/axios/index.d.ts +787 -0
  48. package/node_modules/@appium/base-driver/node_modules/axios/index.js +45 -0
  49. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/README.md +36 -0
  50. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/adapters.js +132 -0
  51. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/fetch.js +696 -0
  52. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/http.js +1490 -0
  53. package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/xhr.js +277 -0
  54. package/node_modules/@appium/base-driver/node_modules/axios/lib/axios.js +89 -0
  55. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  56. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  57. package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/isCancel.js +5 -0
  58. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/Axios.js +306 -0
  59. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosError.js +219 -0
  60. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  61. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  62. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/README.md +8 -0
  63. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/buildFullPath.js +76 -0
  64. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  65. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/mergeConfig.js +174 -0
  66. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/methodList.js +17 -0
  67. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  68. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/settle.js +27 -0
  69. package/node_modules/@appium/base-driver/node_modules/axios/lib/core/transformData.js +28 -0
  70. package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/index.js +178 -0
  71. package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/transitional.js +10 -0
  72. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/README.md +3 -0
  73. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/classes/FormData.js +2 -0
  74. package/node_modules/@appium/base-driver/node_modules/axios/lib/env/data.js +1 -0
  75. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  76. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  77. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  78. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  79. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/README.md +7 -0
  80. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  81. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/bind.js +14 -0
  82. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/buildURL.js +69 -0
  83. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/callbackify.js +18 -0
  84. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  85. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  86. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/cookies.js +64 -0
  87. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  88. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  89. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  90. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  91. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  92. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  93. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  94. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  95. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  96. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/null.js +2 -0
  97. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  98. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  99. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  100. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/readBlob.js +15 -0
  101. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  102. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  103. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  104. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/speedometer.js +55 -0
  105. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/spread.js +28 -0
  106. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/throttle.js +45 -0
  107. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toFormData.js +279 -0
  108. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  109. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/trackStream.js +89 -0
  110. package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/validator.js +112 -0
  111. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  112. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  113. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  114. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/index.js +13 -0
  115. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/common/utils.js +52 -0
  116. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/index.js +7 -0
  117. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  118. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  119. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  120. package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/index.js +37 -0
  121. package/node_modules/@appium/base-driver/node_modules/axios/lib/utils.js +1150 -0
  122. package/node_modules/@appium/base-driver/node_modules/axios/package.json +203 -0
  123. package/node_modules/@appium/base-driver/package.json +6 -6
  124. package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
  125. package/node_modules/@appium/support/build/lib/npm.js +2 -1
  126. package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
  127. package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
  128. package/node_modules/@appium/support/build/lib/util.js +13 -1
  129. package/node_modules/@appium/support/build/lib/util.js.map +1 -1
  130. package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
  131. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  132. package/node_modules/@appium/support/build/lib/zip.js +193 -64
  133. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  134. package/node_modules/@appium/support/lib/npm.ts +2 -1
  135. package/node_modules/@appium/support/lib/util.ts +13 -1
  136. package/node_modules/@appium/support/lib/zip.ts +231 -71
  137. package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +1934 -0
  138. package/node_modules/@appium/support/node_modules/axios/LICENSE +7 -0
  139. package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  140. package/node_modules/@appium/support/node_modules/axios/README.md +2851 -0
  141. package/node_modules/@appium/support/node_modules/axios/dist/axios.js +5807 -0
  142. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +5 -0
  143. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +1 -0
  144. package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +5829 -0
  145. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +5850 -0
  146. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +3 -0
  147. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  148. package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +6808 -0
  149. package/node_modules/@appium/support/node_modules/axios/index.d.cts +766 -0
  150. package/node_modules/@appium/support/node_modules/axios/index.d.ts +787 -0
  151. package/node_modules/@appium/support/node_modules/axios/index.js +45 -0
  152. package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +36 -0
  153. package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +132 -0
  154. package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +696 -0
  155. package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +1490 -0
  156. package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +277 -0
  157. package/node_modules/@appium/support/node_modules/axios/lib/axios.js +89 -0
  158. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  159. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  160. package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +5 -0
  161. package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +306 -0
  162. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +219 -0
  163. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  164. package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  165. package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +8 -0
  166. package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +76 -0
  167. package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  168. package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +174 -0
  169. package/node_modules/@appium/support/node_modules/axios/lib/core/methodList.js +17 -0
  170. package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  171. package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +27 -0
  172. package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +28 -0
  173. package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +178 -0
  174. package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +10 -0
  175. package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +3 -0
  176. package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +2 -0
  177. package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +1 -0
  178. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  179. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  180. package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  181. package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  182. package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +7 -0
  183. package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  184. package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +14 -0
  185. package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +69 -0
  186. package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +18 -0
  187. package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  188. package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  189. package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +64 -0
  190. package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  191. package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  192. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  193. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  194. package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  195. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  196. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  197. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  198. package/node_modules/@appium/support/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  199. package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +2 -0
  200. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  201. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  202. package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  203. package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +15 -0
  204. package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  205. package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  206. package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  207. package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +55 -0
  208. package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +28 -0
  209. package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +45 -0
  210. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +279 -0
  211. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  212. package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +89 -0
  213. package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +112 -0
  214. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  215. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  216. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  217. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +13 -0
  218. package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +52 -0
  219. package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +7 -0
  220. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  221. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  222. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  223. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +37 -0
  224. package/node_modules/@appium/support/node_modules/axios/lib/utils.js +1150 -0
  225. package/node_modules/@appium/support/node_modules/axios/package.json +203 -0
  226. package/node_modules/@appium/support/package.json +6 -6
  227. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
  228. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
  229. package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
  230. package/node_modules/@appium/types/package.json +2 -2
  231. package/node_modules/appium-ios-device/CHANGELOG.md +12 -0
  232. package/node_modules/appium-ios-device/README.md +1 -0
  233. package/node_modules/appium-ios-device/package.json +2 -2
  234. package/node_modules/appium-ios-remotexpc/CHANGELOG.md +7 -0
  235. package/node_modules/appium-ios-remotexpc/build/src/services/ios/testmanagerd/xcuitest.d.ts +5 -1
  236. package/node_modules/appium-ios-remotexpc/build/src/services/ios/testmanagerd/xcuitest.d.ts.map +1 -1
  237. package/node_modules/appium-ios-remotexpc/build/src/services/ios/testmanagerd/xcuitest.js +23 -15
  238. package/node_modules/appium-ios-remotexpc/build/src/services/ios/testmanagerd/xcuitest.js.map +1 -1
  239. package/node_modules/appium-ios-remotexpc/package.json +2 -2
  240. package/node_modules/appium-ios-remotexpc/src/services/ios/testmanagerd/xcuitest.ts +26 -21
  241. package/node_modules/appium-webdriveragent/CHANGELOG.md +8 -0
  242. package/node_modules/appium-webdriveragent/README.md +1 -1
  243. package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +1 -1
  244. package/node_modules/appium-webdriveragent/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +5 -1
  245. package/node_modules/appium-webdriveragent/WebDriverAgentLib/Info.plist +2 -2
  246. package/node_modules/appium-webdriveragent/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +44 -0
  247. package/node_modules/appium-webdriveragent/package.json +2 -2
  248. package/node_modules/axios/README.md +41 -106
  249. package/node_modules/axios/dist/axios.js +931 -278
  250. package/node_modules/axios/dist/axios.min.js +2 -2
  251. package/node_modules/axios/dist/axios.min.js.map +1 -1
  252. package/node_modules/axios/dist/browser/axios.cjs +948 -268
  253. package/node_modules/axios/dist/esm/axios.js +948 -268
  254. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  255. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  256. package/node_modules/axios/dist/node/axios.cjs +925 -242
  257. package/node_modules/axios/index.d.cts +20 -1
  258. package/node_modules/axios/index.d.ts +18 -1
  259. package/node_modules/axios/lib/adapters/fetch.js +73 -20
  260. package/node_modules/axios/lib/adapters/http.js +145 -26
  261. package/node_modules/axios/lib/adapters/xhr.js +120 -13
  262. package/node_modules/axios/lib/core/Axios.js +67 -12
  263. package/node_modules/axios/lib/core/AxiosError.js +59 -0
  264. package/node_modules/axios/lib/core/AxiosHeaders.js +17 -4
  265. package/node_modules/axios/lib/core/InterceptorManager.js +13 -2
  266. package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  267. package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  268. package/node_modules/axios/lib/core/dispatchRequest.js +20 -0
  269. package/node_modules/axios/lib/core/mergeConfig.js +183 -120
  270. package/node_modules/axios/lib/defaults/transitional.js +1 -0
  271. package/node_modules/axios/lib/env/data.js +1 -1
  272. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +11 -2
  273. package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -1
  274. package/node_modules/axios/lib/helpers/composeSignals.js +6 -3
  275. package/node_modules/axios/lib/helpers/cookies.js +30 -6
  276. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +34 -7
  277. package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  278. package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -1
  279. package/node_modules/axios/lib/helpers/fromDataURI.js +8 -2
  280. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +4 -9
  281. package/node_modules/axios/lib/helpers/parseHeaders.js +2 -1
  282. package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  283. package/node_modules/axios/lib/helpers/resolveConfig.js +16 -3
  284. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +16 -1
  285. package/node_modules/axios/lib/utils.js +61 -10
  286. package/node_modules/axios/package.json +1 -2
  287. package/node_modules/body-parser/README.md +17 -13
  288. package/node_modules/body-parser/lib/read.js +74 -57
  289. package/node_modules/body-parser/lib/types/json.js +11 -11
  290. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  291. package/node_modules/body-parser/lib/utils.js +0 -15
  292. package/node_modules/body-parser/package.json +7 -12
  293. package/node_modules/qs/.editorconfig +1 -1
  294. package/node_modules/qs/CHANGELOG.md +45 -22
  295. package/node_modules/qs/README.md +26 -1
  296. package/node_modules/qs/dist/qs.js +27 -27
  297. package/node_modules/qs/eslint.config.mjs +61 -50
  298. package/node_modules/qs/lib/formats.js +7 -2
  299. package/node_modules/qs/lib/parse.js +13 -6
  300. package/node_modules/qs/lib/stringify.js +5 -3
  301. package/node_modules/qs/lib/utils.js +15 -7
  302. package/node_modules/qs/package.json +6 -6
  303. package/node_modules/qs/test/parse.js +266 -2
  304. package/node_modules/qs/test/stringify.js +222 -0
  305. package/node_modules/qs/test/utils.js +61 -3
  306. package/node_modules/shell-quote/README.md +37 -4
  307. package/node_modules/shell-quote/package.json +10 -6
  308. package/node_modules/shell-quote/parse.d.ts +1 -1
  309. package/node_modules/shell-quote/parse.js +63 -11
  310. package/node_modules/shell-quote/quote.d.ts +2 -1
  311. package/node_modules/shell-quote/quote.js +23 -3
  312. package/node_modules/uuid/package.json +17 -17
  313. package/package.json +5 -5
  314. package/node_modules/@appium/base-driver/node_modules/asyncbox/LICENSE +0 -203
  315. package/node_modules/@appium/base-driver/node_modules/asyncbox/README.md +0 -215
  316. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  317. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  318. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
  319. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  320. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
  321. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
  322. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
  323. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
  324. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/package.json +0 -3
  325. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  326. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  327. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
  328. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  329. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
  330. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
  331. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  332. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
  333. package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/package.json +0 -3
  334. package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/asyncbox.ts +0 -382
  335. package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/types.ts +0 -88
  336. package/node_modules/@appium/base-driver/node_modules/asyncbox/package.json +0 -74
  337. package/node_modules/@appium/support/node_modules/asyncbox/LICENSE +0 -203
  338. package/node_modules/@appium/support/node_modules/asyncbox/README.md +0 -215
  339. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  340. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  341. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
  342. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  343. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
  344. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
  345. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
  346. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
  347. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +0 -3
  348. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  349. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  350. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
  351. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  352. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
  353. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
  354. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  355. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
  356. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +0 -3
  357. package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncbox.ts +0 -382
  358. package/node_modules/@appium/support/node_modules/asyncbox/lib/types.ts +0 -88
  359. package/node_modules/@appium/support/node_modules/asyncbox/package.json +0 -74
  360. package/node_modules/shell-quote/.nycrc +0 -14
  361. package/node_modules/shell-quote/eslint.config.mjs +0 -29
  362. package/node_modules/shell-quote/security.md +0 -11
  363. package/node_modules/shell-quote/test/comment.js +0 -16
  364. package/node_modules/shell-quote/test/env.js +0 -52
  365. package/node_modules/shell-quote/test/env_fn.js +0 -21
  366. package/node_modules/shell-quote/test/op.js +0 -102
  367. package/node_modules/shell-quote/test/parse.js +0 -149
  368. package/node_modules/shell-quote/test/quote.js +0 -145
  369. package/node_modules/shell-quote/test/set.js +0 -31
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [12.22.2](https://github.com/appium/appium-xcuitest-driver/compare/v12.22.1...v12.22.2) (2026-10-28)
2
+
3
+ ### Bug Fixes
4
+
5
+ * stop stale remote debugger listeners when switching webview contexts ([#3089](https://github.com/appium/appium-xcuitest-driver/issues/3089)) ([e963398](https://github.com/appium/appium-xcuitest-driver/commit/e96339839225581647e0f90ea0d98d0a825db2dd))
6
+
7
+ ## [12.22.1](https://github.com/appium/appium-xcuitest-driver/compare/v12.22.0...v12.22.1) (2026-10-28)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * release to bump the dependency for shell quote ([6d988f1](https://github.com/appium/appium-xcuitest-driver/commit/6d988f1df3a6388545458bc55da75efb5309fb30))
12
+
1
13
  ## [12.22.0](https://github.com/appium/appium-xcuitest-driver/compare/v12.21.0...v12.22.0) (2026-10-27)
2
14
 
3
15
  ### Features
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/commands/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,cAAc,EAA6B,MAAM,wBAAwB,CAAC;AAOxG,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAMtC,OAAO,KAAK,EAAC,WAAW,EAAE,WAAW,EAAE,sBAAsB,EAAC,MAAM,YAAY,CAAC;AAGjF,eAAO,MAAM,YAAY,aAAoB,CAAC;AAI9C;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,GAAE,OAAc,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAU9G;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAsC/E;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,GAAE,OAAc,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAoCjG;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBjF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,gBAAgB,GAAE,MAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CA6BlH;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,cAAc,EACpB,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}
@@ -395,14 +395,6 @@ export async function getCurrentContext() {
395
395
  * @throws {errors.NoSuchContextError} If the specified context does not exist
396
396
  */
397
397
  export async function setContext(name, callback, skipReadyCheck = false) {
398
- function alreadyInContext(desired, current) {
399
- return (desired === current ||
400
- (desired === null && current === NATIVE_WIN) ||
401
- (desired === NATIVE_WIN && current === null));
402
- }
403
- function isNativeContext(context) {
404
- return context === NATIVE_WIN || context === null;
405
- }
406
398
  // allow the full context list to be passed in
407
399
  const strName = String(typeof name === 'object' && name && 'id' in name ? name.id : name);
408
400
  this.log.debug(`Attempting to set context to '${strName || NATIVE_WIN}' from '${this.curContext ? this.curContext : NATIVE_WIN}'`);
@@ -418,63 +410,16 @@ export async function setContext(name, callback, skipReadyCheck = false) {
418
410
  await notifyBiDiContextChange.bind(this)();
419
411
  return;
420
412
  }
421
- // switching into a webview context
422
- // if contexts have not already been retrieved, get them
423
- if (this.contexts === undefined) {
424
- await this.getContexts();
425
- }
426
- let contextId = strName.replace(WEBVIEW_BASE, '');
427
- if (contextId === '') {
428
- // allow user to pass in "WEBVIEW" without an index
429
- // the second context will be the first webview as
430
- // the first is always NATIVE_APP
431
- contextId = this.contexts[1];
432
- }
433
- if (!this.contexts.includes(contextId)) {
434
- throw new errors.NoSuchContextError();
435
- }
436
- const oldContext = this.curContext;
437
- this.curContext = this.curWindowHandle = contextId;
438
- // `contextId` will be in the form of `appId.pageId` in this case
439
- const [appIdKey, pageIdKey] = contextId.split('.').map((id) => parseInt(id, 10));
440
- try {
441
- this.selectingNewPage = true;
442
- await this.remote.selectPage(appIdKey, pageIdKey, skipReadyCheck);
443
- await notifyBiDiContextChange.bind(this)();
444
- }
445
- catch (err) {
446
- this.curContext = this.curWindowHandle = oldContext;
447
- throw err;
448
- }
449
- finally {
450
- this.selectingNewPage = false;
451
- }
413
+ const contextId = await resolveWebviewContextId.call(this, strName);
414
+ await stopPerformanceLog.call(this);
415
+ await selectWebviewPage.call(this, contextId, skipReadyCheck);
452
416
  // attempt to start performance logging, if requested
453
417
  if (this.opts.enablePerformanceLogging && this._remote) {
454
- const context = this.curContext;
455
- this.log.debug(`Starting performance log on '${context}'`);
456
- this.logs.performance = assignBiDiLogListener(this.eventEmitter, new IOSPerformanceLog({
457
- remoteDebugger: this.remote,
458
- log: this.log,
459
- }), {
460
- type: 'performance',
461
- context,
462
- })[0];
463
- await this.logs.performance?.startCapture();
418
+ await startPerformanceLog.call(this, contextId);
464
419
  }
465
420
  // start safari logging if the logs handlers are active
466
421
  if (name && name !== NATIVE_WIN && this.logs) {
467
- const { safariConsole, safariNetwork } = this.logs;
468
- if (safariConsole) {
469
- const consoleLog = safariConsole;
470
- const eventListener = (error, event) => consoleLog.onConsoleLogEvent(error, event);
471
- this.remote.startConsole(eventListener);
472
- }
473
- if (safariNetwork) {
474
- const networkLog = safariNetwork;
475
- const eventListener = (error, event, method) => networkLog.onNetworkEvent(error, event, method);
476
- this.remote.startNetwork(eventListener);
477
- }
422
+ restartSafariLogs.call(this);
478
423
  }
479
424
  }
480
425
  /**
@@ -541,4 +486,119 @@ function isUrlIgnored(url, safariIgnoreWebHostnames) {
541
486
  }
542
487
  return false;
543
488
  }
489
+ /**
490
+ * Checks if the desired context is the current one, treating `null` and `NATIVE_APP` as equal.
491
+ *
492
+ * @param desired - The context being switched to
493
+ * @param current - The current context
494
+ */
495
+ function alreadyInContext(desired, current) {
496
+ return (desired === current || (desired === null && current === NATIVE_WIN) || (desired === NATIVE_WIN && current === null));
497
+ }
498
+ /**
499
+ * Checks if the given context is the native one.
500
+ *
501
+ * @param context - The context to check
502
+ */
503
+ function isNativeContext(context) {
504
+ return context === NATIVE_WIN || context === null;
505
+ }
506
+ /**
507
+ * Resolves the webview context id to switch to, retrieving the contexts first if needed.
508
+ * A bare `WEBVIEW` name resolves to the first webview, which is the second context
509
+ * since the first one is always `NATIVE_APP`.
510
+ *
511
+ * @param name - The requested context name
512
+ * @throws {errors.NoSuchContextError} If the resolved context does not exist
513
+ */
514
+ async function resolveWebviewContextId(name) {
515
+ if (this.contexts === undefined) {
516
+ await this.getContexts();
517
+ }
518
+ let contextId = name.replace(WEBVIEW_BASE, '');
519
+ if (contextId === '') {
520
+ contextId = this.contexts[1];
521
+ }
522
+ if (!this.contexts.includes(contextId)) {
523
+ throw new errors.NoSuchContextError();
524
+ }
525
+ return contextId;
526
+ }
527
+ /**
528
+ * Stops the current performance log and detaches its listeners, so it neither keeps
529
+ * capturing nor forwards events after a new one is created for the next webview.
530
+ */
531
+ async function stopPerformanceLog() {
532
+ const performanceLog = this.logs.performance;
533
+ if (!performanceLog?.isCapturing) {
534
+ return;
535
+ }
536
+ try {
537
+ await performanceLog.stopCapture();
538
+ }
539
+ catch (err) {
540
+ this.log.warn(`Failed to stop the previous performance log: ${err.message}`);
541
+ }
542
+ performanceLog.removeAllListeners();
543
+ }
544
+ /**
545
+ * Selects the page behind the given webview context and makes it current.
546
+ * The context id is in the form of `appId.pageId`. The previous context is restored
547
+ * if the page cannot be selected.
548
+ *
549
+ * @param contextId - The webview context id
550
+ * @param skipReadyCheck - Whether to skip waiting for the page to be ready
551
+ */
552
+ async function selectWebviewPage(contextId, skipReadyCheck) {
553
+ const oldContext = this.curContext;
554
+ this.curContext = this.curWindowHandle = contextId;
555
+ const [appIdKey, pageIdKey] = contextId.split('.').map((id) => parseInt(id, 10));
556
+ try {
557
+ this.selectingNewPage = true;
558
+ await this.remote.selectPage(appIdKey, pageIdKey, skipReadyCheck);
559
+ await notifyBiDiContextChange.bind(this)();
560
+ }
561
+ catch (err) {
562
+ this.curContext = this.curWindowHandle = oldContext;
563
+ throw err;
564
+ }
565
+ finally {
566
+ this.selectingNewPage = false;
567
+ }
568
+ }
569
+ /**
570
+ * Creates a performance log for the given webview context and starts capturing.
571
+ *
572
+ * @param context - The webview context id
573
+ */
574
+ async function startPerformanceLog(context) {
575
+ this.log.debug(`Starting performance log on '${context}'`);
576
+ this.logs.performance = assignBiDiLogListener(this.eventEmitter, new IOSPerformanceLog({
577
+ remoteDebugger: this.remote,
578
+ log: this.log,
579
+ }), {
580
+ type: 'performance',
581
+ context,
582
+ })[0];
583
+ await this.logs.performance?.startCapture();
584
+ }
585
+ /**
586
+ * Re-registers the Safari console and network listeners on the remote debugger,
587
+ * stopping the previous ones first so each event is recorded once.
588
+ */
589
+ function restartSafariLogs() {
590
+ const { safariConsole, safariNetwork } = this.logs;
591
+ if (safariConsole) {
592
+ const consoleLog = safariConsole;
593
+ const eventListener = (error, event) => consoleLog.onConsoleLogEvent(error, event);
594
+ this.remote.stopConsole();
595
+ this.remote.startConsole(eventListener);
596
+ }
597
+ if (safariNetwork) {
598
+ const networkLog = safariNetwork;
599
+ const eventListener = (error, event, method) => networkLog.onNetworkEvent(error, event, method);
600
+ this.remote.stopNetwork();
601
+ this.remote.startNetwork(eventListener);
602
+ }
603
+ }
544
604
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAE,cAAc,EAA6B,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAC,iBAAiB,EAAC,MAAM,sCAAsC,CAAC;AAKvE,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAG/C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,WAAW,GAAG,CAAC;AAC9C,MAAM,0CAA0C,GAAG,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464
  callback?: any,
465
465
  skipReadyCheck: boolean = false,
466
466
  ): Promise<void> {
467
- function alreadyInContext(desired: string | null, current: string | null): boolean {
468
- return (
469
- desired === current ||
470
- (desired === null && current === NATIVE_WIN) ||
471
- (desired === NATIVE_WIN && current === null)
472
- );
473
- }
474
- function isNativeContext(context: string | null): boolean {
475
- return context === NATIVE_WIN || context === null;
476
- }
477
-
478
467
  // allow the full context list to be passed in
479
468
  const strName = String(typeof name === 'object' && name && 'id' in name ? name.id : name);
480
469
 
@@ -497,73 +486,18 @@ export async function setContext(
497
486
  return;
498
487
  }
499
488
 
500
- // switching into a webview context
501
-
502
- // if contexts have not already been retrieved, get them
503
- if (this.contexts === undefined) {
504
- await this.getContexts();
505
- }
506
-
507
- let contextId = strName.replace(WEBVIEW_BASE, '');
508
- if (contextId === '') {
509
- // allow user to pass in "WEBVIEW" without an index
510
- // the second context will be the first webview as
511
- // the first is always NATIVE_APP
512
- contextId = (this.contexts as string[])[1];
513
- }
514
- if (!this.contexts.includes(contextId)) {
515
- throw new errors.NoSuchContextError();
516
- }
517
-
518
- const oldContext = this.curContext;
519
- this.curContext = this.curWindowHandle = contextId;
520
-
521
- // `contextId` will be in the form of `appId.pageId` in this case
522
- const [appIdKey, pageIdKey] = contextId.split('.').map((id) => parseInt(id, 10));
523
- try {
524
- this.selectingNewPage = true;
525
- await this.remote.selectPage(appIdKey, pageIdKey, skipReadyCheck);
526
- await notifyBiDiContextChange.bind(this)();
527
- } catch (err) {
528
- this.curContext = this.curWindowHandle = oldContext;
529
- throw err;
530
- } finally {
531
- this.selectingNewPage = false;
532
- }
489
+ const contextId = await resolveWebviewContextId.call(this, strName);
490
+ await stopPerformanceLog.call(this);
491
+ await selectWebviewPage.call(this, contextId, skipReadyCheck);
533
492
 
534
493
  // attempt to start performance logging, if requested
535
494
  if (this.opts.enablePerformanceLogging && this._remote) {
536
- const context = this.curContext;
537
- this.log.debug(`Starting performance log on '${context}'`);
538
- this.logs.performance = assignBiDiLogListener(
539
- this.eventEmitter,
540
- new IOSPerformanceLog({
541
- remoteDebugger: this.remote,
542
- log: this.log,
543
- }),
544
- {
545
- type: 'performance',
546
- context,
547
- },
548
- )[0];
549
- await this.logs.performance?.startCapture();
495
+ await startPerformanceLog.call(this, contextId);
550
496
  }
551
497
 
552
498
  // start safari logging if the logs handlers are active
553
499
  if (name && name !== NATIVE_WIN && this.logs) {
554
- const {safariConsole, safariNetwork} = this.logs;
555
- if (safariConsole) {
556
- const consoleLog = safariConsole as SafariConsoleLog;
557
- const eventListener = (error?: Error, event?: StringRecord) =>
558
- consoleLog.onConsoleLogEvent(error, event as unknown as SafariConsoleEntry);
559
- this.remote.startConsole(eventListener);
560
- }
561
- if (safariNetwork) {
562
- const networkLog = safariNetwork as SafariNetworkLog;
563
- const eventListener = (error?: Error, event?: StringRecord, method?: string) =>
564
- networkLog.onNetworkEvent(error, event as unknown as SafariNetworkLogEntry, method);
565
- this.remote.startNetwork(eventListener);
566
- }
500
+ restartSafariLogs.call(this);
567
501
  }
568
502
  }
569
503
 
@@ -633,3 +567,132 @@ function isUrlIgnored(url: string, safariIgnoreWebHostnames?: string): boolean {
633
567
  }
634
568
  return false;
635
569
  }
570
+
571
+ /**
572
+ * Checks if the desired context is the current one, treating `null` and `NATIVE_APP` as equal.
573
+ *
574
+ * @param desired - The context being switched to
575
+ * @param current - The current context
576
+ */
577
+ function alreadyInContext(desired: string | null, current: string | null): boolean {
578
+ return (
579
+ desired === current || (desired === null && current === NATIVE_WIN) || (desired === NATIVE_WIN && current === null)
580
+ );
581
+ }
582
+
583
+ /**
584
+ * Checks if the given context is the native one.
585
+ *
586
+ * @param context - The context to check
587
+ */
588
+ function isNativeContext(context: string | null): boolean {
589
+ return context === NATIVE_WIN || context === null;
590
+ }
591
+
592
+ /**
593
+ * Resolves the webview context id to switch to, retrieving the contexts first if needed.
594
+ * A bare `WEBVIEW` name resolves to the first webview, which is the second context
595
+ * since the first one is always `NATIVE_APP`.
596
+ *
597
+ * @param name - The requested context name
598
+ * @throws {errors.NoSuchContextError} If the resolved context does not exist
599
+ */
600
+ async function resolveWebviewContextId(this: XCUITestDriver, name: string): Promise<string> {
601
+ if (this.contexts === undefined) {
602
+ await this.getContexts();
603
+ }
604
+
605
+ let contextId = name.replace(WEBVIEW_BASE, '');
606
+ if (contextId === '') {
607
+ contextId = (this.contexts as string[])[1];
608
+ }
609
+ if (!this.contexts.includes(contextId)) {
610
+ throw new errors.NoSuchContextError();
611
+ }
612
+ return contextId;
613
+ }
614
+
615
+ /**
616
+ * Stops the current performance log and detaches its listeners, so it neither keeps
617
+ * capturing nor forwards events after a new one is created for the next webview.
618
+ */
619
+ async function stopPerformanceLog(this: XCUITestDriver): Promise<void> {
620
+ const performanceLog = this.logs.performance;
621
+ if (!performanceLog?.isCapturing) {
622
+ return;
623
+ }
624
+ try {
625
+ await performanceLog.stopCapture();
626
+ } catch (err) {
627
+ this.log.warn(`Failed to stop the previous performance log: ${(err as Error).message}`);
628
+ }
629
+ performanceLog.removeAllListeners();
630
+ }
631
+
632
+ /**
633
+ * Selects the page behind the given webview context and makes it current.
634
+ * The context id is in the form of `appId.pageId`. The previous context is restored
635
+ * if the page cannot be selected.
636
+ *
637
+ * @param contextId - The webview context id
638
+ * @param skipReadyCheck - Whether to skip waiting for the page to be ready
639
+ */
640
+ async function selectWebviewPage(this: XCUITestDriver, contextId: string, skipReadyCheck: boolean): Promise<void> {
641
+ const oldContext = this.curContext;
642
+ this.curContext = this.curWindowHandle = contextId;
643
+
644
+ const [appIdKey, pageIdKey] = contextId.split('.').map((id) => parseInt(id, 10));
645
+ try {
646
+ this.selectingNewPage = true;
647
+ await this.remote.selectPage(appIdKey, pageIdKey, skipReadyCheck);
648
+ await notifyBiDiContextChange.bind(this)();
649
+ } catch (err) {
650
+ this.curContext = this.curWindowHandle = oldContext;
651
+ throw err;
652
+ } finally {
653
+ this.selectingNewPage = false;
654
+ }
655
+ }
656
+
657
+ /**
658
+ * Creates a performance log for the given webview context and starts capturing.
659
+ *
660
+ * @param context - The webview context id
661
+ */
662
+ async function startPerformanceLog(this: XCUITestDriver, context: string): Promise<void> {
663
+ this.log.debug(`Starting performance log on '${context}'`);
664
+ this.logs.performance = assignBiDiLogListener(
665
+ this.eventEmitter,
666
+ new IOSPerformanceLog({
667
+ remoteDebugger: this.remote,
668
+ log: this.log,
669
+ }),
670
+ {
671
+ type: 'performance',
672
+ context,
673
+ },
674
+ )[0];
675
+ await this.logs.performance?.startCapture();
676
+ }
677
+
678
+ /**
679
+ * Re-registers the Safari console and network listeners on the remote debugger,
680
+ * stopping the previous ones first so each event is recorded once.
681
+ */
682
+ function restartSafariLogs(this: XCUITestDriver): void {
683
+ const {safariConsole, safariNetwork} = this.logs;
684
+ if (safariConsole) {
685
+ const consoleLog = safariConsole as SafariConsoleLog;
686
+ const eventListener = (error?: Error, event?: StringRecord) =>
687
+ consoleLog.onConsoleLogEvent(error, event as unknown as SafariConsoleEntry);
688
+ this.remote.stopConsole();
689
+ this.remote.startConsole(eventListener);
690
+ }
691
+ if (safariNetwork) {
692
+ const networkLog = safariNetwork as SafariNetworkLog;
693
+ const eventListener = (error?: Error, event?: StringRecord, method?: string) =>
694
+ networkLog.onNetworkEvent(error, event as unknown as SafariNetworkLogEntry, method);
695
+ this.remote.stopNetwork();
696
+ this.remote.startNetwork(eventListener);
697
+ }
698
+ }
@@ -0,0 +1,12 @@
1
+ type BidiSubscriptionDriver = {
2
+ bidiEventSubs: Record<string, string[]>;
3
+ };
4
+ type Subscriptions = Map<string, Map<string, string[]>>;
5
+ /** Get (or lazily create) the subscription registry of the given driver */
6
+ export declare function getSubscriptions(driver: object): Subscriptions;
7
+ /** Recompute `bidiEventSubs` as the union of all registered subscriptions */
8
+ export declare function refreshEventSubscriptions(driver: BidiSubscriptionDriver): void;
9
+ /** Forget all subscriptions, e.g. when the session ends */
10
+ export declare function clearBidiSubscriptions(driver: BidiSubscriptionDriver): void;
11
+ export {};
12
+ //# sourceMappingURL=bidi-subscriptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bidi-subscriptions.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi-subscriptions.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAAC,CAAC;AAGxE,KAAK,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAIxD,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAO9D;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAS9E;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAG3E"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSubscriptions = getSubscriptions;
4
+ exports.refreshEventSubscriptions = refreshEventSubscriptions;
5
+ exports.clearBidiSubscriptions = clearBidiSubscriptions;
6
+ const support_1 = require("@appium/support");
7
+ const subscriptionsByDriver = new WeakMap();
8
+ /** Get (or lazily create) the subscription registry of the given driver */
9
+ function getSubscriptions(driver) {
10
+ let subscriptions = subscriptionsByDriver.get(driver);
11
+ if (!subscriptions) {
12
+ subscriptions = new Map();
13
+ subscriptionsByDriver.set(driver, subscriptions);
14
+ }
15
+ return subscriptions;
16
+ }
17
+ /** Recompute `bidiEventSubs` as the union of all registered subscriptions */
18
+ function refreshEventSubscriptions(driver) {
19
+ const events = new Map();
20
+ for (const subscription of getSubscriptions(driver).values()) {
21
+ for (const [event, contexts] of subscription) {
22
+ events.set(event, support_1.util.uniq([...(events.get(event) ?? []), ...contexts]));
23
+ }
24
+ }
25
+ // Object.fromEntries defines own properties, so names like '__proto__' stay safe
26
+ driver.bidiEventSubs = Object.fromEntries(events);
27
+ }
28
+ /** Forget all subscriptions, e.g. when the session ends */
29
+ function clearBidiSubscriptions(driver) {
30
+ subscriptionsByDriver.delete(driver);
31
+ driver.bidiEventSubs = {};
32
+ }
33
+ //# sourceMappingURL=bidi-subscriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bidi-subscriptions.js","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi-subscriptions.ts"],"names":[],"mappings":";;AAUA,4CAOC;AAGD,8DASC;AAGD,wDAGC;AAnCD,6CAAqC;AAOrC,MAAM,qBAAqB,GAAG,IAAI,OAAO,EAAyB,CAAC;AAEnE,2EAA2E;AAC3E,SAAgB,gBAAgB,CAAC,MAAc;IAC7C,IAAI,aAAa,GAAG,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,qBAAqB,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,6EAA6E;AAC7E,SAAgB,yBAAyB,CAAC,MAA8B;IACtE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC3C,KAAK,MAAM,YAAY,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QAC7D,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC;YAC7C,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,cAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,iFAAiF;IACjF,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,2DAA2D;AAC3D,SAAgB,sBAAsB,CAAC,MAA8B;IACnE,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,CAAC,aAAa,GAAG,EAAE,CAAC;AAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAgB,aAAa,EAAC,MAAM,eAAe,CAAC;AAK5E,OAAO,QAAQ,WAAW,CAAC;IAEzB,UAAU,UAAU,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,aAAa;KAAG;CACrE"}
1
+ {"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../../../lib/basedriver/commands/bidi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAgB,aAAa,EAAC,MAAM,eAAe,CAAC;AAO5E,OAAO,QAAQ,WAAW,CAAC;IAEzB,UAAU,UAAU,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,aAAa;KAAG;CACrE"}