node-red-contrib-tak-registration 0.3.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +10 -0
- 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,134 +1,179 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import utils from './../utils.js';
|
|
4
|
+
import buildURL from '../helpers/buildURL.js';
|
|
5
|
+
import InterceptorManager from './InterceptorManager.js';
|
|
6
|
+
import dispatchRequest from './dispatchRequest.js';
|
|
7
|
+
import mergeConfig from './mergeConfig.js';
|
|
8
|
+
import buildFullPath from './buildFullPath.js';
|
|
9
|
+
import validator from '../helpers/validator.js';
|
|
10
|
+
import AxiosHeaders from './AxiosHeaders.js';
|
|
11
|
+
|
|
12
|
+
const validators = validator.validators;
|
|
13
|
+
|
|
11
14
|
/**
|
|
12
15
|
* Create a new instance of Axios
|
|
13
16
|
*
|
|
14
17
|
* @param {Object} instanceConfig The default config for the instance
|
|
15
|
-
*/
|
|
16
|
-
function Axios(instanceConfig) {
|
|
17
|
-
this.defaults = instanceConfig;
|
|
18
|
-
this.interceptors = {
|
|
19
|
-
request: new InterceptorManager(),
|
|
20
|
-
response: new InterceptorManager()
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Dispatch a request
|
|
26
18
|
*
|
|
27
|
-
* @
|
|
19
|
+
* @return {Axios} A new instance of Axios
|
|
28
20
|
*/
|
|
29
|
-
Axios
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
config = configOrUrl || {};
|
|
21
|
+
class Axios {
|
|
22
|
+
constructor(instanceConfig) {
|
|
23
|
+
this.defaults = instanceConfig;
|
|
24
|
+
this.interceptors = {
|
|
25
|
+
request: new InterceptorManager(),
|
|
26
|
+
response: new InterceptorManager()
|
|
27
|
+
};
|
|
37
28
|
}
|
|
38
29
|
|
|
39
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Dispatch a request
|
|
32
|
+
*
|
|
33
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
34
|
+
* @param {?Object} config
|
|
35
|
+
*
|
|
36
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
37
|
+
*/
|
|
38
|
+
request(configOrUrl, config) {
|
|
39
|
+
/*eslint no-param-reassign:0*/
|
|
40
|
+
// Allow for axios('example/url'[, config]) a la fetch API
|
|
41
|
+
if (typeof configOrUrl === 'string') {
|
|
42
|
+
config = config || {};
|
|
43
|
+
config.url = configOrUrl;
|
|
44
|
+
} else {
|
|
45
|
+
config = configOrUrl || {};
|
|
46
|
+
}
|
|
40
47
|
|
|
41
|
-
|
|
42
|
-
if (config.method) {
|
|
43
|
-
config.method = config.method.toLowerCase();
|
|
44
|
-
} else if (this.defaults.method) {
|
|
45
|
-
config.method = this.defaults.method.toLowerCase();
|
|
46
|
-
} else {
|
|
47
|
-
config.method = 'get';
|
|
48
|
-
}
|
|
48
|
+
config = mergeConfig(this.defaults, config);
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
const {transitional, paramsSerializer, headers} = config;
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
if (transitional !== undefined) {
|
|
53
|
+
validator.assertOptions(transitional, {
|
|
54
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
55
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
56
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
57
|
+
}, false);
|
|
58
|
+
}
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
if (paramsSerializer != null) {
|
|
61
|
+
if (utils.isFunction(paramsSerializer)) {
|
|
62
|
+
config.paramsSerializer = {
|
|
63
|
+
serialize: paramsSerializer
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
validator.assertOptions(paramsSerializer, {
|
|
67
|
+
encode: validators.function,
|
|
68
|
+
serialize: validators.function
|
|
69
|
+
}, true);
|
|
70
|
+
}
|
|
66
71
|
}
|
|
67
72
|
|
|
68
|
-
|
|
73
|
+
// Set config.method
|
|
74
|
+
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
75
|
+
|
|
76
|
+
let contextHeaders;
|
|
77
|
+
|
|
78
|
+
// Flatten headers
|
|
79
|
+
contextHeaders = headers && utils.merge(
|
|
80
|
+
headers.common,
|
|
81
|
+
headers[config.method]
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
contextHeaders && utils.forEach(
|
|
85
|
+
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
86
|
+
(method) => {
|
|
87
|
+
delete headers[method];
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
69
92
|
|
|
70
|
-
|
|
71
|
-
|
|
93
|
+
// filter out skipped interceptors
|
|
94
|
+
const requestInterceptorChain = [];
|
|
95
|
+
let synchronousRequestInterceptors = true;
|
|
96
|
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
97
|
+
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
72
100
|
|
|
73
|
-
|
|
74
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
75
|
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
76
|
-
});
|
|
101
|
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
77
102
|
|
|
78
|
-
|
|
103
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
104
|
+
});
|
|
79
105
|
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
const responseInterceptorChain = [];
|
|
107
|
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
108
|
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
109
|
+
});
|
|
82
110
|
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
let promise;
|
|
112
|
+
let i = 0;
|
|
113
|
+
let len;
|
|
85
114
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
if (!synchronousRequestInterceptors) {
|
|
116
|
+
const chain = [dispatchRequest.bind(this), undefined];
|
|
117
|
+
chain.unshift.apply(chain, requestInterceptorChain);
|
|
118
|
+
chain.push.apply(chain, responseInterceptorChain);
|
|
119
|
+
len = chain.length;
|
|
120
|
+
|
|
121
|
+
promise = Promise.resolve(config);
|
|
122
|
+
|
|
123
|
+
while (i < len) {
|
|
124
|
+
promise = promise.then(chain[i++], chain[i++]);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return promise;
|
|
89
128
|
}
|
|
90
129
|
|
|
91
|
-
|
|
92
|
-
|
|
130
|
+
len = requestInterceptorChain.length;
|
|
131
|
+
|
|
132
|
+
let newConfig = config;
|
|
93
133
|
|
|
134
|
+
i = 0;
|
|
135
|
+
|
|
136
|
+
while (i < len) {
|
|
137
|
+
const onFulfilled = requestInterceptorChain[i++];
|
|
138
|
+
const onRejected = requestInterceptorChain[i++];
|
|
139
|
+
try {
|
|
140
|
+
newConfig = onFulfilled(newConfig);
|
|
141
|
+
} catch (error) {
|
|
142
|
+
onRejected.call(this, error);
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
94
146
|
|
|
95
|
-
var newConfig = config;
|
|
96
|
-
while (requestInterceptorChain.length) {
|
|
97
|
-
var onFulfilled = requestInterceptorChain.shift();
|
|
98
|
-
var onRejected = requestInterceptorChain.shift();
|
|
99
147
|
try {
|
|
100
|
-
|
|
148
|
+
promise = dispatchRequest.call(this, newConfig);
|
|
101
149
|
} catch (error) {
|
|
102
|
-
|
|
103
|
-
break;
|
|
150
|
+
return Promise.reject(error);
|
|
104
151
|
}
|
|
105
|
-
}
|
|
106
152
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
} catch (error) {
|
|
110
|
-
return Promise.reject(error);
|
|
111
|
-
}
|
|
153
|
+
i = 0;
|
|
154
|
+
len = responseInterceptorChain.length;
|
|
112
155
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
156
|
+
while (i < len) {
|
|
157
|
+
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
158
|
+
}
|
|
116
159
|
|
|
117
|
-
|
|
118
|
-
}
|
|
160
|
+
return promise;
|
|
161
|
+
}
|
|
119
162
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
163
|
+
getUri(config) {
|
|
164
|
+
config = mergeConfig(this.defaults, config);
|
|
165
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
166
|
+
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
124
169
|
|
|
125
170
|
// Provide aliases for supported request methods
|
|
126
171
|
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
127
172
|
/*eslint func-names:0*/
|
|
128
173
|
Axios.prototype[method] = function(url, config) {
|
|
129
174
|
return this.request(mergeConfig(config || {}, {
|
|
130
|
-
method
|
|
131
|
-
url
|
|
175
|
+
method,
|
|
176
|
+
url,
|
|
132
177
|
data: (config || {}).data
|
|
133
178
|
}));
|
|
134
179
|
};
|
|
@@ -136,13 +181,23 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
136
181
|
|
|
137
182
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
138
183
|
/*eslint func-names:0*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
184
|
+
|
|
185
|
+
function generateHTTPMethod(isForm) {
|
|
186
|
+
return function httpMethod(url, data, config) {
|
|
187
|
+
return this.request(mergeConfig(config || {}, {
|
|
188
|
+
method,
|
|
189
|
+
headers: isForm ? {
|
|
190
|
+
'Content-Type': 'multipart/form-data'
|
|
191
|
+
} : {},
|
|
192
|
+
url,
|
|
193
|
+
data
|
|
194
|
+
}));
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
Axios.prototype[method] = generateHTTPMethod();
|
|
199
|
+
|
|
200
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
146
201
|
});
|
|
147
202
|
|
|
148
|
-
|
|
203
|
+
export default Axios;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} message The error message.
|
|
9
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
10
|
+
* @param {Object} [config] The config.
|
|
11
|
+
* @param {Object} [request] The request.
|
|
12
|
+
* @param {Object} [response] The response.
|
|
13
|
+
*
|
|
14
|
+
* @returns {Error} The created error.
|
|
15
|
+
*/
|
|
16
|
+
function AxiosError(message, code, config, request, response) {
|
|
17
|
+
Error.call(this);
|
|
18
|
+
|
|
19
|
+
if (Error.captureStackTrace) {
|
|
20
|
+
Error.captureStackTrace(this, this.constructor);
|
|
21
|
+
} else {
|
|
22
|
+
this.stack = (new Error()).stack;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
this.message = message;
|
|
26
|
+
this.name = 'AxiosError';
|
|
27
|
+
code && (this.code = code);
|
|
28
|
+
config && (this.config = config);
|
|
29
|
+
request && (this.request = request);
|
|
30
|
+
response && (this.response = response);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
utils.inherits(AxiosError, Error, {
|
|
34
|
+
toJSON: function toJSON() {
|
|
35
|
+
return {
|
|
36
|
+
// Standard
|
|
37
|
+
message: this.message,
|
|
38
|
+
name: this.name,
|
|
39
|
+
// Microsoft
|
|
40
|
+
description: this.description,
|
|
41
|
+
number: this.number,
|
|
42
|
+
// Mozilla
|
|
43
|
+
fileName: this.fileName,
|
|
44
|
+
lineNumber: this.lineNumber,
|
|
45
|
+
columnNumber: this.columnNumber,
|
|
46
|
+
stack: this.stack,
|
|
47
|
+
// Axios
|
|
48
|
+
config: utils.toJSONObject(this.config),
|
|
49
|
+
code: this.code,
|
|
50
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const prototype = AxiosError.prototype;
|
|
56
|
+
const descriptors = {};
|
|
57
|
+
|
|
58
|
+
[
|
|
59
|
+
'ERR_BAD_OPTION_VALUE',
|
|
60
|
+
'ERR_BAD_OPTION',
|
|
61
|
+
'ECONNABORTED',
|
|
62
|
+
'ETIMEDOUT',
|
|
63
|
+
'ERR_NETWORK',
|
|
64
|
+
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
65
|
+
'ERR_DEPRECATED',
|
|
66
|
+
'ERR_BAD_RESPONSE',
|
|
67
|
+
'ERR_BAD_REQUEST',
|
|
68
|
+
'ERR_CANCELED',
|
|
69
|
+
'ERR_NOT_SUPPORT',
|
|
70
|
+
'ERR_INVALID_URL'
|
|
71
|
+
// eslint-disable-next-line func-names
|
|
72
|
+
].forEach(code => {
|
|
73
|
+
descriptors[code] = {value: code};
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
77
|
+
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
78
|
+
|
|
79
|
+
// eslint-disable-next-line func-names
|
|
80
|
+
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
81
|
+
const axiosError = Object.create(prototype);
|
|
82
|
+
|
|
83
|
+
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
84
|
+
return obj !== Error.prototype;
|
|
85
|
+
}, prop => {
|
|
86
|
+
return prop !== 'isAxiosError';
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
90
|
+
|
|
91
|
+
axiosError.cause = error;
|
|
92
|
+
|
|
93
|
+
axiosError.name = error.name;
|
|
94
|
+
|
|
95
|
+
customProps && Object.assign(axiosError, customProps);
|
|
96
|
+
|
|
97
|
+
return axiosError;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export default AxiosError;
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
import parseHeaders from '../helpers/parseHeaders.js';
|
|
5
|
+
|
|
6
|
+
const $internals = Symbol('internals');
|
|
7
|
+
|
|
8
|
+
function normalizeHeader(header) {
|
|
9
|
+
return header && String(header).trim().toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function normalizeValue(value) {
|
|
13
|
+
if (value === false || value == null) {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function parseTokens(str) {
|
|
21
|
+
const tokens = Object.create(null);
|
|
22
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
23
|
+
let match;
|
|
24
|
+
|
|
25
|
+
while ((match = tokensRE.exec(str))) {
|
|
26
|
+
tokens[match[1]] = match[2];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return tokens;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
33
|
+
|
|
34
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
35
|
+
if (utils.isFunction(filter)) {
|
|
36
|
+
return filter.call(this, value, header);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (isHeaderNameFilter) {
|
|
40
|
+
value = header;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (!utils.isString(value)) return;
|
|
44
|
+
|
|
45
|
+
if (utils.isString(filter)) {
|
|
46
|
+
return value.indexOf(filter) !== -1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (utils.isRegExp(filter)) {
|
|
50
|
+
return filter.test(value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function formatHeader(header) {
|
|
55
|
+
return header.trim()
|
|
56
|
+
.toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
57
|
+
return char.toUpperCase() + str;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function buildAccessors(obj, header) {
|
|
62
|
+
const accessorName = utils.toCamelCase(' ' + header);
|
|
63
|
+
|
|
64
|
+
['get', 'set', 'has'].forEach(methodName => {
|
|
65
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
66
|
+
value: function(arg1, arg2, arg3) {
|
|
67
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
68
|
+
},
|
|
69
|
+
configurable: true
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class AxiosHeaders {
|
|
75
|
+
constructor(headers) {
|
|
76
|
+
headers && this.set(headers);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
set(header, valueOrRewrite, rewrite) {
|
|
80
|
+
const self = this;
|
|
81
|
+
|
|
82
|
+
function setHeader(_value, _header, _rewrite) {
|
|
83
|
+
const lHeader = normalizeHeader(_header);
|
|
84
|
+
|
|
85
|
+
if (!lHeader) {
|
|
86
|
+
throw new Error('header name must be a non-empty string');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const key = utils.findKey(self, lHeader);
|
|
90
|
+
|
|
91
|
+
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
92
|
+
self[key || _header] = normalizeValue(_value);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const setHeaders = (headers, _rewrite) =>
|
|
97
|
+
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
98
|
+
|
|
99
|
+
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
100
|
+
setHeaders(header, valueOrRewrite)
|
|
101
|
+
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
102
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
103
|
+
} else {
|
|
104
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
get(header, parser) {
|
|
111
|
+
header = normalizeHeader(header);
|
|
112
|
+
|
|
113
|
+
if (header) {
|
|
114
|
+
const key = utils.findKey(this, header);
|
|
115
|
+
|
|
116
|
+
if (key) {
|
|
117
|
+
const value = this[key];
|
|
118
|
+
|
|
119
|
+
if (!parser) {
|
|
120
|
+
return value;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (parser === true) {
|
|
124
|
+
return parseTokens(value);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (utils.isFunction(parser)) {
|
|
128
|
+
return parser.call(this, value, key);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (utils.isRegExp(parser)) {
|
|
132
|
+
return parser.exec(value);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
throw new TypeError('parser must be boolean|regexp|function');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
has(header, matcher) {
|
|
141
|
+
header = normalizeHeader(header);
|
|
142
|
+
|
|
143
|
+
if (header) {
|
|
144
|
+
const key = utils.findKey(this, header);
|
|
145
|
+
|
|
146
|
+
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
delete(header, matcher) {
|
|
153
|
+
const self = this;
|
|
154
|
+
let deleted = false;
|
|
155
|
+
|
|
156
|
+
function deleteHeader(_header) {
|
|
157
|
+
_header = normalizeHeader(_header);
|
|
158
|
+
|
|
159
|
+
if (_header) {
|
|
160
|
+
const key = utils.findKey(self, _header);
|
|
161
|
+
|
|
162
|
+
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
163
|
+
delete self[key];
|
|
164
|
+
|
|
165
|
+
deleted = true;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (utils.isArray(header)) {
|
|
171
|
+
header.forEach(deleteHeader);
|
|
172
|
+
} else {
|
|
173
|
+
deleteHeader(header);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return deleted;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
clear(matcher) {
|
|
180
|
+
const keys = Object.keys(this);
|
|
181
|
+
let i = keys.length;
|
|
182
|
+
let deleted = false;
|
|
183
|
+
|
|
184
|
+
while (i--) {
|
|
185
|
+
const key = keys[i];
|
|
186
|
+
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
187
|
+
delete this[key];
|
|
188
|
+
deleted = true;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return deleted;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
normalize(format) {
|
|
196
|
+
const self = this;
|
|
197
|
+
const headers = {};
|
|
198
|
+
|
|
199
|
+
utils.forEach(this, (value, header) => {
|
|
200
|
+
const key = utils.findKey(headers, header);
|
|
201
|
+
|
|
202
|
+
if (key) {
|
|
203
|
+
self[key] = normalizeValue(value);
|
|
204
|
+
delete self[header];
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
209
|
+
|
|
210
|
+
if (normalized !== header) {
|
|
211
|
+
delete self[header];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
self[normalized] = normalizeValue(value);
|
|
215
|
+
|
|
216
|
+
headers[normalized] = true;
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
concat(...targets) {
|
|
223
|
+
return this.constructor.concat(this, ...targets);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
toJSON(asStrings) {
|
|
227
|
+
const obj = Object.create(null);
|
|
228
|
+
|
|
229
|
+
utils.forEach(this, (value, header) => {
|
|
230
|
+
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
return obj;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
[Symbol.iterator]() {
|
|
237
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
toString() {
|
|
241
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
get [Symbol.toStringTag]() {
|
|
245
|
+
return 'AxiosHeaders';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
static from(thing) {
|
|
249
|
+
return thing instanceof this ? thing : new this(thing);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
static concat(first, ...targets) {
|
|
253
|
+
const computed = new this(first);
|
|
254
|
+
|
|
255
|
+
targets.forEach((target) => computed.set(target));
|
|
256
|
+
|
|
257
|
+
return computed;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
static accessor(header) {
|
|
261
|
+
const internals = this[$internals] = (this[$internals] = {
|
|
262
|
+
accessors: {}
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
const accessors = internals.accessors;
|
|
266
|
+
const prototype = this.prototype;
|
|
267
|
+
|
|
268
|
+
function defineAccessor(_header) {
|
|
269
|
+
const lHeader = normalizeHeader(_header);
|
|
270
|
+
|
|
271
|
+
if (!accessors[lHeader]) {
|
|
272
|
+
buildAccessors(prototype, _header);
|
|
273
|
+
accessors[lHeader] = true;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
278
|
+
|
|
279
|
+
return this;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
284
|
+
|
|
285
|
+
utils.freezeMethods(AxiosHeaders.prototype);
|
|
286
|
+
utils.freezeMethods(AxiosHeaders);
|
|
287
|
+
|
|
288
|
+
export default AxiosHeaders;
|