appium-mac2-driver 4.5.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 (295) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/lib/session-claim-handler.d.ts.map +1 -1
  3. package/build/lib/session-claim-handler.js +1 -2
  4. package/build/lib/session-claim-handler.js.map +1 -1
  5. package/build/lib/wda-mac.d.ts +0 -1
  6. package/build/lib/wda-mac.d.ts.map +1 -1
  7. package/build/lib/wda-mac.js +1 -1
  8. package/lib/session-claim-handler.ts +1 -2
  9. package/lib/wda-mac.ts +1 -2
  10. package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
  11. package/node_modules/@appium/support/build/lib/npm.js +2 -1
  12. package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
  13. package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
  14. package/node_modules/@appium/support/build/lib/util.js +13 -1
  15. package/node_modules/@appium/support/build/lib/util.js.map +1 -1
  16. package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
  17. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  18. package/node_modules/@appium/support/build/lib/zip.js +193 -64
  19. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  20. package/node_modules/@appium/support/lib/npm.ts +2 -1
  21. package/node_modules/@appium/support/lib/util.ts +13 -1
  22. package/node_modules/@appium/support/lib/zip.ts +231 -71
  23. package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +1934 -0
  24. package/node_modules/@appium/support/node_modules/axios/LICENSE +7 -0
  25. package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  26. package/node_modules/@appium/support/node_modules/axios/README.md +2851 -0
  27. package/node_modules/@appium/support/node_modules/axios/dist/axios.js +5807 -0
  28. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +5 -0
  29. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +1 -0
  30. package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +5829 -0
  31. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +5850 -0
  32. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +3 -0
  33. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  34. package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +6808 -0
  35. package/node_modules/@appium/support/node_modules/axios/index.d.cts +766 -0
  36. package/node_modules/@appium/support/node_modules/axios/index.d.ts +787 -0
  37. package/node_modules/@appium/support/node_modules/axios/index.js +45 -0
  38. package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +36 -0
  39. package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +132 -0
  40. package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +696 -0
  41. package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +1490 -0
  42. package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +277 -0
  43. package/node_modules/@appium/support/node_modules/axios/lib/axios.js +89 -0
  44. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  45. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  46. package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +5 -0
  47. package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +306 -0
  48. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +219 -0
  49. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  50. package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  51. package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +8 -0
  52. package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +76 -0
  53. package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  54. package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +174 -0
  55. package/node_modules/@appium/support/node_modules/axios/lib/core/methodList.js +17 -0
  56. package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  57. package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +27 -0
  58. package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +28 -0
  59. package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +178 -0
  60. package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +10 -0
  61. package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +3 -0
  62. package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +2 -0
  63. package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +1 -0
  64. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  65. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  66. package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  67. package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  68. package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +7 -0
  69. package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  70. package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +14 -0
  71. package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +69 -0
  72. package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +18 -0
  73. package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  74. package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  75. package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +64 -0
  76. package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  77. package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  78. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  79. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  80. package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  81. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  82. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  83. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  84. package/node_modules/@appium/support/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  85. package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +2 -0
  86. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  87. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  88. package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  89. package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +15 -0
  90. package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  91. package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  92. package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  93. package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +55 -0
  94. package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +28 -0
  95. package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +45 -0
  96. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +279 -0
  97. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  98. package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +89 -0
  99. package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +112 -0
  100. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  101. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  102. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  103. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +13 -0
  104. package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +52 -0
  105. package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +7 -0
  106. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  107. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  108. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  109. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +37 -0
  110. package/node_modules/@appium/support/node_modules/axios/lib/utils.js +1150 -0
  111. package/node_modules/@appium/support/node_modules/axios/package.json +203 -0
  112. package/node_modules/@appium/support/package.json +6 -6
  113. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
  114. package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
  115. package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
  116. package/node_modules/@appium/types/package.json +2 -2
  117. package/node_modules/appium-xcode/CHANGELOG.md +7 -0
  118. package/node_modules/appium-xcode/package.json +4 -4
  119. package/node_modules/asyncbox/README.md +43 -0
  120. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +9 -0
  121. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
  122. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +35 -0
  123. package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
  124. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +9 -0
  125. package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
  126. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js +23 -0
  127. package/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
  128. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts +9 -0
  129. package/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
  130. package/node_modules/asyncbox/build/cjs/lib/errors.js +20 -0
  131. package/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
  132. package/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
  133. package/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
  134. package/node_modules/asyncbox/build/cjs/lib/index.js +24 -0
  135. package/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
  136. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
  137. package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
  138. package/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
  139. package/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
  140. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts +74 -0
  141. package/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
  142. package/node_modules/asyncbox/build/cjs/lib/lock.js +295 -0
  143. package/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
  144. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +15 -0
  145. package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
  146. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
  147. package/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
  148. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts +17 -0
  149. package/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
  150. package/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
  151. package/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
  152. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +20 -0
  153. package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
  154. package/node_modules/asyncbox/build/cjs/lib/sleep.js +61 -0
  155. package/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
  156. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +18 -0
  157. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
  158. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +51 -0
  159. package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
  160. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +16 -0
  161. package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
  162. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js +45 -0
  163. package/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
  164. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
  165. package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
  166. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js +32 -0
  167. package/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
  168. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +9 -0
  169. package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
  170. package/node_modules/asyncbox/build/esm/lib/asyncmap.js +20 -0
  171. package/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
  172. package/node_modules/asyncbox/build/esm/lib/errors.d.ts +9 -0
  173. package/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
  174. package/node_modules/asyncbox/build/esm/lib/errors.js +15 -0
  175. package/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
  176. package/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
  177. package/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
  178. package/node_modules/asyncbox/build/esm/lib/index.js +10 -0
  179. package/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
  180. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
  181. package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
  182. package/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
  183. package/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
  184. package/node_modules/asyncbox/build/esm/lib/lock.d.ts +74 -0
  185. package/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
  186. package/node_modules/asyncbox/build/esm/lib/lock.js +291 -0
  187. package/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
  188. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
  189. package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
  190. package/node_modules/asyncbox/build/esm/lib/long-sleep.js +33 -0
  191. package/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
  192. package/node_modules/asyncbox/build/esm/lib/retry.d.ts +17 -0
  193. package/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
  194. package/node_modules/asyncbox/build/esm/lib/retry.js +53 -0
  195. package/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
  196. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts +20 -0
  197. package/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
  198. package/node_modules/asyncbox/build/esm/lib/sleep.js +58 -0
  199. package/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
  200. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
  201. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
  202. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +48 -0
  203. package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
  204. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +16 -0
  205. package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
  206. package/node_modules/asyncbox/build/esm/lib/with-timeout.js +42 -0
  207. package/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
  208. package/node_modules/asyncbox/lib/asyncfilter.ts +38 -0
  209. package/node_modules/asyncbox/lib/asyncmap.ts +29 -0
  210. package/node_modules/asyncbox/lib/errors.ts +15 -0
  211. package/node_modules/asyncbox/lib/index.ts +21 -0
  212. package/node_modules/asyncbox/lib/limit-function.ts +18 -0
  213. package/node_modules/asyncbox/lib/lock.ts +360 -0
  214. package/node_modules/asyncbox/lib/long-sleep.ts +38 -0
  215. package/node_modules/asyncbox/lib/retry.ts +61 -0
  216. package/node_modules/asyncbox/lib/sleep.ts +79 -0
  217. package/node_modules/asyncbox/lib/wait-for-condition.ts +52 -0
  218. package/node_modules/asyncbox/lib/with-timeout.ts +43 -0
  219. package/node_modules/asyncbox/package.json +8 -8
  220. package/node_modules/axios/README.md +41 -106
  221. package/node_modules/axios/dist/axios.js +931 -278
  222. package/node_modules/axios/dist/axios.min.js +2 -2
  223. package/node_modules/axios/dist/axios.min.js.map +1 -1
  224. package/node_modules/axios/dist/browser/axios.cjs +948 -268
  225. package/node_modules/axios/dist/esm/axios.js +948 -268
  226. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  227. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  228. package/node_modules/axios/dist/node/axios.cjs +925 -242
  229. package/node_modules/axios/index.d.cts +20 -1
  230. package/node_modules/axios/index.d.ts +18 -1
  231. package/node_modules/axios/lib/adapters/fetch.js +73 -20
  232. package/node_modules/axios/lib/adapters/http.js +145 -26
  233. package/node_modules/axios/lib/adapters/xhr.js +120 -13
  234. package/node_modules/axios/lib/core/Axios.js +67 -12
  235. package/node_modules/axios/lib/core/AxiosError.js +59 -0
  236. package/node_modules/axios/lib/core/AxiosHeaders.js +17 -4
  237. package/node_modules/axios/lib/core/InterceptorManager.js +13 -2
  238. package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  239. package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  240. package/node_modules/axios/lib/core/dispatchRequest.js +20 -0
  241. package/node_modules/axios/lib/core/mergeConfig.js +183 -120
  242. package/node_modules/axios/lib/defaults/transitional.js +1 -0
  243. package/node_modules/axios/lib/env/data.js +1 -1
  244. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +11 -2
  245. package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -1
  246. package/node_modules/axios/lib/helpers/composeSignals.js +6 -3
  247. package/node_modules/axios/lib/helpers/cookies.js +30 -6
  248. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +34 -7
  249. package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  250. package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -1
  251. package/node_modules/axios/lib/helpers/fromDataURI.js +8 -2
  252. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +4 -9
  253. package/node_modules/axios/lib/helpers/parseHeaders.js +2 -1
  254. package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  255. package/node_modules/axios/lib/helpers/resolveConfig.js +16 -3
  256. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +16 -1
  257. package/node_modules/axios/lib/utils.js +61 -10
  258. package/node_modules/axios/package.json +1 -2
  259. package/node_modules/follow-redirects/README.md +27 -1
  260. package/node_modules/follow-redirects/index.js +1 -5
  261. package/node_modules/follow-redirects/package.json +1 -1
  262. package/node_modules/shell-quote/README.md +37 -4
  263. package/node_modules/shell-quote/package.json +10 -6
  264. package/node_modules/shell-quote/parse.d.ts +1 -1
  265. package/node_modules/shell-quote/parse.js +63 -11
  266. package/node_modules/shell-quote/quote.d.ts +2 -1
  267. package/node_modules/shell-quote/quote.js +23 -3
  268. package/node_modules/uuid/package.json +17 -17
  269. package/package.json +4 -6
  270. package/node_modules/async-lock/AUTHORS +0 -21
  271. package/node_modules/async-lock/History.md +0 -132
  272. package/node_modules/async-lock/LICENSE +0 -22
  273. package/node_modules/async-lock/README.md +0 -177
  274. package/node_modules/async-lock/index.js +0 -2
  275. package/node_modules/async-lock/lib/index.js +0 -312
  276. package/node_modules/async-lock/package.json +0 -48
  277. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  278. package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  279. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
  280. package/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  281. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  282. package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  283. package/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
  284. package/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  285. package/node_modules/asyncbox/lib/asyncbox.ts +0 -382
  286. package/node_modules/shell-quote/.nycrc +0 -14
  287. package/node_modules/shell-quote/eslint.config.mjs +0 -29
  288. package/node_modules/shell-quote/security.md +0 -11
  289. package/node_modules/shell-quote/test/comment.js +0 -16
  290. package/node_modules/shell-quote/test/env.js +0 -52
  291. package/node_modules/shell-quote/test/env_fn.js +0 -21
  292. package/node_modules/shell-quote/test/op.js +0 -102
  293. package/node_modules/shell-quote/test/parse.js +0 -149
  294. package/node_modules/shell-quote/test/quote.js +0 -145
  295. 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",
