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
@@ -65,6 +65,29 @@ function arrayToObject(arr) {
65
65
  return obj;
66
66
  }
67
67
 
68
+ function normalizeArray(value) {
69
+ if (!utils.isArray(value)) return value;
70
+
71
+ const keys = Object.keys(value);
72
+ return keys.length !== value.length || keys.some((key, index) => key !== String(index))
73
+ ? arrayToObject(value)
74
+ : value;
75
+ }
76
+
77
+ function normalizeArrays(obj) {
78
+ const pending = [obj];
79
+ while (pending.length) {
80
+ const target = pending.pop();
81
+ Object.keys(target).forEach((key) => {
82
+ const value = (target[key] = normalizeArray(target[key]));
83
+ if (utils.isArray(value) || utils.isPlainObject(value)) {
84
+ pending.push(value);
85
+ }
86
+ });
87
+ }
88
+ return obj;
89
+ }
90
+
68
91
  /**
69
92
  * It takes a FormData object and returns a JavaScript object
70
93
  *
@@ -86,6 +109,7 @@ function formDataToJSON(formData) {
86
109
 
87
110
  if (isLast) {
88
111
  if (utils.hasOwnProp(target, name)) {
112
+ target[name] = normalizeArray(target[name]);
89
113
  target[name] = utils.isArray(target[name])
90
114
  ? target[name].concat(value)
91
115
  : [target[name], value];
@@ -116,7 +140,7 @@ function formDataToJSON(formData) {
116
140
  buildPath(parsePropPath(name), value, obj, 0);
117
141
  });
118
142
 
119
- return obj;
143
+ return normalizeArrays(obj);
120
144
  }
121
145
 
122
146
  return null;
@@ -6,7 +6,10 @@ import platform from '../platform/index.js';
6
6
 
7
7
  // RFC 2397: data:[<mediatype>][;base64],<data>
8
8
  // mediatype = type/subtype followed by optional ;name=value parameters
9
- const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
9
+ // The `i` flag makes the `;base64` token case-insensitive, matching the WHATWG
10
+ // URL/Fetch data URL processor (and therefore the fetch adapter and browsers).
11
+ // The remaining character classes do not depend on letter case.
12
+ const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/i;
10
13
 
11
14
  /**
12
15
  * Parse data uri to a Buffer or Blob
@@ -51,7 +54,10 @@ export default function fromDataURI(uri, asBlob, options) {
51
54
 
52
55
  const buffer =
53
56
  encoding === 'base64'
54
- ? Buffer.from(body, 'base64')
57
+ ? Buffer.from(
58
+ body.replace(/%([\da-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))),
59
+ 'base64'
60
+ )
55
61
  : Buffer.from(decodeURIComponent(body), encoding);
56
62
 
57
63
  if (asBlob) {
@@ -1,16 +1,11 @@
1
1
  import platform from '../platform/index.js';
2
2
 
3
3
  export default platform.hasStandardBrowserEnv
4
- ? ((origin, isMSIE) => (url) => {
5
- url = new URL(url, platform.origin);
4
+ ? ((origin) => (url) => {
5
+ url = new URL(url, document.baseURI || platform.origin);
6
6
 
7
7
  return (
8
- origin.protocol === url.protocol &&
9
- origin.host === url.host &&
10
- (isMSIE || origin.port === url.port)
8
+ origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port
11
9
  );
12
- })(
13
- new URL(platform.origin),
14
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
15
- )
10
+ })(new URL(platform.origin))
16
11
  : () => true;
@@ -39,7 +39,8 @@ const ignoreDuplicateOf = utils.toObjectSet([
39
39
  * @returns {Object} Headers parsed into an object
40
40
  */
41
41
  export default (rawHeaders) => {
42
- const parsed = {};
42
+ // Header names are data, including __proto__; avoid inherited setters.
43
+ const parsed = Object.create(null);
43
44
  let key;
44
45
  let val;
45
46
  let i;
@@ -2,5 +2,5 @@
2
2
 
3
3
  export default function parseProtocol(url) {
4
4
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
5
- return (match && match[1]) || '';
5
+ return (match && match[1].toLowerCase()) || '';
6
6
  }
@@ -22,7 +22,9 @@ const encodeUTF8 = (str) =>
22
22
  String.fromCharCode(parseInt(hex, 16))
23
23
  );
