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
@@ -34,10 +34,10 @@ function earcut(data, holeIndices, dim) {
34
34
 
35
35
  // minX, minY and invSize are later used to transform coords into integers for z-order calculation
36
36
  invSize = Math.max(maxX - minX, maxY - minY);
37
- invSize = invSize !== 0 ? 1 / invSize : 0;
37
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
38
38
  }
39
39
 
40
- earcutLinked(outerNode, triangles, dim, minX, minY, invSize);
40
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
41
41
 
42
42
  return triangles;
43
43
  }
@@ -101,9 +101,9 @@ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
101
101
 
102
102
  if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
103
103
  // cut off the triangle
104
- triangles.push(prev.i / dim);
105
- triangles.push(ear.i / dim);
106
- triangles.push(next.i / dim);
104
+ triangles.push(prev.i / dim | 0);
105
+ triangles.push(ear.i / dim | 0);
106
+ triangles.push(next.i / dim | 0);
107
107
 
108
108
  removeNode(ear);
109
109
 
@@ -146,10 +146,18 @@ function isEar(ear) {
146
146
  if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
147
147
 
148
148
  // now make sure we don't have other points inside the potential ear
149
- var p = ear.next.next;
149
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
150
150
 
151
- while (p !== ear.prev) {
152
- if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
151
+ // triangle bbox; min & max are calculated like this for speed
152
+ var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
153
+ y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
154
+ x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
155
+ y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
156
+
157
+ var p = c.next;
158
+ while (p !== a) {
159
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&
160
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) &&
153
161
  area(p.prev, p, p.next) >= 0) return false;
154
162
  p = p.next;
155
163
  }
@@ -164,45 +172,43 @@ function isEarHashed(ear, minX, minY, invSize) {
164
172
 
165
173
  if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
166
174
 
175
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
176
+
167
177
  // triangle bbox; min & max are calculated like this for speed
168
- var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),
169
- minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),
170
- maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),
171
- maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);
178
+ var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
179
+ y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
180
+ x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
181
+ y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
172
182
 
173
183
  // z-order range for the current triangle bbox;
174
- var minZ = zOrder(minTX, minTY, minX, minY, invSize),
175
- maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
184
+ var minZ = zOrder(x0, y0, minX, minY, invSize),
185
+ maxZ = zOrder(x1, y1, minX, minY, invSize);
176
186
 
177
187
  var p = ear.prevZ,
178
188
  n = ear.nextZ;
179
189
 
180
190
  // look for points inside the triangle in both directions
181
191
  while (p && p.z >= minZ && n && n.z <= maxZ) {
182
- if (p !== ear.prev && p !== ear.next &&
183
- pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
184
- area(p.prev, p, p.next) >= 0) return false;
192
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
193
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
185
194
  p = p.prevZ;
186
195
 
187
- if (n !== ear.prev && n !== ear.next &&
188
- pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&
189
- area(n.prev, n, n.next) >= 0) return false;
196
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
197
+ pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
190
198
  n = n.nextZ;
191
199
  }
192
200
 
193
201
  // look for remaining points in decreasing z-order
194
202
  while (p && p.z >= minZ) {
195
- if (p !== ear.prev && p !== ear.next &&
196
- pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
197
- area(p.prev, p, p.next) >= 0) return false;
203
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
204
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
198
205
  p = p.prevZ;
199
206
  }
200
207
 
201
208
  // look for remaining points in increasing z-order
202
209
  while (n && n.z <= maxZ) {
203
- if (n !== ear.prev && n !== ear.next &&
204
- pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&
205
- area(n.prev, n, n.next) >= 0) return false;
210
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
211
+ pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
206
212
  n = n.nextZ;
207
213
  }
208
214
 