@@ -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. */
@@ -8,24 +8,31 @@
8
8
  * ParseEntry,
9
9
  * } from './parse' */
10
10
 
11
- // '<(' is process substitution operator and
11
+ // '<(' and '>(' are process substitution operators and
12
12
  // can be parsed the same as control operator
13
13
  var CONTROL = /** @type {const} */ ('(?:') + /** @type {const} */ ([
14
14
  '\\|\\|',
15
- '\\&\\&',
16
- ';;',
17
- '\\|\\&',
15
+ '\\&(?:\\&|>>?)', // `&&`, `&>`, and `&>>`
16
+ ';;\\&?', // `;;` and `;;&`
17
+ '[;|]\\&', // `;&` and `|&`
18
18
  '\\<\\(',
19
19
  '\\<\\<\\<',
20
+ '\\<\\<-',
21
+ '\\<\\<(?!\\()', // `<<(` stays `<` and `<(`, as zsh reads it; other shells reject it
20
22
  '>>',
21
- '>\\&',
22
- '<\\&',
23
+ '>[&|(]', // `>&`, `>|`, and `>(`
24
+ '<[&>]', // `<&` and `<>`
23
25
  '[&;()|<>]'
24
26
  ]).join(/** @type {const} */ ('|')) + /** @type {const} */ (')');
