appium-mac2-driver 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/WebDriverAgentMac/IntegrationTests/AMWindowTests.m +427 -0
  3. package/WebDriverAgentMac/WebDriverAgentLib/Commands/AMWindowCommands.m +63 -0
  4. package/WebDriverAgentMac/WebDriverAgentLib/Commands/FBDebugCommands.m +2 -0
  5. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBCommandStatus.h +3 -0
  6. package/WebDriverAgentMac/WebDriverAgentLib/Routing/FBCommandStatus.m +13 -0
  7. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMScreenUtils.h +4 -0
  8. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMScreenUtils.m +23 -0
  9. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMSnapshotUtils.h +18 -0
  10. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMSnapshotUtils.m +43 -28
  11. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMWindowUtils.h +111 -0
  12. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMWindowUtils.m +780 -0
  13. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMXCTAccessibility.h +61 -0
  14. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/AMXCTAccessibility.m +108 -0
  15. package/WebDriverAgentMac/WebDriverAgentMac.xcodeproj/project.pbxproj +20 -0
  16. package/build/lib/commands/native-record-screen.d.ts +2 -0
  17. package/build/lib/commands/native-record-screen.d.ts.map +1 -1
  18. package/build/lib/commands/native-record-screen.js.map +1 -1
  19. package/build/lib/commands/windows.d.ts +22 -0
  20. package/build/lib/commands/windows.d.ts.map +1 -0
  21. package/build/lib/commands/windows.js +32 -0
  22. package/build/lib/commands/windows.js.map +1 -0
  23. package/build/lib/driver.d.ts +12 -0
  24. package/build/lib/driver.d.ts.map +1 -1
  25. package/build/lib/driver.js +3 -0
  26. package/build/lib/driver.js.map +1 -1
  27. package/build/lib/execute-method-map.d.ts +9 -0
  28. package/build/lib/execute-method-map.d.ts.map +1 -1
  29. package/build/lib/execute-method-map.js +9 -0
  30. package/build/lib/execute-method-map.js.map +1 -1
  31. package/build/lib/session-claim-handler.d.ts.map +1 -1
  32. package/build/lib/session-claim-handler.js +1 -2
  33. package/build/lib/session-claim-handler.js.map +1 -1
  34. package/build/lib/types.d.ts +26 -0
  35. package/build/lib/types.d.ts.map +1 -1
  36. package/build/lib/wda-mac.d.ts +0 -1
  37. package/build/lib/wda-mac.d.ts.map +1 -1
  38. package/build/lib/wda-mac.js +1 -1
  39. package/lib/commands/native-record-screen.ts +2 -0
  40. package/lib/commands/windows.ts +44 -0
  41. package/lib/driver.ts +4 -0
  42. package/lib/execute-method-map.ts +9 -0
  43. package/lib/session-claim-handler.ts +1 -2
  44. package/lib/types.ts +28 -0
  45. package/lib/wda-mac.ts +1 -2
  46. package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
  47. package/node_modules/@appium/support/build/lib/npm.js +2 -1
  48. package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
  49. package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
  50. package/node_modules/@appium/support/build/lib/util.js +13 -1
  51. package/node_modules/@appium/support/build/lib/util.js.map +1 -1
  52. package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
  53. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  54. package/node_modules/@appium/support/build/lib/zip.js +193 -64
  55. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  56. package/node_modules/@appium/support/lib/npm.ts +2 -1
  57. package/node_modules/@appium/support/lib/util.ts +13 -1
  58. package/node_modules/@appium/support/lib/zip.ts +231 -71
  59. package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +1934 -0
  60. package/node_modules/@appium/support/node_modules/axios/LICENSE +7 -0
  61. package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  62. package/node_modules/@appium/support/node_modules/axios/README.md +2851 -0
  63. package/node_modules/@appium/support/node_modules/axios/dist/axios.js +5807 -0
  64. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +5 -0
  65. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +1 -0
  66. package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +5829 -0
  67. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +5850 -0
  68. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +3 -0
  69. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  70. package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +6808 -0
  71. package/node_modules/@appium/support/node_modules/axios/index.d.cts +766 -0
  72. package/node_modules/@appium/support/node_modules/axios/index.d.ts +787 -0
  73. package/node_modules/@appium/support/node_modules/axios/index.js +45 -0
  74. package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +36 -0
  75. package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +132 -0
  76. package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +696 -0
  77. package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +1490 -0
  78. package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +277 -0
  79. package/node_modules/@appium/support/node_modules/axios/lib/axios.js +89 -0
  80. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  81. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  82. package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +5 -0
  83. package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +306 -0
  84. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +219 -0
  85. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  86. package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  87. package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +8 -0
  88. package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +76 -0
  89. package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  90. package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +174 -0
  91. package/node_modules/@appium/support/node_modules/axios/lib/core/methodList.js +17 -0
  92. package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  93. package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +27 -0
  94. package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +28 -0
  95. package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +178 -0
  96. package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +10 -0
  97. package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +3 -0
  98. package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +2 -0
  99. package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +1 -0
  100. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  101. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  102. package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  103. package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  104. package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +7 -0
  105. package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  106. package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +14 -0
  107. package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +69 -0
  108. package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +18 -0
  109. package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  110. package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  111. package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +64 -0
  112. package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  113. package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  114. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  115. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  116. package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  117. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  118. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  119. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  120. package/node_modules/@appium/support/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  121. package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +2 -0
  122. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  123. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  124. package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  125. package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +15 -0
  126. package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  127. package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  128. package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  129. package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +55 -0
  130. package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +28 -0
  131. package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +45 -0
  132. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +279 -0
  133. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  134. package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +89 -0
  135. package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +112 -0
  136. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  137. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  138. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  139. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +13 -0
  140. package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +52 -0
  141. package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +7 -0
  142. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  143. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  144. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  145. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +37 -0
  146. package/node_modules/@appium/support/node_modules/axios/lib/utils.js +1150 -0
  147. package/node_modules/@appium/support/node_modules/axios/package.json +203 -0
  148. package/node_modules/@appium/support/package.json +6 -6
  149. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
  150. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
  151. package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
  152. package/node_modules/@appium/types/package.json +2 -2
  153. package/node_modules/appium-xcode/CHANGELOG.md +7 -0
  154. package/node_modules/appium-xcode/package.json +4 -4
  155. package/node_modules/asyncbox/README.md +43 -0
  156. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +9 -0
  157. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
  158. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +35 -0
  159. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
  160. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +9 -0
  161. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
  162. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js +23 -0
  163. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
  164. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts +9 -0
  165. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
  166. package/node_modules/asyncbox/build/cjs/lib/errors.js +20 -0
  167. package/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
  168. package/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
  169. package/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
  170. package/node_modules/asyncbox/build/cjs/lib/index.js +24 -0
  171. package/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
  172. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
  173. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
  174. package/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
  175. package/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
  176. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts +74 -0
  177. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
  178. package/node_modules/asyncbox/build/cjs/lib/lock.js +295 -0
  179. package/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
  180. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +15 -0
  181. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
  182. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
  183. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
  184. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts +17 -0
  185. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
  186. package/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
  187. package/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
  188. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +20 -0
  189. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
  190. package/node_modules/asyncbox/build/cjs/lib/sleep.js +61 -0
  191. package/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
  192. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +18 -0
  193. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
  194. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +51 -0
  195. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
  196. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +16 -0
  197. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
  198. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js +45 -0
  199. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
  200. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
  201. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
  202. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js +32 -0
  203. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
  204. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +9 -0
  205. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
  206. package/node_modules/asyncbox/build/esm/lib/asyncmap.js +20 -0
  207. package/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
  208. package/node_modules/asyncbox/build/esm/lib/errors.d.ts +9 -0
  209. package/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
  210. package/node_modules/asyncbox/build/esm/lib/errors.js +15 -0
  211. package/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
  212. package/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
  213. package/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
  214. package/node_modules/asyncbox/build/esm/lib/index.js +10 -0
  215. package/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
  216. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
  217. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
  218. package/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
  219. package/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
  220. package/node_modules/asyncbox/build/esm/lib/lock.d.ts +74 -0
  221. package/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
  222. package/node_modules/asyncbox/build/esm/lib/lock.js +291 -0
  223. package/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
  224. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
  225. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
  226. package/node_modules/asyncbox/build/esm/lib/long-sleep.js +33 -0
  227. package/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
  228. package/node_modules/asyncbox/build/esm/lib/retry.d.ts +17 -0
  229. package/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
  230. package/node_modules/asyncbox/build/esm/lib/retry.js +53 -0
  231. package/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
  232. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts +20 -0
  233. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
  234. package/node_modules/asyncbox/build/esm/lib/sleep.js +58 -0
  235. package/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
  236. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
  237. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
  238. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +48 -0
  239. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
  240. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +16 -0
  241. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
  242. package/node_modules/asyncbox/build/esm/lib/with-timeout.js +42 -0
  243. package/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
  244. package/node_modules/asyncbox/lib/asyncfilter.ts +38 -0
  245. package/node_modules/asyncbox/lib/asyncmap.ts +29 -0
  246. package/node_modules/asyncbox/lib/errors.ts +15 -0
  247. package/node_modules/asyncbox/lib/index.ts +21 -0
  248. package/node_modules/asyncbox/lib/limit-function.ts +18 -0
  249. package/node_modules/asyncbox/lib/lock.ts +360 -0
  250. package/node_modules/asyncbox/lib/long-sleep.ts +38 -0
  251. package/node_modules/asyncbox/lib/retry.ts +61 -0
  252. package/node_modules/asyncbox/lib/sleep.ts +79 -0
  253. package/node_modules/asyncbox/lib/wait-for-condition.ts +52 -0
  254. package/node_modules/asyncbox/lib/with-timeout.ts +43 -0
  255. package/node_modules/asyncbox/package.json +8 -8
  256. package/node_modules/axios/README.md +41 -106
  257. package/node_modules/axios/dist/axios.js +931 -278
  258. package/node_modules/axios/dist/axios.min.js +2 -2
  259. package/node_modules/axios/dist/axios.min.js.map +1 -1
  260. package/node_modules/axios/dist/browser/axios.cjs +948 -268
  261. package/node_modules/axios/dist/esm/axios.js +948 -268
  262. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  263. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  264. package/node_modules/axios/dist/node/axios.cjs +925 -242
  265. package/node_modules/axios/index.d.cts +20 -1
  266. package/node_modules/axios/index.d.ts +18 -1
  267. package/node_modules/axios/lib/adapters/fetch.js +73 -20
  268. package/node_modules/axios/lib/adapters/http.js +145 -26
  269. package/node_modules/axios/lib/adapters/xhr.js +120 -13
  270. package/node_modules/axios/lib/core/Axios.js +67 -12
  271. package/node_modules/axios/lib/core/AxiosError.js +59 -0
  272. package/node_modules/axios/lib/core/AxiosHeaders.js +17 -4
  273. package/node_modules/axios/lib/core/InterceptorManager.js +13 -2
  274. package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  275. package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  276. package/node_modules/axios/lib/core/dispatchRequest.js +20 -0
  277. package/node_modules/axios/lib/core/mergeConfig.js +183 -120
  278. package/node_modules/axios/lib/defaults/transitional.js +1 -0
  279. package/node_modules/axios/lib/env/data.js +1 -1
  280. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +11 -2
  281. package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -1
  282. package/node_modules/axios/lib/helpers/composeSignals.js +6 -3
  283. package/node_modules/axios/lib/helpers/cookies.js +30 -6
  284. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +34 -7
  285. package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  286. package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -1
  287. package/node_modules/axios/lib/helpers/fromDataURI.js +8 -2
  288. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +4 -9
  289. package/node_modules/axios/lib/helpers/parseHeaders.js +2 -1
  290. package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  291. package/node_modules/axios/lib/helpers/resolveConfig.js +16 -3
  292. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +16 -1
  293. package/node_modules/axios/lib/utils.js +61 -10
  294. package/node_modules/axios/package.json +1 -2
  295. package/node_modules/bare-url/README.md +4 -0
  296. package/node_modules/bare-url/index.d.ts +3 -0
  297. package/node_modules/bare-url/index.js +42 -18
  298. package/node_modules/bare-url/lib/errors.js +4 -0
  299. package/node_modules/bare-url/package.json +1 -1
  300. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  301. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  302. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  303. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  304. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  305. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  306. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  307. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  308. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  309. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  310. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  311. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  312. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  313. package/node_modules/follow-redirects/README.md +27 -1
  314. package/node_modules/follow-redirects/index.js +1 -5
  315. package/node_modules/follow-redirects/package.json +1 -1
  316. package/node_modules/shell-quote/README.md +37 -4
  317. package/node_modules/shell-quote/package.json +10 -6
  318. package/node_modules/shell-quote/parse.d.ts +1 -1
  319. package/node_modules/shell-quote/parse.js +63 -11
  320. package/node_modules/shell-quote/quote.d.ts +2 -1
  321. package/node_modules/shell-quote/quote.js +23 -3
  322. package/node_modules/uuid/package.json +17 -17
  323. package/package.json +6 -7
  324. package/scripts/setup-accessibility.mjs +175 -0
  325. package/node_modules/async-lock/AUTHORS +0 -21
  326. package/node_modules/async-lock/History.md +0 -132
  327. package/node_modules/async-lock/LICENSE +0 -22
  328. package/node_modules/async-lock/README.md +0 -177
  329. package/node_modules/async-lock/index.js +0 -2
  330. package/node_modules/async-lock/lib/index.js +0 -312
  331. package/node_modules/async-lock/package.json +0 -48
  332. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  333. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  334. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
  335. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  336. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  337. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  338. package/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
  339. package/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  340. package/node_modules/asyncbox/lib/asyncbox.ts +0 -382
  341. package/node_modules/shell-quote/.nycrc +0 -14
  342. package/node_modules/shell-quote/eslint.config.mjs +0 -29
  343. package/node_modules/shell-quote/security.md +0 -11
  344. package/node_modules/shell-quote/test/comment.js +0 -16
  345. package/node_modules/shell-quote/test/env.js +0 -52
  346. package/node_modules/shell-quote/test/env_fn.js +0 -21
  347. package/node_modules/shell-quote/test/op.js +0 -102
  348. package/node_modules/shell-quote/test/parse.js +0 -149
  349. package/node_modules/shell-quote/test/quote.js +0 -145
  350. package/node_modules/shell-quote/test/set.js +0 -31
