ahmad-module 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ahmad-module might be problematic. Click here for more details.
- package/.bin/sshpk-conv +12 -0
- package/.bin/sshpk-conv.cmd +17 -0
- package/.bin/sshpk-conv.ps1 +28 -0
- package/.bin/sshpk-sign +12 -0
- package/.bin/sshpk-sign.cmd +17 -0
- package/.bin/sshpk-sign.ps1 +28 -0
- package/.bin/sshpk-verify +12 -0
- package/.bin/sshpk-verify.cmd +17 -0
- package/.bin/sshpk-verify.ps1 +28 -0
- package/.bin/uuid +12 -0
- package/.bin/uuid.cmd +17 -0
- package/.bin/uuid.ps1 +28 -0
- package/ajv/.tonic_example.js +20 -0
- package/ajv/LICENSE +22 -0
- package/ajv/README.md +1497 -0
- package/ajv/dist/ajv.bundle.js +7189 -0
- package/ajv/dist/ajv.min.js +3 -0
- package/ajv/dist/ajv.min.js.map +1 -0
- package/ajv/lib/ajv.d.ts +397 -0
- package/ajv/lib/ajv.js +506 -0
- package/ajv/lib/cache.js +26 -0
- package/ajv/lib/compile/async.js +90 -0
- package/ajv/lib/compile/equal.js +5 -0
- package/ajv/lib/compile/error_classes.js +34 -0
- package/ajv/lib/compile/formats.js +142 -0
- package/ajv/lib/compile/index.js +387 -0
- package/ajv/lib/compile/resolve.js +270 -0
- package/ajv/lib/compile/rules.js +66 -0
- package/ajv/lib/compile/schema_obj.js +9 -0
- package/ajv/lib/compile/ucs2length.js +20 -0
- package/ajv/lib/compile/util.js +239 -0
- package/ajv/lib/data.js +49 -0
- package/ajv/lib/definition_schema.js +37 -0
- package/ajv/lib/dot/_limit.jst +113 -0
- package/ajv/lib/dot/_limitItems.jst +12 -0
- package/ajv/lib/dot/_limitLength.jst +12 -0
- package/ajv/lib/dot/_limitProperties.jst +12 -0
- package/ajv/lib/dot/allOf.jst +32 -0
- package/ajv/lib/dot/anyOf.jst +46 -0
- package/ajv/lib/dot/coerce.def +51 -0
- package/ajv/lib/dot/comment.jst +9 -0
- package/ajv/lib/dot/const.jst +11 -0
- package/ajv/lib/dot/contains.jst +55 -0
- package/ajv/lib/dot/custom.jst +191 -0
- package/ajv/lib/dot/defaults.def +47 -0
- package/ajv/lib/dot/definitions.def +203 -0
- package/ajv/lib/dot/dependencies.jst +79 -0
- package/ajv/lib/dot/enum.jst +30 -0
- package/ajv/lib/dot/errors.def +194 -0
- package/ajv/lib/dot/format.jst +106 -0
- package/ajv/lib/dot/if.jst +73 -0
- package/ajv/lib/dot/items.jst +98 -0
- package/ajv/lib/dot/missing.def +39 -0
- package/ajv/lib/dot/multipleOf.jst +22 -0
- package/ajv/lib/dot/not.jst +43 -0
- package/ajv/lib/dot/oneOf.jst +54 -0
- package/ajv/lib/dot/pattern.jst +14 -0
- package/ajv/lib/dot/properties.jst +245 -0
- package/ajv/lib/dot/propertyNames.jst +52 -0
- package/ajv/lib/dot/ref.jst +85 -0
- package/ajv/lib/dot/required.jst +108 -0
- package/ajv/lib/dot/uniqueItems.jst +62 -0
- package/ajv/lib/dot/validate.jst +276 -0
- package/ajv/lib/dotjs/README.md +3 -0
- package/ajv/lib/dotjs/_limit.js +163 -0
- package/ajv/lib/dotjs/_limitItems.js +80 -0
- package/ajv/lib/dotjs/_limitLength.js +85 -0
- package/ajv/lib/dotjs/_limitProperties.js +80 -0
- package/ajv/lib/dotjs/allOf.js +42 -0
- package/ajv/lib/dotjs/anyOf.js +73 -0
- package/ajv/lib/dotjs/comment.js +14 -0
- package/ajv/lib/dotjs/const.js +56 -0
- package/ajv/lib/dotjs/contains.js +81 -0
- package/ajv/lib/dotjs/custom.js +228 -0
- package/ajv/lib/dotjs/dependencies.js +168 -0
- package/ajv/lib/dotjs/enum.js +66 -0
- package/ajv/lib/dotjs/format.js +150 -0
- package/ajv/lib/dotjs/if.js +103 -0
- package/ajv/lib/dotjs/index.js +33 -0
- package/ajv/lib/dotjs/items.js +140 -0
- package/ajv/lib/dotjs/multipleOf.js +80 -0
- package/ajv/lib/dotjs/not.js +84 -0
- package/ajv/lib/dotjs/oneOf.js +73 -0
- package/ajv/lib/dotjs/pattern.js +75 -0
- package/ajv/lib/dotjs/properties.js +335 -0
- package/ajv/lib/dotjs/propertyNames.js +81 -0
- package/ajv/lib/dotjs/ref.js +124 -0
- package/ajv/lib/dotjs/required.js +270 -0
- package/ajv/lib/dotjs/uniqueItems.js +86 -0
- package/ajv/lib/dotjs/validate.js +482 -0
- package/ajv/lib/keyword.js +146 -0
- package/ajv/lib/refs/data.json +17 -0
- package/ajv/lib/refs/json-schema-draft-04.json +149 -0
- package/ajv/lib/refs/json-schema-draft-06.json +154 -0
- package/ajv/lib/refs/json-schema-draft-07.json +168 -0
- package/ajv/lib/refs/json-schema-secure.json +94 -0
- package/ajv/package.json +106 -0
- package/ajv/scripts/.eslintrc.yml +3 -0
- package/ajv/scripts/bundle.js +61 -0
- package/ajv/scripts/compile-dots.js +73 -0
- package/ajv/scripts/info +10 -0
- package/ajv/scripts/prepare-tests +12 -0
- package/ajv/scripts/publish-built-version +32 -0
- package/ajv/scripts/travis-gh-pages +23 -0
- package/asn1/Jenkinsfile +65 -0
- package/asn1/LICENSE +19 -0
- package/asn1/README.md +50 -0
- package/asn1/lib/ber/errors.js +13 -0
- package/asn1/lib/ber/index.js +27 -0
- package/asn1/lib/ber/reader.js +262 -0
- package/asn1/lib/ber/types.js +36 -0
- package/asn1/lib/ber/writer.js +317 -0
- package/asn1/lib/index.js +20 -0
- package/asn1/package.json +31 -0
- package/assert-plus/AUTHORS +6 -0
- package/assert-plus/CHANGES.md +14 -0
- package/assert-plus/README.md +162 -0
- package/assert-plus/assert.js +211 -0
- package/assert-plus/package.json +23 -0
- package/asynckit/LICENSE +21 -0
- package/asynckit/README.md +233 -0
- package/asynckit/bench.js +76 -0
- package/asynckit/index.js +6 -0
- package/asynckit/lib/abort.js +29 -0
- package/asynckit/lib/async.js +34 -0
- package/asynckit/lib/defer.js +26 -0
- package/asynckit/lib/iterate.js +75 -0
- package/asynckit/lib/readable_asynckit.js +91 -0
- package/asynckit/lib/readable_parallel.js +25 -0
- package/asynckit/lib/readable_serial.js +25 -0
- package/asynckit/lib/readable_serial_ordered.js +29 -0
- package/asynckit/lib/state.js +37 -0
- package/asynckit/lib/streamify.js +141 -0
- package/asynckit/lib/terminator.js +29 -0
- package/asynckit/package.json +63 -0
- package/asynckit/parallel.js +43 -0
- package/asynckit/serial.js +17 -0
- package/asynckit/serialOrdered.js +75 -0
- package/asynckit/stream.js +21 -0
- package/aws-sign2/LICENSE +55 -0
- package/aws-sign2/README.md +4 -0
- package/aws-sign2/index.js +212 -0
- package/aws-sign2/package.json +17 -0
- package/aws4/.github/FUNDING.yml +3 -0
- package/aws4/.travis.yml +9 -0
- package/aws4/LICENSE +19 -0
- package/aws4/README.md +183 -0
- package/aws4/aws4.js +373 -0
- package/aws4/lru.js +96 -0
- package/aws4/package.json +17 -0
- package/axios/CHANGELOG.md +775 -0
- package/axios/LICENSE +19 -0
- package/axios/README.md +868 -0
- package/axios/SECURITY.md +5 -0
- package/axios/UPGRADE_GUIDE.md +162 -0
- package/axios/dist/axios.js +2193 -0
- package/axios/dist/axios.map +1 -0
- package/axios/dist/axios.min.js +3 -0
- package/axios/dist/axios.min.map +1 -0
- package/axios/index.d.ts +168 -0
- package/axios/index.js +1 -0
- package/axios/lib/adapters/README.md +37 -0
- package/axios/lib/adapters/http.js +331 -0
- package/axios/lib/adapters/xhr.js +189 -0
- package/axios/lib/axios.js +56 -0
- package/axios/lib/cancel/Cancel.js +19 -0
- package/axios/lib/cancel/CancelToken.js +57 -0
- package/axios/lib/cancel/isCancel.js +5 -0
- package/axios/lib/core/Axios.js +148 -0
- package/axios/lib/core/InterceptorManager.js +54 -0
- package/axios/lib/core/README.md +8 -0
- package/axios/lib/core/buildFullPath.js +20 -0
- package/axios/lib/core/createError.js +18 -0
- package/axios/lib/core/dispatchRequest.js +82 -0
- package/axios/lib/core/enhanceError.js +42 -0
- package/axios/lib/core/mergeConfig.js +87 -0
- package/axios/lib/core/settle.js +25 -0
- package/axios/lib/core/transformData.js +22 -0
- package/axios/lib/defaults.js +134 -0
- package/axios/lib/helpers/README.md +7 -0
- package/axios/lib/helpers/bind.js +11 -0
- package/axios/lib/helpers/buildURL.js +70 -0
- package/axios/lib/helpers/combineURLs.js +14 -0
- package/axios/lib/helpers/cookies.js +53 -0
- package/axios/lib/helpers/deprecatedMethod.js +24 -0
- package/axios/lib/helpers/isAbsoluteURL.js +14 -0
- package/axios/lib/helpers/isAxiosError.js +11 -0
- package/axios/lib/helpers/isURLSameOrigin.js +68 -0
- package/axios/lib/helpers/normalizeHeaderName.js +12 -0
- package/axios/lib/helpers/parseHeaders.js +53 -0
- package/axios/lib/helpers/spread.js +27 -0
- package/axios/lib/helpers/validator.js +105 -0
- package/axios/lib/utils.js +349 -0
- package/axios/package.json +84 -0
- package/bcrypt-pbkdf/CONTRIBUTING.md +13 -0
- package/bcrypt-pbkdf/LICENSE +66 -0
- package/bcrypt-pbkdf/README.md +45 -0
- package/bcrypt-pbkdf/index.js +556 -0
- package/bcrypt-pbkdf/package.json +15 -0
- package/caseless/LICENSE +28 -0
- package/caseless/README.md +45 -0
- package/caseless/index.js +67 -0
- package/caseless/package.json +27 -0
- package/caseless/test.js +67 -0
- package/combined-stream/License +19 -0
- package/combined-stream/Readme.md +138 -0
- package/combined-stream/lib/combined_stream.js +208 -0
- package/combined-stream/package.json +25 -0
- package/combined-stream/yarn.lock +17 -0
- package/core-util-is/LICENSE +19 -0
- package/core-util-is/README.md +3 -0
- package/core-util-is/float.patch +604 -0
- package/core-util-is/lib/util.js +107 -0
- package/core-util-is/package.json +32 -0
- package/core-util-is/test.js +68 -0
- package/dashdash/CHANGES.md +364 -0
- package/dashdash/LICENSE.txt +24 -0
- package/dashdash/README.md +574 -0
- package/dashdash/etc/dashdash.bash_completion.in +389 -0
- package/dashdash/lib/dashdash.js +1055 -0
- package/dashdash/package.json +26 -0
- package/delayed-stream/License +19 -0
- package/delayed-stream/Makefile +7 -0
- package/delayed-stream/Readme.md +141 -0
- package/delayed-stream/lib/delayed_stream.js +107 -0
- package/delayed-stream/package.json +27 -0
- package/ecc-jsbn/LICENSE +21 -0
- package/ecc-jsbn/README.md +8 -0
- package/ecc-jsbn/index.js +58 -0
- package/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- package/ecc-jsbn/lib/ec.js +561 -0
- package/ecc-jsbn/lib/sec.js +170 -0
- package/ecc-jsbn/package.json +40 -0
- package/ecc-jsbn/test.js +14 -0
- package/extend/.editorconfig +20 -0
- package/extend/.eslintrc +17 -0
- package/extend/.jscs.json +175 -0
- package/extend/.travis.yml +230 -0
- package/extend/CHANGELOG.md +83 -0
- package/extend/LICENSE +23 -0
- package/extend/README.md +81 -0
- package/extend/component.json +32 -0
- package/extend/index.js +117 -0
- package/extend/package.json +42 -0
- package/extsprintf/.gitmodules +0 -0
- package/extsprintf/LICENSE +19 -0
- package/extsprintf/Makefile +24 -0
- package/extsprintf/Makefile.targ +285 -0
- package/extsprintf/README.md +46 -0
- package/extsprintf/jsl.node.conf +137 -0
- package/extsprintf/lib/extsprintf.js +183 -0
- package/extsprintf/package.json +14 -0
- package/fast-deep-equal/LICENSE +21 -0
- package/fast-deep-equal/README.md +96 -0
- package/fast-deep-equal/es6/index.d.ts +2 -0
- package/fast-deep-equal/es6/index.js +72 -0
- package/fast-deep-equal/es6/react.d.ts +2 -0
- package/fast-deep-equal/es6/react.js +79 -0
- package/fast-deep-equal/index.d.ts +4 -0
- package/fast-deep-equal/index.js +46 -0
- package/fast-deep-equal/package.json +61 -0
- package/fast-deep-equal/react.d.ts +2 -0
- package/fast-deep-equal/react.js +53 -0
- package/fast-json-stable-stringify/.eslintrc.yml +26 -0
- package/fast-json-stable-stringify/.github/FUNDING.yml +1 -0
- package/fast-json-stable-stringify/.travis.yml +8 -0
- package/fast-json-stable-stringify/LICENSE +21 -0
- package/fast-json-stable-stringify/README.md +131 -0
- package/fast-json-stable-stringify/benchmark/index.js +31 -0
- package/fast-json-stable-stringify/benchmark/test.json +137 -0
- package/fast-json-stable-stringify/example/key_cmp.js +7 -0
- package/fast-json-stable-stringify/example/nested.js +3 -0
- package/fast-json-stable-stringify/example/str.js +3 -0
- package/fast-json-stable-stringify/example/value_cmp.js +7 -0
- package/fast-json-stable-stringify/index.d.ts +4 -0
- package/fast-json-stable-stringify/index.js +59 -0
- package/fast-json-stable-stringify/package.json +52 -0
- package/fast-json-stable-stringify/test/cmp.js +13 -0
- package/fast-json-stable-stringify/test/nested.js +44 -0
- package/fast-json-stable-stringify/test/str.js +46 -0
- package/fast-json-stable-stringify/test/to-json.js +22 -0
- package/follow-redirects/LICENSE +18 -0
- package/follow-redirects/README.md +155 -0
- package/follow-redirects/debug.js +15 -0
- package/follow-redirects/http.js +1 -0
- package/follow-redirects/https.js +1 -0
- package/follow-redirects/index.js +598 -0
- package/follow-redirects/package.json +59 -0
- package/forever-agent/LICENSE +55 -0
- package/forever-agent/README.md +4 -0
- package/forever-agent/index.js +138 -0
- package/forever-agent/package.json +17 -0
- package/form-data/License +19 -0
- package/form-data/README.md +234 -0
- package/form-data/README.md.bak +234 -0
- package/form-data/lib/browser.js +2 -0
- package/form-data/lib/form_data.js +457 -0
- package/form-data/lib/populate.js +10 -0
- package/form-data/package.json +65 -0
- package/form-data/yarn.lock +2662 -0
- package/getpass/.travis.yml +9 -0
- package/getpass/LICENSE +18 -0
- package/getpass/README.md +32 -0
- package/getpass/lib/index.js +123 -0
- package/getpass/package.json +18 -0
- package/har-schema/LICENSE +13 -0
- package/har-schema/README.md +49 -0
- package/har-schema/lib/afterRequest.json +30 -0
- package/har-schema/lib/beforeRequest.json +30 -0
- package/har-schema/lib/browser.json +20 -0
- package/har-schema/lib/cache.json +21 -0
- package/har-schema/lib/content.json +29 -0
- package/har-schema/lib/cookie.json +36 -0
- package/har-schema/lib/creator.json +20 -0
- package/har-schema/lib/entry.json +53 -0
- package/har-schema/lib/har.json +13 -0
- package/har-schema/lib/header.json +20 -0
- package/har-schema/lib/index.js +22 -0
- package/har-schema/lib/log.json +36 -0
- package/har-schema/lib/page.json +32 -0
- package/har-schema/lib/pageTimings.json +18 -0
- package/har-schema/lib/postData.json +43 -0
- package/har-schema/lib/query.json +20 -0
- package/har-schema/lib/request.json +57 -0
- package/har-schema/lib/response.json +54 -0
- package/har-schema/lib/timings.json +42 -0
- package/har-schema/package.json +54 -0
- package/har-validator/LICENSE +9 -0
- package/har-validator/README.md +43 -0
- package/har-validator/lib/async.js +105 -0
- package/har-validator/lib/error.js +17 -0
- package/har-validator/lib/promise.js +102 -0
- package/har-validator/package.json +43 -0
- package/http-signature/.dir-locals.el +6 -0
- package/http-signature/CHANGES.md +46 -0
- package/http-signature/LICENSE +18 -0
- package/http-signature/README.md +79 -0
- package/http-signature/http_signing.md +363 -0
- package/http-signature/lib/index.js +29 -0
- package/http-signature/lib/parser.js +315 -0
- package/http-signature/lib/signer.js +401 -0
- package/http-signature/lib/utils.js +112 -0
- package/http-signature/lib/verify.js +88 -0
- package/http-signature/package.json +39 -0
- package/is-typedarray/LICENSE.md +18 -0
- package/is-typedarray/README.md +16 -0
- package/is-typedarray/index.js +41 -0
- package/is-typedarray/package.json +30 -0
- package/is-typedarray/test.js +34 -0
- package/isstream/.jshintrc +59 -0
- package/isstream/.travis.yml +12 -0
- package/isstream/LICENSE.md +11 -0
- package/isstream/README.md +66 -0
- package/isstream/isstream.js +27 -0
- package/isstream/package.json +33 -0
- package/isstream/test.js +168 -0
- package/jsbn/LICENSE +40 -0
- package/jsbn/README.md +175 -0
- package/jsbn/example.html +12 -0
- package/jsbn/example.js +3 -0
- package/jsbn/index.js +1357 -0
- package/jsbn/package.json +21 -0
- package/json-schema/LICENSE +195 -0
- package/json-schema/README.md +3 -0
- package/json-schema/lib/links.js +65 -0
- package/json-schema/lib/validate.js +271 -0
- package/json-schema/package.json +24 -0
- package/json-schema-traverse/.eslintrc.yml +27 -0
- package/json-schema-traverse/.travis.yml +8 -0
- package/json-schema-traverse/LICENSE +21 -0
- package/json-schema-traverse/README.md +83 -0
- package/json-schema-traverse/index.js +89 -0
- package/json-schema-traverse/package.json +43 -0
- package/json-schema-traverse/spec/.eslintrc.yml +6 -0
- package/json-schema-traverse/spec/fixtures/schema.js +125 -0
- package/json-schema-traverse/spec/index.spec.js +171 -0
- package/json-stringify-safe/CHANGELOG.md +14 -0
- package/json-stringify-safe/LICENSE +15 -0
- package/json-stringify-safe/Makefile +35 -0
- package/json-stringify-safe/README.md +52 -0
- package/json-stringify-safe/package.json +31 -0
- package/json-stringify-safe/stringify.js +27 -0
- package/json-stringify-safe/test/mocha.opts +2 -0
- package/json-stringify-safe/test/stringify_test.js +246 -0
- package/jsprim/CHANGES.md +53 -0
- package/jsprim/CONTRIBUTING.md +19 -0
- package/jsprim/LICENSE +19 -0
- package/jsprim/README.md +287 -0
- package/jsprim/lib/jsprim.js +735 -0
- package/jsprim/package.json +20 -0
- package/m3u8stream/LICENSE +21 -0
- package/m3u8stream/README.md +81 -0
- package/m3u8stream/dist/dash-mpd-parser.d.ts +11 -0
- package/m3u8stream/dist/dash-mpd-parser.js +183 -0
- package/m3u8stream/dist/dash-mpd-parser.js.map +1 -0
- package/m3u8stream/dist/index.d.ts +31 -0
- package/m3u8stream/dist/index.js +180 -0
- package/m3u8stream/dist/index.js.map +1 -0
- package/m3u8stream/dist/m3u8-parser.d.ts +18 -0
- package/m3u8stream/dist/m3u8-parser.js +111 -0
- package/m3u8stream/dist/m3u8-parser.js.map +1 -0
- package/m3u8stream/dist/parse-time.d.ts +16 -0
- package/m3u8stream/dist/parse-time.js +59 -0
- package/m3u8stream/dist/parse-time.js.map +1 -0
- package/m3u8stream/dist/parser.d.ts +19 -0
- package/m3u8stream/dist/parser.js +3 -0
- package/m3u8stream/dist/parser.js.map +1 -0
- package/m3u8stream/dist/queue.d.ts +39 -0
- package/m3u8stream/dist/queue.js +58 -0
- package/m3u8stream/dist/queue.js.map +1 -0
- package/m3u8stream/node_modules/sax/LICENSE +41 -0
- package/m3u8stream/node_modules/sax/README.md +225 -0
- package/m3u8stream/node_modules/sax/lib/sax.js +1565 -0
- package/m3u8stream/node_modules/sax/package.json +25 -0
- package/m3u8stream/package.json +54 -0
- package/mime-db/HISTORY.md +507 -0
- package/mime-db/LICENSE +23 -0
- package/mime-db/README.md +100 -0
- package/mime-db/db.json +8519 -0
- package/mime-db/index.js +12 -0
- package/mime-db/package.json +60 -0
- package/mime-types/HISTORY.md +397 -0
- package/mime-types/LICENSE +23 -0
- package/mime-types/README.md +113 -0
- package/mime-types/index.js +188 -0
- package/mime-types/package.json +44 -0
- package/miniget/LICENSE +21 -0
- package/miniget/README.md +111 -0
- package/miniget/dist/index.d.ts +65 -0
- package/miniget/dist/index.js +281 -0
- package/miniget/dist/index.js.map +1 -0
- package/miniget/package.json +49 -0
- package/oauth-sign/LICENSE +55 -0
- package/oauth-sign/README.md +11 -0
- package/oauth-sign/index.js +146 -0
- package/oauth-sign/package.json +23 -0
- package/package.json +11 -0
- package/performance-now/.tm_properties +7 -0
- package/performance-now/.travis.yml +6 -0
- package/performance-now/README.md +30 -0
- package/performance-now/lib/performance-now.js +36 -0
- package/performance-now/lib/performance-now.js.map +10 -0
- package/performance-now/license.txt +7 -0
- package/performance-now/package.json +35 -0
- package/performance-now/src/index.d.ts +8 -0
- package/performance-now/src/performance-now.coffee +17 -0
- package/performance-now/test/mocha.opts +3 -0
- package/performance-now/test/performance-now.coffee +43 -0
- package/performance-now/test/scripts/delayed-call.coffee +11 -0
- package/performance-now/test/scripts/delayed-require.coffee +12 -0
- package/performance-now/test/scripts/difference.coffee +6 -0
- package/performance-now/test/scripts/initial-value.coffee +10 -0
- package/performance-now/test/scripts.coffee +27 -0
- package/psl/.env +0 -0
- package/psl/LICENSE +9 -0
- package/psl/README.md +211 -0
- package/psl/browserstack-logo.svg +90 -0
- package/psl/data/rules.json +9376 -0
- package/psl/dist/psl.js +10187 -0
- package/psl/dist/psl.min.js +1 -0
- package/psl/index.js +269 -0
- package/psl/package.json +43 -0
- package/punycode/LICENSE-MIT.txt +20 -0
- package/punycode/README.md +122 -0
- package/punycode/package.json +58 -0
- package/punycode/punycode.es6.js +441 -0
- package/punycode/punycode.js +440 -0
- package/qs/.editorconfig +43 -0
- package/qs/.eslintrc +37 -0
- package/qs/.github/FUNDING.yml +12 -0
- package/qs/.nycrc +13 -0
- package/qs/CHANGELOG.md +250 -0
- package/qs/LICENSE.md +29 -0
- package/qs/README.md +510 -0
- package/qs/bower.json +21 -0
- package/qs/component.json +15 -0
- package/qs/dist/qs.js +648 -0
- package/qs/lib/formats.js +18 -0
- package/qs/lib/index.js +11 -0
- package/qs/lib/parse.js +175 -0
- package/qs/lib/stringify.js +217 -0
- package/qs/lib/utils.js +215 -0
- package/qs/package.json +54 -0
- package/qs/test/index.js +7 -0
- package/qs/test/parse.js +649 -0
- package/qs/test/stringify.js +642 -0
- package/qs/test/utils.js +65 -0
- package/request/CHANGELOG.md +717 -0
- package/request/LICENSE +55 -0
- package/request/README.md +1133 -0
- package/request/index.js +155 -0
- package/request/lib/auth.js +167 -0
- package/request/lib/cookies.js +38 -0
- package/request/lib/getProxyFromURI.js +79 -0
- package/request/lib/har.js +205 -0
- package/request/lib/hawk.js +89 -0
- package/request/lib/helpers.js +66 -0
- package/request/lib/multipart.js +112 -0
- package/request/lib/oauth.js +148 -0
- package/request/lib/querystring.js +50 -0
- package/request/lib/redirect.js +154 -0
- package/request/lib/tunnel.js +175 -0
- package/request/package.json +86 -0
- package/request/request.js +1553 -0
- package/safe-buffer/LICENSE +21 -0
- package/safe-buffer/README.md +584 -0
- package/safe-buffer/index.d.ts +187 -0
- package/safe-buffer/index.js +65 -0
- package/safe-buffer/package.json +51 -0
- package/safer-buffer/LICENSE +21 -0
- package/safer-buffer/Porting-Buffer.md +268 -0
- package/safer-buffer/Readme.md +156 -0
- package/safer-buffer/dangerous.js +58 -0
- package/safer-buffer/package.json +34 -0
- package/safer-buffer/safer.js +77 -0
- package/safer-buffer/tests.js +406 -0
- package/sax/AUTHORS +10 -0
- package/sax/LICENSE +32 -0
- package/sax/LICENSE-W3C.html +188 -0
- package/sax/README.md +216 -0
- package/sax/component.json +12 -0
- package/sax/examples/big-not-pretty.xml +8002 -0
- package/sax/examples/example.js +29 -0
- package/sax/examples/get-products.js +58 -0
- package/sax/examples/hello-world.js +4 -0
- package/sax/examples/not-pretty.xml +8 -0
- package/sax/examples/pretty-print.js +74 -0
- package/sax/examples/shopping.xml +2 -0
- package/sax/examples/strict.dtd +870 -0
- package/sax/examples/test.html +15 -0
- package/sax/examples/test.xml +1254 -0
- package/sax/lib/sax.js +1355 -0
- package/sax/package.json +12 -0
- package/sax/test/attribute-name.js +33 -0
- package/sax/test/attribute-no-space.js +75 -0
- package/sax/test/buffer-overrun.js +26 -0
- package/sax/test/case.js +50 -0
- package/sax/test/cdata-chunked.js +11 -0
- package/sax/test/cdata-end-split.js +15 -0
- package/sax/test/cdata-fake-end.js +28 -0
- package/sax/test/cdata-multiple.js +15 -0
- package/sax/test/cdata.js +10 -0
- package/sax/test/cyrillic.js +8 -0
- package/sax/test/duplicate-attribute.js +13 -0
- package/sax/test/end_empty_stream.js +5 -0
- package/sax/test/entities.js +10 -0
- package/sax/test/entity-mega.js +16 -0
- package/sax/test/flush.js +13 -0
- package/sax/test/index.js +86 -0
- package/sax/test/issue-23.js +43 -0
- package/sax/test/issue-30.js +24 -0
- package/sax/test/issue-35.js +15 -0
- package/sax/test/issue-47.js +12 -0
- package/sax/test/issue-49.js +31 -0
- package/sax/test/issue-84.js +13 -0
- package/sax/test/parser-position.js +28 -0
- package/sax/test/script-close-better.js +12 -0
- package/sax/test/script.js +12 -0
- package/sax/test/self-closing-child-strict.js +44 -0
- package/sax/test/self-closing-child.js +44 -0
- package/sax/test/self-closing-tag.js +25 -0
- package/sax/test/stray-ending.js +17 -0
- package/sax/test/trailing-attribute-no-value.js +10 -0
- package/sax/test/trailing-non-whitespace.js +18 -0
- package/sax/test/unclosed-root.js +11 -0
- package/sax/test/unquoted.js +18 -0
- package/sax/test/utf8-split.js +32 -0
- package/sax/test/xmlns-as-tag-name.js +15 -0
- package/sax/test/xmlns-issue-41.js +68 -0
- package/sax/test/xmlns-rebinding.js +63 -0
- package/sax/test/xmlns-strict.js +74 -0
- package/sax/test/xmlns-unbound-element.js +33 -0
- package/sax/test/xmlns-unbound.js +15 -0
- package/sax/test/xmlns-xml-default-ns.js +31 -0
- package/sax/test/xmlns-xml-default-prefix-attribute.js +36 -0
- package/sax/test/xmlns-xml-default-prefix.js +21 -0
- package/sax/test/xmlns-xml-default-redefine.js +41 -0
- package/simple-csv-reader/.editorconfig +8 -0
- package/simple-csv-reader/LICENSE +21 -0
- package/simple-csv-reader/README.md +32 -0
- package/simple-csv-reader/dist/simple-csv-reader.min.js +2 -0
- package/simple-csv-reader/dist/simple-csv-reader.min.js.map +1 -0
- package/simple-csv-reader/gulpfile.js +26 -0
- package/simple-csv-reader/index.js +131 -0
- package/simple-csv-reader/package.json +38 -0
- package/sshpk/.travis.yml +11 -0
- package/sshpk/Jenkinsfile +86 -0
- package/sshpk/LICENSE +18 -0
- package/sshpk/README.md +804 -0
- package/sshpk/bin/sshpk-conv +243 -0
- package/sshpk/bin/sshpk-sign +191 -0
- package/sshpk/bin/sshpk-verify +167 -0
- package/sshpk/lib/algs.js +168 -0
- package/sshpk/lib/certificate.js +410 -0
- package/sshpk/lib/dhe.js +397 -0
- package/sshpk/lib/ed-compat.js +92 -0
- package/sshpk/lib/errors.js +84 -0
- package/sshpk/lib/fingerprint.js +220 -0
- package/sshpk/lib/formats/auto.js +124 -0
- package/sshpk/lib/formats/dnssec.js +287 -0
- package/sshpk/lib/formats/openssh-cert.js +352 -0
- package/sshpk/lib/formats/pem.js +290 -0
- package/sshpk/lib/formats/pkcs1.js +373 -0
- package/sshpk/lib/formats/pkcs8.js +631 -0
- package/sshpk/lib/formats/putty.js +194 -0
- package/sshpk/lib/formats/rfc4253.js +166 -0
- package/sshpk/lib/formats/ssh-private.js +262 -0
- package/sshpk/lib/formats/ssh.js +115 -0
- package/sshpk/lib/formats/x509-pem.js +88 -0
- package/sshpk/lib/formats/x509.js +752 -0
- package/sshpk/lib/identity.js +373 -0
- package/sshpk/lib/index.js +40 -0
- package/sshpk/lib/key.js +294 -0
- package/sshpk/lib/private-key.js +247 -0
- package/sshpk/lib/signature.js +314 -0
- package/sshpk/lib/ssh-buffer.js +149 -0
- package/sshpk/lib/utils.js +404 -0
- package/sshpk/man/man1/sshpk-conv.1 +135 -0
- package/sshpk/man/man1/sshpk-sign.1 +81 -0
- package/sshpk/man/man1/sshpk-verify.1 +68 -0
- package/sshpk/package.json +60 -0
- package/tough-cookie/LICENSE +12 -0
- package/tough-cookie/README.md +527 -0
- package/tough-cookie/lib/cookie.js +1482 -0
- package/tough-cookie/lib/memstore.js +181 -0
- package/tough-cookie/lib/pathMatch.js +61 -0
- package/tough-cookie/lib/permuteDomain.js +56 -0
- package/tough-cookie/lib/pubsuffix-psl.js +38 -0
- package/tough-cookie/lib/store.js +75 -0
- package/tough-cookie/lib/version.js +2 -0
- package/tough-cookie/package.json +78 -0
- package/tunnel-agent/LICENSE +55 -0
- package/tunnel-agent/README.md +4 -0
- package/tunnel-agent/index.js +244 -0
- package/tunnel-agent/package.json +22 -0
- package/tweetnacl/AUTHORS.md +28 -0
- package/tweetnacl/CHANGELOG.md +221 -0
- package/tweetnacl/LICENSE +24 -0
- package/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
- package/tweetnacl/README.md +459 -0
- package/tweetnacl/nacl-fast.js +2388 -0
- package/tweetnacl/nacl-fast.min.js +2 -0
- package/tweetnacl/nacl.d.ts +98 -0
- package/tweetnacl/nacl.js +1175 -0
- package/tweetnacl/nacl.min.js +1 -0
- package/tweetnacl/package.json +58 -0
- package/uri-js/LICENSE +11 -0
- package/uri-js/README.md +203 -0
- package/uri-js/dist/es5/uri.all.d.ts +59 -0
- package/uri-js/dist/es5/uri.all.js +1443 -0
- package/uri-js/dist/es5/uri.all.js.map +1 -0
- package/uri-js/dist/es5/uri.all.min.d.ts +59 -0
- package/uri-js/dist/es5/uri.all.min.js +3 -0
- package/uri-js/dist/es5/uri.all.min.js.map +1 -0
- package/uri-js/dist/esnext/index.d.ts +1 -0
- package/uri-js/dist/esnext/index.js +17 -0
- package/uri-js/dist/esnext/index.js.map +1 -0
- package/uri-js/dist/esnext/regexps-iri.d.ts +3 -0
- package/uri-js/dist/esnext/regexps-iri.js +3 -0
- package/uri-js/dist/esnext/regexps-iri.js.map +1 -0
- package/uri-js/dist/esnext/regexps-uri.d.ts +4 -0
- package/uri-js/dist/esnext/regexps-uri.js +42 -0
- package/uri-js/dist/esnext/regexps-uri.js.map +1 -0
- package/uri-js/dist/esnext/schemes/http.d.ts +3 -0
- package/uri-js/dist/esnext/schemes/http.js +28 -0
- package/uri-js/dist/esnext/schemes/http.js.map +1 -0
- package/uri-js/dist/esnext/schemes/https.d.ts +3 -0
- package/uri-js/dist/esnext/schemes/https.js +9 -0
- package/uri-js/dist/esnext/schemes/https.js.map +1 -0
- package/uri-js/dist/esnext/schemes/mailto.d.ts +12 -0
- package/uri-js/dist/esnext/schemes/mailto.js +148 -0
- package/uri-js/dist/esnext/schemes/mailto.js.map +1 -0
- package/uri-js/dist/esnext/schemes/urn-uuid.d.ts +7 -0
- package/uri-js/dist/esnext/schemes/urn-uuid.js +23 -0
- package/uri-js/dist/esnext/schemes/urn-uuid.js.map +1 -0
- package/uri-js/dist/esnext/schemes/urn.d.ts +10 -0
- package/uri-js/dist/esnext/schemes/urn.js +49 -0
- package/uri-js/dist/esnext/schemes/urn.js.map +1 -0
- package/uri-js/dist/esnext/schemes/ws.d.ts +7 -0
- package/uri-js/dist/esnext/schemes/ws.js +41 -0
- package/uri-js/dist/esnext/schemes/ws.js.map +1 -0
- package/uri-js/dist/esnext/schemes/wss.d.ts +3 -0
- package/uri-js/dist/esnext/schemes/wss.js +9 -0
- package/uri-js/dist/esnext/schemes/wss.js.map +1 -0
- package/uri-js/dist/esnext/uri.d.ts +59 -0
- package/uri-js/dist/esnext/uri.js +480 -0
- package/uri-js/dist/esnext/uri.js.map +1 -0
- package/uri-js/dist/esnext/util.d.ts +6 -0
- package/uri-js/dist/esnext/util.js +36 -0
- package/uri-js/dist/esnext/util.js.map +1 -0
- package/uri-js/package.json +77 -0
- package/uri-js/yarn.lock +2558 -0
- package/uuid/AUTHORS +5 -0
- package/uuid/CHANGELOG.md +119 -0
- package/uuid/LICENSE.md +21 -0
- package/uuid/README.md +276 -0
- package/uuid/bin/uuid +65 -0
- package/uuid/index.js +8 -0
- package/uuid/lib/bytesToUuid.js +26 -0
- package/uuid/lib/md5-browser.js +216 -0
- package/uuid/lib/md5.js +25 -0
- package/uuid/lib/rng-browser.js +34 -0
- package/uuid/lib/rng.js +8 -0
- package/uuid/lib/sha1-browser.js +89 -0
- package/uuid/lib/sha1.js +25 -0
- package/uuid/lib/v35.js +57 -0
- package/uuid/package.json +49 -0
- package/uuid/v1.js +109 -0
- package/uuid/v3.js +4 -0
- package/uuid/v4.js +29 -0
- package/uuid/v5.js +3 -0
- package/verror/CHANGES.md +28 -0
- package/verror/CONTRIBUTING.md +19 -0
- package/verror/LICENSE +19 -0
- package/verror/README.md +528 -0
- package/verror/lib/verror.js +451 -0
- package/verror/package.json +22 -0
- package/xml2js/.travis.yml +5 -0
- package/xml2js/83.coffee +6 -0
- package/xml2js/LICENSE +19 -0
- package/xml2js/README.md +248 -0
- package/xml2js/canon.xml +482 -0
- package/xml2js/lib/xml2js.js +299 -0
- package/xml2js/package.json +47 -0
- package/xml2js/text.coffee +11 -0
- package/xml2js/text.xml +485 -0
- package/youtube-search/.travis.yml +5 -0
- package/youtube-search/README.md +61 -0
- package/youtube-search/index.d.ts +77 -0
- package/youtube-search/index.js +111 -0
- package/youtube-search/package.json +29 -0
- package/youtube-search/tests/test-search.js +32 -0
- package/ytdl-core/LICENSE +21 -0
- package/ytdl-core/README.md +238 -0
- package/ytdl-core/lib/cache.js +54 -0
- package/ytdl-core/lib/format-utils.js +250 -0
- package/ytdl-core/lib/formats.js +524 -0
- package/ytdl-core/lib/index.js +214 -0
- package/ytdl-core/lib/info-extras.js +365 -0
- package/ytdl-core/lib/info.js +495 -0
- package/ytdl-core/lib/sig.js +122 -0
- package/ytdl-core/lib/url-utils.js +91 -0
- package/ytdl-core/lib/utils.js +286 -0
- package/ytdl-core/node_modules/sax/LICENSE +41 -0
- package/ytdl-core/node_modules/sax/README.md +225 -0
- package/ytdl-core/node_modules/sax/lib/sax.js +1565 -0
- package/ytdl-core/node_modules/sax/package.json +25 -0
- package/ytdl-core/package.json +61 -0
- package/ytdl-core/typings/index.d.ts +426 -0
- package/ytdl-getinfo/.travis.yml +3 -0
- package/ytdl-getinfo/README.md +77 -0
- package/ytdl-getinfo/index.js +105 -0
- package/ytdl-getinfo/package.json +33 -0
- package/ytdl-getinfo/playlist.js +50 -0
- package/ytdl-getinfo/test/test.js +68 -0
- package/ytdl-getinfo/updater.js +42 -0
- package/ytdl-getinfo/yarn.lock +533 -0
- package/ytdl-getinfo/ytdl/.gitkeep +0 -0
- package/ytdl-getinfo/ytdl/youtube-dl.exe +0 -0
@@ -0,0 +1,2193 @@
|
|
1
|
+
/* axios v0.21.4 | (c) 2021 by Matt Zabriskie */
|
2
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
3
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
4
|
+
module.exports = factory();
|
5
|
+
else if(typeof define === 'function' && define.amd)
|
6
|
+
define([], factory);
|
7
|
+
else if(typeof exports === 'object')
|
8
|
+
exports["axios"] = factory();
|
9
|
+
else
|
10
|
+
root["axios"] = factory();
|
11
|
+
})(window, function() {
|
12
|
+
return /******/ (function(modules) { // webpackBootstrap
|
13
|
+
/******/ // The module cache
|
14
|
+
/******/ var installedModules = {};
|
15
|
+
/******/
|
16
|
+
/******/ // The require function
|
17
|
+
/******/ function __webpack_require__(moduleId) {
|
18
|
+
/******/
|
19
|
+
/******/ // Check if module is in cache
|
20
|
+
/******/ if(installedModules[moduleId]) {
|
21
|
+
/******/ return installedModules[moduleId].exports;
|
22
|
+
/******/ }
|
23
|
+
/******/ // Create a new module (and put it into the cache)
|
24
|
+
/******/ var module = installedModules[moduleId] = {
|
25
|
+
/******/ i: moduleId,
|
26
|
+
/******/ l: false,
|
27
|
+
/******/ exports: {}
|
28
|
+
/******/ };
|
29
|
+
/******/
|
30
|
+
/******/ // Execute the module function
|
31
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
32
|
+
/******/
|
33
|
+
/******/ // Flag the module as loaded
|
34
|
+
/******/ module.l = true;
|
35
|
+
/******/
|
36
|
+
/******/ // Return the exports of the module
|
37
|
+
/******/ return module.exports;
|
38
|
+
/******/ }
|
39
|
+
/******/
|
40
|
+
/******/
|
41
|
+
/******/ // expose the modules object (__webpack_modules__)
|
42
|
+
/******/ __webpack_require__.m = modules;
|
43
|
+
/******/
|
44
|
+
/******/ // expose the module cache
|
45
|
+
/******/ __webpack_require__.c = installedModules;
|
46
|
+
/******/
|
47
|
+
/******/ // define getter function for harmony exports
|
48
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
49
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
50
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
51
|
+
/******/ }
|
52
|
+
/******/ };
|
53
|
+
/******/
|
54
|
+
/******/ // define __esModule on exports
|
55
|
+
/******/ __webpack_require__.r = function(exports) {
|
56
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
57
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
58
|
+
/******/ }
|
59
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
60
|
+
/******/ };
|
61
|
+
/******/
|
62
|
+
/******/ // create a fake namespace object
|
63
|
+
/******/ // mode & 1: value is a module id, require it
|
64
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
65
|
+
/******/ // mode & 4: return value when already ns object
|
66
|
+
/******/ // mode & 8|1: behave like require
|
67
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
68
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
69
|
+
/******/ if(mode & 8) return value;
|
70
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
71
|
+
/******/ var ns = Object.create(null);
|
72
|
+
/******/ __webpack_require__.r(ns);
|
73
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
74
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
75
|
+
/******/ return ns;
|
76
|
+
/******/ };
|
77
|
+
/******/
|
78
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
79
|
+
/******/ __webpack_require__.n = function(module) {
|
80
|
+
/******/ var getter = module && module.__esModule ?
|
81
|
+
/******/ function getDefault() { return module['default']; } :
|
82
|
+
/******/ function getModuleExports() { return module; };
|
83
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
84
|
+
/******/ return getter;
|
85
|
+
/******/ };
|
86
|
+
/******/
|
87
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
88
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
89
|
+
/******/
|
90
|
+
/******/ // __webpack_public_path__
|
91
|
+
/******/ __webpack_require__.p = "";
|
92
|
+
/******/
|
93
|
+
/******/
|
94
|
+
/******/ // Load entry module and return exports
|
95
|
+
/******/ return __webpack_require__(__webpack_require__.s = "./index.js");
|
96
|
+
/******/ })
|
97
|
+
/************************************************************************/
|
98
|
+
/******/ ({
|
99
|
+
|
100
|
+
/***/ "./index.js":
|
101
|
+
/*!******************!*\
|
102
|
+
!*** ./index.js ***!
|
103
|
+
\******************/
|
104
|
+
/*! no static exports found */
|
105
|
+
/***/ (function(module, exports, __webpack_require__) {
|
106
|
+
|
107
|
+
module.exports = __webpack_require__(/*! ./lib/axios */ "./lib/axios.js");
|
108
|
+
|
109
|
+
/***/ }),
|
110
|
+
|
111
|
+
/***/ "./lib/adapters/xhr.js":
|
112
|
+
/*!*****************************!*\
|
113
|
+
!*** ./lib/adapters/xhr.js ***!
|
114
|
+
\*****************************/
|
115
|
+
/*! no static exports found */
|
116
|
+
/***/ (function(module, exports, __webpack_require__) {
|
117
|
+
|
118
|
+
"use strict";
|
119
|
+
|
120
|
+
|
121
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
122
|
+
var settle = __webpack_require__(/*! ./../core/settle */ "./lib/core/settle.js");
|
123
|
+
var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./lib/helpers/cookies.js");
|
124
|
+
var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./lib/helpers/buildURL.js");
|
125
|
+
var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./lib/core/buildFullPath.js");
|
126
|
+
var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./lib/helpers/parseHeaders.js");
|
127
|
+
var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./lib/helpers/isURLSameOrigin.js");
|
128
|
+
var createError = __webpack_require__(/*! ../core/createError */ "./lib/core/createError.js");
|
129
|
+
|
130
|
+
module.exports = function xhrAdapter(config) {
|
131
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
132
|
+
var requestData = config.data;
|
133
|
+
var requestHeaders = config.headers;
|
134
|
+
var responseType = config.responseType;
|
135
|
+
|
136
|
+
if (utils.isFormData(requestData)) {
|
137
|
+
delete requestHeaders['Content-Type']; // Let the browser set it
|
138
|
+
}
|
139
|
+
|
140
|
+
var request = new XMLHttpRequest();
|
141
|
+
|
142
|
+
// HTTP basic authentication
|
143
|
+
if (config.auth) {
|
144
|
+
var username = config.auth.username || '';
|
145
|
+
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
146
|
+
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
147
|
+
}
|
148
|
+
|
149
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
150
|
+
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
151
|
+
|
152
|
+
// Set the request timeout in MS
|
153
|
+
request.timeout = config.timeout;
|
154
|
+
|
155
|
+
function onloadend() {
|
156
|
+
if (!request) {
|
157
|
+
return;
|
158
|
+
}
|
159
|
+
// Prepare the response
|
160
|
+
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
161
|
+
var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
162
|
+
request.responseText : request.response;
|
163
|
+
var response = {
|
164
|
+
data: responseData,
|
165
|
+
status: request.status,
|
166
|
+
statusText: request.statusText,
|
167
|
+
headers: responseHeaders,
|
168
|
+
config: config,
|
169
|
+
request: request
|
170
|
+
};
|
171
|
+
|
172
|
+
settle(resolve, reject, response);
|
173
|
+
|
174
|
+
// Clean up request
|
175
|
+
request = null;
|
176
|
+
}
|
177
|
+
|
178
|
+
if ('onloadend' in request) {
|
179
|
+
// Use onloadend if available
|
180
|
+
request.onloadend = onloadend;
|
181
|
+
} else {
|
182
|
+
// Listen for ready state to emulate onloadend
|
183
|
+
request.onreadystatechange = function handleLoad() {
|
184
|
+
if (!request || request.readyState !== 4) {
|
185
|
+
return;
|
186
|
+
}
|
187
|
+
|
188
|
+
// The request errored out and we didn't get a response, this will be
|
189
|
+
// handled by onerror instead
|
190
|
+
// With one exception: request that using file: protocol, most browsers
|
191
|
+
// will return status as 0 even though it's a successful request
|
192
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
193
|
+
return;
|
194
|
+
}
|
195
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
196
|
+
// so we should call onloadend on the next 'tick'
|
197
|
+
setTimeout(onloadend);
|
198
|
+
};
|
199
|
+
}
|
200
|
+
|
201
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
202
|
+
request.onabort = function handleAbort() {
|
203
|
+
if (!request) {
|
204
|
+
return;
|
205
|
+
}
|
206
|
+
|
207
|
+
reject(createError('Request aborted', config, 'ECONNABORTED', request));
|
208
|
+
|
209
|
+
// Clean up request
|
210
|
+
request = null;
|
211
|
+
};
|
212
|
+
|
213
|
+
// Handle low level network errors
|
214
|
+
request.onerror = function handleError() {
|
215
|
+
// Real errors are hidden from us by the browser
|
216
|
+
// onerror should only fire if it's a network error
|
217
|
+
reject(createError('Network Error', config, null, request));
|
218
|
+
|
219
|
+
// Clean up request
|
220
|
+
request = null;
|
221
|
+
};
|
222
|
+
|
223
|
+
// Handle timeout
|
224
|
+
request.ontimeout = function handleTimeout() {
|
225
|
+
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
226
|
+
if (config.timeoutErrorMessage) {
|
227
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
228
|
+
}
|
229
|
+
reject(createError(
|
230
|
+
timeoutErrorMessage,
|
231
|
+
config,
|
232
|
+
config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
233
|
+
request));
|
234
|
+
|
235
|
+
// Clean up request
|
236
|
+
request = null;
|
237
|
+
};
|
238
|
+
|
239
|
+
// Add xsrf header
|
240
|
+
// This is only done if running in a standard browser environment.
|
241
|
+
// Specifically not if we're in a web worker, or react-native.
|
242
|
+
if (utils.isStandardBrowserEnv()) {
|
243
|
+
// Add xsrf header
|
244
|
+
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
|
245
|
+
cookies.read(config.xsrfCookieName) :
|
246
|
+
undefined;
|
247
|
+
|
248
|
+
if (xsrfValue) {
|
249
|
+
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
|
253
|
+
// Add headers to the request
|
254
|
+
if ('setRequestHeader' in request) {
|
255
|
+
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
256
|
+
if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
257
|
+
// Remove Content-Type if data is undefined
|
258
|
+
delete requestHeaders[key];
|
259
|
+
} else {
|
260
|
+
// Otherwise add header to the request
|
261
|
+
request.setRequestHeader(key, val);
|
262
|
+
}
|
263
|
+
});
|
264
|
+
}
|
265
|
+
|
266
|
+
// Add withCredentials to request if needed
|
267
|
+
if (!utils.isUndefined(config.withCredentials)) {
|
268
|
+
request.withCredentials = !!config.withCredentials;
|
269
|
+
}
|
270
|
+
|
271
|
+
// Add responseType to request if needed
|
272
|
+
if (responseType && responseType !== 'json') {
|
273
|
+
request.responseType = config.responseType;
|
274
|
+
}
|
275
|
+
|
276
|
+
// Handle progress if needed
|
277
|
+
if (typeof config.onDownloadProgress === 'function') {
|
278
|
+
request.addEventListener('progress', config.onDownloadProgress);
|
279
|
+
}
|
280
|
+
|
281
|
+
// Not all browsers support upload events
|
282
|
+
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
283
|
+
request.upload.addEventListener('progress', config.onUploadProgress);
|
284
|
+
}
|
285
|
+
|
286
|
+
if (config.cancelToken) {
|
287
|
+
// Handle cancellation
|
288
|
+
config.cancelToken.promise.then(function onCanceled(cancel) {
|
289
|
+
if (!request) {
|
290
|
+
return;
|
291
|
+
}
|
292
|
+
|
293
|
+
request.abort();
|
294
|
+
reject(cancel);
|
295
|
+
// Clean up request
|
296
|
+
request = null;
|
297
|
+
});
|
298
|
+
}
|
299
|
+
|
300
|
+
if (!requestData) {
|
301
|
+
requestData = null;
|
302
|
+
}
|
303
|
+
|
304
|
+
// Send the request
|
305
|
+
request.send(requestData);
|
306
|
+
});
|
307
|
+
};
|
308
|
+
|
309
|
+
|
310
|
+
/***/ }),
|
311
|
+
|
312
|
+
/***/ "./lib/axios.js":
|
313
|
+
/*!**********************!*\
|
314
|
+
!*** ./lib/axios.js ***!
|
315
|
+
\**********************/
|
316
|
+
/*! no static exports found */
|
317
|
+
/***/ (function(module, exports, __webpack_require__) {
|
318
|
+
|
319
|
+
"use strict";
|
320
|
+
|
321
|
+
|
322
|
+
var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
323
|
+
var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js");
|
324
|
+
var Axios = __webpack_require__(/*! ./core/Axios */ "./lib/core/Axios.js");
|
325
|
+
var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./lib/core/mergeConfig.js");
|
326
|
+
var defaults = __webpack_require__(/*! ./defaults */ "./lib/defaults.js");
|
327
|
+
|
328
|
+
/**
|
329
|
+
* Create an instance of Axios
|
330
|
+
*
|
331
|
+
* @param {Object} defaultConfig The default config for the instance
|
332
|
+
* @return {Axios} A new instance of Axios
|
333
|
+
*/
|
334
|
+
function createInstance(defaultConfig) {
|
335
|
+
var context = new Axios(defaultConfig);
|
336
|
+
var instance = bind(Axios.prototype.request, context);
|
337
|
+
|
338
|
+
// Copy axios.prototype to instance
|
339
|
+
utils.extend(instance, Axios.prototype, context);
|
340
|
+
|
341
|
+
// Copy context to instance
|
342
|
+
utils.extend(instance, context);
|
343
|
+
|
344
|
+
return instance;
|
345
|
+
}
|
346
|
+
|
347
|
+
// Create the default instance to be exported
|
348
|
+
var axios = createInstance(defaults);
|
349
|
+
|
350
|
+
// Expose Axios class to allow class inheritance
|
351
|
+
axios.Axios = Axios;
|
352
|
+
|
353
|
+
// Factory for creating new instances
|
354
|
+
axios.create = function create(instanceConfig) {
|
355
|
+
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
356
|
+
};
|
357
|
+
|
358
|
+
// Expose Cancel & CancelToken
|
359
|
+
axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./lib/cancel/Cancel.js");
|
360
|
+
axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./lib/cancel/CancelToken.js");
|
361
|
+
axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./lib/cancel/isCancel.js");
|
362
|
+
|
363
|
+
// Expose all/spread
|
364
|
+
axios.all = function all(promises) {
|
365
|
+
return Promise.all(promises);
|
366
|
+
};
|
367
|
+
axios.spread = __webpack_require__(/*! ./helpers/spread */ "./lib/helpers/spread.js");
|
368
|
+
|
369
|
+
// Expose isAxiosError
|
370
|
+
axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./lib/helpers/isAxiosError.js");
|
371
|
+
|
372
|
+
module.exports = axios;
|
373
|
+
|
374
|
+
// Allow use of default import syntax in TypeScript
|
375
|
+
module.exports.default = axios;
|
376
|
+
|
377
|
+
|
378
|
+
/***/ }),
|
379
|
+
|
380
|
+
/***/ "./lib/cancel/Cancel.js":
|
381
|
+
/*!******************************!*\
|
382
|
+
!*** ./lib/cancel/Cancel.js ***!
|
383
|
+
\******************************/
|
384
|
+
/*! no static exports found */
|
385
|
+
/***/ (function(module, exports, __webpack_require__) {
|
386
|
+
|
387
|
+
"use strict";
|
388
|
+
|
389
|
+
|
390
|
+
/**
|
391
|
+
* A `Cancel` is an object that is thrown when an operation is canceled.
|
392
|
+
*
|
393
|
+
* @class
|
394
|
+
* @param {string=} message The message.
|
395
|
+
*/
|
396
|
+
function Cancel(message) {
|
397
|
+
this.message = message;
|
398
|
+
}
|
399
|
+
|
400
|
+
Cancel.prototype.toString = function toString() {
|
401
|
+
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
402
|
+
};
|
403
|
+
|
404
|
+
Cancel.prototype.__CANCEL__ = true;
|
405
|
+
|
406
|
+
module.exports = Cancel;
|
407
|
+
|
408
|
+
|
409
|
+
/***/ }),
|
410
|
+
|
411
|
+
/***/ "./lib/cancel/CancelToken.js":
|
412
|
+
/*!***********************************!*\
|
413
|
+
!*** ./lib/cancel/CancelToken.js ***!
|
414
|
+
\***********************************/
|
415
|
+
/*! no static exports found */
|
416
|
+
/***/ (function(module, exports, __webpack_require__) {
|
417
|
+
|
418
|
+
"use strict";
|
419
|
+
|
420
|
+
|
421
|
+
var Cancel = __webpack_require__(/*! ./Cancel */ "./lib/cancel/Cancel.js");
|
422
|
+
|
423
|
+
/**
|
424
|
+
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
425
|
+
*
|
426
|
+
* @class
|
427
|
+
* @param {Function} executor The executor function.
|
428
|
+
*/
|
429
|
+
function CancelToken(executor) {
|
430
|
+
if (typeof executor !== 'function') {
|
431
|
+
throw new TypeError('executor must be a function.');
|
432
|
+
}
|
433
|
+
|
434
|
+
var resolvePromise;
|
435
|
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
436
|
+
resolvePromise = resolve;
|
437
|
+
});
|
438
|
+
|
439
|
+
var token = this;
|
440
|
+
executor(function cancel(message) {
|
441
|
+
if (token.reason) {
|
442
|
+
// Cancellation has already been requested
|
443
|
+
return;
|
444
|
+
}
|
445
|
+
|
446
|
+
token.reason = new Cancel(message);
|
447
|
+
resolvePromise(token.reason);
|
448
|
+
});
|
449
|
+
}
|
450
|
+
|
451
|
+
/**
|
452
|
+
* Throws a `Cancel` if cancellation has been requested.
|
453
|
+
*/
|
454
|
+
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
455
|
+
if (this.reason) {
|
456
|
+
throw this.reason;
|
457
|
+
}
|
458
|
+
};
|
459
|
+
|
460
|
+
/**
|
461
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
462
|
+
* cancels the `CancelToken`.
|
463
|
+
*/
|
464
|
+
CancelToken.source = function source() {
|
465
|
+
var cancel;
|
466
|
+
var token = new CancelToken(function executor(c) {
|
467
|
+
cancel = c;
|
468
|
+
});
|
469
|
+
return {
|
470
|
+
token: token,
|
471
|
+
cancel: cancel
|
472
|
+
};
|
473
|
+
};
|
474
|
+
|
475
|
+
module.exports = CancelToken;
|
476
|
+
|
477
|
+
|
478
|
+
/***/ }),
|
479
|
+
|
480
|
+
/***/ "./lib/cancel/isCancel.js":
|
481
|
+
/*!********************************!*\
|
482
|
+
!*** ./lib/cancel/isCancel.js ***!
|
483
|
+
\********************************/
|
484
|
+
/*! no static exports found */
|
485
|
+
/***/ (function(module, exports, __webpack_require__) {
|
486
|
+
|
487
|
+
"use strict";
|
488
|
+
|
489
|
+
|
490
|
+
module.exports = function isCancel(value) {
|
491
|
+
return !!(value && value.__CANCEL__);
|
492
|
+
};
|
493
|
+
|
494
|
+
|
495
|
+
/***/ }),
|
496
|
+
|
497
|
+
/***/ "./lib/core/Axios.js":
|
498
|
+
/*!***************************!*\
|
499
|
+
!*** ./lib/core/Axios.js ***!
|
500
|
+
\***************************/
|
501
|
+
/*! no static exports found */
|
502
|
+
/***/ (function(module, exports, __webpack_require__) {
|
503
|
+
|
504
|
+
"use strict";
|
505
|
+
|
506
|
+
|
507
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
508
|
+
var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./lib/helpers/buildURL.js");
|
509
|
+
var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./lib/core/InterceptorManager.js");
|
510
|
+
var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./lib/core/dispatchRequest.js");
|
511
|
+
var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./lib/core/mergeConfig.js");
|
512
|
+
var validator = __webpack_require__(/*! ../helpers/validator */ "./lib/helpers/validator.js");
|
513
|
+
|
514
|
+
var validators = validator.validators;
|
515
|
+
/**
|
516
|
+
* Create a new instance of Axios
|
517
|
+
*
|
518
|
+
* @param {Object} instanceConfig The default config for the instance
|
519
|
+
*/
|
520
|
+
function Axios(instanceConfig) {
|
521
|
+
this.defaults = instanceConfig;
|
522
|
+
this.interceptors = {
|
523
|
+
request: new InterceptorManager(),
|
524
|
+
response: new InterceptorManager()
|
525
|
+
};
|
526
|
+
}
|
527
|
+
|
528
|
+
/**
|
529
|
+
* Dispatch a request
|
530
|
+
*
|
531
|
+
* @param {Object} config The config specific for this request (merged with this.defaults)
|
532
|
+
*/
|
533
|
+
Axios.prototype.request = function request(config) {
|
534
|
+
/*eslint no-param-reassign:0*/
|
535
|
+
// Allow for axios('example/url'[, config]) a la fetch API
|
536
|
+
if (typeof config === 'string') {
|
537
|
+
config = arguments[1] || {};
|
538
|
+
config.url = arguments[0];
|
539
|
+
} else {
|
540
|
+
config = config || {};
|
541
|
+
}
|
542
|
+
|
543
|
+
config = mergeConfig(this.defaults, config);
|
544
|
+
|
545
|
+
// Set config.method
|
546
|
+
if (config.method) {
|
547
|
+
config.method = config.method.toLowerCase();
|
548
|
+
} else if (this.defaults.method) {
|
549
|
+
config.method = this.defaults.method.toLowerCase();
|
550
|
+
} else {
|
551
|
+
config.method = 'get';
|
552
|
+
}
|
553
|
+
|
554
|
+
var transitional = config.transitional;
|
555
|
+
|
556
|
+
if (transitional !== undefined) {
|
557
|
+
validator.assertOptions(transitional, {
|
558
|
+
silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
|
559
|
+
forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
|
560
|
+
clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
|
561
|
+
}, false);
|
562
|
+
}
|
563
|
+
|
564
|
+
// filter out skipped interceptors
|
565
|
+
var requestInterceptorChain = [];
|
566
|
+
var synchronousRequestInterceptors = true;
|
567
|
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
568
|
+
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
569
|
+
return;
|
570
|
+
}
|
571
|
+
|
572
|
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
573
|
+
|
574
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
575
|
+
});
|
576
|
+
|
577
|
+
var responseInterceptorChain = [];
|
578
|
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
579
|
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
580
|
+
});
|
581
|
+
|
582
|
+
var promise;
|
583
|
+
|
584
|
+
if (!synchronousRequestInterceptors) {
|
585
|
+
var chain = [dispatchRequest, undefined];
|
586
|
+
|
587
|
+
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
588
|
+
chain = chain.concat(responseInterceptorChain);
|
589
|
+
|
590
|
+
promise = Promise.resolve(config);
|
591
|
+
while (chain.length) {
|
592
|
+
promise = promise.then(chain.shift(), chain.shift());
|
593
|
+
}
|
594
|
+
|
595
|
+
return promise;
|
596
|
+
}
|
597
|
+
|
598
|
+
|
599
|
+
var newConfig = config;
|
600
|
+
while (requestInterceptorChain.length) {
|
601
|
+
var onFulfilled = requestInterceptorChain.shift();
|
602
|
+
var onRejected = requestInterceptorChain.shift();
|
603
|
+
try {
|
604
|
+
newConfig = onFulfilled(newConfig);
|
605
|
+
} catch (error) {
|
606
|
+
onRejected(error);
|
607
|
+
break;
|
608
|
+
}
|
609
|
+
}
|
610
|
+
|
611
|
+
try {
|
612
|
+
promise = dispatchRequest(newConfig);
|
613
|
+
} catch (error) {
|
614
|
+
return Promise.reject(error);
|
615
|
+
}
|
616
|
+
|
617
|
+
while (responseInterceptorChain.length) {
|
618
|
+
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
|
619
|
+
}
|
620
|
+
|
621
|
+
return promise;
|
622
|
+
};
|
623
|
+
|
624
|
+
Axios.prototype.getUri = function getUri(config) {
|
625
|
+
config = mergeConfig(this.defaults, config);
|
626
|
+
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
627
|
+
};
|
628
|
+
|
629
|
+
// Provide aliases for supported request methods
|
630
|
+
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
631
|
+
/*eslint func-names:0*/
|
632
|
+
Axios.prototype[method] = function(url, config) {
|
633
|
+
return this.request(mergeConfig(config || {}, {
|
634
|
+
method: method,
|
635
|
+
url: url,
|
636
|
+
data: (config || {}).data
|
637
|
+
}));
|
638
|
+
};
|
639
|
+
});
|
640
|
+
|
641
|
+
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
642
|
+
/*eslint func-names:0*/
|
643
|
+
Axios.prototype[method] = function(url, data, config) {
|
644
|
+
return this.request(mergeConfig(config || {}, {
|
645
|
+
method: method,
|
646
|
+
url: url,
|
647
|
+
data: data
|
648
|
+
}));
|
649
|
+
};
|
650
|
+
});
|
651
|
+
|
652
|
+
module.exports = Axios;
|
653
|
+
|
654
|
+
|
655
|
+
/***/ }),
|
656
|
+
|
657
|
+
/***/ "./lib/core/InterceptorManager.js":
|
658
|
+
/*!****************************************!*\
|
659
|
+
!*** ./lib/core/InterceptorManager.js ***!
|
660
|
+
\****************************************/
|
661
|
+
/*! no static exports found */
|
662
|
+
/***/ (function(module, exports, __webpack_require__) {
|
663
|
+
|
664
|
+
"use strict";
|
665
|
+
|
666
|
+
|
667
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
668
|
+
|
669
|
+
function InterceptorManager() {
|
670
|
+
this.handlers = [];
|
671
|
+
}
|
672
|
+
|
673
|
+
/**
|
674
|
+
* Add a new interceptor to the stack
|
675
|
+
*
|
676
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
677
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
678
|
+
*
|
679
|
+
* @return {Number} An ID used to remove interceptor later
|
680
|
+
*/
|
681
|
+
InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
|
682
|
+
this.handlers.push({
|
683
|
+
fulfilled: fulfilled,
|
684
|
+
rejected: rejected,
|
685
|
+
synchronous: options ? options.synchronous : false,
|
686
|
+
runWhen: options ? options.runWhen : null
|
687
|
+
});
|
688
|
+
return this.handlers.length - 1;
|
689
|
+
};
|
690
|
+
|
691
|
+
/**
|
692
|
+
* Remove an interceptor from the stack
|
693
|
+
*
|
694
|
+
* @param {Number} id The ID that was returned by `use`
|
695
|
+
*/
|
696
|
+
InterceptorManager.prototype.eject = function eject(id) {
|
697
|
+
if (this.handlers[id]) {
|
698
|
+
this.handlers[id] = null;
|
699
|
+
}
|
700
|
+
};
|
701
|
+
|
702
|
+
/**
|
703
|
+
* Iterate over all the registered interceptors
|
704
|
+
*
|
705
|
+
* This method is particularly useful for skipping over any
|
706
|
+
* interceptors that may have become `null` calling `eject`.
|
707
|
+
*
|
708
|
+
* @param {Function} fn The function to call for each interceptor
|
709
|
+
*/
|
710
|
+
InterceptorManager.prototype.forEach = function forEach(fn) {
|
711
|
+
utils.forEach(this.handlers, function forEachHandler(h) {
|
712
|
+
if (h !== null) {
|
713
|
+
fn(h);
|
714
|
+
}
|
715
|
+
});
|
716
|
+
};
|
717
|
+
|
718
|
+
module.exports = InterceptorManager;
|
719
|
+
|
720
|
+
|
721
|
+
/***/ }),
|
722
|
+
|
723
|
+
/***/ "./lib/core/buildFullPath.js":
|
724
|
+
/*!***********************************!*\
|
725
|
+
!*** ./lib/core/buildFullPath.js ***!
|
726
|
+
\***********************************/
|
727
|
+
/*! no static exports found */
|
728
|
+
/***/ (function(module, exports, __webpack_require__) {
|
729
|
+
|
730
|
+
"use strict";
|
731
|
+
|
732
|
+
|
733
|
+
var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./lib/helpers/isAbsoluteURL.js");
|
734
|
+
var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./lib/helpers/combineURLs.js");
|
735
|
+
|
736
|
+
/**
|
737
|
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
738
|
+
* only when the requestedURL is not already an absolute URL.
|
739
|
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
740
|
+
*
|
741
|
+
* @param {string} baseURL The base URL
|
742
|
+
* @param {string} requestedURL Absolute or relative URL to combine
|
743
|
+
* @returns {string} The combined full path
|
744
|
+
*/
|
745
|
+
module.exports = function buildFullPath(baseURL, requestedURL) {
|
746
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
747
|
+
return combineURLs(baseURL, requestedURL);
|
748
|
+
}
|
749
|
+
return requestedURL;
|
750
|
+
};
|
751
|
+
|
752
|
+
|
753
|
+
/***/ }),
|
754
|
+
|
755
|
+
/***/ "./lib/core/createError.js":
|
756
|
+
/*!*********************************!*\
|
757
|
+
!*** ./lib/core/createError.js ***!
|
758
|
+
\*********************************/
|
759
|
+
/*! no static exports found */
|
760
|
+
/***/ (function(module, exports, __webpack_require__) {
|
761
|
+
|
762
|
+
"use strict";
|
763
|
+
|
764
|
+
|
765
|
+
var enhanceError = __webpack_require__(/*! ./enhanceError */ "./lib/core/enhanceError.js");
|
766
|
+
|
767
|
+
/**
|
768
|
+
* Create an Error with the specified message, config, error code, request and response.
|
769
|
+
*
|
770
|
+
* @param {string} message The error message.
|
771
|
+
* @param {Object} config The config.
|
772
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
773
|
+
* @param {Object} [request] The request.
|
774
|
+
* @param {Object} [response] The response.
|
775
|
+
* @returns {Error} The created error.
|
776
|
+
*/
|
777
|
+
module.exports = function createError(message, config, code, request, response) {
|
778
|
+
var error = new Error(message);
|
779
|
+
return enhanceError(error, config, code, request, response);
|
780
|
+
};
|
781
|
+
|
782
|
+
|
783
|
+
/***/ }),
|
784
|
+
|
785
|
+
/***/ "./lib/core/dispatchRequest.js":
|
786
|
+
/*!*************************************!*\
|
787
|
+
!*** ./lib/core/dispatchRequest.js ***!
|
788
|
+
\*************************************/
|
789
|
+
/*! no static exports found */
|
790
|
+
/***/ (function(module, exports, __webpack_require__) {
|
791
|
+
|
792
|
+
"use strict";
|
793
|
+
|
794
|
+
|
795
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
796
|
+
var transformData = __webpack_require__(/*! ./transformData */ "./lib/core/transformData.js");
|
797
|
+
var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./lib/cancel/isCancel.js");
|
798
|
+
var defaults = __webpack_require__(/*! ../defaults */ "./lib/defaults.js");
|
799
|
+
|
800
|
+
/**
|
801
|
+
* Throws a `Cancel` if cancellation has been requested.
|
802
|
+
*/
|
803
|
+
function throwIfCancellationRequested(config) {
|
804
|
+
if (config.cancelToken) {
|
805
|
+
config.cancelToken.throwIfRequested();
|
806
|
+
}
|
807
|
+
}
|
808
|
+
|
809
|
+
/**
|
810
|
+
* Dispatch a request to the server using the configured adapter.
|
811
|
+
*
|
812
|
+
* @param {object} config The config that is to be used for the request
|
813
|
+
* @returns {Promise} The Promise to be fulfilled
|
814
|
+
*/
|
815
|
+
module.exports = function dispatchRequest(config) {
|
816
|
+
throwIfCancellationRequested(config);
|
817
|
+
|
818
|
+
// Ensure headers exist
|
819
|
+
config.headers = config.headers || {};
|
820
|
+
|
821
|
+
// Transform request data
|
822
|
+
config.data = transformData.call(
|
823
|
+
config,
|
824
|
+
config.data,
|
825
|
+
config.headers,
|
826
|
+
config.transformRequest
|
827
|
+
);
|
828
|
+
|
829
|
+
// Flatten headers
|
830
|
+
config.headers = utils.merge(
|
831
|
+
config.headers.common || {},
|
832
|
+
config.headers[config.method] || {},
|
833
|
+
config.headers
|
834
|
+
);
|
835
|
+
|
836
|
+
utils.forEach(
|
837
|
+
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
838
|
+
function cleanHeaderConfig(method) {
|
839
|
+
delete config.headers[method];
|
840
|
+
}
|
841
|
+
);
|
842
|
+
|
843
|
+
var adapter = config.adapter || defaults.adapter;
|
844
|
+
|
845
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
846
|
+
throwIfCancellationRequested(config);
|
847
|
+
|
848
|
+
// Transform response data
|
849
|
+
response.data = transformData.call(
|
850
|
+
config,
|
851
|
+
response.data,
|
852
|
+
response.headers,
|
853
|
+
config.transformResponse
|
854
|
+
);
|
855
|
+
|
856
|
+
return response;
|
857
|
+
}, function onAdapterRejection(reason) {
|
858
|
+
if (!isCancel(reason)) {
|
859
|
+
throwIfCancellationRequested(config);
|
860
|
+
|
861
|
+
// Transform response data
|
862
|
+
if (reason && reason.response) {
|
863
|
+
reason.response.data = transformData.call(
|
864
|
+
config,
|
865
|
+
reason.response.data,
|
866
|
+
reason.response.headers,
|
867
|
+
config.transformResponse
|
868
|
+
);
|
869
|
+
}
|
870
|
+
}
|
871
|
+
|
872
|
+
return Promise.reject(reason);
|
873
|
+
});
|
874
|
+
};
|
875
|
+
|
876
|
+
|
877
|
+
/***/ }),
|
878
|
+
|
879
|
+
/***/ "./lib/core/enhanceError.js":
|
880
|
+
/*!**********************************!*\
|
881
|
+
!*** ./lib/core/enhanceError.js ***!
|
882
|
+
\**********************************/
|
883
|
+
/*! no static exports found */
|
884
|
+
/***/ (function(module, exports, __webpack_require__) {
|
885
|
+
|
886
|
+
"use strict";
|
887
|
+
|
888
|
+
|
889
|
+
/**
|
890
|
+
* Update an Error with the specified config, error code, and response.
|
891
|
+
*
|
892
|
+
* @param {Error} error The error to update.
|
893
|
+
* @param {Object} config The config.
|
894
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
895
|
+
* @param {Object} [request] The request.
|
896
|
+
* @param {Object} [response] The response.
|
897
|
+
* @returns {Error} The error.
|
898
|
+
*/
|
899
|
+
module.exports = function enhanceError(error, config, code, request, response) {
|
900
|
+
error.config = config;
|
901
|
+
if (code) {
|
902
|
+
error.code = code;
|
903
|
+
}
|
904
|
+
|
905
|
+
error.request = request;
|
906
|
+
error.response = response;
|
907
|
+
error.isAxiosError = true;
|
908
|
+
|
909
|
+
error.toJSON = function toJSON() {
|
910
|
+
return {
|
911
|
+
// Standard
|
912
|
+
message: this.message,
|
913
|
+
name: this.name,
|
914
|
+
// Microsoft
|
915
|
+
description: this.description,
|
916
|
+
number: this.number,
|
917
|
+
// Mozilla
|
918
|
+
fileName: this.fileName,
|
919
|
+
lineNumber: this.lineNumber,
|
920
|
+
columnNumber: this.columnNumber,
|
921
|
+
stack: this.stack,
|
922
|
+
// Axios
|
923
|
+
config: this.config,
|
924
|
+
code: this.code
|
925
|
+
};
|
926
|
+
};
|
927
|
+
return error;
|
928
|
+
};
|
929
|
+
|
930
|
+
|
931
|
+
/***/ }),
|
932
|
+
|
933
|
+
/***/ "./lib/core/mergeConfig.js":
|
934
|
+
/*!*********************************!*\
|
935
|
+
!*** ./lib/core/mergeConfig.js ***!
|
936
|
+
\*********************************/
|
937
|
+
/*! no static exports found */
|
938
|
+
/***/ (function(module, exports, __webpack_require__) {
|
939
|
+
|
940
|
+
"use strict";
|
941
|
+
|
942
|
+
|
943
|
+
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
944
|
+
|
945
|
+
/**
|
946
|
+
* Config-specific merge-function which creates a new config-object
|
947
|
+
* by merging two configuration objects together.
|
948
|
+
*
|
949
|
+
* @param {Object} config1
|
950
|
+
* @param {Object} config2
|
951
|
+
* @returns {Object} New object resulting from merging config2 to config1
|
952
|
+
*/
|
953
|
+
module.exports = function mergeConfig(config1, config2) {
|
954
|
+
// eslint-disable-next-line no-param-reassign
|
955
|
+
config2 = config2 || {};
|
956
|
+
var config = {};
|
957
|
+
|
958
|
+
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
959
|
+
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
960
|
+
var defaultToConfig2Keys = [
|
961
|
+
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
962
|
+
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
963
|
+
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
964
|
+
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
965
|
+
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
966
|
+
];
|
967
|
+
var directMergeKeys = ['validateStatus'];
|
968
|
+
|
969
|
+
function getMergedValue(target, source) {
|
970
|
+
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
971
|
+
return utils.merge(target, source);
|
972
|
+
} else if (utils.isPlainObject(source)) {
|
973
|
+
return utils.merge({}, source);
|
974
|
+
} else if (utils.isArray(source)) {
|
975
|
+
return source.slice();
|
976
|
+
}
|
977
|
+
return source;
|
978
|
+
}
|
979
|
+
|
980
|
+
function mergeDeepProperties(prop) {
|
981
|
+
if (!utils.isUndefined(config2[prop])) {
|
982
|
+
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
983
|
+
} else if (!utils.isUndefined(config1[prop])) {
|
984
|
+
config[prop] = getMergedValue(undefined, config1[prop]);
|
985
|
+
}
|
986
|
+
}
|
987
|
+
|
988
|
+
utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
989
|
+
if (!utils.isUndefined(config2[prop])) {
|
990
|
+
config[prop] = getMergedValue(undefined, config2[prop]);
|
991
|
+
}
|
992
|
+
});
|
993
|
+
|
994
|
+
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
995
|
+
|
996
|
+
utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
997
|
+
if (!utils.isUndefined(config2[prop])) {
|
998
|
+
config[prop] = getMergedValue(undefined, config2[prop]);
|
999
|
+
} else if (!utils.isUndefined(config1[prop])) {
|
1000
|
+
config[prop] = getMergedValue(undefined, config1[prop]);
|
1001
|
+
}
|
1002
|
+
});
|
1003
|
+
|
1004
|
+
utils.forEach(directMergeKeys, function merge(prop) {
|
1005
|
+
if (prop in config2) {
|
1006
|
+
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
1007
|
+
} else if (prop in config1) {
|
1008
|
+
config[prop] = getMergedValue(undefined, config1[prop]);
|
1009
|
+
}
|
1010
|
+
});
|
1011
|
+
|
1012
|
+
var axiosKeys = valueFromConfig2Keys
|
1013
|
+
.concat(mergeDeepPropertiesKeys)
|
1014
|
+
.concat(defaultToConfig2Keys)
|
1015
|
+
.concat(directMergeKeys);
|
1016
|
+
|
1017
|
+
var otherKeys = Object
|
1018
|
+
.keys(config1)
|
1019
|
+
.concat(Object.keys(config2))
|
1020
|
+
.filter(function filterAxiosKeys(key) {
|
1021
|
+
return axiosKeys.indexOf(key) === -1;
|
1022
|
+
});
|
1023
|
+
|
1024
|
+
utils.forEach(otherKeys, mergeDeepProperties);
|
1025
|
+
|
1026
|
+
return config;
|
1027
|
+
};
|
1028
|
+
|
1029
|
+
|
1030
|
+
/***/ }),
|
1031
|
+
|
1032
|
+
/***/ "./lib/core/settle.js":
|
1033
|
+
/*!****************************!*\
|
1034
|
+
!*** ./lib/core/settle.js ***!
|
1035
|
+
\****************************/
|
1036
|
+
/*! no static exports found */
|
1037
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1038
|
+
|
1039
|
+
"use strict";
|
1040
|
+
|
1041
|
+
|
1042
|
+
var createError = __webpack_require__(/*! ./createError */ "./lib/core/createError.js");
|
1043
|
+
|
1044
|
+
/**
|
1045
|
+
* Resolve or reject a Promise based on response status.
|
1046
|
+
*
|
1047
|
+
* @param {Function} resolve A function that resolves the promise.
|
1048
|
+
* @param {Function} reject A function that rejects the promise.
|
1049
|
+
* @param {object} response The response.
|
1050
|
+
*/
|
1051
|
+
module.exports = function settle(resolve, reject, response) {
|
1052
|
+
var validateStatus = response.config.validateStatus;
|
1053
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
1054
|
+
resolve(response);
|
1055
|
+
} else {
|
1056
|
+
reject(createError(
|
1057
|
+
'Request failed with status code ' + response.status,
|
1058
|
+
response.config,
|
1059
|
+
null,
|
1060
|
+
response.request,
|
1061
|
+
response
|
1062
|
+
));
|
1063
|
+
}
|
1064
|
+
};
|
1065
|
+
|
1066
|
+
|
1067
|
+
/***/ }),
|
1068
|
+
|
1069
|
+
/***/ "./lib/core/transformData.js":
|
1070
|
+
/*!***********************************!*\
|
1071
|
+
!*** ./lib/core/transformData.js ***!
|
1072
|
+
\***********************************/
|
1073
|
+
/*! no static exports found */
|
1074
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1075
|
+
|
1076
|
+
"use strict";
|
1077
|
+
|
1078
|
+
|
1079
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1080
|
+
var defaults = __webpack_require__(/*! ./../defaults */ "./lib/defaults.js");
|
1081
|
+
|
1082
|
+
/**
|
1083
|
+
* Transform the data for a request or a response
|
1084
|
+
*
|
1085
|
+
* @param {Object|String} data The data to be transformed
|
1086
|
+
* @param {Array} headers The headers for the request or response
|
1087
|
+
* @param {Array|Function} fns A single function or Array of functions
|
1088
|
+
* @returns {*} The resulting transformed data
|
1089
|
+
*/
|
1090
|
+
module.exports = function transformData(data, headers, fns) {
|
1091
|
+
var context = this || defaults;
|
1092
|
+
/*eslint no-param-reassign:0*/
|
1093
|
+
utils.forEach(fns, function transform(fn) {
|
1094
|
+
data = fn.call(context, data, headers);
|
1095
|
+
});
|
1096
|
+
|
1097
|
+
return data;
|
1098
|
+
};
|
1099
|
+
|
1100
|
+
|
1101
|
+
/***/ }),
|
1102
|
+
|
1103
|
+
/***/ "./lib/defaults.js":
|
1104
|
+
/*!*************************!*\
|
1105
|
+
!*** ./lib/defaults.js ***!
|
1106
|
+
\*************************/
|
1107
|
+
/*! no static exports found */
|
1108
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1109
|
+
|
1110
|
+
"use strict";
|
1111
|
+
|
1112
|
+
|
1113
|
+
var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
1114
|
+
var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./lib/helpers/normalizeHeaderName.js");
|
1115
|
+
var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./lib/core/enhanceError.js");
|
1116
|
+
|
1117
|
+
var DEFAULT_CONTENT_TYPE = {
|
1118
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
1119
|
+
};
|
1120
|
+
|
1121
|
+
function setContentTypeIfUnset(headers, value) {
|
1122
|
+
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
1123
|
+
headers['Content-Type'] = value;
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
|
1127
|
+
function getDefaultAdapter() {
|
1128
|
+
var adapter;
|
1129
|
+
if (typeof XMLHttpRequest !== 'undefined') {
|
1130
|
+
// For browsers use XHR adapter
|
1131
|
+
adapter = __webpack_require__(/*! ./adapters/xhr */ "./lib/adapters/xhr.js");
|
1132
|
+
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
1133
|
+
// For node use HTTP adapter
|
1134
|
+
adapter = __webpack_require__(/*! ./adapters/http */ "./lib/adapters/xhr.js");
|
1135
|
+
}
|
1136
|
+
return adapter;
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
function stringifySafely(rawValue, parser, encoder) {
|
1140
|
+
if (utils.isString(rawValue)) {
|
1141
|
+
try {
|
1142
|
+
(parser || JSON.parse)(rawValue);
|
1143
|
+
return utils.trim(rawValue);
|
1144
|
+
} catch (e) {
|
1145
|
+
if (e.name !== 'SyntaxError') {
|
1146
|
+
throw e;
|
1147
|
+
}
|
1148
|
+
}
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
return (encoder || JSON.stringify)(rawValue);
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
var defaults = {
|
1155
|
+
|
1156
|
+
transitional: {
|
1157
|
+
silentJSONParsing: true,
|
1158
|
+
forcedJSONParsing: true,
|
1159
|
+
clarifyTimeoutError: false
|
1160
|
+
},
|
1161
|
+
|
1162
|
+
adapter: getDefaultAdapter(),
|
1163
|
+
|
1164
|
+
transformRequest: [function transformRequest(data, headers) {
|
1165
|
+
normalizeHeaderName(headers, 'Accept');
|
1166
|
+
normalizeHeaderName(headers, 'Content-Type');
|
1167
|
+
|
1168
|
+
if (utils.isFormData(data) ||
|
1169
|
+
utils.isArrayBuffer(data) ||
|
1170
|
+
utils.isBuffer(data) ||
|
1171
|
+
utils.isStream(data) ||
|
1172
|
+
utils.isFile(data) ||
|
1173
|
+
utils.isBlob(data)
|
1174
|
+
) {
|
1175
|
+
return data;
|
1176
|
+
}
|
1177
|
+
if (utils.isArrayBufferView(data)) {
|
1178
|
+
return data.buffer;
|
1179
|
+
}
|
1180
|
+
if (utils.isURLSearchParams(data)) {
|
1181
|
+
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
1182
|
+
return data.toString();
|
1183
|
+
}
|
1184
|
+
if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
|
1185
|
+
setContentTypeIfUnset(headers, 'application/json');
|
1186
|
+
return stringifySafely(data);
|
1187
|
+
}
|
1188
|
+
return data;
|
1189
|
+
}],
|
1190
|
+
|
1191
|
+
transformResponse: [function transformResponse(data) {
|
1192
|
+
var transitional = this.transitional;
|
1193
|
+
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
1194
|
+
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
1195
|
+
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
1196
|
+
|
1197
|
+
if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
|
1198
|
+
try {
|
1199
|
+
return JSON.parse(data);
|
1200
|
+
} catch (e) {
|
1201
|
+
if (strictJSONParsing) {
|
1202
|
+
if (e.name === 'SyntaxError') {
|
1203
|
+
throw enhanceError(e, this, 'E_JSON_PARSE');
|
1204
|
+
}
|
1205
|
+
throw e;
|
1206
|
+
}
|
1207
|
+
}
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
return data;
|
1211
|
+
}],
|
1212
|
+
|
1213
|
+
/**
|
1214
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
1215
|
+
* timeout is not created.
|
1216
|
+
*/
|
1217
|
+
timeout: 0,
|
1218
|
+
|
1219
|
+
xsrfCookieName: 'XSRF-TOKEN',
|
1220
|
+
xsrfHeaderName: 'X-XSRF-TOKEN',
|
1221
|
+
|
1222
|
+
maxContentLength: -1,
|
1223
|
+
maxBodyLength: -1,
|
1224
|
+
|
1225
|
+
validateStatus: function validateStatus(status) {
|
1226
|
+
return status >= 200 && status < 300;
|
1227
|
+
}
|
1228
|
+
};
|
1229
|
+
|
1230
|
+
defaults.headers = {
|
1231
|
+
common: {
|
1232
|
+
'Accept': 'application/json, text/plain, */*'
|
1233
|
+
}
|
1234
|
+
};
|
1235
|
+
|
1236
|
+
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
1237
|
+
defaults.headers[method] = {};
|
1238
|
+
});
|
1239
|
+
|
1240
|
+
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
1241
|
+
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
1242
|
+
});
|
1243
|
+
|
1244
|
+
module.exports = defaults;
|
1245
|
+
|
1246
|
+
|
1247
|
+
/***/ }),
|
1248
|
+
|
1249
|
+
/***/ "./lib/helpers/bind.js":
|
1250
|
+
/*!*****************************!*\
|
1251
|
+
!*** ./lib/helpers/bind.js ***!
|
1252
|
+
\*****************************/
|
1253
|
+
/*! no static exports found */
|
1254
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1255
|
+
|
1256
|
+
"use strict";
|
1257
|
+
|
1258
|
+
|
1259
|
+
module.exports = function bind(fn, thisArg) {
|
1260
|
+
return function wrap() {
|
1261
|
+
var args = new Array(arguments.length);
|
1262
|
+
for (var i = 0; i < args.length; i++) {
|
1263
|
+
args[i] = arguments[i];
|
1264
|
+
}
|
1265
|
+
return fn.apply(thisArg, args);
|
1266
|
+
};
|
1267
|
+
};
|
1268
|
+
|
1269
|
+
|
1270
|
+
/***/ }),
|
1271
|
+
|
1272
|
+
/***/ "./lib/helpers/buildURL.js":
|
1273
|
+
/*!*********************************!*\
|
1274
|
+
!*** ./lib/helpers/buildURL.js ***!
|
1275
|
+
\*********************************/
|
1276
|
+
/*! no static exports found */
|
1277
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1278
|
+
|
1279
|
+
"use strict";
|
1280
|
+
|
1281
|
+
|
1282
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1283
|
+
|
1284
|
+
function encode(val) {
|
1285
|
+
return encodeURIComponent(val).
|
1286
|
+
replace(/%3A/gi, ':').
|
1287
|
+
replace(/%24/g, '$').
|
1288
|
+
replace(/%2C/gi, ',').
|
1289
|
+
replace(/%20/g, '+').
|
1290
|
+
replace(/%5B/gi, '[').
|
1291
|
+
replace(/%5D/gi, ']');
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
/**
|
1295
|
+
* Build a URL by appending params to the end
|
1296
|
+
*
|
1297
|
+
* @param {string} url The base of the url (e.g., http://www.google.com)
|
1298
|
+
* @param {object} [params] The params to be appended
|
1299
|
+
* @returns {string} The formatted url
|
1300
|
+
*/
|
1301
|
+
module.exports = function buildURL(url, params, paramsSerializer) {
|
1302
|
+
/*eslint no-param-reassign:0*/
|
1303
|
+
if (!params) {
|
1304
|
+
return url;
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
var serializedParams;
|
1308
|
+
if (paramsSerializer) {
|
1309
|
+
serializedParams = paramsSerializer(params);
|
1310
|
+
} else if (utils.isURLSearchParams(params)) {
|
1311
|
+
serializedParams = params.toString();
|
1312
|
+
} else {
|
1313
|
+
var parts = [];
|
1314
|
+
|
1315
|
+
utils.forEach(params, function serialize(val, key) {
|
1316
|
+
if (val === null || typeof val === 'undefined') {
|
1317
|
+
return;
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
if (utils.isArray(val)) {
|
1321
|
+
key = key + '[]';
|
1322
|
+
} else {
|
1323
|
+
val = [val];
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
utils.forEach(val, function parseValue(v) {
|
1327
|
+
if (utils.isDate(v)) {
|
1328
|
+
v = v.toISOString();
|
1329
|
+
} else if (utils.isObject(v)) {
|
1330
|
+
v = JSON.stringify(v);
|
1331
|
+
}
|
1332
|
+
parts.push(encode(key) + '=' + encode(v));
|
1333
|
+
});
|
1334
|
+
});
|
1335
|
+
|
1336
|
+
serializedParams = parts.join('&');
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
if (serializedParams) {
|
1340
|
+
var hashmarkIndex = url.indexOf('#');
|
1341
|
+
if (hashmarkIndex !== -1) {
|
1342
|
+
url = url.slice(0, hashmarkIndex);
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
1346
|
+
}
|
1347
|
+
|
1348
|
+
return url;
|
1349
|
+
};
|
1350
|
+
|
1351
|
+
|
1352
|
+
/***/ }),
|
1353
|
+
|
1354
|
+
/***/ "./lib/helpers/combineURLs.js":
|
1355
|
+
/*!************************************!*\
|
1356
|
+
!*** ./lib/helpers/combineURLs.js ***!
|
1357
|
+
\************************************/
|
1358
|
+
/*! no static exports found */
|
1359
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1360
|
+
|
1361
|
+
"use strict";
|
1362
|
+
|
1363
|
+
|
1364
|
+
/**
|
1365
|
+
* Creates a new URL by combining the specified URLs
|
1366
|
+
*
|
1367
|
+
* @param {string} baseURL The base URL
|
1368
|
+
* @param {string} relativeURL The relative URL
|
1369
|
+
* @returns {string} The combined URL
|
1370
|
+
*/
|
1371
|
+
module.exports = function combineURLs(baseURL, relativeURL) {
|
1372
|
+
return relativeURL
|
1373
|
+
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
1374
|
+
: baseURL;
|
1375
|
+
};
|
1376
|
+
|
1377
|
+
|
1378
|
+
/***/ }),
|
1379
|
+
|
1380
|
+
/***/ "./lib/helpers/cookies.js":
|
1381
|
+
/*!********************************!*\
|
1382
|
+
!*** ./lib/helpers/cookies.js ***!
|
1383
|
+
\********************************/
|
1384
|
+
/*! no static exports found */
|
1385
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1386
|
+
|
1387
|
+
"use strict";
|
1388
|
+
|
1389
|
+
|
1390
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1391
|
+
|
1392
|
+
module.exports = (
|
1393
|
+
utils.isStandardBrowserEnv() ?
|
1394
|
+
|
1395
|
+
// Standard browser envs support document.cookie
|
1396
|
+
(function standardBrowserEnv() {
|
1397
|
+
return {
|
1398
|
+
write: function write(name, value, expires, path, domain, secure) {
|
1399
|
+
var cookie = [];
|
1400
|
+
cookie.push(name + '=' + encodeURIComponent(value));
|
1401
|
+
|
1402
|
+
if (utils.isNumber(expires)) {
|
1403
|
+
cookie.push('expires=' + new Date(expires).toGMTString());
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
if (utils.isString(path)) {
|
1407
|
+
cookie.push('path=' + path);
|
1408
|
+
}
|
1409
|
+
|
1410
|
+
if (utils.isString(domain)) {
|
1411
|
+
cookie.push('domain=' + domain);
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
if (secure === true) {
|
1415
|
+
cookie.push('secure');
|
1416
|
+
}
|
1417
|
+
|
1418
|
+
document.cookie = cookie.join('; ');
|
1419
|
+
},
|
1420
|
+
|
1421
|
+
read: function read(name) {
|
1422
|
+
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
1423
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
1424
|
+
},
|
1425
|
+
|
1426
|
+
remove: function remove(name) {
|
1427
|
+
this.write(name, '', Date.now() - 86400000);
|
1428
|
+
}
|
1429
|
+
};
|
1430
|
+
})() :
|
1431
|
+
|
1432
|
+
// Non standard browser env (web workers, react-native) lack needed support.
|
1433
|
+
(function nonStandardBrowserEnv() {
|
1434
|
+
return {
|
1435
|
+
write: function write() {},
|
1436
|
+
read: function read() { return null; },
|
1437
|
+
remove: function remove() {}
|
1438
|
+
};
|
1439
|
+
})()
|
1440
|
+
);
|
1441
|
+
|
1442
|
+
|
1443
|
+
/***/ }),
|
1444
|
+
|
1445
|
+
/***/ "./lib/helpers/isAbsoluteURL.js":
|
1446
|
+
/*!**************************************!*\
|
1447
|
+
!*** ./lib/helpers/isAbsoluteURL.js ***!
|
1448
|
+
\**************************************/
|
1449
|
+
/*! no static exports found */
|
1450
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1451
|
+
|
1452
|
+
"use strict";
|
1453
|
+
|
1454
|
+
|
1455
|
+
/**
|
1456
|
+
* Determines whether the specified URL is absolute
|
1457
|
+
*
|
1458
|
+
* @param {string} url The URL to test
|
1459
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
1460
|
+
*/
|
1461
|
+
module.exports = function isAbsoluteURL(url) {
|
1462
|
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
1463
|
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
1464
|
+
// by any combination of letters, digits, plus, period, or hyphen.
|
1465
|
+
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
1466
|
+
};
|
1467
|
+
|
1468
|
+
|
1469
|
+
/***/ }),
|
1470
|
+
|
1471
|
+
/***/ "./lib/helpers/isAxiosError.js":
|
1472
|
+
/*!*************************************!*\
|
1473
|
+
!*** ./lib/helpers/isAxiosError.js ***!
|
1474
|
+
\*************************************/
|
1475
|
+
/*! no static exports found */
|
1476
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1477
|
+
|
1478
|
+
"use strict";
|
1479
|
+
|
1480
|
+
|
1481
|
+
/**
|
1482
|
+
* Determines whether the payload is an error thrown by Axios
|
1483
|
+
*
|
1484
|
+
* @param {*} payload The value to test
|
1485
|
+
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
1486
|
+
*/
|
1487
|
+
module.exports = function isAxiosError(payload) {
|
1488
|
+
return (typeof payload === 'object') && (payload.isAxiosError === true);
|
1489
|
+
};
|
1490
|
+
|
1491
|
+
|
1492
|
+
/***/ }),
|
1493
|
+
|
1494
|
+
/***/ "./lib/helpers/isURLSameOrigin.js":
|
1495
|
+
/*!****************************************!*\
|
1496
|
+
!*** ./lib/helpers/isURLSameOrigin.js ***!
|
1497
|
+
\****************************************/
|
1498
|
+
/*! no static exports found */
|
1499
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1500
|
+
|
1501
|
+
"use strict";
|
1502
|
+
|
1503
|
+
|
1504
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1505
|
+
|
1506
|
+
module.exports = (
|
1507
|
+
utils.isStandardBrowserEnv() ?
|
1508
|
+
|
1509
|
+
// Standard browser envs have full support of the APIs needed to test
|
1510
|
+
// whether the request URL is of the same origin as current location.
|
1511
|
+
(function standardBrowserEnv() {
|
1512
|
+
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
1513
|
+
var urlParsingNode = document.createElement('a');
|
1514
|
+
var originURL;
|
1515
|
+
|
1516
|
+
/**
|
1517
|
+
* Parse a URL to discover it's components
|
1518
|
+
*
|
1519
|
+
* @param {String} url The URL to be parsed
|
1520
|
+
* @returns {Object}
|
1521
|
+
*/
|
1522
|
+
function resolveURL(url) {
|
1523
|
+
var href = url;
|
1524
|
+
|
1525
|
+
if (msie) {
|
1526
|
+
// IE needs attribute set twice to normalize properties
|
1527
|
+
urlParsingNode.setAttribute('href', href);
|
1528
|
+
href = urlParsingNode.href;
|
1529
|
+
}
|
1530
|
+
|
1531
|
+
urlParsingNode.setAttribute('href', href);
|
1532
|
+
|
1533
|
+
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
1534
|
+
return {
|
1535
|
+
href: urlParsingNode.href,
|
1536
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
1537
|
+
host: urlParsingNode.host,
|
1538
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
1539
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
1540
|
+
hostname: urlParsingNode.hostname,
|
1541
|
+
port: urlParsingNode.port,
|
1542
|
+
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
1543
|
+
urlParsingNode.pathname :
|
1544
|
+
'/' + urlParsingNode.pathname
|
1545
|
+
};
|
1546
|
+
}
|
1547
|
+
|
1548
|
+
originURL = resolveURL(window.location.href);
|
1549
|
+
|
1550
|
+
/**
|
1551
|
+
* Determine if a URL shares the same origin as the current location
|
1552
|
+
*
|
1553
|
+
* @param {String} requestURL The URL to test
|
1554
|
+
* @returns {boolean} True if URL shares the same origin, otherwise false
|
1555
|
+
*/
|
1556
|
+
return function isURLSameOrigin(requestURL) {
|
1557
|
+
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
1558
|
+
return (parsed.protocol === originURL.protocol &&
|
1559
|
+
parsed.host === originURL.host);
|
1560
|
+
};
|
1561
|
+
})() :
|
1562
|
+
|
1563
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
1564
|
+
(function nonStandardBrowserEnv() {
|
1565
|
+
return function isURLSameOrigin() {
|
1566
|
+
return true;
|
1567
|
+
};
|
1568
|
+
})()
|
1569
|
+
);
|
1570
|
+
|
1571
|
+
|
1572
|
+
/***/ }),
|
1573
|
+
|
1574
|
+
/***/ "./lib/helpers/normalizeHeaderName.js":
|
1575
|
+
/*!********************************************!*\
|
1576
|
+
!*** ./lib/helpers/normalizeHeaderName.js ***!
|
1577
|
+
\********************************************/
|
1578
|
+
/*! no static exports found */
|
1579
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1580
|
+
|
1581
|
+
"use strict";
|
1582
|
+
|
1583
|
+
|
1584
|
+
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
1585
|
+
|
1586
|
+
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
1587
|
+
utils.forEach(headers, function processHeader(value, name) {
|
1588
|
+
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
1589
|
+
headers[normalizedName] = value;
|
1590
|
+
delete headers[name];
|
1591
|
+
}
|
1592
|
+
});
|
1593
|
+
};
|
1594
|
+
|
1595
|
+
|
1596
|
+
/***/ }),
|
1597
|
+
|
1598
|
+
/***/ "./lib/helpers/parseHeaders.js":
|
1599
|
+
/*!*************************************!*\
|
1600
|
+
!*** ./lib/helpers/parseHeaders.js ***!
|
1601
|
+
\*************************************/
|
1602
|
+
/*! no static exports found */
|
1603
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1604
|
+
|
1605
|
+
"use strict";
|
1606
|
+
|
1607
|
+
|
1608
|
+
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1609
|
+
|
1610
|
+
// Headers whose duplicates are ignored by node
|
1611
|
+
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
1612
|
+
var ignoreDuplicateOf = [
|
1613
|
+
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
1614
|
+
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
1615
|
+
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
1616
|
+
'referer', 'retry-after', 'user-agent'
|
1617
|
+
];
|
1618
|
+
|
1619
|
+
/**
|
1620
|
+
* Parse headers into an object
|
1621
|
+
*
|
1622
|
+
* ```
|
1623
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
1624
|
+
* Content-Type: application/json
|
1625
|
+
* Connection: keep-alive
|
1626
|
+
* Transfer-Encoding: chunked
|
1627
|
+
* ```
|
1628
|
+
*
|
1629
|
+
* @param {String} headers Headers needing to be parsed
|
1630
|
+
* @returns {Object} Headers parsed into an object
|
1631
|
+
*/
|
1632
|
+
module.exports = function parseHeaders(headers) {
|
1633
|
+
var parsed = {};
|
1634
|
+
var key;
|
1635
|
+
var val;
|
1636
|
+
var i;
|
1637
|
+
|
1638
|
+
if (!headers) { return parsed; }
|
1639
|
+
|
1640
|
+
utils.forEach(headers.split('\n'), function parser(line) {
|
1641
|
+
i = line.indexOf(':');
|
1642
|
+
key = utils.trim(line.substr(0, i)).toLowerCase();
|
1643
|
+
val = utils.trim(line.substr(i + 1));
|
1644
|
+
|
1645
|
+
if (key) {
|
1646
|
+
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
1647
|
+
return;
|
1648
|
+
}
|
1649
|
+
if (key === 'set-cookie') {
|
1650
|
+
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
1651
|
+
} else {
|
1652
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
1653
|
+
}
|
1654
|
+
}
|
1655
|
+
});
|
1656
|
+
|
1657
|
+
return parsed;
|
1658
|
+
};
|
1659
|
+
|
1660
|
+
|
1661
|
+
/***/ }),
|
1662
|
+
|
1663
|
+
/***/ "./lib/helpers/spread.js":
|
1664
|
+
/*!*******************************!*\
|
1665
|
+
!*** ./lib/helpers/spread.js ***!
|
1666
|
+
\*******************************/
|
1667
|
+
/*! no static exports found */
|
1668
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1669
|
+
|
1670
|
+
"use strict";
|
1671
|
+
|
1672
|
+
|
1673
|
+
/**
|
1674
|
+
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
1675
|
+
*
|
1676
|
+
* Common use case would be to use `Function.prototype.apply`.
|
1677
|
+
*
|
1678
|
+
* ```js
|
1679
|
+
* function f(x, y, z) {}
|
1680
|
+
* var args = [1, 2, 3];
|
1681
|
+
* f.apply(null, args);
|
1682
|
+
* ```
|
1683
|
+
*
|
1684
|
+
* With `spread` this example can be re-written.
|
1685
|
+
*
|
1686
|
+
* ```js
|
1687
|
+
* spread(function(x, y, z) {})([1, 2, 3]);
|
1688
|
+
* ```
|
1689
|
+
*
|
1690
|
+
* @param {Function} callback
|
1691
|
+
* @returns {Function}
|
1692
|
+
*/
|
1693
|
+
module.exports = function spread(callback) {
|
1694
|
+
return function wrap(arr) {
|
1695
|
+
return callback.apply(null, arr);
|
1696
|
+
};
|
1697
|
+
};
|
1698
|
+
|
1699
|
+
|
1700
|
+
/***/ }),
|
1701
|
+
|
1702
|
+
/***/ "./lib/helpers/validator.js":
|
1703
|
+
/*!**********************************!*\
|
1704
|
+
!*** ./lib/helpers/validator.js ***!
|
1705
|
+
\**********************************/
|
1706
|
+
/*! no static exports found */
|
1707
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1708
|
+
|
1709
|
+
"use strict";
|
1710
|
+
|
1711
|
+
|
1712
|
+
var pkg = __webpack_require__(/*! ./../../package.json */ "./package.json");
|
1713
|
+
|
1714
|
+
var validators = {};
|
1715
|
+
|
1716
|
+
// eslint-disable-next-line func-names
|
1717
|
+
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
|
1718
|
+
validators[type] = function validator(thing) {
|
1719
|
+
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
1720
|
+
};
|
1721
|
+
});
|
1722
|
+
|
1723
|
+
var deprecatedWarnings = {};
|
1724
|
+
var currentVerArr = pkg.version.split('.');
|
1725
|
+
|
1726
|
+
/**
|
1727
|
+
* Compare package versions
|
1728
|
+
* @param {string} version
|
1729
|
+
* @param {string?} thanVersion
|
1730
|
+
* @returns {boolean}
|
1731
|
+
*/
|
1732
|
+
function isOlderVersion(version, thanVersion) {
|
1733
|
+
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
|
1734
|
+
var destVer = version.split('.');
|
1735
|
+
for (var i = 0; i < 3; i++) {
|
1736
|
+
if (pkgVersionArr[i] > destVer[i]) {
|
1737
|
+
return true;
|
1738
|
+
} else if (pkgVersionArr[i] < destVer[i]) {
|
1739
|
+
return false;
|
1740
|
+
}
|
1741
|
+
}
|
1742
|
+
return false;
|
1743
|
+
}
|
1744
|
+
|
1745
|
+
/**
|
1746
|
+
* Transitional option validator
|
1747
|
+
* @param {function|boolean?} validator
|
1748
|
+
* @param {string?} version
|
1749
|
+
* @param {string} message
|
1750
|
+
* @returns {function}
|
1751
|
+
*/
|
1752
|
+
validators.transitional = function transitional(validator, version, message) {
|
1753
|
+
var isDeprecated = version && isOlderVersion(version);
|
1754
|
+
|
1755
|
+
function formatMessage(opt, desc) {
|
1756
|
+
return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
1757
|
+
}
|
1758
|
+
|
1759
|
+
// eslint-disable-next-line func-names
|
1760
|
+
return function(value, opt, opts) {
|
1761
|
+
if (validator === false) {
|
1762
|
+
throw new Error(formatMessage(opt, ' has been removed in ' + version));
|
1763
|
+
}
|
1764
|
+
|
1765
|
+
if (isDeprecated && !deprecatedWarnings[opt]) {
|
1766
|
+
deprecatedWarnings[opt] = true;
|
1767
|
+
// eslint-disable-next-line no-console
|
1768
|
+
console.warn(
|
1769
|
+
formatMessage(
|
1770
|
+
opt,
|
1771
|
+
' has been deprecated since v' + version + ' and will be removed in the near future'
|
1772
|
+
)
|
1773
|
+
);
|
1774
|
+
}
|
1775
|
+
|
1776
|
+
return validator ? validator(value, opt, opts) : true;
|
1777
|
+
};
|
1778
|
+
};
|
1779
|
+
|
1780
|
+
/**
|
1781
|
+
* Assert object's properties type
|
1782
|
+
* @param {object} options
|
1783
|
+
* @param {object} schema
|
1784
|
+
* @param {boolean?} allowUnknown
|
1785
|
+
*/
|
1786
|
+
|
1787
|
+
function assertOptions(options, schema, allowUnknown) {
|
1788
|
+
if (typeof options !== 'object') {
|
1789
|
+
throw new TypeError('options must be an object');
|
1790
|
+
}
|
1791
|
+
var keys = Object.keys(options);
|
1792
|
+
var i = keys.length;
|
1793
|
+
while (i-- > 0) {
|
1794
|
+
var opt = keys[i];
|
1795
|
+
var validator = schema[opt];
|
1796
|
+
if (validator) {
|
1797
|
+
var value = options[opt];
|
1798
|
+
var result = value === undefined || validator(value, opt, options);
|
1799
|
+
if (result !== true) {
|
1800
|
+
throw new TypeError('option ' + opt + ' must be ' + result);
|
1801
|
+
}
|
1802
|
+
continue;
|
1803
|
+
}
|
1804
|
+
if (allowUnknown !== true) {
|
1805
|
+
throw Error('Unknown option ' + opt);
|
1806
|
+
}
|
1807
|
+
}
|
1808
|
+
}
|
1809
|
+
|
1810
|
+
module.exports = {
|
1811
|
+
isOlderVersion: isOlderVersion,
|
1812
|
+
assertOptions: assertOptions,
|
1813
|
+
validators: validators
|
1814
|
+
};
|
1815
|
+
|
1816
|
+
|
1817
|
+
/***/ }),
|
1818
|
+
|
1819
|
+
/***/ "./lib/utils.js":
|
1820
|
+
/*!**********************!*\
|
1821
|
+
!*** ./lib/utils.js ***!
|
1822
|
+
\**********************/
|
1823
|
+
/*! no static exports found */
|
1824
|
+
/***/ (function(module, exports, __webpack_require__) {
|
1825
|
+
|
1826
|
+
"use strict";
|
1827
|
+
|
1828
|
+
|
1829
|
+
var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js");
|
1830
|
+
|
1831
|
+
// utils is a library of generic helper functions non-specific to axios
|
1832
|
+
|
1833
|
+
var toString = Object.prototype.toString;
|
1834
|
+
|
1835
|
+
/**
|
1836
|
+
* Determine if a value is an Array
|
1837
|
+
*
|
1838
|
+
* @param {Object} val The value to test
|
1839
|
+
* @returns {boolean} True if value is an Array, otherwise false
|
1840
|
+
*/
|
1841
|
+
function isArray(val) {
|
1842
|
+
return toString.call(val) === '[object Array]';
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
/**
|
1846
|
+
* Determine if a value is undefined
|
1847
|
+
*
|
1848
|
+
* @param {Object} val The value to test
|
1849
|
+
* @returns {boolean} True if the value is undefined, otherwise false
|
1850
|
+
*/
|
1851
|
+
function isUndefined(val) {
|
1852
|
+
return typeof val === 'undefined';
|
1853
|
+
}
|
1854
|
+
|
1855
|
+
/**
|
1856
|
+
* Determine if a value is a Buffer
|
1857
|
+
*
|
1858
|
+
* @param {Object} val The value to test
|
1859
|
+
* @returns {boolean} True if value is a Buffer, otherwise false
|
1860
|
+
*/
|
1861
|
+
function isBuffer(val) {
|
1862
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
1863
|
+
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
/**
|
1867
|
+
* Determine if a value is an ArrayBuffer
|
1868
|
+
*
|
1869
|
+
* @param {Object} val The value to test
|
1870
|
+
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
1871
|
+
*/
|
1872
|
+
function isArrayBuffer(val) {
|
1873
|
+
return toString.call(val) === '[object ArrayBuffer]';
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
/**
|
1877
|
+
* Determine if a value is a FormData
|
1878
|
+
*
|
1879
|
+
* @param {Object} val The value to test
|
1880
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
1881
|
+
*/
|
1882
|
+
function isFormData(val) {
|
1883
|
+
return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
1884
|
+
}
|
1885
|
+
|
1886
|
+
/**
|
1887
|
+
* Determine if a value is a view on an ArrayBuffer
|
1888
|
+
*
|
1889
|
+
* @param {Object} val The value to test
|
1890
|
+
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
1891
|
+
*/
|
1892
|
+
function isArrayBufferView(val) {
|
1893
|
+
var result;
|
1894
|
+
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
1895
|
+
result = ArrayBuffer.isView(val);
|
1896
|
+
} else {
|
1897
|
+
result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
|
1898
|
+
}
|
1899
|
+
return result;
|
1900
|
+
}
|
1901
|
+
|
1902
|
+
/**
|
1903
|
+
* Determine if a value is a String
|
1904
|
+
*
|
1905
|
+
* @param {Object} val The value to test
|
1906
|
+
* @returns {boolean} True if value is a String, otherwise false
|
1907
|
+
*/
|
1908
|
+
function isString(val) {
|
1909
|
+
return typeof val === 'string';
|
1910
|
+
}
|
1911
|
+
|
1912
|
+
/**
|
1913
|
+
* Determine if a value is a Number
|
1914
|
+
*
|
1915
|
+
* @param {Object} val The value to test
|
1916
|
+
* @returns {boolean} True if value is a Number, otherwise false
|
1917
|
+
*/
|
1918
|
+
function isNumber(val) {
|
1919
|
+
return typeof val === 'number';
|
1920
|
+
}
|
1921
|
+
|
1922
|
+
/**
|
1923
|
+
* Determine if a value is an Object
|
1924
|
+
*
|
1925
|
+
* @param {Object} val The value to test
|
1926
|
+
* @returns {boolean} True if value is an Object, otherwise false
|
1927
|
+
*/
|
1928
|
+
function isObject(val) {
|
1929
|
+
return val !== null && typeof val === 'object';
|
1930
|
+
}
|
1931
|
+
|
1932
|
+
/**
|
1933
|
+
* Determine if a value is a plain Object
|
1934
|
+
*
|
1935
|
+
* @param {Object} val The value to test
|
1936
|
+
* @return {boolean} True if value is a plain Object, otherwise false
|
1937
|
+
*/
|
1938
|
+
function isPlainObject(val) {
|
1939
|
+
if (toString.call(val) !== '[object Object]') {
|
1940
|
+
return false;
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
var prototype = Object.getPrototypeOf(val);
|
1944
|
+
return prototype === null || prototype === Object.prototype;
|
1945
|
+
}
|
1946
|
+
|
1947
|
+
/**
|
1948
|
+
* Determine if a value is a Date
|
1949
|
+
*
|
1950
|
+
* @param {Object} val The value to test
|
1951
|
+
* @returns {boolean} True if value is a Date, otherwise false
|
1952
|
+
*/
|
1953
|
+
function isDate(val) {
|
1954
|
+
return toString.call(val) === '[object Date]';
|
1955
|
+
}
|
1956
|
+
|
1957
|
+
/**
|
1958
|
+
* Determine if a value is a File
|
1959
|
+
*
|
1960
|
+
* @param {Object} val The value to test
|
1961
|
+
* @returns {boolean} True if value is a File, otherwise false
|
1962
|
+
*/
|
1963
|
+
function isFile(val) {
|
1964
|
+
return toString.call(val) === '[object File]';
|
1965
|
+
}
|
1966
|
+
|
1967
|
+
/**
|
1968
|
+
* Determine if a value is a Blob
|
1969
|
+
*
|
1970
|
+
* @param {Object} val The value to test
|
1971
|
+
* @returns {boolean} True if value is a Blob, otherwise false
|
1972
|
+
*/
|
1973
|
+
function isBlob(val) {
|
1974
|
+
return toString.call(val) === '[object Blob]';
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
/**
|
1978
|
+
* Determine if a value is a Function
|
1979
|
+
*
|
1980
|
+
* @param {Object} val The value to test
|
1981
|
+
* @returns {boolean} True if value is a Function, otherwise false
|
1982
|
+
*/
|
1983
|
+
function isFunction(val) {
|
1984
|
+
return toString.call(val) === '[object Function]';
|
1985
|
+
}
|
1986
|
+
|
1987
|
+
/**
|
1988
|
+
* Determine if a value is a Stream
|
1989
|
+
*
|
1990
|
+
* @param {Object} val The value to test
|
1991
|
+
* @returns {boolean} True if value is a Stream, otherwise false
|
1992
|
+
*/
|
1993
|
+
function isStream(val) {
|
1994
|
+
return isObject(val) && isFunction(val.pipe);
|
1995
|
+
}
|
1996
|
+
|
1997
|
+
/**
|
1998
|
+
* Determine if a value is a URLSearchParams object
|
1999
|
+
*
|
2000
|
+
* @param {Object} val The value to test
|
2001
|
+
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
2002
|
+
*/
|
2003
|
+
function isURLSearchParams(val) {
|
2004
|
+
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
2005
|
+
}
|
2006
|
+
|
2007
|
+
/**
|
2008
|
+
* Trim excess whitespace off the beginning and end of a string
|
2009
|
+
*
|
2010
|
+
* @param {String} str The String to trim
|
2011
|
+
* @returns {String} The String freed of excess whitespace
|
2012
|
+
*/
|
2013
|
+
function trim(str) {
|
2014
|
+
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
|
2015
|
+
}
|
2016
|
+
|
2017
|
+
/**
|
2018
|
+
* Determine if we're running in a standard browser environment
|
2019
|
+
*
|
2020
|
+
* This allows axios to run in a web worker, and react-native.
|
2021
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
2022
|
+
*
|
2023
|
+
* web workers:
|
2024
|
+
* typeof window -> undefined
|
2025
|
+
* typeof document -> undefined
|
2026
|
+
*
|
2027
|
+
* react-native:
|
2028
|
+
* navigator.product -> 'ReactNative'
|
2029
|
+
* nativescript
|
2030
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
2031
|
+
*/
|
2032
|
+
function isStandardBrowserEnv() {
|
2033
|
+
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
2034
|
+
navigator.product === 'NativeScript' ||
|
2035
|
+
navigator.product === 'NS')) {
|
2036
|
+
return false;
|
2037
|
+
}
|
2038
|
+
return (
|
2039
|
+
typeof window !== 'undefined' &&
|
2040
|
+
typeof document !== 'undefined'
|
2041
|
+
);
|
2042
|
+
}
|
2043
|
+
|
2044
|
+
/**
|
2045
|
+
* Iterate over an Array or an Object invoking a function for each item.
|
2046
|
+
*
|
2047
|
+
* If `obj` is an Array callback will be called passing
|
2048
|
+
* the value, index, and complete array for each item.
|
2049
|
+
*
|
2050
|
+
* If 'obj' is an Object callback will be called passing
|
2051
|
+
* the value, key, and complete object for each property.
|
2052
|
+
*
|
2053
|
+
* @param {Object|Array} obj The object to iterate
|
2054
|
+
* @param {Function} fn The callback to invoke for each item
|
2055
|
+
*/
|
2056
|
+
function forEach(obj, fn) {
|
2057
|
+
// Don't bother if no value provided
|
2058
|
+
if (obj === null || typeof obj === 'undefined') {
|
2059
|
+
return;
|
2060
|
+
}
|
2061
|
+
|
2062
|
+
// Force an array if not already something iterable
|
2063
|
+
if (typeof obj !== 'object') {
|
2064
|
+
/*eslint no-param-reassign:0*/
|
2065
|
+
obj = [obj];
|
2066
|
+
}
|
2067
|
+
|
2068
|
+
if (isArray(obj)) {
|
2069
|
+
// Iterate over array values
|
2070
|
+
for (var i = 0, l = obj.length; i < l; i++) {
|
2071
|
+
fn.call(null, obj[i], i, obj);
|
2072
|
+
}
|
2073
|
+
} else {
|
2074
|
+
// Iterate over object keys
|
2075
|
+
for (var key in obj) {
|
2076
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
2077
|
+
fn.call(null, obj[key], key, obj);
|
2078
|
+
}
|
2079
|
+
}
|
2080
|
+
}
|
2081
|
+
}
|
2082
|
+
|
2083
|
+
/**
|
2084
|
+
* Accepts varargs expecting each argument to be an object, then
|
2085
|
+
* immutably merges the properties of each object and returns result.
|
2086
|
+
*
|
2087
|
+
* When multiple objects contain the same key the later object in
|
2088
|
+
* the arguments list will take precedence.
|
2089
|
+
*
|
2090
|
+
* Example:
|
2091
|
+
*
|
2092
|
+
* ```js
|
2093
|
+
* var result = merge({foo: 123}, {foo: 456});
|
2094
|
+
* console.log(result.foo); // outputs 456
|
2095
|
+
* ```
|
2096
|
+
*
|
2097
|
+
* @param {Object} obj1 Object to merge
|
2098
|
+
* @returns {Object} Result of all merge properties
|
2099
|
+
*/
|
2100
|
+
function merge(/* obj1, obj2, obj3, ... */) {
|
2101
|
+
var result = {};
|
2102
|
+
function assignValue(val, key) {
|
2103
|
+
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
2104
|
+
result[key] = merge(result[key], val);
|
2105
|
+
} else if (isPlainObject(val)) {
|
2106
|
+
result[key] = merge({}, val);
|
2107
|
+
} else if (isArray(val)) {
|
2108
|
+
result[key] = val.slice();
|
2109
|
+
} else {
|
2110
|
+
result[key] = val;
|
2111
|
+
}
|
2112
|
+
}
|
2113
|
+
|
2114
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
2115
|
+
forEach(arguments[i], assignValue);
|
2116
|
+
}
|
2117
|
+
return result;
|
2118
|
+
}
|
2119
|
+
|
2120
|
+
/**
|
2121
|
+
* Extends object a by mutably adding to it the properties of object b.
|
2122
|
+
*
|
2123
|
+
* @param {Object} a The object to be extended
|
2124
|
+
* @param {Object} b The object to copy properties from
|
2125
|
+
* @param {Object} thisArg The object to bind function to
|
2126
|
+
* @return {Object} The resulting value of object a
|
2127
|
+
*/
|
2128
|
+
function extend(a, b, thisArg) {
|
2129
|
+
forEach(b, function assignValue(val, key) {
|
2130
|
+
if (thisArg && typeof val === 'function') {
|
2131
|
+
a[key] = bind(val, thisArg);
|
2132
|
+
} else {
|
2133
|
+
a[key] = val;
|
2134
|
+
}
|
2135
|
+
});
|
2136
|
+
return a;
|
2137
|
+
}
|
2138
|
+
|
2139
|
+
/**
|
2140
|
+
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
2141
|
+
*
|
2142
|
+
* @param {string} content with BOM
|
2143
|
+
* @return {string} content value without BOM
|
2144
|
+
*/
|
2145
|
+
function stripBOM(content) {
|
2146
|
+
if (content.charCodeAt(0) === 0xFEFF) {
|
2147
|
+
content = content.slice(1);
|
2148
|
+
}
|
2149
|
+
return content;
|
2150
|
+
}
|
2151
|
+
|
2152
|
+
module.exports = {
|
2153
|
+
isArray: isArray,
|
2154
|
+
isArrayBuffer: isArrayBuffer,
|
2155
|
+
isBuffer: isBuffer,
|
2156
|
+
isFormData: isFormData,
|
2157
|
+
isArrayBufferView: isArrayBufferView,
|
2158
|
+
isString: isString,
|
2159
|
+
isNumber: isNumber,
|
2160
|
+
isObject: isObject,
|
2161
|
+
isPlainObject: isPlainObject,
|
2162
|
+
isUndefined: isUndefined,
|
2163
|
+
isDate: isDate,
|
2164
|
+
isFile: isFile,
|
2165
|
+
isBlob: isBlob,
|
2166
|
+
isFunction: isFunction,
|
2167
|
+
isStream: isStream,
|
2168
|
+
isURLSearchParams: isURLSearchParams,
|
2169
|
+
isStandardBrowserEnv: isStandardBrowserEnv,
|
2170
|
+
forEach: forEach,
|
2171
|
+
merge: merge,
|
2172
|
+
extend: extend,
|
2173
|
+
trim: trim,
|
2174
|
+
stripBOM: stripBOM
|
2175
|
+
};
|
2176
|
+
|
2177
|
+
|
2178
|
+
/***/ }),
|
2179
|
+
|
2180
|
+
/***/ "./package.json":
|
2181
|
+
/*!**********************!*\
|
2182
|
+
!*** ./package.json ***!
|
2183
|
+
\**********************/
|
2184
|
+
/*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
|
2185
|
+
/***/ (function(module) {
|
2186
|
+
|
2187
|
+
module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.4\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://axios-http.com\",\"devDependencies\":{\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.3.0\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^23.0.0\",\"grunt-karma\":\"^4.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^4.0.2\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^6.3.2\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-firefox-launcher\":\"^2.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^4.3.6\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^8.2.1\",\"sinon\":\"^4.5.0\",\"terser-webpack-plugin\":\"^4.2.3\",\"typescript\":\"^4.0.5\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^4.44.2\",\"webpack-dev-server\":\"^3.11.0\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.14.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}");
|
2188
|
+
|
2189
|
+
/***/ })
|
2190
|
+
|
2191
|
+
/******/ });
|
2192
|
+
});
|
2193
|
+
//# sourceMappingURL=axios.map
|