appium-mac2-driver 4.3.5 → 4.3.6

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 (340) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m +48 -2
  3. package/WebDriverAgentMac/WebDriverAgentMac.xcodeproj/project.pbxproj +4 -0
  4. package/build/lib/wda-mac.d.ts.map +1 -1
  5. package/build/lib/wda-mac.js +4 -5
  6. package/build/lib/wda-mac.js.map +1 -1
  7. package/lib/wda-mac.ts +4 -5
  8. package/node_modules/@appium/logger/CHANGELOG.md +8 -0
  9. package/node_modules/@appium/logger/package.json +3 -3
  10. package/node_modules/@appium/strongbox/build/lib/index.d.ts.map +1 -1
  11. package/node_modules/@appium/strongbox/build/lib/index.js +6 -1
  12. package/node_modules/@appium/strongbox/build/lib/index.js.map +1 -1
  13. package/node_modules/@appium/strongbox/lib/index.ts +6 -1
  14. package/node_modules/@appium/strongbox/package.json +2 -2
  15. package/node_modules/@appium/support/build/lib/fs.d.ts.map +1 -1
  16. package/node_modules/@appium/support/build/lib/fs.js +7 -0
  17. package/node_modules/@appium/support/build/lib/fs.js.map +1 -1
  18. package/node_modules/@appium/support/build/lib/index.d.ts.map +1 -1
  19. package/node_modules/@appium/support/build/lib/net.d.ts.map +1 -1
  20. package/node_modules/@appium/support/build/lib/net.js +6 -2
  21. package/node_modules/@appium/support/build/lib/net.js.map +1 -1
  22. package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
  23. package/node_modules/@appium/support/build/lib/util.js +10 -4
  24. package/node_modules/@appium/support/build/lib/util.js.map +1 -1
  25. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  26. package/node_modules/@appium/support/build/lib/zip.js +2 -7
  27. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  28. package/node_modules/@appium/support/lib/fs.ts +8 -1
  29. package/node_modules/@appium/support/lib/net.ts +7 -2
  30. package/node_modules/@appium/support/lib/util.ts +9 -3
  31. package/node_modules/@appium/support/lib/zip.ts +3 -9
  32. package/node_modules/@appium/support/package.json +9 -9
  33. package/node_modules/@appium/types/package.json +4 -4
  34. package/node_modules/@img/sharp-darwin-arm64/index.cjs +1 -1
  35. package/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64-0.35.5.node +0 -0
  36. package/node_modules/@img/sharp-darwin-arm64/package.json +2 -2
  37. package/node_modules/@img/sharp-libvips-darwin-arm64/README.md +1 -1
  38. package/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +2 -2
  39. package/node_modules/@img/sharp-libvips-darwin-arm64/lib/{libvips-cpp.8.18.6.dylib → libvips-cpp.8.18.7.dylib} +0 -0
  40. package/node_modules/@img/sharp-libvips-darwin-arm64/package.json +2 -2
  41. package/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +11 -11
  42. package/node_modules/appium-xcode/CHANGELOG.md +28 -0
  43. package/node_modules/appium-xcode/README.md +1 -1
  44. package/node_modules/appium-xcode/package.json +14 -18
  45. package/node_modules/b4a/browser.js +5 -0
  46. package/node_modules/b4a/index.d.ts +144 -0
  47. package/node_modules/b4a/index.js +5 -0
  48. package/node_modules/b4a/package.json +4 -1
  49. package/node_modules/b4a/runtime.d.ts +14 -0
  50. package/node_modules/bare-fs/binding.c +53 -24
  51. package/node_modules/bare-fs/index.d.ts +12 -10
  52. package/node_modules/bare-fs/index.js +13 -4
  53. package/node_modules/bare-fs/package.json +2 -1
  54. package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
  55. package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
  56. package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
  57. package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
  58. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  59. package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
  60. package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
  61. package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
  62. package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
  63. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  64. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  65. package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
  66. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  67. package/node_modules/bplist-creator/README.md +26 -6
  68. package/node_modules/bplist-creator/dist/index.cjs +508 -0
  69. package/node_modules/bplist-creator/dist/index.cjs.map +7 -0
  70. package/node_modules/bplist-creator/dist/index.d.cts +12 -0
  71. package/node_modules/bplist-creator/dist/index.d.ts +12 -0
  72. package/node_modules/bplist-creator/dist/index.mjs +472 -0
  73. package/node_modules/bplist-creator/dist/index.mjs.map +7 -0
  74. package/node_modules/bplist-creator/package.json +43 -9
  75. package/node_modules/bplist-parser/README.md +37 -3
  76. package/node_modules/bplist-parser/dist/index.cjs +385 -0
  77. package/node_modules/bplist-parser/dist/index.cjs.map +7 -0
  78. package/node_modules/bplist-parser/dist/index.d.cts +13 -0
  79. package/node_modules/bplist-parser/dist/index.d.ts +13 -0
  80. package/node_modules/bplist-parser/{bplistParser.js → dist/index.mjs} +141 -171
  81. package/node_modules/bplist-parser/dist/index.mjs.map +7 -0
  82. package/node_modules/bplist-parser/package.json +39 -12
  83. package/node_modules/brace-expansion/dist/commonjs/index.d.ts +4 -0
  84. package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
  85. package/node_modules/brace-expansion/dist/commonjs/index.js +69 -25
  86. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
  87. package/node_modules/brace-expansion/dist/esm/index.d.ts +4 -0
  88. package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
  89. package/node_modules/brace-expansion/dist/esm/index.js +68 -24
  90. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
  91. package/node_modules/brace-expansion/package.json +2 -1
  92. package/node_modules/follow-redirects/index.js +10 -1
  93. package/node_modules/follow-redirects/package.json +1 -1
  94. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  95. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
  96. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
  97. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
  98. package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
  99. package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
  100. package/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
  101. package/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
  102. package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
  103. package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
  104. package/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
  105. package/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
  106. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  107. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
  108. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
  109. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
  110. package/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
  111. package/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
  112. package/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
  113. package/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
  114. package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
  115. package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
  116. package/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
  117. package/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
  118. package/node_modules/lru-cache/package.json +27 -1
  119. package/node_modules/p-limit/index.d.ts +2 -0
  120. package/node_modules/p-limit/index.js +17 -1
  121. package/node_modules/p-limit/package.json +1 -1
  122. package/node_modules/p-limit/readme.md +2 -0
  123. package/node_modules/sharp/dist/index.d.cts +2 -2
  124. package/node_modules/sharp/dist/index.d.mts +3 -3
  125. package/node_modules/sharp/dist/is.cjs +8 -2
  126. package/node_modules/sharp/dist/is.mjs +8 -2
  127. package/node_modules/sharp/dist/operation.cjs +2 -2
  128. package/node_modules/sharp/dist/operation.mjs +2 -2
  129. package/node_modules/sharp/dist/output.cjs +1 -0
  130. package/node_modules/sharp/dist/output.mjs +1 -0
  131. package/node_modules/sharp/dist/resize.cjs +14 -14
  132. package/node_modules/sharp/dist/resize.mjs +14 -14
  133. package/node_modules/sharp/dist/sharp.cjs +3 -3
  134. package/node_modules/sharp/dist/sharp.mjs +3 -3
  135. package/node_modules/sharp/lib/index.d.ts +2 -2
  136. package/node_modules/sharp/package.json +35 -35
  137. package/node_modules/sharp/src/binding.gyp +1 -1
  138. package/node_modules/sharp/src/common.cc +4 -4
  139. package/node_modules/sharp/src/common.h +2 -2
  140. package/node_modules/sharp/src/pipeline.cc +31 -6
  141. package/node_modules/sharp/src/utilities.cc +1 -1
  142. package/node_modules/spdx-license-ids/index.json +13 -0
  143. package/node_modules/spdx-license-ids/package.json +1 -1
  144. package/node_modules/stream-buffers/.codeclimate.yml +12 -0
  145. package/node_modules/stream-buffers/.eslintignore +1 -0
  146. package/node_modules/stream-buffers/.eslintrc +25 -0
  147. package/node_modules/stream-buffers/.github/workflows/codeql-analysis.yml +71 -0
  148. package/node_modules/stream-buffers/.github/workflows/node.js.yml +31 -0
  149. package/node_modules/stream-buffers/.mailmap +1 -0
  150. package/node_modules/stream-buffers/.nvmrc +1 -0
  151. package/node_modules/stream-buffers/README.md +65 -65
  152. package/node_modules/stream-buffers/lib/constants.js +8 -6
  153. package/node_modules/stream-buffers/lib/readable_streambuffer.js +114 -136
  154. package/node_modules/stream-buffers/lib/streambuffer.js +5 -3
  155. package/node_modules/stream-buffers/lib/writable_streambuffer.js +72 -97
  156. package/node_modules/stream-buffers/package.json +7 -5
  157. package/node_modules/type-fest/index.d.ts +7 -7
  158. package/node_modules/type-fest/package.json +2 -1
  159. package/node_modules/type-fest/readme.md +7 -16
  160. package/node_modules/type-fest/source/all-extend.d.ts +9 -7
  161. package/node_modules/type-fest/source/array-reverse.d.ts +13 -12
  162. package/node_modules/type-fest/source/array-tail.d.ts +3 -3
  163. package/node_modules/type-fest/source/delimiter-case.d.ts +1 -1
  164. package/node_modules/type-fest/source/get.d.ts +1 -1
  165. package/node_modules/type-fest/source/int-closed-range.d.ts +4 -1
  166. package/node_modules/type-fest/source/int-range.d.ts +56 -9
  167. package/node_modules/type-fest/source/internal/array.d.ts +14 -13
  168. package/node_modules/type-fest/source/internal/numeric.d.ts +0 -38
  169. package/node_modules/type-fest/source/internal/object.d.ts +30 -1
  170. package/node_modules/type-fest/source/is-boolean-literal.d.ts +39 -0
  171. package/node_modules/type-fest/source/is-literal.d.ts +43 -269
  172. package/node_modules/type-fest/source/is-numeric-literal.d.ts +50 -0
  173. package/node_modules/type-fest/source/is-string-literal.d.ts +72 -0
  174. package/node_modules/type-fest/source/is-symbol-literal.d.ts +39 -0
  175. package/node_modules/type-fest/source/is-tuple.d.ts +3 -3
  176. package/node_modules/type-fest/source/jsonify.d.ts +1 -5
  177. package/node_modules/type-fest/source/merge-deep.d.ts +3 -3
  178. package/node_modules/type-fest/source/remove-prefix.d.ts +1 -1
  179. package/node_modules/type-fest/source/remove-suffix.d.ts +1 -1
  180. package/node_modules/type-fest/source/rename-keys.d.ts +163 -0
  181. package/node_modules/type-fest/source/set-required.d.ts +10 -9
  182. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +6 -4
  183. package/node_modules/type-fest/source/some-extend.d.ts +9 -7
  184. package/node_modules/type-fest/source/split-on-rest-element.d.ts +14 -13
  185. package/node_modules/type-fest/source/split.d.ts +22 -11
  186. package/node_modules/type-fest/source/string-repeat.d.ts +1 -1
  187. package/node_modules/type-fest/source/string-to-array.d.ts +1 -1
  188. package/node_modules/type-fest/source/tsconfig-json.d.ts +1 -1
  189. package/node_modules/type-fest/source/typed-array.d.ts +6 -0
  190. package/node_modules/type-fest/source/union-max.d.ts +56 -0
  191. package/node_modules/type-fest/source/writable.d.ts +2 -2
  192. package/package.json +3 -3
  193. package/node_modules/@appium/support/node_modules/asyncbox/LICENSE +0 -203
  194. package/node_modules/@appium/support/node_modules/asyncbox/README.md +0 -215
  195. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
  196. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
  197. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -301
  198. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
  199. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
  200. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
  201. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
  202. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
  203. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +0 -3
  204. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
  205. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
  206. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -288
  207. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
  208. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
  209. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
  210. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  211. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
  212. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +0 -3
  213. package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncbox.ts +0 -365
  214. package/node_modules/@appium/support/node_modules/asyncbox/lib/types.ts +0 -88
  215. package/node_modules/@appium/support/node_modules/asyncbox/package.json +0 -74
  216. package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +0 -1872
  217. package/node_modules/@appium/support/node_modules/axios/LICENSE +0 -7
  218. package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +0 -877
  219. package/node_modules/@appium/support/node_modules/axios/README.md +0 -2623
  220. package/node_modules/@appium/support/node_modules/axios/dist/axios.js +0 -5509
  221. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +0 -5
  222. package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +0 -1
  223. package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +0 -5469
  224. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +0 -5490
  225. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +0 -3
  226. package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +0 -1
  227. package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +0 -6356
  228. package/node_modules/@appium/support/node_modules/axios/index.d.cts +0 -762
  229. package/node_modules/@appium/support/node_modules/axios/index.d.ts +0 -783
  230. package/node_modules/@appium/support/node_modules/axios/index.js +0 -45
  231. package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +0 -36
  232. package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +0 -132
  233. package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +0 -643
  234. package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +0 -1406
  235. package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +0 -228
  236. package/node_modules/@appium/support/node_modules/axios/lib/axios.js +0 -89
  237. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +0 -135
  238. package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +0 -22
  239. package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +0 -5
  240. package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +0 -301
  241. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +0 -219
  242. package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +0 -474
  243. package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +0 -72
  244. package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +0 -8
  245. package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +0 -88
  246. package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +0 -89
  247. package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +0 -174
  248. package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +0 -27
  249. package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +0 -27
  250. package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +0 -28
  251. package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +0 -177
  252. package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +0 -10
  253. package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +0 -3
  254. package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +0 -2
  255. package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +0 -1
  256. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
  257. package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -59
  258. package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
  259. package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -78
  260. package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +0 -7
  261. package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
  262. package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +0 -14
  263. package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +0 -69
  264. package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +0 -18
  265. package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +0 -23
  266. package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +0 -68
  267. package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +0 -64
  268. package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
  269. package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -166
  270. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +0 -125
  271. package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
  272. package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
  273. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
  274. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
  275. package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
  276. package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +0 -2
  277. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +0 -71
  278. package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
  279. package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +0 -54
  280. package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +0 -15
  281. package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +0 -105
  282. package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
  283. package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -329
  284. package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +0 -55
  285. package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +0 -28
  286. package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +0 -44
  287. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +0 -286
  288. package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
  289. package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +0 -89
  290. package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +0 -112
  291. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
  292. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
  293. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
  294. package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +0 -13
  295. package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +0 -52
  296. package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +0 -7
  297. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +0 -11
  298. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
  299. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
  300. package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +0 -37
  301. package/node_modules/@appium/support/node_modules/axios/lib/utils.js +0 -1029
  302. package/node_modules/@appium/support/node_modules/axios/package.json +0 -203
  303. package/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64-0.35.4.node +0 -0
  304. package/node_modules/big-integer/BigInteger.d.ts +0 -2393
  305. package/node_modules/big-integer/BigInteger.js +0 -1453
  306. package/node_modules/big-integer/BigInteger.min.js +0 -1
  307. package/node_modules/big-integer/LICENSE +0 -24
  308. package/node_modules/big-integer/README.md +0 -589
  309. package/node_modules/big-integer/bower.json +0 -29
  310. package/node_modules/big-integer/package.json +0 -48
  311. package/node_modules/big-integer/tsconfig.json +0 -24
  312. package/node_modules/bplist-creator/bplistCreator.d.ts +0 -8
  313. package/node_modules/bplist-creator/bplistCreator.js +0 -460
  314. package/node_modules/bplist-creator/test/airplay.bplist +0 -0
  315. package/node_modules/bplist-creator/test/binaryData.bplist +0 -0
  316. package/node_modules/bplist-creator/test/creatorTest.js +0 -211
  317. package/node_modules/bplist-creator/test/iTunes-small.bplist +0 -0
  318. package/node_modules/bplist-creator/test/integers.bplist +0 -0
  319. package/node_modules/bplist-creator/test/sample1.bplist +0 -0
  320. package/node_modules/bplist-creator/test/sample2.bplist +0 -0
  321. package/node_modules/bplist-creator/test/uid.bplist +0 -0
  322. package/node_modules/bplist-creator/test/utf16.bplist +0 -0
  323. package/node_modules/bplist-parser/.editorconfig +0 -12
  324. package/node_modules/bplist-parser/.eslintignore +0 -1
  325. package/node_modules/bplist-parser/.eslintrc.js +0 -296
  326. package/node_modules/bplist-parser/bplistParser.d.ts +0 -8
  327. package/node_modules/stream-buffers/.travis.yml +0 -28
  328. package/node_modules/stream-buffers/coverage/coverage.json +0 -1
  329. package/node_modules/stream-buffers/coverage/lcov-report/base.css +0 -182
  330. package/node_modules/stream-buffers/coverage/lcov-report/index.html +0 -73
  331. package/node_modules/stream-buffers/coverage/lcov-report/lib/constants.js.html +0 -63
  332. package/node_modules/stream-buffers/coverage/lcov-report/lib/index.html +0 -112
  333. package/node_modules/stream-buffers/coverage/lcov-report/lib/readable_streambuffer.js.html +0 -453
  334. package/node_modules/stream-buffers/coverage/lcov-report/lib/streambuffer.js.html +0 -54
  335. package/node_modules/stream-buffers/coverage/lcov-report/lib/writable_streambuffer.js.html +0 -336
  336. package/node_modules/stream-buffers/coverage/lcov-report/prettify.css +0 -1
  337. package/node_modules/stream-buffers/coverage/lcov-report/prettify.js +0 -1
  338. package/node_modules/stream-buffers/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  339. package/node_modules/stream-buffers/coverage/lcov-report/sorter.js +0 -156
  340. package/node_modules/stream-buffers/coverage/lcov.info +0 -305