@@ -1,4 +1,3 @@
1
- import {createWriteStream} from 'node:fs';
2
1
  import path from 'node:path';
3
2
  import stream from 'node:stream';
4
3
  import {text} from 'node:stream/consumers';
@@ -23,6 +22,8 @@ const ZIP_MAGIC = 'PK';
23
22
  const IFMT = 0b1111000000000000;
24
23
  const IFDIR = 0b0100000000000000;
25
24
  const IFLNK = 0b1010000000000000;
25
+ // Limit traversal to stop symlink cycles.
26
+ const MAX_SYMLINK_TRAVERSALS = 40;
26
27
 
27
28
  export interface ExtractAllOptions {
28
29
  /**
@@ -94,7 +95,14 @@ interface ZipExtractorOptions {
94
95
  defaultFileMode?: string;
95
96
  }
96
97
 
97
- type OpenReadStreamFn = (entry: yauzl.Entry) => Promise<NodeJS.ReadableStream>;
98
+ type OpenReadStreamFn = (entry: yauzl.Entry) => Promise<stream.Readable>;
99
+
100
+ interface SymlinkTarget {
101
+ linkTarget: string;
102
+ linkParentDir: string;
103
+ fileName: string;
104
+ missingPaths: Set<string>;
105
+ }
98
106
 
99
107
  // This class is mostly copied from https://github.com/maxogden/extract-zip/blob/master/index.js
100
108
  class ZipExtractor {
@@ -103,6 +111,8 @@ class ZipExtractor {
103
111
  private readonly zipPath: string;
104
112
  private readonly opts: ZipExtractorOptions;
105
113
  private canceled = false;
114
+ // Normalized missing-path keys -> links to recheck when those paths become symlinks.
115
+ private readonly symlinkDependents = new Map<string, Set<SymlinkTarget>>();
106
116
 
107
117
  constructor(sourcePath: string, opts: ZipExtractorOptions) {
108
118
  this.zipPath = sourcePath;
@@ -154,8 +164,6 @@ class ZipExtractor {
154
164
  return;
155
165
  }
156
166
 
157
- const {dir} = this.opts;
158
-
159
167
  // convert external file attr int into a fs stat mode int
160
168
  const mode = (entry.externalFileAttributes >> 16) & 0xffff;
161
169
  // check if it's a symlink or dir (using stat mode constants)
@@ -170,77 +178,25 @@ class ZipExtractor {
170
178
  const procMode = this.getExtractedMode(mode, isDir) & 0o777;
171
179
  // always ensure folders are created
172
180
  const destDir = isDir ? dest : path.dirname(dest);
173
- const realDestDir = await this.ensureDirWithinRoot(destDir, fileName, isDir ? procMode : undefined);
181
+ const {dir} = this.opts;
182
+ const realDestDir = await ensureDirWithinRoot(dir, destDir, fileName, isDir ? procMode : undefined);
174
183
  if (isDir) {
175
184
  return;
176
185
  }
177
186
 
178
- const readStream = await this.openReadStream(entry);
179
187
  if (isSymlink) {
180
- const link = await text(readStream);
181
- const resolvedLink = path.resolve(realDestDir, link);
182
- if (!isContainedPath(resolvedLink, dir)) {
183
- throw new Error(`Out of bound symlink target "${link}" found while processing file ${fileName}`);
184
- }
185
- await fs.symlink(link, dest);
188
+ const linkTarget = await text(await this.openReadStream(entry));
189
+ await this.createValidatedSymlink(linkTarget, dest, realDestDir, fileName);
186
190
  } else {
187
- await this.assertFileDestinationWithinRoot(dest, realDestDir, fileName);
188
- await pipeline(readStream, fs.createWriteStream(dest, {mode: procMode}));
189
- }
190
- }
191
-
192
- private async ensureDirWithinRoot(dirPath: string, fileName: string, mode?: number): Promise<string> {
193
- const {dir} = this.opts;
194
- if (!isContainedPath(dirPath, dir)) {
195
- throw new Error(`Out of bound path "${dirPath}" found while processing file ${fileName}`);
196
- }
197
-
198
- const relativePath = path.relative(dir, dirPath);
199
- if (!relativePath) {
200
- return dir;
201
- }
202
-
203
- let currentPath = dir;
204
- for (const segment of relativePath.split(path.sep)) {
205
- currentPath = path.join(currentPath, segment);
191
+ await assertFileDestinationWithinRoot(dir, dest, realDestDir, fileName);
192
+ const readStream = await this.openReadStream(entry);
206
193
  try {
207
- const [stats, realPath] = await Promise.all([fs.lstat(currentPath), fs.realpath(currentPath)]);
208
- if (!isContainedPath(realPath, dir)) {
209
- throw new Error(`Out of bound path "${currentPath}" found while processing file ${fileName}`);
210
- }
211
- if (!stats.isDirectory() && !stats.isSymbolicLink()) {
212
- throw new Error(`Cannot create a directory over existing file "${currentPath}"`);
213
- }
214
- } catch (err: any) {
215
- if (err.code !== 'ENOENT') {
216
- throw err;
217
- }
218
- await fs.mkdir(currentPath, {mode});
194
+ await writeFileNoFollow(readStream, dest, procMode);
195
+ } finally {
196
+ // Opening the output may fail before pipeline takes ownership of the input.
197
+ readStream.destroy();
219
198
  }
220
199
  }
221
-
222
- const realPath = await fs.realpath(dirPath);
223
- if (!isContainedPath(realPath, dir)) {
224
- throw new Error(`Out of bound path "${dirPath}" found while processing file ${fileName}`);
225
- }
226
- return realPath;
227
- }
228
-
229
- private async assertFileDestinationWithinRoot(dest: string, realDestDir: string, fileName: string): Promise<void> {
230
- const {dir} = this.opts;
231
- let realDest: string | null = null;
232
- try {
233
- realDest = await fs.realpath(dest);
234
- } catch (err: any) {
235
- if (err.code !== 'ENOENT') {
236
- throw err;
237
- }
238
- }
239
-
240
- realDest = realDest ?? path.resolve(realDestDir, path.basename(dest));
241
- if (!isContainedPath(realDest, dir)) {
242
- throw new Error(`Out of bound path "${dest}" found while processing file ${fileName}`);
243
- }
244
200
  }
245
201
 
246
202
  private getExtractedMode(entryMode: number, isDir: boolean): number {
@@ -270,6 +226,207 @@ class ZipExtractor {
270
226
 
271
227
  return mode;
272
228
  }
229
+
230
+ /**
231
+ * Reject escaping targets or excessive traversal; return missing-path keys for later rechecks.
232
+ */
233
+ private async validateSymlinkTarget(
234
+ linkTarget: string,
235
+ linkParentDir: string,
236
+ fileName: string,
237
+ ): Promise<Set<string>> {
238
+ // Windows resolves drive-relative targets (`C:foo`) against the drive's CWD, not the link's parent
239
+ if (isWindows() && /^[A-Za-z]:/.test(linkTarget) && !path.win32.isAbsolute(linkTarget)) {
240
+ throw new Error(`Out of bound symlink target "${linkTarget}" found while processing file ${fileName}`);
241
+ }
242
+
243
+ // Resolve links before '..'; realpath alone cannot handle missing targets.
244
+ const separator = isWindows() ? /[\\/]+/ : /\/+/;
245
+ const targetRoot = path.isAbsolute(linkTarget) ? path.parse(linkTarget).root : '';
246
+ let resolvedPath = targetRoot || linkParentDir;
247
+ const remainingSegments = linkTarget.slice(targetRoot.length).split(separator);
248
+ const missingPaths = new Set<string>();
249
+ let followedLinks = 0;
250
+
251
+ while (remainingSegments.length) {
252
+ const segment = remainingSegments.shift();
253
+ if (!segment || segment === '.') {
254
+ continue;
255
+ }
256
+ if (segment === '..') {
257
+ resolvedPath = path.dirname(resolvedPath);
258
+ continue;
259
+ }
260
+
261
+ const candidatePath = path.join(resolvedPath, segment);
262
+ let nestedLinkTarget: string | null = null;
263
+ try {
264
+ const stats = await fs.lstat(candidatePath);
265
+ if (stats.isSymbolicLink()) {
266
+ nestedLinkTarget = await fs.readlink(candidatePath);
267
+ }
268
+ } catch (err: any) {
269
+ if (err.code !== 'ENOENT') {
270
+ throw err;
271
+ }
272
+ // An absent component may become a symlink in a later ZIP entry.
273
+ missingPaths.add(this.getSymlinkDependencyKey(candidatePath));
274
+ }
275
+
276
+ // Advance past ordinary or missing components.
277
+ if (nestedLinkTarget === null) {
278
+ resolvedPath = candidatePath;
279
+ continue;
280
+ }
281
+
282
+ followedLinks += 1;
283
+ if (followedLinks > MAX_SYMLINK_TRAVERSALS) {
284
+ throw new Error(`Too many symlinks while processing file ${fileName}`);
285
+ }
286
+ // Resolve relative targets from the link's parent, absolute targets from their root.
287
+ if (path.isAbsolute(nestedLinkTarget)) {
288
+ resolvedPath = path.parse(nestedLinkTarget).root;
289
+ nestedLinkTarget = nestedLinkTarget.slice(resolvedPath.length);
290
+ }
291
+ remainingSegments.unshift(...nestedLinkTarget.split(separator));
292
+ }
293
+
294
+ if (!isContainedPath(resolvedPath, this.opts.dir)) {
295
+ throw new Error(`Out of bound symlink target "${linkTarget}" found while processing file ${fileName}`);
296
+ }
297
+ return missingPaths;
298
+ }
299
+
300
+ private updateSymlinkDependencies(target: SymlinkTarget, missingPaths: Set<string>): void {
301
+ for (const missingPath of target.missingPaths) {
302
+ const dependents = this.symlinkDependents.get(missingPath);
303
+ dependents?.delete(target);
304
+ if (!dependents?.size) {
305
+ this.symlinkDependents.delete(missingPath);
306
+ }
307
+ }
308
+ target.missingPaths = missingPaths;
309
+ for (const missingPath of missingPaths) {
310
+ let dependents = this.symlinkDependents.get(missingPath);
311
+ if (!dependents) {
312
+ dependents = new Set();
313
+ this.symlinkDependents.set(missingPath, dependents);
314
+ }
315
+ dependents.add(target);
316
+ }
317
+ }
318
+
319
+ private async createValidatedSymlink(
320
+ linkTarget: string,
321
+ dest: string,
322
+ linkParentDir: string,
323
+ fileName: string,
324
+ ): Promise<void> {
325
+ // Reject an escaping target before creating the link on disk.
326
+ await this.validateSymlinkTarget(linkTarget, linkParentDir, fileName);
327
+ await fs.symlink(linkTarget, dest);
328
+ try {
329
+ const target: SymlinkTarget = {linkTarget, linkParentDir, fileName, missingPaths: new Set()};
330
+ // Recheck for cycles and redirected forward references after creating the link.
331
+ const key = this.getSymlinkDependencyKey(path.join(linkParentDir, path.basename(dest)));
332
+ const affectedTargets = [target, ...(this.symlinkDependents.get(key) ?? [])];
333
+ for (const affectedTarget of affectedTargets) {
334
+ const missingPaths = await this.validateSymlinkTarget(
335
+ affectedTarget.linkTarget,
336
+ affectedTarget.linkParentDir,
337
+ affectedTarget.fileName,
338
+ );
339
+ this.updateSymlinkDependencies(affectedTarget, missingPaths);
340
+ }
341
+ } catch (err) {
342
+ // Roll back the link that invalidated a target.
343
+ await fs.unlink(dest);
344
+ throw err;
345
+ }
346
+ }
347
+
348
+ private getSymlinkDependencyKey(absolutePath: string): string {
349
+ // Normalize keys, not filesystem paths. Collisions only cause extra checks.
350
+ return absolutePath.normalize('NFD').toLowerCase();
351
+ }
352
+ }
353
+
354
+ async function ensureDirWithinRoot(dir: string, dirPath: string, fileName: string, mode?: number): Promise<string> {
355
+ if (!isContainedPath(dirPath, dir)) {
356
+ throw new Error(`Out of bound path "${dirPath}" found while processing file ${fileName}`);
357
+ }
358
+
359
+ const relativePath = path.relative(dir, dirPath);
360
+ if (!relativePath) {
361
+ return dir;
362
+ }
363
+
364
+ let currentPath = dir;
365
+ for (const segment of relativePath.split(path.sep)) {
366
+ currentPath = path.join(currentPath, segment);
367
+ try {
368
+ const [stats, realPath] = await Promise.all([fs.lstat(currentPath), fs.realpath(currentPath)]);
369
+ if (!isContainedPath(realPath, dir)) {
370
+ throw new Error(`Out of bound path "${currentPath}" found while processing file ${fileName}`);
371
+ }
372
+ if (!stats.isDirectory() && !stats.isSymbolicLink()) {
373
+ throw new Error(`Cannot create a directory over existing file "${currentPath}"`);
374
+ }
375
+ } catch (err: any) {
376
+ if (err.code !== 'ENOENT') {
377
+ throw err;
378
+ }
379
+ await fs.mkdir(currentPath, {mode});
380
+ }
381
+ }
382
+
383
+ const realPath = await fs.realpath(dirPath);
384
+ if (!isContainedPath(realPath, dir)) {
385
+ throw new Error(`Out of bound path "${dirPath}" found while processing file ${fileName}`);
386
+ }
387
+ return realPath;
388
+ }
389
+
390
+ async function assertFileDestinationWithinRoot(
391
+ dir: string,
392
+ dest: string,
393
+ realDestDir: string,
394
+ fileName: string,
395
+ ): Promise<void> {
396
+ let realDest: string | null = null;
397
+ try {
398
+ if ((await fs.lstat(dest)).isSymbolicLink()) {
399
+ throw new Error(`Cannot write a file over existing symlink "${dest}"`);
400
+ }
401
+ realDest = await fs.realpath(dest);
402
+ } catch (err: any) {
403
+ if (err.code !== 'ENOENT') {
404
+ throw err;
405
+ }
406
+ }
407
+
408
+ realDest = realDest ?? path.resolve(realDestDir, path.basename(dest));
409
+ if (!isContainedPath(realDest, dir)) {
410
+ throw new Error(`Out of bound path "${dest}" found while processing file ${fileName}`);
411
+ }
412
+ }
413
+
414
+ async function writeFileNoFollow(readStream: stream.Readable, dest: string, mode: number): Promise<void> {
415
+ const flags =
416
+ fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_TRUNC | (isWindows() ? 0 : fs.constants.O_NOFOLLOW);
417
+ let file;
418
+ try {
419
+ file = await fs.openFile(dest, flags, mode);
420
+ } catch (err) {
421
+ // pipeline has not taken ownership of the input yet
422
+ readStream.destroy();
423
+ throw err;
424
+ }
425
+ try {
426
+ await pipeline(readStream, file.createWriteStream());
427
+ } finally {
428
+ await file.close();
429
+ }
273
430
  }
