node-red-contrib-tak-registration 0.3.2 → 0.6.0

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 (411) hide show
  1. package/node_modules/@turf/along/package.json +41 -69
  2. package/node_modules/@turf/angle/package.json +44 -75
  3. package/node_modules/@turf/area/package.json +38 -68
  4. package/node_modules/@turf/bbox/package.json +37 -81
  5. package/node_modules/@turf/bbox-clip/package.json +44 -81
  6. package/node_modules/@turf/bbox-polygon/package.json +36 -66
  7. package/node_modules/@turf/bearing/package.json +36 -70
  8. package/node_modules/@turf/bezier-spline/package.json +39 -67
  9. package/node_modules/@turf/boolean-clockwise/package.json +42 -83
  10. package/node_modules/@turf/boolean-contains/package.json +46 -80
  11. package/node_modules/@turf/boolean-crosses/package.json +45 -79
  12. package/node_modules/@turf/boolean-disjoint/package.json +44 -79
  13. package/node_modules/@turf/boolean-equal/package.json +47 -84
  14. package/node_modules/@turf/boolean-intersects/package.json +42 -77
  15. package/node_modules/@turf/boolean-overlap/package.json +48 -82
  16. package/node_modules/@turf/boolean-parallel/package.json +42 -73
  17. package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
  18. package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
  19. package/node_modules/@turf/boolean-within/package.json +46 -79
  20. package/node_modules/@turf/buffer/package.json +47 -84
  21. package/node_modules/@turf/center/package.json +42 -73
  22. package/node_modules/@turf/center-mean/package.json +45 -78
  23. package/node_modules/@turf/center-median/package.json +45 -76
  24. package/node_modules/@turf/center-of-mass/package.json +40 -68
  25. package/node_modules/@turf/centroid/package.json +40 -74
  26. package/node_modules/@turf/circle/package.json +41 -71
  27. package/node_modules/@turf/clean-coords/package.json +40 -75
  28. package/node_modules/@turf/clone/package.json +36 -81
  29. package/node_modules/@turf/clusters/package.json +39 -70
  30. package/node_modules/@turf/clusters-dbscan/package.json +51 -88
  31. package/node_modules/@turf/clusters-kmeans/package.json +53 -90
  32. package/node_modules/@turf/collect/package.json +42 -73
  33. package/node_modules/@turf/combine/package.json +37 -65
  34. package/node_modules/@turf/concave/package.json +56 -111
  35. package/node_modules/@turf/convex/package.json +39 -68
  36. package/node_modules/@turf/destination/package.json +41 -75
  37. package/node_modules/@turf/difference/package.json +35 -63
  38. package/node_modules/@turf/dissolve/package.json +38 -66
  39. package/node_modules/@turf/distance/package.json +38 -83
  40. package/node_modules/@turf/distance-weight/package.json +40 -72
  41. package/node_modules/@turf/ellipse/package.json +43 -75
  42. package/node_modules/@turf/envelope/package.json +36 -65
  43. package/node_modules/@turf/explode/package.json +36 -67
  44. package/node_modules/@turf/flatten/package.json +39 -73
  45. package/node_modules/@turf/flip/package.json +36 -64
  46. package/node_modules/@turf/great-circle/package.json +41 -78
  47. package/node_modules/@turf/helpers/package.json +38 -184
  48. package/node_modules/@turf/hex-grid/package.json +50 -97
  49. package/node_modules/@turf/interpolate/package.json +47 -78
  50. package/node_modules/@turf/intersect/package.json +39 -69
  51. package/node_modules/@turf/invariant/package.json +36 -126
  52. package/node_modules/@turf/isobands/package.json +52 -83
  53. package/node_modules/@turf/isolines/package.json +48 -79
  54. package/node_modules/@turf/kinks/package.json +35 -63
  55. package/node_modules/@turf/length/package.json +43 -78
  56. package/node_modules/@turf/line-arc/package.json +36 -65
  57. package/node_modules/@turf/line-chunk/package.json +44 -84
  58. package/node_modules/@turf/line-intersect/package.json +46 -85
  59. package/node_modules/@turf/line-offset/package.json +41 -78
  60. package/node_modules/@turf/line-overlap/package.json +48 -80
  61. package/node_modules/@turf/line-segment/package.json +38 -70
  62. package/node_modules/@turf/line-slice/package.json +39 -67
  63. package/node_modules/@turf/line-slice-along/package.json +36 -65
  64. package/node_modules/@turf/line-split/package.json +46 -77
  65. package/node_modules/@turf/line-to-polygon/package.json +43 -74
  66. package/node_modules/@turf/mask/package.json +35 -63
  67. package/node_modules/@turf/meta/package.json +39 -128
  68. package/node_modules/@turf/midpoint/package.json +36 -64
  69. package/node_modules/@turf/moran-index/package.json +39 -70
  70. package/node_modules/@turf/nearest-point/package.json +39 -69
  71. package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
  72. package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
  73. package/node_modules/@turf/planepoint/package.json +34 -62
  74. package/node_modules/@turf/point-grid/package.json +45 -80
  75. package/node_modules/@turf/point-on-feature/package.json +40 -68
  76. package/node_modules/@turf/point-to-line-distance/package.json +46 -78
  77. package/node_modules/@turf/points-within-polygon/package.json +35 -64
  78. package/node_modules/@turf/polygon-smooth/package.json +37 -68
  79. package/node_modules/@turf/polygon-tangents/package.json +43 -77
  80. package/node_modules/@turf/polygon-to-line/package.json +39 -69
  81. package/node_modules/@turf/polygonize/package.json +43 -77
  82. package/node_modules/@turf/projection/package.json +44 -77
  83. package/node_modules/@turf/random/package.json +34 -62
  84. package/node_modules/@turf/rectangle-grid/package.json +43 -77
  85. package/node_modules/@turf/rewind/package.json +43 -83
  86. package/node_modules/@turf/rhumb-bearing/package.json +43 -85
  87. package/node_modules/@turf/rhumb-destination/package.json +44 -85
  88. package/node_modules/@turf/rhumb-distance/package.json +44 -84
  89. package/node_modules/@turf/sample/package.json +32 -60
  90. package/node_modules/@turf/sector/package.json +37 -65
  91. package/node_modules/@turf/shortest-path/package.json +45 -79
  92. package/node_modules/@turf/simplify/package.json +43 -77
  93. package/node_modules/@turf/square/package.json +33 -62
  94. package/node_modules/@turf/square-grid/package.json +40 -69
  95. package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
  96. package/node_modules/@turf/tag/package.json +38 -66
  97. package/node_modules/@turf/tesselate/package.json +40 -80
  98. package/node_modules/@turf/tin/package.json +34 -63
  99. package/node_modules/@turf/transform-rotate/package.json +45 -80
  100. package/node_modules/@turf/transform-scale/package.json +51 -86
  101. package/node_modules/@turf/transform-translate/package.json +44 -78
  102. package/node_modules/@turf/triangle-grid/package.json +42 -71
  103. package/node_modules/@turf/truncate/package.json +40 -72
  104. package/node_modules/@turf/turf/package.json +74 -102
  105. package/node_modules/@turf/union/package.json +39 -67
  106. package/node_modules/@turf/unkink-polygon/package.json +40 -68
  107. package/node_modules/@turf/voronoi/package.json +43 -83
  108. package/node_modules/@types/geojson/package.json +42 -66
  109. package/node_modules/adm-zip/LICENSE +21 -21
  110. package/node_modules/adm-zip/adm-zip.js +25 -22
  111. package/node_modules/adm-zip/headers/mainHeader.js +2 -1
  112. package/node_modules/adm-zip/package.json +28 -57
  113. package/node_modules/adm-zip/util/utils.js +1 -0
  114. package/node_modules/asynckit/package.json +40 -68
  115. package/node_modules/axios/CHANGELOG.md +473 -837
  116. package/node_modules/axios/LICENSE +4 -16
  117. package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  118. package/node_modules/axios/README.md +518 -114
  119. package/node_modules/axios/SECURITY.md +4 -3
  120. package/node_modules/axios/dist/axios.js +2759 -2070
  121. package/node_modules/axios/dist/axios.js.map +1 -0
  122. package/node_modules/axios/dist/axios.min.js +2 -2
  123. package/node_modules/axios/dist/axios.min.js.map +1 -0
  124. package/node_modules/axios/dist/browser/axios.cjs +3210 -0
  125. package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  126. package/node_modules/axios/dist/esm/axios.js +3232 -0
  127. package/node_modules/axios/dist/esm/axios.js.map +1 -0
  128. package/node_modules/axios/dist/esm/axios.min.js +2 -0
  129. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  130. package/node_modules/axios/dist/node/axios.cjs +4237 -0
  131. package/node_modules/axios/dist/node/axios.cjs.map +1 -0
  132. package/node_modules/axios/index.d.cts +532 -0
  133. package/node_modules/axios/index.d.ts +398 -72
  134. package/node_modules/axios/index.js +41 -1
  135. package/node_modules/axios/lib/adapters/adapters.js +59 -0
  136. package/node_modules/axios/lib/adapters/http.js +479 -217
  137. package/node_modules/axios/lib/adapters/xhr.js +95 -54
  138. package/node_modules/axios/lib/axios.js +49 -20
  139. package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
  140. package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  141. package/node_modules/axios/lib/cancel/isCancel.js +2 -2
  142. package/node_modules/axios/lib/core/Axios.js +155 -100
  143. package/node_modules/axios/lib/core/AxiosError.js +100 -0
  144. package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
  145. package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
  146. package/node_modules/axios/lib/core/buildFullPath.js +5 -4
  147. package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
  148. package/node_modules/axios/lib/core/mergeConfig.js +58 -52
  149. package/node_modules/axios/lib/core/settle.js +8 -6
  150. package/node_modules/axios/lib/core/transformData.js +15 -9
  151. package/node_modules/axios/lib/defaults/index.js +76 -41
  152. package/node_modules/axios/lib/defaults/transitional.js +1 -1
  153. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  154. package/node_modules/axios/lib/env/data.js +1 -3
  155. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
  156. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  157. package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  158. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  159. package/node_modules/axios/lib/helpers/bind.js +3 -7
  160. package/node_modules/axios/lib/helpers/buildURL.js +26 -33
  161. package/node_modules/axios/lib/helpers/callbackify.js +16 -0
  162. package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
  163. package/node_modules/axios/lib/helpers/cookies.js +43 -44
  164. package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
  165. package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
  166. package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  167. package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  168. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
  169. package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
  170. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
  171. package/node_modules/axios/lib/helpers/null.js +2 -0
  172. package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
  173. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  174. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  175. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  176. package/node_modules/axios/lib/helpers/spread.js +3 -2
  177. package/node_modules/axios/lib/helpers/throttle.js +33 -0
  178. package/node_modules/axios/lib/helpers/toFormData.js +203 -39
  179. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  180. package/node_modules/axios/lib/helpers/validator.js +27 -18
  181. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  182. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  183. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  184. package/node_modules/axios/lib/platform/browser/index.js +64 -0
  185. package/node_modules/axios/lib/platform/index.js +3 -0
  186. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  187. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  188. package/node_modules/axios/lib/platform/node/index.js +12 -0
  189. package/node_modules/axios/lib/utils.js +517 -144
  190. package/node_modules/axios/package.json +194 -93
  191. package/node_modules/call-bind/package.json +78 -109
  192. package/node_modules/combined-stream/package.json +14 -46
  193. package/node_modules/commander/package.json +20 -53
  194. package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
  195. package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
  196. package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
  197. package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
  198. package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
  199. package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
  200. package/node_modules/concaveman/package.json +15 -46
  201. package/node_modules/d3-array/package.json +19 -47
  202. package/node_modules/d3-geo/package.json +24 -52
  203. package/node_modules/d3-voronoi/package.json +19 -47
  204. package/node_modules/deep-equal/package.json +34 -64
  205. package/node_modules/define-properties/.eslintrc +10 -3
  206. package/node_modules/define-properties/.github/FUNDING.yml +12 -0
  207. package/node_modules/define-properties/.nycrc +9 -0
  208. package/node_modules/define-properties/CHANGELOG.md +39 -0
  209. package/node_modules/define-properties/README.md +11 -13
  210. package/node_modules/define-properties/index.js +12 -17
  211. package/node_modules/define-properties/package.json +85 -95
  212. package/node_modules/delayed-stream/package.json +14 -49
  213. package/node_modules/density-clustering/package.json +46 -70
  214. package/node_modules/earcut/README.md +12 -3
  215. package/node_modules/earcut/dist/earcut.dev.js +47 -50
  216. package/node_modules/earcut/dist/earcut.min.js +1 -1
  217. package/node_modules/earcut/package.json +26 -60
  218. package/node_modules/earcut/src/earcut.js +46 -49
  219. package/node_modules/follow-redirects/README.md +8 -1
  220. package/node_modules/follow-redirects/index.js +83 -36
  221. package/node_modules/follow-redirects/package.json +38 -74
  222. package/node_modules/form-data/package.json +37 -70
  223. package/node_modules/function-bind/package.json +23 -56
  224. package/node_modules/functions-have-names/.editorconfig +20 -0
  225. package/node_modules/functions-have-names/.eslintrc +19 -0
  226. package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
  227. package/node_modules/functions-have-names/.nycrc +9 -0
  228. package/node_modules/functions-have-names/CHANGELOG.md +89 -0
  229. package/node_modules/functions-have-names/LICENSE +21 -0
  230. package/node_modules/functions-have-names/README.md +40 -0
  231. package/node_modules/functions-have-names/index.js +31 -0
  232. package/node_modules/functions-have-names/package.json +55 -0
  233. package/node_modules/functions-have-names/test/index.js +65 -0
  234. package/node_modules/geojson-equality/package.json +23 -55
  235. package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
  236. package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
  237. package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
  238. package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
  239. package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
  240. package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
  241. package/node_modules/geojson-rbush/package.json +32 -71
  242. package/node_modules/get-intrinsic/.eslintrc +3 -8
  243. package/node_modules/get-intrinsic/.nycrc +0 -4
  244. package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
  245. package/node_modules/get-intrinsic/README.md +7 -1
  246. package/node_modules/get-intrinsic/index.js +29 -8
  247. package/node_modules/get-intrinsic/package.json +91 -104
  248. package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
  249. package/node_modules/has/package.json +21 -46
  250. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  251. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  252. package/node_modules/has-property-descriptors/.nycrc +9 -0
  253. package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
  254. package/node_modules/has-property-descriptors/LICENSE +21 -0
  255. package/node_modules/has-property-descriptors/README.md +43 -0
  256. package/node_modules/has-property-descriptors/index.js +33 -0
  257. package/node_modules/has-property-descriptors/package.json +70 -0
  258. package/node_modules/has-property-descriptors/test/index.js +57 -0
  259. package/node_modules/has-proto/.eslintrc +5 -0
  260. package/node_modules/has-proto/.github/FUNDING.yml +12 -0
  261. package/node_modules/has-proto/CHANGELOG.md +23 -0
  262. package/node_modules/has-proto/LICENSE +21 -0
  263. package/node_modules/has-proto/README.md +38 -0
  264. package/node_modules/has-proto/index.js +11 -0
  265. package/node_modules/has-proto/package.json +74 -0
  266. package/node_modules/has-proto/test/index.js +19 -0
  267. package/node_modules/has-symbols/package.json +99 -125
  268. package/node_modules/has-tostringtag/package.json +82 -109
  269. package/node_modules/is-arguments/package.json +89 -114
  270. package/node_modules/is-date-object/package.json +77 -108
  271. package/node_modules/is-regex/package.json +84 -112
  272. package/node_modules/mime-db/HISTORY.md +8 -0
  273. package/node_modules/mime-db/LICENSE +19 -18
  274. package/node_modules/mime-db/README.md +1 -1
  275. package/node_modules/mime-db/db.json +54 -6
  276. package/node_modules/mime-db/index.js +1 -0
  277. package/node_modules/mime-db/package.json +24 -66
  278. package/node_modules/mime-types/HISTORY.md +9 -0
  279. package/node_modules/mime-types/README.md +1 -1
  280. package/node_modules/mime-types/package.json +19 -62
  281. package/node_modules/object-assign/package.json +15 -49
  282. package/node_modules/object-is/package.json +85 -112
  283. package/node_modules/object-keys/package.json +86 -116
  284. package/node_modules/point-in-polygon/package.json +19 -48
  285. package/node_modules/polygon-clipping/package.json +41 -80
  286. package/node_modules/proxy-from-env/.eslintrc +29 -0
  287. package/node_modules/proxy-from-env/.travis.yml +10 -0
  288. package/node_modules/proxy-from-env/LICENSE +20 -0
  289. package/node_modules/proxy-from-env/README.md +131 -0
  290. package/node_modules/proxy-from-env/index.js +108 -0
  291. package/node_modules/proxy-from-env/package.json +34 -0
  292. package/node_modules/proxy-from-env/test.js +483 -0
  293. package/node_modules/quickselect/package.json +13 -41
  294. package/node_modules/rbush/README.md +95 -22
  295. package/node_modules/rbush/index.js +181 -131
  296. package/node_modules/rbush/package.json +39 -71
  297. package/node_modules/rbush/rbush.js +412 -360
  298. package/node_modules/rbush/rbush.min.js +1 -1
  299. package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
  300. package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
  301. package/node_modules/regexp.prototype.flags/implementation.js +9 -0
  302. package/node_modules/regexp.prototype.flags/package.json +98 -122
  303. package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
  304. package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
  305. package/node_modules/robust-predicates/package.json +25 -52
  306. package/node_modules/skmeans/package.json +18 -53
  307. package/node_modules/splaytree/Readme.md +58 -57
  308. package/node_modules/splaytree/dist/splay.esm.js +21 -8
  309. package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
  310. package/node_modules/splaytree/dist/splay.js +21 -8
  311. package/node_modules/splaytree/dist/splay.js.map +1 -1
  312. package/node_modules/splaytree/package.json +36 -68
  313. package/node_modules/splaytree/src/index.ts +16 -4
  314. package/node_modules/tinyqueue/package.json +34 -59
  315. package/node_modules/topojson-client/package.json +28 -56
  316. package/node_modules/topojson-server/package.json +27 -55
  317. package/node_modules/turf-jsts/package.json +33 -68
  318. package/node_modules/uuid/CHANGELOG.md +39 -0
  319. package/node_modules/uuid/README.md +30 -73
  320. package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  321. package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  322. package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  323. package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  324. package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  325. package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  326. package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  327. package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  328. package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  329. package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  330. package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  331. package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  332. package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  333. package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  334. package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  335. package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  336. package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
  337. package/node_modules/uuid/dist/esm-browser/native.js +4 -0
  338. package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
  339. package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
  340. package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
  341. package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
  342. package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
  343. package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
  344. package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
  345. package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
  346. package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
  347. package/node_modules/uuid/dist/esm-browser/version.js +1 -1
  348. package/node_modules/uuid/dist/esm-node/native.js +4 -0
  349. package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
  350. package/node_modules/uuid/dist/esm-node/v1.js +2 -2
  351. package/node_modules/uuid/dist/esm-node/v35.js +6 -4
  352. package/node_modules/uuid/dist/esm-node/v4.js +7 -2
  353. package/node_modules/uuid/dist/esm-node/version.js +1 -1
  354. package/node_modules/uuid/dist/index.js +18 -18
  355. package/node_modules/uuid/dist/native-browser.js +11 -0
  356. package/node_modules/uuid/dist/native.js +15 -0
  357. package/node_modules/uuid/dist/rng-browser.js +2 -3
  358. package/node_modules/uuid/dist/stringify.js +8 -3
  359. package/node_modules/uuid/dist/v1.js +2 -2
  360. package/node_modules/uuid/dist/v35.js +7 -5
  361. package/node_modules/uuid/dist/v4.js +8 -2
  362. package/node_modules/uuid/dist/version.js +1 -1
  363. package/node_modules/uuid/package.json +87 -120
  364. package/package.json +12 -8
  365. package/tak-ingest.html +40 -0
  366. package/tak-ingest.js +48 -0
  367. package/tak-registration.html +10 -0
  368. package/tak-registration.js +55 -7
  369. package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
  370. package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
  371. package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
  372. package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
  373. package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
  374. package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
  375. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
  376. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
  377. package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
  378. package/node_modules/axios/dist/axios.map +0 -1
  379. package/node_modules/axios/dist/axios.min.map +0 -1
  380. package/node_modules/axios/lib/cancel/Cancel.js +0 -19
  381. package/node_modules/axios/lib/core/createError.js +0 -18
  382. package/node_modules/axios/lib/core/enhanceError.js +0 -43
  383. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  384. package/node_modules/axios/tsconfig.json +0 -14
  385. package/node_modules/axios/tslint.json +0 -6
  386. package/node_modules/combined-stream/yarn.lock +0 -17
  387. package/node_modules/d3-array/yarn.lock +0 -939
  388. package/node_modules/define-properties/.jscs.json +0 -175
  389. package/node_modules/define-properties/.travis.yml +0 -233
  390. package/node_modules/define-properties/test/index.js +0 -125
  391. package/node_modules/get-intrinsic/.eslintignore +0 -1
  392. package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  393. package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  394. package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  395. package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  396. package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  397. package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  398. package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  399. package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  400. package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  401. package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  402. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
  403. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
  404. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
  405. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
  406. /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
  407. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
  408. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
  409. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
  410. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
  411. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/LICENSE +0 -0
