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,54 +1,71 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import utils from './../utils.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
class InterceptorManager {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.handlers = [];
|
|
8
|
+
}
|
|
8
9
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
10
|
+
/**
|
|
11
|
+
* Add a new interceptor to the stack
|
|
12
|
+
*
|
|
13
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
14
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
15
|
+
*
|
|
16
|
+
* @return {Number} An ID used to remove interceptor later
|
|
17
|
+
*/
|
|
18
|
+
use(fulfilled, rejected, options) {
|
|
19
|
+
this.handlers.push({
|
|
20
|
+
fulfilled,
|
|
21
|
+
rejected,
|
|
22
|
+
synchronous: options ? options.synchronous : false,
|
|
23
|
+
runWhen: options ? options.runWhen : null
|
|
24
|
+
});
|
|
25
|
+
return this.handlers.length - 1;
|
|
26
|
+
}
|
|
26
27
|
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Remove an interceptor from the stack
|
|
30
|
+
*
|
|
31
|
+
* @param {Number} id The ID that was returned by `use`
|
|
32
|
+
*
|
|
33
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
34
|
+
*/
|
|
35
|
+
eject(id) {
|
|
36
|
+
if (this.handlers[id]) {
|
|
37
|
+
this.handlers[id] = null;
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
|
-
};
|
|
37
40
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
47
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
48
|
-
if (h !== null) {
|
|
49
|
-
fn(h);
|
|
41
|
+
/**
|
|
42
|
+
* Clear all interceptors from the stack
|
|
43
|
+
*
|
|
44
|
+
* @returns {void}
|
|
45
|
+
*/
|
|
46
|
+
clear() {
|
|
47
|
+
if (this.handlers) {
|
|
48
|
+
this.handlers = [];
|
|
50
49
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Iterate over all the registered interceptors
|
|
54
|
+
*
|
|
55
|
+
* This method is particularly useful for skipping over any
|
|
56
|
+
* interceptors that may have become `null` calling `eject`.
|
|
57
|
+
*
|
|
58
|
+
* @param {Function} fn The function to call for each interceptor
|
|
59
|
+
*
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
62
|
+
forEach(fn) {
|
|
63
|
+
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
64
|
+
if (h !== null) {
|
|
65
|
+
fn(h);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
53
70
|
|
|
54
|
-
|
|
71
|
+
export default InterceptorManager;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import isAbsoluteURL from '../helpers/isAbsoluteURL.js';
|
|
4
|
+
import combineURLs from '../helpers/combineURLs.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
@@ -10,11 +10,12 @@ var combineURLs = require('../helpers/combineURLs');
|
|
|
10
10
|
*
|
|
11
11
|
* @param {string} baseURL The base URL
|
|
12
12
|
* @param {string} requestedURL Absolute or relative URL to combine
|
|
13
|
+
*
|
|
13
14
|
* @returns {string} The combined full path
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
export default function buildFullPath(baseURL, requestedURL) {
|
|
16
17
|
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
17
18
|
return combineURLs(baseURL, requestedURL);
|
|
18
19
|
}
|
|
19
20
|
return requestedURL;
|
|
20
|
-
}
|
|
21
|
+
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import transformData from './transformData.js';
|
|
4
|
+
import isCancel from '../cancel/isCancel.js';
|
|
5
|
+
import defaults from '../defaults/index.js';
|
|
6
|
+
import CanceledError from '../cancel/CanceledError.js';
|
|
7
|
+
import AxiosHeaders from '../core/AxiosHeaders.js';
|
|
8
|
+
import adapters from "../adapters/adapters.js";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
|
-
* Throws a `
|
|
11
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} config The config that is to be used for the request
|
|
14
|
+
*
|
|
15
|
+
* @returns {void}
|
|
11
16
|
*/
|
|
12
17
|
function throwIfCancellationRequested(config) {
|
|
13
18
|
if (config.cancelToken) {
|
|
@@ -15,7 +20,7 @@ function throwIfCancellationRequested(config) {
|
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
if (config.signal && config.signal.aborted) {
|
|
18
|
-
throw new
|
|
23
|
+
throw new CanceledError(null, config);
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
|
|
@@ -23,37 +28,25 @@ function throwIfCancellationRequested(config) {
|
|
|
23
28
|
* Dispatch a request to the server using the configured adapter.
|
|
24
29
|
*
|
|
25
30
|
* @param {object} config The config that is to be used for the request
|
|
31
|
+
*
|
|
26
32
|
* @returns {Promise} The Promise to be fulfilled
|
|
27
33
|
*/
|
|
28
|
-
|
|
34
|
+
export default function dispatchRequest(config) {
|
|
29
35
|
throwIfCancellationRequested(config);
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
config.headers = config.headers || {};
|
|
37
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
33
38
|
|
|
34
39
|
// Transform request data
|
|
35
40
|
config.data = transformData.call(
|
|
36
41
|
config,
|
|
37
|
-
config.data,
|
|
38
|
-
config.headers,
|
|
39
42
|
config.transformRequest
|
|
40
43
|
);
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
config.headers[config.method] || {},
|
|
46
|
-
config.headers
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
utils.forEach(
|
|
50
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
51
|
-
function cleanHeaderConfig(method) {
|
|
52
|
-
delete config.headers[method];
|
|
53
|
-
}
|
|
54
|
-
);
|
|
45
|
+
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
46
|
+
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
47
|
+
}
|
|
55
48
|
|
|
56
|
-
|
|
49
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
|
57
50
|
|
|
58
51
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
59
52
|
throwIfCancellationRequested(config);
|
|
@@ -61,11 +54,12 @@ module.exports = function dispatchRequest(config) {
|
|
|
61
54
|
// Transform response data
|
|
62
55
|
response.data = transformData.call(
|
|
63
56
|
config,
|
|
64
|
-
|
|
65
|
-
response
|
|
66
|
-
config.transformResponse
|
|
57
|
+
config.transformResponse,
|
|
58
|
+
response
|
|
67
59
|
);
|
|
68
60
|
|
|
61
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
62
|
+
|
|
69
63
|
return response;
|
|
70
64
|
}, function onAdapterRejection(reason) {
|
|
71
65
|
if (!isCancel(reason)) {
|
|
@@ -75,13 +69,13 @@ module.exports = function dispatchRequest(config) {
|
|
|
75
69
|
if (reason && reason.response) {
|
|
76
70
|
reason.response.data = transformData.call(
|
|
77
71
|
config,
|
|
78
|
-
|
|
79
|
-
reason.response
|
|
80
|
-
config.transformResponse
|
|
72
|
+
config.transformResponse,
|
|
73
|
+
reason.response
|
|
81
74
|
);
|
|
75
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
82
76
|
}
|
|
83
77
|
}
|
|
84
78
|
|
|
85
79
|
return Promise.reject(reason);
|
|
86
80
|
});
|
|
87
|
-
}
|
|
81
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
import AxiosHeaders from "./AxiosHeaders.js";
|
|
5
|
+
|
|
6
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -8,16 +11,17 @@ var utils = require('../utils');
|
|
|
8
11
|
*
|
|
9
12
|
* @param {Object} config1
|
|
10
13
|
* @param {Object} config2
|
|
14
|
+
*
|
|
11
15
|
* @returns {Object} New object resulting from merging config2 to config1
|
|
12
16
|
*/
|
|
13
|
-
|
|
17
|
+
export default function mergeConfig(config1, config2) {
|
|
14
18
|
// eslint-disable-next-line no-param-reassign
|
|
15
19
|
config2 = config2 || {};
|
|
16
|
-
|
|
20
|
+
const config = {};
|
|
17
21
|
|
|
18
|
-
function getMergedValue(target, source) {
|
|
22
|
+
function getMergedValue(target, source, caseless) {
|
|
19
23
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
20
|
-
return utils.merge(target, source);
|
|
24
|
+
return utils.merge.call({caseless}, target, source);
|
|
21
25
|
} else if (utils.isPlainObject(source)) {
|
|
22
26
|
return utils.merge({}, source);
|
|
23
27
|
} else if (utils.isArray(source)) {
|
|
@@ -27,73 +31,75 @@ module.exports = function mergeConfig(config1, config2) {
|
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
// eslint-disable-next-line consistent-return
|
|
30
|
-
function mergeDeepProperties(
|
|
31
|
-
if (!utils.isUndefined(
|
|
32
|
-
return getMergedValue(
|
|
33
|
-
} else if (!utils.isUndefined(
|
|
34
|
-
return getMergedValue(undefined,
|
|
34
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
35
|
+
if (!utils.isUndefined(b)) {
|
|
36
|
+
return getMergedValue(a, b, caseless);
|
|
37
|
+
} else if (!utils.isUndefined(a)) {
|
|
38
|
+
return getMergedValue(undefined, a, caseless);
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
// eslint-disable-next-line consistent-return
|
|
39
|
-
function valueFromConfig2(
|
|
40
|
-
if (!utils.isUndefined(
|
|
41
|
-
return getMergedValue(undefined,
|
|
43
|
+
function valueFromConfig2(a, b) {
|
|
44
|
+
if (!utils.isUndefined(b)) {
|
|
45
|
+
return getMergedValue(undefined, b);
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
// eslint-disable-next-line consistent-return
|
|
46
|
-
function defaultToConfig2(
|
|
47
|
-
if (!utils.isUndefined(
|
|
48
|
-
return getMergedValue(undefined,
|
|
49
|
-
} else if (!utils.isUndefined(
|
|
50
|
-
return getMergedValue(undefined,
|
|
50
|
+
function defaultToConfig2(a, b) {
|
|
51
|
+
if (!utils.isUndefined(b)) {
|
|
52
|
+
return getMergedValue(undefined, b);
|
|
53
|
+
} else if (!utils.isUndefined(a)) {
|
|
54
|
+
return getMergedValue(undefined, a);
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
// eslint-disable-next-line consistent-return
|
|
55
|
-
function mergeDirectKeys(prop) {
|
|
59
|
+
function mergeDirectKeys(a, b, prop) {
|
|
56
60
|
if (prop in config2) {
|
|
57
|
-
return getMergedValue(
|
|
61
|
+
return getMergedValue(a, b);
|
|
58
62
|
} else if (prop in config1) {
|
|
59
|
-
return getMergedValue(undefined,
|
|
63
|
+
return getMergedValue(undefined, a);
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
67
|
+
const mergeMap = {
|
|
68
|
+
url: valueFromConfig2,
|
|
69
|
+
method: valueFromConfig2,
|
|
70
|
+
data: valueFromConfig2,
|
|
71
|
+
baseURL: defaultToConfig2,
|
|
72
|
+
transformRequest: defaultToConfig2,
|
|
73
|
+
transformResponse: defaultToConfig2,
|
|
74
|
+
paramsSerializer: defaultToConfig2,
|
|
75
|
+
timeout: defaultToConfig2,
|
|
76
|
+
timeoutMessage: defaultToConfig2,
|
|
77
|
+
withCredentials: defaultToConfig2,
|
|
78
|
+
adapter: defaultToConfig2,
|
|
79
|
+
responseType: defaultToConfig2,
|
|
80
|
+
xsrfCookieName: defaultToConfig2,
|
|
81
|
+
xsrfHeaderName: defaultToConfig2,
|
|
82
|
+
onUploadProgress: defaultToConfig2,
|
|
83
|
+
onDownloadProgress: defaultToConfig2,
|
|
84
|
+
decompress: defaultToConfig2,
|
|
85
|
+
maxContentLength: defaultToConfig2,
|
|
86
|
+
maxBodyLength: defaultToConfig2,
|
|
87
|
+
beforeRedirect: defaultToConfig2,
|
|
88
|
+
transport: defaultToConfig2,
|
|
89
|
+
httpAgent: defaultToConfig2,
|
|
90
|
+
httpsAgent: defaultToConfig2,
|
|
91
|
+
cancelToken: defaultToConfig2,
|
|
92
|
+
socketPath: defaultToConfig2,
|
|
93
|
+
responseEncoding: defaultToConfig2,
|
|
94
|
+
validateStatus: mergeDirectKeys,
|
|
95
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
90
96
|
};
|
|
91
97
|
|
|
92
|
-
utils.forEach(Object.keys(
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
99
|
+
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
100
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
95
101
|
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
96
102
|
});
|
|
97
103
|
|
|
98
104
|
return config;
|
|
99
|
-
}
|
|
105
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import AxiosError from './AxiosError.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Resolve or reject a Promise based on response status.
|
|
@@ -8,18 +8,20 @@ var createError = require('./createError');
|
|
|
8
8
|
* @param {Function} resolve A function that resolves the promise.
|
|
9
9
|
* @param {Function} reject A function that rejects the promise.
|
|
10
10
|
* @param {object} response The response.
|
|
11
|
+
*
|
|
12
|
+
* @returns {object} The response.
|
|
11
13
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
export default function settle(resolve, reject, response) {
|
|
15
|
+
const validateStatus = response.config.validateStatus;
|
|
14
16
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
15
17
|
resolve(response);
|
|
16
18
|
} else {
|
|
17
|
-
reject(
|
|
19
|
+
reject(new AxiosError(
|
|
18
20
|
'Request failed with status code ' + response.status,
|
|
21
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
19
22
|
response.config,
|
|
20
|
-
null,
|
|
21
23
|
response.request,
|
|
22
24
|
response
|
|
23
25
|
));
|
|
24
26
|
}
|
|
25
|
-
}
|
|
27
|
+
}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import utils from './../utils.js';
|
|
4
|
+
import defaults from '../defaults/index.js';
|
|
5
|
+
import AxiosHeaders from '../core/AxiosHeaders.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Transform the data for a request or a response
|
|
8
9
|
*
|
|
9
|
-
* @param {Object|String} data The data to be transformed
|
|
10
|
-
* @param {Array} headers The headers for the request or response
|
|
11
10
|
* @param {Array|Function} fns A single function or Array of functions
|
|
11
|
+
* @param {?Object} response The response object
|
|
12
|
+
*
|
|
12
13
|
* @returns {*} The resulting transformed data
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
export default function transformData(fns, response) {
|
|
16
|
+
const config = this || defaults;
|
|
17
|
+
const context = response || config;
|
|
18
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
19
|
+
let data = context.data;
|
|
20
|
+
|
|
17
21
|
utils.forEach(fns, function transform(fn) {
|
|
18
|
-
data = fn.call(
|
|
22
|
+
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
19
23
|
});
|
|
20
24
|
|
|
25
|
+
headers.normalize();
|
|
26
|
+
|
|
21
27
|
return data;
|
|
22
|
-
}
|
|
28
|
+
}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
import AxiosError from '../core/AxiosError.js';
|
|
5
|
+
import transitionalDefaults from './transitional.js';
|
|
6
|
+
import toFormData from '../helpers/toFormData.js';
|
|
7
|
+
import toURLEncodedForm from '../helpers/toURLEncodedForm.js';
|
|
8
|
+
import platform from '../platform/index.js';
|
|
9
|
+
import formDataToJSON from '../helpers/formDataToJSON.js';
|
|
10
|
+
|
|
11
|
+
const DEFAULT_CONTENT_TYPE = {
|
|
12
|
+
'Content-Type': undefined
|
|
10
13
|
};
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
adapter = require('../adapters/xhr');
|
|
23
|
-
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
|
24
|
-
// For node use HTTP adapter
|
|
25
|
-
adapter = require('../adapters/http');
|
|
26
|
-
}
|
|
27
|
-
return adapter;
|
|
28
|
-
}
|
|
29
|
-
|
|
15
|
+
/**
|
|
16
|
+
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
17
|
+
* of the input
|
|
18
|
+
*
|
|
19
|
+
* @param {any} rawValue - The value to be stringified.
|
|
20
|
+
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
21
|
+
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
22
|
+
*
|
|
23
|
+
* @returns {string} A stringified version of the rawValue.
|
|
24
|
+
*/
|
|
30
25
|
function stringifySafely(rawValue, parser, encoder) {
|
|
31
26
|
if (utils.isString(rawValue)) {
|
|
32
27
|
try {
|
|
@@ -42,18 +37,31 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
42
37
|
return (encoder || JSON.stringify)(rawValue);
|
|
43
38
|
}
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
const defaults = {
|
|
46
41
|
|
|
47
42
|
transitional: transitionalDefaults,
|
|
48
43
|
|
|
49
|
-
adapter:
|
|
44
|
+
adapter: ['xhr', 'http'],
|
|
50
45
|
|
|
51
46
|
transformRequest: [function transformRequest(data, headers) {
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
const contentType = headers.getContentType() || '';
|
|
48
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
49
|
+
const isObjectPayload = utils.isObject(data);
|
|
50
|
+
|
|
51
|
+
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
52
|
+
data = new FormData(data);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const isFormData = utils.isFormData(data);
|
|
56
|
+
|
|
57
|
+
if (isFormData) {
|
|
58
|
+
if (!hasJSONContentType) {
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
61
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
62
|
+
}
|
|
54
63
|
|
|
55
|
-
if (utils.
|
|
56
|
-
utils.isArrayBuffer(data) ||
|
|
64
|
+
if (utils.isArrayBuffer(data) ||
|
|
57
65
|
utils.isBuffer(data) ||
|
|
58
66
|
utils.isStream(data) ||
|
|
59
67
|
utils.isFile(data) ||
|
|
@@ -65,29 +73,51 @@ var defaults = {
|
|
|
65
73
|
return data.buffer;
|
|
66
74
|
}
|
|
67
75
|
if (utils.isURLSearchParams(data)) {
|
|
68
|
-
|
|
76
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
69
77
|
return data.toString();
|
|
70
78
|
}
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
|
|
80
|
+
let isFileList;
|
|
81
|
+
|
|
82
|
+
if (isObjectPayload) {
|
|
83
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
84
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
88
|
+
const _FormData = this.env && this.env.FormData;
|
|
89
|
+
|
|
90
|
+
return toFormData(
|
|
91
|
+
isFileList ? {'files[]': data} : data,
|
|
92
|
+
_FormData && new _FormData(),
|
|
93
|
+
this.formSerializer
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (isObjectPayload || hasJSONContentType ) {
|
|
99
|
+
headers.setContentType('application/json', false);
|
|
73
100
|
return stringifySafely(data);
|
|
74
101
|
}
|
|
102
|
+
|
|
75
103
|
return data;
|
|
76
104
|
}],
|
|
77
105
|
|
|
78
106
|
transformResponse: [function transformResponse(data) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
107
|
+
const transitional = this.transitional || defaults.transitional;
|
|
108
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
109
|
+
const JSONRequested = this.responseType === 'json';
|
|
110
|
+
|
|
111
|
+
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
112
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
113
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
83
114
|
|
|
84
|
-
if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
|
|
85
115
|
try {
|
|
86
116
|
return JSON.parse(data);
|
|
87
117
|
} catch (e) {
|
|
88
118
|
if (strictJSONParsing) {
|
|
89
119
|
if (e.name === 'SyntaxError') {
|
|
90
|
-
throw
|
|
120
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
91
121
|
}
|
|
92
122
|
throw e;
|
|
93
123
|
}
|
|
@@ -109,6 +139,11 @@ var defaults = {
|
|
|
109
139
|
maxContentLength: -1,
|
|
110
140
|
maxBodyLength: -1,
|
|
111
141
|
|
|
142
|
+
env: {
|
|
143
|
+
FormData: platform.classes.FormData,
|
|
144
|
+
Blob: platform.classes.Blob
|
|
145
|
+
},
|
|
146
|
+
|
|
112
147
|
validateStatus: function validateStatus(status) {
|
|
113
148
|
return status >= 200 && status < 300;
|
|
114
149
|
},
|
|
@@ -128,4 +163,4 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
128
163
|
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
|
129
164
|
});
|
|
130
165
|
|
|
131
|
-
|
|
166
|
+
export default defaults;
|