@wopee-io/wopee.wdio 5.2.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/build/domain/model/config.interface.d.ts +9 -9
- package/build/utils/versionMetadata.d.ts.map +1 -1
- package/build/utils/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +52 -20
- package/node_modules/@autonomous-testing/sdk/README.md +129 -36
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.js +3 -1
- package/node_modules/@autonomous-testing/sdk/build/index.d.ts +0 -1
- package/node_modules/@autonomous-testing/sdk/build/index.js +0 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +6 -8
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.d.ts +16 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.js +121 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/errors.d.ts +20 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/errors.js +178 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +1 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +4 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +14 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +6 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.d.ts +13 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.js +8 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/package.json +27 -11
- package/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/agent-base/README.md +69 -0
- package/node_modules/agent-base/dist/helpers.d.ts +15 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- package/node_modules/agent-base/dist/helpers.js +66 -0
- package/node_modules/agent-base/dist/helpers.js.map +1 -0
- package/node_modules/agent-base/dist/index.d.ts +41 -0
- package/node_modules/agent-base/dist/index.d.ts.map +1 -0
- package/node_modules/agent-base/dist/index.js +178 -0
- package/node_modules/agent-base/dist/index.js.map +1 -0
- package/node_modules/agent-base/package.json +46 -0
- package/node_modules/axios/CHANGELOG.md +1934 -1039
- package/node_modules/axios/LICENSE +4 -16
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2047 -378
- package/node_modules/axios/dist/axios.js +4784 -1364
- package/node_modules/axios/dist/axios.min.js +4 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +5829 -0
- package/node_modules/axios/dist/esm/axios.js +5073 -1602
- package/node_modules/axios/dist/esm/axios.min.js +2 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/node_modules/axios/index.d.cts +766 -0
- package/node_modules/axios/index.d.ts +582 -136
- package/node_modules/axios/index.js +45 -1
- package/node_modules/axios/lib/adapters/README.md +5 -6
- package/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/axios/lib/adapters/fetch.js +696 -0
- package/node_modules/axios/lib/adapters/http.js +1385 -358
- package/node_modules/axios/lib/adapters/xhr.js +247 -196
- package/node_modules/axios/lib/axios.js +47 -26
- package/node_modules/axios/lib/cancel/CancelToken.js +103 -86
- package/node_modules/axios/lib/cancel/CanceledError.js +17 -19
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +255 -125
- package/node_modules/axios/lib/core/AxiosError.js +196 -74
- package/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +162 -54
- package/node_modules/axios/lib/core/buildFullPath.js +60 -7
- package/node_modules/axios/lib/core/dispatchRequest.js +61 -60
- package/node_modules/axios/lib/core/mergeConfig.js +130 -59
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/core/settle.js +7 -5
- package/node_modules/axios/lib/core/transformData.js +15 -10
- package/node_modules/axios/lib/defaults/index.js +114 -111
- package/node_modules/axios/lib/defaults/transitional.js +5 -2
- package/node_modules/axios/lib/env/classes/FormData.js +2 -2
- package/node_modules/axios/lib/env/data.js +1 -3
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +31 -14
- package/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/axios/lib/helpers/bind.js +9 -2
- package/node_modules/axios/lib/helpers/buildURL.js +42 -28
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +14 -5
- package/node_modules/axios/lib/helpers/composeSignals.js +68 -0
- package/node_modules/axios/lib/helpers/cookies.js +56 -45
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +13 -6
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +74 -23
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +32 -14
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +7 -2
- package/node_modules/axios/lib/helpers/isAxiosError.js +5 -4
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -68
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/null.js +1 -1
- package/node_modules/axios/lib/helpers/parseHeaders.js +43 -25
- package/node_modules/axios/lib/helpers/parseProtocol.js +4 -4
- package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +4 -3
- package/node_modules/axios/lib/helpers/throttle.js +45 -0
- package/node_modules/axios/lib/helpers/toFormData.js +152 -52
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +10 -9
- package/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/axios/lib/helpers/validator.js +44 -18
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +1 -1
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +2 -3
- package/node_modules/axios/lib/platform/browser/index.js +8 -6
- package/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/axios/lib/platform/index.js +6 -2
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +2 -2
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +2 -3
- package/node_modules/axios/lib/platform/node/index.js +32 -6
- package/node_modules/axios/lib/utils.js +866 -238
- package/node_modules/axios/node_modules/agent-base/README.md +145 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/package.json +178 -75
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/dotenv/CHANGELOG.md +520 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +411 -0
- package/node_modules/dotenv/README.md +645 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +162 -0
- package/node_modules/dotenv/lib/main.js +386 -0
- package/node_modules/dotenv/package.json +62 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/follow-redirects/README.md +7 -5
- package/node_modules/follow-redirects/index.js +45 -8
- package/node_modules/follow-redirects/package.json +2 -2
- package/node_modules/form-data/CHANGELOG.md +686 -0
- package/node_modules/form-data/{README.md.bak → README.md} +34 -37
- package/node_modules/form-data/lib/browser.js +3 -1
- package/node_modules/form-data/lib/form_data.js +152 -147
- package/node_modules/form-data/lib/populate.js +5 -5
- package/node_modules/form-data/package.json +43 -29
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/{process → http-proxy-agent}/LICENSE +1 -1
- package/node_modules/http-proxy-agent/README.md +44 -0
- package/node_modules/http-proxy-agent/dist/index.d.ts +44 -0
- package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/http-proxy-agent/dist/index.js +148 -0
- package/node_modules/http-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/http-proxy-agent/package.json +47 -0
- package/node_modules/https-proxy-agent/LICENSE +22 -0
- package/node_modules/https-proxy-agent/README.md +70 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +47 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.js +180 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +15 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +101 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +50 -0
- package/node_modules/lodash/LICENSE +47 -0
- package/node_modules/lodash/README.md +39 -0
- package/node_modules/lodash/_DataView.js +7 -0
- package/node_modules/lodash/_Hash.js +32 -0
- package/node_modules/lodash/_LazyWrapper.js +28 -0
- package/node_modules/lodash/_ListCache.js +32 -0
- package/node_modules/lodash/_LodashWrapper.js +22 -0
- package/node_modules/lodash/_Map.js +7 -0
- package/node_modules/lodash/_MapCache.js +32 -0
- package/node_modules/lodash/_Promise.js +7 -0
- package/node_modules/lodash/_Set.js +7 -0
- package/node_modules/lodash/_SetCache.js +27 -0
- package/node_modules/lodash/_Stack.js +27 -0
- package/node_modules/lodash/_Symbol.js +6 -0
- package/node_modules/lodash/_Uint8Array.js +6 -0
- package/node_modules/lodash/_WeakMap.js +7 -0
- package/node_modules/lodash/_apply.js +21 -0
- package/node_modules/lodash/_arrayAggregator.js +22 -0
- package/node_modules/lodash/_arrayEach.js +22 -0
- package/node_modules/lodash/_arrayEachRight.js +21 -0
- package/node_modules/lodash/_arrayEvery.js +23 -0
- package/node_modules/lodash/_arrayFilter.js +25 -0
- package/node_modules/lodash/_arrayIncludes.js +17 -0
- package/node_modules/lodash/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash/_arrayMap.js +21 -0
- package/node_modules/lodash/_arrayPush.js +20 -0
- package/node_modules/lodash/_arrayReduce.js +26 -0
- package/node_modules/lodash/_arrayReduceRight.js +24 -0
- package/node_modules/lodash/_arraySample.js +15 -0
- package/node_modules/lodash/_arraySampleSize.js +17 -0
- package/node_modules/lodash/_arrayShuffle.js +15 -0
- package/node_modules/lodash/_arraySome.js +23 -0
- package/node_modules/lodash/_asciiSize.js +12 -0
- package/node_modules/lodash/_asciiToArray.js +12 -0
- package/node_modules/lodash/_asciiWords.js +15 -0
- package/node_modules/lodash/_assignMergeValue.js +20 -0
- package/node_modules/lodash/_assignValue.js +28 -0
- package/node_modules/lodash/_assocIndexOf.js +21 -0
- package/node_modules/lodash/_baseAggregator.js +21 -0
- package/node_modules/lodash/_baseAssign.js +17 -0
- package/node_modules/lodash/_baseAssignIn.js +17 -0
- package/node_modules/lodash/_baseAssignValue.js +25 -0
- package/node_modules/lodash/_baseAt.js +23 -0
- package/node_modules/lodash/_baseClamp.js +22 -0
- package/node_modules/lodash/_baseClone.js +166 -0
- package/node_modules/lodash/_baseConforms.js +18 -0
- package/node_modules/lodash/_baseConformsTo.js +27 -0
- package/node_modules/lodash/_baseCreate.js +30 -0
- package/node_modules/lodash/_baseDelay.js +21 -0
- package/node_modules/lodash/_baseDifference.js +67 -0
- package/node_modules/lodash/_baseEach.js +14 -0
- package/node_modules/lodash/_baseEachRight.js +14 -0
- package/node_modules/lodash/_baseEvery.js +21 -0
- package/node_modules/lodash/_baseExtremum.js +32 -0
- package/node_modules/lodash/_baseFill.js +32 -0
- package/node_modules/lodash/_baseFilter.js +21 -0
- package/node_modules/lodash/_baseFindIndex.js +24 -0
- package/node_modules/lodash/_baseFindKey.js +23 -0
- package/node_modules/lodash/_baseFlatten.js +38 -0
- package/node_modules/lodash/_baseFor.js +16 -0
- package/node_modules/lodash/_baseForOwn.js +16 -0
- package/node_modules/lodash/_baseForOwnRight.js +16 -0
- package/node_modules/lodash/_baseForRight.js +15 -0
- package/node_modules/lodash/_baseFunctions.js +19 -0
- package/node_modules/lodash/_baseGet.js +24 -0
- package/node_modules/lodash/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash/_baseGetTag.js +28 -0
- package/node_modules/lodash/_baseGt.js +14 -0
- package/node_modules/lodash/_baseHas.js +19 -0
- package/node_modules/lodash/_baseHasIn.js +13 -0
- package/node_modules/lodash/_baseInRange.js +18 -0
- package/node_modules/lodash/_baseIndexOf.js +20 -0
- package/node_modules/lodash/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash/_baseIntersection.js +74 -0
- package/node_modules/lodash/_baseInverter.js +21 -0
- package/node_modules/lodash/_baseInvoke.js +24 -0
- package/node_modules/lodash/_baseIsArguments.js +18 -0
- package/node_modules/lodash/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash/_baseIsDate.js +18 -0
- package/node_modules/lodash/_baseIsEqual.js +28 -0
- package/node_modules/lodash/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash/_baseIsMap.js +18 -0
- package/node_modules/lodash/_baseIsMatch.js +62 -0
- package/node_modules/lodash/_baseIsNaN.js +12 -0
- package/node_modules/lodash/_baseIsNative.js +47 -0
- package/node_modules/lodash/_baseIsRegExp.js +18 -0
- package/node_modules/lodash/_baseIsSet.js +18 -0
- package/node_modules/lodash/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash/_baseIteratee.js +31 -0
- package/node_modules/lodash/_baseKeys.js +30 -0
- package/node_modules/lodash/_baseKeysIn.js +33 -0
- package/node_modules/lodash/_baseLodash.js +10 -0
- package/node_modules/lodash/_baseLt.js +14 -0
- package/node_modules/lodash/_baseMap.js +22 -0
- package/node_modules/lodash/_baseMatches.js +22 -0
- package/node_modules/lodash/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash/_baseMean.js +20 -0
- package/node_modules/lodash/_baseMerge.js +42 -0
- package/node_modules/lodash/_baseMergeDeep.js +94 -0
- package/node_modules/lodash/_baseNth.js +20 -0
- package/node_modules/lodash/_baseOrderBy.js +49 -0
- package/node_modules/lodash/_basePick.js +19 -0
- package/node_modules/lodash/_basePickBy.js +30 -0
- package/node_modules/lodash/_baseProperty.js +14 -0
- package/node_modules/lodash/_basePropertyDeep.js +16 -0
- package/node_modules/lodash/_basePropertyOf.js +14 -0
- package/node_modules/lodash/_basePullAll.js +51 -0
- package/node_modules/lodash/_basePullAt.js +37 -0
- package/node_modules/lodash/_baseRandom.js +18 -0
- package/node_modules/lodash/_baseRange.js +28 -0
- package/node_modules/lodash/_baseReduce.js +23 -0
- package/node_modules/lodash/_baseRepeat.js +35 -0
- package/node_modules/lodash/_baseRest.js +17 -0
- package/node_modules/lodash/_baseSample.js +15 -0
- package/node_modules/lodash/_baseSampleSize.js +18 -0
- package/node_modules/lodash/_baseSet.js +51 -0
- package/node_modules/lodash/_baseSetData.js +17 -0
- package/node_modules/lodash/_baseSetToString.js +22 -0
- package/node_modules/lodash/_baseShuffle.js +15 -0
- package/node_modules/lodash/_baseSlice.js +31 -0
- package/node_modules/lodash/_baseSome.js +22 -0
- package/node_modules/lodash/_baseSortBy.js +21 -0
- package/node_modules/lodash/_baseSortedIndex.js +42 -0
- package/node_modules/lodash/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash/_baseSortedUniq.js +30 -0
- package/node_modules/lodash/_baseSum.js +24 -0
- package/node_modules/lodash/_baseTimes.js +20 -0
- package/node_modules/lodash/_baseToNumber.js +24 -0
- package/node_modules/lodash/_baseToPairs.js +18 -0
- package/node_modules/lodash/_baseToString.js +37 -0
- package/node_modules/lodash/_baseTrim.js +19 -0
- package/node_modules/lodash/_baseUnary.js +14 -0
- package/node_modules/lodash/_baseUniq.js +72 -0
- package/node_modules/lodash/_baseUnset.js +52 -0
- package/node_modules/lodash/_baseUpdate.js +18 -0
- package/node_modules/lodash/_baseValues.js +19 -0
- package/node_modules/lodash/_baseWhile.js +26 -0
- package/node_modules/lodash/_baseWrapperValue.js +25 -0
- package/node_modules/lodash/_baseXor.js +36 -0
- package/node_modules/lodash/_baseZipObject.js +23 -0
- package/node_modules/lodash/_cacheHas.js +13 -0
- package/node_modules/lodash/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash/_castFunction.js +14 -0
- package/node_modules/lodash/_castPath.js +21 -0
- package/node_modules/lodash/_castRest.js +14 -0
- package/node_modules/lodash/_castSlice.js +18 -0
- package/node_modules/lodash/_charsEndIndex.js +19 -0
- package/node_modules/lodash/_charsStartIndex.js +20 -0
- package/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash/_cloneBuffer.js +35 -0
- package/node_modules/lodash/_cloneDataView.js +16 -0
- package/node_modules/lodash/_cloneRegExp.js +17 -0
- package/node_modules/lodash/_cloneSymbol.js +18 -0
- package/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/node_modules/lodash/_compareAscending.js +41 -0
- package/node_modules/lodash/_compareMultiple.js +44 -0
- package/node_modules/lodash/_composeArgs.js +39 -0
- package/node_modules/lodash/_composeArgsRight.js +41 -0
- package/node_modules/lodash/_copyArray.js +20 -0
- package/node_modules/lodash/_copyObject.js +40 -0
- package/node_modules/lodash/_copySymbols.js +16 -0
- package/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/node_modules/lodash/_coreJsData.js +6 -0
- package/node_modules/lodash/_countHolders.js +21 -0
- package/node_modules/lodash/_createAggregator.js +23 -0
- package/node_modules/lodash/_createAssigner.js +37 -0
- package/node_modules/lodash/_createBaseEach.js +32 -0
- package/node_modules/lodash/_createBaseFor.js +25 -0
- package/node_modules/lodash/_createBind.js +28 -0
- package/node_modules/lodash/_createCaseFirst.js +33 -0
- package/node_modules/lodash/_createCompounder.js +24 -0
- package/node_modules/lodash/_createCtor.js +37 -0
- package/node_modules/lodash/_createCurry.js +46 -0
- package/node_modules/lodash/_createFind.js +25 -0
- package/node_modules/lodash/_createFlow.js +78 -0
- package/node_modules/lodash/_createHybrid.js +92 -0
- package/node_modules/lodash/_createInverter.js +17 -0
- package/node_modules/lodash/_createMathOperation.js +38 -0
- package/node_modules/lodash/_createOver.js +27 -0
- package/node_modules/lodash/_createPadding.js +33 -0
- package/node_modules/lodash/_createPartial.js +43 -0
- package/node_modules/lodash/_createRange.js +30 -0
- package/node_modules/lodash/_createRecurry.js +56 -0
- package/node_modules/lodash/_createRelationalOperation.js +20 -0
- package/node_modules/lodash/_createRound.js +35 -0
- package/node_modules/lodash/_createSet.js +19 -0
- package/node_modules/lodash/_createToPairs.js +30 -0
- package/node_modules/lodash/_createWrap.js +106 -0
- package/node_modules/lodash/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash/_customOmitClone.js +16 -0
- package/node_modules/lodash/_deburrLetter.js +71 -0
- package/node_modules/lodash/_defineProperty.js +11 -0
- package/node_modules/lodash/_equalArrays.js +84 -0
- package/node_modules/lodash/_equalByTag.js +112 -0
- package/node_modules/lodash/_equalObjects.js +90 -0
- package/node_modules/lodash/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash/_escapeStringChar.js +22 -0
- package/node_modules/lodash/_flatRest.js +16 -0
- package/node_modules/lodash/_freeGlobal.js +4 -0
- package/node_modules/lodash/_getAllKeys.js +16 -0
- package/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/node_modules/lodash/_getData.js +15 -0
- package/node_modules/lodash/_getFuncName.js +31 -0
- package/node_modules/lodash/_getHolder.js +13 -0
- package/node_modules/lodash/_getMapData.js +18 -0
- package/node_modules/lodash/_getMatchData.js +24 -0
- package/node_modules/lodash/_getNative.js +17 -0
- package/node_modules/lodash/_getPrototype.js +6 -0
- package/node_modules/lodash/_getRawTag.js +46 -0
- package/node_modules/lodash/_getSymbols.js +30 -0
- package/node_modules/lodash/_getSymbolsIn.js +25 -0
- package/node_modules/lodash/_getTag.js +58 -0
- package/node_modules/lodash/_getValue.js +13 -0
- package/node_modules/lodash/_getView.js +33 -0
- package/node_modules/lodash/_getWrapDetails.js +17 -0
- package/node_modules/lodash/_hasPath.js +39 -0
- package/node_modules/lodash/_hasUnicode.js +26 -0
- package/node_modules/lodash/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash/_hashClear.js +15 -0
- package/node_modules/lodash/_hashDelete.js +17 -0
- package/node_modules/lodash/_hashGet.js +30 -0
- package/node_modules/lodash/_hashHas.js +23 -0
- package/node_modules/lodash/_hashSet.js +23 -0
- package/node_modules/lodash/_initCloneArray.js +26 -0
- package/node_modules/lodash/_initCloneByTag.js +77 -0
- package/node_modules/lodash/_initCloneObject.js +18 -0
- package/node_modules/lodash/_insertWrapDetails.js +23 -0
- package/node_modules/lodash/_isFlattenable.js +20 -0
- package/node_modules/lodash/_isIndex.js +25 -0
- package/node_modules/lodash/_isIterateeCall.js +30 -0
- package/node_modules/lodash/_isKey.js +29 -0
- package/node_modules/lodash/_isKeyable.js +15 -0
- package/node_modules/lodash/_isLaziable.js +28 -0
- package/node_modules/lodash/_isMaskable.js +14 -0
- package/node_modules/lodash/_isMasked.js +20 -0
- package/node_modules/lodash/_isPrototype.js +18 -0
- package/node_modules/lodash/_isStrictComparable.js +15 -0
- package/node_modules/lodash/_iteratorToArray.js +18 -0
- package/node_modules/lodash/_lazyClone.js +23 -0
- package/node_modules/lodash/_lazyReverse.js +23 -0
- package/node_modules/lodash/_lazyValue.js +69 -0
- package/node_modules/lodash/_listCacheClear.js +13 -0
- package/node_modules/lodash/_listCacheDelete.js +35 -0
- package/node_modules/lodash/_listCacheGet.js +19 -0
- package/node_modules/lodash/_listCacheHas.js +16 -0
- package/node_modules/lodash/_listCacheSet.js +26 -0
- package/node_modules/lodash/_mapCacheClear.js +21 -0
- package/node_modules/lodash/_mapCacheDelete.js +18 -0
- package/node_modules/lodash/_mapCacheGet.js +16 -0
- package/node_modules/lodash/_mapCacheHas.js +16 -0
- package/node_modules/lodash/_mapCacheSet.js +22 -0
- package/node_modules/lodash/_mapToArray.js +18 -0
- package/node_modules/lodash/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash/_memoizeCapped.js +26 -0
- package/node_modules/lodash/_mergeData.js +90 -0
- package/node_modules/lodash/_metaMap.js +6 -0
- package/node_modules/lodash/_nativeCreate.js +6 -0
- package/node_modules/lodash/_nativeKeys.js +6 -0
- package/node_modules/lodash/_nativeKeysIn.js +20 -0
- package/node_modules/lodash/_nodeUtil.js +30 -0
- package/node_modules/lodash/_objectToString.js +22 -0
- package/node_modules/lodash/_overArg.js +15 -0
- package/node_modules/lodash/_overRest.js +36 -0
- package/node_modules/lodash/_parent.js +16 -0
- package/node_modules/lodash/_reEscape.js +4 -0
- package/node_modules/lodash/_reEvaluate.js +4 -0
- package/node_modules/lodash/_reInterpolate.js +4 -0
- package/node_modules/lodash/_realNames.js +4 -0
- package/node_modules/lodash/_reorder.js +29 -0
- package/node_modules/lodash/_replaceHolders.js +29 -0
- package/node_modules/lodash/_root.js +9 -0
- package/node_modules/lodash/_safeGet.js +21 -0
- package/node_modules/lodash/_setCacheAdd.js +19 -0
- package/node_modules/lodash/_setCacheHas.js +14 -0
- package/node_modules/lodash/_setData.js +20 -0
- package/node_modules/lodash/_setToArray.js +18 -0
- package/node_modules/lodash/_setToPairs.js +18 -0
- package/node_modules/lodash/_setToString.js +14 -0
- package/node_modules/lodash/_setWrapToString.js +21 -0
- package/node_modules/lodash/_shortOut.js +37 -0
- package/node_modules/lodash/_shuffleSelf.js +28 -0
- package/node_modules/lodash/_stackClear.js +15 -0
- package/node_modules/lodash/_stackDelete.js +18 -0
- package/node_modules/lodash/_stackGet.js +14 -0
- package/node_modules/lodash/_stackHas.js +14 -0
- package/node_modules/lodash/_stackSet.js +34 -0
- package/node_modules/lodash/_strictIndexOf.js +23 -0
- package/node_modules/lodash/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash/_stringSize.js +18 -0
- package/node_modules/lodash/_stringToArray.js +18 -0
- package/node_modules/lodash/_stringToPath.js +27 -0
- package/node_modules/lodash/_toKey.js +21 -0
- package/node_modules/lodash/_toSource.js +26 -0
- package/node_modules/lodash/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash/_unicodeSize.js +44 -0
- package/node_modules/lodash/_unicodeToArray.js +40 -0
- package/node_modules/lodash/_unicodeWords.js +69 -0
- package/node_modules/lodash/_updateWrapDetails.js +46 -0
- package/node_modules/lodash/_wrapperClone.js +23 -0
- package/node_modules/lodash/add.js +22 -0
- package/node_modules/lodash/after.js +42 -0
- package/node_modules/lodash/array.js +67 -0
- package/node_modules/lodash/ary.js +29 -0
- package/node_modules/lodash/assign.js +58 -0
- package/node_modules/lodash/assignIn.js +40 -0
- package/node_modules/lodash/assignInWith.js +38 -0
- package/node_modules/lodash/assignWith.js +37 -0
- package/node_modules/lodash/at.js +23 -0
- package/node_modules/lodash/attempt.js +35 -0
- package/node_modules/lodash/before.js +40 -0
- package/node_modules/lodash/bind.js +57 -0
- package/node_modules/lodash/bindAll.js +41 -0
- package/node_modules/lodash/bindKey.js +68 -0
- package/node_modules/lodash/camelCase.js +29 -0
- package/node_modules/lodash/capitalize.js +23 -0
- package/node_modules/lodash/castArray.js +44 -0
- package/node_modules/lodash/ceil.js +26 -0
- package/node_modules/lodash/chain.js +38 -0
- package/node_modules/lodash/chunk.js +50 -0
- package/node_modules/lodash/clamp.js +39 -0
- package/node_modules/lodash/clone.js +36 -0
- package/node_modules/lodash/cloneDeep.js +29 -0
- package/node_modules/lodash/cloneDeepWith.js +40 -0
- package/node_modules/lodash/cloneWith.js +42 -0
- package/node_modules/lodash/collection.js +30 -0
- package/node_modules/lodash/commit.js +33 -0
- package/node_modules/lodash/compact.js +31 -0
- package/node_modules/lodash/concat.js +43 -0
- package/node_modules/lodash/cond.js +60 -0
- package/node_modules/lodash/conforms.js +35 -0
- package/node_modules/lodash/conformsTo.js +32 -0
- package/node_modules/lodash/constant.js +26 -0
- package/node_modules/lodash/core.js +3877 -0
- package/node_modules/lodash/core.min.js +30 -0
- package/node_modules/lodash/countBy.js +40 -0
- package/node_modules/lodash/create.js +43 -0
- package/node_modules/lodash/curry.js +57 -0
- package/node_modules/lodash/curryRight.js +54 -0
- package/node_modules/lodash/date.js +3 -0
- package/node_modules/lodash/debounce.js +191 -0
- package/node_modules/lodash/deburr.js +45 -0
- package/node_modules/lodash/defaultTo.js +25 -0
- package/node_modules/lodash/defaults.js +64 -0
- package/node_modules/lodash/defaultsDeep.js +30 -0
- package/node_modules/lodash/defer.js +26 -0
- package/node_modules/lodash/delay.js +28 -0
- package/node_modules/lodash/difference.js +33 -0
- package/node_modules/lodash/differenceBy.js +44 -0
- package/node_modules/lodash/differenceWith.js +40 -0
- package/node_modules/lodash/divide.js +22 -0
- package/node_modules/lodash/drop.js +38 -0
- package/node_modules/lodash/dropRight.js +39 -0
- package/node_modules/lodash/dropRightWhile.js +45 -0
- package/node_modules/lodash/dropWhile.js +45 -0
- package/node_modules/lodash/each.js +1 -0
- package/node_modules/lodash/eachRight.js +1 -0
- package/node_modules/lodash/endsWith.js +43 -0
- package/node_modules/lodash/entries.js +1 -0
- package/node_modules/lodash/entriesIn.js +1 -0
- package/node_modules/lodash/eq.js +37 -0
- package/node_modules/lodash/escape.js +43 -0
- package/node_modules/lodash/escapeRegExp.js +32 -0
- package/node_modules/lodash/every.js +56 -0
- package/node_modules/lodash/extend.js +1 -0
- package/node_modules/lodash/extendWith.js +1 -0
- package/node_modules/lodash/fill.js +45 -0
- package/node_modules/lodash/filter.js +52 -0
- package/node_modules/lodash/find.js +42 -0
- package/node_modules/lodash/findIndex.js +55 -0
- package/node_modules/lodash/findKey.js +44 -0
- package/node_modules/lodash/findLast.js +25 -0
- package/node_modules/lodash/findLastIndex.js +59 -0
- package/node_modules/lodash/findLastKey.js +44 -0
- package/node_modules/lodash/first.js +1 -0
- package/node_modules/lodash/flatMap.js +29 -0
- package/node_modules/lodash/flatMapDeep.js +31 -0
- package/node_modules/lodash/flatMapDepth.js +31 -0
- package/node_modules/lodash/flatten.js +22 -0
- package/node_modules/lodash/flattenDeep.js +25 -0
- package/node_modules/lodash/flattenDepth.js +33 -0
- package/node_modules/lodash/flip.js +28 -0
- package/node_modules/lodash/floor.js +26 -0
- package/node_modules/lodash/flow.js +27 -0
- package/node_modules/lodash/flowRight.js +26 -0
- package/node_modules/lodash/forEach.js +41 -0
- package/node_modules/lodash/forEachRight.js +31 -0
- package/node_modules/lodash/forIn.js +39 -0
- package/node_modules/lodash/forInRight.js +37 -0
- package/node_modules/lodash/forOwn.js +36 -0
- package/node_modules/lodash/forOwnRight.js +34 -0
- package/node_modules/lodash/fp/F.js +1 -0
- package/node_modules/lodash/fp/T.js +1 -0
- package/node_modules/lodash/fp/__.js +1 -0
- package/node_modules/lodash/fp/_baseConvert.js +569 -0
- package/node_modules/lodash/fp/_convertBrowser.js +18 -0
- package/node_modules/lodash/fp/_falseOptions.js +7 -0
- package/node_modules/lodash/fp/_mapping.js +358 -0
- package/node_modules/lodash/fp/_util.js +16 -0
- package/node_modules/lodash/fp/add.js +5 -0
- package/node_modules/lodash/fp/after.js +5 -0
- package/node_modules/lodash/fp/all.js +1 -0
- package/node_modules/lodash/fp/allPass.js +1 -0
- package/node_modules/lodash/fp/always.js +1 -0
- package/node_modules/lodash/fp/any.js +1 -0
- package/node_modules/lodash/fp/anyPass.js +1 -0
- package/node_modules/lodash/fp/apply.js +1 -0
- package/node_modules/lodash/fp/array.js +2 -0
- package/node_modules/lodash/fp/ary.js +5 -0
- package/node_modules/lodash/fp/assign.js +5 -0
- package/node_modules/lodash/fp/assignAll.js +5 -0
- package/node_modules/lodash/fp/assignAllWith.js +5 -0
- package/node_modules/lodash/fp/assignIn.js +5 -0
- package/node_modules/lodash/fp/assignInAll.js +5 -0
- package/node_modules/lodash/fp/assignInAllWith.js +5 -0
- package/node_modules/lodash/fp/assignInWith.js +5 -0
- package/node_modules/lodash/fp/assignWith.js +5 -0
- package/node_modules/lodash/fp/assoc.js +1 -0
- package/node_modules/lodash/fp/assocPath.js +1 -0
- package/node_modules/lodash/fp/at.js +5 -0
- package/node_modules/lodash/fp/attempt.js +5 -0
- package/node_modules/lodash/fp/before.js +5 -0
- package/node_modules/lodash/fp/bind.js +5 -0
- package/node_modules/lodash/fp/bindAll.js +5 -0
- package/node_modules/lodash/fp/bindKey.js +5 -0
- package/node_modules/lodash/fp/camelCase.js +5 -0
- package/node_modules/lodash/fp/capitalize.js +5 -0
- package/node_modules/lodash/fp/castArray.js +5 -0
- package/node_modules/lodash/fp/ceil.js +5 -0
- package/node_modules/lodash/fp/chain.js +5 -0
- package/node_modules/lodash/fp/chunk.js +5 -0
- package/node_modules/lodash/fp/clamp.js +5 -0
- package/node_modules/lodash/fp/clone.js +5 -0
- package/node_modules/lodash/fp/cloneDeep.js +5 -0
- package/node_modules/lodash/fp/cloneDeepWith.js +5 -0
- package/node_modules/lodash/fp/cloneWith.js +5 -0
- package/node_modules/lodash/fp/collection.js +2 -0
- package/node_modules/lodash/fp/commit.js +5 -0
- package/node_modules/lodash/fp/compact.js +5 -0
- package/node_modules/lodash/fp/complement.js +1 -0
- package/node_modules/lodash/fp/compose.js +1 -0
- package/node_modules/lodash/fp/concat.js +5 -0
- package/node_modules/lodash/fp/cond.js +5 -0
- package/node_modules/lodash/fp/conforms.js +1 -0
- package/node_modules/lodash/fp/conformsTo.js +5 -0
- package/node_modules/lodash/fp/constant.js +5 -0
- package/node_modules/lodash/fp/contains.js +1 -0
- package/node_modules/lodash/fp/convert.js +18 -0
- package/node_modules/lodash/fp/countBy.js +5 -0
- package/node_modules/lodash/fp/create.js +5 -0
- package/node_modules/lodash/fp/curry.js +5 -0
- package/node_modules/lodash/fp/curryN.js +5 -0
- package/node_modules/lodash/fp/curryRight.js +5 -0
- package/node_modules/lodash/fp/curryRightN.js +5 -0
- package/node_modules/lodash/fp/date.js +2 -0
- package/node_modules/lodash/fp/debounce.js +5 -0
- package/node_modules/lodash/fp/deburr.js +5 -0
- package/node_modules/lodash/fp/defaultTo.js +5 -0
- package/node_modules/lodash/fp/defaults.js +5 -0
- package/node_modules/lodash/fp/defaultsAll.js +5 -0
- package/node_modules/lodash/fp/defaultsDeep.js +5 -0
- package/node_modules/lodash/fp/defaultsDeepAll.js +5 -0
- package/node_modules/lodash/fp/defer.js +5 -0
- package/node_modules/lodash/fp/delay.js +5 -0
- package/node_modules/lodash/fp/difference.js +5 -0
- package/node_modules/lodash/fp/differenceBy.js +5 -0
- package/node_modules/lodash/fp/differenceWith.js +5 -0
- package/node_modules/lodash/fp/dissoc.js +1 -0
- package/node_modules/lodash/fp/dissocPath.js +1 -0
- package/node_modules/lodash/fp/divide.js +5 -0
- package/node_modules/lodash/fp/drop.js +5 -0
- package/node_modules/lodash/fp/dropLast.js +1 -0
- package/node_modules/lodash/fp/dropLastWhile.js +1 -0
- package/node_modules/lodash/fp/dropRight.js +5 -0
- package/node_modules/lodash/fp/dropRightWhile.js +5 -0
- package/node_modules/lodash/fp/dropWhile.js +5 -0
- package/node_modules/lodash/fp/each.js +1 -0
- package/node_modules/lodash/fp/eachRight.js +1 -0
- package/node_modules/lodash/fp/endsWith.js +5 -0
- package/node_modules/lodash/fp/entries.js +1 -0
- package/node_modules/lodash/fp/entriesIn.js +1 -0
- package/node_modules/lodash/fp/eq.js +5 -0
- package/node_modules/lodash/fp/equals.js +1 -0
- package/node_modules/lodash/fp/escape.js +5 -0
- package/node_modules/lodash/fp/escapeRegExp.js +5 -0
- package/node_modules/lodash/fp/every.js +5 -0
- package/node_modules/lodash/fp/extend.js +1 -0
- package/node_modules/lodash/fp/extendAll.js +1 -0
- package/node_modules/lodash/fp/extendAllWith.js +1 -0
- package/node_modules/lodash/fp/extendWith.js +1 -0
- package/node_modules/lodash/fp/fill.js +5 -0
- package/node_modules/lodash/fp/filter.js +5 -0
- package/node_modules/lodash/fp/find.js +5 -0
- package/node_modules/lodash/fp/findFrom.js +5 -0
- package/node_modules/lodash/fp/findIndex.js +5 -0
- package/node_modules/lodash/fp/findIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findKey.js +5 -0
- package/node_modules/lodash/fp/findLast.js +5 -0
- package/node_modules/lodash/fp/findLastFrom.js +5 -0
- package/node_modules/lodash/fp/findLastIndex.js +5 -0
- package/node_modules/lodash/fp/findLastIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findLastKey.js +5 -0
- package/node_modules/lodash/fp/first.js +1 -0
- package/node_modules/lodash/fp/flatMap.js +5 -0
- package/node_modules/lodash/fp/flatMapDeep.js +5 -0
- package/node_modules/lodash/fp/flatMapDepth.js +5 -0
- package/node_modules/lodash/fp/flatten.js +5 -0
- package/node_modules/lodash/fp/flattenDeep.js +5 -0
- package/node_modules/lodash/fp/flattenDepth.js +5 -0
- package/node_modules/lodash/fp/flip.js +5 -0
- package/node_modules/lodash/fp/floor.js +5 -0
- package/node_modules/lodash/fp/flow.js +5 -0
- package/node_modules/lodash/fp/flowRight.js +5 -0
- package/node_modules/lodash/fp/forEach.js +5 -0
- package/node_modules/lodash/fp/forEachRight.js +5 -0
- package/node_modules/lodash/fp/forIn.js +5 -0
- package/node_modules/lodash/fp/forInRight.js +5 -0
- package/node_modules/lodash/fp/forOwn.js +5 -0
- package/node_modules/lodash/fp/forOwnRight.js +5 -0
- package/node_modules/lodash/fp/fromPairs.js +5 -0
- package/node_modules/lodash/fp/function.js +2 -0
- package/node_modules/lodash/fp/functions.js +5 -0
- package/node_modules/lodash/fp/functionsIn.js +5 -0
- package/node_modules/lodash/fp/get.js +5 -0
- package/node_modules/lodash/fp/getOr.js +5 -0
- package/node_modules/lodash/fp/groupBy.js +5 -0
- package/node_modules/lodash/fp/gt.js +5 -0
- package/node_modules/lodash/fp/gte.js +5 -0
- package/node_modules/lodash/fp/has.js +5 -0
- package/node_modules/lodash/fp/hasIn.js +5 -0
- package/node_modules/lodash/fp/head.js +5 -0
- package/node_modules/lodash/fp/identical.js +1 -0
- package/node_modules/lodash/fp/identity.js +5 -0
- package/node_modules/lodash/fp/inRange.js +5 -0
- package/node_modules/lodash/fp/includes.js +5 -0
- package/node_modules/lodash/fp/includesFrom.js +5 -0
- package/node_modules/lodash/fp/indexBy.js +1 -0
- package/node_modules/lodash/fp/indexOf.js +5 -0
- package/node_modules/lodash/fp/indexOfFrom.js +5 -0
- package/node_modules/lodash/fp/init.js +1 -0
- package/node_modules/lodash/fp/initial.js +5 -0
- package/node_modules/lodash/fp/intersection.js +5 -0
- package/node_modules/lodash/fp/intersectionBy.js +5 -0
- package/node_modules/lodash/fp/intersectionWith.js +5 -0
- package/node_modules/lodash/fp/invert.js +5 -0
- package/node_modules/lodash/fp/invertBy.js +5 -0
- package/node_modules/lodash/fp/invertObj.js +1 -0
- package/node_modules/lodash/fp/invoke.js +5 -0
- package/node_modules/lodash/fp/invokeArgs.js +5 -0
- package/node_modules/lodash/fp/invokeArgsMap.js +5 -0
- package/node_modules/lodash/fp/invokeMap.js +5 -0
- package/node_modules/lodash/fp/isArguments.js +5 -0
- package/node_modules/lodash/fp/isArray.js +5 -0
- package/node_modules/lodash/fp/isArrayBuffer.js +5 -0
- package/node_modules/lodash/fp/isArrayLike.js +5 -0
- package/node_modules/lodash/fp/isArrayLikeObject.js +5 -0
- package/node_modules/lodash/fp/isBoolean.js +5 -0
- package/node_modules/lodash/fp/isBuffer.js +5 -0
- package/node_modules/lodash/fp/isDate.js +5 -0
- package/node_modules/lodash/fp/isElement.js +5 -0
- package/node_modules/lodash/fp/isEmpty.js +5 -0
- package/node_modules/lodash/fp/isEqual.js +5 -0
- package/node_modules/lodash/fp/isEqualWith.js +5 -0
- package/node_modules/lodash/fp/isError.js +5 -0
- package/node_modules/lodash/fp/isFinite.js +5 -0
- package/node_modules/lodash/fp/isFunction.js +5 -0
- package/node_modules/lodash/fp/isInteger.js +5 -0
- package/node_modules/lodash/fp/isLength.js +5 -0
- package/node_modules/lodash/fp/isMap.js +5 -0
- package/node_modules/lodash/fp/isMatch.js +5 -0
- package/node_modules/lodash/fp/isMatchWith.js +5 -0
- package/node_modules/lodash/fp/isNaN.js +5 -0
- package/node_modules/lodash/fp/isNative.js +5 -0
- package/node_modules/lodash/fp/isNil.js +5 -0
- package/node_modules/lodash/fp/isNull.js +5 -0
- package/node_modules/lodash/fp/isNumber.js +5 -0
- package/node_modules/lodash/fp/isObject.js +5 -0
- package/node_modules/lodash/fp/isObjectLike.js +5 -0
- package/node_modules/lodash/fp/isPlainObject.js +5 -0
- package/node_modules/lodash/fp/isRegExp.js +5 -0
- package/node_modules/lodash/fp/isSafeInteger.js +5 -0
- package/node_modules/lodash/fp/isSet.js +5 -0
- package/node_modules/lodash/fp/isString.js +5 -0
- package/node_modules/lodash/fp/isSymbol.js +5 -0
- package/node_modules/lodash/fp/isTypedArray.js +5 -0
- package/node_modules/lodash/fp/isUndefined.js +5 -0
- package/node_modules/lodash/fp/isWeakMap.js +5 -0
- package/node_modules/lodash/fp/isWeakSet.js +5 -0
- package/node_modules/lodash/fp/iteratee.js +5 -0
- package/node_modules/lodash/fp/join.js +5 -0
- package/node_modules/lodash/fp/juxt.js +1 -0
- package/node_modules/lodash/fp/kebabCase.js +5 -0
- package/node_modules/lodash/fp/keyBy.js +5 -0
- package/node_modules/lodash/fp/keys.js +5 -0
- package/node_modules/lodash/fp/keysIn.js +5 -0
- package/node_modules/lodash/fp/lang.js +2 -0
- package/node_modules/lodash/fp/last.js +5 -0
- package/node_modules/lodash/fp/lastIndexOf.js +5 -0
- package/node_modules/lodash/fp/lastIndexOfFrom.js +5 -0
- package/node_modules/lodash/fp/lowerCase.js +5 -0
- package/node_modules/lodash/fp/lowerFirst.js +5 -0
- package/node_modules/lodash/fp/lt.js +5 -0
- package/node_modules/lodash/fp/lte.js +5 -0
- package/node_modules/lodash/fp/map.js +5 -0
- package/node_modules/lodash/fp/mapKeys.js +5 -0
- package/node_modules/lodash/fp/mapValues.js +5 -0
- package/node_modules/lodash/fp/matches.js +1 -0
- package/node_modules/lodash/fp/matchesProperty.js +5 -0
- package/node_modules/lodash/fp/math.js +2 -0
- package/node_modules/lodash/fp/max.js +5 -0
- package/node_modules/lodash/fp/maxBy.js +5 -0
- package/node_modules/lodash/fp/mean.js +5 -0
- package/node_modules/lodash/fp/meanBy.js +5 -0
- package/node_modules/lodash/fp/memoize.js +5 -0
- package/node_modules/lodash/fp/merge.js +5 -0
- package/node_modules/lodash/fp/mergeAll.js +5 -0
- package/node_modules/lodash/fp/mergeAllWith.js +5 -0
- package/node_modules/lodash/fp/mergeWith.js +5 -0
- package/node_modules/lodash/fp/method.js +5 -0
- package/node_modules/lodash/fp/methodOf.js +5 -0
- package/node_modules/lodash/fp/min.js +5 -0
- package/node_modules/lodash/fp/minBy.js +5 -0
- package/node_modules/lodash/fp/mixin.js +5 -0
- package/node_modules/lodash/fp/multiply.js +5 -0
- package/node_modules/lodash/fp/nAry.js +1 -0
- package/node_modules/lodash/fp/negate.js +5 -0
- package/node_modules/lodash/fp/next.js +5 -0
- package/node_modules/lodash/fp/noop.js +5 -0
- package/node_modules/lodash/fp/now.js +5 -0
- package/node_modules/lodash/fp/nth.js +5 -0
- package/node_modules/lodash/fp/nthArg.js +5 -0
- package/node_modules/lodash/fp/number.js +2 -0
- package/node_modules/lodash/fp/object.js +2 -0
- package/node_modules/lodash/fp/omit.js +5 -0
- package/node_modules/lodash/fp/omitAll.js +1 -0
- package/node_modules/lodash/fp/omitBy.js +5 -0
- package/node_modules/lodash/fp/once.js +5 -0
- package/node_modules/lodash/fp/orderBy.js +5 -0
- package/node_modules/lodash/fp/over.js +5 -0
- package/node_modules/lodash/fp/overArgs.js +5 -0
- package/node_modules/lodash/fp/overEvery.js +5 -0
- package/node_modules/lodash/fp/overSome.js +5 -0
- package/node_modules/lodash/fp/pad.js +5 -0
- package/node_modules/lodash/fp/padChars.js +5 -0
- package/node_modules/lodash/fp/padCharsEnd.js +5 -0
- package/node_modules/lodash/fp/padCharsStart.js +5 -0
- package/node_modules/lodash/fp/padEnd.js +5 -0
- package/node_modules/lodash/fp/padStart.js +5 -0
- package/node_modules/lodash/fp/parseInt.js +5 -0
- package/node_modules/lodash/fp/partial.js +5 -0
- package/node_modules/lodash/fp/partialRight.js +5 -0
- package/node_modules/lodash/fp/partition.js +5 -0
- package/node_modules/lodash/fp/path.js +1 -0
- package/node_modules/lodash/fp/pathEq.js +1 -0
- package/node_modules/lodash/fp/pathOr.js +1 -0
- package/node_modules/lodash/fp/paths.js +1 -0
- package/node_modules/lodash/fp/pick.js +5 -0
- package/node_modules/lodash/fp/pickAll.js +1 -0
- package/node_modules/lodash/fp/pickBy.js +5 -0
- package/node_modules/lodash/fp/pipe.js +1 -0
- package/node_modules/lodash/fp/placeholder.js +6 -0
- package/node_modules/lodash/fp/plant.js +5 -0
- package/node_modules/lodash/fp/pluck.js +1 -0
- package/node_modules/lodash/fp/prop.js +1 -0
- package/node_modules/lodash/fp/propEq.js +1 -0
- package/node_modules/lodash/fp/propOr.js +1 -0
- package/node_modules/lodash/fp/property.js +1 -0
- package/node_modules/lodash/fp/propertyOf.js +5 -0
- package/node_modules/lodash/fp/props.js +1 -0
- package/node_modules/lodash/fp/pull.js +5 -0
- package/node_modules/lodash/fp/pullAll.js +5 -0
- package/node_modules/lodash/fp/pullAllBy.js +5 -0
- package/node_modules/lodash/fp/pullAllWith.js +5 -0
- package/node_modules/lodash/fp/pullAt.js +5 -0
- package/node_modules/lodash/fp/random.js +5 -0
- package/node_modules/lodash/fp/range.js +5 -0
- package/node_modules/lodash/fp/rangeRight.js +5 -0
- package/node_modules/lodash/fp/rangeStep.js +5 -0
- package/node_modules/lodash/fp/rangeStepRight.js +5 -0
- package/node_modules/lodash/fp/rearg.js +5 -0
- package/node_modules/lodash/fp/reduce.js +5 -0
- package/node_modules/lodash/fp/reduceRight.js +5 -0
- package/node_modules/lodash/fp/reject.js +5 -0
- package/node_modules/lodash/fp/remove.js +5 -0
- package/node_modules/lodash/fp/repeat.js +5 -0
- package/node_modules/lodash/fp/replace.js +5 -0
- package/node_modules/lodash/fp/rest.js +5 -0
- package/node_modules/lodash/fp/restFrom.js +5 -0
- package/node_modules/lodash/fp/result.js +5 -0
- package/node_modules/lodash/fp/reverse.js +5 -0
- package/node_modules/lodash/fp/round.js +5 -0
- package/node_modules/lodash/fp/sample.js +5 -0
- package/node_modules/lodash/fp/sampleSize.js +5 -0
- package/node_modules/lodash/fp/seq.js +2 -0
- package/node_modules/lodash/fp/set.js +5 -0
- package/node_modules/lodash/fp/setWith.js +5 -0
- package/node_modules/lodash/fp/shuffle.js +5 -0
- package/node_modules/lodash/fp/size.js +5 -0
- package/node_modules/lodash/fp/slice.js +5 -0
- package/node_modules/lodash/fp/snakeCase.js +5 -0
- package/node_modules/lodash/fp/some.js +5 -0
- package/node_modules/lodash/fp/sortBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndex.js +5 -0
- package/node_modules/lodash/fp/sortedIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndex.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedUniq.js +5 -0
- package/node_modules/lodash/fp/sortedUniqBy.js +5 -0
- package/node_modules/lodash/fp/split.js +5 -0
- package/node_modules/lodash/fp/spread.js +5 -0
- package/node_modules/lodash/fp/spreadFrom.js +5 -0
- package/node_modules/lodash/fp/startCase.js +5 -0
- package/node_modules/lodash/fp/startsWith.js +5 -0
- package/node_modules/lodash/fp/string.js +2 -0
- package/node_modules/lodash/fp/stubArray.js +5 -0
- package/node_modules/lodash/fp/stubFalse.js +5 -0
- package/node_modules/lodash/fp/stubObject.js +5 -0
- package/node_modules/lodash/fp/stubString.js +5 -0
- package/node_modules/lodash/fp/stubTrue.js +5 -0
- package/node_modules/lodash/fp/subtract.js +5 -0
- package/node_modules/lodash/fp/sum.js +5 -0
- package/node_modules/lodash/fp/sumBy.js +5 -0
- package/node_modules/lodash/fp/symmetricDifference.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceBy.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceWith.js +1 -0
- package/node_modules/lodash/fp/tail.js +5 -0
- package/node_modules/lodash/fp/take.js +5 -0
- package/node_modules/lodash/fp/takeLast.js +1 -0
- package/node_modules/lodash/fp/takeLastWhile.js +1 -0
- package/node_modules/lodash/fp/takeRight.js +5 -0
- package/node_modules/lodash/fp/takeRightWhile.js +5 -0
- package/node_modules/lodash/fp/takeWhile.js +5 -0
- package/node_modules/lodash/fp/tap.js +5 -0
- package/node_modules/lodash/fp/template.js +5 -0
- package/node_modules/lodash/fp/templateSettings.js +5 -0
- package/node_modules/lodash/fp/throttle.js +5 -0
- package/node_modules/lodash/fp/thru.js +5 -0
- package/node_modules/lodash/fp/times.js +5 -0
- package/node_modules/lodash/fp/toArray.js +5 -0
- package/node_modules/lodash/fp/toFinite.js +5 -0
- package/node_modules/lodash/fp/toInteger.js +5 -0
- package/node_modules/lodash/fp/toIterator.js +5 -0
- package/node_modules/lodash/fp/toJSON.js +5 -0
- package/node_modules/lodash/fp/toLength.js +5 -0
- package/node_modules/lodash/fp/toLower.js +5 -0
- package/node_modules/lodash/fp/toNumber.js +5 -0
- package/node_modules/lodash/fp/toPairs.js +5 -0
- package/node_modules/lodash/fp/toPairsIn.js +5 -0
- package/node_modules/lodash/fp/toPath.js +5 -0
- package/node_modules/lodash/fp/toPlainObject.js +5 -0
- package/node_modules/lodash/fp/toSafeInteger.js +5 -0
- package/node_modules/lodash/fp/toString.js +5 -0
- package/node_modules/lodash/fp/toUpper.js +5 -0
- package/node_modules/lodash/fp/transform.js +5 -0
- package/node_modules/lodash/fp/trim.js +5 -0
- package/node_modules/lodash/fp/trimChars.js +5 -0
- package/node_modules/lodash/fp/trimCharsEnd.js +5 -0
- package/node_modules/lodash/fp/trimCharsStart.js +5 -0
- package/node_modules/lodash/fp/trimEnd.js +5 -0
- package/node_modules/lodash/fp/trimStart.js +5 -0
- package/node_modules/lodash/fp/truncate.js +5 -0
- package/node_modules/lodash/fp/unapply.js +1 -0
- package/node_modules/lodash/fp/unary.js +5 -0
- package/node_modules/lodash/fp/unescape.js +5 -0
- package/node_modules/lodash/fp/union.js +5 -0
- package/node_modules/lodash/fp/unionBy.js +5 -0
- package/node_modules/lodash/fp/unionWith.js +5 -0
- package/node_modules/lodash/fp/uniq.js +5 -0
- package/node_modules/lodash/fp/uniqBy.js +5 -0
- package/node_modules/lodash/fp/uniqWith.js +5 -0
- package/node_modules/lodash/fp/uniqueId.js +5 -0
- package/node_modules/lodash/fp/unnest.js +1 -0
- package/node_modules/lodash/fp/unset.js +5 -0
- package/node_modules/lodash/fp/unzip.js +5 -0
- package/node_modules/lodash/fp/unzipWith.js +5 -0
- package/node_modules/lodash/fp/update.js +5 -0
- package/node_modules/lodash/fp/updateWith.js +5 -0
- package/node_modules/lodash/fp/upperCase.js +5 -0
- package/node_modules/lodash/fp/upperFirst.js +5 -0
- package/node_modules/lodash/fp/useWith.js +1 -0
- package/node_modules/lodash/fp/util.js +2 -0
- package/node_modules/lodash/fp/value.js +5 -0
- package/node_modules/lodash/fp/valueOf.js +5 -0
- package/node_modules/lodash/fp/values.js +5 -0
- package/node_modules/lodash/fp/valuesIn.js +5 -0
- package/node_modules/lodash/fp/where.js +1 -0
- package/node_modules/lodash/fp/whereEq.js +1 -0
- package/node_modules/lodash/fp/without.js +5 -0
- package/node_modules/lodash/fp/words.js +5 -0
- package/node_modules/lodash/fp/wrap.js +5 -0
- package/node_modules/lodash/fp/wrapperAt.js +5 -0
- package/node_modules/lodash/fp/wrapperChain.js +5 -0
- package/node_modules/lodash/fp/wrapperLodash.js +5 -0
- package/node_modules/lodash/fp/wrapperReverse.js +5 -0
- package/node_modules/lodash/fp/wrapperValue.js +5 -0
- package/node_modules/lodash/fp/xor.js +5 -0
- package/node_modules/lodash/fp/xorBy.js +5 -0
- package/node_modules/lodash/fp/xorWith.js +5 -0
- package/node_modules/lodash/fp/zip.js +5 -0
- package/node_modules/lodash/fp/zipAll.js +5 -0
- package/node_modules/lodash/fp/zipObj.js +1 -0
- package/node_modules/lodash/fp/zipObject.js +5 -0
- package/node_modules/lodash/fp/zipObjectDeep.js +5 -0
- package/node_modules/lodash/fp/zipWith.js +5 -0
- package/node_modules/lodash/fp.js +2 -0
- package/node_modules/lodash/fromPairs.js +30 -0
- package/node_modules/lodash/function.js +25 -0
- package/node_modules/lodash/functions.js +31 -0
- package/node_modules/lodash/functionsIn.js +31 -0
- package/node_modules/lodash/get.js +33 -0
- package/node_modules/lodash/groupBy.js +41 -0
- package/node_modules/lodash/gt.js +29 -0
- package/node_modules/lodash/gte.js +30 -0
- package/node_modules/lodash/has.js +35 -0
- package/node_modules/lodash/hasIn.js +34 -0
- package/node_modules/lodash/head.js +23 -0
- package/node_modules/lodash/identity.js +21 -0
- package/node_modules/lodash/inRange.js +55 -0
- package/node_modules/lodash/includes.js +53 -0
- package/node_modules/lodash/index.js +1 -0
- package/node_modules/lodash/indexOf.js +42 -0
- package/node_modules/lodash/initial.js +22 -0
- package/node_modules/lodash/intersection.js +30 -0
- package/node_modules/lodash/intersectionBy.js +45 -0
- package/node_modules/lodash/intersectionWith.js +41 -0
- package/node_modules/lodash/invert.js +42 -0
- package/node_modules/lodash/invertBy.js +56 -0
- package/node_modules/lodash/invoke.js +24 -0
- package/node_modules/lodash/invokeMap.js +41 -0
- package/node_modules/lodash/isArguments.js +36 -0
- package/node_modules/lodash/isArray.js +26 -0
- package/node_modules/lodash/isArrayBuffer.js +27 -0
- package/node_modules/lodash/isArrayLike.js +33 -0
- package/node_modules/lodash/isArrayLikeObject.js +33 -0
- package/node_modules/lodash/isBoolean.js +29 -0
- package/node_modules/lodash/isBuffer.js +38 -0
- package/node_modules/lodash/isDate.js +27 -0
- package/node_modules/lodash/isElement.js +25 -0
- package/node_modules/lodash/isEmpty.js +77 -0
- package/node_modules/lodash/isEqual.js +35 -0
- package/node_modules/lodash/isEqualWith.js +41 -0
- package/node_modules/lodash/isError.js +36 -0
- package/node_modules/lodash/isFinite.js +36 -0
- package/node_modules/lodash/isFunction.js +37 -0
- package/node_modules/lodash/isInteger.js +33 -0
- package/node_modules/lodash/isLength.js +35 -0
- package/node_modules/lodash/isMap.js +27 -0
- package/node_modules/lodash/isMatch.js +36 -0
- package/node_modules/lodash/isMatchWith.js +41 -0
- package/node_modules/lodash/isNaN.js +38 -0
- package/node_modules/lodash/isNative.js +40 -0
- package/node_modules/lodash/isNil.js +25 -0
- package/node_modules/lodash/isNull.js +22 -0
- package/node_modules/lodash/isNumber.js +38 -0
- package/node_modules/lodash/isObject.js +31 -0
- package/node_modules/lodash/isObjectLike.js +29 -0
- package/node_modules/lodash/isPlainObject.js +62 -0
- package/node_modules/lodash/isRegExp.js +27 -0
- package/node_modules/lodash/isSafeInteger.js +37 -0
- package/node_modules/lodash/isSet.js +27 -0
- package/node_modules/lodash/isString.js +30 -0
- package/node_modules/lodash/isSymbol.js +29 -0
- package/node_modules/lodash/isTypedArray.js +27 -0
- package/node_modules/lodash/isUndefined.js +22 -0
- package/node_modules/lodash/isWeakMap.js +28 -0
- package/node_modules/lodash/isWeakSet.js +28 -0
- package/node_modules/lodash/iteratee.js +53 -0
- package/node_modules/lodash/join.js +26 -0
- package/node_modules/lodash/kebabCase.js +28 -0
- package/node_modules/lodash/keyBy.js +36 -0
- package/node_modules/lodash/keys.js +37 -0
- package/node_modules/lodash/keysIn.js +32 -0
- package/node_modules/lodash/lang.js +58 -0
- package/node_modules/lodash/last.js +20 -0
- package/node_modules/lodash/lastIndexOf.js +46 -0
- package/node_modules/lodash/lodash.js +17259 -0
- package/node_modules/lodash/lodash.min.js +136 -0
- package/node_modules/lodash/lowerCase.js +27 -0
- package/node_modules/lodash/lowerFirst.js +22 -0
- package/node_modules/lodash/lt.js +29 -0
- package/node_modules/lodash/lte.js +30 -0
- package/node_modules/lodash/map.js +53 -0
- package/node_modules/lodash/mapKeys.js +36 -0
- package/node_modules/lodash/mapValues.js +43 -0
- package/node_modules/lodash/matches.js +46 -0
- package/node_modules/lodash/matchesProperty.js +44 -0
- package/node_modules/lodash/math.js +17 -0
- package/node_modules/lodash/max.js +29 -0
- package/node_modules/lodash/maxBy.js +34 -0
- package/node_modules/lodash/mean.js +22 -0
- package/node_modules/lodash/meanBy.js +31 -0
- package/node_modules/lodash/memoize.js +73 -0
- package/node_modules/lodash/merge.js +39 -0
- package/node_modules/lodash/mergeWith.js +39 -0
- package/node_modules/lodash/method.js +34 -0
- package/node_modules/lodash/methodOf.js +33 -0
- package/node_modules/lodash/min.js +29 -0
- package/node_modules/lodash/minBy.js +34 -0
- package/node_modules/lodash/mixin.js +74 -0
- package/node_modules/lodash/multiply.js +22 -0
- package/node_modules/lodash/negate.js +40 -0
- package/node_modules/lodash/next.js +35 -0
- package/node_modules/lodash/noop.js +17 -0
- package/node_modules/lodash/now.js +23 -0
- package/node_modules/lodash/nth.js +29 -0
- package/node_modules/lodash/nthArg.js +32 -0
- package/node_modules/lodash/number.js +5 -0
- package/node_modules/lodash/object.js +49 -0
- package/node_modules/lodash/omit.js +57 -0
- package/node_modules/lodash/omitBy.js +29 -0
- package/node_modules/lodash/once.js +25 -0
- package/node_modules/lodash/orderBy.js +47 -0
- package/node_modules/lodash/over.js +24 -0
- package/node_modules/lodash/overArgs.js +61 -0
- package/node_modules/lodash/overEvery.js +34 -0
- package/node_modules/lodash/overSome.js +37 -0
- package/node_modules/lodash/package.json +19 -0
- package/node_modules/lodash/pad.js +49 -0
- package/node_modules/lodash/padEnd.js +39 -0
- package/node_modules/lodash/padStart.js +39 -0
- package/node_modules/lodash/parseInt.js +43 -0
- package/node_modules/lodash/partial.js +50 -0
- package/node_modules/lodash/partialRight.js +49 -0
- package/node_modules/lodash/partition.js +43 -0
- package/node_modules/lodash/pick.js +25 -0
- package/node_modules/lodash/pickBy.js +37 -0
- package/node_modules/lodash/plant.js +48 -0
- package/node_modules/lodash/property.js +32 -0
- package/node_modules/lodash/propertyOf.js +30 -0
- package/node_modules/lodash/pull.js +29 -0
- package/node_modules/lodash/pullAll.js +29 -0
- package/node_modules/lodash/pullAllBy.js +33 -0
- package/node_modules/lodash/pullAllWith.js +32 -0
- package/node_modules/lodash/pullAt.js +43 -0
- package/node_modules/lodash/random.js +91 -0
- package/node_modules/lodash/range.js +46 -0
- package/node_modules/lodash/rangeRight.js +41 -0
- package/node_modules/lodash/rearg.js +33 -0
- package/node_modules/lodash/reduce.js +51 -0
- package/node_modules/lodash/reduceRight.js +36 -0
- package/node_modules/lodash/reject.js +46 -0
- package/node_modules/lodash/remove.js +53 -0
- package/node_modules/lodash/repeat.js +37 -0
- package/node_modules/lodash/replace.js +29 -0
- package/node_modules/lodash/rest.js +40 -0
- package/node_modules/lodash/result.js +56 -0
- package/node_modules/lodash/reverse.js +34 -0
- package/node_modules/lodash/round.js +26 -0
- package/node_modules/lodash/sample.js +24 -0
- package/node_modules/lodash/sampleSize.js +37 -0
- package/node_modules/lodash/seq.js +16 -0
- package/node_modules/lodash/set.js +35 -0
- package/node_modules/lodash/setWith.js +32 -0
- package/node_modules/lodash/shuffle.js +25 -0
- package/node_modules/lodash/size.js +46 -0
- package/node_modules/lodash/slice.js +37 -0
- package/node_modules/lodash/snakeCase.js +28 -0
- package/node_modules/lodash/some.js +51 -0
- package/node_modules/lodash/sortBy.js +48 -0
- package/node_modules/lodash/sortedIndex.js +24 -0
- package/node_modules/lodash/sortedIndexBy.js +33 -0
- package/node_modules/lodash/sortedIndexOf.js +31 -0
- package/node_modules/lodash/sortedLastIndex.js +25 -0
- package/node_modules/lodash/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash/sortedUniq.js +24 -0
- package/node_modules/lodash/sortedUniqBy.js +26 -0
- package/node_modules/lodash/split.js +52 -0
- package/node_modules/lodash/spread.js +63 -0
- package/node_modules/lodash/startCase.js +29 -0
- package/node_modules/lodash/startsWith.js +39 -0
- package/node_modules/lodash/string.js +33 -0
- package/node_modules/lodash/stubArray.js +23 -0
- package/node_modules/lodash/stubFalse.js +18 -0
- package/node_modules/lodash/stubObject.js +23 -0
- package/node_modules/lodash/stubString.js +18 -0
- package/node_modules/lodash/stubTrue.js +18 -0
- package/node_modules/lodash/subtract.js +22 -0
- package/node_modules/lodash/sum.js +24 -0
- package/node_modules/lodash/sumBy.js +33 -0
- package/node_modules/lodash/tail.js +22 -0
- package/node_modules/lodash/take.js +37 -0
- package/node_modules/lodash/takeRight.js +39 -0
- package/node_modules/lodash/takeRightWhile.js +45 -0
- package/node_modules/lodash/takeWhile.js +45 -0
- package/node_modules/lodash/tap.js +29 -0
- package/node_modules/lodash/template.js +284 -0
- package/node_modules/lodash/templateSettings.js +71 -0
- package/node_modules/lodash/throttle.js +69 -0
- package/node_modules/lodash/thru.js +28 -0
- package/node_modules/lodash/times.js +51 -0
- package/node_modules/lodash/toArray.js +58 -0
- package/node_modules/lodash/toFinite.js +42 -0
- package/node_modules/lodash/toInteger.js +36 -0
- package/node_modules/lodash/toIterator.js +23 -0
- package/node_modules/lodash/toJSON.js +1 -0
- package/node_modules/lodash/toLength.js +38 -0
- package/node_modules/lodash/toLower.js +28 -0
- package/node_modules/lodash/toNumber.js +64 -0
- package/node_modules/lodash/toPairs.js +30 -0
- package/node_modules/lodash/toPairsIn.js +30 -0
- package/node_modules/lodash/toPath.js +33 -0
- package/node_modules/lodash/toPlainObject.js +32 -0
- package/node_modules/lodash/toSafeInteger.js +37 -0
- package/node_modules/lodash/toString.js +28 -0
- package/node_modules/lodash/toUpper.js +28 -0
- package/node_modules/lodash/transform.js +65 -0
- package/node_modules/lodash/trim.js +47 -0
- package/node_modules/lodash/trimEnd.js +41 -0
- package/node_modules/lodash/trimStart.js +43 -0
- package/node_modules/lodash/truncate.js +111 -0
- package/node_modules/lodash/unary.js +22 -0
- package/node_modules/lodash/unescape.js +34 -0
- package/node_modules/lodash/union.js +26 -0
- package/node_modules/lodash/unionBy.js +39 -0
- package/node_modules/lodash/unionWith.js +34 -0
- package/node_modules/lodash/uniq.js +25 -0
- package/node_modules/lodash/uniqBy.js +31 -0
- package/node_modules/lodash/uniqWith.js +28 -0
- package/node_modules/lodash/uniqueId.js +28 -0
- package/node_modules/lodash/unset.js +34 -0
- package/node_modules/lodash/unzip.js +45 -0
- package/node_modules/lodash/unzipWith.js +39 -0
- package/node_modules/lodash/update.js +35 -0
- package/node_modules/lodash/updateWith.js +33 -0
- package/node_modules/lodash/upperCase.js +27 -0
- package/node_modules/lodash/upperFirst.js +22 -0
- package/node_modules/lodash/util.js +34 -0
- package/node_modules/lodash/value.js +1 -0
- package/node_modules/lodash/valueOf.js +1 -0
- package/node_modules/lodash/values.js +34 -0
- package/node_modules/lodash/valuesIn.js +32 -0
- package/node_modules/lodash/without.js +31 -0
- package/node_modules/lodash/words.js +35 -0
- package/node_modules/lodash/wrap.js +30 -0
- package/node_modules/lodash/wrapperAt.js +48 -0
- package/node_modules/lodash/wrapperChain.js +34 -0
- package/node_modules/lodash/wrapperLodash.js +147 -0
- package/node_modules/lodash/wrapperReverse.js +44 -0
- package/node_modules/lodash/wrapperValue.js +21 -0
- package/node_modules/lodash/xor.js +28 -0
- package/node_modules/lodash/xorBy.js +39 -0
- package/node_modules/lodash/xorWith.js +34 -0
- package/node_modules/lodash/zip.js +22 -0
- package/node_modules/lodash/zipObject.js +24 -0
- package/node_modules/lodash/zipObjectDeep.js +23 -0
- package/node_modules/lodash/zipWith.js +32 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/proxy-from-env/README.md +43 -11
- package/node_modules/proxy-from-env/index.cjs +105 -0
- package/node_modules/proxy-from-env/index.js +14 -19
- package/node_modules/proxy-from-env/package.json +20 -11
- package/node_modules/zod/LICENSE +1 -1
- package/node_modules/zod/README.md +114 -2782
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -2
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +94 -95
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/{lib/ZodError.js → v3/ZodError.cjs} +9 -8
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/{lib → v3}/ZodError.d.ts +23 -23
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/{lib/errors.js → v3/errors.cjs} +6 -6
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/{lib → v3}/errors.d.ts +2 -2
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/{lib/helpers/errorUtil.js → v3/helpers/errorUtil.cjs} +3 -2
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/{lib/helpers/parseUtil.js → v3/helpers/parseUtil.cjs} +10 -11
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/{lib → v3}/helpers/parseUtil.d.ts +15 -15
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/{lib → v3}/helpers/partialUtil.d.ts +1 -1
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/{lib/helpers/util.js → v3/helpers/util.cjs} +7 -12
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/{lib → v3}/helpers/util.d.ts +9 -6
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/{lib/index.js → v3/index.cjs} +7 -3
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/{lib/locales/en.js → v3/locales/en.cjs} +32 -50
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/{lib → v3}/locales/en.d.ts +1 -1
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/{lib/types.js → v3/types.cjs} +661 -563
- package/node_modules/zod/{lib/types.d.ts → v3/types.d.cts} +249 -345
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/{lib/index.mjs → v3/types.js} +357 -900
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/{lib/external.js → v4-mini/index.cjs} +6 -7
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +27 -19
- package/node_modules/@autonomous-testing/sdk/.github/actions/npm_clean_install/action.yaml +0 -35
- package/node_modules/axios/SECURITY.md +0 -5
- package/node_modules/axios/UPGRADE_GUIDE.md +0 -190
- package/node_modules/axios/bin/check-build-version.js +0 -19
- package/node_modules/axios/bin/ssl_hotfix.js +0 -22
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/node_modules/axios/rollup.config.js +0 -60
- package/node_modules/axios/tsconfig.json +0 -14
- package/node_modules/axios/tslint.json +0 -6
- package/node_modules/form-data/Readme.md +0 -358
- package/node_modules/process/.eslintrc +0 -21
- package/node_modules/process/README.md +0 -26
- package/node_modules/process/browser.js +0 -184
- package/node_modules/process/index.js +0 -2
- package/node_modules/process/package.json +0 -27
- package/node_modules/process/test.js +0 -199
- package/node_modules/proxy-from-env/.eslintrc +0 -29
- package/node_modules/proxy-from-env/.travis.yml +0 -10
- package/node_modules/proxy-from-env/test.js +0 -483
- package/node_modules/zod/lib/__tests__/Mocker.d.ts +0 -17
- package/node_modules/zod/lib/__tests__/Mocker.js +0 -57
- package/node_modules/zod/lib/benchmarks/datetime.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/datetime.js +0 -54
- package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +0 -79
- package/node_modules/zod/lib/benchmarks/index.js +0 -59
- package/node_modules/zod/lib/benchmarks/ipv4.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/ipv4.js +0 -54
- package/node_modules/zod/lib/benchmarks/object.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/object.js +0 -70
- package/node_modules/zod/lib/benchmarks/primitives.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/primitives.js +0 -170
- package/node_modules/zod/lib/benchmarks/realworld.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/realworld.js +0 -56
- package/node_modules/zod/lib/benchmarks/string.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/string.js +0 -55
- package/node_modules/zod/lib/benchmarks/union.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/union.js +0 -79
- package/node_modules/zod/lib/external.d.ts +0 -6
- package/node_modules/zod/lib/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/lib/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/lib/index.d.ts +0 -4
- package/node_modules/zod/lib/index.umd.js +0 -4351
- /package/node_modules/{zod/lib/benchmarks/index.d.ts → dotenv/config.d.ts} +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/HISTORY.md +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/LICENSE +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/README.md +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/db.json +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/index.js +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/package.json +0 -0
- /package/node_modules/zod/{lib/helpers/enumUtil.js → v3/helpers/enumUtil.cjs} +0 -0
- /package/node_modules/zod/{lib/helpers/enumUtil.d.ts → v3/helpers/enumUtil.d.cts} +0 -0
- /package/node_modules/zod/{lib/helpers/partialUtil.js → v3/helpers/partialUtil.cjs} +0 -0
- /package/node_modules/zod/{lib/helpers/typeAliases.js → v3/helpers/typeAliases.cjs} +0 -0
|
@@ -1,94 +1,538 @@
|
|
|
1
|
-
|
|
1
|
+
<h3 align="center">💎 Platinum sponsors <br /></h3>
|
|
2
|
+
<table align="center">
|
|
3
|
+
<tr>
|
|
4
|
+
<td align="center" width="50%">
|
|
5
|
+
<a
|
|
6
|
+
href="https://thanks.dev/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship"
|
|
7
|
+
style="padding: 10px; display: inline-block"
|
|
8
|
+
target="_blank"
|
|
9
|
+
>
|
|
10
|
+
<img
|
|
11
|
+
width="90px"
|
|
12
|
+
height="90px"
|
|
13
|
+
src="https://images.opencollective.com/thanks-dev/360b917/logo/256.png?height=256"
|
|
14
|
+
alt="Thanks.dev"
|
|
15
|
+
/>
|
|
16
|
+
</a>
|
|
17
|
+
<p
|
|
18
|
+
align="center"
|
|
19
|
+
>
|
|
20
|
+
We're passionate about making open source sustainable. Scan your dependency tree to better understand which open source projects need funding.
|
|
21
|
+
</p>
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a
|
|
24
|
+
href="https://thanks.dev/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"
|
|
25
|
+
target="_blank"
|
|
26
|
+
><b>thanks.dev</b></a
|
|
27
|
+
>
|
|
28
|
+
</p>
|
|
29
|
+
</td>
|
|
30
|
+
<td align="center" width="50%">
|
|
31
|
+
<a
|
|
32
|
+
href="https://opencollective.com/axios/contribute"
|
|
33
|
+
target="_blank"
|
|
34
|
+
>💜 Become a sponsor</a
|
|
35
|
+
>
|
|
36
|
+
</td>
|
|
37
|
+
</tr>
|
|
38
|
+
</table>
|
|
39
|
+
<table align="center">
|
|
40
|
+
<tr>
|
|
41
|
+
<td align="center" width="50%">
|
|
42
|
+
<a
|
|
43
|
+
href="https://opencollective.com/axios/contribute"
|
|
44
|
+
target="_blank"
|
|
45
|
+
>💜 Become a sponsor</a
|
|
46
|
+
>
|
|
47
|
+
</td>
|
|
48
|
+
<td align="center" width="50%">
|
|
49
|
+
<a
|
|
50
|
+
href="https://opencollective.com/axios/contribute"
|
|
51
|
+
target="_blank"
|
|
52
|
+
>💜 Become a sponsor</a
|
|
53
|
+
>
|
|
54
|
+
</td>
|
|
55
|
+
</tr>
|
|
56
|
+
</table>
|
|
57
|
+
<h3 align="center">🥇 Gold sponsors <br /></h3>
|
|
58
|
+
<table align="center" width="100%">
|
|
59
|
+
<tr width="33.333333333333336%">
|
|
60
|
+
<td align="center" width="33.333333333333336%">
|
|
61
|
+
<a
|
|
62
|
+
href="https://www.principal.com/about-us?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship"
|
|
63
|
+
style="padding: 10px; display: inline-block"
|
|
64
|
+
target="_blank"
|
|
65
|
+
>
|
|
66
|
+
<img
|
|
67
|
+
width="90px"
|
|
68
|
+
height="90px"
|
|
69
|
+
src="https://images.opencollective.com/principal/431e690/logo.png"
|
|
70
|
+
alt="Principal Financial Group"
|
|
71
|
+
/>
|
|
72
|
+
</a>
|
|
73
|
+
<p
|
|
74
|
+
align="center"
|
|
75
|
+
>
|
|
76
|
+
Free tools to help with your financial planning needs!
|
|
77
|
+
</p>
|
|
78
|
+
<p align="center">
|
|
79
|
+
<a
|
|
80
|
+
href="https://www.principal.com/about-us?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"
|
|
81
|
+
target="_blank"
|
|
82
|
+
><b>principal.com</b></a
|
|
83
|
+
>
|
|
84
|
+
</p>
|
|
85
|
+
</td>
|
|
86
|
+
<td align="center" width="33.333333333333336%">
|
|
87
|
+
<a
|
|
88
|
+
href="https://opensource.sap.com?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship"
|
|
89
|
+
style="padding: 10px; display: inline-block"
|
|
90
|
+
target="_blank"
|
|
91
|
+
>
|
|
92
|
+
<img
|
|
93
|
+
width="90px"
|
|
94
|
+
height="90px"
|
|
95
|
+
src="https://avatars.githubusercontent.com/u/2531208?s=200&v=4"
|
|
96
|
+
alt="SAP"
|
|
97
|
+
/>
|
|
98
|
+
</a>
|
|
99
|
+
<p
|
|
100
|
+
align="center"
|
|
101
|
+
title="SAP SE, a global software company, is one of the largest vendors of ERP and other enterprise applications."
|
|
102
|
+
>
|
|
103
|
+
BSAP SE, a global software company, is one of the largest vendors of ERP and other enterprise applications.
|
|
104
|
+
</p>
|
|
105
|
+
<p align="center">
|
|
106
|
+
<a
|
|
107
|
+
href="https://opensource.sap.com?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"
|
|
108
|
+
target="_blank"
|
|
109
|
+
><b>opensource.sap.com</b></a
|
|
110
|
+
>
|
|
111
|
+
</p>
|
|
112
|
+
</td>
|
|
113
|
+
<td align="center" width="33.333333333333336%">
|
|
114
|
+
<a
|
|
115
|
+
href="https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"
|
|
116
|
+
style="padding: 10px; display: inline-block"
|
|
117
|
+
target="_blank"
|
|
118
|
+
>
|
|
119
|
+
<img
|
|
120
|
+
width="90px"
|
|
121
|
+
height="90px"
|
|
122
|
+
src="https://images.opencollective.com/descope/b53243e/logo.png"
|
|
123
|
+
alt="Descope"
|
|
124
|
+
/>
|
|
125
|
+
</a>
|
|
126
|
+
<p
|
|
127
|
+
align="center"
|
|
128
|
+
title="Hi, we're Descope! We are building something in the authentication space for app developers and can't wait to place it in your hands."
|
|
129
|
+
>
|
|
130
|
+
Reduce user friction, prevent account takeover, and get a 360° view of your customer and agentic identities with the Descope External IAM platform.
|
|
131
|
+
</p>
|
|
132
|
+
<p align="center">
|
|
133
|
+
<a
|
|
134
|
+
href="https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"
|
|
135
|
+
target="_blank"
|
|
136
|
+
><b>descope.com</b></a
|
|
137
|
+
>
|
|
138
|
+
</p>
|
|
139
|
+
</td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr width="33.333333333333336%">
|
|
142
|
+
<td align="center" width="33.333333333333336%">
|
|
143
|
+
<a
|
|
144
|
+
href="https://stytch.com/"
|
|
145
|
+
style="padding: 10px; display: inline-block"
|
|
146
|
+
target="_blank"
|
|
147
|
+
>
|
|
148
|
+
<img
|
|
149
|
+
width="90px"
|
|
150
|
+
height="90px"
|
|
151
|
+
src="https://images.opencollective.com/stytch/f84ce43/logo/256.png?height=256"
|
|
152
|
+
alt="Stytch"
|
|
153
|
+
/>
|
|
154
|
+
</a>
|
|
155
|
+
<p
|
|
156
|
+
align="center"
|
|
157
|
+
>
|
|
158
|
+
The identity platform for humans & AI agents
|
|
159
|
+
</p>
|
|
160
|
+
<p align="center">
|
|
161
|
+
<a
|
|
162
|
+
href="https://stytch.com"
|
|
163
|
+
target="_blank"
|
|
164
|
+
><b>stytch.com</b></a
|
|
165
|
+
>
|
|
166
|
+
</p>
|
|
167
|
+
</td>
|
|
168
|
+
<td align="center" width="33.333333333333336%">
|
|
169
|
+
<a
|
|
170
|
+
href="https://rxdb.info/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship&utm_content=logo"
|
|
171
|
+
style="padding: 10px; display: inline-block"
|
|
172
|
+
target="_blank"
|
|
173
|
+
>
|
|
174
|
+
<img
|
|
175
|
+
width="90px"
|
|
176
|
+
height="90px"
|
|
177
|
+
src="https://rxdb.info/files/logo/logo_text_white.svg"
|
|
178
|
+
alt="RxDB"
|
|
179
|
+
/>
|
|
180
|
+
</a>
|
|
181
|
+
<p
|
|
182
|
+
align="center"
|
|
183
|
+
>
|
|
184
|
+
RxDB is a NoSQL database for JavaScript that runs directly in your app.
|
|
185
|
+
</p>
|
|
186
|
+
<p align="center">
|
|
187
|
+
<a
|
|
188
|
+
href="https://rxdb.info/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship&utm_content=logo"
|
|
189
|
+
target="_blank"
|
|
190
|
+
><b>rxdb.info</b></a
|
|
191
|
+
>
|
|
192
|
+
</p>
|
|
193
|
+
</td>
|
|
194
|
+
<td align="center" width="33.333333333333336%">
|
|
195
|
+
<a
|
|
196
|
+
href="https://poprey.com/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship"
|
|
197
|
+
style="padding: 10px; display: inline-block"
|
|
198
|
+
target="_blank"
|
|
199
|
+
>
|
|
200
|
+
<img
|
|
201
|
+
width="70px"
|
|
202
|
+
height="70px"
|
|
203
|
+
src="https://images.opencollective.com/instagram-likes/2a72a03/avatar.png"
|
|
204
|
+
alt="Poprey"
|
|
205
|
+
/>
|
|
206
|
+
</a>
|
|
207
|
+
<p align="center">
|
|
208
|
+
Buy Instagram Likes
|
|
209
|
+
</p>
|
|
210
|
+
<p align="center">
|
|
211
|
+
<a
|
|
212
|
+
href="https://poprey.com/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"
|
|
213
|
+
target="_blank"
|
|
214
|
+
><b>poprey.com</b></a
|
|
215
|
+
>
|
|
216
|
+
</p>
|
|
217
|
+
</td>
|
|
218
|
+
</tr>
|
|
219
|
+
<tr width="33.333333333333336%">
|
|
220
|
+
<td align="center" width="33.333333333333336%">
|
|
221
|
+
<a
|
|
222
|
+
href="https://buzzoid.com/buy-instagram-followers/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
223
|
+
style="padding: 10px; display: inline-block"
|
|
224
|
+
target="_blank"
|
|
225
|
+
>
|
|
226
|
+
<img
|
|
227
|
+
width="71px"
|
|
228
|
+
height="70px"
|
|
229
|
+
src="https://images.opencollective.com/buzzoid-buy-instagram-followers/56a09fe/logo.png"
|
|
230
|
+
alt="Buzzoid - Buy Instagram Followers"
|
|
231
|
+
/>
|
|
232
|
+
</a>
|
|
233
|
+
<p
|
|
234
|
+
align="center"
|
|
235
|
+
>
|
|
236
|
+
At Buzzoid, you can buy Instagram followers through a short checkout flow with safety controls. Rated world's #1 IG service since 2012.
|
|
237
|
+
</p>
|
|
238
|
+
<p align="center">
|
|
239
|
+
<a
|
|
240
|
+
href="https://buzzoid.com/buy-instagram-followers/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
241
|
+
target="_blank"
|
|
242
|
+
><b>buzzoid.com</b></a
|
|
243
|
+
>
|
|
244
|
+
</p>
|
|
245
|
+
</td>
|
|
246
|
+
<td align="center" width="33.333333333333336%">
|
|
247
|
+
<a
|
|
248
|
+
href="https://twicsy.com/buy-instagram-followers/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
249
|
+
style="padding: 10px; display: inline-block"
|
|
250
|
+
target="_blank"
|
|
251
|
+
>
|
|
252
|
+
<img
|
|
253
|
+
width="71px"
|
|
254
|
+
height="70px"
|
|
255
|
+
src="https://images.opencollective.com/buy-instagram-followers-twicsy/b4c5d7f/logo/256.png?height=256"
|
|
256
|
+
alt="Buy Instagram Followers Twicsy"
|
|
257
|
+
/>
|
|
258
|
+
</a>
|
|
259
|
+
<p
|
|
260
|
+
align="center"
|
|
261
|
+
>
|
|
262
|
+
Buy real Instagram followers from Twicsy. Twicsy has been voted the best site to buy followers from the likes of US Magazine.
|
|
263
|
+
</p>
|
|
264
|
+
<p align="center">
|
|
265
|
+
<a
|
|
266
|
+
href="https://twicsy.com/buy-instagram-followers/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
267
|
+
target="_blank"
|
|
268
|
+
><b>twicsy.com</b></a
|
|
269
|
+
>
|
|
270
|
+
</p>
|
|
271
|
+
</td>
|
|
272
|
+
<td align="center" width="33.333333333333336%">
|
|
273
|
+
<a
|
|
274
|
+
href="https://global.fun88.com/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
275
|
+
style="padding: 10px; display: inline-block"
|
|
276
|
+
target="_blank"
|
|
277
|
+
>
|
|
278
|
+
<img
|
|
279
|
+
width="71px"
|
|
280
|
+
height="70px"
|
|
281
|
+
src="https://images.opencollective.com/fun88-official/bf2843c/logo.png"
|
|
282
|
+
alt="Fun 88"
|
|
283
|
+
/>
|
|
284
|
+
</a>
|
|
285
|
+
<p
|
|
286
|
+
align="center"
|
|
287
|
+
>
|
|
288
|
+
Fun88 is a global online gambling and betting brand founded in 2009, offering a wide range of services including sports betting, live casino games, slots, and virtual gaming.
|
|
289
|
+
</p>
|
|
290
|
+
<p align="center">
|
|
291
|
+
<a
|
|
292
|
+
href="https://global.fun88.com/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
293
|
+
target="_blank"
|
|
294
|
+
><b>global.fun88.com</b></a
|
|
295
|
+
>
|
|
296
|
+
</p>
|
|
297
|
+
</td>
|
|
298
|
+
</tr>
|
|
299
|
+
<tr width="33.333333333333336%">
|
|
300
|
+
<td align="center" width="33.333333333333336%">
|
|
301
|
+
<a
|
|
302
|
+
href="https://www.jbo88b.com/vn/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
303
|
+
style="padding: 10px; display: inline-block"
|
|
304
|
+
target="_blank"
|
|
305
|
+
>
|
|
306
|
+
<img
|
|
307
|
+
width="71px"
|
|
308
|
+
height="70px"
|
|
309
|
+
src="https://images.opencollective.com/jbo-vietnam/3fc6159/avatar.png"
|
|
310
|
+
alt="JBO Vietnam"
|
|
311
|
+
/>
|
|
312
|
+
</a>
|
|
313
|
+
<p
|
|
314
|
+
align="center"
|
|
315
|
+
>
|
|
316
|
+
JBO Vietnam is a prominent online entertainment brand in Vietnam, offering sports betting, esports, online casino games, and a wide range of other exciting games.
|
|
317
|
+
</p>
|
|
318
|
+
<p align="center">
|
|
319
|
+
<a
|
|
320
|
+
href="https://www.jbo88b.com/vn/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
321
|
+
target="_blank"
|
|
322
|
+
><b>jbo88b.com</b></a
|
|
323
|
+
>
|
|
324
|
+
</p>
|
|
325
|
+
</td>
|
|
326
|
+
<td align="center" width="33.333333333333336%">
|
|
327
|
+
<a
|
|
328
|
+
href="https://www.jbo579.com/th/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
329
|
+
style="padding: 10px; display: inline-block"
|
|
330
|
+
target="_blank"
|
|
331
|
+
>
|
|
332
|
+
<img
|
|
333
|
+
width="71px"
|
|
334
|
+
height="70px"
|
|
335
|
+
src="https://images.opencollective.com/jbo-thailand/d17e84f/avatar.png"
|
|
336
|
+
alt="JBO Thailand"
|
|
337
|
+
/>
|
|
338
|
+
</a>
|
|
339
|
+
<p
|
|
340
|
+
align="center"
|
|
341
|
+
>
|
|
342
|
+
JBO Thailand is a prominent online entertainment brand in Thailand, offering sports betting, esports, online casino games, and a wide range of other exciting games.
|
|
343
|
+
</p>
|
|
344
|
+
<p align="center">
|
|
345
|
+
<a
|
|
346
|
+
href="https://www.jbo579.com/th/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
347
|
+
target="_blank"
|
|
348
|
+
><b>jbo88b.com</b></a
|
|
349
|
+
>
|
|
350
|
+
</p>
|
|
351
|
+
</td>
|
|
352
|
+
<td align="center" width="33.333333333333336%">
|
|
353
|
+
<a
|
|
354
|
+
href="https://kasyno.us.com/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
355
|
+
style="padding: 10px; display: inline-block"
|
|
356
|
+
target="_blank"
|
|
357
|
+
>
|
|
358
|
+
<img
|
|
359
|
+
width="71px"
|
|
360
|
+
height="70px"
|
|
361
|
+
src="https://images.opencollective.com/polskie-kasyno-online/c25e456/avatar.png"
|
|
362
|
+
alt="polskie kasyno online"
|
|
363
|
+
/>
|
|
364
|
+
</a>
|
|
365
|
+
<p
|
|
366
|
+
align="center"
|
|
367
|
+
>
|
|
368
|
+
Kasyno.us.com to niezależny portal o tematyce kasyno online Polska, który pomaga graczom znaleźć bezpieczne i sprawdzone kasyna internetowe.
|
|
369
|
+
</p>
|
|
370
|
+
<p align="center">
|
|
371
|
+
<a
|
|
372
|
+
href="https://kasyno.us.com/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
373
|
+
target="_blank"
|
|
374
|
+
><b>kasyno.us.com</b></a
|
|
375
|
+
>
|
|
376
|
+
</p>
|
|
377
|
+
</td>
|
|
378
|
+
</tr>
|
|
379
|
+
<tr width="33.333333333333336%">
|
|
380
|
+
<td align="center" width="33.333333333333336%">
|
|
381
|
+
<a
|
|
382
|
+
href="https://www.scrapingbee.com/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
383
|
+
style="padding: 10px; display: inline-block"
|
|
384
|
+
target="_blank"
|
|
385
|
+
>
|
|
386
|
+
<img
|
|
387
|
+
width="90px"
|
|
388
|
+
height="90px"
|
|
389
|
+
src="https://images.opencollective.com/scrapingbee/6d5dc95/logo.png"
|
|
390
|
+
alt="ScrapingBee"
|
|
391
|
+
/>
|
|
392
|
+
</a>
|
|
393
|
+
<p
|
|
394
|
+
align="center"
|
|
395
|
+
>
|
|
396
|
+
Scrape websites with a powerful web scraping API without managing proxies, browsers, or anti-bot defenses.
|
|
397
|
+
</p>
|
|
398
|
+
<p align="center">
|
|
399
|
+
<a
|
|
400
|
+
href="https://www.scrapingbee.com/?utm_source=axios_docs_website&utm_medium=website&utm_campaign=axios_open_collective_sponsorship"
|
|
401
|
+
target="_blank"
|
|
402
|
+
><b>scrapingbee.com</b></a
|
|
403
|
+
>
|
|
404
|
+
</p>
|
|
405
|
+
</td>
|
|
406
|
+
<td align="center" width="33.333333333333336%">
|
|
407
|
+
<a
|
|
408
|
+
href="https://opencollective.com/axios/contribute"
|
|
409
|
+
target="_blank"
|
|
410
|
+
>💜 Become a sponsor</a
|
|
411
|
+
>
|
|
412
|
+
</td>
|
|
413
|
+
<td align="center" width="33.333333333333336%">
|
|
414
|
+
<a
|
|
415
|
+
href="https://opencollective.com/axios/contribute"
|
|
416
|
+
target="_blank"
|
|
417
|
+
>💜 Become a sponsor</a
|
|
418
|
+
>
|
|
419
|
+
</td>
|
|
420
|
+
</tr>
|
|
421
|
+
</table>
|
|
422
|
+
|
|
423
|
+
<!--<div>marker</div>-->
|
|
424
|
+
|
|
425
|
+
<br><br>
|
|
426
|
+
|
|
427
|
+
<div align="center">
|
|
428
|
+
<a href="https://axios.rest"><img src="https://axios.rest/logo.svg" alt="Axios" /></a><br>
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<p align="center">Promise based HTTP client for the browser and node.js</p>
|
|
432
|
+
|
|
433
|
+
<p align="center">
|
|
434
|
+
<a href="https://axios.rest/"><b>Website</b></a> •
|
|
435
|
+
<a href="https://axios.rest/pages/getting-started/first-steps.html"><b>Documentation</b></a>
|
|
436
|
+
</p>
|
|
437
|
+
|
|
438
|
+
<div align="center">
|
|
2
439
|
|
|
3
440
|
[](https://www.npmjs.org/package/axios)
|
|
4
|
-
[](https://packagephobia.now.sh/result?p=axios)
|
|
441
|
+
[](https://github.com/axios/axios/actions/workflows/ci.yml)
|
|
442
|
+
[](https://gitpod.io/#https://github.com/axios/axios)
|
|
443
|
+
[](https://packagephobia.now.sh/result?p=axios)
|
|
444
|
+
[](https://bundlephobia.com/package/axios@latest)
|
|
9
445
|
[](https://npm-stat.com/charts.html?package=axios)
|
|
10
446
|
[](https://gitter.im/mzabriskie/axios)
|
|
11
447
|
[](https://www.codetriage.com/axios/axios)
|
|
12
|
-
[](CONTRIBUTORS.md)
|
|
449
|
+
[](https://agentfriendlycode.com/repo/32)
|
|
450
|
+
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
## Table of contents
|
|
454
|
+
|
|
455
|
+
- [Features](#features)
|
|
456
|
+
- [Browser support](#browser-support)
|
|
457
|
+
- [Installing](#installing)
|
|
458
|
+
- [Package manager](#package-manager)
|
|
459
|
+
- [CDN](#cdn)
|
|
460
|
+
- [Example](#example)
|
|
461
|
+
- [Axios API](#axios-api)
|
|
462
|
+
- [Request method aliases](#request-method-aliases)
|
|
463
|
+
- [Concurrency](#concurrency-deprecated)
|
|
464
|
+
- [Creating an instance](#creating-an-instance)
|
|
465
|
+
- [Instance methods](#instance-methods)
|
|
466
|
+
- [Request config](#request-config)
|
|
467
|
+
- [Response schema](#response-schema)
|
|
468
|
+
- [Config defaults](#config-defaults)
|
|
469
|
+
- [Global axios defaults](#global-axios-defaults)
|
|
470
|
+
- [Custom instance defaults](#custom-instance-defaults)
|
|
471
|
+
- [Config order of precedence](#config-order-of-precedence)
|
|
472
|
+
- [Interceptors](#interceptors)
|
|
473
|
+
- [Multiple interceptors](#multiple-interceptors)
|
|
474
|
+
- [Handling errors](#handling-errors)
|
|
475
|
+
- [Handling timeouts](#handling-timeouts)
|
|
476
|
+
- [Cancellation](#cancellation)
|
|
477
|
+
- [AbortController](#abortcontroller)
|
|
478
|
+
- [CancelToken](#canceltoken-deprecated)
|
|
479
|
+
- [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format)
|
|
480
|
+
- [URLSearchParams](#urlsearchparams)
|
|
481
|
+
- [Query string](#query-string-older-browsers)
|
|
482
|
+
- [Automatic serialization](#automatic-serialization-to-urlsearchparams)
|
|
483
|
+
- [Using multipart/form-data format](#using-multipartform-data-format)
|
|
484
|
+
- [FormData](#formdata)
|
|
485
|
+
- [Automatic serialization](#automatic-serialization-to-formdata)
|
|
486
|
+
- [Posting files](#posting-files)
|
|
487
|
+
- [HTML form posting](#html-form-posting-browser)
|
|
488
|
+
- [Progress capturing](#progress-capturing)
|
|
489
|
+
- [Rate limiting](#rate-limiting)
|
|
490
|
+
- [AxiosHeaders](#axiosheaders)
|
|
491
|
+
- [Fetch adapter](#fetch-adapter)
|
|
492
|
+
- [Custom fetch](#custom-fetch)
|
|
493
|
+
- [Using with Tauri](#using-with-tauri)
|
|
494
|
+
- [Using with SvelteKit](#using-with-sveltekit)
|
|
495
|
+
- [HTTP/2 support](#http2-support)
|
|
496
|
+
- [Semver](#semver)
|
|
497
|
+
- [Promises](#promises)
|
|
498
|
+
- [TypeScript](#typescript)
|
|
499
|
+
- [Contributing](#contributing)
|
|
500
|
+
- [Local setup](#local-setup)
|
|
501
|
+
- [Resources](#resources)
|
|
502
|
+
- [Credits](#credits)
|
|
503
|
+
- [License](#license)
|
|
57
504
|
|
|
58
505
|
## Features
|
|
59
506
|
|
|
60
|
-
- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
|
|
61
|
-
- Make [http](https://nodejs.org/api/http.html) requests from
|
|
62
|
-
-
|
|
63
|
-
- Intercept
|
|
64
|
-
- Transform request and response data
|
|
65
|
-
- Cancel requests
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
507
|
+
- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser.
|
|
508
|
+
- Make [http](https://nodejs.org/api/http.html) requests from Node.js.
|
|
509
|
+
- Use the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API for asynchronous request handling.
|
|
510
|
+
- Intercept requests and responses to add custom logic or transform data.
|
|
511
|
+
- Transform request and response data.
|
|
512
|
+
- Cancel requests with built-in cancellation APIs.
|
|
513
|
+
- Serialize and parse [JSON](https://www.json.org/json-en.html) data.
|
|
514
|
+
- Serialize data objects to `multipart/form-data` or `application/x-www-form-urlencoded`.
|
|
515
|
+
- Add client-side protection against [Cross-Site Request Forgery](https://en.wikipedia.org/wiki/Cross-site_request_forgery).
|
|
69
516
|
|
|
70
|
-
## Browser
|
|
517
|
+
## Browser support
|
|
71
518
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
519
|
+
| Chrome | Firefox | Safari | Opera | Edge |
|
|
520
|
+
| :------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------: |
|
|
521
|
+
|  |  |  |  |  |
|
|
522
|
+
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
75
523
|
|
|
76
524
|
[](https://saucelabs.com/u/axios)
|
|
77
525
|
|
|
78
526
|
## Installing
|
|
79
527
|
|
|
528
|
+
### Package manager
|
|
529
|
+
|
|
80
530
|
Using npm:
|
|
81
531
|
|
|
82
532
|
```bash
|
|
83
533
|
$ npm install axios
|
|
84
534
|
```
|
|
85
535
|
|
|
86
|
-
Using bower:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
$ bower install axios
|
|
90
|
-
```
|
|
91
|
-
|
|
92
536
|
Using yarn:
|
|
93
537
|
|
|
94
538
|
```bash
|
|
@@ -101,53 +545,87 @@ Using pnpm:
|
|
|
101
545
|
$ pnpm add axios
|
|
102
546
|
```
|
|
103
547
|
|
|
104
|
-
Using
|
|
548
|
+
Using bun:
|
|
105
549
|
|
|
106
|
-
```
|
|
107
|
-
|
|
550
|
+
```bash
|
|
551
|
+
$ bun add axios
|
|
108
552
|
```
|
|
109
553
|
|
|
110
|
-
Using
|
|
554
|
+
Using Deno:
|
|
111
555
|
|
|
112
|
-
```
|
|
113
|
-
|
|
556
|
+
```bash
|
|
557
|
+
$ deno add axios
|
|
114
558
|
```
|
|
115
559
|
|
|
116
|
-
|
|
560
|
+
Once the package is installed, import it with `import` or `require`:
|
|
561
|
+
|
|
562
|
+
```js
|
|
563
|
+
import axios, { isCancel, AxiosError } from 'axios';
|
|
564
|
+
```
|
|
117
565
|
|
|
118
|
-
|
|
119
|
-
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:
|
|
566
|
+
You can also use the default export, since the named export is just a re-export from the Axios factory:
|
|
120
567
|
|
|
121
568
|
```js
|
|
122
|
-
|
|
569
|
+
import axios from 'axios';
|
|
123
570
|
|
|
124
|
-
|
|
571
|
+
console.log(axios.isCancel('something'));
|
|
125
572
|
```
|
|
126
573
|
|
|
127
|
-
|
|
574
|
+
If you use `require` for importing, **only the default export is available**:
|
|
128
575
|
|
|
129
576
|
```js
|
|
130
|
-
const axios = require('axios')
|
|
577
|
+
const axios = require('axios');
|
|
131
578
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
579
|
+
console.log(axios.isCancel('something'));
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
Some bundlers and ES6 linters need this form:
|
|
583
|
+
|
|
584
|
+
```js
|
|
585
|
+
import { default as axios } from 'axios';
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
In custom or legacy environments, you can import the bundle directly:
|
|
589
|
+
|
|
590
|
+
```js
|
|
591
|
+
const axios = require('axios/dist/browser/axios.cjs'); // browser commonJS bundle (ES2017)
|
|
592
|
+
// const axios = require('axios/dist/node/axios.cjs'); // node commonJS bundle (ES2017)
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### CDN
|
|
596
|
+
|
|
597
|
+
Using jsDelivr CDN (ES5 UMD browser module):
|
|
598
|
+
|
|
599
|
+
```html
|
|
600
|
+
<script src="https://cdn.jsdelivr.net/npm/axios@1.13.2/dist/axios.min.js"></script>
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Using unpkg CDN:
|
|
604
|
+
|
|
605
|
+
```html
|
|
606
|
+
<script src="https://unpkg.com/axios@1.13.2/dist/axios.min.js"></script>
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
## Example
|
|
610
|
+
|
|
611
|
+
```js
|
|
612
|
+
import axios from 'axios';
|
|
613
|
+
//const axios = require('axios'); // legacy way
|
|
614
|
+
|
|
615
|
+
try {
|
|
616
|
+
const response = await axios.get('/user?ID=12345');
|
|
617
|
+
console.log(response);
|
|
618
|
+
} catch (error) {
|
|
619
|
+
console.error(error);
|
|
620
|
+
}
|
|
145
621
|
|
|
146
622
|
// Optionally the request above could also be done as
|
|
147
|
-
axios
|
|
623
|
+
axios
|
|
624
|
+
.get('/user', {
|
|
148
625
|
params: {
|
|
149
|
-
ID: 12345
|
|
150
|
-
}
|
|
626
|
+
ID: 12345,
|
|
627
|
+
},
|
|
628
|
+
timeout: 5000, // 5 seconds. See "Handling Timeouts" below for matching error handling
|
|
151
629
|
})
|
|
152
630
|
.then(function (response) {
|
|
153
631
|
console.log(response);
|
|
@@ -155,14 +633,22 @@ axios.get('/user', {
|
|
|
155
633
|
.catch(function (error) {
|
|
156
634
|
console.log(error);
|
|
157
635
|
})
|
|
158
|
-
.
|
|
636
|
+
.finally(function () {
|
|
159
637
|
// always executed
|
|
160
638
|
});
|
|
161
639
|
|
|
162
640
|
// Want to use async/await? Add the `async` keyword to your outer function/method.
|
|
163
641
|
async function getUser() {
|
|
164
642
|
try {
|
|
165
|
-
|
|
643
|
+
// Example: GET request with query parameters
|
|
644
|
+
const response = await axios.get('/user', {
|
|
645
|
+
params: {
|
|
646
|
+
ID: 12345,
|
|
647
|
+
},
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
// Using the `params` option improves readability and automatically formats query strings
|
|
651
|
+
|
|
166
652
|
console.log(response);
|
|
167
653
|
} catch (error) {
|
|
168
654
|
console.error(error);
|
|
@@ -170,22 +656,20 @@ async function getUser() {
|
|
|
170
656
|
}
|
|
171
657
|
```
|
|
172
658
|
|
|
173
|
-
>
|
|
659
|
+
> Note: Set a `timeout` in production. Without one, a stalled request can hang
|
|
660
|
+
> indefinitely. See [Handling Timeouts](#handling-timeouts) for the matching error handling.
|
|
661
|
+
|
|
662
|
+
> Note: `async/await` is part of ECMAScript 2017 and is not supported in Internet
|
|
174
663
|
> Explorer and older browsers, so use with caution.
|
|
175
664
|
|
|
176
665
|
Performing a `POST` request
|
|
177
666
|
|
|
178
667
|
```js
|
|
179
|
-
axios.post('/user', {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
console.log(response);
|
|
185
|
-
})
|
|
186
|
-
.catch(function (error) {
|
|
187
|
-
console.log(error);
|
|
188
|
-
});
|
|
668
|
+
const response = await axios.post('/user', {
|
|
669
|
+
firstName: 'Fred',
|
|
670
|
+
lastName: 'Flintstone',
|
|
671
|
+
});
|
|
672
|
+
console.log(response);
|
|
189
673
|
```
|
|
190
674
|
|
|
191
675
|
Performing multiple concurrent requests
|
|
@@ -199,11 +683,10 @@ function getUserPermissions() {
|
|
|
199
683
|
return axios.get('/user/12345/permissions');
|
|
200
684
|
}
|
|
201
685
|
|
|
202
|
-
Promise.all([getUserAccount(), getUserPermissions()])
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
});
|
|
686
|
+
Promise.all([getUserAccount(), getUserPermissions()]).then(function (results) {
|
|
687
|
+
const acct = results[0];
|
|
688
|
+
const perm = results[1];
|
|
689
|
+
});
|
|
207
690
|
```
|
|
208
691
|
|
|
209
692
|
## axios API
|
|
@@ -219,21 +702,20 @@ axios({
|
|
|
219
702
|
url: '/user/12345',
|
|
220
703
|
data: {
|
|
221
704
|
firstName: 'Fred',
|
|
222
|
-
lastName: 'Flintstone'
|
|
223
|
-
}
|
|
705
|
+
lastName: 'Flintstone',
|
|
706
|
+
},
|
|
224
707
|
});
|
|
225
708
|
```
|
|
226
709
|
|
|
227
710
|
```js
|
|
228
711
|
// GET request for remote image in node.js
|
|
229
|
-
|
|
712
|
+
import fs from 'fs';
|
|
713
|
+
const response = await axios({
|
|
230
714
|
method: 'get',
|
|
231
715
|
url: 'https://bit.ly/2mTM3nY',
|
|
232
|
-
responseType: 'stream'
|
|
233
|
-
})
|
|
234
|
-
|
|
235
|
-
response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
|
|
236
|
-
});
|
|
716
|
+
responseType: 'stream',
|
|
717
|
+
});
|
|
718
|
+
response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'));
|
|
237
719
|
```
|
|
238
720
|
|
|
239
721
|
##### axios(url[, config])
|
|
@@ -248,19 +730,28 @@ axios('/user/12345');
|
|
|
248
730
|
For convenience, aliases have been provided for all common request methods.
|
|
249
731
|
|
|
250
732
|
##### axios.request(config)
|
|
733
|
+
|
|
251
734
|
##### axios.get(url[, config])
|
|
735
|
+
|
|
252
736
|
##### axios.delete(url[, config])
|
|
737
|
+
|
|
253
738
|
##### axios.head(url[, config])
|
|
739
|
+
|
|
254
740
|
##### axios.options(url[, config])
|
|
741
|
+
|
|
255
742
|
##### axios.post(url[, data[, config]])
|
|
743
|
+
|
|
256
744
|
##### axios.put(url[, data[, config]])
|
|
745
|
+
|
|
257
746
|
##### axios.patch(url[, data[, config]])
|
|
258
747
|
|
|
259
|
-
######
|
|
748
|
+
###### Note
|
|
749
|
+
|
|
260
750
|
When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
|
|
261
751
|
|
|
262
|
-
### Concurrency (
|
|
263
|
-
|
|
752
|
+
### Concurrency (deprecated)
|
|
753
|
+
|
|
754
|
+
Use `Promise.all` instead of these helpers.
|
|
264
755
|
|
|
265
756
|
Helper functions for dealing with concurrent requests.
|
|
266
757
|
|
|
@@ -277,41 +768,72 @@ You can create a new instance of axios with a custom config.
|
|
|
277
768
|
const instance = axios.create({
|
|
278
769
|
baseURL: 'https://some-domain.com/api/',
|
|
279
770
|
timeout: 1000,
|
|
280
|
-
headers: {'X-Custom-Header': 'foobar'}
|
|
771
|
+
headers: { 'X-Custom-Header': 'foobar' },
|
|
281
772
|
});
|
|
282
773
|
```
|
|
283
774
|
|
|
284
775
|
### Instance methods
|
|
285
776
|
|
|
286
|
-
The
|
|
777
|
+
The following instance methods are available. Axios merges the specified config with the instance config.
|
|
287
778
|
|
|
288
779
|
##### axios#request(config)
|
|
780
|
+
|
|
289
781
|
##### axios#get(url[, config])
|
|
782
|
+
|
|
290
783
|
##### axios#delete(url[, config])
|
|
784
|
+
|
|
291
785
|
##### axios#head(url[, config])
|
|
786
|
+
|
|
292
787
|
##### axios#options(url[, config])
|
|
788
|
+
|
|
293
789
|
##### axios#post(url[, data[, config]])
|
|
790
|
+
|
|
294
791
|
##### axios#put(url[, data[, config]])
|
|
792
|
+
|
|
295
793
|
##### axios#patch(url[, data[, config]])
|
|
794
|
+
|
|
296
795
|
##### axios#getUri([config])
|
|
297
796
|
|
|
298
|
-
## Request
|
|
797
|
+
## Request config
|
|
798
|
+
|
|
799
|
+
### Security notice: decompression-bomb protection is opt-in
|
|
800
|
+
|
|
801
|
+
By default `maxContentLength` and `maxBodyLength` are `-1` (unlimited). A malicious or compromised server can return a tiny gzip/deflate/brotli/zstd body that expands to gigabytes and exhaust the Node.js process.
|
|
802
|
+
|
|
803
|
+
If you call servers you do not fully trust, **set a cap**:
|
|
804
|
+
|
|
805
|
+
```js
|
|
806
|
+
axios.defaults.maxContentLength = 10 * 1024 * 1024; // 10 MB
|
|
807
|
+
axios.defaults.maxBodyLength = 10 * 1024 * 1024;
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
See the [security guide](https://axios.rest/pages/misc/security.html) for details.
|
|
299
811
|
|
|
300
|
-
These are
|
|
812
|
+
These config options are available for requests. Only `url` is required. Requests default to `GET` when `method` is not set.
|
|
301
813
|
|
|
302
814
|
```js
|
|
303
815
|
{
|
|
304
|
-
// `url` is the server URL
|
|
816
|
+
// `url` is the server URL for the request
|
|
305
817
|
url: '/user',
|
|
306
818
|
|
|
307
819
|
// `method` is the request method to be used when making the request
|
|
308
820
|
method: 'get', // default
|
|
309
821
|
|
|
310
|
-
// `baseURL`
|
|
822
|
+
// Axios prepends `baseURL` to `url` unless `url` is absolute and `allowAbsoluteUrls` is set to true.
|
|
311
823
|
// It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
|
|
312
|
-
// to methods of that instance.
|
|
824
|
+
// to the methods of that instance.
|
|
825
|
+
// `baseURL` is not a security boundary. If `url` is attacker-controlled, validate it
|
|
826
|
+
// before passing it to axios. Relative URLs can contain `..` segments that resolve
|
|
827
|
+
// outside an intended path prefix after the final URL is parsed.
|
|
828
|
+
// HTTP(S) URLs must include `//` after the protocol. Values such as
|
|
829
|
+
// `https:example.com` and `https:/example.com` are rejected with ERR_INVALID_URL.
|
|
313
830
|
baseURL: 'https://some-domain.com/api/',
|
|
314
831
|
|
|
832
|
+
// `allowAbsoluteUrls` determines whether or not absolute URLs will override a configured `baseUrl`.
|
|
833
|
+
// When set to true (default), absolute values for `url` will override `baseUrl`.
|
|
834
|
+
// When set to false, absolute values for `url` will always be prepended by `baseUrl`.
|
|
835
|
+
allowAbsoluteUrls: true,
|
|
836
|
+
|
|
315
837
|
// `transformRequest` allows changes to the request data before it is sent to the server
|
|
316
838
|
// This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
|
|
317
839
|
// The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
|
|
@@ -331,6 +853,27 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
331
853
|
return data;
|
|
332
854
|
}],
|
|
333
855
|
|
|
856
|
+
// `parseReviver` is an optional function passed as the
|
|
857
|
+
// second argument (reviver) to JSON.parse()
|
|
858
|
+
parseReviver: function (key, value, context) {
|
|
859
|
+
// In modern environments, context.source provides the raw JSON string
|
|
860
|
+
// allowing for precision-safe parsing of BigInt
|
|
861
|
+
if (typeof value === 'number' && context?.source) {
|
|
862
|
+
const isInteger = Number.isInteger(value);
|
|
863
|
+
const isUnsafe = !Number.isSafeInteger(value);
|
|
864
|
+
const isValidIntegerString = /^-?\d+$/.test(context.source);
|
|
865
|
+
|
|
866
|
+
if (isInteger && isUnsafe && isValidIntegerString) {
|
|
867
|
+
try {
|
|
868
|
+
return BigInt(context.source);
|
|
869
|
+
} catch {
|
|
870
|
+
// Fallback: return original value if parsing fails
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
return value;
|
|
875
|
+
},
|
|
876
|
+
|
|
334
877
|
// `headers` are custom headers to be sent
|
|
335
878
|
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
|
336
879
|
|
|
@@ -340,43 +883,75 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
340
883
|
ID: 12345
|
|
341
884
|
},
|
|
342
885
|
|
|
343
|
-
// `paramsSerializer` is an optional config
|
|
886
|
+
// `paramsSerializer` is an optional config that allows you to customize serializing `params`.
|
|
344
887
|
paramsSerializer: {
|
|
345
|
-
|
|
888
|
+
|
|
889
|
+
// Custom encoder function which sends key/value pairs in an iterative fashion.
|
|
890
|
+
encode?: (param: string): string => { /* Do custom operations here and return transformed string */ },
|
|
891
|
+
|
|
892
|
+
// Custom serializer function for the entire parameter. Allows the user to mimic pre 1.x behaviour.
|
|
893
|
+
serialize?: (params: Record<string, any>, options?: ParamsSerializerOptions ),
|
|
894
|
+
|
|
895
|
+
// Configuration for formatting array indexes in the params.
|
|
896
|
+
indexes: false, // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes).
|
|
897
|
+
|
|
898
|
+
// Maximum object nesting depth when serializing params. Payloads deeper than this throw an
|
|
899
|
+
// AxiosError with code ERR_FORM_DATA_DEPTH_EXCEEDED. Default: 100. Set to Infinity to disable.
|
|
900
|
+
maxDepth: 100
|
|
901
|
+
|
|
346
902
|
},
|
|
347
903
|
|
|
348
904
|
// `data` is the data to be sent as the request body
|
|
349
|
-
// Only applicable for request methods 'PUT', 'POST', 'DELETE
|
|
350
|
-
//
|
|
905
|
+
// Only applicable for request methods 'PUT', 'POST', 'DELETE', and 'PATCH'
|
|
906
|
+
// `data` is request-specific: axios does not inherit or deep-merge it from defaults.
|
|
907
|
+
// To add shared body fields, use a request interceptor or transformRequest.
|
|
908
|
+
// When no `transformRequest` is set, it must be of one of the following types:
|
|
351
909
|
// - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
|
|
352
910
|
// - Browser only: FormData, File, Blob
|
|
353
|
-
// -
|
|
911
|
+
// - React Native: FormData
|
|
912
|
+
// - Node only: Stream, Buffer, FormData (form-data package)
|
|
354
913
|
data: {
|
|
355
914
|
firstName: 'Fred'
|
|
356
915
|
},
|
|
357
916
|
|
|
917
|
+
// `formDataHeaderPolicy` controls how node.js FormData#getHeaders() is copied.
|
|
918
|
+
// 'legacy' (default) copies all returned headers for v1 compatibility.
|
|
919
|
+
// 'content-only' copies only Content-Type and Content-Length.
|
|
920
|
+
formDataHeaderPolicy: 'legacy',
|
|
921
|
+
|
|
358
922
|
// syntax alternative to send data into the body
|
|
359
923
|
// method post
|
|
360
924
|
// only the value is sent, not the key
|
|
361
925
|
data: 'Country=Brasil&City=Belo Horizonte',
|
|
362
926
|
|
|
363
927
|
// `timeout` specifies the number of milliseconds before the request times out.
|
|
364
|
-
// If the request takes longer than `timeout`,
|
|
928
|
+
// If the request takes longer than `timeout`, Axios aborts it.
|
|
365
929
|
timeout: 1000, // default is `0` (no timeout)
|
|
366
930
|
|
|
367
931
|
// `withCredentials` indicates whether or not cross-site Access-Control requests
|
|
368
932
|
// should be made using credentials
|
|
933
|
+
// This only controls whether the browser sends credentials.
|
|
934
|
+
// It does not control whether the XSRF header is added.
|
|
369
935
|
withCredentials: false, // default
|
|
370
936
|
|
|
371
937
|
// `adapter` allows custom handling of requests which makes testing easier.
|
|
372
|
-
// Return a promise and supply a valid response (see lib/adapters/README.md)
|
|
938
|
+
// Return a promise and supply a valid response (see lib/adapters/README.md)
|
|
373
939
|
adapter: function (config) {
|
|
374
940
|
/* ... */
|
|
375
941
|
},
|
|
942
|
+
// Also, you can set the name of the built-in adapter, or provide an array with their names
|
|
943
|
+
// to choose the first available in the environment
|
|
944
|
+
adapter: 'xhr', // 'fetch' | 'http' | ['xhr', 'http', 'fetch']
|
|
376
945
|
|
|
377
946
|
// `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
|
|
378
947
|
// This will set an `Authorization` header, overwriting any existing
|
|
379
948
|
// `Authorization` custom headers you have set using `headers`.
|
|
949
|
+
// If `auth` is omitted, the Node.js HTTP and fetch adapters can read
|
|
950
|
+
// HTTP Basic auth credentials from the request URL, for example
|
|
951
|
+
// `https://user:pass@example.com`. Axios decodes percent-encoded URL
|
|
952
|
+
// credentials, and `auth` takes precedence over URL-embedded credentials.
|
|
953
|
+
// The Node.js HTTP adapter preserves Basic auth on same-origin redirects
|
|
954
|
+
// and strips it on cross-origin redirects.
|
|
380
955
|
// Please note that only HTTP Basic auth is configurable through this parameter.
|
|
381
956
|
// For Bearer tokens and such, use `Authorization` custom headers instead.
|
|
382
957
|
auth: {
|
|
@@ -391,67 +966,135 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
391
966
|
|
|
392
967
|
// `responseEncoding` indicates encoding to use for decoding responses (Node.js only)
|
|
393
968
|
// Note: Ignored for `responseType` of 'stream' or client-side requests
|
|
969
|
+
// options are: 'ascii', 'ASCII', 'ansi', 'ANSI', 'binary', 'BINARY', 'base64', 'BASE64', 'base64url',
|
|
970
|
+
// 'BASE64URL', 'hex', 'HEX', 'latin1', 'LATIN1', 'ucs-2', 'UCS-2', 'ucs2', 'UCS2', 'utf-8', 'UTF-8',
|
|
971
|
+
// 'utf8', 'UTF8', 'utf16le', 'UTF16LE'
|
|
394
972
|
responseEncoding: 'utf8', // default
|
|
395
973
|
|
|
396
|
-
// `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
|
|
974
|
+
// `xsrfCookieName` is the name of the cookie to use as a value for the xsrf token
|
|
397
975
|
xsrfCookieName: 'XSRF-TOKEN', // default
|
|
398
976
|
|
|
399
977
|
// `xsrfHeaderName` is the name of the http header that carries the xsrf token value
|
|
400
978
|
xsrfHeaderName: 'X-XSRF-TOKEN', // default
|
|
401
979
|
|
|
980
|
+
// `withXSRFToken` defines whether to send the XSRF header in browser requests.
|
|
402
981
|
// `undefined` (default) - set XSRF header only for the same origin requests
|
|
403
|
-
|
|
982
|
+
// `true` - always set XSRF header, including for cross-origin requests
|
|
983
|
+
// `false` - never set XSRF header
|
|
984
|
+
// function - resolve with custom logic; receives the internal config object
|
|
985
|
+
withXSRFToken: boolean | undefined | ((config: InternalAxiosRequestConfig) => boolean | undefined),
|
|
986
|
+
|
|
987
|
+
// `withXSRFToken` controls whether Axios reads the XSRF cookie and sets the XSRF header.
|
|
988
|
+
// - `undefined` (default): the XSRF header is set only for same-origin requests.
|
|
989
|
+
// - `true`: attempt to set the XSRF header for all requests (including cross-origin).
|
|
990
|
+
// - `false`: never set the XSRF header.
|
|
991
|
+
// - function: a callback that receives the request `config` and returns `true`,
|
|
992
|
+
// `false`, or `undefined` to decide per-request behavior.
|
|
993
|
+
//
|
|
994
|
+
// Note about `withCredentials`: `withCredentials` controls whether cross-site
|
|
995
|
+
// requests include credentials (cookies and HTTP auth). In older Axios versions,
|
|
996
|
+
// setting `withCredentials: true` implicitly caused Axios to set the XSRF header
|
|
997
|
+
// for cross-origin requests. Newer Axios separates these concerns: to allow the
|
|
998
|
+
// XSRF header to be sent for cross-origin requests you should set both
|
|
999
|
+
// `withCredentials: true` and `withXSRFToken: true`.
|
|
1000
|
+
//
|
|
1001
|
+
// Example:
|
|
1002
|
+
// axios.get('/user', { withCredentials: true, withXSRFToken: true });
|
|
404
1003
|
|
|
405
1004
|
// `onUploadProgress` allows handling of progress events for uploads
|
|
406
|
-
// browser
|
|
407
|
-
onUploadProgress: function (
|
|
408
|
-
// Do whatever you want with the
|
|
1005
|
+
// browser & node.js
|
|
1006
|
+
onUploadProgress: function ({loaded, total, progress, bytes, estimated, rate, upload = true}) {
|
|
1007
|
+
// Do whatever you want with the Axios progress event
|
|
409
1008
|
},
|
|
410
1009
|
|
|
411
1010
|
// `onDownloadProgress` allows handling of progress events for downloads
|
|
412
|
-
// browser
|
|
413
|
-
onDownloadProgress: function (
|
|
414
|
-
// Do whatever you want with the
|
|
1011
|
+
// browser & node.js
|
|
1012
|
+
onDownloadProgress: function ({loaded, total, progress, bytes, estimated, rate, download = true}) {
|
|
1013
|
+
// Do whatever you want with the Axios progress event
|
|
415
1014
|
},
|
|
416
1015
|
|
|
417
|
-
// `maxContentLength` defines the max size of the
|
|
1016
|
+
// `maxContentLength` defines the max size of the response content in bytes.
|
|
1017
|
+
// It is enforced by the Node.js HTTP adapter and the fetch adapter.
|
|
418
1018
|
maxContentLength: 2000,
|
|
419
1019
|
|
|
420
|
-
// `maxBodyLength`
|
|
1020
|
+
// `maxBodyLength` defines the max size of the request content in bytes.
|
|
1021
|
+
// It is enforced by the Node.js HTTP adapter and the fetch adapter when the body length can be determined.
|
|
421
1022
|
maxBodyLength: 2000,
|
|
422
1023
|
|
|
1024
|
+
// `redact` masks matching config keys when AxiosError#toJSON() is called.
|
|
1025
|
+
// Matching is case-insensitive and recursive. It does not change the request.
|
|
1026
|
+
redact: ['authorization', 'password'],
|
|
1027
|
+
|
|
423
1028
|
// `validateStatus` defines whether to resolve or reject the promise for a given
|
|
424
|
-
// HTTP response status code. If `validateStatus` returns `true`
|
|
425
|
-
//
|
|
426
|
-
//
|
|
1029
|
+
// HTTP response status code. If `validateStatus` returns `true` or is set to
|
|
1030
|
+
// `null`, Axios resolves the promise; otherwise, Axios rejects it.
|
|
1031
|
+
// Explicit `validateStatus: undefined` resolves every status by default for
|
|
1032
|
+
// backward compatibility. Set `transitional.validateStatusUndefinedResolves`
|
|
1033
|
+
// to `false` to make explicit `undefined` behave as if this option was omitted.
|
|
427
1034
|
validateStatus: function (status) {
|
|
428
1035
|
return status >= 200 && status < 300; // default
|
|
429
1036
|
},
|
|
430
1037
|
|
|
431
1038
|
// `maxRedirects` defines the maximum number of redirects to follow in node.js.
|
|
432
|
-
// If set to 0, no redirects
|
|
1039
|
+
// If set to 0, Axios follows no redirects.
|
|
433
1040
|
maxRedirects: 21, // default
|
|
434
1041
|
|
|
435
|
-
// `
|
|
1042
|
+
// `sensitiveHeaders` (Node only option) lists custom secret-bearing headers
|
|
1043
|
+
// (such as `X-API-Key`) to remove from cross-origin redirects. Matching is
|
|
1044
|
+
// case-insensitive. Same-origin redirects keep these headers. If
|
|
1045
|
+
// `maxRedirects` is 0, this option is not used.
|
|
1046
|
+
sensitiveHeaders: ['X-API-Key'],
|
|
1047
|
+
|
|
1048
|
+
// `beforeRedirect` defines a function that Axios calls before redirect.
|
|
436
1049
|
// Use this to adjust the request options upon redirecting,
|
|
437
1050
|
// to inspect the latest response headers,
|
|
438
1051
|
// or to cancel the request by throwing an error
|
|
439
1052
|
// If maxRedirects is set to 0, `beforeRedirect` is not used.
|
|
1053
|
+
|
|
440
1054
|
beforeRedirect: (options, { headers }) => {
|
|
441
|
-
if (
|
|
1055
|
+
if (
|
|
1056
|
+
options.hostname === "example.com" &&
|
|
1057
|
+
options.protocol === "https:"
|
|
1058
|
+
) {
|
|
442
1059
|
options.auth = "user:password";
|
|
443
1060
|
}
|
|
444
1061
|
},
|
|
1062
|
+
// Security note:
|
|
1063
|
+
// The `beforeRedirect` hook runs after sensitive headers are stripped during redirects.
|
|
1064
|
+
// `follow-redirects` removes credentials on protocol downgrades
|
|
1065
|
+
// (HTTPS to HTTP). Because `beforeRedirect` runs after that step,
|
|
1066
|
+
// re-injecting credentials without checking the destination can expose
|
|
1067
|
+
// sensitive data. Only add credentials for trusted HTTPS destinations.
|
|
445
1068
|
|
|
446
1069
|
// `socketPath` defines a UNIX Socket to be used in node.js.
|
|
447
1070
|
// e.g. '/var/run/docker.sock' to send requests to the docker daemon.
|
|
448
1071
|
// Only either `socketPath` or `proxy` can be specified.
|
|
449
1072
|
// If both are specified, `socketPath` is used.
|
|
1073
|
+
//
|
|
1074
|
+
// Security: when `socketPath` is set, hostname/port of the URL are ignored,
|
|
1075
|
+
// which bypasses hostname-based SSRF protections. Never derive `socketPath`
|
|
1076
|
+
// from untrusted input. Use `allowedSocketPaths` (below) to restrict accepted
|
|
1077
|
+
// socket paths for defense-in-depth.
|
|
450
1078
|
socketPath: null, // default
|
|
451
1079
|
|
|
1080
|
+
// `allowedSocketPaths` restricts which `socketPath` values are accepted.
|
|
1081
|
+
// Accepts a string or array of strings. Entries and the incoming socketPath
|
|
1082
|
+
// are compared after path.resolve(). A mismatch throws AxiosError with code
|
|
1083
|
+
// `ERR_BAD_OPTION_VALUE`. When null/undefined, no restriction is applied.
|
|
1084
|
+
allowedSocketPaths: null, // default
|
|
1085
|
+
|
|
1086
|
+
// `transport` determines the transport method for the request.
|
|
1087
|
+
// If defined, Axios uses it. Otherwise, if `maxRedirects` is 0,
|
|
1088
|
+
// Axios uses the default `http` or `https` library, depending on the protocol specified in `protocol`.
|
|
1089
|
+
// Otherwise, Axios uses the `httpFollow` or `httpsFollow` library, again depending on the protocol,
|
|
1090
|
+
// which can handle redirects.
|
|
1091
|
+
transport: undefined, // default
|
|
1092
|
+
|
|
452
1093
|
// `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
|
|
453
1094
|
// and https requests, respectively, in node.js. This allows options to be added like
|
|
454
|
-
// `keepAlive` that are not enabled by default.
|
|
1095
|
+
// `keepAlive` that are not enabled by default before Node.js v19.0.0. After Node.js
|
|
1096
|
+
// v19.0.0, you no longer need to customize the agent to enable `keepAlive` because
|
|
1097
|
+
// `http.globalAgent` has `keepAlive` enabled by default.
|
|
455
1098
|
httpAgent: new http.Agent({ keepAlive: true }),
|
|
456
1099
|
httpsAgent: new https.Agent({ keepAlive: true }),
|
|
457
1100
|
|
|
@@ -461,14 +1104,39 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
461
1104
|
// for your proxy configuration, you can also define a `no_proxy` environment
|
|
462
1105
|
// variable as a comma-separated list of domains that should not be proxied.
|
|
463
1106
|
// Use `false` to disable proxies, ignoring environment variables.
|
|
1107
|
+
// On Node.js versions with native environment proxy support, axios defers
|
|
1108
|
+
// environment proxy handling to Node when the selected agent has `proxyEnv`
|
|
1109
|
+
// enabled, including processes started with `NODE_USE_ENV_PROXY=1`,
|
|
1110
|
+
// `--use-env-proxy`, or `NODE_OPTIONS=--use-env-proxy`. Custom agents without
|
|
1111
|
+
// `proxyEnv` continue to use axios environment proxy resolution. Explicit
|
|
1112
|
+
// `proxy` config is still handled by axios.
|
|
464
1113
|
// `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
|
|
465
1114
|
// supplies credentials.
|
|
466
|
-
//
|
|
467
|
-
// `Proxy-Authorization`
|
|
1115
|
+
// For `http://` targets, axios sends the request to the proxy in
|
|
1116
|
+
// forward-proxy mode and stamps `Proxy-Authorization` onto the request
|
|
1117
|
+
// headers (overwriting any user-supplied `Proxy-Authorization` header).
|
|
1118
|
+
// For `https://` targets, axios establishes a CONNECT tunnel through the
|
|
1119
|
+
// proxy and performs TLS end-to-end with the origin; `Proxy-Authorization`
|
|
1120
|
+
// is sent on the CONNECT request only, never on the wrapped TLS request,
|
|
1121
|
+
// so the proxy never sees the URL, headers, or body. Axios forwards
|
|
1122
|
+
// `httpsAgent` TLS options such as `ca`, `cert`, `key`, and
|
|
1123
|
+
// `rejectUnauthorized` to the generated tunneling agent, so they still apply
|
|
1124
|
+
// to the origin TLS connection.
|
|
1125
|
+
// If you supply an `HttpsProxyAgent`, axios leaves tunneling to that agent.
|
|
468
1126
|
// If the proxy server uses HTTPS, then you must set the protocol to `https`.
|
|
1127
|
+
// A user-supplied `Host` header in `headers` is preserved when forwarding
|
|
1128
|
+
// through a proxy (case-insensitive match on `host`/`Host`/`HOST`); this
|
|
1129
|
+
// lets you target a virtual host that differs from the request URL, for
|
|
1130
|
+
// example, hitting `127.0.0.1:4000` while having the proxy treat the
|
|
1131
|
+
// request as `example.com`. If no `Host` header is supplied, axios
|
|
1132
|
+
// defaults it to the request URL's `hostname:port` as before. The Host
|
|
1133
|
+
// header is only set in forward-proxy mode (HTTP targets); for HTTPS
|
|
1134
|
+
// tunneling the Host header is sent inside the TLS connection, not seen
|
|
1135
|
+
// by the proxy.
|
|
469
1136
|
proxy: {
|
|
470
1137
|
protocol: 'https',
|
|
471
1138
|
host: '127.0.0.1',
|
|
1139
|
+
// hostname: '127.0.0.1' // Takes precedence over 'host' if both are defined
|
|
472
1140
|
port: 9000,
|
|
473
1141
|
auth: {
|
|
474
1142
|
username: 'mikeymike',
|
|
@@ -487,8 +1155,10 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
487
1155
|
// `decompress` indicates whether or not the response body should be decompressed
|
|
488
1156
|
// automatically. If set to `true` will also remove the 'content-encoding' header
|
|
489
1157
|
// from the responses objects of all decompressed responses
|
|
1158
|
+
// Axios supports gzip, deflate, brotli, and zstd when the current Node.js
|
|
1159
|
+
// runtime provides the corresponding zlib decompressor.
|
|
490
1160
|
// - Node only (XHR cannot turn off decompression)
|
|
491
|
-
decompress: true // default
|
|
1161
|
+
decompress: true, // default
|
|
492
1162
|
|
|
493
1163
|
// `insecureHTTPParser` boolean.
|
|
494
1164
|
// Indicates where to use an insecure HTTP parser that accepts invalid HTTP headers.
|
|
@@ -496,13 +1166,18 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
496
1166
|
// Using the insecure parser should be avoided.
|
|
497
1167
|
// see options https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_http_request_url_options_callback
|
|
498
1168
|
// see also https://nodejs.org/en/blog/vulnerability/february-2020-security-releases/#strict-http-header-parsing-none
|
|
499
|
-
insecureHTTPParser: undefined // default
|
|
1169
|
+
insecureHTTPParser: undefined, // default
|
|
500
1170
|
|
|
501
1171
|
// transitional options for backward compatibility that may be removed in the newer versions
|
|
502
1172
|
transitional: {
|
|
503
1173
|
// silent JSON parsing mode
|
|
504
1174
|
// `true` - ignore JSON parsing errors and set response.data to null if parsing failed (old behaviour)
|
|
505
|
-
// `false` - throw SyntaxError if JSON parsing failed
|
|
1175
|
+
// `false` - throw SyntaxError if JSON parsing failed
|
|
1176
|
+
// Important: this option only takes effect when `responseType` is explicitly set to 'json'.
|
|
1177
|
+
// When `responseType` is omitted (defaults to no value), axios uses `forcedJSONParsing`
|
|
1178
|
+
// to attempt JSON parsing, but will silently return the raw string on failure regardless
|
|
1179
|
+
// of this setting. To have invalid JSON throw errors, use:
|
|
1180
|
+
// { responseType: 'json', transitional: { silentJSONParsing: false } }
|
|
506
1181
|
silentJSONParsing: true, // default value for the current Axios version
|
|
507
1182
|
|
|
508
1183
|
// try to parse the response string as JSON even if `responseType` is not 'json'
|
|
@@ -510,6 +1185,19 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
510
1185
|
|
|
511
1186
|
// throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts
|
|
512
1187
|
clarifyTimeoutError: false,
|
|
1188
|
+
|
|
1189
|
+
// keep explicit `validateStatus: undefined` resolving every response status
|
|
1190
|
+
// for backward compatibility. Set to false to make explicit undefined behave
|
|
1191
|
+
// as if validateStatus was omitted.
|
|
1192
|
+
validateStatusUndefinedResolves: true,
|
|
1193
|
+
|
|
1194
|
+
// advertise `zstd` in the default Accept-Encoding header when the current
|
|
1195
|
+
// Node.js runtime supports zstd decompression. Axios still decompresses
|
|
1196
|
+
// zstd responses when support exists and `decompress` is true.
|
|
1197
|
+
advertiseZstdAcceptEncoding: false,
|
|
1198
|
+
|
|
1199
|
+
// use the legacy interceptor request/response ordering
|
|
1200
|
+
legacyInterceptorReqResOrdering: true, // default
|
|
513
1201
|
},
|
|
514
1202
|
|
|
515
1203
|
env: {
|
|
@@ -518,17 +1206,62 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
518
1206
|
},
|
|
519
1207
|
|
|
520
1208
|
formSerializer: {
|
|
521
|
-
visitor: (value, key, path, helpers)=> {}; // custom visitor function to serialize form values
|
|
1209
|
+
visitor: (value, key, path, helpers) => {}; // custom visitor function to serialize form values
|
|
522
1210
|
dots: boolean; // use dots instead of brackets format
|
|
523
1211
|
metaTokens: boolean; // keep special endings like {} in parameter key
|
|
524
1212
|
indexes: boolean; // array indexes format null - no brackets, false - empty brackets, true - brackets with indexes
|
|
525
|
-
|
|
1213
|
+
maxDepth: 100; // maximum object nesting depth; throws AxiosError (ERR_FORM_DATA_DEPTH_EXCEEDED) if exceeded. Set to Infinity to disable.
|
|
1214
|
+
},
|
|
1215
|
+
|
|
1216
|
+
// http adapter only (node.js)
|
|
1217
|
+
maxRate: [
|
|
1218
|
+
100 * 1024, // 100KB/s upload limit,
|
|
1219
|
+
100 * 1024 // 100KB/s download limit
|
|
1220
|
+
]
|
|
526
1221
|
}
|
|
527
1222
|
```
|
|
528
1223
|
|
|
529
|
-
|
|
1224
|
+
For custom secret-bearing headers in Node.js, list them in `sensitiveHeaders` so Axios removes them when following a redirect to another origin:
|
|
1225
|
+
|
|
1226
|
+
```js
|
|
1227
|
+
axios.get('https://api.example.com/users', {
|
|
1228
|
+
headers: { 'X-API-Key': 'secret' },
|
|
1229
|
+
sensitiveHeaders: ['X-API-Key'],
|
|
1230
|
+
});
|
|
1231
|
+
```
|
|
1232
|
+
|
|
1233
|
+
### Strict RFC 3986 percent-encoding for query params
|
|
1234
|
+
|
|
1235
|
+
By default, axios decodes `%3A`, `%24`, `%2C` and `%20` back to `:`, `$`, `,` and `+` for readability (the `+` follows the `application/x-www-form-urlencoded` convention for spaces in query strings). These characters are valid in a query component under [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.4), so the default output is correct, but some backends require strict percent-encoding and reject the readable form.
|
|
1236
|
+
|
|
1237
|
+
Override the default encoder via `paramsSerializer.encode`:
|
|
1238
|
+
|
|
1239
|
+
```js
|
|
1240
|
+
// Per-request: emit strict RFC 3986 percent-encoding for query values
|
|
1241
|
+
axios.get('/foo', {
|
|
1242
|
+
params: { filter: JSON.stringify({ startedAt: '2026-01-23' }) },
|
|
1243
|
+
paramsSerializer: { encode: encodeURIComponent },
|
|
1244
|
+
});
|
|
1245
|
+
|
|
1246
|
+
// Or set it on the instance defaults
|
|
1247
|
+
const client = axios.create({
|
|
1248
|
+
paramsSerializer: { encode: encodeURIComponent },
|
|
1249
|
+
});
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
## HTTP/2 support
|
|
1253
|
+
|
|
1254
|
+
Axios has experimental HTTP/2 support in the Node.js HTTP adapter.
|
|
1255
|
+
|
|
1256
|
+
Support depends on the runtime environment and Node.js version. Redirects and some adapter behavior may differ from HTTP/1.1.
|
|
1257
|
+
|
|
1258
|
+
Options like `httpVersion` and `http2Options` are adapter-specific and may not work the same way in every environment.
|
|
1259
|
+
|
|
1260
|
+
If you need HTTP/2, check runtime support or use a custom adapter.
|
|
1261
|
+
|
|
1262
|
+
## Response schema
|
|
530
1263
|
|
|
531
|
-
The response
|
|
1264
|
+
The response to a request contains the following information.
|
|
532
1265
|
|
|
533
1266
|
```js
|
|
534
1267
|
{
|
|
@@ -556,31 +1289,29 @@ The response for a request contains the following information.
|
|
|
556
1289
|
}
|
|
557
1290
|
```
|
|
558
1291
|
|
|
559
|
-
When using `then`, you
|
|
1292
|
+
When using `then`, you receive the response like this:
|
|
560
1293
|
|
|
561
1294
|
```js
|
|
562
|
-
axios.get('/user/12345')
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
console.log(response.config);
|
|
569
|
-
});
|
|
1295
|
+
const response = await axios.get('/user/12345');
|
|
1296
|
+
console.log(response.data);
|
|
1297
|
+
console.log(response.status);
|
|
1298
|
+
console.log(response.statusText);
|
|
1299
|
+
console.log(response.headers);
|
|
1300
|
+
console.log(response.config);
|
|
570
1301
|
```
|
|
571
1302
|
|
|
572
|
-
When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response
|
|
1303
|
+
When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as the second parameter of `then`, read the response from the `error` object. See [Handling errors](#handling-errors).
|
|
573
1304
|
|
|
574
|
-
## Config
|
|
1305
|
+
## Config defaults
|
|
575
1306
|
|
|
576
|
-
|
|
1307
|
+
Config defaults apply to every request.
|
|
577
1308
|
|
|
578
1309
|
### Global axios defaults
|
|
579
1310
|
|
|
580
1311
|
```js
|
|
581
1312
|
axios.defaults.baseURL = 'https://api.example.com';
|
|
582
1313
|
|
|
583
|
-
// Important: If
|
|
1314
|
+
// Important: If you use axios with multiple domains, Axios sends AUTH_TOKEN to all of them.
|
|
584
1315
|
// See below for an example using Custom instance defaults instead.
|
|
585
1316
|
axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
|
586
1317
|
|
|
@@ -592,7 +1323,7 @@ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded
|
|
|
592
1323
|
```js
|
|
593
1324
|
// Set config defaults when creating the instance
|
|
594
1325
|
const instance = axios.create({
|
|
595
|
-
baseURL: 'https://api.example.com'
|
|
1326
|
+
baseURL: 'https://api.example.com',
|
|
596
1327
|
});
|
|
597
1328
|
|
|
598
1329
|
// Alter defaults after instance has been created
|
|
@@ -601,7 +1332,9 @@ instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
|
|
601
1332
|
|
|
602
1333
|
### Config order of precedence
|
|
603
1334
|
|
|
604
|
-
|
|
1335
|
+
Axios merges config in this order: library defaults from [lib/defaults/index.js](https://github.com/axios/axios/blob/main/lib/defaults/index.js#L49), the instance `defaults` property, and the request `config` argument. Later values take precedence over earlier ones.
|
|
1336
|
+
|
|
1337
|
+
Some options are request-specific and are only taken from the request `config`. `data` is one of those options: axios does not inherit or deep-merge request bodies from global or instance defaults. If every request needs shared body fields, add them with a request interceptor or `transformRequest`, and scope that logic carefully so sensitive values are not sent to the wrong endpoint.
|
|
605
1338
|
|
|
606
1339
|
```js
|
|
607
1340
|
// Create an instance using the config defaults provided by the library
|
|
@@ -614,49 +1347,66 @@ instance.defaults.timeout = 2500;
|
|
|
614
1347
|
|
|
615
1348
|
// Override timeout for this request as it's known to take a long time
|
|
616
1349
|
instance.get('/longRequest', {
|
|
617
|
-
timeout: 5000
|
|
1350
|
+
timeout: 5000,
|
|
618
1351
|
});
|
|
619
1352
|
```
|
|
620
1353
|
|
|
621
1354
|
## Interceptors
|
|
622
1355
|
|
|
623
|
-
You can intercept requests or responses before
|
|
1356
|
+
You can intercept requests or responses before methods like `.get()` or `.post()`
|
|
1357
|
+
resolve their promises (before code inside `then` or `catch`, or after `await`)
|
|
624
1358
|
|
|
625
1359
|
```js
|
|
1360
|
+
const instance = axios.create();
|
|
1361
|
+
|
|
626
1362
|
// Add a request interceptor
|
|
627
|
-
|
|
628
|
-
|
|
1363
|
+
instance.interceptors.request.use(
|
|
1364
|
+
function (config) {
|
|
1365
|
+
// Do something before the request is sent
|
|
629
1366
|
return config;
|
|
630
|
-
},
|
|
631
|
-
|
|
1367
|
+
},
|
|
1368
|
+
function (error) {
|
|
1369
|
+
// Do something with the request error
|
|
632
1370
|
return Promise.reject(error);
|
|
633
|
-
}
|
|
1371
|
+
}
|
|
1372
|
+
);
|
|
634
1373
|
|
|
635
1374
|
// Add a response interceptor
|
|
636
|
-
|
|
637
|
-
|
|
1375
|
+
instance.interceptors.response.use(
|
|
1376
|
+
function (response) {
|
|
1377
|
+
// Any status code that lies within the range of 2xx causes this function to trigger
|
|
638
1378
|
// Do something with response data
|
|
639
1379
|
return response;
|
|
640
|
-
},
|
|
641
|
-
|
|
1380
|
+
},
|
|
1381
|
+
function (error) {
|
|
1382
|
+
// Any status codes that fall outside the range of 2xx cause this function to trigger
|
|
642
1383
|
// Do something with response error
|
|
643
1384
|
return Promise.reject(error);
|
|
644
|
-
}
|
|
1385
|
+
}
|
|
1386
|
+
);
|
|
645
1387
|
```
|
|
646
1388
|
|
|
647
1389
|
If you need to remove an interceptor later you can.
|
|
648
1390
|
|
|
649
1391
|
```js
|
|
650
|
-
const
|
|
651
|
-
|
|
1392
|
+
const instance = axios.create();
|
|
1393
|
+
const myInterceptor = instance.interceptors.request.use(function () {
|
|
1394
|
+
/*...*/
|
|
1395
|
+
});
|
|
1396
|
+
instance.interceptors.request.eject(myInterceptor);
|
|
652
1397
|
```
|
|
653
1398
|
|
|
654
1399
|
You can also clear all interceptors for requests or responses.
|
|
1400
|
+
|
|
655
1401
|
```js
|
|
656
1402
|
const instance = axios.create();
|
|
657
|
-
instance.interceptors.request.use(function () {
|
|
1403
|
+
instance.interceptors.request.use(function () {
|
|
1404
|
+
/*...*/
|
|
1405
|
+
});
|
|
658
1406
|
instance.interceptors.request.clear(); // Removes interceptors from requests
|
|
659
|
-
instance.interceptors.response.use(function () {
|
|
1407
|
+
instance.interceptors.response.use(function () {
|
|
1408
|
+
/*...*/
|
|
1409
|
+
});
|
|
660
1410
|
instance.interceptors.response.clear(); // Removes interceptors from responses
|
|
661
1411
|
```
|
|
662
1412
|
|
|
@@ -664,24 +1414,64 @@ You can add interceptors to a custom instance of axios.
|
|
|
664
1414
|
|
|
665
1415
|
```js
|
|
666
1416
|
const instance = axios.create();
|
|
667
|
-
instance.interceptors.request.use(function () {
|
|
1417
|
+
instance.interceptors.request.use(function () {
|
|
1418
|
+
/*...*/
|
|
1419
|
+
});
|
|
668
1420
|
```
|
|
669
1421
|
|
|
670
1422
|
When you add request interceptors, they are presumed to be asynchronous by default. This can cause a delay
|
|
671
1423
|
in the execution of your axios request when the main thread is blocked (a promise is created under the hood for
|
|
672
|
-
the interceptor and your request gets put
|
|
1424
|
+
the interceptor and your request gets put at the bottom of the call stack). If your request interceptors are synchronous you can add a flag
|
|
673
1425
|
to the options object that will tell axios to run the code synchronously and avoid any delays in request execution.
|
|
674
1426
|
|
|
675
1427
|
```js
|
|
676
|
-
axios.interceptors.request.use(
|
|
677
|
-
config
|
|
678
|
-
|
|
679
|
-
|
|
1428
|
+
axios.interceptors.request.use(
|
|
1429
|
+
function (config) {
|
|
1430
|
+
config.headers.test = 'I am only a header!';
|
|
1431
|
+
return config;
|
|
1432
|
+
},
|
|
1433
|
+
null,
|
|
1434
|
+
{ synchronous: true }
|
|
1435
|
+
);
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
If a synchronous request interceptor throws, Axios calls that interceptor's paired rejection handler and stops running the remaining request interceptors. A rejection handler that returns normally, including one that returns `undefined` or a fulfilled Promise, treats the error as handled: Axios dispatches the request with the last valid config, and ignores the handler's return value. To block dispatch, omit the rejection handler or throw/return a rejected Promise from it. The final error then continues through response rejection interceptors.
|
|
1439
|
+
|
|
1440
|
+
Use a rejected Promise when validation must prevent the request:
|
|
1441
|
+
|
|
1442
|
+
```js
|
|
1443
|
+
axios.interceptors.request.use(
|
|
1444
|
+
function validate(config) {
|
|
1445
|
+
if (!config.headers.has('Authorization')) {
|
|
1446
|
+
throw new Error('Authorization is required');
|
|
1447
|
+
}
|
|
1448
|
+
return config;
|
|
1449
|
+
},
|
|
1450
|
+
function rejectInvalidRequest(error) {
|
|
1451
|
+
return Promise.reject(error);
|
|
1452
|
+
},
|
|
1453
|
+
{ synchronous: true }
|
|
1454
|
+
);
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
A logging-only rejection handler can return normally to preserve the existing request-continuation behavior:
|
|
1458
|
+
|
|
1459
|
+
```js
|
|
1460
|
+
axios.interceptors.request.use(
|
|
1461
|
+
function prepare(config) {
|
|
1462
|
+
throw new Error('Optional preparation failed');
|
|
1463
|
+
},
|
|
1464
|
+
function logPreparationFailure(error) {
|
|
1465
|
+
console.warn(error);
|
|
1466
|
+
// Returning normally dispatches with the last valid config.
|
|
1467
|
+
},
|
|
1468
|
+
{ synchronous: true }
|
|
1469
|
+
);
|
|
680
1470
|
```
|
|
681
1471
|
|
|
682
1472
|
If you want to execute a particular interceptor based on a runtime check,
|
|
683
|
-
you can add a `runWhen` function to the options object. The interceptor will not
|
|
684
|
-
of `runWhen` is `false`.
|
|
1473
|
+
you can add a `runWhen` function to the options object. The request interceptor will not run **if and only if** the return
|
|
1474
|
+
of `runWhen` is `false`. Axios calls the function with the config
|
|
685
1475
|
object (don't forget that you can bind your own arguments to it as well.) This can be handy when you have an
|
|
686
1476
|
asynchronous request interceptor that only needs to run at certain times.
|
|
687
1477
|
|
|
@@ -689,123 +1479,260 @@ asynchronous request interceptor that only needs to run at certain times.
|
|
|
689
1479
|
function onGetCall(config) {
|
|
690
1480
|
return config.method === 'get';
|
|
691
1481
|
}
|
|
692
|
-
axios.interceptors.request.use(
|
|
693
|
-
config
|
|
694
|
-
|
|
695
|
-
|
|
1482
|
+
axios.interceptors.request.use(
|
|
1483
|
+
function (config) {
|
|
1484
|
+
config.headers.test = 'special get headers';
|
|
1485
|
+
return config;
|
|
1486
|
+
},
|
|
1487
|
+
null,
|
|
1488
|
+
{ runWhen: onGetCall }
|
|
1489
|
+
);
|
|
696
1490
|
```
|
|
697
1491
|
|
|
698
|
-
|
|
1492
|
+
> Note: The options parameter (with `synchronous` and `runWhen` properties) is only supported for request interceptors at the moment.
|
|
1493
|
+
|
|
1494
|
+
### Interceptor execution order
|
|
699
1495
|
|
|
700
|
-
|
|
701
|
-
and when the response was fulfilled
|
|
702
|
-
- then each interceptor is executed
|
|
703
|
-
- then they are executed in the order they were added
|
|
704
|
-
- then only the last interceptor's result is returned
|
|
705
|
-
- then every interceptor receives the result of its predecessor
|
|
706
|
-
- and when the fulfillment-interceptor throws
|
|
707
|
-
- then the following fulfillment-interceptor is not called
|
|
708
|
-
- then the following rejection-interceptor is called
|
|
709
|
-
- once caught, another following fulfill-interceptor is called again (just like in a promise chain).
|
|
1496
|
+
Request and response interceptors use different execution orders.
|
|
710
1497
|
|
|
711
|
-
|
|
1498
|
+
Request interceptors run in reverse order (LIFO: last in, first out). The last interceptor added runs first.
|
|
712
1499
|
|
|
713
|
-
|
|
1500
|
+
Response interceptors run in the order they were added (FIFO: first in, first out). The first interceptor added runs first.
|
|
1501
|
+
|
|
1502
|
+
Example:
|
|
714
1503
|
|
|
715
1504
|
```js
|
|
716
|
-
axios.
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
1505
|
+
const instance = axios.create();
|
|
1506
|
+
|
|
1507
|
+
const interceptor = (id) => (base) => {
|
|
1508
|
+
console.log(id);
|
|
1509
|
+
return base;
|
|
1510
|
+
};
|
|
1511
|
+
|
|
1512
|
+
instance.interceptors.request.use(interceptor('Request Interceptor 1'));
|
|
1513
|
+
instance.interceptors.request.use(interceptor('Request Interceptor 2'));
|
|
1514
|
+
instance.interceptors.request.use(interceptor('Request Interceptor 3'));
|
|
1515
|
+
instance.interceptors.response.use(interceptor('Response Interceptor 1'));
|
|
1516
|
+
instance.interceptors.response.use(interceptor('Response Interceptor 2'));
|
|
1517
|
+
instance.interceptors.response.use(interceptor('Response Interceptor 3'));
|
|
1518
|
+
|
|
1519
|
+
// Console output:
|
|
1520
|
+
// Request Interceptor 3
|
|
1521
|
+
// Request Interceptor 2
|
|
1522
|
+
// Request Interceptor 1
|
|
1523
|
+
// [HTTP request is made]
|
|
1524
|
+
// Response Interceptor 1
|
|
1525
|
+
// Response Interceptor 2
|
|
1526
|
+
// Response Interceptor 3
|
|
1527
|
+
```
|
|
1528
|
+
|
|
1529
|
+
### Multiple interceptors
|
|
1530
|
+
|
|
1531
|
+
When a response is fulfilled and multiple response interceptors are registered:
|
|
1532
|
+
|
|
1533
|
+
- Each interceptor runs in registration order.
|
|
1534
|
+
- Each interceptor receives the result from the previous interceptor.
|
|
1535
|
+
- The chain returns the result from the last interceptor.
|
|
1536
|
+
- If a fulfillment interceptor throws, Axios skips the next fulfillment interceptor and calls the next rejection interceptor.
|
|
1537
|
+
- After the error is caught, later fulfillment interceptors run again, just like in a promise chain.
|
|
1538
|
+
|
|
1539
|
+
Read [the interceptor tests](./tests/browser/interceptors.browser.test.js) to see all this in code.
|
|
1540
|
+
|
|
1541
|
+
## Error types
|
|
1542
|
+
|
|
1543
|
+
Axios error messages include details that can help you debug the request.
|
|
1544
|
+
|
|
1545
|
+
Axios errors use this structure:
|
|
1546
|
+
| Property | Definition |
|
|
1547
|
+
| -------- | ---------- |
|
|
1548
|
+
| message | A quick summary of the error message and the status it failed with. |
|
|
1549
|
+
| name | This defines where the error originated from. For axios, it will always be an 'AxiosError'. |
|
|
1550
|
+
| stack | Stack trace for the error. |
|
|
1551
|
+
| config | An axios config object with specific instance configurations defined by the user from when the request was made |
|
|
1552
|
+
| code | Axios error code. The table below lists internal Axios error codes. |
|
|
1553
|
+
| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
|
|
1554
|
+
|
|
1555
|
+
These are the internal Axios error codes:
|
|
1556
|
+
|
|
1557
|
+
| Code | Definition |
|
|
1558
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1559
|
+
| ERR_BAD_OPTION_VALUE | Invalid value provided in axios configuration. |
|
|
1560
|
+
| ERR_BAD_OPTION | Invalid option provided in axios configuration. |
|
|
1561
|
+
| ERR_NOT_SUPPORT | Feature or method not supported in the current axios environment. |
|
|
1562
|
+
| ERR_DEPRECATED | Deprecated feature or method used in axios. |
|
|
1563
|
+
| ERR_INVALID_URL | Invalid URL provided for axios request. |
|
|
1564
|
+
| ECONNABORTED | Typically indicates that the request has been timed out (unless `transitional.clarifyTimeoutError` is set) or aborted by the browser or its plugin. |
|
|
1565
|
+
| ERR_CANCELED | The user explicitly canceled the request with an AbortSignal or CancelToken. |
|
|
1566
|
+
| ETIMEDOUT | Request timed out after exceeding the configured Axios timeout. Set `transitional.clarifyTimeoutError` to `true`; otherwise Axios throws a generic `ECONNABORTED` error. |
|
|
1567
|
+
| ERR_NETWORK | Network-related issue. In the browser, this error can also be caused by a [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/Guides/CORS) or [Mixed Content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content) policy violation. The browser does not allow the JS code to clarify the real reason for the error caused by security issues, so please check the console. |
|
|
1568
|
+
| ERR_FR_TOO_MANY_REDIRECTS | Request exceeded the configured maximum number of redirects. |
|
|
1569
|
+
| ERR_BAD_RESPONSE | Response cannot be parsed properly or is in an unexpected format. Usually related to a response with `5xx` status code. |
|
|
1570
|
+
| ERR_BAD_REQUEST | The request has an unexpected format or is missing required parameters. Usually related to a response with `4xx` status code. |
|
|
1571
|
+
|
|
1572
|
+
## Handling errors
|
|
1573
|
+
|
|
1574
|
+
By default, Axios rejects responses with status codes outside the 2xx range.
|
|
1575
|
+
|
|
1576
|
+
```js
|
|
1577
|
+
axios.get('/user/12345').catch(function (error) {
|
|
1578
|
+
if (error.response) {
|
|
1579
|
+
// The request was made and the server responded with a status code
|
|
1580
|
+
// that falls out of the range of 2xx
|
|
1581
|
+
console.log(error.response.data);
|
|
1582
|
+
console.log(error.response.status);
|
|
1583
|
+
console.log(error.response.headers);
|
|
1584
|
+
} else if (error.request) {
|
|
1585
|
+
// The request was made but no response was received
|
|
1586
|
+
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
|
1587
|
+
// http.ClientRequest in node.js
|
|
1588
|
+
console.log(error.request);
|
|
1589
|
+
} else {
|
|
1590
|
+
// Something happened in setting up the request that triggered an Error
|
|
1591
|
+
console.log('Error', error.message);
|
|
1592
|
+
}
|
|
1593
|
+
console.log(error.config);
|
|
1594
|
+
});
|
|
735
1595
|
```
|
|
736
1596
|
|
|
737
|
-
|
|
1597
|
+
Axios rejects an `http:` or `https:` request `url` or `baseURL` that omits `//` after the protocol. For example, `https:example.com` and `https:/example.com` reject with `AxiosError` code `ERR_INVALID_URL` instead of being silently normalized. Pass a well-formed URL such as `https://example.com`.
|
|
1598
|
+
|
|
1599
|
+
The error identifies the malformed URL, for example `Invalid URL "https:example.com": missing "//" after protocol`. To keep logs useful without leaking secrets, Axios reports the control-character-normalized URL with credentials, query parameter values, and fragment contents redacted; the scheme, host, path, and query parameter names remain visible.
|
|
1600
|
+
|
|
1601
|
+
Use `validateStatus` to override the default condition (`status >= 200 && status < 300`) and choose which HTTP status codes should reject.
|
|
738
1602
|
|
|
739
1603
|
```js
|
|
740
1604
|
axios.get('/user/12345', {
|
|
741
1605
|
validateStatus: function (status) {
|
|
742
1606
|
return status < 500; // Resolve only if the status code is less than 500
|
|
743
|
-
}
|
|
744
|
-
})
|
|
1607
|
+
},
|
|
1608
|
+
});
|
|
1609
|
+
```
|
|
1610
|
+
|
|
1611
|
+
By default, explicit `validateStatus: undefined` keeps legacy behavior and resolves every response status because `transitional.validateStatusUndefinedResolves` defaults to `true`. Set it to `false` to make explicit `validateStatus: undefined` behave like the option was omitted, so Axios uses the configured/default validator and rejects non-2xx responses by default.
|
|
1612
|
+
|
|
1613
|
+
`validateStatus: null` still accepts every response status. If you disable the transitional behavior and intentionally want all statuses to resolve, use `null` or `() => true`.
|
|
1614
|
+
|
|
1615
|
+
```js
|
|
1616
|
+
axios.get('/user/12345', {
|
|
1617
|
+
validateStatus: undefined,
|
|
1618
|
+
transitional: {
|
|
1619
|
+
validateStatusUndefinedResolves: false,
|
|
1620
|
+
},
|
|
1621
|
+
});
|
|
1622
|
+
```
|
|
1623
|
+
|
|
1624
|
+
Use `toJSON` to get more information about the HTTP error.
|
|
1625
|
+
|
|
1626
|
+
```js
|
|
1627
|
+
axios.get('/user/12345').catch(function (error) {
|
|
1628
|
+
console.log(error.toJSON());
|
|
1629
|
+
});
|
|
745
1630
|
```
|
|
746
1631
|
|
|
747
|
-
|
|
1632
|
+
To avoid logging secrets from `error.config`, pass a `redact` array in the request config. Matching config keys are masked case-insensitively at any depth when `AxiosError#toJSON()` is called.
|
|
748
1633
|
|
|
749
1634
|
```js
|
|
750
|
-
axios
|
|
1635
|
+
axios
|
|
1636
|
+
.get('/user/12345', {
|
|
1637
|
+
headers: { Authorization: 'Bearer token' },
|
|
1638
|
+
redact: ['authorization'],
|
|
1639
|
+
})
|
|
751
1640
|
.catch(function (error) {
|
|
752
|
-
console.log(error.toJSON());
|
|
1641
|
+
console.log(error.toJSON().config.headers.Authorization); // [REDACTED ****]
|
|
753
1642
|
});
|
|
754
1643
|
```
|
|
755
1644
|
|
|
1645
|
+
## Handling timeouts
|
|
1646
|
+
|
|
1647
|
+
```js
|
|
1648
|
+
async function fetchWithTimeout() {
|
|
1649
|
+
try {
|
|
1650
|
+
const response = await axios.get('https://example.com/data', {
|
|
1651
|
+
timeout: 5000, // 5 seconds
|
|
1652
|
+
transitional: {
|
|
1653
|
+
// set to true if you prefer ETIMEDOUT over ECONNABORTED
|
|
1654
|
+
clarifyTimeoutError: false,
|
|
1655
|
+
},
|
|
1656
|
+
});
|
|
1657
|
+
|
|
1658
|
+
console.log('Response:', response.data);
|
|
1659
|
+
} catch (error) {
|
|
1660
|
+
if (axios.isAxiosError(error)) {
|
|
1661
|
+
if (error.code === 'ECONNABORTED' || error.code === 'ETIMEDOUT') {
|
|
1662
|
+
console.error('Request timed out. Please try again.');
|
|
1663
|
+
return;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
console.error('Axios error:', error.message);
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
console.error('Unexpected error:', error);
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
```
|
|
1674
|
+
|
|
756
1675
|
## Cancellation
|
|
757
1676
|
|
|
758
1677
|
### AbortController
|
|
759
1678
|
|
|
760
|
-
|
|
1679
|
+
Since `v0.22.0`, Axios supports AbortController:
|
|
761
1680
|
|
|
762
1681
|
```js
|
|
763
1682
|
const controller = new AbortController();
|
|
764
1683
|
|
|
765
|
-
axios
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
1684
|
+
axios
|
|
1685
|
+
.get('/foo/bar', {
|
|
1686
|
+
signal: controller.signal,
|
|
1687
|
+
})
|
|
1688
|
+
.then(function (response) {
|
|
1689
|
+
//...
|
|
1690
|
+
});
|
|
770
1691
|
// cancel the request
|
|
771
|
-
controller.abort()
|
|
1692
|
+
controller.abort();
|
|
772
1693
|
```
|
|
773
1694
|
|
|
774
|
-
### CancelToken
|
|
1695
|
+
### CancelToken (deprecated)
|
|
775
1696
|
|
|
776
|
-
You can also cancel a request using a
|
|
1697
|
+
You can also cancel a request using a _CancelToken_.
|
|
777
1698
|
|
|
778
|
-
> The axios cancel token API is based on the withdrawn [
|
|
1699
|
+
> The axios cancel token API is based on the withdrawn [cancellable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
|
|
779
1700
|
|
|
780
|
-
> This API is deprecated since v0.22.0 and
|
|
1701
|
+
> This API is deprecated since v0.22.0 and should not be used in new projects.
|
|
781
1702
|
|
|
782
|
-
|
|
1703
|
+
Create a cancel token with the `CancelToken.source` factory:
|
|
783
1704
|
|
|
784
1705
|
```js
|
|
785
1706
|
const CancelToken = axios.CancelToken;
|
|
786
1707
|
const source = CancelToken.source();
|
|
787
1708
|
|
|
788
|
-
axios
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
1709
|
+
axios
|
|
1710
|
+
.get('/user/12345', {
|
|
1711
|
+
cancelToken: source.token,
|
|
1712
|
+
})
|
|
1713
|
+
.catch(function (thrown) {
|
|
1714
|
+
if (axios.isCancel(thrown)) {
|
|
1715
|
+
console.log('Request canceled', thrown.message);
|
|
1716
|
+
} else {
|
|
1717
|
+
// handle error
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
797
1720
|
|
|
798
|
-
axios.post(
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
}
|
|
1721
|
+
axios.post(
|
|
1722
|
+
'/user/12345',
|
|
1723
|
+
{
|
|
1724
|
+
name: 'new name',
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
cancelToken: source.token,
|
|
1728
|
+
}
|
|
1729
|
+
);
|
|
803
1730
|
|
|
804
1731
|
// cancel the request (the message parameter is optional)
|
|
805
1732
|
source.cancel('Operation canceled by the user.');
|
|
806
1733
|
```
|
|
807
1734
|
|
|
808
|
-
You can also
|
|
1735
|
+
You can also pass an executor function to the `CancelToken` constructor:
|
|
809
1736
|
|
|
810
1737
|
```js
|
|
811
1738
|
const CancelToken = axios.CancelToken;
|
|
@@ -815,23 +1742,56 @@ axios.get('/user/12345', {
|
|
|
815
1742
|
cancelToken: new CancelToken(function executor(c) {
|
|
816
1743
|
// An executor function receives a cancel function as a parameter
|
|
817
1744
|
cancel = c;
|
|
818
|
-
})
|
|
1745
|
+
}),
|
|
819
1746
|
});
|
|
820
1747
|
|
|
821
1748
|
// cancel the request
|
|
822
1749
|
cancel();
|
|
823
1750
|
```
|
|
824
1751
|
|
|
825
|
-
|
|
826
|
-
|
|
1752
|
+
`CancelToken` also exposes low-level helpers for legacy integrations:
|
|
1753
|
+
|
|
1754
|
+
```js
|
|
1755
|
+
const source = axios.CancelToken.source();
|
|
1756
|
+
|
|
1757
|
+
const listener = (cancel) => {
|
|
1758
|
+
console.log(cancel.message);
|
|
1759
|
+
};
|
|
1760
|
+
|
|
1761
|
+
source.token.subscribe(listener);
|
|
1762
|
+
|
|
1763
|
+
const signal = source.token.toAbortSignal();
|
|
1764
|
+
// Pass `signal` to APIs that accept AbortSignal.
|
|
1765
|
+
|
|
1766
|
+
source.cancel('Operation canceled by the user.');
|
|
1767
|
+
source.token.unsubscribe(listener);
|
|
1768
|
+
```
|
|
1769
|
+
|
|
1770
|
+
Canceled requests reject with `axios.CanceledError`. The legacy `axios.Cancel` export is an alias of `axios.CanceledError`, and cancellation errors include `__CANCEL__` for `axios.isCancel` compatibility.
|
|
1771
|
+
|
|
1772
|
+
> Note: You can cancel several requests with the same cancel token or abort controller.
|
|
1773
|
+
> If a cancellation token is already cancelled when an Axios request starts, Axios cancels the request immediately without making a real request.
|
|
827
1774
|
|
|
828
1775
|
> During the transition period, you can use both cancellation APIs, even for the same request:
|
|
829
1776
|
|
|
1777
|
+
```js
|
|
1778
|
+
const controller = new AbortController();
|
|
1779
|
+
const source = axios.CancelToken.source();
|
|
1780
|
+
|
|
1781
|
+
axios.get('/user/12345', {
|
|
1782
|
+
cancelToken: source.token,
|
|
1783
|
+
signal: controller.signal,
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
controller.abort();
|
|
1787
|
+
source.cancel('Operation canceled by the user.');
|
|
1788
|
+
```
|
|
1789
|
+
|
|
830
1790
|
## Using `application/x-www-form-urlencoded` format
|
|
831
1791
|
|
|
832
1792
|
### URLSearchParams
|
|
833
1793
|
|
|
834
|
-
By default, axios serializes JavaScript objects to `JSON`. To send data
|
|
1794
|
+
By default, axios serializes JavaScript objects to `JSON`. To send data as [`application/x-www-form-urlencoded`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST), use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API. It works in most browsers and in [Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) v10 and later.
|
|
835
1795
|
|
|
836
1796
|
```js
|
|
837
1797
|
const params = new URLSearchParams({ foo: 'bar' });
|
|
@@ -839,22 +1799,22 @@ params.append('extraparam', 'value');
|
|
|
839
1799
|
axios.post('/foo', params);
|
|
840
1800
|
```
|
|
841
1801
|
|
|
842
|
-
### Query string (
|
|
1802
|
+
### Query string (older browsers)
|
|
843
1803
|
|
|
844
|
-
For
|
|
1804
|
+
For very old browsers, use a [polyfill](https://github.com/WebReflection/url-search-params) and make sure it patches the global environment.
|
|
845
1805
|
|
|
846
1806
|
Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:
|
|
847
1807
|
|
|
848
1808
|
```js
|
|
849
1809
|
const qs = require('qs');
|
|
850
|
-
axios.post('/foo', qs.stringify({
|
|
1810
|
+
axios.post('/foo', qs.stringify({ bar: 123 }));
|
|
851
1811
|
```
|
|
852
1812
|
|
|
853
|
-
|
|
1813
|
+
With ES modules:
|
|
854
1814
|
|
|
855
1815
|
```js
|
|
856
1816
|
import qs from 'qs';
|
|
857
|
-
const data = {
|
|
1817
|
+
const data = { bar: 123 };
|
|
858
1818
|
const options = {
|
|
859
1819
|
method: 'POST',
|
|
860
1820
|
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
@@ -866,7 +1826,7 @@ axios(options);
|
|
|
866
1826
|
|
|
867
1827
|
### Older Node.js versions
|
|
868
1828
|
|
|
869
|
-
For older Node.js engines,
|
|
1829
|
+
For older Node.js engines, use the [`querystring`](https://nodejs.org/api/querystring.html) module:
|
|
870
1830
|
|
|
871
1831
|
```js
|
|
872
1832
|
const querystring = require('querystring');
|
|
@@ -875,27 +1835,29 @@ axios.post('https://something.com/', querystring.stringify({ foo: 'bar' }));
|
|
|
875
1835
|
|
|
876
1836
|
You can also use the [`qs`](https://github.com/ljharb/qs) library.
|
|
877
1837
|
|
|
878
|
-
>
|
|
879
|
-
> The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has [known issues](https://github.com/nodejs/node-v0.x-archive/issues/1665) with that use case.
|
|
1838
|
+
> Note: The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has [known issues](https://github.com/nodejs/node-v0.x-archive/issues/1665) with that use case.
|
|
880
1839
|
|
|
881
|
-
###
|
|
1840
|
+
### Automatic serialization to URLSearchParams
|
|
882
1841
|
|
|
883
|
-
Axios
|
|
1842
|
+
Axios automatically serializes the data object to urlencoded format if the content-type header is set to "application/x-www-form-urlencoded".
|
|
884
1843
|
|
|
885
|
-
```
|
|
1844
|
+
```js
|
|
886
1845
|
const data = {
|
|
887
1846
|
x: 1,
|
|
888
1847
|
arr: [1, 2, 3],
|
|
889
1848
|
arr2: [1, [2], 3],
|
|
890
|
-
users: [
|
|
1849
|
+
users: [
|
|
1850
|
+
{ name: 'Peter', surname: 'Griffin' },
|
|
1851
|
+
{ name: 'Thomas', surname: 'Anderson' },
|
|
1852
|
+
],
|
|
891
1853
|
};
|
|
892
1854
|
|
|
893
|
-
await axios.postForm('https://postman-echo.com/post', data,
|
|
894
|
-
|
|
895
|
-
);
|
|
1855
|
+
await axios.postForm('https://postman-echo.com/post', data, {
|
|
1856
|
+
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
1857
|
+
});
|
|
896
1858
|
```
|
|
897
1859
|
|
|
898
|
-
The server
|
|
1860
|
+
The server receives these fields:
|
|
899
1861
|
|
|
900
1862
|
```js
|
|
901
1863
|
{
|
|
@@ -910,29 +1872,30 @@ The server will handle it as
|
|
|
910
1872
|
'users[1][name]': 'Thomas',
|
|
911
1873
|
'users[1][surname]': 'Anderson'
|
|
912
1874
|
}
|
|
913
|
-
|
|
1875
|
+
```
|
|
914
1876
|
|
|
915
|
-
If your backend body
|
|
1877
|
+
If your backend body parser, such as `body-parser` for `express.js`, supports nested object decoding, the server receives the same object structure:
|
|
916
1878
|
|
|
917
1879
|
```js
|
|
918
|
-
|
|
1880
|
+
const app = express();
|
|
919
1881
|
|
|
920
|
-
|
|
1882
|
+
app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies
|
|
921
1883
|
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1884
|
+
app.post('/', function (req, res, next) {
|
|
1885
|
+
// echo body as JSON
|
|
1886
|
+
res.send(JSON.stringify(req.body));
|
|
1887
|
+
});
|
|
926
1888
|
|
|
927
|
-
|
|
1889
|
+
server = app.listen(3000);
|
|
928
1890
|
```
|
|
929
1891
|
|
|
930
1892
|
## Using `multipart/form-data` format
|
|
931
1893
|
|
|
932
1894
|
### FormData
|
|
933
1895
|
|
|
934
|
-
To send
|
|
935
|
-
|
|
1896
|
+
To send data as `multipart/form-data`, pass a FormData instance as the payload.
|
|
1897
|
+
You do not need to set the `Content-Type` header. Axios detects it from the payload type.
|
|
1898
|
+
For browser, web worker, and React Native `FormData`, leave `Content-Type` unset so the runtime can add the multipart boundary.
|
|
936
1899
|
|
|
937
1900
|
```js
|
|
938
1901
|
const formData = new FormData();
|
|
@@ -941,92 +1904,121 @@ formData.append('foo', 'bar');
|
|
|
941
1904
|
axios.post('https://httpbin.org/post', formData);
|
|
942
1905
|
```
|
|
943
1906
|
|
|
944
|
-
In node.js,
|
|
1907
|
+
In node.js, use the [`form-data`](https://github.com/form-data/form-data) library:
|
|
945
1908
|
|
|
946
1909
|
```js
|
|
947
1910
|
const FormData = require('form-data');
|
|
948
1911
|
|
|
949
1912
|
const form = new FormData();
|
|
950
1913
|
form.append('my_field', 'my value');
|
|
951
|
-
form.append('my_buffer',
|
|
1914
|
+
form.append('my_buffer', Buffer.alloc(10));
|
|
952
1915
|
form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
|
|
953
1916
|
|
|
954
|
-
axios.post('https://example.com', form)
|
|
1917
|
+
axios.post('https://example.com', form);
|
|
955
1918
|
```
|
|
956
1919
|
|
|
957
|
-
|
|
1920
|
+
In node.js, when a `FormData` object provides `getHeaders()`, axios copies all returned headers by default for v1 compatibility. If the `FormData` object is custom or not fully trusted, set `formDataHeaderPolicy: 'content-only'` to copy only `Content-Type` and `Content-Length`, and set any other request headers explicitly with the request `headers` config.
|
|
1921
|
+
|
|
1922
|
+
### Automatic serialization to FormData
|
|
958
1923
|
|
|
959
|
-
|
|
1924
|
+
Since `v0.27.0`, Axios can serialize an object to FormData if the request `Content-Type`
|
|
960
1925
|
header is set to `multipart/form-data`.
|
|
961
1926
|
|
|
962
|
-
|
|
1927
|
+
This request submits data as FormData in browsers and Node.js:
|
|
963
1928
|
|
|
964
1929
|
```js
|
|
965
1930
|
import axios from 'axios';
|
|
966
1931
|
|
|
967
|
-
axios
|
|
968
|
-
|
|
969
|
-
'
|
|
970
|
-
|
|
971
|
-
|
|
1932
|
+
axios
|
|
1933
|
+
.post(
|
|
1934
|
+
'https://httpbin.org/post',
|
|
1935
|
+
{ x: 1 },
|
|
1936
|
+
{
|
|
1937
|
+
headers: {
|
|
1938
|
+
'Content-Type': 'multipart/form-data',
|
|
1939
|
+
},
|
|
1940
|
+
}
|
|
1941
|
+
)
|
|
1942
|
+
.then(({ data }) => console.log(data));
|
|
972
1943
|
```
|
|
973
1944
|
|
|
974
|
-
|
|
1945
|
+
The Node.js build uses the [`form-data`](https://github.com/form-data/form-data) polyfill by default.
|
|
975
1946
|
|
|
976
|
-
You can
|
|
977
|
-
but you probably won't need it in most cases:
|
|
1947
|
+
You can override the FormData class with the `env.FormData` config option, but most applications do not need this:
|
|
978
1948
|
|
|
979
1949
|
```js
|
|
980
|
-
const axios= require('axios');
|
|
1950
|
+
const axios = require('axios');
|
|
981
1951
|
var FormData = require('form-data');
|
|
982
1952
|
|
|
983
|
-
axios
|
|
984
|
-
|
|
985
|
-
'
|
|
986
|
-
|
|
987
|
-
|
|
1953
|
+
axios
|
|
1954
|
+
.post(
|
|
1955
|
+
'https://httpbin.org/post',
|
|
1956
|
+
{ x: 1, buf: Buffer.alloc(10) },
|
|
1957
|
+
{
|
|
1958
|
+
headers: {
|
|
1959
|
+
'Content-Type': 'multipart/form-data',
|
|
1960
|
+
},
|
|
1961
|
+
}
|
|
1962
|
+
)
|
|
1963
|
+
.then(({ data }) => console.log(data));
|
|
988
1964
|
```
|
|
989
1965
|
|
|
990
|
-
Axios FormData serializer supports
|
|
1966
|
+
The Axios FormData serializer supports these special endings:
|
|
991
1967
|
|
|
992
1968
|
- `{}` - serialize the value with JSON.stringify
|
|
993
1969
|
- `[]` - unwrap the array-like object as separate fields with the same key
|
|
994
1970
|
|
|
995
|
-
>
|
|
996
|
-
> unwrap/expand operation will be used by default on arrays and FileList objects
|
|
1971
|
+
> Note: Arrays and FileList objects are unwrapped by default.
|
|
997
1972
|
|
|
998
1973
|
FormData serializer supports additional options via `config.formSerializer: object` property to handle rare cases:
|
|
999
1974
|
|
|
1000
|
-
- `visitor: Function` - user-defined visitor function that
|
|
1001
|
-
to a `FormData` object by following custom rules.
|
|
1975
|
+
- `visitor: Function` - user-defined visitor function that Axios calls recursively to serialize the data object
|
|
1976
|
+
to a `FormData` object by following custom rules.
|
|
1002
1977
|
|
|
1003
1978
|
- `dots: boolean = false` - use dot notation instead of brackets to serialize arrays and objects;
|
|
1004
1979
|
|
|
1005
1980
|
- `metaTokens: boolean = true` - add the special ending (e.g `user{}: '{"name": "John"}'`) in the FormData key.
|
|
1006
|
-
|
|
1981
|
+
A backend body parser can use this meta-information to parse the value as JSON.
|
|
1982
|
+
|
|
1983
|
+
- `indexes: null|false|true = false` - controls how Axios adds indexes to unwrapped keys of `flat` array-like objects.
|
|
1984
|
+
- `null` - don't add brackets (`arr: 1`, `arr: 2`, `arr: 3`)
|
|
1985
|
+
- `false`(default) - add empty brackets (`arr[]: 1`, `arr[]: 2`, `arr[]: 3`)
|
|
1986
|
+
- `true` - add brackets with indexes (`arr[0]: 1`, `arr[1]: 2`, `arr[2]: 3`)
|
|
1987
|
+
- `maxDepth: number = 100` - maximum object nesting depth the serializer will recurse into. If the
|
|
1988
|
+
input object exceeds this depth, an `AxiosError` with `code: 'ERR_FORM_DATA_DEPTH_EXCEEDED'` is
|
|
1989
|
+
thrown instead of overflowing the call stack. This protects server applications from DoS
|
|
1990
|
+
attacks via deeply nested payloads. Set to `Infinity` to disable the limit and restore pre-fix behaviour.
|
|
1991
|
+
- `Blob: typeof Blob` - Blob constructor used when converting ArrayBuffer-like values for spec-compliant
|
|
1992
|
+
`FormData`. Override it only for runtimes that provide a compatible `Blob` constructor under a
|
|
1993
|
+
different binding.
|
|
1007
1994
|
|
|
1008
|
-
|
|
1995
|
+
```js
|
|
1996
|
+
// Raise the limit for a schema that genuinely nests deeper than 100 levels:
|
|
1997
|
+
axios.postForm('/api', data, { formSerializer: { maxDepth: 200 } });
|
|
1009
1998
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1999
|
+
// Same protection applies to params serialization:
|
|
2000
|
+
axios.get('/api', { params: data, paramsSerializer: { maxDepth: 200 } });
|
|
2001
|
+
```
|
|
1013
2002
|
|
|
1014
|
-
|
|
2003
|
+
Given this object:
|
|
1015
2004
|
|
|
1016
2005
|
```js
|
|
1017
2006
|
const obj = {
|
|
1018
2007
|
x: 1,
|
|
1019
2008
|
arr: [1, 2, 3],
|
|
1020
2009
|
arr2: [1, [2], 3],
|
|
1021
|
-
users: [
|
|
1022
|
-
|
|
2010
|
+
users: [
|
|
2011
|
+
{ name: 'Peter', surname: 'Griffin' },
|
|
2012
|
+
{ name: 'Thomas', surname: 'Anderson' },
|
|
2013
|
+
],
|
|
2014
|
+
'obj2{}': [{ x: 1 }],
|
|
1023
2015
|
};
|
|
1024
2016
|
```
|
|
1025
2017
|
|
|
1026
|
-
The
|
|
2018
|
+
The Axios serializer appends these fields:
|
|
1027
2019
|
|
|
1028
2020
|
```js
|
|
1029
|
-
const formData= new FormData();
|
|
2021
|
+
const formData = new FormData();
|
|
1030
2022
|
formData.append('x', '1');
|
|
1031
2023
|
formData.append('arr[]', '1');
|
|
1032
2024
|
formData.append('arr[]', '2');
|
|
@@ -1041,39 +2033,56 @@ formData.append('users[1][surname]', 'Anderson');
|
|
|
1041
2033
|
formData.append('obj2{}', '[{"x":1}]');
|
|
1042
2034
|
```
|
|
1043
2035
|
|
|
1044
|
-
|
|
1045
|
-
|
|
2036
|
+
### Converting FormData to JSON
|
|
2037
|
+
|
|
2038
|
+
`axios.formToJSON()` converts `FormData` field names that use dot or bracket notation into nested objects and arrays. Only `.`, `[`, and `]` are structural separators. Other characters, including `-`, spaces, `+`, `*`, and `&`, remain part of the literal key.
|
|
2039
|
+
|
|
2040
|
+
```js
|
|
2041
|
+
const form = new FormData();
|
|
2042
|
+
form.append('user-name', 'johndoe');
|
|
2043
|
+
form.append('user.name', 'john');
|
|
2044
|
+
|
|
2045
|
+
console.log(axios.formToJSON(form));
|
|
2046
|
+
// {
|
|
2047
|
+
// 'user-name': 'johndoe',
|
|
2048
|
+
// user: { name: 'john' }
|
|
2049
|
+
// }
|
|
2050
|
+
```
|
|
2051
|
+
|
|
2052
|
+
`user[name]` also creates `{ user: { name: ... } }`, while `items[]` creates an array.
|
|
2053
|
+
|
|
2054
|
+
Axios supports `postForm`, `putForm`, and `patchForm` as shortcuts for the matching HTTP methods with the `Content-Type` header preset to `multipart/form-data`.
|
|
1046
2055
|
|
|
1047
|
-
##
|
|
2056
|
+
## Posting files
|
|
1048
2057
|
|
|
1049
|
-
|
|
2058
|
+
Submit a single file:
|
|
1050
2059
|
|
|
1051
2060
|
```js
|
|
1052
2061
|
await axios.postForm('https://httpbin.org/post', {
|
|
1053
|
-
|
|
1054
|
-
|
|
2062
|
+
myVar: 'foo',
|
|
2063
|
+
file: document.querySelector('#fileInput').files[0],
|
|
1055
2064
|
});
|
|
1056
2065
|
```
|
|
1057
2066
|
|
|
1058
|
-
or multiple files as `multipart/form-data
|
|
2067
|
+
or multiple files as `multipart/form-data`:
|
|
1059
2068
|
|
|
1060
2069
|
```js
|
|
1061
2070
|
await axios.postForm('https://httpbin.org/post', {
|
|
1062
|
-
'files[]': document.querySelector('#fileInput').files
|
|
2071
|
+
'files[]': document.querySelector('#fileInput').files,
|
|
1063
2072
|
});
|
|
1064
2073
|
```
|
|
1065
2074
|
|
|
1066
2075
|
`FileList` object can be passed directly:
|
|
1067
2076
|
|
|
1068
2077
|
```js
|
|
1069
|
-
await axios.postForm('https://httpbin.org/post', document.querySelector('#fileInput').files)
|
|
2078
|
+
await axios.postForm('https://httpbin.org/post', document.querySelector('#fileInput').files);
|
|
1070
2079
|
```
|
|
1071
2080
|
|
|
1072
|
-
|
|
2081
|
+
Axios sends all files with the same field name: `files[]`.
|
|
1073
2082
|
|
|
1074
|
-
##
|
|
2083
|
+
## HTML form posting (browser)
|
|
1075
2084
|
|
|
1076
|
-
Pass HTML Form element as a payload to submit it as `multipart/form-data` content.
|
|
2085
|
+
Pass an HTML Form element as a payload to submit it as `multipart/form-data` content.
|
|
1077
2086
|
|
|
1078
2087
|
```js
|
|
1079
2088
|
await axios.postForm('https://httpbin.org/post', document.querySelector('#htmlForm'));
|
|
@@ -1084,20 +2093,20 @@ await axios.postForm('https://httpbin.org/post', document.querySelector('#htmlFo
|
|
|
1084
2093
|
```js
|
|
1085
2094
|
await axios.post('https://httpbin.org/post', document.querySelector('#htmlForm'), {
|
|
1086
2095
|
headers: {
|
|
1087
|
-
'Content-Type': 'application/json'
|
|
1088
|
-
}
|
|
1089
|
-
})
|
|
2096
|
+
'Content-Type': 'application/json',
|
|
2097
|
+
},
|
|
2098
|
+
});
|
|
1090
2099
|
```
|
|
1091
2100
|
|
|
1092
2101
|
For example, the Form
|
|
1093
2102
|
|
|
1094
2103
|
```html
|
|
1095
2104
|
<form id="form">
|
|
1096
|
-
<input type="text" name="foo" value="1"
|
|
1097
|
-
<input type="text" name="deep.prop" value="2"
|
|
1098
|
-
<input type="text" name="deep prop spaced" value="3"
|
|
1099
|
-
<input type="text" name="baz" value="4"
|
|
1100
|
-
<input type="text" name="baz" value="5"
|
|
2105
|
+
<input type="text" name="foo" value="1" />
|
|
2106
|
+
<input type="text" name="deep.prop" value="2" />
|
|
2107
|
+
<input type="text" name="deep prop spaced" value="3" />
|
|
2108
|
+
<input type="text" name="baz" value="4" />
|
|
2109
|
+
<input type="text" name="baz" value="5" />
|
|
1101
2110
|
|
|
1102
2111
|
<select name="user.age">
|
|
1103
2112
|
<option value="value1">Value 1</option>
|
|
@@ -1105,20 +2114,19 @@ For example, the Form
|
|
|
1105
2114
|
<option value="value3">Value 3</option>
|
|
1106
2115
|
</select>
|
|
1107
2116
|
|
|
1108
|
-
<input type="submit" value="Save"
|
|
2117
|
+
<input type="submit" value="Save" />
|
|
1109
2118
|
</form>
|
|
1110
2119
|
```
|
|
1111
2120
|
|
|
1112
|
-
|
|
2121
|
+
submits this JSON object:
|
|
1113
2122
|
|
|
1114
2123
|
```js
|
|
1115
2124
|
{
|
|
1116
2125
|
"foo": "1",
|
|
1117
2126
|
"deep": {
|
|
1118
|
-
"prop":
|
|
1119
|
-
"spaced": "3"
|
|
1120
|
-
}
|
|
2127
|
+
"prop": "2"
|
|
1121
2128
|
},
|
|
2129
|
+
"deep prop spaced": "3",
|
|
1122
2130
|
"baz": [
|
|
1123
2131
|
"4",
|
|
1124
2132
|
"5"
|
|
@@ -1127,13 +2135,530 @@ will be submitted as the following JSON object:
|
|
|
1127
2135
|
"age": "value2"
|
|
1128
2136
|
}
|
|
1129
2137
|
}
|
|
1130
|
-
|
|
2138
|
+
```
|
|
2139
|
+
|
|
2140
|
+
Only dot and bracket notation create nested paths when a form is converted to JSON. Spaces and other punctuation remain part of literal field names.
|
|
1131
2141
|
|
|
1132
2142
|
Sending `Blobs`/`Files` as JSON (`base64`) is not currently supported.
|
|
1133
2143
|
|
|
2144
|
+
## Progress capturing
|
|
2145
|
+
|
|
2146
|
+
Axios can capture request upload and download progress in browsers and Node.js.
|
|
2147
|
+
Progress events are limited to `3` times per second.
|
|
2148
|
+
|
|
2149
|
+
```js
|
|
2150
|
+
await axios.post(url, data, {
|
|
2151
|
+
onUploadProgress: function (axiosProgressEvent) {
|
|
2152
|
+
/*{
|
|
2153
|
+
loaded: number;
|
|
2154
|
+
total?: number;
|
|
2155
|
+
progress?: number; // in range [0..1]
|
|
2156
|
+
bytes: number; // how many bytes have been transferred since the last trigger (delta)
|
|
2157
|
+
estimated?: number; // estimated time in seconds
|
|
2158
|
+
rate?: number; // upload speed in bytes
|
|
2159
|
+
upload: true; // upload sign
|
|
2160
|
+
}*/
|
|
2161
|
+
},
|
|
2162
|
+
|
|
2163
|
+
onDownloadProgress: function (axiosProgressEvent) {
|
|
2164
|
+
/*{
|
|
2165
|
+
loaded: number;
|
|
2166
|
+
total?: number;
|
|
2167
|
+
progress?: number;
|
|
2168
|
+
bytes: number;
|
|
2169
|
+
estimated?: number;
|
|
2170
|
+
rate?: number; // download speed in bytes
|
|
2171
|
+
download: true; // download sign
|
|
2172
|
+
}*/
|
|
2173
|
+
},
|
|
2174
|
+
});
|
|
2175
|
+
```
|
|
2176
|
+
|
|
2177
|
+
You can also track stream upload/download progress in node.js:
|
|
2178
|
+
|
|
2179
|
+
```js
|
|
2180
|
+
const { data } = await axios.post(SERVER_URL, readableStream, {
|
|
2181
|
+
onUploadProgress: ({ progress }) => {
|
|
2182
|
+
console.log((progress * 100).toFixed(2));
|
|
2183
|
+
},
|
|
2184
|
+
|
|
2185
|
+
headers: {
|
|
2186
|
+
'Content-Length': contentLength,
|
|
2187
|
+
},
|
|
2188
|
+
|
|
2189
|
+
maxRedirects: 0, // avoid buffering the entire stream
|
|
2190
|
+
});
|
|
2191
|
+
```
|
|
2192
|
+
|
|
2193
|
+
> Note:
|
|
2194
|
+
> Capturing FormData upload progress is not currently supported in node.js environments.
|
|
2195
|
+
|
|
2196
|
+
> Warning:
|
|
2197
|
+
> Set `maxRedirects: 0` when uploading streams in node.js.
|
|
2198
|
+
> The follow-redirects package buffers the entire stream in RAM and does not follow the "backpressure" algorithm.
|
|
2199
|
+
|
|
2200
|
+
## Rate limiting
|
|
2201
|
+
|
|
2202
|
+
Download and upload rate limits can only be set for the http adapter (node.js):
|
|
2203
|
+
|
|
2204
|
+
```js
|
|
2205
|
+
const { data } = await axios.post(LOCAL_SERVER_URL, myBuffer, {
|
|
2206
|
+
onUploadProgress: ({ progress, rate }) => {
|
|
2207
|
+
console.log(`Upload [${(progress * 100).toFixed(2)}%]: ${(rate / 1024).toFixed(2)}KB/s`);
|
|
2208
|
+
},
|
|
2209
|
+
|
|
2210
|
+
maxRate: [100 * 1024], // 100KB/s limit
|
|
2211
|
+
});
|
|
2212
|
+
```
|
|
2213
|
+
|
|
2214
|
+
## AxiosHeaders
|
|
2215
|
+
|
|
2216
|
+
Axios includes an `AxiosHeaders` class for working with headers through a Map-like API.
|
|
2217
|
+
HTTP header names are case-insensitive, but Axios keeps the original header case for style and for servers that incorrectly depend on case.
|
|
2218
|
+
Directly manipulating the headers object still works, but it is deprecated.
|
|
2219
|
+
|
|
2220
|
+
### Working with headers
|
|
2221
|
+
|
|
2222
|
+
An `AxiosHeaders` instance can contain several internal value types that control setting and merging.
|
|
2223
|
+
Axios gets the final headers object with string values by calling `toJSON`.
|
|
2224
|
+
|
|
2225
|
+
> Note: By JSON here we mean an object consisting only of string values intended to be sent over the network.
|
|
2226
|
+
|
|
2227
|
+
The header value can be one of the following types:
|
|
2228
|
+
|
|
2229
|
+
- `string` - normal string value sent to the server
|
|
2230
|
+
- `null` - skip header when rendering to JSON
|
|
2231
|
+
- `false` - skip header when rendering to JSON. Also indicates that the `set` method must be called with `rewrite` set to `true`
|
|
2232
|
+
to overwrite this value (Axios uses this internally to allow users to opt out of installing certain headers like `User-Agent` or `Content-Type`)
|
|
2233
|
+
- `undefined` - value is not set
|
|
2234
|
+
|
|
2235
|
+
> Note: The header value is considered set if it is not equal to undefined.
|
|
2236
|
+
|
|
2237
|
+
The headers object is always initialized inside interceptors and transformers:
|
|
2238
|
+
|
|
2239
|
+
```ts
|
|
2240
|
+
axios.interceptors.request.use((request: InternalAxiosRequestConfig) => {
|
|
2241
|
+
request.headers.set('My-header', 'value');
|
|
2242
|
+
|
|
2243
|
+
request.headers.set({
|
|
2244
|
+
'My-set-header1': 'my-set-value1',
|
|
2245
|
+
'My-set-header2': 'my-set-value2',
|
|
2246
|
+
});
|
|
2247
|
+
|
|
2248
|
+
request.headers.set('User-Agent', false); // prevent Axios from setting this header later
|
|
2249
|
+
|
|
2250
|
+
request.headers.setContentType('text/plain');
|
|
2251
|
+
|
|
2252
|
+
request.headers['My-set-header2'] = 'newValue'; // direct access is deprecated
|
|
2253
|
+
|
|
2254
|
+
return request;
|
|
2255
|
+
});
|
|
2256
|
+
```
|
|
2257
|
+
|
|
2258
|
+
You can iterate over an `AxiosHeaders` instance using a `for...of` statement:
|
|
2259
|
+
|
|
2260
|
+
```js
|
|
2261
|
+
const headers = new AxiosHeaders({
|
|
2262
|
+
foo: '1',
|
|
2263
|
+
bar: '2',
|
|
2264
|
+
baz: '3',
|
|
2265
|
+
});
|
|
2266
|
+
|
|
2267
|
+
for (const [header, value] of headers) {
|
|
2268
|
+
console.log(header, value);
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
// foo 1
|
|
2272
|
+
// bar 2
|
|
2273
|
+
// baz 3
|
|
2274
|
+
```
|
|
2275
|
+
|
|
2276
|
+
### Preserving a specific header case
|
|
2277
|
+
|
|
2278
|
+
Header names are case-insensitive, but `AxiosHeaders` keeps the case of the first matching key it sees.
|
|
2279
|
+
If you need a specific case for non-standard case-sensitive servers, define a case preset with `undefined` and then set the value later:
|
|
2280
|
+
|
|
2281
|
+
```js
|
|
2282
|
+
const api = axios.create();
|
|
2283
|
+
|
|
2284
|
+
api.defaults.headers.common = {
|
|
2285
|
+
'content-type': undefined,
|
|
2286
|
+
accept: undefined,
|
|
2287
|
+
};
|
|
2288
|
+
|
|
2289
|
+
await api.put(url, data, {
|
|
2290
|
+
headers: {
|
|
2291
|
+
'Content-Type': 'application/octet-stream',
|
|
2292
|
+
Accept: 'application/json',
|
|
2293
|
+
},
|
|
2294
|
+
});
|
|
2295
|
+
```
|
|
2296
|
+
|
|
2297
|
+
You can also compose the same behavior with `AxiosHeaders.concat`:
|
|
2298
|
+
|
|
2299
|
+
```js
|
|
2300
|
+
const headers = axios.AxiosHeaders.concat(
|
|
2301
|
+
{ 'content-type': undefined },
|
|
2302
|
+
{ 'Content-Type': 'application/octet-stream' }
|
|
2303
|
+
);
|
|
2304
|
+
|
|
2305
|
+
await axios.put(url, data, { headers });
|
|
2306
|
+
```
|
|
2307
|
+
|
|
2308
|
+
### new AxiosHeaders(headers?)
|
|
2309
|
+
|
|
2310
|
+
Constructs a new `AxiosHeaders` instance.
|
|
2311
|
+
|
|
2312
|
+
```
|
|
2313
|
+
constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
|
|
2314
|
+
```
|
|
2315
|
+
|
|
2316
|
+
If the headers object is a string, Axios parses it as raw HTTP headers.
|
|
2317
|
+
|
|
2318
|
+
```js
|
|
2319
|
+
const headers = new AxiosHeaders(`
|
|
2320
|
+
Host: www.bing.com
|
|
2321
|
+
User-Agent: curl/7.54.0
|
|
2322
|
+
Accept: */*`);
|
|
2323
|
+
|
|
2324
|
+
console.log(headers);
|
|
2325
|
+
|
|
2326
|
+
// Object [AxiosHeaders] {
|
|
2327
|
+
// host: 'www.bing.com',
|
|
2328
|
+
// 'user-agent': 'curl/7.54.0',
|
|
2329
|
+
// accept: '*/*'
|
|
2330
|
+
// }
|
|
2331
|
+
```
|
|
2332
|
+
|
|
2333
|
+
### AxiosHeaders#set
|
|
2334
|
+
|
|
2335
|
+
```ts
|
|
2336
|
+
set(headerName, value: Axios, rewrite?: boolean);
|
|
2337
|
+
set(headerName, value, rewrite?: (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean);
|
|
2338
|
+
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean);
|
|
2339
|
+
set(headers?: Iterable<[string, AxiosHeaderValue]>, rewrite?: boolean);
|
|
2340
|
+
```
|
|
2341
|
+
|
|
2342
|
+
The `rewrite` argument controls the overwriting behavior:
|
|
2343
|
+
|
|
2344
|
+
- `false` - do not overwrite if the header's value is set (is not `undefined`)
|
|
2345
|
+
- `undefined` (default) - overwrite the header unless its value is set to `false`
|
|
2346
|
+
- `true` - rewrite anyway
|
|
2347
|
+
|
|
2348
|
+
The option can also accept a user-defined function that determines whether to overwrite the value.
|
|
2349
|
+
|
|
2350
|
+
Empty or whitespace-only header names are ignored.
|
|
2351
|
+
|
|
2352
|
+
Iterable key/value pairs, such as a `Map`, are accepted:
|
|
2353
|
+
|
|
2354
|
+
```js
|
|
2355
|
+
const headers = new AxiosHeaders();
|
|
2356
|
+
|
|
2357
|
+
headers.set(
|
|
2358
|
+
new Map([
|
|
2359
|
+
['X-Trace-Id', 'abc123'],
|
|
2360
|
+
['Accept', 'application/json'],
|
|
2361
|
+
])
|
|
2362
|
+
);
|
|
2363
|
+
```
|
|
2364
|
+
|
|
2365
|
+
Returns `this`.
|
|
2366
|
+
|
|
2367
|
+
### AxiosHeaders#get(header)
|
|
2368
|
+
|
|
2369
|
+
```
|
|
2370
|
+
get(headerName: string, parser: typeof AxiosHeaders.parseParameters): AxiosHeaderParameters;
|
|
2371
|
+
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
2372
|
+
get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
|
|
2373
|
+
```
|
|
2374
|
+
|
|
2375
|
+
Returns the internal value of the header. It can take an extra argument to parse the header's value with `RegExp.exec`,
|
|
2376
|
+
matcher function or internal key-value parser.
|
|
2377
|
+
|
|
2378
|
+
```ts
|
|
2379
|
+
const headers = new AxiosHeaders({
|
|
2380
|
+
'Content-Type': 'multipart/form-data; boundary=Asrf456BGe4h',
|
|
2381
|
+
});
|
|
2382
|
+
|
|
2383
|
+
console.log(headers.get('Content-Type'));
|
|
2384
|
+
// multipart/form-data; boundary=Asrf456BGe4h
|
|
2385
|
+
|
|
2386
|
+
console.log(headers.get('Content-Type', true)); // parse key-value pairs from a string separated with \s,;= delimiters:
|
|
2387
|
+
// [Object: null prototype] {
|
|
2388
|
+
// 'multipart/form-data': undefined,
|
|
2389
|
+
// boundary: 'Asrf456BGe4h'
|
|
2390
|
+
// }
|
|
2391
|
+
|
|
2392
|
+
const quotedHeaders = new AxiosHeaders({
|
|
2393
|
+
'Content-Type': 'multipart/form-data; boundary="a,b"',
|
|
2394
|
+
});
|
|
2395
|
+
|
|
2396
|
+
console.log({
|
|
2397
|
+
...quotedHeaders.get('Content-Type', AxiosHeaders.parseParameters),
|
|
2398
|
+
});
|
|
2399
|
+
// { boundary: 'a,b' }
|
|
2400
|
+
|
|
2401
|
+
console.log(
|
|
2402
|
+
headers.get('Content-Type', (value, name, headers) => {
|
|
2403
|
+
return String(value).replace(/a/g, 'ZZZ');
|
|
2404
|
+
})
|
|
2405
|
+
);
|
|
2406
|
+
// multipZZZrt/form-dZZZtZZZ; boundZZZry=Asrf456BGe4h
|
|
2407
|
+
|
|
2408
|
+
console.log(headers.get('Content-Type', /boundary=(\w+)/)?.[0]);
|
|
2409
|
+
// boundary=Asrf456BGe4h
|
|
2410
|
+
```
|
|
2411
|
+
|
|
2412
|
+
`AxiosHeaders.parseParameters` is the opt-in parser for normalized HTTP parameter values. It returns a null-prototype map, matches parameter names case-insensitively, removes quoted-string delimiters, decodes escaped quotes and backslashes, preserves commas and semicolons inside quoted values, and removes only HTTP optional whitespace around unquoted values. It omits the unsafe keys `__proto__`, `constructor`, and `prototype`.
|
|
2413
|
+
|
|
2414
|
+
Passing `true` remains the legacy tokenizer and keeps its existing output for backward compatibility.
|
|
2415
|
+
|
|
2416
|
+
Returns the value of the header.
|
|
2417
|
+
|
|
2418
|
+
### AxiosHeaders#has(header, matcher?)
|
|
2419
|
+
|
|
2420
|
+
```
|
|
2421
|
+
has(header: string, matcher?: AxiosHeaderMatcher): boolean;
|
|
2422
|
+
```
|
|
2423
|
+
|
|
2424
|
+
Returns `true` if the header is set (has no `undefined` value).
|
|
2425
|
+
|
|
2426
|
+
### AxiosHeaders#delete(header, matcher?)
|
|
2427
|
+
|
|
2428
|
+
```
|
|
2429
|
+
delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
|
|
2430
|
+
```
|
|
2431
|
+
|
|
2432
|
+
Returns `true` if at least one header has been removed.
|
|
2433
|
+
|
|
2434
|
+
### AxiosHeaders#clear(matcher?)
|
|
2435
|
+
|
|
2436
|
+
```
|
|
2437
|
+
clear(matcher?: AxiosHeaderMatcher): boolean;
|
|
2438
|
+
```
|
|
2439
|
+
|
|
2440
|
+
Removes all headers.
|
|
2441
|
+
Unlike the `delete` method matcher, this optional matcher matches the header name rather than the value.
|
|
2442
|
+
|
|
2443
|
+
```ts
|
|
2444
|
+
const headers = new AxiosHeaders({
|
|
2445
|
+
foo: '1',
|
|
2446
|
+
'x-foo': '2',
|
|
2447
|
+
'x-bar': '3',
|
|
2448
|
+
});
|
|
2449
|
+
|
|
2450
|
+
console.log(headers.clear(/^x-/)); // true
|
|
2451
|
+
|
|
2452
|
+
console.log(headers.toJSON()); // [Object: null prototype] { foo: '1' }
|
|
2453
|
+
```
|
|
2454
|
+
|
|
2455
|
+
Returns `true` if at least one header has been cleared.
|
|
2456
|
+
|
|
2457
|
+
### AxiosHeaders#normalize(format);
|
|
2458
|
+
|
|
2459
|
+
If the headers object was changed directly, it can have duplicates with the same name but in different cases.
|
|
2460
|
+
This method normalizes the headers object by combining duplicate keys into one.
|
|
2461
|
+
Axios uses this method internally after calling each interceptor.
|
|
2462
|
+
Set `format` to true for converting header names to lowercase and capitalizing the initial letters (`cOntEnt-type` => `Content-Type`)
|
|
2463
|
+
|
|
2464
|
+
```js
|
|
2465
|
+
const headers = new AxiosHeaders({
|
|
2466
|
+
foo: '1',
|
|
2467
|
+
});
|
|
2468
|
+
|
|
2469
|
+
headers.Foo = '2';
|
|
2470
|
+
headers.FOO = '3';
|
|
2471
|
+
|
|
2472
|
+
console.log(headers.toJSON()); // [Object: null prototype] { foo: '1', Foo: '2', FOO: '3' }
|
|
2473
|
+
console.log(headers.normalize().toJSON()); // [Object: null prototype] { foo: '3' }
|
|
2474
|
+
console.log(headers.normalize(true).toJSON()); // [Object: null prototype] { Foo: '3' }
|
|
2475
|
+
```
|
|
2476
|
+
|
|
2477
|
+
Returns `this`.
|
|
2478
|
+
|
|
2479
|
+
### AxiosHeaders#concat(...targets)
|
|
2480
|
+
|
|
2481
|
+
```
|
|
2482
|
+
concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
|
|
2483
|
+
```
|
|
2484
|
+
|
|
2485
|
+
Merges the instance with targets into a new `AxiosHeaders` instance. If the target is a string, Axios parses it as raw HTTP headers.
|
|
2486
|
+
|
|
2487
|
+
Returns a new `AxiosHeaders` instance.
|
|
2488
|
+
|
|
2489
|
+
### AxiosHeaders#toJSON(asStrings?)
|
|
2490
|
+
|
|
2491
|
+
```
|
|
2492
|
+
toJSON(asStrings: true): Record<string, string>;
|
|
2493
|
+
toJSON(asStrings?: false): Record<string, string | string[]>;
|
|
2494
|
+
```
|
|
2495
|
+
|
|
2496
|
+
Resolves all internal header values into a new null prototype object.
|
|
2497
|
+
Set `asStrings` to true to resolve arrays as a string containing all elements, separated by commas.
|
|
2498
|
+
|
|
2499
|
+
### AxiosHeaders#toString()
|
|
2500
|
+
|
|
2501
|
+
```
|
|
2502
|
+
toString(): string;
|
|
2503
|
+
```
|
|
2504
|
+
|
|
2505
|
+
Returns the headers as a CRLF-free HTTP header block, one `name: value` pair per line.
|
|
2506
|
+
|
|
2507
|
+
### AxiosHeaders.from(thing?)
|
|
2508
|
+
|
|
2509
|
+
```
|
|
2510
|
+
from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
|
|
2511
|
+
```
|
|
2512
|
+
|
|
2513
|
+
Returns a new `AxiosHeaders` instance created from the raw headers passed in,
|
|
2514
|
+
or returns the given headers object if it's already an `AxiosHeaders` instance.
|
|
2515
|
+
|
|
2516
|
+
### AxiosHeaders.concat(...targets)
|
|
2517
|
+
|
|
2518
|
+
```
|
|
2519
|
+
concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
|
|
2520
|
+
```
|
|
2521
|
+
|
|
2522
|
+
Returns a new `AxiosHeaders` instance created by merging the target objects.
|
|
2523
|
+
|
|
2524
|
+
### Shortcuts
|
|
2525
|
+
|
|
2526
|
+
The following shortcuts are available:
|
|
2527
|
+
|
|
2528
|
+
- `setContentType`, `getContentType`, `hasContentType`
|
|
2529
|
+
|
|
2530
|
+
- `setContentLength`, `getContentLength`, `hasContentLength`
|
|
2531
|
+
|
|
2532
|
+
- `setAccept`, `getAccept`, `hasAccept`
|
|
2533
|
+
|
|
2534
|
+
- `setUserAgent`, `getUserAgent`, `hasUserAgent`
|
|
2535
|
+
|
|
2536
|
+
- `setContentEncoding`, `getContentEncoding`, `hasContentEncoding`
|
|
2537
|
+
|
|
2538
|
+
## Fetch adapter
|
|
2539
|
+
|
|
2540
|
+
Axios introduced the fetch adapter in `v1.7.0`. By default, Axios uses it when the `xhr` and `http` adapters are not available in the build or not supported by the environment.
|
|
2541
|
+
To use it by default, select it explicitly:
|
|
2542
|
+
|
|
2543
|
+
```js
|
|
2544
|
+
const { data } = axios.get(url, {
|
|
2545
|
+
adapter: 'fetch', // by default ['xhr', 'http', 'fetch']
|
|
2546
|
+
});
|
|
2547
|
+
```
|
|
2548
|
+
|
|
2549
|
+
You can create a separate instance for this:
|
|
2550
|
+
|
|
2551
|
+
```js
|
|
2552
|
+
const fetchAxios = axios.create({
|
|
2553
|
+
adapter: 'fetch',
|
|
2554
|
+
});
|
|
2555
|
+
|
|
2556
|
+
const { data } = fetchAxios.get(url);
|
|
2557
|
+
```
|
|
2558
|
+
|
|
2559
|
+
The adapter supports the same features as the `xhr` adapter, including upload and download progress capturing.
|
|
2560
|
+
It also supports response types such as `stream` and `formdata` when the environment supports them.
|
|
2561
|
+
|
|
2562
|
+
When `auth` is omitted, the fetch adapter can read HTTP Basic auth credentials from the request URL, for example `https://user:pass@example.com`. Percent-encoded URL credentials are decoded before the `Authorization` header is generated, and `auth` takes precedence over URL-embedded credentials.
|
|
2563
|
+
|
|
2564
|
+
### Custom fetch
|
|
2565
|
+
|
|
2566
|
+
Since `v1.12.0`, you can configure the fetch adapter to use a custom fetch API instead of environment globals.
|
|
2567
|
+
Pass a custom `fetch` function, `Request`, and `Response` constructors through `env` config.
|
|
2568
|
+
This helps in custom environments and app frameworks.
|
|
2569
|
+
|
|
2570
|
+
When using a custom fetch, you may also need to set custom `Request` and `Response` constructors. If you do not set them, Axios uses the global objects.
|
|
2571
|
+
If your custom fetch API does not provide these objects and the globals are incompatible with it, pass `null` to disable them inside the fetch adapter.
|
|
2572
|
+
|
|
2573
|
+
> Note: Setting `Request` and `Response` to `null` prevents the fetch adapter from capturing upload and download progress.
|
|
2574
|
+
|
|
2575
|
+
Basic example:
|
|
2576
|
+
|
|
2577
|
+
```js
|
|
2578
|
+
import customFetchFunction from 'customFetchModule';
|
|
2579
|
+
|
|
2580
|
+
const instance = axios.create({
|
|
2581
|
+
adapter: 'fetch',
|
|
2582
|
+
onDownloadProgress(e) {
|
|
2583
|
+
console.log('downloadProgress', e);
|
|
2584
|
+
},
|
|
2585
|
+
env: {
|
|
2586
|
+
fetch: customFetchFunction,
|
|
2587
|
+
Request: null, // undefined -> use the global constructor
|
|
2588
|
+
Response: null,
|
|
2589
|
+
},
|
|
2590
|
+
});
|
|
2591
|
+
```
|
|
2592
|
+
|
|
2593
|
+
#### Using with Tauri
|
|
2594
|
+
|
|
2595
|
+
A minimal example of setting up Axios for use in a [Tauri](https://tauri.app/plugin/http-client/) app with a platform fetch function that ignores CORS policy for requests.
|
|
2596
|
+
|
|
2597
|
+
```js
|
|
2598
|
+
import { fetch } from '@tauri-apps/plugin-http';
|
|
2599
|
+
import axios from 'axios';
|
|
2600
|
+
|
|
2601
|
+
const instance = axios.create({
|
|
2602
|
+
adapter: 'fetch',
|
|
2603
|
+
onDownloadProgress(e) {
|
|
2604
|
+
console.log('downloadProgress', e);
|
|
2605
|
+
},
|
|
2606
|
+
env: {
|
|
2607
|
+
fetch,
|
|
2608
|
+
},
|
|
2609
|
+
});
|
|
2610
|
+
|
|
2611
|
+
const { data } = await instance.get('https://google.com');
|
|
2612
|
+
```
|
|
2613
|
+
|
|
2614
|
+
#### Using with SvelteKit
|
|
2615
|
+
|
|
2616
|
+
[SvelteKit](https://svelte.dev/docs/kit/web-standards#Fetch-APIs) uses a custom fetch function for server rendering in `load` functions. It also uses relative paths, which are incompatible with the standard URL API. Configure Axios to use SvelteKit's custom fetch API:
|
|
2617
|
+
|
|
2618
|
+
```js
|
|
2619
|
+
export async function load({ fetch }) {
|
|
2620
|
+
const { data: post } = await axios.get('https://jsonplaceholder.typicode.com/posts/1', {
|
|
2621
|
+
adapter: 'fetch',
|
|
2622
|
+
env: {
|
|
2623
|
+
fetch,
|
|
2624
|
+
Request: null,
|
|
2625
|
+
Response: null,
|
|
2626
|
+
},
|
|
2627
|
+
});
|
|
2628
|
+
|
|
2629
|
+
return { post };
|
|
2630
|
+
}
|
|
2631
|
+
```
|
|
2632
|
+
|
|
2633
|
+
#### HTTP/2 support
|
|
2634
|
+
|
|
2635
|
+
Axios supports HTTP/2 through the Node.js `http` adapter, introduced in v1.13.0.
|
|
2636
|
+
|
|
2637
|
+
Support depends on the runtime environment. Axios relies on Node.js APIs, so HTTP/2 works in supported Node.js versions but may not work in other environments such as Bun or Deno.
|
|
2638
|
+
|
|
2639
|
+
Options like `httpVersion` and `http2Options` are adapter-specific and may not behave the same way in every environment.
|
|
2640
|
+
|
|
2641
|
+
Note: HTTP/2 redirects are currently not supported by the HTTP/2 adapter.
|
|
2642
|
+
|
|
2643
|
+
```js
|
|
2644
|
+
const form = new FormData();
|
|
2645
|
+
|
|
2646
|
+
form.append('foo', '123');
|
|
2647
|
+
|
|
2648
|
+
const { data, headers, status } = await axios.post('https://httpbin.org/post', form, {
|
|
2649
|
+
onUploadProgress(e) {
|
|
2650
|
+
console.log('upload progress', e);
|
|
2651
|
+
},
|
|
2652
|
+
onDownloadProgress(e) {
|
|
2653
|
+
console.log('download progress', e);
|
|
2654
|
+
},
|
|
2655
|
+
responseType: 'arraybuffer',
|
|
2656
|
+
});
|
|
2657
|
+
```
|
|
2658
|
+
|
|
1134
2659
|
## Semver
|
|
1135
2660
|
|
|
1136
|
-
|
|
2661
|
+
Axios follows [semver](https://semver.org/) since `v1.0.0`.
|
|
1137
2662
|
|
|
1138
2663
|
## Promises
|
|
1139
2664
|
|
|
@@ -1158,25 +2683,169 @@ try {
|
|
|
1158
2683
|
}
|
|
1159
2684
|
```
|
|
1160
2685
|
|
|
2686
|
+
Use `axios.isCancel<T>()` to narrow cancellation errors to `CanceledError<T>`:
|
|
2687
|
+
|
|
2688
|
+
```typescript
|
|
2689
|
+
const controller = new AbortController();
|
|
2690
|
+
|
|
2691
|
+
try {
|
|
2692
|
+
await axios.get<User>('/user?ID=12345', { signal: controller.signal });
|
|
2693
|
+
} catch (error) {
|
|
2694
|
+
if (axios.isCancel<User>(error)) {
|
|
2695
|
+
handleCancellation(error);
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
```
|
|
2699
|
+
|
|
2700
|
+
### Typing request data and query params
|
|
2701
|
+
|
|
2702
|
+
`AxiosRequestConfig<D = any, P = any>` uses `D` for the request body and `P` for query parameters. The params serializer receives the same `P`, and both types are preserved on the default response config:
|
|
2703
|
+
|
|
2704
|
+
```typescript
|
|
2705
|
+
import axios, {
|
|
2706
|
+
type AxiosPromise,
|
|
2707
|
+
type AxiosRequestConfig,
|
|
2708
|
+
type InternalAxiosRequestConfig,
|
|
2709
|
+
} from 'axios';
|
|
2710
|
+
|
|
2711
|
+
interface RequestBody {
|
|
2712
|
+
includeArchived: boolean;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
interface SearchParams {
|
|
2716
|
+
query: string;
|
|
2717
|
+
page?: number;
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
interface SearchResponse {
|
|
2721
|
+
results: string[];
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
const config: AxiosRequestConfig<RequestBody, SearchParams> = {
|
|
2725
|
+
data: { includeArchived: false },
|
|
2726
|
+
params: { query: 'axios', page: 1 },
|
|
2727
|
+
paramsSerializer: (params) => `${params.query}:${params.page ?? 1}`,
|
|
2728
|
+
};
|
|
2729
|
+
|
|
2730
|
+
const response = await axios.get('/search', config);
|
|
2731
|
+
response.config.data; // RequestBody | undefined
|
|
2732
|
+
response.config.params; // SearchParams | undefined
|
|
2733
|
+
|
|
2734
|
+
const invalidConfig: AxiosRequestConfig<RequestBody, SearchParams> = {
|
|
2735
|
+
// @ts-expect-error `query` must be a string
|
|
2736
|
+
params: { query: 123 },
|
|
2737
|
+
};
|
|
2738
|
+
|
|
2739
|
+
const adapter = (
|
|
2740
|
+
adapterConfig: InternalAxiosRequestConfig<RequestBody, SearchParams>
|
|
2741
|
+
): AxiosPromise<SearchResponse, RequestBody, SearchParams> =>
|
|
2742
|
+
Promise.resolve({
|
|
2743
|
+
data: { results: [] },
|
|
2744
|
+
status: 200,
|
|
2745
|
+
statusText: 'OK',
|
|
2746
|
+
headers: {},
|
|
2747
|
+
config: adapterConfig,
|
|
2748
|
+
});
|
|
2749
|
+
```
|
|
2750
|
+
|
|
2751
|
+
The request methods place `P` last—`<T, R, D, P>`—so the existing response data (`T`), custom response (`R`), and request data (`D`) positions do not change. Explicit custom response types still determine the resolved value. `RawAxiosRequestConfig`, `InternalAxiosRequestConfig`, defaults, `AxiosResponse`, `AxiosPromise<T, D, P>`, `AxiosError`, `CanceledError`, callable instances, adapters, and `mergeConfig()` also carry `P`. The default is `any` for backward compatibility.
|
|
2752
|
+
|
|
2753
|
+
Use all three public error generics when cancellation narrowing must retain the response, request body, and params types:
|
|
2754
|
+
|
|
2755
|
+
```typescript
|
|
2756
|
+
declare const error: unknown;
|
|
2757
|
+
|
|
2758
|
+
if (axios.isCancel<SearchResponse, RequestBody, SearchParams>(error)) {
|
|
2759
|
+
error.config?.data; // RequestBody | undefined
|
|
2760
|
+
error.config?.params; // SearchParams | undefined
|
|
2761
|
+
}
|
|
2762
|
+
```
|
|
2763
|
+
|
|
2764
|
+
### Symbol-keyed custom request config
|
|
2765
|
+
|
|
2766
|
+
Own enumerable symbol properties survive config merging, so module-augmented options can reach request interceptors and adapters:
|
|
2767
|
+
|
|
2768
|
+
```typescript
|
|
2769
|
+
import axios from 'axios';
|
|
2770
|
+
|
|
2771
|
+
export const someFlag: unique symbol = Symbol(
|
|
2772
|
+
'some flag used in request interceptor'
|
|
2773
|
+
);
|
|
2774
|
+
|
|
2775
|
+
declare module 'axios' {
|
|
2776
|
+
interface AxiosRequestConfig<D = any, P = any> {
|
|
2777
|
+
[someFlag]?: boolean;
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
axios.interceptors.request.use((config) => {
|
|
2782
|
+
if (config[someFlag]) {
|
|
2783
|
+
config.headers.set('X-Some-Flag', 'enabled');
|
|
2784
|
+
}
|
|
2785
|
+
return config;
|
|
2786
|
+
});
|
|
2787
|
+
|
|
2788
|
+
await axios.get('/users', { [someFlag]: true });
|
|
2789
|
+
```
|
|
2790
|
+
|
|
2791
|
+
Only own enumerable symbol properties are copied; inherited and non-enumerable symbol properties are not.
|
|
2792
|
+
|
|
2793
|
+
Because axios publishes an ESM default export and a CJS `module.exports`, TypeScript has a few caveats.
|
|
2794
|
+
The recommended setting is `"moduleResolution": "node16"`, which is implied by `"module": "node16"`. This requires TypeScript 4.7 or greater.
|
|
2795
|
+
If you use ESM, your settings should be fine.
|
|
2796
|
+
If you compile TypeScript to CJS and can't use `"moduleResolution": "node 16"`, enable `esModuleInterop`.
|
|
2797
|
+
If you use TypeScript to type check CJS JavaScript code, your only option is to use `"moduleResolution": "node16"`.
|
|
2798
|
+
|
|
2799
|
+
You can also create a custom instance with typed interceptors:
|
|
2800
|
+
|
|
2801
|
+
```typescript
|
|
2802
|
+
import axios, { AxiosInstance, InternalAxiosRequestConfig } from 'axios';
|
|
2803
|
+
|
|
2804
|
+
const apiClient: AxiosInstance = axios.create({
|
|
2805
|
+
baseURL: 'https://api.example.com',
|
|
2806
|
+
timeout: 10000,
|
|
2807
|
+
});
|
|
2808
|
+
|
|
2809
|
+
apiClient.interceptors.request.use((config: InternalAxiosRequestConfig) => {
|
|
2810
|
+
// Add auth token
|
|
2811
|
+
return config;
|
|
2812
|
+
});
|
|
2813
|
+
```
|
|
2814
|
+
|
|
1161
2815
|
## Online one-click setup
|
|
1162
2816
|
|
|
1163
|
-
You can use Gitpod,
|
|
2817
|
+
You can use Gitpod, a free online IDE for open source projects, to contribute or run the examples online.
|
|
2818
|
+
|
|
2819
|
+
[](https://gitpod.io/#https://github.com/axios/axios/blob/main/examples/server.js)
|
|
2820
|
+
|
|
2821
|
+
## Contributing
|
|
2822
|
+
|
|
2823
|
+
### Local setup
|
|
2824
|
+
|
|
2825
|
+
As a supply-chain hardening measure, this repository ships a project-level `.npmrc` that sets `ignore-scripts=true`. This blocks npm lifecycle scripts (`preinstall`, `install`, `postinstall`, `prepare`) from any direct or transitive dependency when you run `npm install` or `npm ci` inside the repo. See [THREATMODEL.md](./THREATMODEL.md) (threat T-S2) for the rationale.
|
|
2826
|
+
|
|
2827
|
+
One consequence: the repository's own `prepare` hook (which installs Husky's git hooks) will **not** run automatically. After your first install, enable the git hooks manually:
|
|
2828
|
+
|
|
2829
|
+
```bash
|
|
2830
|
+
npm ci
|
|
2831
|
+
npm rebuild husky && npx husky
|
|
2832
|
+
```
|
|
1164
2833
|
|
|
1165
|
-
|
|
2834
|
+
Run those two commands once per fresh checkout. You do **not** need to re-run them after every subsequent `npm install`.
|
|
1166
2835
|
|
|
2836
|
+
Do not remove `ignore-scripts=true` from `.npmrc` to "fix" this. That reopens the lifecycle-script attack surface for every other package in the tree. All CI workflows already invoke npm with `--ignore-scripts`, so local behaviour matches CI.
|
|
1167
2837
|
|
|
1168
2838
|
## Resources
|
|
1169
2839
|
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md)
|
|
2840
|
+
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
|
|
2841
|
+
- [Ecosystem](https://github.com/axios/axios/blob/v1.x/ECOSYSTEM.md)
|
|
2842
|
+
- [Contributing Guide](https://github.com/axios/axios/blob/v1.x/CONTRIBUTING.md)
|
|
2843
|
+
- [Code of Conduct](https://github.com/axios/axios/blob/v1.x/CODE_OF_CONDUCT.md)
|
|
1175
2844
|
|
|
1176
2845
|
## Credits
|
|
1177
2846
|
|
|
1178
|
-
axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http)
|
|
2847
|
+
axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) in [AngularJS](https://angularjs.org/). It provides a standalone `$http`-like service for use outside AngularJS.
|
|
1179
2848
|
|
|
1180
2849
|
## License
|
|
1181
2850
|
|
|
1182
|
-
[MIT](LICENSE)
|
|
2851
|
+
[](LICENSE)
|