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