25
27
  var controlRE = new RegExp('^' + CONTROL + '$');
26
28
  var META = /** @type {const} */ ('|&;()<> \\t');
27
29
  var SINGLE_QUOTE = /** @type {const} */ ('\'([^\']*?)\'');
28
- var DOUBLE_QUOTE = /** @type {const} */ ('"((\\\\"|[^"])*?)"');
30
+ // bash ANSI-C quoting, `$'...'`: a backslash escapes the next character, including `'`
31
+ var ANSI_C_BODY = '(?:\\\\[\\s\\S]|[^\\\\\'])*?';
32
+ var ANSI_C_QUOTE = '\\$\'' + ANSI_C_BODY + '\'';
33
+ var ansiCAt = new RegExp('\\$\'' + ANSI_C_BODY + '(?:(\')|\\\\?$)', 'g');
34
+ var ANSI_C_LETTERS = 'abeEfnrtv';
35
+ var ANSI_C_CHARS = '\x07\b\x1B\x1B\f\n\r\t\v';
29
36
  var hash = /^#$/;
30
37
 
31
38
  var SQ = /** @type {const} */ ("'");
@@ -80,6 +87,46 @@ function getVar(env, pre, key) {
80
87
  return pre + r;
81
88
  }
82
89
 
90
+ var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
91
+
92
+ /**
93
+ * @param {string} m
94
+ * @param {string} escape
95
+ */
96
+ function expandAnsiCEscape(m, escape) {
97
+ var kind = escape.charAt(0);
98
+ if (kind === 'c') {
99
+ var ctrl = escape.charAt(1);
100
+ return ctrl === '?' ? '\x7F' : String.fromCharCode(ctrl.charCodeAt(0) & 0x1F);
101
+ }
102
+ if (kind === 'x' || kind === 'u' || kind === 'U') {
103
+ var cp = parseInt(escape.slice(1), 16);
104
+ if (cp > 0x10FFFF) {
105
+ return m;
106
+ }
107
+ return String.fromCharCode.apply(null, cp > 0xFFFF ? [0xD7C0 + (cp >> 10), 0xDC00 + (cp & 0x3FF)] : [cp]);
108
+ }
109
+ if (kind >= '0' && kind <= '7') {
110
+ return String.fromCharCode(parseInt(escape, 8) & 0xFF);
111
+ }
112
+ var letter = ANSI_C_LETTERS.indexOf(escape);
113
+ return letter < 0 ? escape : ANSI_C_CHARS.charAt(letter);
114
+ }
115
+
116
+ /** @param {string} body */
117
+ function expandAnsiC(body) {
118
+ return body.replace(ansiCEscape, expandAnsiCEscape).split('\0')[0]; // like bash, a NUL ends the string
119
+ }
120
+
121
+ /**
122
+ * @param {string} s
123
+ * @param {number} i
124
+ */
125
+ function closesAnsiC(s, i) {
126
+ ansiCAt.lastIndex = i;
127
+ return !!(/** @type {RegExpExecArray} */ (ansiCAt.exec(s)))[1];
128
+ }
129
+
83
130
  /**
84
131
  * @param {string} string
85
132
  * @param {Env} [env]
@@ -92,11 +139,12 @@ function parseInternal(string, env, opts) {
92
139
  }
93
140
  var BS = opts.escape || '\\';
94
141
  var ifs = opts.splitUnquoted === true ? ' \t\n' : (typeof opts.splitUnquoted === 'string' ? opts.splitUnquoted : '');
95
- var BAREWORD = '(\\' + BS + '[\'"' + META + ']|[^\\s\'"' + META + '])+';
142
+ var BAREWORD = '(\\' + BS + '[\'"$\\' + BS + META + ']|\\$\\$|\\$(?!' + ANSI_C_QUOTE.slice(2) + ')|[^\\s\'"$' + META + '])+';
143
+ var DOUBLE_QUOTE = '"(?:\\' + BS + '[\\s\\S]|[^"\\' + BS + '])*"';
96
144
 
97
145
  var chunker = new RegExp([
98
146
  '(' + CONTROL + ')', // control chars
99
- '(' + BAREWORD + '|' + DOUBLE_QUOTE + '|' + SINGLE_QUOTE + ')+'
147
+ '(' + ANSI_C_QUOTE + '|' + BAREWORD + '|' + DOUBLE_QUOTE + '|' + SINGLE_QUOTE + ')+'
100
148
  ].join('|'), 'g');
101
149
 
102
150
  var matches = matchAll(string, chunker);
@@ -173,9 +221,8 @@ function parseInternal(string, env, opts) {
173
221
  varend -= 1;
174
222
  varname = s.slice(i, varend);
175
223
  i = varend;
176
- } else if ((/[*@#?$!_-]/).test(char)) {
224
+ } else if ((/[*@#?$!-]/).test(char)) {
177
225
  varname = char;
178
- i += 1;
179
226
  } else {
180
227
  var slicedFromI = s.slice(i);
181
228
  varend = slicedFromI.match(/[^\w\d_]/);
@@ -252,6 +299,11 @@ function parseInternal(string, env, opts) {
252
299
  return /** @type {const} */ ([commentObj]);
253
300
  } else if (c === BS) {
254
301
  esc = true;
302
+ } else if (c === DS && s.charAt(i + 1) === SQ && closesAnsiC(s, i)) {
303
+ flushRun();
304
+ sawQuote = true;
305
+ out += expandAnsiC(s.slice(i + 2, ansiCAt.lastIndex - 1));
306
+ i = ansiCAt.lastIndex - 1;
255
307
  } else if (c === DS) {
256
308
  var value = parseEnvVar();
257
309
  if (!ifs) {
@@ -5,7 +5,8 @@ import parse = require('./parse');
5
5
  *
6
6
  * Accepts strings and the object shapes that {@link parse} emits. Throws a
7
7
  * `TypeError` for unrecognized object shapes, `op` values outside the
8
- * allowlist, or `pattern`/`comment` values containing line terminators.
8
+ * allowlist, `pattern`/`comment` values containing line terminators, or
9
+ * strings containing line terminators anywhere after a `comment`.
9
10
  *
10
11
  * @param args - Array of tokens to quote.
11
12
  * @returns A shell-safe quoted string.