24
24
 
25
- function resolveConfig(config) {
25
+ const readCookie = (name) => cookies.read(name);
26
+
27
+ function resolveConfig(config, readXsrfCookie = readCookie) {
26
28
  const newConfig = mergeConfig({}, config);
27
29
 
28
30
  // Read only own properties to prevent prototype pollution gadgets
@@ -51,11 +53,22 @@ function resolveConfig(config) {
51
53
  if (auth) {
52
54
  const username = utils.getSafeProp(auth, 'username') || '';
53
55
  const password = utils.getSafeProp(auth, 'password') || '';
56
+ const transitional = own('transitional');
57
+ const encodeUsername =
58
+ transitional &&
59
+ utils.hasOwnProp(transitional, 'encodeBasicAuthUsername') &&
60
+ transitional.encodeBasicAuthUsername === true;
54
61
 
55
62
  try {
56
63
  headers.set(
57
64
  'Authorization',
58
- 'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))
65
+ // Preserve legacy username bytes unless the caller opts in to UTF-8.
66
+ 'Basic ' +
67
+ btoa(
68
+ (encodeUsername ? encodeUTF8(username) : username) +
69
+ ':' +
70
+ (password ? encodeUTF8(password) : '')
71
+ )
59
72
  );
60
73
  } catch (e) {
61
74
  throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
@@ -93,7 +106,7 @@ function resolveConfig(config) {
93
106
  withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));
94
107
 
95
108
  if (shouldSendXSRF) {
96
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
109
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);
97
110
 
98
111
  if (xsrfValue) {
99
112
  headers.set(xsrfHeaderName, xsrfValue);
@@ -1,3 +1,5 @@
1
+ import { domainToASCII } from 'url';
2
+
1
3
  const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']);
2
4
 
3
5
  const trimTrailingDots = (value) => {
@@ -319,7 +321,20 @@ const normalizeNoProxyHost = (hostname) => {
319
321
  hostname = hostname.slice(1, -1);
320
322
  }
321
323
 
322
- const trimmed = trimTrailingDots(hostname);
324
+ let trimmed = trimTrailingDots(hostname);
325
+ if (trimmed.indexOf(':') !== -1) {
326
+ try {
327
+ trimmed = new URL('http://[' + trimmed + ']/').hostname.slice(1, -1);
328
+ } catch (_err) {
329
+ return trimmed;
330
+ }
331
+ } else if (/[\u0080-\uffff]/.test(trimmed)) {
332
+ const prefix = /^[*.]+/.exec(trimmed);
333
+ const start = prefix ? prefix[0] : '';
334
+ const ascii = domainToASCII(trimmed.slice(start.length));
335
+ if (!ascii) return '';
336
+ trimmed = start + trimTrailingDots(ascii);
337
+ }
323
338
 
324
339
  // IPv4 shorthand/octal/hex → dotted-decimal; helper is a no-op for inputs
325
340
  // containing ':' (IPv6 and IPv4-mapped IPv6) so we fall through to unmap.
@@ -313,11 +313,17 @@ const isPlainObject = (val) => {
313
313
  const prototype = getPrototypeOf(val);
314
314
  return (
315
315
  (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
316
- // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
317
- // evidence the value is tagged/iterable, while ignoring members reachable
318
- // only through shared or terminal prototype boundaries.
319
- !hasOwnInPrototypeChain(val, toStringTag) &&
320
- !hasOwnInPrototypeChain(val, iterator)
316
+ // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the
317
+ // value is tagged/iterable, ignoring members reachable only through shared
318
+ // or terminal prototype boundaries. This is exactly what
319
+ // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted
320
+ // above (null, Object.prototype, or a terminal null-prototype template) is
321
+ // a boundary, so the walk never inspects anything but `val`'s own members,
322
+ // and stops before even those when `val` is itself the boundary
323
+ // Object.prototype. Checking that inline avoids allocating the walker's
324
+ // `seen` list twice per call on the mergeConfig / merge hot path.
325
+ (isPrototypeBoundary(val, prototype, true) ||
326
+ (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)))
321
327
  );
322
328
  };
323
329
 
@@ -581,15 +587,30 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
581
587
  function merge(...objs) {
582
588
  const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
583
589
  const result = {};
590
+ // Caseless lookup only applies to string keys — symbol keys are
591
+ // identity-matched. Every string key that reaches `result` passes through
592
+ // this index first, so it can never hold two case variants of one key and a
593
+ // lowercase -> key map is exactly what findKey(result, key) would rescan
594
+ // Object.keys(result) for on each assignment.
595
+ const lowerCaseKeys = caseless ? Object.create(null) : null;
584
596
  const assignValue = (val, key) => {
585
597
  // Skip dangerous property names to prevent prototype pollution
586
598
  if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
587
599
  return;
588
600
  }
589
601
 
590
- // findKey lowercases the key, so caseless lookup only applies to strings —
591
- // symbol keys are identity-matched.
592
- const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;
602
+ let targetKey = key;
603
+ if (lowerCaseKeys && typeof key === 'string') {
604
+ const lowerKey = key.toLowerCase();
605
+ const knownKey = lowerCaseKeys[lowerKey];
606
+ // A key recorded but absent from `result` was skipped by skipUndefined;
607
+ // the later spelling wins then, as it does for findKey.
608
+ if (knownKey !== undefined && hasOwnProperty(result, knownKey)) {
609
+ targetKey = knownKey;
610
+ } else {
611
+ lowerCaseKeys[lowerKey] = key;
612
+ }
613
+ }
593
614
  // Read via own-prop only — a bare `result[targetKey]` walks the prototype
594
615
  // chain, so a polluted Object.prototype value could surface here and get
595
616
  // copied into the merged result.
@@ -613,7 +634,7 @@ function merge(...objs) {
613
634
 
614
635
  forEach(source, assignValue);
615
636
 
616
- if (typeof source !== 'object' || isArray(source)) {
637
+ if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) {
617
638
  continue;
618
639
  }
619
640
 
@@ -772,7 +793,37 @@ const toArray = (thing) => {
772
793
  if (!thing) return null;
773
794
  if (isArray(thing)) return thing;
774
795
  let i = thing.length;
775
- if (!isNumber(i)) return null;
796
+ if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null;
797
+
798
+ // Bound the copy by actual indexed properties, including hidden and inherited
799
+ // members of array-like collections, rather than by the declared length alone.
800
+ const indexes = new Set();
801
+ const seen = new Set();
802
+ let source = thing;
803
+
804
+ while (source != null && indexes.size < i) {
805
+ if (seen.has(source)) return null;
806
+ seen.add(source);
807
+
808
+ const prototype = getPrototypeOf(source);
809
+ if (isPrototypeBoundary(source, prototype, source === thing)) break;
810
+
811
+ Object.getOwnPropertyNames(source).forEach((key) => {
812
+ const index = +key;
813
+ if (
814
+ Number.isInteger(index) &&
815
+ index >= 0 &&
816
+ index < i &&
817
+ String(index) === key &&
818
+ hasOwnProperty(source, key)
819
+ ) {
820
+ indexes.add(index);
821
+ }
822
+ });
823
+ source = prototype;
824
+ }
825
+
826
+ if (indexes.size !== i) return null;
776
827
  const arr = new Array(i);
777
828
  while (i-- > 0) {
778
829
  arr[i] = thing[i];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "./dist/node/axios.cjs",
6
6
  "module": "./index.js",
@@ -161,7 +161,6 @@
161
161
  "abortcontroller-polyfill": "^1.7.8",
162
162
  "acorn": "^8.17.0",
163
163
  "body-parser": "^2.3.0",
164
- "chalk": "^5.6.2",
165
164
  "cross-env": "^10.1.0",
166
165
  "dev-null": "^0.1.1",
167
166
  "eslint": "^10.6.0",
@@ -28,6 +28,10 @@ require('bare-url/global')
28
28
 
29
29
  See the [`bare-url` reference](https://docs.pears.com/reference/bare/modules/bare-url).
30
30
 
31
+ ## Threat model
32
+
33
+ `bare-url` is one of the addons Bare compiles into its binary, so it inherits [Bare's threat model](https://github.com/holepunchto/bare/blob/main/docs/threat-model.md). See [`docs/threat-model.md`](docs/threat-model.md) for where this addon sits in it.
34
+
31
35
  ## License
32
36
 
33
37
  Apache-2.0
@@ -87,6 +87,9 @@ declare namespace URL {
87
87
  /**
88
88
  * Convert a platform-specific file path to a `file:` URL.
89
89
  * @param pathname - The platform-specific file path to convert.
90
+ * @throws {INVALID_ARG_VALUE} (Windows) the path is a UNC path with an empty server name or
91
+ * no resource path.
92
+ * @throws {INVALID_URL} the path does not form a valid `file:` URL.
90
93
  */
91
94
  export function pathToFileURL(pathname: string): URL
92
95
 
@@ -494,6 +494,26 @@ function encodePath(value) {
494
494
  return value.replace(pathDelimiterAll, (match) => escapes[match])
495
495
  }
496
496
 
497
+ function encodeFilePath(value) {
498
+ // Paths hardly ever contain any of these, so one pass to rule them out is
499
+ // cheaper than the six or seven replacements it stands in for.
500
+ if (!reserved.test(value)) return value
501
+
502
+ value = value
503
+ .replaceAll('%', '%25') // Must be first
504
+ .replaceAll('#', '%23')
505
+ .replaceAll('?', '%3f')
506
+ .replaceAll('\n', '%0a')
507
+ .replaceAll('\r', '%0d')
508
+ .replaceAll('\t', '%09')
509
+
510
+ if (!isWindows) {
511
+ value = value.replaceAll('\\', '%5c')
512
+ }
513
+
514
+ return value
515
+ }
516
+
497
517
  function encodeQuery(value) {
498
518
  if (value.indexOf('#') === -1) return value
499
519
 
@@ -600,7 +620,27 @@ exports.fileURLToPath = function fileURLToPath(url) {
600
620
  }
601
621
 
602
622
  exports.pathToFileURL = function pathToFileURL(pathname) {
603
- let resolved = path.resolve(pathname)
623
+ const isUNC = isWindows && pathname.startsWith('\\\\')
624
+
625
+ let resolved = isUNC ? pathname : path.resolve(pathname)
626
+
627
+ if (isUNC || (isWindows && resolved.startsWith('\\\\'))) {
628
+ // https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
629
+ const hostStart = resolved.startsWith('\\\\?\\UNC\\') ? 8 : 2
630
+ const hostEnd = resolved.indexOf('\\', hostStart)
631
+
632
+ if (hostEnd === -1) {
633
+ throw errors.INVALID_ARG_VALUE('Missing UNC resource path')
634
+ }
635
+
636
+ if (hostEnd === 2) {
637
+ throw errors.INVALID_ARG_VALUE('Empty UNC servername')
638
+ }
639
+
640
+ const hostname = truncateHost('file', resolved.slice(hostStart, hostEnd))
641
+
642
+ return new URL('file://' + hostname + encodeFilePath(resolved.slice(hostEnd)))
643
+ }
604
644
 
605
645
  if (pathname[pathname.length - 1] === '/') {
606
646
  resolved += '/'
@@ -608,23 +648,7 @@ exports.pathToFileURL = function pathToFileURL(pathname) {
608
648
  resolved += '\\'
609
649
  }
610
650
 
611
- // Paths hardly ever contain any of these, so one pass to rule them out is
612
- // cheaper than the six or seven replacements it stands in for.
613
- if (reserved.test(resolved)) {
614
- resolved = resolved
615
- .replaceAll('%', '%25') // Must be first
616
- .replaceAll('#', '%23')
617
- .replaceAll('?', '%3f')
618
- .replaceAll('\n', '%0a')
619
- .replaceAll('\r', '%0d')
620
- .replaceAll('\t', '%09')
621
-
622
- if (!isWindows) {
623
- resolved = resolved.replaceAll('\\', '%5c')
624
- }
625
- }
626
-
627
- return new URL('file:' + resolved)
651
+ return new URL('file:' + encodeFilePath(resolved))
628
652
  }
629
653
 
630
654
  exports.format = function format(parts) {
@@ -30,4 +30,8 @@ module.exports = class URLError extends Error {
30
30
  static INVALID_FILE_URL_PATH(msg = 'Invalid file: URL path') {
31
31
  return new URLError(msg, URLError.INVALID_FILE_URL_PATH)
32
32
  }
33
+
34
+ static INVALID_ARG_VALUE(msg = 'Invalid argument value') {
35
+ return new URLError(msg, URLError.INVALID_ARG_VALUE)
36
+ }
33
37
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-url",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "WHATWG URL implementation for JavaScript",
5
5
  "exports": {
6
6
  "./package": "./package.json",
@@ -1,4 +1,30 @@
1
- ## Follow Redirects
1
+ ## _Follow Redirects_ is in need of funding
2
+
3
+ > [!IMPORTANT]
4
+ > **Maintenance paused until funding found.**
5
+ >
6
+ > follow-redirects is downloaded over 400 million times per month,
7
+ > It has been maintained for over ten years by one volunteer,
8
+ > who has no funds to provide update and security guarantees.
9
+ >
10
+ > **What this means for you:**
11
+ > the package stays published and keeps working as it does today,
12
+ > but there are no guarantees of bug fixes, security fixes,
13
+ > or replies to issues and pull requests.
14
+ > Security reports are handled best-effort only; see [SECURITY.md](SECURITY.md).
15
+ >
16
+ > **What can restart maintenance:**
17
+ > Even if only 0.1% of downloads paid $0.01, we'd be fully funded
18
+ > with $4000 per month.
19
+ > That's not the case, and that's okay,
20
+ > but unfortunately also insufficient to continue.
21
+ > We need to cover security triage, CVE handling, fixes, and releases.
22
+ > Progress toward that goal will be posted here.
23
+ >
24
+ > **If your company depends on follow-redirects,**
25
+ > directly or another library,
26
+ > please [sponsor on GitHub](https://github.com/sponsors/RubenVerborgh)
27
+ > or email us for invoice-based funding or a security support agreement.
2
28
 
3
29
  Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects.
4
30
 
@@ -311,7 +311,7 @@ RedirectableRequest.prototype._sanitizeOptions = function (options) {
311
311
  }
312
312
  }
313
313
  // Ensure sensitive headers are always present
314
- if (!isArray(options.sensitiveHeaders)) {
314
+ if (!Array.isArray(options.sensitiveHeaders)) {
315
315
  options.sensitiveHeaders = [];
316
316
  }
317
317
 
@@ -689,10 +689,6 @@ function isSubdomain(subdomain, domain) {
689
689
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
690
690
  }
691
691
 
692
- function isArray(value) {
693
- return value instanceof Array;
694
- }
695
-
696
692
  function isString(value) {
697
693
  return typeof value === "string" || value instanceof String;
698
694
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "follow-redirects",
3
- "version": "1.16.1",
3
+ "version": "1.16.2",
4
4
  "description": "HTTP and HTTPS modules that follow redirects.",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -39,6 +39,20 @@ output
39
39
  [ 'a', 'b c', '$def', "it's great" ]
40
40
  ```
41
41
 
42
+ ## parse with ANSI-C quoting
43
+
44
+ ```js
45
+ var parse = require('shell-quote/parse');
46
+ var xs = parse("echo $'it\\'s a \\n test'");
47
+ console.dir(xs);
48
+ ```
49
+
50
+ output
51
+
52
+ ```
53
+ [ 'echo', "it's a \n test" ]
54
+ ```
55
+
42
56
  ## parse with an environment variable
43
57
 
44
58
  ```js
@@ -123,10 +137,13 @@ commands.
123
137
 
124
138
  Each entry of `args` may be a string, or one of the object shapes that
125
139
  `parse` emits: `{ op }` (where `op` is one of the control operators
126
- `||`, `&&`, `;;`, `|&`, `<(`, `<<<`, `>>`, `>&`, `<&`, `&`, `;`, `(`,
127
- `)`, `|`, `<`, `>`), `{ op: 'glob', pattern }`, or `{ comment }`. Any
128
- other object shape, an unrecognized `op`, or a `pattern`/`comment`
129
- containing line terminators throws a `TypeError`.
140
+ `||`, `&&`, `;;&`, `;;`, `;&`, `|&`, `<(`, `>(`, `<<<`, `<<-`,
141
+ `<<`, `>>`, `>&`, `>|`, `&>>`, `&>`, `<&`, `<>`, `&`, `;`, `(`,
142
+ `)`, `|`, `<`, `>`),
143
+ `{ op: 'glob', pattern }`, or `{ comment }`. Any
144
+ other object shape, an unrecognized `op`, a `pattern`/`comment`
145
+ containing line terminators, or a string containing line terminators
146
+ anywhere after a `{ comment }` throws a `TypeError`.
130
147
 
131
148
  The output is POSIX shell (`sh`/`bash`) quoting.
132
149
  It is not valid for Windows `cmd.exe` or PowerShell,
@@ -158,6 +175,15 @@ Pass a string to use its characters as the `IFS` instead
158
175
  (for example `{ splitUnquoted: ':' }`).
159
176
  A quoted expansion (`"$VAR"`) is never split.
160
177
 
178
+ Bash [ANSI-C quoting](https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html)
179
+ (`$'...'`) is supported: escape sequences (such as `\n`, `\t`, `\\`, `\'`, `\"`,
180
+ `\xHH`, `\uHHHH`, `\UHHHHHHHH`, `\nnn`, and `\cx`) are decoded, an unrecognized
181
+ escape keeps its backslash, and the contents are never word-split and never
182
+ variable-expanded, so `${VAR}` inside `$'...'` stays literal. As in bash,
183
+ `$'...'` is not special inside double or single quotes, and a NUL ends the string.
184
+ Since the result is a JavaScript string, `\xHH` and `\nnn` produce the character
185
+ with that code (U+0000 to U+00FF), not a raw byte.
186
+
161
187
  Only simple `$VARNAME` and `${VARNAME}` interpolation is supported.
162
188
  Bash parameter expansion beyond a plain variable name is not evaluated:
163
189
  forms such as array subscripts (`${arr[i]}`), length (`${#arr[@]}`),
@@ -186,6 +212,13 @@ parses as:
186
212
  [ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ]
187
213
  ```
188
214
 
215
+ The here-document operators (`<<` and `<<-`) are emitted like any other operator,
216
+ followed by the delimiter word.
217
+ The here-document body is not recognized:
218
+ a newline is whitespace to `parse`,
219
+ so the lines after the command are parsed as ordinary tokens,
220
+ subject to quoting, comments, globs, and variable expansion.
221
+
189
222
  # install
190
223
 
191
224
  With [npm](http://npmjs.org) do:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shell-quote",
3
3
  "description": "quote and parse shell commands",
4
- "version": "1.10.0",
4
+ "version": "1.12.0",
5
5
  "author": {
6
6
  "name": "James Halliday",
7
7
  "email": "mail@substack.net",
@@ -41,11 +41,11 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@arethetypeswrong/cli": "^0.18.5",
44
- "@ljharb/eslint-config": "^22.2.3",
44
+ "@ljharb/eslint-config": "^22.2.5",
45
45
  "@ljharb/tsconfig": "^0.3.2",
46
- "auto-changelog": "^2.6.0",
47
- "eslint": "^10.6.0",
48
- "evalmd": "^0.0.20",
46
+ "auto-changelog": "^2.7.0",
47
+ "eslint": "^10.11.0",
48
+ "evalmd": "^0.0.22",
49
49
  "in-publish": "^2.0.1",
50
50
  "jiti": "^0.0.0",
51
51
  "npmignore": "^0.3.5",
@@ -66,8 +66,12 @@
66
66
  "publishConfig": {
67
67
  "ignore": [
68
68
  ".github/workflows",
69
+ ".nycrc",
70
+ "eslint.config.mjs",
69
71
  "example",
70
- "CHANGELOG.md"
72
+ "CHANGELOG.md",
73
+ "security.md",
74
+ "test"
71
75
  ]
72
76
  },
73
77
  "engines": {
@@ -1,7 +1,7 @@
1
1
  declare namespace parse {
2
2
  /** A shell control operator. */
3
3
  export interface ControlOperator {
4
- op: '||' | '&&' | ';;' | '|&' | '<(' | '<<<' | '>>' | '>&' | '<&' | '&' | ';' | '(' | ')' | '|' | '<' | '>';
4
+ op: '||' | '&&' | ';;&' | ';;' | ';&' | '|&' | '<(' | '>(' | '<<<' | '<<-' | '<<' | '>>' | '>&' | '>|' | '&>>' | '&>' | '<&' | '<>' | '&' | ';' | '(' | ')' | '|' | '<' | '>';
5
5
  }
6
6
 
7
7
  /** A glob pattern parsed from the shell command. */