274
431
 
275
432
  /**
@@ -322,16 +479,19 @@ export async function _extractEntryTo(
322
479
  throw new Error(`Out of bound path "${dstPath}" found while processing file ${fileName}`);
323
480
  }
324
481
 
482
+ // Same symlink-safe directory/file handling as in ZipExtractor
483
+ await fs.mkdirp(destDir);
484
+ const dir = await fs.realpath(destDir);
485
+ const dest = path.resolve(dir, path.relative(destDir, dstPath));
325
486
  if (fileName.endsWith('/')) {
326
- if (!(await fs.exists(dstPath))) {
327
- await fs.mkdirp(dstPath);
328
- }
487
+ await ensureDirWithinRoot(dir, dest, fileName);
329
488
  return;
330
489
  }
331
- await fs.mkdirp(path.dirname(dstPath));
490
+ const realDestDir = await ensureDirWithinRoot(dir, path.dirname(dest), fileName);
491
+ await assertFileDestinationWithinRoot(dir, dest, realDestDir, fileName);
332
492
 
333
493
  const readStream = await openReadStream(entry);
334
- await pipeline(readStream, createWriteStream(dstPath, {flags: 'w'}));
494
+ await writeFileNoFollow(readStream, dest, 0o666);
335
495
  }
336
496
 
337
497
  /**