@@ -218,9 +224,9 @@ function cureLocalIntersections(start, triangles, dim) {
218
224
 
219
225
  if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
220
226
 
221
- triangles.push(a.i / dim);
222
- triangles.push(p.i / dim);
223
- triangles.push(b.i / dim);
227
+ triangles.push(a.i / dim | 0);
228
+ triangles.push(p.i / dim | 0);
229
+ triangles.push(b.i / dim | 0);
224
230
 
225
231
  // remove two nodes involved
226
232
  removeNode(p);
@@ -250,8 +256,8 @@ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
250
256
  c = filterPoints(c, c.next);
251
257
 
252
258
  // run earcut on each half
253
- earcutLinked(a, triangles, dim, minX, minY, invSize);
254
- earcutLinked(c, triangles, dim, minX, minY, invSize);
259
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
260
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
255
261
  return;
256
262
  }
257
263
  b = b.next;
@@ -278,7 +284,6 @@ function eliminateHoles(data, holeIndices, outerNode, dim) {
278
284
  // process holes from left to right
279
285
  for (i = 0; i < queue.length; i++) {
280
286
  outerNode = eliminateHole(queue[i], outerNode);
281
- outerNode = filterPoints(outerNode, outerNode.next);
282
287
  }
283
288
 
284
289
  return outerNode;
@@ -298,11 +303,8 @@ function eliminateHole(hole, outerNode) {
298
303
  var bridgeReverse = splitPolygon(bridge, hole);
299
304
 
300
305
  // filter collinear points around the cuts
301
- var filteredBridge = filterPoints(bridge, bridge.next);
302
306
  filterPoints(bridgeReverse, bridgeReverse.next);
303
-
304
- // Check if input node was removed by the filtering
305
- return outerNode === bridge ? filteredBridge : outerNode;
307
+ return filterPoints(bridge, bridge.next);
306
308
  }
307
309
 
308
310
  // David Eberly's algorithm for finding a bridge between hole and outer polygon
@@ -320,11 +322,8 @@ function findHoleBridge(hole, outerNode) {
320
322
  var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
321
323
  if (x <= hx && x > qx) {
322
324
  qx = x;
323
- if (x === hx) {
324
- if (hy === p.y) return p;
325
- if (hy === p.next.y) return p.next;
326
- }
327
325
  m = p.x < p.next.x ? p : p.next;
326
+ if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint
328
327
  }
329
328
  }
330
329
  p = p.next;
@@ -332,8 +331,6 @@ function findHoleBridge(hole, outerNode) {
332
331
 
333
332
  if (!m) return null;
334
333
 
335
- if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint
336
-
337
334
  // look for points inside the triangle of hole point, segment intersection and endpoint;
338
335
  // if there are no points found, we have a valid connection;
339
336
  // otherwise choose the point of the minimum angle with the ray as connection point
@@ -374,7 +371,7 @@ function sectorContainsSector(m, p) {
374
371
  function indexCurve(start, minX, minY, invSize) {
375
372
  var p = start;
376
373
  do {
377
- if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);
374
+ if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
378
375
  p.prevZ = p.prev;
379
376
  p.nextZ = p.next;
380
377
  p = p.next;
@@ -442,8 +439,8 @@ function sortLinked(list) {
442
439
  // z-order of a point given coords and inverse of the longer side of data bbox
443
440
  function zOrder(x, y, minX, minY, invSize) {
444
441
  // coords are transformed into non-negative 15-bit integer range
445
- x = 32767 * (x - minX) * invSize;
446
- y = 32767 * (y - minY) * invSize;
442
+ x = (x - minX) * invSize | 0;
443
+ y = (y - minY) * invSize | 0;
447
444
 
448
445
  x = (x | (x << 8)) & 0x00FF00FF;
449
446
  x = (x | (x << 4)) & 0x0F0F0F0F;
@@ -472,9 +469,9 @@ function getLeftmost(start) {
472
469
 
473
470
  // check if a point lies within a convex triangle
474
471
  function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
475
- return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&
476
- (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&
477
- (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
472
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&
473
+ (ax - px) * (by - py) >= (bx - px) * (ay - py) &&
474
+ (bx - px) * (cy - py) >= (cx - px) * (by - py);
478
475
  }
479
476
 
480
477
  // check if a diagonal between two polygon nodes is valid (lies in polygon interior)
@@ -617,7 +614,7 @@ function Node(i, x, y) {
617
614
  this.next = null;
618
615
 
619
616
  // z-order curve value
620
- this.z = null;
617
+ this.z = 0;
621
618
 
622
619
  // previous and next nodes in z-order
623
620
  this.prevZ = null;
@@ -63,10 +63,17 @@ const { http, https } = require('follow-redirects');
63
63
 
64
64
  const options = url.parse('http://bit.ly/900913');
65
65
  options.maxRedirects = 10;
66
- options.beforeRedirect = (options, { headers }) => {
66
+ options.beforeRedirect = (options, response, request) => {
67
67
  // Use this to adjust the request options upon redirecting,
68
68
  // to inspect the latest response headers,
69
69
  // or to cancel the request by throwing an error
70
+
71
+ // response.headers = the redirect response headers
72
+ // response.statusCode = the redirect response code (eg. 301, 307, etc.)
73
+
74
+ // request.url = the requested URL that resulted in a redirect
75
+ // request.headers = the headers in the request that resulted in a redirect
76
+ // request.method = the method of the request that resulted in a redirect
70
77
  if (options.hostname === "example.com") {
71
78
  options.auth = "user:password";
72
79
  }
@@ -15,6 +15,11 @@ events.forEach(function (event) {
15
15
  };
16
16
  });
17
17
 
18
+ var InvalidUrlError = createErrorType(
19
+ "ERR_INVALID_URL",
20
+ "Invalid URL",
21
+ TypeError
22
+ );
18
23
  // Error types with codes
19
24
  var RedirectionError = createErrorType(
20
25
  "ERR_FR_REDIRECTION_FAILURE",
@@ -75,10 +80,10 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
75
80
  }
76
81
 
77
82
  // Validate input and shift parameters if necessary
78
- if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
83
+ if (!isString(data) && !isBuffer(data)) {
79
84
  throw new TypeError("data should be a string, Buffer or Uint8Array");
80
85
  }
81
- if (typeof encoding === "function") {
86
+ if (isFunction(encoding)) {
82
87
  callback = encoding;
83
88
  encoding = null;
84
89
  }
@@ -107,11 +112,11 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
107
112
  // Ends the current native request
108
113
  RedirectableRequest.prototype.end = function (data, encoding, callback) {
109
114
  // Shift parameters if necessary
110
- if (typeof data === "function") {
115
+ if (isFunction(data)) {
111
116
  callback = data;
112
117
  data = encoding = null;
113
118
  }
114
- else if (typeof encoding === "function") {
119
+ else if (isFunction(encoding)) {
115
120
  callback = encoding;
116
121
  encoding = null;
117
122
  }
@@ -270,25 +275,30 @@ RedirectableRequest.prototype._performRequest = function () {
270
275
  // If specified, use the agent corresponding to the protocol
271
276
  // (HTTP and HTTPS use different types of agents)
272
277
  if (this._options.agents) {
273
- var scheme = protocol.substr(0, protocol.length - 1);
278
+ var scheme = protocol.slice(0, -1);
274
279
  this._options.agent = this._options.agents[scheme];
275
280
  }
276
281
 
277
- // Create the native request
282
+ // Create the native request and set up its event handlers
278
283
  var request = this._currentRequest =
279
284
  nativeProtocol.request(this._options, this._onNativeResponse);
280
- this._currentUrl = url.format(this._options);
281
-
282
- // Set up event handlers
283
285
  request._redirectable = this;
284
- for (var e = 0; e < events.length; e++) {
285
- request.on(events[e], eventHandlers[events[e]]);
286
+ for (var event of events) {
287
+ request.on(event, eventHandlers[event]);
286
288
  }
287
289
 
290
+ // RFC7230§5.3.1: When making a request directly to an origin server, […]
291
+ // a client MUST send only the absolute path […] as the request-target.
292
+ this._currentUrl = /^\//.test(this._options.path) ?
293
+ url.format(this._options) :
294
+ // When making a request to a proxy, […]
295
+ // a client MUST send the target URI in absolute-form […].
296
+ this._options.path;
297
+
288
298
  // End a redirected request
289
299
  // (The first request must be ended explicitly with RedirectableRequest#end)
290
300
  if (this._isRedirect) {
291
- // Write the request entity and end.
301
+ // Write the request entity and end
292
302
  var i = 0;
293
303
  var self = this;
294
304
  var buffers = this._requestBodyBuffers;
@@ -362,10 +372,21 @@ RedirectableRequest.prototype._processResponse = function (response) {
362
372
  return;
363
373
  }
364
374
 
375
+ // Store the request headers if applicable
376
+ var requestHeaders;
377
+ var beforeRedirect = this._options.beforeRedirect;
378
+ if (beforeRedirect) {
379
+ requestHeaders = Object.assign({
380
+ // The Host header was set by nativeProtocol.request
381
+ Host: response.req.getHeader("host"),
382
+ }, this._options.headers);
383
+ }
384
+
365
385
  // RFC7231§6.4: Automatic redirection needs to done with
366
386
  // care for methods not known to be safe, […]
367
387
  // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
368
388
  // the request method from POST to GET for the subsequent request.
389
+ var method = this._options.method;
369
390
  if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
370
391
  // RFC7231§6.4.4: The 303 (See Other) status code indicates that
371
392
  // the server is redirecting the user agent to a different resource […]
@@ -393,7 +414,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
393
414
  redirectUrl = url.resolve(currentUrl, location);
394
415
  }
395
416
  catch (cause) {
396
- this.emit("error", new RedirectionError(cause));
417
+ this.emit("error", new RedirectionError({ cause: cause }));
397
418
  return;
398
419
  }
399
420
 
@@ -413,10 +434,18 @@ RedirectableRequest.prototype._processResponse = function (response) {
413
434
  }
414
435
 
415
436
  // Evaluate the beforeRedirect callback
416
- if (typeof this._options.beforeRedirect === "function") {
417
- var responseDetails = { headers: response.headers };
437
+ if (isFunction(beforeRedirect)) {
438
+ var responseDetails = {
439
+ headers: response.headers,
440
+ statusCode: statusCode,
441
+ };
442
+ var requestDetails = {
443
+ url: currentUrl,
444
+ method: method,
445
+ headers: requestHeaders,
446
+ };
418
447
  try {
419
- this._options.beforeRedirect.call(null, this._options, responseDetails);
448
+ beforeRedirect(this._options, responseDetails, requestDetails);
420
449
  }
421
450
  catch (err) {
422
451
  this.emit("error", err);
@@ -430,7 +459,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
430
459
  this._performRequest();
431
460
  }
432
461
  catch (cause) {
433
- this.emit("error", new RedirectionError(cause));
462
+ this.emit("error", new RedirectionError({ cause: cause }));
434
463
  }
435
464
  };
436
465
 
@@ -452,15 +481,19 @@ function wrap(protocols) {
452
481
  // Executes a request, following redirects
453
482
  function request(input, options, callback) {
454
483
  // Parse parameters
455
- if (typeof input === "string") {
456
- var urlStr = input;
484
+ if (isString(input)) {
485
+ var parsed;
457
486
  try {
458
- input = urlToOptions(new URL(urlStr));
487
+ parsed = urlToOptions(new URL(input));
459
488
  }
460
489
  catch (err) {
461
490
  /* istanbul ignore next */
462
- input = url.parse(urlStr);
491
+ parsed = url.parse(input);
492
+ }
493
+ if (!isString(parsed.protocol)) {
494
+ throw new InvalidUrlError({ input });
463
495
  }
496
+ input = parsed;
464
497
  }
465
498
  else if (URL && (input instanceof URL)) {
466
499
  input = urlToOptions(input);
@@ -470,7 +503,7 @@ function wrap(protocols) {
470
503
  options = input;
471
504
  input = { protocol: protocol };
472
505
  }
473
- if (typeof options === "function") {
506
+ if (isFunction(options)) {
474
507
  callback = options;
475
508
  options = null;
476
509
  }
@@ -481,6 +514,9 @@ function wrap(protocols) {
481
514
  maxBodyLength: exports.maxBodyLength,
482
515
  }, input, options);
483
516
  options.nativeProtocols = nativeProtocols;
517
+ if (!isString(options.host) && !isString(options.hostname)) {
518
+ options.hostname = "::1";
519
+ }
484
520
 
485
521
  assert.equal(options.protocol, protocol, "protocol mismatch");
486
522
  debug("options", options);
@@ -538,37 +574,48 @@ function removeMatchingHeaders(regex, headers) {
538
574
  undefined : String(lastValue).trim();
539
575
  }
540
576
 
541
- function createErrorType(code, defaultMessage) {
542
- function CustomError(cause) {
577
+ function createErrorType(code, message, baseClass) {
578
+ // Create constructor
579
+ function CustomError(properties) {
543
580
  Error.captureStackTrace(this, this.constructor);
544
- if (!cause) {
545
- this.message = defaultMessage;
546
- }
547
- else {
548
- this.message = defaultMessage + ": " + cause.message;
549
- this.cause = cause;
550
- }
581
+ Object.assign(this, properties || {});
582
+ this.code = code;
583
+ this.message = this.cause ? message + ": " + this.cause.message : message;
551
584
  }
552
- CustomError.prototype = new Error();
585
+
586
+ // Attach constructor and set default properties
587
+ CustomError.prototype = new (baseClass || Error)();
553
588
  CustomError.prototype.constructor = CustomError;
554
589
  CustomError.prototype.name = "Error [" + code + "]";
555
- CustomError.prototype.code = code;
556
590
  return CustomError;
557
591
  }
558
592
 
559
593
  function abortRequest(request) {
560
- for (var e = 0; e < events.length; e++) {
561
- request.removeListener(events[e], eventHandlers[events[e]]);
594
+ for (var event of events) {
595
+ request.removeListener(event, eventHandlers[event]);
562
596
  }
563
597
  request.on("error", noop);
564
598
  request.abort();
565
599
  }
566
600
 
567
601
  function isSubdomain(subdomain, domain) {
568
- const dot = subdomain.length - domain.length - 1;
602
+ assert(isString(subdomain) && isString(domain));
603
+ var dot = subdomain.length - domain.length - 1;
569
604
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
570
605
  }
571
606
 
607
+ function isString(value) {
608
+ return typeof value === "string" || value instanceof String;
609
+ }
610
+
611
+ function isFunction(value) {
612
+ return typeof value === "function";
613
+ }
614
+
615
+ function isBuffer(value) {
616
+ return typeof value === "object" && ("length" in value);
617
+ }
618
+
572
619
  // Exports
573
620
  module.exports = wrap({ http: http, https: https });
574
621
  module.exports.wrap = wrap;
@@ -1,70 +1,28 @@
1
1
  {
2
- "_from": "follow-redirects@^1.14.8",
3
- "_id": "follow-redirects@1.14.9",
4
- "_inBundle": false,
5
- "_integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
6
- "_location": "/follow-redirects",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "follow-redirects@^1.14.8",
12
- "name": "follow-redirects",
13
- "escapedName": "follow-redirects",
14
- "rawSpec": "^1.14.8",
15
- "saveSpec": null,
16
- "fetchSpec": "^1.14.8"
17
- },
18
- "_requiredBy": [
19
- "/axios"
20
- ],
21
- "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
22
- "_shasum": "dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7",
23
- "_spec": "follow-redirects@^1.14.8",
24
- "_where": "/Users/conway/Projects/TAKreg/node_modules/axios",
25
- "author": {
26
- "name": "Ruben Verborgh",
27
- "email": "ruben@verborgh.org",
28
- "url": "https://ruben.verborgh.org/"
29
- },
30
- "bugs": {
31
- "url": "https://github.com/follow-redirects/follow-redirects/issues"
32
- },
33
- "bundleDependencies": false,
34
- "contributors": [
35
- {
36
- "name": "Olivier Lalonde",
37
- "email": "olalonde@gmail.com",
38
- "url": "http://www.syskall.com"
39
- },
40
- {
41
- "name": "James Talmage",
42
- "email": "james@talmage.io"
43
- }
44
- ],
45
- "deprecated": false,
2
+ "name": "follow-redirects",
3
+ "version": "1.15.2",
46
4
  "description": "HTTP and HTTPS modules that follow redirects.",
47
- "devDependencies": {
48
- "concat-stream": "^2.0.0",
49
- "eslint": "^5.16.0",
50
- "express": "^4.16.4",
51
- "lolex": "^3.1.0",
52
- "mocha": "^6.0.2",
53
- "nyc": "^14.1.1"
54
- },
55
- "engines": {
56
- "node": ">=4.0"
57
- },
5
+ "license": "MIT",
6
+ "main": "index.js",
58
7
  "files": [
59
8
  "*.js"
60
9
  ],
61
- "funding": [
62
- {
63
- "type": "individual",
64
- "url": "https://github.com/sponsors/RubenVerborgh"
65
- }
66
- ],
10
+ "engines": {
11
+ "node": ">=4.0"
12
+ },
13
+ "scripts": {
14
+ "test": "npm run lint && npm run mocha",
15
+ "lint": "eslint *.js test",
16
+ "mocha": "nyc mocha"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git@github.com:follow-redirects/follow-redirects.git"
21
+ },
67
22
  "homepage": "https://github.com/follow-redirects/follow-redirects",
23
+ "bugs": {
24
+ "url": "https://github.com/follow-redirects/follow-redirects/issues"
25
+ },
68
26
  "keywords": [
69
27
  "http",
70
28
  "https",
@@ -74,22 +32,28 @@
74
32
  "location",
75
33
  "utility"
76
34
  ],
77
- "license": "MIT",
78
- "main": "index.js",
79
- "name": "follow-redirects",
35
+ "author": "Ruben Verborgh <ruben@verborgh.org> (https://ruben.verborgh.org/)",
36
+ "contributors": [
37
+ "Olivier Lalonde <olalonde@gmail.com> (http://www.syskall.com)",
38
+ "James Talmage <james@talmage.io>"
39
+ ],
40
+ "funding": [
41
+ {
42
+ "type": "individual",
43
+ "url": "https://github.com/sponsors/RubenVerborgh"
44
+ }
45
+ ],
80
46
  "peerDependenciesMeta": {
81
47
  "debug": {
82
48
  "optional": true
83
49
  }
84
50
  },
85
- "repository": {
86
- "type": "git",
87
- "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git"
88
- },
89
- "scripts": {
90
- "lint": "eslint *.js test",
91
- "mocha": "nyc mocha",
92
- "test": "npm run lint && npm run mocha"
93
- },
94
- "version": "1.14.9"
51
+ "devDependencies": {
52
+ "concat-stream": "^2.0.0",
53
+ "eslint": "^5.16.0",
54
+ "express": "^4.16.4",
55
+ "lolex": "^3.1.0",
56
+ "mocha": "^6.0.2",
57
+ "nyc": "^14.1.1"
58
+ }
95
59
  }