node-red-contrib-tak-registration 0.3.1 → 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.
- package/README.md +1 -1
- package/node_modules/@turf/along/package.json +41 -69
- package/node_modules/@turf/angle/package.json +44 -75
- package/node_modules/@turf/area/package.json +38 -68
- package/node_modules/@turf/bbox/package.json +37 -81
- package/node_modules/@turf/bbox-clip/package.json +44 -81
- package/node_modules/@turf/bbox-polygon/package.json +36 -66
- package/node_modules/@turf/bearing/package.json +36 -70
- package/node_modules/@turf/bezier-spline/package.json +39 -67
- package/node_modules/@turf/boolean-clockwise/package.json +42 -83
- package/node_modules/@turf/boolean-contains/package.json +46 -80
- package/node_modules/@turf/boolean-crosses/package.json +45 -79
- package/node_modules/@turf/boolean-disjoint/package.json +44 -79
- package/node_modules/@turf/boolean-equal/package.json +47 -84
- package/node_modules/@turf/boolean-intersects/package.json +42 -77
- package/node_modules/@turf/boolean-overlap/package.json +48 -82
- package/node_modules/@turf/boolean-parallel/package.json +42 -73
- package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
- package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
- package/node_modules/@turf/boolean-within/package.json +46 -79
- package/node_modules/@turf/buffer/package.json +47 -84
- package/node_modules/@turf/center/package.json +42 -73
- package/node_modules/@turf/center-mean/package.json +45 -78
- package/node_modules/@turf/center-median/package.json +45 -76
- package/node_modules/@turf/center-of-mass/package.json +40 -68
- package/node_modules/@turf/centroid/package.json +40 -74
- package/node_modules/@turf/circle/package.json +41 -71
- package/node_modules/@turf/clean-coords/package.json +40 -75
- package/node_modules/@turf/clone/package.json +36 -81
- package/node_modules/@turf/clusters/package.json +39 -70
- package/node_modules/@turf/clusters-dbscan/package.json +51 -88
- package/node_modules/@turf/clusters-kmeans/package.json +53 -90
- package/node_modules/@turf/collect/package.json +42 -73
- package/node_modules/@turf/combine/package.json +37 -65
- package/node_modules/@turf/concave/package.json +56 -111
- package/node_modules/@turf/convex/package.json +39 -68
- package/node_modules/@turf/destination/package.json +41 -75
- package/node_modules/@turf/difference/package.json +35 -63
- package/node_modules/@turf/dissolve/package.json +38 -66
- package/node_modules/@turf/distance/package.json +38 -83
- package/node_modules/@turf/distance-weight/package.json +40 -72
- package/node_modules/@turf/ellipse/package.json +43 -75
- package/node_modules/@turf/envelope/package.json +36 -65
- package/node_modules/@turf/explode/package.json +36 -67
- package/node_modules/@turf/flatten/package.json +39 -73
- package/node_modules/@turf/flip/package.json +36 -64
- package/node_modules/@turf/great-circle/package.json +41 -78
- package/node_modules/@turf/helpers/package.json +38 -184
- package/node_modules/@turf/hex-grid/package.json +50 -97
- package/node_modules/@turf/interpolate/package.json +47 -78
- package/node_modules/@turf/intersect/package.json +39 -69
- package/node_modules/@turf/invariant/package.json +36 -126
- package/node_modules/@turf/isobands/package.json +52 -83
- package/node_modules/@turf/isolines/package.json +48 -79
- package/node_modules/@turf/kinks/package.json +35 -63
- package/node_modules/@turf/length/package.json +43 -78
- package/node_modules/@turf/line-arc/package.json +36 -65
- package/node_modules/@turf/line-chunk/package.json +44 -84
- package/node_modules/@turf/line-intersect/package.json +46 -85
- package/node_modules/@turf/line-offset/package.json +41 -78
- package/node_modules/@turf/line-overlap/package.json +48 -80
- package/node_modules/@turf/line-segment/package.json +38 -70
- package/node_modules/@turf/line-slice/package.json +39 -67
- package/node_modules/@turf/line-slice-along/package.json +36 -65
- package/node_modules/@turf/line-split/package.json +46 -77
- package/node_modules/@turf/line-to-polygon/package.json +43 -74
- package/node_modules/@turf/mask/package.json +35 -63
- package/node_modules/@turf/meta/package.json +39 -128
- package/node_modules/@turf/midpoint/package.json +36 -64
- package/node_modules/@turf/moran-index/package.json +39 -70
- package/node_modules/@turf/nearest-point/package.json +39 -69
- package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
- package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
- package/node_modules/@turf/planepoint/package.json +34 -62
- package/node_modules/@turf/point-grid/package.json +45 -80
- package/node_modules/@turf/point-on-feature/package.json +40 -68
- package/node_modules/@turf/point-to-line-distance/package.json +46 -78
- package/node_modules/@turf/points-within-polygon/package.json +35 -64
- package/node_modules/@turf/polygon-smooth/package.json +37 -68
- package/node_modules/@turf/polygon-tangents/package.json +43 -77
- package/node_modules/@turf/polygon-to-line/package.json +39 -69
- package/node_modules/@turf/polygonize/package.json +43 -77
- package/node_modules/@turf/projection/package.json +44 -77
- package/node_modules/@turf/random/package.json +34 -62
- package/node_modules/@turf/rectangle-grid/package.json +43 -77
- package/node_modules/@turf/rewind/package.json +43 -83
- package/node_modules/@turf/rhumb-bearing/package.json +43 -85
- package/node_modules/@turf/rhumb-destination/package.json +44 -85
- package/node_modules/@turf/rhumb-distance/package.json +44 -84
- package/node_modules/@turf/sample/package.json +32 -60
- package/node_modules/@turf/sector/package.json +37 -65
- package/node_modules/@turf/shortest-path/package.json +45 -79
- package/node_modules/@turf/simplify/package.json +43 -77
- package/node_modules/@turf/square/package.json +33 -62
- package/node_modules/@turf/square-grid/package.json +40 -69
- package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
- package/node_modules/@turf/tag/package.json +38 -66
- package/node_modules/@turf/tesselate/package.json +40 -80
- package/node_modules/@turf/tin/package.json +34 -63
- package/node_modules/@turf/transform-rotate/package.json +45 -80
- package/node_modules/@turf/transform-scale/package.json +51 -86
- package/node_modules/@turf/transform-translate/package.json +44 -78
- package/node_modules/@turf/triangle-grid/package.json +42 -71
- package/node_modules/@turf/truncate/package.json +40 -72
- package/node_modules/@turf/turf/package.json +74 -102
- package/node_modules/@turf/union/package.json +39 -67
- package/node_modules/@turf/unkink-polygon/package.json +40 -68
- package/node_modules/@turf/voronoi/package.json +43 -83
- package/node_modules/@types/geojson/package.json +42 -66
- package/node_modules/adm-zip/LICENSE +21 -21
- package/node_modules/adm-zip/adm-zip.js +25 -22
- package/node_modules/adm-zip/headers/mainHeader.js +2 -1
- package/node_modules/adm-zip/package.json +28 -57
- package/node_modules/adm-zip/util/utils.js +1 -0
- package/node_modules/asynckit/package.json +40 -68
- package/node_modules/axios/CHANGELOG.md +473 -837
- package/node_modules/axios/LICENSE +4 -16
- package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
- package/node_modules/axios/README.md +518 -114
- package/node_modules/axios/SECURITY.md +4 -3
- package/node_modules/axios/dist/axios.js +2759 -2070
- package/node_modules/axios/dist/axios.js.map +1 -0
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +3210 -0
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
- package/node_modules/axios/dist/esm/axios.js +3232 -0
- package/node_modules/axios/dist/esm/axios.js.map +1 -0
- package/node_modules/axios/dist/esm/axios.min.js +2 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +4237 -0
- package/node_modules/axios/dist/node/axios.cjs.map +1 -0
- package/node_modules/axios/index.d.cts +532 -0
- package/node_modules/axios/index.d.ts +398 -72
- package/node_modules/axios/index.js +41 -1
- package/node_modules/axios/lib/adapters/adapters.js +59 -0
- package/node_modules/axios/lib/adapters/http.js +479 -217
- package/node_modules/axios/lib/adapters/xhr.js +95 -54
- package/node_modules/axios/lib/axios.js +49 -20
- package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
- package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +155 -100
- package/node_modules/axios/lib/core/AxiosError.js +100 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
- package/node_modules/axios/lib/core/buildFullPath.js +5 -4
- package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
- package/node_modules/axios/lib/core/mergeConfig.js +58 -52
- package/node_modules/axios/lib/core/settle.js +8 -6
- package/node_modules/axios/lib/core/transformData.js +15 -9
- package/node_modules/axios/lib/defaults/index.js +76 -41
- package/node_modules/axios/lib/defaults/transitional.js +1 -1
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -3
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
- package/node_modules/axios/lib/helpers/bind.js +3 -7
- package/node_modules/axios/lib/helpers/buildURL.js +26 -33
- package/node_modules/axios/lib/helpers/callbackify.js +16 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
- package/node_modules/axios/lib/helpers/cookies.js +43 -44
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
- package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
- package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +3 -2
- package/node_modules/axios/lib/helpers/throttle.js +33 -0
- package/node_modules/axios/lib/helpers/toFormData.js +203 -39
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
- package/node_modules/axios/lib/helpers/validator.js +27 -18
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +64 -0
- package/node_modules/axios/lib/platform/index.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +12 -0
- package/node_modules/axios/lib/utils.js +517 -144
- package/node_modules/axios/package.json +194 -93
- package/node_modules/call-bind/package.json +78 -109
- package/node_modules/combined-stream/package.json +14 -46
- package/node_modules/commander/package.json +20 -53
- package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
- package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
- package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
- package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
- package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
- package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/concaveman/package.json +15 -46
- package/node_modules/d3-array/package.json +19 -47
- package/node_modules/d3-geo/package.json +24 -52
- package/node_modules/d3-voronoi/package.json +19 -47
- package/node_modules/deep-equal/package.json +34 -64
- package/node_modules/define-properties/.eslintrc +10 -3
- package/node_modules/define-properties/.github/FUNDING.yml +12 -0
- package/node_modules/define-properties/.nycrc +9 -0
- package/node_modules/define-properties/CHANGELOG.md +39 -0
- package/node_modules/define-properties/README.md +11 -13
- package/node_modules/define-properties/index.js +12 -17
- package/node_modules/define-properties/package.json +85 -95
- package/node_modules/delayed-stream/package.json +14 -49
- package/node_modules/density-clustering/package.json +46 -70
- package/node_modules/earcut/README.md +12 -3
- package/node_modules/earcut/dist/earcut.dev.js +47 -50
- package/node_modules/earcut/dist/earcut.min.js +1 -1
- package/node_modules/earcut/package.json +26 -60
- package/node_modules/earcut/src/earcut.js +46 -49
- package/node_modules/follow-redirects/README.md +8 -1
- package/node_modules/follow-redirects/index.js +83 -36
- package/node_modules/follow-redirects/package.json +38 -74
- package/node_modules/form-data/package.json +37 -70
- package/node_modules/function-bind/package.json +23 -56
- package/node_modules/functions-have-names/.editorconfig +20 -0
- package/node_modules/functions-have-names/.eslintrc +19 -0
- package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
- package/node_modules/functions-have-names/.nycrc +9 -0
- package/node_modules/functions-have-names/CHANGELOG.md +89 -0
- package/node_modules/functions-have-names/LICENSE +21 -0
- package/node_modules/functions-have-names/README.md +40 -0
- package/node_modules/functions-have-names/index.js +31 -0
- package/node_modules/functions-have-names/package.json +55 -0
- package/node_modules/functions-have-names/test/index.js +65 -0
- package/node_modules/geojson-equality/package.json +23 -55
- package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
- package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
- package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
- package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
- package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
- package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
- package/node_modules/geojson-rbush/package.json +32 -71
- package/node_modules/get-intrinsic/.eslintrc +3 -8
- package/node_modules/get-intrinsic/.nycrc +0 -4
- package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
- package/node_modules/get-intrinsic/README.md +7 -1
- package/node_modules/get-intrinsic/index.js +29 -8
- package/node_modules/get-intrinsic/package.json +91 -104
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
- package/node_modules/has/package.json +21 -46
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +33 -0
- package/node_modules/has-property-descriptors/package.json +70 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/has-proto/.eslintrc +5 -0
- package/node_modules/has-proto/.github/FUNDING.yml +12 -0
- package/node_modules/has-proto/CHANGELOG.md +23 -0
- package/node_modules/has-proto/LICENSE +21 -0
- package/node_modules/has-proto/README.md +38 -0
- package/node_modules/has-proto/index.js +11 -0
- package/node_modules/has-proto/package.json +74 -0
- package/node_modules/has-proto/test/index.js +19 -0
- package/node_modules/has-symbols/package.json +99 -125
- package/node_modules/has-tostringtag/package.json +82 -109
- package/node_modules/is-arguments/package.json +89 -114
- package/node_modules/is-date-object/package.json +77 -108
- package/node_modules/is-regex/package.json +84 -112
- package/node_modules/mime-db/HISTORY.md +8 -0
- package/node_modules/mime-db/LICENSE +19 -18
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +54 -6
- package/node_modules/mime-db/index.js +1 -0
- package/node_modules/mime-db/package.json +24 -66
- package/node_modules/mime-types/HISTORY.md +9 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +19 -62
- package/node_modules/object-assign/package.json +15 -49
- package/node_modules/object-is/package.json +85 -112
- package/node_modules/object-keys/package.json +86 -116
- package/node_modules/point-in-polygon/package.json +19 -48
- package/node_modules/polygon-clipping/package.json +41 -80
- package/node_modules/proxy-from-env/.eslintrc +29 -0
- package/node_modules/proxy-from-env/.travis.yml +10 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +131 -0
- package/node_modules/proxy-from-env/index.js +108 -0
- package/node_modules/proxy-from-env/package.json +34 -0
- package/node_modules/proxy-from-env/test.js +483 -0
- package/node_modules/quickselect/package.json +13 -41
- package/node_modules/rbush/README.md +95 -22
- package/node_modules/rbush/index.js +181 -131
- package/node_modules/rbush/package.json +39 -71
- package/node_modules/rbush/rbush.js +412 -360
- package/node_modules/rbush/rbush.min.js +1 -1
- package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
- package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
- package/node_modules/regexp.prototype.flags/implementation.js +9 -0
- package/node_modules/regexp.prototype.flags/package.json +98 -122
- package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
- package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
- package/node_modules/robust-predicates/package.json +25 -52
- package/node_modules/skmeans/package.json +18 -53
- package/node_modules/splaytree/Readme.md +58 -57
- package/node_modules/splaytree/dist/splay.esm.js +21 -8
- package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
- package/node_modules/splaytree/dist/splay.js +21 -8
- package/node_modules/splaytree/dist/splay.js.map +1 -1
- package/node_modules/splaytree/package.json +36 -68
- package/node_modules/splaytree/src/index.ts +16 -4
- package/node_modules/tinyqueue/package.json +34 -59
- package/node_modules/topojson-client/package.json +28 -56
- package/node_modules/topojson-server/package.json +27 -55
- package/node_modules/turf-jsts/package.json +33 -68
- package/node_modules/uuid/CHANGELOG.md +39 -0
- package/node_modules/uuid/README.md +30 -73
- package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
- package/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
- package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
- package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
- package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
- package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
- package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
- package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
- package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
- package/node_modules/uuid/dist/esm-browser/version.js +1 -1
- package/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
- package/node_modules/uuid/dist/esm-node/v1.js +2 -2
- package/node_modules/uuid/dist/esm-node/v35.js +6 -4
- package/node_modules/uuid/dist/esm-node/v4.js +7 -2
- package/node_modules/uuid/dist/esm-node/version.js +1 -1
- package/node_modules/uuid/dist/index.js +18 -18
- package/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/uuid/dist/rng-browser.js +2 -3
- package/node_modules/uuid/dist/stringify.js +8 -3
- package/node_modules/uuid/dist/v1.js +2 -2
- package/node_modules/uuid/dist/v35.js +7 -5
- package/node_modules/uuid/dist/v4.js +8 -2
- package/node_modules/uuid/dist/version.js +1 -1
- package/node_modules/uuid/package.json +87 -120
- package/package.json +12 -8
- package/tak-ingest.html +40 -0
- package/tak-ingest.js +48 -0
- package/tak-registration.html +13 -2
- package/tak-registration.js +55 -7
- package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
- package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
- package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
- package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
- package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
- package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
- package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
- package/node_modules/axios/dist/axios.map +0 -1
- package/node_modules/axios/dist/axios.min.map +0 -1
- package/node_modules/axios/lib/cancel/Cancel.js +0 -19
- package/node_modules/axios/lib/core/createError.js +0 -18
- package/node_modules/axios/lib/core/enhanceError.js +0 -43
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/node_modules/axios/tsconfig.json +0 -14
- package/node_modules/axios/tslint.json +0 -6
- package/node_modules/combined-stream/yarn.lock +0 -17
- package/node_modules/d3-array/yarn.lock +0 -939
- package/node_modules/define-properties/.jscs.json +0 -175
- package/node_modules/define-properties/.travis.yml +0 -233
- package/node_modules/define-properties/test/index.js +0 -125
- package/node_modules/get-intrinsic/.eslintignore +0 -1
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
- /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
- /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
- /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 ?
|
|
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
|
|
149
|
+
var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
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
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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(
|
|
175
|
-
maxZ = zOrder(
|
|
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
|
|
183
|
-
pointInTriangle(
|
|
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
|
|
188
|
-
pointInTriangle(
|
|
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
|
|
196
|
-
pointInTriangle(
|
|
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
|
|
204
|
-
pointInTriangle(
|
|
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 ===
|
|
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 =
|
|
446
|
-
y =
|
|
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)
|
|
476
|
-
(ax - px) * (by - py)
|
|
477
|
-
(bx - px) * (cy - py)
|
|
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 =
|
|
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,
|
|
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 (!(
|
|
83
|
+
if (!isString(data) && !isBuffer(data)) {
|
|
79
84
|
throw new TypeError("data should be a string, Buffer or Uint8Array");
|
|
80
85
|
}
|
|
81
|
-
if (
|
|
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 (
|
|
115
|
+
if (isFunction(data)) {
|
|
111
116
|
callback = data;
|
|
112
117
|
data = encoding = null;
|
|
113
118
|
}
|
|
114
|
-
else if (
|
|
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.
|
|
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
|
|
285
|
-
request.on(
|
|
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 (
|
|
417
|
-
var responseDetails = {
|
|
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
|
-
|
|
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 (
|
|
456
|
-
var
|
|
484
|
+
if (isString(input)) {
|
|
485
|
+
var parsed;
|
|
457
486
|
try {
|
|
458
|
-
|
|
487
|
+
parsed = urlToOptions(new URL(input));
|
|
459
488
|
}
|
|
460
489
|
catch (err) {
|
|
461
490
|
/* istanbul ignore next */
|
|
462
|
-
|
|
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 (
|
|
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,
|
|
542
|
-
|
|
577
|
+
function createErrorType(code, message, baseClass) {
|
|
578
|
+
// Create constructor
|
|
579
|
+
function CustomError(properties) {
|
|
543
580
|
Error.captureStackTrace(this, this.constructor);
|
|
544
|
-
|
|
545
|
-
|
|
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
|
-
|
|
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
|
|
561
|
-
request.removeListener(
|
|
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
|
-
|
|
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
|
-
"
|
|
3
|
-
"
|
|
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
|
-
"
|
|
48
|
-
|
|
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
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
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
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
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
|
}
|