@@ -1,105 +0,0 @@
1
- import platform from '../platform/index.js';
2
- import utils from '../utils.js';
3
- import AxiosError from '../core/AxiosError.js';
4
- import isURLSameOrigin from './isURLSameOrigin.js';
5
- import cookies from './cookies.js';
6
- import buildFullPath from '../core/buildFullPath.js';
7
- import mergeConfig from '../core/mergeConfig.js';
8
- import AxiosHeaders from '../core/AxiosHeaders.js';
9
- import setFormDataHeaders from '../core/setFormDataHeaders.js';
10
- import buildURL from './buildURL.js';
11
-
12
- /**
13
- * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
14
- * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
15
- *
16
- * @param {string} str The string to encode
17
- *
18
- * @returns {string} UTF-8 bytes as a Latin-1 string
19
- */
20
- const encodeUTF8 = (str) =>
21
- encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
22
- String.fromCharCode(parseInt(hex, 16))
23
- );
24
-
25
- function resolveConfig(config) {
26
- const newConfig = mergeConfig({}, config);
27
-
28
- // Read only own properties to prevent prototype pollution gadgets
29
- // (e.g. Object.prototype.baseURL = 'https://evil.com').
30
- const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
31
-
32
- const data = own('data');
33
- let withXSRFToken = own('withXSRFToken');
34
- const xsrfHeaderName = own('xsrfHeaderName');
35
- const xsrfCookieName = own('xsrfCookieName');
36
- let headers = own('headers');
37
- const auth = own('auth');
38
- const baseURL = own('baseURL');
39
- const allowAbsoluteUrls = own('allowAbsoluteUrls');
40
- const url = own('url');
41
-
42
- newConfig.headers = headers = AxiosHeaders.from(headers);
43
-
44
- newConfig.url = buildURL(
45
- buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),
46
- own('params'),
47
- own('paramsSerializer')
48
- );
49
-
50
- // HTTP basic authentication
51
- if (auth) {
52
- const username = utils.getSafeProp(auth, 'username') || '';
53
- const password = utils.getSafeProp(auth, 'password') || '';
54
-
55
- try {
56
- headers.set(
57
- 'Authorization',
58
- 'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))
59
- );
60
- } catch (e) {
61
- throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
62
- }
63
- }
64
-
65
- if (utils.isFormData(data)) {
66
- if (
67
- platform.hasStandardBrowserEnv ||
68
- platform.hasStandardBrowserWebWorkerEnv ||
69
- utils.isReactNative(data)
70
- ) {
71
- headers.setContentType(undefined); // browser/web worker/RN handles it
72
- } else if (utils.isFunction(data.getHeaders)) {
73
- // Node.js FormData (like form-data package)
74
- setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
75
- }
76
- }
77
-
78
- // Add xsrf header
79
- // This is only done if running in a standard browser environment.
80
- // Specifically not if we're in a web worker, or react-native.
81
-
82
- if (platform.hasStandardBrowserEnv) {
83
- if (utils.isFunction(withXSRFToken)) {
84
- withXSRFToken = withXSRFToken(newConfig);
85
- }
86
-
87
- // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
88
- // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
89
- // the XSRF token cross-origin.
90
- const shouldSendXSRF =
91
- withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));
92
-
93
- if (shouldSendXSRF) {
94
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
95
-
96
- if (xsrfValue) {
97
- headers.set(xsrfHeaderName, xsrfValue);
98
- }
99
- }
100
- }
101
-
102
- return newConfig;
103
- }
104
-
105
- export default resolveConfig;
@@ -1,60 +0,0 @@
1
- 'use strict';
2
-
3
- import utils from '../utils.js';
4
-
5
- function trimSPorHTAB(str) {
6
- let start = 0;
7
- let end = str.length;
8
-
9
- while (start < end) {
10
- const code = str.charCodeAt(start);
11
-
12
- if (code !== 0x09 && code !== 0x20) {
13
- break;
14
- }
15
-
16
- start += 1;
17
- }
18
-
19
- while (end > start) {
20
- const code = str.charCodeAt(end - 1);
21
-
22
- if (code !== 0x09 && code !== 0x20) {
23
- break;
24
- }
25
-
26
- end -= 1;
27
- }
28
-
29
- return start === 0 && end === str.length ? str : str.slice(start, end);
30
- }
31
-
32
- // The control-code ranges are intentional: header sanitization strips C0/DEL bytes.
33
- // eslint-disable-next-line no-control-regex
34
- const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g');
35
- // eslint-disable-next-line no-control-regex
36
- const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
37
-
38
- function sanitizeValue(value, invalidChars) {
39
- if (utils.isArray(value)) {
40
- return value.map((item) => sanitizeValue(item, invalidChars));
41
- }
42
-
43
- return trimSPorHTAB(String(value).replace(invalidChars, ''));
44
- }
45
-
46
- export const sanitizeHeaderValue = (value) =>
47
- sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
48
-
49
- export const sanitizeByteStringHeaderValue = (value) =>
50
- sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
51
-
52
- export function toByteStringHeaderObject(headers) {
53
- const byteStringHeaders = Object.create(null);
54
-
55
- utils.forEach(headers.toJSON(), (value, header) => {
56
- byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
57
- });
58
-
59
- return byteStringHeaders;
60
- }
@@ -1,329 +0,0 @@
1
- const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']);
2
-
3
- const isIPv4Loopback = (host) => {
4
- const parts = host.split('.');
5
- if (parts.length !== 4) return false;
6
- if (parts[0] !== '127') return false;
7
- return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
8
- };
9
-
10
- /**
11
- * Canonicalize an IPv4 address written in shorthand, octal, or hex form into
12
- * dotted-decimal. IPv6 addresses and non-IP strings are returned unchanged so
13
- * the existing IPv4-mapped IPv6 unmap path and the isLoopback path can still
14
- * see them.
15
- *
16
- * Shorthand expansion mirrors Node's URL parser: literal parts fill from the
17
- * left, the final part fills the remaining octets from the right with
18
- * zero-padding on the left.
19
- * 127.1 -> 127.0.0.1
20
- * 127.0.1 -> 127.0.0.1
21
- * 1.2.3 -> 1.2.0.3
22
- *
23
- * Each octet is parsed with an explicit base: 16 for `0x`/`0X` prefix, 8 for
24
- * zero-prefixed multi-digit all-`0-7` parts, 10 otherwise. Zero-prefixed
25
- * decimal-looking parts that contain `8` or `9` are rejected to match Node's
26
- * URL parser, and the comparison layer falls through to non-bypass if either
27
- * side rejects the form (fail-safe).
28
- *
29
- * Returns the input unchanged on any parse failure, out-of-range octet, or
30
- * unusual shape (1-part, 5+ parts) so the comparison layer fails closed.
31
- */
32
- const parseIPv4Octet = (text) => {
33
- if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
34
- const n = parseInt(text.slice(2), 16);
35
- return Number.isFinite(n) ? n : null;
36
- }
37
- if (text.length > 1 && /^0[0-7]+$/.test(text)) {
38
- const n = parseInt(text, 8);
39
- return Number.isFinite(n) ? n : null;
40
- }
41
- if (text.length > 1 && /^0[0-9]+$/.test(text)) {
42
- return null;
43
- }
44
- if (/^[0-9]+$/.test(text)) {
45
- const n = parseInt(text, 10);
46
- return Number.isFinite(n) ? n : null;
47
- }
48
- return null;
49
- };
50
-
51
- const normalizeIPAddress = (host) => {
52
- if (typeof host !== 'string' || !host || host.indexOf(':') !== -1) {
53
- return host;
54
- }
55
-
56
- let h = host;
57
- if (h.charAt(0) === '[' && h.charAt(h.length - 1) === ']') {
58
- h = h.slice(1, -1);
59
- }
60
- h = h.replace(/\.+$/, '');
61
-
62
- // Allowed characters for any IPv4 shape: digits, dot, 'x', 'X', hex digits.
63
- if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
64
-
65
- const parts = h.split('.');
66
-
67
- // No part may be empty (e.g. "127..0.1" or "127.0.0."). Trailing dots are
68
- // already stripped above; this guards against the empty-middle case.
69
- if (parts.some((p) => p === '')) return host;
70
-
71
- if (parts.length === 4) {
72
- // Full IPv4 form: each part is an octet.
73
- const octets = parts.map(parseIPv4Octet);
74
- if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
75
- return octets.join('.');
76
- }
77
-
78
- if (parts.length > 4) {
79
- return host;
80
- }
81
-
82
- // Shorthand: 1..3 parts. Node's URL parser treats a 1-part input as a 32-bit
83
- // integer split into octets, which has surprising semantics (e.g. "127" ->
84
- // "0.0.0.127"). Reject 1-part inputs to keep the helper predictable: the
85
- // fail-safe returns the input unchanged and the comparison layer falls
86
- // through to non-bypass.
87
- if (parts.length === 1) return host;
88
-
89
- // 2..3 parts: literal parts fill from the left, tail fills remaining octets
90
- // from the right with zero-padding.
91
- const literalOctets = parts.slice(0, -1);
92
- const tail = parts[parts.length - 1];
93
- const tailSlots = 4 - literalOctets.length;
94
-
95
- // Tail is parsed as a full IPv4 number (hex/octal/decimal) and packed
96
- // low-byte-right into the remaining octets, matching Node's URL parser.
97
- // e.g. 127.65535 (tail 0xFFFF into 3 slots) -> 127.0.255.255;
98
- // 127.0x00ff (tail 0xFF into 3 slots) -> 127.0.0.255;
99
- // 127.0.65535 (tail 0xFFFF into 2 slots) -> 127.0.255.255.
100
- const tailValue = parseIPv4Octet(tail);
101
- if (tailValue === null) return host;
102
- const maxTail = (1 << (8 * tailSlots)) - 1;
103
- if (tailValue < 0 || tailValue > maxTail) return host;
104
-
105
- const tailOctets = new Array(tailSlots).fill(0);
106
- for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
107
- tailOctets[i] = v & 0xff;
108
- }
109
-
110
- const literal = literalOctets.map(parseIPv4Octet);
111
- if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
112
-
113
- return [...literal, ...tailOctets].join('.');
114
- };
115
-
116
- const isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
117
-
118
- // The unspecified address (IPv4 0.0.0.0 / IPv6 ::) resolves to the local host
119
- // for outbound connections, so treat it as loopback-equivalent for NO_PROXY
120
- // matching. 0.0.0.0 is covered by LOOPBACK_HOSTNAMES; this handles compressed
121
- // and full IPv6 all-zero forms so both families bypass symmetrically.
122
- const isIPv6Unspecified = (host) => {
123
- if (host === '::') return true;
124
-
125
- const compressionIndex = host.indexOf('::');
126
-
127
- if (compressionIndex !== -1) {
128
- if (compressionIndex !== host.lastIndexOf('::')) return false;
129
-
130
- const left = host.slice(0, compressionIndex);
131
- const right = host.slice(compressionIndex + 2);
132
- const leftGroups = left ? left.split(':') : [];
133
- const rightGroups = right ? right.split(':') : [];
134
- const explicitGroups = leftGroups.length + rightGroups.length;
135
-
136
- return (
137
- explicitGroups < 8 &&
138
- leftGroups.every(isIPv6ZeroGroup) &&
139
- rightGroups.every(isIPv6ZeroGroup)
140
- );
141
- }
142
-
143
- const groups = host.split(':');
144
- return groups.length === 8 && groups.every(isIPv6ZeroGroup);
145
- };
146
-
147
- const isIPv6Loopback = (host) => {
148
- // Collapse all-zero groups: any form of ::1 / 0:0:...:0:1
149
- // First, strip any leading "::" by normalising with Set lookup of common forms,
150
- // then fall back to structural check.
151
- if (host === '::1') return true;
152
-
153
- // Check IPv4-mapped IPv6 loopback: ::ffff:<v4-loopback> or ::ffff:<hex-v4-loopback>
154
- // Node's URL parser normalises ::ffff:127.0.0.1 → ::ffff:7f00:1
155
- const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
156
- if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
157
-
158
- const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
159
- if (v4MappedHex) {
160
- const high = parseInt(v4MappedHex[1], 16);
161
- // High 16 bits must start with 127 (0x7f) — i.e. 0x7f00..0x7fff
162
- return high >= 0x7f00 && high <= 0x7fff;
163
- }
164
-
165
- // Full-form ::1 variants: any number of zero groups followed by trailing 1
166
- // e.g. 0:0:0:0:0:0:0:1, 0000:...:0001
167
- const groups = host.split(':');
168
- if (groups.length === 8) {
169
- for (let i = 0; i < 7; i++) {
170
- if (!/^0+$/.test(groups[i])) return false;
171
- }
172
- return /^0*1$/.test(groups[7]);
173
- }
174
-
175
- return false;
176
- };
177
-
178
- const isLoopback = (host) => {
179
- if (!host) return false;
180
- if (LOOPBACK_HOSTNAMES.has(host)) return true;
181
- if (isIPv4Loopback(host)) return true;
182
- if (isIPv6Unspecified(host)) return true;
183
- return isIPv6Loopback(host);
184
- };
185
-
186
- const DEFAULT_PORTS = {
187
- http: 80,
188
- https: 443,
189
- ws: 80,
190
- wss: 443,
191
- ftp: 21,
192
- };
193
-
194
- const parseNoProxyEntry = (entry) => {
195
- let entryHost = entry;
196
- let entryPort = 0;
197
-
198
- if (entryHost.charAt(0) === '[') {
199
- const bracketIndex = entryHost.indexOf(']');
200
-
201
- if (bracketIndex !== -1) {
202
- const host = entryHost.slice(1, bracketIndex);
203
- const rest = entryHost.slice(bracketIndex + 1);
204
-
205
- if (rest.charAt(0) === ':' && /^\d+$/.test(rest.slice(1))) {
206
- entryPort = Number.parseInt(rest.slice(1), 10);
207
- }
208
-
209
- return [host, entryPort];
210
- }
211
- }
212
-
213
- const firstColon = entryHost.indexOf(':');
214
- const lastColon = entryHost.lastIndexOf(':');
215
-
216
- if (
217
- firstColon !== -1 &&
218
- firstColon === lastColon &&
219
- /^\d+$/.test(entryHost.slice(lastColon + 1))
220
- ) {
221
- entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
222
- entryHost = entryHost.slice(0, lastColon);
223
- }
224
-
225
- return [entryHost, entryPort];
226
- };
227
-
228
- // Convert IPv4-mapped IPv6 (::ffff:0:0/96 prefix) to IPv4 dotted form so both
229
- // sides of a NO_PROXY comparison see the same canonical address. Without this,
230
- // `NO_PROXY=192.168.1.5` would not match a request to `http://[::ffff:192.168.1.5]/`
231
- // (Node's URL parser normalises that to `[::ffff:c0a8:105]`), and vice-versa,
232
- // allowing the proxy-bypass policy to be circumvented by using the alternate
233
- // representation. Returns the input unchanged when not IPv4-mapped.
234
- const IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
235
- const IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
236
-
237
- const unmapIPv4MappedIPv6 = (host) => {
238
- if (typeof host !== 'string' || host.indexOf(':') === -1) return host;
239
-
240
- const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
241
- if (dotted) return dotted[1];
242
-
243
- const hex = host.match(IPV4_MAPPED_HEX_RE);
244
- if (hex) {
245
- const high = parseInt(hex[1], 16);
246
- const low = parseInt(hex[2], 16);
247
- return `${high >> 8}.${high & 0xff}.${low >> 8}.${low & 0xff}`;
248
- }
249
-
250
- return host;
251
- };
252
-
253
- const normalizeNoProxyHost = (hostname) => {
254
- if (!hostname) {
255
- return hostname;
256
- }
257
-
258
- if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') {
259
- hostname = hostname.slice(1, -1);
260
- }
261
-
262
- const trimmed = hostname.replace(/\.+$/, '');
263
-
264
- // IPv4 shorthand/octal/hex → dotted-decimal; helper is a no-op for inputs
265
- // containing ':' (IPv6 and IPv4-mapped IPv6) so we fall through to unmap.
266
- const ipv4 = normalizeIPAddress(trimmed);
267
- if (ipv4 !== trimmed) {
268
- return ipv4;
269
- }
270
-
271
- return unmapIPv4MappedIPv6(trimmed);
272
- };
273
-
274
- export default function shouldBypassProxy(location) {
275
- let parsed;
276
-
277
- try {
278
- parsed = new URL(location);
279
- } catch (_err) {
280
- return false;
281
- }
282
-
283
- const noProxy = (process.env.no_proxy || process.env.NO_PROXY || '').toLowerCase();
284
-
285
- if (!noProxy) {
286
- return false;
287
- }
288
-
289
- if (noProxy === '*') {
290
- return true;
291
- }
292
-
293
- const port =
294
- Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0;
295
-
296
- const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
297
-
298
- return noProxy.split(/[\s,]+/).some((entry) => {
299
- if (!entry) {
300
- return false;
301
- }
302
-
303
- if (entry === '*') {
304
- return true;
305
- }
306
-
307
- let [entryHost, entryPort] = parseNoProxyEntry(entry);
308
-
309
- entryHost = normalizeNoProxyHost(entryHost);
310
-
311
- if (!entryHost) {
312
- return false;
313
- }
314
-
315
- if (entryPort && entryPort !== port) {
316
- return false;
317
- }
318
-
319
- if (entryHost.charAt(0) === '*') {
320
- entryHost = entryHost.slice(1);
321
- }
322
-
323
- if (entryHost.charAt(0) === '.') {
324
- return hostname.endsWith(entryHost);
325
- }
326
-
327
- return hostname === entryHost || (isLoopback(hostname) && isLoopback(entryHost));
328
- });
329
- }
@@ -1,55 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Calculate data maxRate
5
- * @param {Number} [samplesCount= 10]
6
- * @param {Number} [min= 1000]
7
- * @returns {Function}
8
- */
9
- function speedometer(samplesCount, min) {
10
- samplesCount = samplesCount || 10;
11
- const bytes = new Array(samplesCount);
12
- const timestamps = new Array(samplesCount);
13
- let head = 0;
14
- let tail = 0;
15
- let firstSampleTS;
16
-
17
- min = min !== undefined ? min : 1000;
18
-
19
- return function push(chunkLength) {
20
- const now = Date.now();
21
-
22
- const startedAt = timestamps[tail];
23
-
24
- if (!firstSampleTS) {
25
- firstSampleTS = now;
26
- }
27
-
28
- bytes[head] = chunkLength;
29
- timestamps[head] = now;
30
-
31
- let i = tail;
32
- let bytesCount = 0;
33
-
34
- while (i !== head) {
35
- bytesCount += bytes[i++];
36
- i = i % samplesCount;
37
- }
38
-
39
- head = (head + 1) % samplesCount;
40
-
41
- if (head === tail) {
42
- tail = (tail + 1) % samplesCount;
43
- }
44
-
45
- if (now - firstSampleTS < min) {
46
- return;
47
- }
48
-
49
- const passed = startedAt && now - startedAt;
50
-
51
- return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
52
- };
53
- }
54
-
55
- export default speedometer;
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Syntactic sugar for invoking a function and expanding an array for arguments.
5
- *
6
- * Common use case would be to use `Function.prototype.apply`.
7
- *
8
- * ```js
9
- * function f(x, y, z) {}
10
- * const args = [1, 2, 3];
11
- * f.apply(null, args);
12
- * ```
13
- *
14
- * With `spread` this example can be re-written.
15
- *
16
- * ```js
17
- * spread(function(x, y, z) {})([1, 2, 3]);
18
- * ```
19
- *
20
- * @param {Function} callback
21
- *
22
- * @returns {Function}
23
- */
24
- export default function spread(callback) {
25
- return function wrap(arr) {
26
- return callback.apply(null, arr);
27
- };
28
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Throttle decorator
3
- * @param {Function} fn
4
- * @param {Number} freq
5
- * @return {Function}
6
- */
7
- function throttle(fn, freq) {
8
- let timestamp = 0;
9
- let threshold = 1000 / freq;
10
- let lastArgs;
11
- let timer;
12
-
13
- const invoke = (args, now = Date.now()) => {
14
- timestamp = now;
15
- lastArgs = null;
16
- if (timer) {
17
- clearTimeout(timer);
18
- timer = null;
19
- }
20
- fn(...args);
21
- };
22
-
23
- const throttled = (...args) => {
24
- const now = Date.now();
25
- const passed = now - timestamp;
26
- if (passed >= threshold) {
27
- invoke(args, now);
28
- } else {
29
- lastArgs = args;
30
- if (!timer) {
31
- timer = setTimeout(() => {
32
- timer = null;
33
- invoke(lastArgs);
34
- }, threshold - passed);
35
- }
36
- }
37
- };
38
-
39
- const flush = () => lastArgs && invoke(lastArgs);
40
-
41
- return [throttled, flush];
42
- }
43
-
44
- export default throttle;