@@ -1,93 +1,299 @@
1
1
  'use strict';
2
2
 
3
- var utils = require('./../utils');
4
- var settle = require('./../core/settle');
5
- var buildFullPath = require('../core/buildFullPath');
6
- var buildURL = require('./../helpers/buildURL');
7
- var http = require('http');
8
- var https = require('https');
9
- var httpFollow = require('follow-redirects').http;
10
- var httpsFollow = require('follow-redirects').https;
11
- var url = require('url');
12
- var zlib = require('zlib');
13
- var VERSION = require('./../env/data').version;
14
- var createError = require('../core/createError');
15
- var enhanceError = require('../core/enhanceError');
16
- var transitionalDefaults = require('../defaults/transitional');
17
- var Cancel = require('../cancel/Cancel');
18
-
19
- var isHttps = /https:?/;
3
+ import utils from './../utils.js';
4
+ import settle from './../core/settle.js';
5
+ import buildFullPath from '../core/buildFullPath.js';
6
+ import buildURL from './../helpers/buildURL.js';
7
+ import {getProxyForUrl} from 'proxy-from-env';
8
+ import http from 'http';
9
+ import https from 'https';
10
+ import util from 'util';
11
+ import followRedirects from 'follow-redirects';
12
+ import zlib from 'zlib';
13
+ import {VERSION} from '../env/data.js';
14
+ import transitionalDefaults from '../defaults/transitional.js';
15
+ import AxiosError from '../core/AxiosError.js';
16
+ import CanceledError from '../cancel/CanceledError.js';
17
+ import platform from '../platform/index.js';
18
+ import fromDataURI from '../helpers/fromDataURI.js';
19
+ import stream from 'stream';
20
+ import AxiosHeaders from '../core/AxiosHeaders.js';
21
+ import AxiosTransformStream from '../helpers/AxiosTransformStream.js';
22
+ import EventEmitter from 'events';
23
+ import formDataToStream from "../helpers/formDataToStream.js";
24
+ import readBlob from "../helpers/readBlob.js";
25
+ import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';
26
+ import callbackify from "../helpers/callbackify.js";
27
+
28
+ const zlibOptions = {
29
+ flush: zlib.constants.Z_SYNC_FLUSH,
30
+ finishFlush: zlib.constants.Z_SYNC_FLUSH
31
+ };
32
+
33
+ const brotliOptions = {
34
+ flush: zlib.constants.BROTLI_OPERATION_FLUSH,
35
+ finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
36
+ }
37
+
38
+ const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
39
+
40
+ const {http: httpFollow, https: httpsFollow} = followRedirects;
41
+
42
+ const isHttps = /https:?/;
43
+
44
+ const supportedProtocols = platform.protocols.map(protocol => {
45
+ return protocol + ':';
46
+ });
20
47
 
