@mavogel/awscdk-rootmail 0.0.334 → 0.0.335
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/.jsii +2 -4
- package/CLAUDE.md +14 -30
- package/cdk.json +0 -1
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/package.json +1 -10
- package/lib/index-cli-synth.d.ts +0 -1
- package/lib/index-cli-synth.js +0 -68
- package/lib/scripts/publish-assets.d.ts +0 -1
- package/lib/scripts/publish-assets.js +0 -39
- package/node_modules/async-retry/LICENSE.md +0 -21
- package/node_modules/async-retry/README.md +0 -53
- package/node_modules/async-retry/lib/index.js +0 -61
- package/node_modules/async-retry/package.json +0 -55
- package/node_modules/asynckit/LICENSE +0 -21
- package/node_modules/asynckit/README.md +0 -233
- package/node_modules/asynckit/bench.js +0 -76
- package/node_modules/asynckit/index.js +0 -6
- package/node_modules/asynckit/lib/abort.js +0 -29
- package/node_modules/asynckit/lib/async.js +0 -34
- package/node_modules/asynckit/lib/defer.js +0 -26
- package/node_modules/asynckit/lib/iterate.js +0 -75
- package/node_modules/asynckit/lib/readable_asynckit.js +0 -91
- package/node_modules/asynckit/lib/readable_parallel.js +0 -25
- package/node_modules/asynckit/lib/readable_serial.js +0 -25
- package/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
- package/node_modules/asynckit/lib/state.js +0 -37
- package/node_modules/asynckit/lib/streamify.js +0 -141
- package/node_modules/asynckit/lib/terminator.js +0 -29
- package/node_modules/asynckit/package.json +0 -63
- package/node_modules/asynckit/parallel.js +0 -43
- package/node_modules/asynckit/serial.js +0 -17
- package/node_modules/asynckit/serialOrdered.js +0 -75
- package/node_modules/asynckit/stream.js +0 -21
- package/node_modules/axios/CHANGELOG.md +0 -1416
- package/node_modules/axios/LICENSE +0 -7
- package/node_modules/axios/MIGRATION_GUIDE.md +0 -877
- package/node_modules/axios/README.md +0 -2019
- package/node_modules/axios/dist/axios.js +0 -4494
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/axios.min.js +0 -5
- package/node_modules/axios/dist/axios.min.js.map +0 -1
- package/node_modules/axios/dist/browser/axios.cjs +0 -4273
- package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
- package/node_modules/axios/dist/esm/axios.js +0 -4293
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/dist/esm/axios.min.js +0 -3
- package/node_modules/axios/dist/esm/axios.min.js.map +0 -1
- package/node_modules/axios/dist/node/axios.cjs +0 -4811
- package/node_modules/axios/dist/node/axios.cjs.map +0 -1
- package/node_modules/axios/index.d.cts +0 -716
- package/node_modules/axios/index.d.ts +0 -810
- package/node_modules/axios/index.js +0 -43
- package/node_modules/axios/lib/adapters/README.md +0 -36
- package/node_modules/axios/lib/adapters/adapters.js +0 -130
- package/node_modules/axios/lib/adapters/fetch.js +0 -338
- package/node_modules/axios/lib/adapters/http.js +0 -954
- package/node_modules/axios/lib/adapters/xhr.js +0 -222
- package/node_modules/axios/lib/axios.js +0 -89
- package/node_modules/axios/lib/cancel/CancelToken.js +0 -135
- package/node_modules/axios/lib/cancel/CanceledError.js +0 -22
- package/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/node_modules/axios/lib/core/Axios.js +0 -277
- package/node_modules/axios/lib/core/AxiosError.js +0 -90
- package/node_modules/axios/lib/core/AxiosHeaders.js +0 -378
- package/node_modules/axios/lib/core/InterceptorManager.js +0 -72
- package/node_modules/axios/lib/core/README.md +0 -8
- package/node_modules/axios/lib/core/buildFullPath.js +0 -22
- package/node_modules/axios/lib/core/dispatchRequest.js +0 -77
- package/node_modules/axios/lib/core/mergeConfig.js +0 -107
- package/node_modules/axios/lib/core/settle.js +0 -31
- package/node_modules/axios/lib/core/transformData.js +0 -28
- package/node_modules/axios/lib/defaults/index.js +0 -172
- package/node_modules/axios/lib/defaults/transitional.js +0 -8
- package/node_modules/axios/lib/env/README.md +0 -3
- package/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/node_modules/axios/lib/env/data.js +0 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -62
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
- package/node_modules/axios/lib/helpers/README.md +0 -7
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
- package/node_modules/axios/lib/helpers/bind.js +0 -14
- package/node_modules/axios/lib/helpers/buildURL.js +0 -66
- package/node_modules/axios/lib/helpers/callbackify.js +0 -18
- package/node_modules/axios/lib/helpers/combineURLs.js +0 -15
- package/node_modules/axios/lib/helpers/composeSignals.js +0 -56
- package/node_modules/axios/lib/helpers/cookies.js +0 -48
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -73
- package/node_modules/axios/lib/helpers/formDataToJSON.js +0 -95
- package/node_modules/axios/lib/helpers/formDataToStream.js +0 -118
- package/node_modules/axios/lib/helpers/fromDataURI.js +0 -53
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
- package/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
- package/node_modules/axios/lib/helpers/null.js +0 -2
- package/node_modules/axios/lib/helpers/parseHeaders.js +0 -69
- package/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
- package/node_modules/axios/lib/helpers/progressEventReducer.js +0 -51
- package/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/axios/lib/helpers/resolveConfig.js +0 -70
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -106
- package/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/node_modules/axios/lib/helpers/spread.js +0 -28
- package/node_modules/axios/lib/helpers/throttle.js +0 -44
- package/node_modules/axios/lib/helpers/toFormData.js +0 -241
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
- package/node_modules/axios/lib/helpers/trackStream.js +0 -89
- package/node_modules/axios/lib/helpers/validator.js +0 -110
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/node_modules/axios/lib/platform/common/utils.js +0 -52
- package/node_modules/axios/lib/platform/index.js +0 -7
- package/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/node/index.js +0 -37
- package/node_modules/axios/lib/utils.js +0 -919
- package/node_modules/axios/package.json +0 -190
- package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
- package/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/node_modules/combined-stream/License +0 -19
- package/node_modules/combined-stream/Readme.md +0 -138
- package/node_modules/combined-stream/lib/combined_stream.js +0 -208
- package/node_modules/combined-stream/package.json +0 -25
- package/node_modules/delayed-stream/.npmignore +0 -1
- package/node_modules/delayed-stream/License +0 -19
- package/node_modules/delayed-stream/Makefile +0 -7
- package/node_modules/delayed-stream/Readme.md +0 -141
- package/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
- package/node_modules/delayed-stream/package.json +0 -27
- package/node_modules/dunder-proto/.eslintrc +0 -5
- package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/node_modules/dunder-proto/.nycrc +0 -13
- package/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/node_modules/dunder-proto/LICENSE +0 -21
- package/node_modules/dunder-proto/README.md +0 -54
- package/node_modules/dunder-proto/get.d.ts +0 -5
- package/node_modules/dunder-proto/get.js +0 -30
- package/node_modules/dunder-proto/package.json +0 -76
- package/node_modules/dunder-proto/set.d.ts +0 -5
- package/node_modules/dunder-proto/set.js +0 -35
- package/node_modules/dunder-proto/test/get.js +0 -34
- package/node_modules/dunder-proto/test/index.js +0 -4
- package/node_modules/dunder-proto/test/set.js +0 -50
- package/node_modules/dunder-proto/tsconfig.json +0 -9
- package/node_modules/es-define-property/.eslintrc +0 -13
- package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/node_modules/es-define-property/.nycrc +0 -9
- package/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/node_modules/es-define-property/LICENSE +0 -21
- package/node_modules/es-define-property/README.md +0 -49
- package/node_modules/es-define-property/index.d.ts +0 -3
- package/node_modules/es-define-property/index.js +0 -14
- package/node_modules/es-define-property/package.json +0 -81
- package/node_modules/es-define-property/test/index.js +0 -56
- package/node_modules/es-define-property/tsconfig.json +0 -10
- package/node_modules/es-errors/.eslintrc +0 -5
- package/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/node_modules/es-errors/CHANGELOG.md +0 -40
- package/node_modules/es-errors/LICENSE +0 -21
- package/node_modules/es-errors/README.md +0 -55
- package/node_modules/es-errors/eval.d.ts +0 -3
- package/node_modules/es-errors/eval.js +0 -4
- package/node_modules/es-errors/index.d.ts +0 -3
- package/node_modules/es-errors/index.js +0 -4
- package/node_modules/es-errors/package.json +0 -80
- package/node_modules/es-errors/range.d.ts +0 -3
- package/node_modules/es-errors/range.js +0 -4
- package/node_modules/es-errors/ref.d.ts +0 -3
- package/node_modules/es-errors/ref.js +0 -4
- package/node_modules/es-errors/syntax.d.ts +0 -3
- package/node_modules/es-errors/syntax.js +0 -4
- package/node_modules/es-errors/test/index.js +0 -19
- package/node_modules/es-errors/tsconfig.json +0 -49
- package/node_modules/es-errors/type.d.ts +0 -3
- package/node_modules/es-errors/type.js +0 -4
- package/node_modules/es-errors/uri.d.ts +0 -3
- package/node_modules/es-errors/uri.js +0 -4
- package/node_modules/es-object-atoms/.eslintrc +0 -16
- package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/node_modules/es-object-atoms/CHANGELOG.md +0 -37
- package/node_modules/es-object-atoms/LICENSE +0 -21
- package/node_modules/es-object-atoms/README.md +0 -63
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/node_modules/es-object-atoms/ToObject.js +0 -10
- package/node_modules/es-object-atoms/index.d.ts +0 -3
- package/node_modules/es-object-atoms/index.js +0 -4
- package/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/node_modules/es-object-atoms/isObject.js +0 -6
- package/node_modules/es-object-atoms/package.json +0 -80
- package/node_modules/es-object-atoms/test/index.js +0 -38
- package/node_modules/es-object-atoms/tsconfig.json +0 -6
- package/node_modules/es-set-tostringtag/.eslintrc +0 -13
- package/node_modules/es-set-tostringtag/.nycrc +0 -9
- package/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
- package/node_modules/es-set-tostringtag/LICENSE +0 -21
- package/node_modules/es-set-tostringtag/README.md +0 -53
- package/node_modules/es-set-tostringtag/index.d.ts +0 -10
- package/node_modules/es-set-tostringtag/index.js +0 -35
- package/node_modules/es-set-tostringtag/package.json +0 -78
- package/node_modules/es-set-tostringtag/test/index.js +0 -85
- package/node_modules/es-set-tostringtag/tsconfig.json +0 -9
- package/node_modules/follow-redirects/LICENSE +0 -18
- package/node_modules/follow-redirects/README.md +0 -155
- package/node_modules/follow-redirects/debug.js +0 -15
- package/node_modules/follow-redirects/http.js +0 -1
- package/node_modules/follow-redirects/https.js +0 -1
- package/node_modules/follow-redirects/index.js +0 -686
- package/node_modules/follow-redirects/package.json +0 -58
- package/node_modules/form-data/CHANGELOG.md +0 -659
- package/node_modules/form-data/License +0 -19
- package/node_modules/form-data/README.md +0 -355
- package/node_modules/form-data/index.d.ts +0 -62
- package/node_modules/form-data/lib/browser.js +0 -4
- package/node_modules/form-data/lib/form_data.js +0 -494
- package/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/form-data/package.json +0 -82
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/get-intrinsic/.eslintrc +0 -42
- package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/node_modules/get-intrinsic/.nycrc +0 -9
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/node_modules/get-intrinsic/LICENSE +0 -21
- package/node_modules/get-intrinsic/README.md +0 -71
- package/node_modules/get-intrinsic/index.js +0 -378
- package/node_modules/get-intrinsic/package.json +0 -97
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/get-proto/.eslintrc +0 -10
- package/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/node_modules/get-proto/.nycrc +0 -9
- package/node_modules/get-proto/CHANGELOG.md +0 -21
- package/node_modules/get-proto/LICENSE +0 -21
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/node_modules/get-proto/README.md +0 -50
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/node_modules/get-proto/index.d.ts +0 -5
- package/node_modules/get-proto/index.js +0 -27
- package/node_modules/get-proto/package.json +0 -81
- package/node_modules/get-proto/test/index.js +0 -68
- package/node_modules/get-proto/tsconfig.json +0 -9
- package/node_modules/gopd/.eslintrc +0 -16
- package/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/node_modules/gopd/CHANGELOG.md +0 -45
- package/node_modules/gopd/LICENSE +0 -21
- package/node_modules/gopd/README.md +0 -40
- package/node_modules/gopd/gOPD.d.ts +0 -1
- package/node_modules/gopd/gOPD.js +0 -4
- package/node_modules/gopd/index.d.ts +0 -5
- package/node_modules/gopd/index.js +0 -15
- package/node_modules/gopd/package.json +0 -77
- package/node_modules/gopd/test/index.js +0 -36
- package/node_modules/gopd/tsconfig.json +0 -9
- package/node_modules/has-symbols/.eslintrc +0 -11
- package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/node_modules/has-symbols/.nycrc +0 -9
- package/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.d.ts +0 -3
- package/node_modules/has-symbols/index.js +0 -14
- package/node_modules/has-symbols/package.json +0 -111
- package/node_modules/has-symbols/shams.d.ts +0 -3
- package/node_modules/has-symbols/shams.js +0 -45
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/node_modules/has-symbols/test/tests.js +0 -58
- package/node_modules/has-symbols/tsconfig.json +0 -10
- package/node_modules/has-tostringtag/.eslintrc +0 -5
- package/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
- package/node_modules/has-tostringtag/.nycrc +0 -13
- package/node_modules/has-tostringtag/CHANGELOG.md +0 -42
- package/node_modules/has-tostringtag/LICENSE +0 -21
- package/node_modules/has-tostringtag/README.md +0 -46
- package/node_modules/has-tostringtag/index.d.ts +0 -3
- package/node_modules/has-tostringtag/index.js +0 -8
- package/node_modules/has-tostringtag/package.json +0 -108
- package/node_modules/has-tostringtag/shams.d.ts +0 -3
- package/node_modules/has-tostringtag/shams.js +0 -8
- package/node_modules/has-tostringtag/test/index.js +0 -21
- package/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
- package/node_modules/has-tostringtag/test/tests.js +0 -15
- package/node_modules/has-tostringtag/tsconfig.json +0 -49
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -40
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -92
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/math-intrinsics/.eslintrc +0 -16
- package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/node_modules/math-intrinsics/LICENSE +0 -21
- package/node_modules/math-intrinsics/README.md +0 -50
- package/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/node_modules/math-intrinsics/abs.js +0 -4
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/node_modules/math-intrinsics/floor.js +0 -4
- package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/node_modules/math-intrinsics/isFinite.js +0 -12
- package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/isInteger.js +0 -16
- package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/node_modules/math-intrinsics/isNaN.js +0 -6
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/node_modules/math-intrinsics/max.d.ts +0 -1
- package/node_modules/math-intrinsics/max.js +0 -4
- package/node_modules/math-intrinsics/min.d.ts +0 -1
- package/node_modules/math-intrinsics/min.js +0 -4
- package/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/node_modules/math-intrinsics/mod.js +0 -9
- package/node_modules/math-intrinsics/package.json +0 -86
- package/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/node_modules/math-intrinsics/pow.js +0 -4
- package/node_modules/math-intrinsics/round.d.ts +0 -1
- package/node_modules/math-intrinsics/round.js +0 -4
- package/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/node_modules/math-intrinsics/sign.js +0 -11
- package/node_modules/math-intrinsics/test/index.js +0 -192
- package/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/node_modules/mime-db/HISTORY.md +0 -507
- package/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/mime-db/README.md +0 -100
- package/node_modules/mime-db/db.json +0 -8519
- package/node_modules/mime-db/index.js +0 -12
- package/node_modules/mime-db/package.json +0 -60
- package/node_modules/mime-types/HISTORY.md +0 -397
- package/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/mime-types/README.md +0 -113
- package/node_modules/mime-types/index.js +0 -188
- package/node_modules/mime-types/package.json +0 -44
- package/node_modules/proxy-from-env/LICENSE +0 -20
- package/node_modules/proxy-from-env/README.md +0 -163
- package/node_modules/proxy-from-env/index.cjs +0 -105
- package/node_modules/proxy-from-env/index.js +0 -103
- package/node_modules/proxy-from-env/package.json +0 -43
- package/node_modules/retry/License +0 -21
- package/node_modules/retry/README.md +0 -227
- package/node_modules/retry/example/dns.js +0 -31
- package/node_modules/retry/example/stop.js +0 -40
- package/node_modules/retry/index.js +0 -1
- package/node_modules/retry/lib/retry.js +0 -100
- package/node_modules/retry/lib/retry_operation.js +0 -162
- package/node_modules/retry/package.json +0 -36
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import platform from '../platform/index.js';
|
|
2
|
-
import utils from '../utils.js';
|
|
3
|
-
import isURLSameOrigin from './isURLSameOrigin.js';
|
|
4
|
-
import cookies from './cookies.js';
|
|
5
|
-
import buildFullPath from '../core/buildFullPath.js';
|
|
6
|
-
import mergeConfig from '../core/mergeConfig.js';
|
|
7
|
-
import AxiosHeaders from '../core/AxiosHeaders.js';
|
|
8
|
-
import buildURL from './buildURL.js';
|
|
9
|
-
|
|
10
|
-
export default (config) => {
|
|
11
|
-
const newConfig = mergeConfig({}, config);
|
|
12
|
-
|
|
13
|
-
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
14
|
-
|
|
15
|
-
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
16
|
-
|
|
17
|
-
newConfig.url = buildURL(
|
|
18
|
-
buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
19
|
-
config.params,
|
|
20
|
-
config.paramsSerializer
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
// HTTP basic authentication
|
|
24
|
-
if (auth) {
|
|
25
|
-
headers.set(
|
|
26
|
-
'Authorization',
|
|
27
|
-
'Basic ' +
|
|
28
|
-
btoa(
|
|
29
|
-
(auth.username || '') +
|
|
30
|
-
':' +
|
|
31
|
-
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (utils.isFormData(data)) {
|
|
37
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
38
|
-
headers.setContentType(undefined); // browser handles it
|
|
39
|
-
} else if (utils.isFunction(data.getHeaders)) {
|
|
40
|
-
// Node.js FormData (like form-data package)
|
|
41
|
-
const formHeaders = data.getHeaders();
|
|
42
|
-
// Only set safe headers to avoid overwriting security headers
|
|
43
|
-
const allowedHeaders = ['content-type', 'content-length'];
|
|
44
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
45
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
46
|
-
headers.set(key, val);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Add xsrf header
|
|
53
|
-
// This is only done if running in a standard browser environment.
|
|
54
|
-
// Specifically not if we're in a web worker, or react-native.
|
|
55
|
-
|
|
56
|
-
if (platform.hasStandardBrowserEnv) {
|
|
57
|
-
withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
58
|
-
|
|
59
|
-
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
|
|
60
|
-
// Add xsrf header
|
|
61
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
62
|
-
|
|
63
|
-
if (xsrfValue) {
|
|
64
|
-
headers.set(xsrfHeaderName, xsrfValue);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return newConfig;
|
|
70
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const DEFAULT_PORTS = {
|
|
2
|
-
http: 80,
|
|
3
|
-
https: 443,
|
|
4
|
-
ws: 80,
|
|
5
|
-
wss: 443,
|
|
6
|
-
ftp: 21,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const parseNoProxyEntry = (entry) => {
|
|
10
|
-
let entryHost = entry;
|
|
11
|
-
let entryPort = 0;
|
|
12
|
-
|
|
13
|
-
if (entryHost.charAt(0) === '[') {
|
|
14
|
-
const bracketIndex = entryHost.indexOf(']');
|
|
15
|
-
|
|
16
|
-
if (bracketIndex !== -1) {
|
|
17
|
-
const host = entryHost.slice(1, bracketIndex);
|
|
18
|
-
const rest = entryHost.slice(bracketIndex + 1);
|
|
19
|
-
|
|
20
|
-
if (rest.charAt(0) === ':' && /^\d+$/.test(rest.slice(1))) {
|
|
21
|
-
entryPort = Number.parseInt(rest.slice(1), 10);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return [host, entryPort];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const firstColon = entryHost.indexOf(':');
|
|
29
|
-
const lastColon = entryHost.lastIndexOf(':');
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
firstColon !== -1 &&
|
|
33
|
-
firstColon === lastColon &&
|
|
34
|
-
/^\d+$/.test(entryHost.slice(lastColon + 1))
|
|
35
|
-
) {
|
|
36
|
-
entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
|
|
37
|
-
entryHost = entryHost.slice(0, lastColon);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return [entryHost, entryPort];
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const normalizeNoProxyHost = (hostname) => {
|
|
44
|
-
if (!hostname) {
|
|
45
|
-
return hostname;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') {
|
|
49
|
-
hostname = hostname.slice(1, -1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return hostname.replace(/\.+$/, '');
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default function shouldBypassProxy(location) {
|
|
56
|
-
let parsed;
|
|
57
|
-
|
|
58
|
-
try {
|
|
59
|
-
parsed = new URL(location);
|
|
60
|
-
} catch (_err) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || '').toLowerCase();
|
|
65
|
-
|
|
66
|
-
if (!noProxy) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (noProxy === '*') {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const port =
|
|
75
|
-
Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0;
|
|
76
|
-
|
|
77
|
-
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
78
|
-
|
|
79
|
-
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
80
|
-
if (!entry) {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
85
|
-
|
|
86
|
-
entryHost = normalizeNoProxyHost(entryHost);
|
|
87
|
-
|
|
88
|
-
if (!entryHost) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (entryPort && entryPort !== port) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (entryHost.charAt(0) === '*') {
|
|
97
|
-
entryHost = entryHost.slice(1);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (entryHost.charAt(0) === '.') {
|
|
101
|
-
return hostname.endsWith(entryHost);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return hostname === entryHost;
|
|
105
|
-
});
|
|
106
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Calculate data maxRate
|
|
5
|
-
* @param {Number} [samplesCount= 10]
|
|
6
|
-
* @param {Number} [min= 1000]
|
|
7
|
-
* @returns {Function}
|
|
8
|
-
*/
|
|
9
|
-
function speedometer(samplesCount, min) {
|
|
10
|
-
samplesCount = samplesCount || 10;
|
|
11
|
-
const bytes = new Array(samplesCount);
|
|
12
|
-
const timestamps = new Array(samplesCount);
|
|
13
|
-
let head = 0;
|
|
14
|
-
let tail = 0;
|
|
15
|
-
let firstSampleTS;
|
|
16
|
-
|
|
17
|
-
min = min !== undefined ? min : 1000;
|
|
18
|
-
|
|
19
|
-
return function push(chunkLength) {
|
|
20
|
-
const now = Date.now();
|
|
21
|
-
|
|
22
|
-
const startedAt = timestamps[tail];
|
|
23
|
-
|
|
24
|
-
if (!firstSampleTS) {
|
|
25
|
-
firstSampleTS = now;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
bytes[head] = chunkLength;
|
|
29
|
-
timestamps[head] = now;
|
|
30
|
-
|
|
31
|
-
let i = tail;
|
|
32
|
-
let bytesCount = 0;
|
|
33
|
-
|
|
34
|
-
while (i !== head) {
|
|
35
|
-
bytesCount += bytes[i++];
|
|
36
|
-
i = i % samplesCount;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
head = (head + 1) % samplesCount;
|
|
40
|
-
|
|
41
|
-
if (head === tail) {
|
|
42
|
-
tail = (tail + 1) % samplesCount;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (now - firstSampleTS < min) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const passed = startedAt && now - startedAt;
|
|
50
|
-
|
|
51
|
-
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default speedometer;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
5
|
-
*
|
|
6
|
-
* Common use case would be to use `Function.prototype.apply`.
|
|
7
|
-
*
|
|
8
|
-
* ```js
|
|
9
|
-
* function f(x, y, z) {}
|
|
10
|
-
* const args = [1, 2, 3];
|
|
11
|
-
* f.apply(null, args);
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* With `spread` this example can be re-written.
|
|
15
|
-
*
|
|
16
|
-
* ```js
|
|
17
|
-
* spread(function(x, y, z) {})([1, 2, 3]);
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @param {Function} callback
|
|
21
|
-
*
|
|
22
|
-
* @returns {Function}
|
|
23
|
-
*/
|
|
24
|
-
export default function spread(callback) {
|
|
25
|
-
return function wrap(arr) {
|
|
26
|
-
return callback.apply(null, arr);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Throttle decorator
|
|
3
|
-
* @param {Function} fn
|
|
4
|
-
* @param {Number} freq
|
|
5
|
-
* @return {Function}
|
|
6
|
-
*/
|
|
7
|
-
function throttle(fn, freq) {
|
|
8
|
-
let timestamp = 0;
|
|
9
|
-
let threshold = 1000 / freq;
|
|
10
|
-
let lastArgs;
|
|
11
|
-
let timer;
|
|
12
|
-
|
|
13
|
-
const invoke = (args, now = Date.now()) => {
|
|
14
|
-
timestamp = now;
|
|
15
|
-
lastArgs = null;
|
|
16
|
-
if (timer) {
|
|
17
|
-
clearTimeout(timer);
|
|
18
|
-
timer = null;
|
|
19
|
-
}
|
|
20
|
-
fn(...args);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const throttled = (...args) => {
|
|
24
|
-
const now = Date.now();
|
|
25
|
-
const passed = now - timestamp;
|
|
26
|
-
if (passed >= threshold) {
|
|
27
|
-
invoke(args, now);
|
|
28
|
-
} else {
|
|
29
|
-
lastArgs = args;
|
|
30
|
-
if (!timer) {
|
|
31
|
-
timer = setTimeout(() => {
|
|
32
|
-
timer = null;
|
|
33
|
-
invoke(lastArgs);
|
|
34
|
-
}, threshold - passed);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const flush = () => lastArgs && invoke(lastArgs);
|
|
40
|
-
|
|
41
|
-
return [throttled, flush];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default throttle;
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import utils from '../utils.js';
|
|
4
|
-
import AxiosError from '../core/AxiosError.js';
|
|
5
|
-
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
6
|
-
import PlatformFormData from '../platform/node/classes/FormData.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Determines if the given thing is a array or js object.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} thing - The object or array to be visited.
|
|
12
|
-
*
|
|
13
|
-
* @returns {boolean}
|
|
14
|
-
*/
|
|
15
|
-
function isVisitable(thing) {
|
|
16
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* It removes the brackets from the end of a string
|
|
21
|
-
*
|
|
22
|
-
* @param {string} key - The key of the parameter.
|
|
23
|
-
*
|
|
24
|
-
* @returns {string} the key without the brackets.
|
|
25
|
-
*/
|
|
26
|
-
function removeBrackets(key) {
|
|
27
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* It takes a path, a key, and a boolean, and returns a string
|
|
32
|
-
*
|
|
33
|
-
* @param {string} path - The path to the current key.
|
|
34
|
-
* @param {string} key - The key of the current object being iterated over.
|
|
35
|
-
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
36
|
-
*
|
|
37
|
-
* @returns {string} The path to the current key.
|
|
38
|
-
*/
|
|
39
|
-
function renderKey(path, key, dots) {
|
|
40
|
-
if (!path) return key;
|
|
41
|
-
return path
|
|
42
|
-
.concat(key)
|
|
43
|
-
.map(function each(token, i) {
|
|
44
|
-
// eslint-disable-next-line no-param-reassign
|
|
45
|
-
token = removeBrackets(token);
|
|
46
|
-
return !dots && i ? '[' + token + ']' : token;
|
|
47
|
-
})
|
|
48
|
-
.join(dots ? '.' : '');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
53
|
-
*
|
|
54
|
-
* @param {Array<any>} arr - The array to check
|
|
55
|
-
*
|
|
56
|
-
* @returns {boolean}
|
|
57
|
-
*/
|
|
58
|
-
function isFlatArray(arr) {
|
|
59
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
63
|
-
return /^is[A-Z]/.test(prop);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Convert a data object to FormData
|
|
68
|
-
*
|
|
69
|
-
* @param {Object} obj
|
|
70
|
-
* @param {?Object} [formData]
|
|
71
|
-
* @param {?Object} [options]
|
|
72
|
-
* @param {Function} [options.visitor]
|
|
73
|
-
* @param {Boolean} [options.metaTokens = true]
|
|
74
|
-
* @param {Boolean} [options.dots = false]
|
|
75
|
-
* @param {?Boolean} [options.indexes = false]
|
|
76
|
-
*
|
|
77
|
-
* @returns {Object}
|
|
78
|
-
**/
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* It converts an object into a FormData object
|
|
82
|
-
*
|
|
83
|
-
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
84
|
-
* @param {string} formData - The FormData object to append to.
|
|
85
|
-
* @param {Object<string, any>} options
|
|
86
|
-
*
|
|
87
|
-
* @returns
|
|
88
|
-
*/
|
|
89
|
-
function toFormData(obj, formData, options) {
|
|
90
|
-
if (!utils.isObject(obj)) {
|
|
91
|
-
throw new TypeError('target must be an object');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// eslint-disable-next-line no-param-reassign
|
|
95
|
-
formData = formData || new (PlatformFormData || FormData)();
|
|
96
|
-
|
|
97
|
-
// eslint-disable-next-line no-param-reassign
|
|
98
|
-
options = utils.toFlatObject(
|
|
99
|
-
options,
|
|
100
|
-
{
|
|
101
|
-
metaTokens: true,
|
|
102
|
-
dots: false,
|
|
103
|
-
indexes: false,
|
|
104
|
-
},
|
|
105
|
-
false,
|
|
106
|
-
function defined(option, source) {
|
|
107
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
108
|
-
return !utils.isUndefined(source[option]);
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
const metaTokens = options.metaTokens;
|
|
113
|
-
// eslint-disable-next-line no-use-before-define
|
|
114
|
-
const visitor = options.visitor || defaultVisitor;
|
|
115
|
-
const dots = options.dots;
|
|
116
|
-
const indexes = options.indexes;
|
|
117
|
-
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
118
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
119
|
-
|
|
120
|
-
if (!utils.isFunction(visitor)) {
|
|
121
|
-
throw new TypeError('visitor must be a function');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function convertValue(value) {
|
|
125
|
-
if (value === null) return '';
|
|
126
|
-
|
|
127
|
-
if (utils.isDate(value)) {
|
|
128
|
-
return value.toISOString();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (utils.isBoolean(value)) {
|
|
132
|
-
return value.toString();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
136
|
-
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
140
|
-
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return value;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Default visitor.
|
|
148
|
-
*
|
|
149
|
-
* @param {*} value
|
|
150
|
-
* @param {String|Number} key
|
|
151
|
-
* @param {Array<String|Number>} path
|
|
152
|
-
* @this {FormData}
|
|
153
|
-
*
|
|
154
|
-
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
155
|
-
*/
|
|
156
|
-
function defaultVisitor(value, key, path) {
|
|
157
|
-
let arr = value;
|
|
158
|
-
|
|
159
|
-
if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {
|
|
160
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (value && !path && typeof value === 'object') {
|
|
165
|
-
if (utils.endsWith(key, '{}')) {
|
|
166
|
-
// eslint-disable-next-line no-param-reassign
|
|
167
|
-
key = metaTokens ? key : key.slice(0, -2);
|
|
168
|
-
// eslint-disable-next-line no-param-reassign
|
|
169
|
-
value = JSON.stringify(value);
|
|
170
|
-
} else if (
|
|
171
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
|
172
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))
|
|
173
|
-
) {
|
|
174
|
-
// eslint-disable-next-line no-param-reassign
|
|
175
|
-
key = removeBrackets(key);
|
|
176
|
-
|
|
177
|
-
arr.forEach(function each(el, index) {
|
|
178
|
-
!(utils.isUndefined(el) || el === null) &&
|
|
179
|
-
formData.append(
|
|
180
|
-
// eslint-disable-next-line no-nested-ternary
|
|
181
|
-
indexes === true
|
|
182
|
-
? renderKey([key], index, dots)
|
|
183
|
-
: indexes === null
|
|
184
|
-
? key
|
|
185
|
-
: key + '[]',
|
|
186
|
-
convertValue(el)
|
|
187
|
-
);
|
|
188
|
-
});
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if (isVisitable(value)) {
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
198
|
-
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const stack = [];
|
|
203
|
-
|
|
204
|
-
const exposedHelpers = Object.assign(predicates, {
|
|
205
|
-
defaultVisitor,
|
|
206
|
-
convertValue,
|
|
207
|
-
isVisitable,
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
function build(value, path) {
|
|
211
|
-
if (utils.isUndefined(value)) return;
|
|
212
|
-
|
|
213
|
-
if (stack.indexOf(value) !== -1) {
|
|
214
|
-
throw Error('Circular reference detected in ' + path.join('.'));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
stack.push(value);
|
|
218
|
-
|
|
219
|
-
utils.forEach(value, function each(el, key) {
|
|
220
|
-
const result =
|
|
221
|
-
!(utils.isUndefined(el) || el === null) &&
|
|
222
|
-
visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
223
|
-
|
|
224
|
-
if (result === true) {
|
|
225
|
-
build(el, path ? path.concat(key) : [key]);
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
stack.pop();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (!utils.isObject(obj)) {
|
|
233
|
-
throw new TypeError('data must be an object');
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
build(obj);
|
|
237
|
-
|
|
238
|
-
return formData;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export default toFormData;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import utils from '../utils.js';
|
|
4
|
-
import toFormData from './toFormData.js';
|
|
5
|
-
import platform from '../platform/index.js';
|
|
6
|
-
|
|
7
|
-
export default function toURLEncodedForm(data, options) {
|
|
8
|
-
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
9
|
-
visitor: function (value, key, path, helpers) {
|
|
10
|
-
if (platform.isNode && utils.isBuffer(value)) {
|
|
11
|
-
this.append(key, value.toString('base64'));
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return helpers.defaultVisitor.apply(this, arguments);
|
|
16
|
-
},
|
|
17
|
-
...options,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export const streamChunk = function* (chunk, chunkSize) {
|
|
2
|
-
let len = chunk.byteLength;
|
|
3
|
-
|
|
4
|
-
if (!chunkSize || len < chunkSize) {
|
|
5
|
-
yield chunk;
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let pos = 0;
|
|
10
|
-
let end;
|
|
11
|
-
|
|
12
|
-
while (pos < len) {
|
|
13
|
-
end = pos + chunkSize;
|
|
14
|
-
yield chunk.slice(pos, end);
|
|
15
|
-
pos = end;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const readBytes = async function* (iterable, chunkSize) {
|
|
20
|
-
for await (const chunk of readStream(iterable)) {
|
|
21
|
-
yield* streamChunk(chunk, chunkSize);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const readStream = async function* (stream) {
|
|
26
|
-
if (stream[Symbol.asyncIterator]) {
|
|
27
|
-
yield* stream;
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const reader = stream.getReader();
|
|
32
|
-
try {
|
|
33
|
-
for (;;) {
|
|
34
|
-
const { done, value } = await reader.read();
|
|
35
|
-
if (done) {
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
yield value;
|
|
39
|
-
}
|
|
40
|
-
} finally {
|
|
41
|
-
await reader.cancel();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
46
|
-
const iterator = readBytes(stream, chunkSize);
|
|
47
|
-
|
|
48
|
-
let bytes = 0;
|
|
49
|
-
let done;
|
|
50
|
-
let _onFinish = (e) => {
|
|
51
|
-
if (!done) {
|
|
52
|
-
done = true;
|
|
53
|
-
onFinish && onFinish(e);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return new ReadableStream(
|
|
58
|
-
{
|
|
59
|
-
async pull(controller) {
|
|
60
|
-
try {
|
|
61
|
-
const { done, value } = await iterator.next();
|
|
62
|
-
|
|
63
|
-
if (done) {
|
|
64
|
-
_onFinish();
|
|
65
|
-
controller.close();
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
let len = value.byteLength;
|
|
70
|
-
if (onProgress) {
|
|
71
|
-
let loadedBytes = (bytes += len);
|
|
72
|
-
onProgress(loadedBytes);
|
|
73
|
-
}
|
|
74
|
-
controller.enqueue(new Uint8Array(value));
|
|
75
|
-
} catch (err) {
|
|
76
|
-
_onFinish(err);
|
|
77
|
-
throw err;
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
cancel(reason) {
|
|
81
|
-
_onFinish(reason);
|
|
82
|
-
return iterator.return();
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
highWaterMark: 2,
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
};
|