21
48
  /**
49
+ * If the proxy or config beforeRedirects functions are defined, call them with the options
50
+ * object.
51
+ *
52
+ * @param {Object<string, any>} options - The options object that was passed to the request.
53
+ *
54
+ * @returns {Object<string, any>}
55
+ */
56
+ function dispatchBeforeRedirect(options) {
57
+ if (options.beforeRedirects.proxy) {
58
+ options.beforeRedirects.proxy(options);
59
+ }
60
+ if (options.beforeRedirects.config) {
61
+ options.beforeRedirects.config(options);
62
+ }
63
+ }
64
+
65
+ /**
66
+ * If the proxy or config afterRedirects functions are defined, call them with the options
22
67
  *
23
68
  * @param {http.ClientRequestArgs} options
24
- * @param {AxiosProxyConfig} proxy
69
+ * @param {AxiosProxyConfig} configProxy configuration from Axios options object
25
70
  * @param {string} location
71
+ *
72
+ * @returns {http.ClientRequestArgs}
26
73
  */
27
- function setProxy(options, proxy, location) {
28
- options.hostname = proxy.host;
29
- options.host = proxy.host;
30
- options.port = proxy.port;
31
- options.path = location;
32
-
33
- // Basic proxy authorization
34
- if (proxy.auth) {
35
- var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
36
- options.headers['Proxy-Authorization'] = 'Basic ' + base64;
74
+ function setProxy(options, configProxy, location) {
75
+ let proxy = configProxy;
76
+ if (!proxy && proxy !== false) {
77
+ const proxyUrl = getProxyForUrl(location);
78
+ if (proxyUrl) {
79
+ proxy = new URL(proxyUrl);
80
+ }
37
81
  }
82
+ if (proxy) {
83
+ // Basic proxy authorization
84
+ if (proxy.username) {
85
+ proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');
86
+ }
38
87
 
39
- // If a proxy is used, any redirects must also pass through the proxy
40
- options.beforeRedirect = function beforeRedirect(redirection) {
41
- redirection.headers.host = redirection.host;
42
- setProxy(redirection, proxy, redirection.href);
88
+ if (proxy.auth) {
89
+ // Support proxy auth object form
90
+ if (proxy.auth.username || proxy.auth.password) {
91
+ proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');
92
+ }
93
+ const base64 = Buffer
94
+ .from(proxy.auth, 'utf8')
95
+ .toString('base64');
96
+ options.headers['Proxy-Authorization'] = 'Basic ' + base64;
97
+ }
98
+
99
+ options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
100
+ const proxyHost = proxy.hostname || proxy.host;
101
+ options.hostname = proxyHost;
102
+ // Replace 'host' since options is not a URL object
103
+ options.host = proxyHost;
104
+ options.port = proxy.port;
105
+ options.path = location;
106
+ if (proxy.protocol) {
107
+ options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;
108
+ }
109
+ }
110
+
111
+ options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
112
+ // Configure proxy for redirected request, passing the original config proxy to apply
113
+ // the exact same logic as if the redirected request was performed by axios directly.
114
+ setProxy(redirectOptions, configProxy, redirectOptions.href);
43
115
  };
44
116
  }
45
117
 
118
+ const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';
119
+
120
+ // temporary hotfix
121
+
122
+ const wrapAsync = (asyncExecutor) => {
123
+ return new Promise((resolve, reject) => {
124
+ let onDone;
125
+ let isDone;
126
+
127
+ const done = (value, isRejected) => {
128
+ if (isDone) return;
129
+ isDone = true;
130
+ onDone && onDone(value, isRejected);
131
+ }
132
+
133
+ const _resolve = (value) => {
134
+ done(value);
135
+ resolve(value);
136
+ };
137
+
138
+ const _reject = (reason) => {
139
+ done(reason, true);
140
+ reject(reason);
141
+ }
142
+
143
+ asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);
144
+ })
145
+ };
146
+
46
147
  /*eslint consistent-return:0*/
47
- module.exports = function httpAdapter(config) {
48
- return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
49
- var onCanceled;
50
- function done() {
148
+ export default isHttpAdapterSupported && function httpAdapter(config) {
149
+ return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
150
+ let {data, lookup, family} = config;
151
+ const {responseType, responseEncoding} = config;
152
+ const method = config.method.toUpperCase();
153
+ let isDone;
154
+ let rejected = false;
155
+ let req;
156
+
157
+ if (lookup && utils.isAsyncFn(lookup)) {
158
+ lookup = callbackify(lookup, (entry) => {
159
+ if(utils.isString(entry)) {
160
+ entry = [entry, entry.indexOf('.') < 0 ? 6 : 4]
161
+ } else if (!utils.isArray(entry)) {
162
+ throw new TypeError('lookup async function must return an array [ip: string, family: number]]')
163
+ }
164
+ return entry;
165
+ })
166
+ }
167
+
168
+ // temporary internal emitter until the AxiosRequest class will be implemented
169
+ const emitter = new EventEmitter();
170
+
171
+ const onFinished = () => {
51
172
  if (config.cancelToken) {
52
- config.cancelToken.unsubscribe(onCanceled);
173
+ config.cancelToken.unsubscribe(abort);
53
174
  }
54
175
 
55
176
  if (config.signal) {
56
- config.signal.removeEventListener('abort', onCanceled);
177
+ config.signal.removeEventListener('abort', abort);
57
178
  }
179
+
180
+ emitter.removeAllListeners();
58
181
  }
59
- var resolve = function resolve(value) {
60
- done();
61
- resolvePromise(value);
62
- };
63
- var rejected = false;
64
- var reject = function reject(value) {
65
- done();
66
- rejected = true;
67
- rejectPromise(value);
68
- };
69
- var data = config.data;
70
- var headers = config.headers;
71
- var headerNames = {};
72
182
 
73
- Object.keys(headers).forEach(function storeLowerName(name) {
74
- headerNames[name.toLowerCase()] = name;
183
+ onDone((value, isRejected) => {
184
+ isDone = true;
185
+ if (isRejected) {
186
+ rejected = true;
187
+ onFinished();
188
+ }
75
189
  });
76
190
 
77
- // Set User-Agent (required by some servers)
78
- // See https://github.com/axios/axios/issues/69
79
- if ('user-agent' in headerNames) {
80
- // User-Agent is specified; handle case where no UA header is desired
81
- if (!headers[headerNames['user-agent']]) {
82
- delete headers[headerNames['user-agent']];
191
+ function abort(reason) {
192
+ emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
193
+ }
194
+
195
+ emitter.once('abort', reject);
196
+
197
+ if (config.cancelToken || config.signal) {
198
+ config.cancelToken && config.cancelToken.subscribe(abort);
199
+ if (config.signal) {
200
+ config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
83
201
  }
84
- // Otherwise, use specified value
85
- } else {
86
- // Only set header if it hasn't been set in config
87
- headers['User-Agent'] = 'axios/' + VERSION;
88
202
  }
89
203
 
90
- if (data && !utils.isStream(data)) {
204
+ // Parse url
205
+ const fullPath = buildFullPath(config.baseURL, config.url);
206
+ const parsed = new URL(fullPath, 'http://localhost');
207
+ const protocol = parsed.protocol || supportedProtocols[0];
208
+
209
+ if (protocol === 'data:') {
210
+ let convertedData;
211
+
212
+ if (method !== 'GET') {
213
+ return settle(resolve, reject, {
214
+ status: 405,
215
+ statusText: 'method not allowed',
216
+ headers: {},
217
+ config
218
+ });
219
+ }
220
+
221
+ try {
222
+ convertedData = fromDataURI(config.url, responseType === 'blob', {
223
+ Blob: config.env && config.env.Blob
224
+ });
225
+ } catch (err) {
226
+ throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
227
+ }
228
+
229
+ if (responseType === 'text') {
230
+ convertedData = convertedData.toString(responseEncoding);
231
+
232
+ if (!responseEncoding || responseEncoding === 'utf8') {
233
+ convertedData = utils.stripBOM(convertedData);
234
+ }
235
+ } else if (responseType === 'stream') {
236
+ convertedData = stream.Readable.from(convertedData);
237
+ }
238
+
239
+ return settle(resolve, reject, {
240
+ data: convertedData,
241
+ status: 200,
242
+ statusText: 'OK',
243
+ headers: new AxiosHeaders(),
244
+ config
245
+ });
246
+ }
247
+
248
+ if (supportedProtocols.indexOf(protocol) === -1) {
249
+ return reject(new AxiosError(
250
+ 'Unsupported protocol ' + protocol,
251
+ AxiosError.ERR_BAD_REQUEST,
252
+ config
253
+ ));
254
+ }
255
+
256
+ const headers = AxiosHeaders.from(config.headers).normalize();
257
+
258
+ // Set User-Agent (required by some servers)
259
+ // See https://github.com/axios/axios/issues/69
260
+ // User-Agent is specified; handle case where no UA header is desired
261
+ // Only set header if it hasn't been set in config
262
+ headers.set('User-Agent', 'axios/' + VERSION, false);
263
+
264
+ const onDownloadProgress = config.onDownloadProgress;
265
+ const onUploadProgress = config.onUploadProgress;
266
+ const maxRate = config.maxRate;
267
+ let maxUploadRate = undefined;
268
+ let maxDownloadRate = undefined;
269
+
270
+ // support for spec compliant FormData objects
271
+ if (utils.isSpecCompliantForm(data)) {
272
+ const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
273
+
274
+ data = formDataToStream(data, (formHeaders) => {
275
+ headers.set(formHeaders);
276
+ }, {
277
+ tag: `axios-${VERSION}-boundary`,
278
+ boundary: userBoundary && userBoundary[1] || undefined
279
+ });
280
+ // support for https://www.npmjs.com/package/form-data api
281
+ } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
282
+ headers.set(data.getHeaders());
283
+
284
+ if (!headers.hasContentLength()) {
285
+ try {
286
+ const knownLength = await util.promisify(data.getLength).call(data);
287
+ Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
288
+ /*eslint no-empty:0*/
289
+ } catch (e) {
290
+ }
291
+ }
292
+ } else if (utils.isBlob(data)) {
293
+ data.size && headers.setContentType(data.type || 'application/octet-stream');
294
+ headers.setContentLength(data.size || 0);
295
+ data = stream.Readable.from(readBlob(data));
296
+ } else if (data && !utils.isStream(data)) {
91
297
  if (Buffer.isBuffer(data)) {
92
298
  // Nothing to do...
93
299
  } else if (utils.isArrayBuffer(data)) {
@@ -95,66 +301,99 @@ module.exports = function httpAdapter(config) {
95
301
  } else if (utils.isString(data)) {
96
302
  data = Buffer.from(data, 'utf-8');
97
303
  } else {
98
- return reject(createError(
304
+ return reject(new AxiosError(
99
305
  'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
306
+ AxiosError.ERR_BAD_REQUEST,
100
307
  config
101
308
  ));
102
309
  }
103
310
 
311
+ // Add Content-Length header if data exists
312
+ headers.setContentLength(data.length, false);
313
+
104
314
  if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
105
- return reject(createError('Request body larger than maxBodyLength limit', config));
315
+ return reject(new AxiosError(
316
+ 'Request body larger than maxBodyLength limit',
317
+ AxiosError.ERR_BAD_REQUEST,
318
+ config
319
+ ));
106
320
  }
321
+ }
107
322
 
108
- // Add Content-Length header if data exists
109
- if (!headerNames['content-length']) {
110
- headers['Content-Length'] = data.length;
323
+ const contentLength = utils.toFiniteNumber(headers.getContentLength());
324
+
325
+ if (utils.isArray(maxRate)) {
326
+ maxUploadRate = maxRate[0];
327
+ maxDownloadRate = maxRate[1];
328
+ } else {
329
+ maxUploadRate = maxDownloadRate = maxRate;
330
+ }
331
+
332
+ if (data && (onUploadProgress || maxUploadRate)) {
333
+ if (!utils.isStream(data)) {
334
+ data = stream.Readable.from(data, {objectMode: false});
111
335
  }
336
+
337
+ data = stream.pipeline([data, new AxiosTransformStream({
338
+ length: contentLength,
339
+ maxRate: utils.toFiniteNumber(maxUploadRate)
340
+ })], utils.noop);
341
+
342
+ onUploadProgress && data.on('progress', progress => {
343
+ onUploadProgress(Object.assign(progress, {
344
+ upload: true
345
+ }));
346
+ });
112
347
  }
113
348
 
114
349
  // HTTP basic authentication
115
- var auth = undefined;
350
+ let auth = undefined;
116
351
  if (config.auth) {
117
- var username = config.auth.username || '';
118
- var password = config.auth.password || '';
352
+ const username = config.auth.username || '';
353
+ const password = config.auth.password || '';
119
354
  auth = username + ':' + password;
120
355
  }
121
356
 
122
- // Parse url
123
- var fullPath = buildFullPath(config.baseURL, config.url);
124
- var parsed = url.parse(fullPath);
125
- var protocol = parsed.protocol || 'http:';
126
-
127
- if (!auth && parsed.auth) {
128
- var urlAuth = parsed.auth.split(':');
129
- var urlUsername = urlAuth[0] || '';
130
- var urlPassword = urlAuth[1] || '';
357
+ if (!auth && parsed.username) {
358
+ const urlUsername = parsed.username;
359
+ const urlPassword = parsed.password;
131
360
  auth = urlUsername + ':' + urlPassword;
132
361
  }
133
362
 
134
- if (auth && headerNames.authorization) {
135
- delete headers[headerNames.authorization];
136
- }
363
+ auth && headers.delete('authorization');
137
364
 
138
- var isHttpsRequest = isHttps.test(protocol);
139
- var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
365
+ let path;
140
366
 
141
367
  try {
142
- buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, '');
368
+ path = buildURL(
369
+ parsed.pathname + parsed.search,
370
+ config.params,
371
+ config.paramsSerializer
372
+ ).replace(/^\?/, '');
143
373
  } catch (err) {
144
- var customErr = new Error(err.message);
374
+ const customErr = new Error(err.message);
145
375
  customErr.config = config;
146
376
  customErr.url = config.url;
147
377
  customErr.exists = true;
148
- reject(customErr);
378
+ return reject(customErr);
149
379
  }
150
380
 
151
- var options = {
152
- path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
153
- method: config.method.toUpperCase(),
154
- headers: headers,
155
- agent: agent,
381
+ headers.set(
382
+ 'Accept-Encoding',
383
+ 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false
384
+ );
385
+
386
+ const options = {
387
+ path,
388
+ method: method,
389
+ headers: headers.toJSON(),
156
390
  agents: { http: config.httpAgent, https: config.httpsAgent },
157
- auth: auth
391
+ auth,
392
+ protocol,
393
+ family,
394
+ lookup,
395
+ beforeRedirect: dispatchBeforeRedirect,
396
+ beforeRedirects: {}
158
397
  };
159
398
 
160
399
  if (config.socketPath) {
@@ -162,76 +401,31 @@ module.exports = function httpAdapter(config) {
162
401
  } else {
163
402
  options.hostname = parsed.hostname;
164
403
  options.port = parsed.port;
404
+ setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
165
405
  }
166
406
 
167
- var proxy = config.proxy;
168
- if (!proxy && proxy !== false) {
169
- var proxyEnv = protocol.slice(0, -1) + '_proxy';
170
- var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
171
- if (proxyUrl) {
172
- var parsedProxyUrl = url.parse(proxyUrl);
173
- var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
174
- var shouldProxy = true;
175
-
176
- if (noProxyEnv) {
177
- var noProxy = noProxyEnv.split(',').map(function trim(s) {
178
- return s.trim();
179
- });
180
-
181
- shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
182
- if (!proxyElement) {
183
- return false;
184
- }
185
- if (proxyElement === '*') {
186
- return true;
187
- }
188
- if (proxyElement[0] === '.' &&
189
- parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
190
- return true;
191
- }
192
-
193
- return parsed.hostname === proxyElement;
194
- });
195
- }
196
-
197
- if (shouldProxy) {
198
- proxy = {
199
- host: parsedProxyUrl.hostname,
200
- port: parsedProxyUrl.port,
201
- protocol: parsedProxyUrl.protocol
202
- };
203
-
204
- if (parsedProxyUrl.auth) {
205
- var proxyUrlAuth = parsedProxyUrl.auth.split(':');
206
- proxy.auth = {
207
- username: proxyUrlAuth[0],
208
- password: proxyUrlAuth[1]
209
- };
210
- }
211
- }
212
- }
213
- }
214
-
215
- if (proxy) {
216
- options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
217
- setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
218
- }
219
-
220
- var transport;
221
- var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
407
+ let transport;
408
+ const isHttpsRequest = isHttps.test(options.protocol);
409
+ options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
222
410
  if (config.transport) {
223
411
  transport = config.transport;
224
412
  } else if (config.maxRedirects === 0) {
225
- transport = isHttpsProxy ? https : http;
413
+ transport = isHttpsRequest ? https : http;
226
414
  } else {
227
415
  if (config.maxRedirects) {
228
416
  options.maxRedirects = config.maxRedirects;
229
417
  }
230
- transport = isHttpsProxy ? httpsFollow : httpFollow;
418
+ if (config.beforeRedirect) {
419
+ options.beforeRedirects.config = config.beforeRedirect;
420
+ }
421
+ transport = isHttpsRequest ? httpsFollow : httpFollow;
231
422
  }
232
423
 
233
424
  if (config.maxBodyLength > -1) {
234
425
  options.maxBodyLength = config.maxBodyLength;
426
+ } else {
427
+ // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited
428
+ options.maxBodyLength = Infinity;
235
429
  }
236
430
 
237
431
  if (config.insecureHTTPParser) {
@@ -239,95 +433,162 @@ module.exports = function httpAdapter(config) {
239
433
  }
240
434
 
241
435
  // Create the request
242
- var req = transport.request(options, function handleResponse(res) {
243
- if (req.aborted) return;
436
+ req = transport.request(options, function handleResponse(res) {
437
+ if (req.destroyed) return;
438
+
439
+ const streams = [res];
440
+
441
+ const responseLength = +res.headers['content-length'];
442
+
443
+ if (onDownloadProgress) {
444
+ const transformStream = new AxiosTransformStream({
445
+ length: utils.toFiniteNumber(responseLength),
446
+ maxRate: utils.toFiniteNumber(maxDownloadRate)
447
+ });
448
+
449
+ onDownloadProgress && transformStream.on('progress', progress => {
450
+ onDownloadProgress(Object.assign(progress, {
451
+ download: true
452
+ }));
453
+ });
244
454
 
245
- // uncompress the response body transparently if required
246
- var stream = res;
455
+ streams.push(transformStream);
456
+ }
457
+
458
+ // decompress the response body transparently if required
459
+ let responseStream = res;
247
460
 
248
461
  // return the last request in case of redirects
249
- var lastRequest = res.req || req;
462
+ const lastRequest = res.req || req;
250
463
 
464
+ // if decompress disabled we should not decompress
465
+ if (config.decompress !== false && res.headers['content-encoding']) {
466
+ // if no content, but headers still say that it is encoded,
467
+ // remove the header not confuse downstream operations
468
+ if (method === 'HEAD' || res.statusCode === 204) {
469
+ delete res.headers['content-encoding'];
470
+ }
251
471
 
252
- // if no content, is HEAD request or decompress disabled we should not decompress
253
- if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
254
472
  switch (res.headers['content-encoding']) {
255
473
  /*eslint default-case:0*/
256
474
  case 'gzip':
475
+ case 'x-gzip':
257
476
  case 'compress':
477
+ case 'x-compress':
478
+ // add the unzipper to the body stream processing pipeline
479
+ streams.push(zlib.createUnzip(zlibOptions));
480
+
481
+ // remove the content-encoding in order to not confuse downstream operations
482
+ delete res.headers['content-encoding'];
483
+ break;
258
484
  case 'deflate':
259
- // add the unzipper to the body stream processing pipeline
260
- stream = stream.pipe(zlib.createUnzip());
485
+ streams.push(new ZlibHeaderTransformStream());
486
+
487
+ // add the unzipper to the body stream processing pipeline
488
+ streams.push(zlib.createUnzip(zlibOptions));
261
489
 
262
490
  // remove the content-encoding in order to not confuse downstream operations
263
491
  delete res.headers['content-encoding'];
264
492
  break;
493
+ case 'br':
494
+ if (isBrotliSupported) {
495
+ streams.push(zlib.createBrotliDecompress(brotliOptions));
496
+ delete res.headers['content-encoding'];
497
+ }
265
498
  }
266
499
  }
267
500
 
268
- var response = {
501
+ responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];
502
+
503
+ const offListeners = stream.finished(responseStream, () => {
504
+ offListeners();
505
+ onFinished();
506
+ });
507
+
508
+ const response = {
269
509
  status: res.statusCode,
270
510
  statusText: res.statusMessage,
271
- headers: res.headers,
272
- config: config,
511
+ headers: new AxiosHeaders(res.headers),
512
+ config,
273
513
  request: lastRequest
274
514
  };
275
515
 
276
- if (config.responseType === 'stream') {
277
- response.data = stream;
516
+ if (responseType === 'stream') {
517
+ response.data = responseStream;
278
518
  settle(resolve, reject, response);
279
519
  } else {
280
- var responseBuffer = [];
281
- var totalResponseBytes = 0;
282
- stream.on('data', function handleStreamData(chunk) {
520
+ const responseBuffer = [];
521
+ let totalResponseBytes = 0;
522
+
523
+ responseStream.on('data', function handleStreamData(chunk) {
283
524
  responseBuffer.push(chunk);
284
525
  totalResponseBytes += chunk.length;
285
526
 
286
527
  // make sure the content length is not over the maxContentLength if specified
287
528
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
288
- // stream.destoy() emit aborted event before calling reject() on Node.js v16
529
+ // stream.destroy() emit aborted event before calling reject() on Node.js v16
289
530
  rejected = true;
290
- stream.destroy();
291
- reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
292
- config, null, lastRequest));
531
+ responseStream.destroy();
532
+ reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
533
+ AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
293
534
  }
294
535
  });
295
536
 
296
- stream.on('aborted', function handlerStreamAborted() {
537
+ responseStream.on('aborted', function handlerStreamAborted() {
297
538
  if (rejected) {
298
539
  return;
299
540
  }
300
- stream.destroy();
301
- reject(createError('error request aborted', config, 'ERR_REQUEST_ABORTED', lastRequest));
541
+
542
+ const err = new AxiosError(
543
+ 'maxContentLength size of ' + config.maxContentLength + ' exceeded',
544
+ AxiosError.ERR_BAD_RESPONSE,
545
+ config,
546
+ lastRequest
547
+ );
548
+ responseStream.destroy(err);
549
+ reject(err);
302
550
  });
303
551
 
304
- stream.on('error', function handleStreamError(err) {
305
- if (req.aborted) return;
306
- reject(enhanceError(err, config, null, lastRequest));
552
+ responseStream.on('error', function handleStreamError(err) {
553
+ if (req.destroyed) return;
554
+ reject(AxiosError.from(err, null, config, lastRequest));
307
555
  });
308
556
 
309
- stream.on('end', function handleStreamEnd() {
557
+ responseStream.on('end', function handleStreamEnd() {
310
558
  try {
311
- var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
312
- if (config.responseType !== 'arraybuffer') {
313
- responseData = responseData.toString(config.responseEncoding);
314
- if (!config.responseEncoding || config.responseEncoding === 'utf8') {
559
+ let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
560
+ if (responseType !== 'arraybuffer') {
561
+ responseData = responseData.toString(responseEncoding);
562
+ if (!responseEncoding || responseEncoding === 'utf8') {
315
563
  responseData = utils.stripBOM(responseData);
316
564
  }
317
565
  }
318
566
  response.data = responseData;
319
567
  } catch (err) {
320
- reject(enhanceError(err, config, err.code, response.request, response));
568
+ reject(AxiosError.from(err, null, config, response.request, response));
321
569
  }
322
570
  settle(resolve, reject, response);
323
571
  });
324
572
  }
573
+
574
+ emitter.once('abort', err => {
575
+ if (!responseStream.destroyed) {
576
+ responseStream.emit('error', err);
577
+ responseStream.destroy();
578
+ }
579
+ });
580
+ });
581
+
582
+ emitter.once('abort', err => {
583
+ reject(err);
584
+ req.destroy(err);
325
585
  });
326
586
 
327
587
  // Handle errors
328
588
  req.on('error', function handleRequestError(err) {
329
- if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
330
- reject(enhanceError(err, config, null, req));
589
+ // @todo remove
590
+ // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;
591
+ reject(AxiosError.from(err, null, config, req));
331
592
  });
332
593
 
333
594
  // set tcp keep alive to prevent drop connection by peer
@@ -339,13 +600,13 @@ module.exports = function httpAdapter(config) {
339
600
  // Handle request timeout
340
601
  if (config.timeout) {
341
602
  // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
342
- var timeout = parseInt(config.timeout, 10);
603
+ const timeout = parseInt(config.timeout, 10);
343
604
 
344
605
  if (isNaN(timeout)) {
345
- reject(createError(
606
+ reject(new AxiosError(
346
607
  'error trying to parse `config.timeout` to int',
608
+ AxiosError.ERR_BAD_OPTION_VALUE,
347
609
  config,
348
- 'ERR_PARSE_TIMEOUT',
349
610
  req
350
611
  ));
351
612
 
@@ -355,50 +616,51 @@ module.exports = function httpAdapter(config) {
355
616
  // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
356
617
  // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
357
618
  // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
358
- // And then these socket which be hang up will devoring CPU little by little.
619
+ // And then these socket which be hang up will devouring CPU little by little.
359
620
  // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
360
621
  req.setTimeout(timeout, function handleRequestTimeout() {
361
- req.abort();
362
- var timeoutErrorMessage = '';
622
+ if (isDone) return;
623
+ let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
624
+ const transitional = config.transitional || transitionalDefaults;
363
625
  if (config.timeoutErrorMessage) {
364
626
  timeoutErrorMessage = config.timeoutErrorMessage;
365
- } else {
366
- timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
367
627
  }
368
- var transitional = config.transitional || transitionalDefaults;
369
- reject(createError(
628
+ reject(new AxiosError(
370
629
  timeoutErrorMessage,
630
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
371
631
  config,
372
- transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
373
632
  req
374
633
  ));
634
+ abort();
375
635
  });
376
636
  }
377
637
 
378
- if (config.cancelToken || config.signal) {
379
- // Handle cancellation
380
- // eslint-disable-next-line func-names
381
- onCanceled = function(cancel) {
382
- if (req.aborted) return;
383
638
 
384
- req.abort();
385
- reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
386
- };
639
+ // Send the request
640
+ if (utils.isStream(data)) {
641
+ let ended = false;
642
+ let errored = false;
387
643
 
388
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
389
- if (config.signal) {
390
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
391
- }
392
- }
644
+ data.on('end', () => {
645
+ ended = true;
646
+ });
393
647
 
648
+ data.once('error', err => {
649
+ errored = true;
650
+ req.destroy(err);
651
+ });
394
652
 
395
- // Send the request
396
- if (utils.isStream(data)) {
397
- data.on('error', function handleStreamError(err) {
398
- reject(enhanceError(err, config, null, req));
399
- }).pipe(req);
653
+ data.on('close', () => {
654
+ if (!ended && !errored) {
655
+ abort(new CanceledError('Request stream has been aborted', config, req));
656
+ }
657
+ });
658
+
659
+ data.pipe(req);
400
660
  } else {
401
661
  req.end(data);
402
662
  }
403
663
  });
404
- };
664
+ }
665
+
666
+ export const __setProxy = setProxy;