@corellium/corellium-cli 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.gitlab-ci.yml +32 -1
- package/ci/gitlab-build.sh +1 -1
- package/coverage/cobertura-coverage.xml +9 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +0 -0
- package/index.js +2 -0
- package/package.json +62 -64
- package/src/clients/Instance.js +4 -0
- package/src/commands/extensions/delete.js +2 -1
- package/src/commands/extensions/list.js +3 -2
- package/src/commands/firmware/list.js +3 -2
- package/src/commands/images/create.js +2 -2
- package/src/commands/images/delete.js +1 -0
- package/src/commands/images/list.js +3 -2
- package/src/commands/index.js +0 -2
- package/src/commands/{agent → instances}/apps/index.js +3 -3
- package/src/commands/instances/create.js +9 -3
- package/src/commands/{agent → instances}/file.js +2 -2
- package/src/commands/instances/index.js +6 -1
- package/src/commands/instances/input.js +52 -0
- package/src/commands/instances/list.js +3 -2
- package/src/commands/instances/upgrade.js +2 -2
- package/src/commands/projects/create.js +2 -2
- package/src/commands/projects/delete.js +2 -1
- package/src/commands/projects/list.js +3 -2
- package/src/commands/webplayer/create.js +2 -2
- package/src/commands/webplayer/list.js +2 -2
- package/src/error.js +12 -6
- package/src/table.js +1 -1
- package/src/utils.js +19 -40
- package/node_modules/@babel/cli/LICENSE +0 -22
- package/node_modules/@babel/cli/README.md +0 -19
- package/node_modules/@babel/cli/bin/babel-external-helpers.js +0 -3
- package/node_modules/@babel/cli/bin/babel.js +0 -3
- package/node_modules/@babel/cli/index.js +0 -1
- package/node_modules/@babel/cli/lib/babel/dir.js +0 -285
- package/node_modules/@babel/cli/lib/babel/file.js +0 -273
- package/node_modules/@babel/cli/lib/babel/index.js +0 -20
- package/node_modules/@babel/cli/lib/babel/options.js +0 -285
- package/node_modules/@babel/cli/lib/babel/util.js +0 -181
- package/node_modules/@babel/cli/lib/babel/watcher.js +0 -162
- package/node_modules/@babel/cli/lib/babel-external-helpers.js +0 -43
- package/node_modules/@babel/cli/node_modules/commander/CHANGELOG.md +0 -436
- package/node_modules/@babel/cli/node_modules/commander/LICENSE +0 -22
- package/node_modules/@babel/cli/node_modules/commander/Readme.md +0 -713
- package/node_modules/@babel/cli/node_modules/commander/index.js +0 -1649
- package/node_modules/@babel/cli/node_modules/commander/package.json +0 -76
- package/node_modules/@babel/cli/node_modules/commander/typings/index.d.ts +0 -311
- package/node_modules/@babel/cli/node_modules/make-dir/index.d.ts +0 -39
- package/node_modules/@babel/cli/node_modules/make-dir/index.js +0 -139
- package/node_modules/@babel/cli/node_modules/make-dir/license +0 -9
- package/node_modules/@babel/cli/node_modules/make-dir/package.json +0 -94
- package/node_modules/@babel/cli/node_modules/make-dir/readme.md +0 -123
- package/node_modules/@babel/cli/node_modules/pify/index.js +0 -68
- package/node_modules/@babel/cli/node_modules/pify/license +0 -9
- package/node_modules/@babel/cli/node_modules/pify/package.json +0 -86
- package/node_modules/@babel/cli/node_modules/pify/readme.md +0 -145
- package/node_modules/@babel/cli/node_modules/semver/CHANGELOG.md +0 -39
- package/node_modules/@babel/cli/node_modules/semver/LICENSE +0 -15
- package/node_modules/@babel/cli/node_modules/semver/README.md +0 -412
- package/node_modules/@babel/cli/node_modules/semver/bin/semver +0 -160
- package/node_modules/@babel/cli/node_modules/semver/package.json +0 -63
- package/node_modules/@babel/cli/node_modules/semver/range.bnf +0 -16
- package/node_modules/@babel/cli/node_modules/semver/semver.js +0 -1483
- package/node_modules/@babel/cli/node_modules/slash/index.js +0 -11
- package/node_modules/@babel/cli/node_modules/slash/license +0 -9
- package/node_modules/@babel/cli/node_modules/slash/package.json +0 -69
- package/node_modules/@babel/cli/node_modules/slash/readme.md +0 -44
- package/node_modules/@babel/cli/package.json +0 -91
- package/node_modules/@corellium/client-api/README.md +0 -209
- package/node_modules/@corellium/client-api/dist/ApiClient.js +0 -780
- package/node_modules/@corellium/client-api/dist/api/CorelliumApi.js +0 -1744
- package/node_modules/@corellium/client-api/dist/index.js +0 -295
- package/node_modules/@corellium/client-api/dist/model/ApiConflictError.js +0 -114
- package/node_modules/@corellium/client-api/dist/model/ApiError.js +0 -101
- package/node_modules/@corellium/client-api/dist/model/ApiNotFoundError.js +0 -111
- package/node_modules/@corellium/client-api/dist/model/ApiToken.js +0 -78
- package/node_modules/@corellium/client-api/dist/model/Bit.js +0 -50
- package/node_modules/@corellium/client-api/dist/model/Credentials.js +0 -91
- package/node_modules/@corellium/client-api/dist/model/Firmware.js +0 -208
- package/node_modules/@corellium/client-api/dist/model/GpioStateDefinition.js +0 -93
- package/node_modules/@corellium/client-api/dist/model/Image.js +0 -249
- package/node_modules/@corellium/client-api/dist/model/Instance.js +0 -313
- package/node_modules/@corellium/client-api/dist/model/InstanceBootOptions.js +0 -134
- package/node_modules/@corellium/client-api/dist/model/InstanceConsoleEndpoint.js +0 -76
- package/node_modules/@corellium/client-api/dist/model/InstanceCreateOptions.js +0 -224
- package/node_modules/@corellium/client-api/dist/model/InstanceNetmonState.js +0 -75
- package/node_modules/@corellium/client-api/dist/model/InstanceReturn.js +0 -92
- package/node_modules/@corellium/client-api/dist/model/InstanceServices.js +0 -77
- package/node_modules/@corellium/client-api/dist/model/InstanceStartOptions.js +0 -76
- package/node_modules/@corellium/client-api/dist/model/InstanceState.js +0 -64
- package/node_modules/@corellium/client-api/dist/model/InstanceStopOptions.js +0 -76
- package/node_modules/@corellium/client-api/dist/model/Model.js +0 -165
- package/node_modules/@corellium/client-api/dist/model/ModelSoftware.js +0 -122
- package/node_modules/@corellium/client-api/dist/model/PeripheralsData.js +0 -147
- package/node_modules/@corellium/client-api/dist/model/Project.js +0 -122
- package/node_modules/@corellium/client-api/dist/model/ProjectQuota.js +0 -93
- package/node_modules/@corellium/client-api/dist/model/ProjectSettings.js +0 -93
- package/node_modules/@corellium/client-api/dist/model/ProjectUsage.js +0 -102
- package/node_modules/@corellium/client-api/dist/model/Snapshot.js +0 -145
- package/node_modules/@corellium/client-api/dist/model/SnapshotCreationOptions.js +0 -79
- package/node_modules/@corellium/client-api/dist/model/SnapshotStatus.js +0 -84
- package/node_modules/@corellium/client-api/dist/model/Token.js +0 -88
- package/node_modules/@corellium/client-api/dist/model/UserError.js +0 -114
- package/node_modules/@corellium/client-api/dist/model/V1SetStateBody.js +0 -80
- package/node_modules/@corellium/client-api/dist/model/VolumeOptions.js +0 -94
- package/node_modules/@corellium/client-api/dist/model/VpnDefinition.js +0 -84
- package/node_modules/@corellium/client-api/package.json +0 -75
- package/node_modules/@jridgewell/resolve-uri/LICENSE +0 -19
- package/node_modules/@jridgewell/resolve-uri/README.md +0 -40
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +0 -242
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +0 -1
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +0 -250
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +0 -1
- package/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +0 -4
- package/node_modules/@jridgewell/resolve-uri/package.json +0 -108
- package/node_modules/@jridgewell/sourcemap-codec/LICENSE +0 -21
- package/node_modules/@jridgewell/sourcemap-codec/README.md +0 -200
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -164
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +0 -175
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +0 -1
- package/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +0 -6
- package/node_modules/@jridgewell/sourcemap-codec/package.json +0 -110
- package/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +0 -198
- package/node_modules/@jridgewell/trace-mapping/LICENSE +0 -19
- package/node_modules/@jridgewell/trace-mapping/README.md +0 -252
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +0 -518
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +0 -1
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +0 -532
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +0 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +0 -8
- package/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +0 -32
- package/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +0 -7
- package/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +0 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +0 -2
- package/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +0 -16
- package/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +0 -4
- package/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +0 -74
- package/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +0 -85
- package/node_modules/@jridgewell/trace-mapping/package.json +0 -112
- package/node_modules/@jridgewell/trace-mapping/src/any-map.ts +0 -166
- package/node_modules/@jridgewell/trace-mapping/src/binary-search.ts +0 -115
- package/node_modules/@jridgewell/trace-mapping/src/by-source.ts +0 -64
- package/node_modules/@jridgewell/trace-mapping/src/resolve.ts +0 -10
- package/node_modules/@jridgewell/trace-mapping/src/sort.ts +0 -45
- package/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts +0 -23
- package/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts +0 -8
- package/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts +0 -405
- package/node_modules/@jridgewell/trace-mapping/src/types.ts +0 -90
- package/node_modules/@nicolo-ribaudo/chokidar-2/README.md +0 -3
- package/node_modules/@nicolo-ribaudo/chokidar-2/build-chokidar.sh +0 -30
- package/node_modules/@nicolo-ribaudo/chokidar-2/dist/main.js +0 -2086
- package/node_modules/@nicolo-ribaudo/chokidar-2/package.json +0 -73
- package/node_modules/@nicolo-ribaudo/chokidar-2/types.d.ts +0 -191
- package/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/ansi-regex/license +0 -9
- package/node_modules/ansi-regex/package.json +0 -90
- package/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/ansi-styles/index.d.ts +0 -345
- package/node_modules/ansi-styles/index.js +0 -163
- package/node_modules/ansi-styles/license +0 -9
- package/node_modules/ansi-styles/package.json +0 -96
- package/node_modules/ansi-styles/readme.md +0 -152
- package/node_modules/anymatch/LICENSE +0 -15
- package/node_modules/anymatch/README.md +0 -87
- package/node_modules/anymatch/index.d.ts +0 -19
- package/node_modules/anymatch/index.js +0 -104
- package/node_modules/anymatch/package.json +0 -80
- 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 -96
- 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 -943
- package/node_modules/axios/LICENSE +0 -19
- package/node_modules/axios/README.md +0 -991
- package/node_modules/axios/SECURITY.md +0 -5
- package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
- package/node_modules/axios/dist/axios.js +0 -2595
- package/node_modules/axios/dist/axios.map +0 -1
- package/node_modules/axios/dist/axios.min.js +0 -3
- package/node_modules/axios/dist/axios.min.map +0 -1
- package/node_modules/axios/index.d.ts +0 -254
- package/node_modules/axios/index.js +0 -1
- package/node_modules/axios/lib/adapters/README.md +0 -37
- package/node_modules/axios/lib/adapters/http.js +0 -424
- package/node_modules/axios/lib/adapters/xhr.js +0 -222
- package/node_modules/axios/lib/axios.js +0 -64
- package/node_modules/axios/lib/cancel/CancelToken.js +0 -119
- 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 -160
- package/node_modules/axios/lib/core/AxiosError.js +0 -86
- package/node_modules/axios/lib/core/InterceptorManager.js +0 -54
- package/node_modules/axios/lib/core/README.md +0 -8
- package/node_modules/axios/lib/core/buildFullPath.js +0 -20
- package/node_modules/axios/lib/core/dispatchRequest.js +0 -87
- package/node_modules/axios/lib/core/mergeConfig.js +0 -100
- package/node_modules/axios/lib/core/settle.js +0 -25
- package/node_modules/axios/lib/core/transformData.js +0 -22
- package/node_modules/axios/lib/defaults/env/FormData.js +0 -2
- package/node_modules/axios/lib/defaults/index.js +0 -146
- package/node_modules/axios/lib/defaults/transitional.js +0 -7
- package/node_modules/axios/lib/env/README.md +0 -3
- package/node_modules/axios/lib/env/data.js +0 -3
- package/node_modules/axios/lib/helpers/README.md +0 -7
- package/node_modules/axios/lib/helpers/bind.js +0 -11
- package/node_modules/axios/lib/helpers/buildURL.js +0 -70
- package/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- package/node_modules/axios/lib/helpers/cookies.js +0 -53
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- package/node_modules/axios/lib/helpers/isAxiosError.js +0 -13
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/node_modules/axios/lib/helpers/null.js +0 -2
- package/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- package/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
- package/node_modules/axios/lib/helpers/spread.js +0 -27
- package/node_modules/axios/lib/helpers/toFormData.js +0 -72
- package/node_modules/axios/lib/helpers/validator.js +0 -86
- package/node_modules/axios/lib/utils.js +0 -470
- package/node_modules/axios/package.json +0 -117
- package/node_modules/axios/tsconfig.json +0 -14
- package/node_modules/axios/tslint.json +0 -6
- package/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/balanced-match/README.md +0 -97
- package/node_modules/balanced-match/index.js +0 -62
- package/node_modules/balanced-match/package.json +0 -79
- package/node_modules/binary-extensions/binary-extensions.json +0 -260
- package/node_modules/binary-extensions/binary-extensions.json.d.ts +0 -3
- package/node_modules/binary-extensions/index.d.ts +0 -14
- package/node_modules/binary-extensions/index.js +0 -1
- package/node_modules/binary-extensions/license +0 -9
- package/node_modules/binary-extensions/package.json +0 -74
- package/node_modules/binary-extensions/readme.md +0 -41
- package/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/brace-expansion/README.md +0 -129
- package/node_modules/brace-expansion/index.js +0 -201
- package/node_modules/brace-expansion/package.json +0 -78
- package/node_modules/braces/CHANGELOG.md +0 -184
- package/node_modules/braces/LICENSE +0 -21
- package/node_modules/braces/README.md +0 -593
- package/node_modules/braces/index.js +0 -170
- package/node_modules/braces/lib/compile.js +0 -57
- package/node_modules/braces/lib/constants.js +0 -57
- package/node_modules/braces/lib/expand.js +0 -113
- package/node_modules/braces/lib/parse.js +0 -333
- package/node_modules/braces/lib/stringify.js +0 -32
- package/node_modules/braces/lib/utils.js +0 -112
- package/node_modules/braces/package.json +0 -127
- package/node_modules/call-bind/.eslintignore +0 -1
- package/node_modules/call-bind/.eslintrc +0 -17
- package/node_modules/call-bind/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind/.nycrc +0 -13
- package/node_modules/call-bind/CHANGELOG.md +0 -42
- package/node_modules/call-bind/LICENSE +0 -21
- package/node_modules/call-bind/README.md +0 -2
- package/node_modules/call-bind/callBound.js +0 -15
- package/node_modules/call-bind/index.js +0 -47
- package/node_modules/call-bind/package.json +0 -126
- package/node_modules/call-bind/test/callBound.js +0 -55
- package/node_modules/call-bind/test/index.js +0 -66
- package/node_modules/chokidar/LICENSE +0 -21
- package/node_modules/chokidar/README.md +0 -308
- package/node_modules/chokidar/index.js +0 -973
- package/node_modules/chokidar/lib/constants.js +0 -65
- package/node_modules/chokidar/lib/fsevents-handler.js +0 -524
- package/node_modules/chokidar/lib/nodefs-handler.js +0 -654
- package/node_modules/chokidar/package.json +0 -123
- package/node_modules/chokidar/types/index.d.ts +0 -188
- package/node_modules/cliui/CHANGELOG.md +0 -121
- package/node_modules/cliui/LICENSE.txt +0 -14
- package/node_modules/cliui/README.md +0 -141
- package/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/cliui/build/lib/index.js +0 -287
- package/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/cliui/index.mjs +0 -13
- package/node_modules/cliui/package.json +0 -121
- package/node_modules/color-convert/CHANGELOG.md +0 -54
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -839
- package/node_modules/color-convert/index.js +0 -81
- package/node_modules/color-convert/package.json +0 -86
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -60
- 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 -62
- package/node_modules/combined-stream/yarn.lock +0 -17
- package/node_modules/component-emitter/History.md +0 -75
- package/node_modules/component-emitter/LICENSE +0 -24
- package/node_modules/component-emitter/Readme.md +0 -74
- package/node_modules/component-emitter/index.js +0 -175
- package/node_modules/component-emitter/package.json +0 -59
- package/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/concat-map/LICENSE +0 -18
- package/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/concat-map/index.js +0 -13
- package/node_modules/concat-map/package.json +0 -91
- package/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/convert-source-map/LICENSE +0 -23
- package/node_modules/convert-source-map/README.md +0 -120
- package/node_modules/convert-source-map/index.js +0 -136
- package/node_modules/convert-source-map/package.json +0 -75
- package/node_modules/cookiejar/LICENSE +0 -9
- package/node_modules/cookiejar/cookiejar.js +0 -276
- package/node_modules/cookiejar/package.json +0 -58
- package/node_modules/cookiejar/readme.md +0 -60
- package/node_modules/debug/LICENSE +0 -20
- package/node_modules/debug/README.md +0 -481
- package/node_modules/debug/package.json +0 -113
- package/node_modules/debug/src/browser.js +0 -269
- package/node_modules/debug/src/common.js +0 -274
- package/node_modules/debug/src/index.js +0 -10
- package/node_modules/debug/src/node.js +0 -263
- 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 -65
- package/node_modules/dotenv/CHANGELOG.md +0 -356
- package/node_modules/dotenv/LICENSE +0 -23
- package/node_modules/dotenv/README.md +0 -408
- package/node_modules/dotenv/config.d.ts +0 -1
- package/node_modules/dotenv/config.js +0 -9
- package/node_modules/dotenv/lib/cli-options.js +0 -11
- package/node_modules/dotenv/lib/env-options.js +0 -20
- package/node_modules/dotenv/lib/main.d.ts +0 -73
- package/node_modules/dotenv/lib/main.js +0 -109
- package/node_modules/dotenv/package.json +0 -87
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -80
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/escalade/dist/index.js +0 -22
- package/node_modules/escalade/dist/index.mjs +0 -22
- package/node_modules/escalade/index.d.ts +0 -3
- package/node_modules/escalade/license +0 -9
- package/node_modules/escalade/package.json +0 -96
- package/node_modules/escalade/readme.md +0 -211
- package/node_modules/escalade/sync/index.d.ts +0 -2
- package/node_modules/escalade/sync/index.js +0 -18
- package/node_modules/escalade/sync/index.mjs +0 -18
- package/node_modules/fast-safe-stringify/.travis.yml +0 -8
- package/node_modules/fast-safe-stringify/CHANGELOG.md +0 -17
- package/node_modules/fast-safe-stringify/LICENSE +0 -23
- package/node_modules/fast-safe-stringify/benchmark.js +0 -137
- package/node_modules/fast-safe-stringify/index.d.ts +0 -23
- package/node_modules/fast-safe-stringify/index.js +0 -229
- package/node_modules/fast-safe-stringify/package.json +0 -90
- package/node_modules/fast-safe-stringify/readme.md +0 -170
- package/node_modules/fast-safe-stringify/test-stable.js +0 -404
- package/node_modules/fast-safe-stringify/test.js +0 -397
- package/node_modules/fill-range/LICENSE +0 -21
- package/node_modules/fill-range/README.md +0 -237
- package/node_modules/fill-range/index.js +0 -249
- package/node_modules/fill-range/package.json +0 -117
- 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 -598
- package/node_modules/follow-redirects/package.json +0 -98
- package/node_modules/form-data/License +0 -19
- package/node_modules/form-data/README.md.bak +0 -358
- package/node_modules/form-data/Readme.md +0 -358
- package/node_modules/form-data/index.d.ts +0 -62
- package/node_modules/form-data/lib/browser.js +0 -2
- package/node_modules/form-data/lib/form_data.js +0 -501
- package/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/form-data/package.json +0 -104
- package/node_modules/formidable/LICENSE +0 -7
- package/node_modules/formidable/Readme.md +0 -448
- package/node_modules/formidable/lib/file.js +0 -81
- package/node_modules/formidable/lib/incoming_form.js +0 -564
- package/node_modules/formidable/lib/index.js +0 -3
- package/node_modules/formidable/lib/json_parser.js +0 -30
- package/node_modules/formidable/lib/multipart_parser.js +0 -332
- package/node_modules/formidable/lib/octet_parser.js +0 -20
- package/node_modules/formidable/lib/querystring_parser.js +0 -27
- package/node_modules/formidable/package.json +0 -63
- package/node_modules/fs-readdir-recursive/LICENSE +0 -22
- package/node_modules/fs-readdir-recursive/README.md +0 -61
- package/node_modules/fs-readdir-recursive/index.js +0 -29
- package/node_modules/fs-readdir-recursive/package.json +0 -60
- package/node_modules/fs.realpath/LICENSE +0 -43
- package/node_modules/fs.realpath/README.md +0 -33
- package/node_modules/fs.realpath/index.js +0 -66
- package/node_modules/fs.realpath/old.js +0 -303
- package/node_modules/fs.realpath/package.json +0 -62
- package/node_modules/function-bind/.editorconfig +0 -20
- package/node_modules/function-bind/.eslintrc +0 -15
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -48
- package/node_modules/function-bind/implementation.js +0 -52
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -100
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/generate-password/.eslintrc.yml +0 -18
- package/node_modules/generate-password/.github/workflows/nodejs.yml +0 -33
- package/node_modules/generate-password/CHANGELOG.md +0 -79
- package/node_modules/generate-password/LICENSE +0 -21
- package/node_modules/generate-password/README.md +0 -61
- package/node_modules/generate-password/example.js +0 -28
- package/node_modules/generate-password/main.js +0 -1
- package/node_modules/generate-password/package.json +0 -68
- package/node_modules/generate-password/src/generate.d.ts +0 -51
- package/node_modules/generate-password/src/generate.js +0 -152
- package/node_modules/generate-password/test/coverage.sh +0 -17
- package/node_modules/generate-password/test/esm.mjs +0 -13
- package/node_modules/generate-password/test/generator.js +0 -164
- package/node_modules/get-caller-file/LICENSE.md +0 -6
- package/node_modules/get-caller-file/README.md +0 -41
- package/node_modules/get-caller-file/index.d.ts +0 -2
- package/node_modules/get-caller-file/index.js +0 -22
- package/node_modules/get-caller-file/index.js.map +0 -1
- package/node_modules/get-caller-file/package.json +0 -72
- package/node_modules/get-intrinsic/.eslintrc +0 -37
- 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 -91
- 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 -334
- package/node_modules/get-intrinsic/package.json +0 -125
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/glob/LICENSE +0 -21
- package/node_modules/glob/README.md +0 -378
- package/node_modules/glob/common.js +0 -238
- package/node_modules/glob/glob.js +0 -790
- package/node_modules/glob/package.json +0 -93
- package/node_modules/glob/sync.js +0 -486
- package/node_modules/glob-parent/CHANGELOG.md +0 -110
- package/node_modules/glob-parent/LICENSE +0 -15
- package/node_modules/glob-parent/README.md +0 -137
- package/node_modules/glob-parent/index.js +0 -42
- package/node_modules/glob-parent/package.json +0 -95
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -81
- package/node_modules/has/src/index.js +0 -5
- package/node_modules/has/test/index.js +0 -10
- 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 -75
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.js +0 -13
- package/node_modules/has-symbols/package.json +0 -134
- package/node_modules/has-symbols/shams.js +0 -42
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -28
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -28
- package/node_modules/has-symbols/test/tests.js +0 -56
- package/node_modules/inflight/LICENSE +0 -15
- package/node_modules/inflight/README.md +0 -37
- package/node_modules/inflight/inflight.js +0 -54
- package/node_modules/inflight/package.json +0 -61
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -70
- package/node_modules/is-binary-path/index.d.ts +0 -17
- package/node_modules/is-binary-path/index.js +0 -7
- package/node_modules/is-binary-path/license +0 -9
- package/node_modules/is-binary-path/package.json +0 -76
- package/node_modules/is-binary-path/readme.md +0 -34
- package/node_modules/is-extglob/LICENSE +0 -21
- package/node_modules/is-extglob/README.md +0 -107
- package/node_modules/is-extglob/index.js +0 -20
- package/node_modules/is-extglob/package.json +0 -103
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -80
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/is-glob/LICENSE +0 -21
- package/node_modules/is-glob/README.md +0 -206
- package/node_modules/is-glob/index.js +0 -150
- package/node_modules/is-glob/package.json +0 -127
- package/node_modules/is-number/LICENSE +0 -21
- package/node_modules/is-number/README.md +0 -187
- package/node_modules/is-number/index.js +0 -18
- package/node_modules/is-number/package.json +0 -125
- package/node_modules/lru-cache/LICENSE +0 -15
- package/node_modules/lru-cache/README.md +0 -166
- package/node_modules/lru-cache/index.js +0 -334
- package/node_modules/lru-cache/package.json +0 -72
- package/node_modules/methods/HISTORY.md +0 -29
- package/node_modules/methods/LICENSE +0 -24
- package/node_modules/methods/README.md +0 -51
- package/node_modules/methods/index.js +0 -69
- package/node_modules/methods/package.json +0 -82
- package/node_modules/mime/CHANGELOG.md +0 -296
- package/node_modules/mime/LICENSE +0 -21
- package/node_modules/mime/Mime.js +0 -97
- package/node_modules/mime/README.md +0 -187
- package/node_modules/mime/cli.js +0 -46
- package/node_modules/mime/index.js +0 -4
- package/node_modules/mime/lite.js +0 -4
- package/node_modules/mime/package.json +0 -84
- package/node_modules/mime/types/other.js +0 -1
- package/node_modules/mime/types/standard.js +0 -1
- 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 -106
- 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 -92
- package/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/minimatch/README.md +0 -230
- package/node_modules/minimatch/minimatch.js +0 -947
- package/node_modules/minimatch/package.json +0 -73
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -75
- package/node_modules/ms/readme.md +0 -60
- package/node_modules/multi-progress/.gitattributes +0 -17
- package/node_modules/multi-progress/CHANGELOG.md +0 -56
- package/node_modules/multi-progress/LICENSE.txt +0 -21
- package/node_modules/multi-progress/multi-progress.js +0 -98
- package/node_modules/multi-progress/package.json +0 -58
- package/node_modules/multi-progress/readme.md +0 -33
- package/node_modules/normalize-path/LICENSE +0 -21
- package/node_modules/normalize-path/README.md +0 -127
- package/node_modules/normalize-path/index.js +0 -35
- package/node_modules/normalize-path/package.json +0 -119
- package/node_modules/object-inspect/.eslintrc +0 -53
- package/node_modules/object-inspect/.github/FUNDING.yml +0 -12
- package/node_modules/object-inspect/.nycrc +0 -13
- package/node_modules/object-inspect/CHANGELOG.md +0 -360
- package/node_modules/object-inspect/LICENSE +0 -21
- package/node_modules/object-inspect/example/all.js +0 -23
- package/node_modules/object-inspect/example/circular.js +0 -6
- package/node_modules/object-inspect/example/fn.js +0 -5
- package/node_modules/object-inspect/example/inspect.js +0 -10
- package/node_modules/object-inspect/index.js +0 -512
- package/node_modules/object-inspect/package-support.json +0 -20
- package/node_modules/object-inspect/package.json +0 -126
- package/node_modules/object-inspect/readme.markdown +0 -86
- package/node_modules/object-inspect/test/bigint.js +0 -58
- package/node_modules/object-inspect/test/browser/dom.js +0 -15
- package/node_modules/object-inspect/test/circular.js +0 -16
- package/node_modules/object-inspect/test/deep.js +0 -12
- package/node_modules/object-inspect/test/element.js +0 -53
- package/node_modules/object-inspect/test/err.js +0 -48
- package/node_modules/object-inspect/test/fakes.js +0 -29
- package/node_modules/object-inspect/test/fn.js +0 -76
- package/node_modules/object-inspect/test/has.js +0 -15
- package/node_modules/object-inspect/test/holes.js +0 -15
- package/node_modules/object-inspect/test/indent-option.js +0 -271
- package/node_modules/object-inspect/test/inspect.js +0 -139
- package/node_modules/object-inspect/test/lowbyte.js +0 -12
- package/node_modules/object-inspect/test/number.js +0 -58
- package/node_modules/object-inspect/test/quoteStyle.js +0 -17
- package/node_modules/object-inspect/test/toStringTag.js +0 -40
- package/node_modules/object-inspect/test/undef.js +0 -12
- package/node_modules/object-inspect/test/values.js +0 -211
- package/node_modules/object-inspect/test-core-js.js +0 -26
- package/node_modules/object-inspect/util.inspect.js +0 -1
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -74
- package/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/path-is-absolute/license +0 -21
- package/node_modules/path-is-absolute/package.json +0 -78
- package/node_modules/path-is-absolute/readme.md +0 -59
- package/node_modules/picomatch/CHANGELOG.md +0 -136
- package/node_modules/picomatch/LICENSE +0 -21
- package/node_modules/picomatch/README.md +0 -708
- package/node_modules/picomatch/index.js +0 -3
- package/node_modules/picomatch/lib/constants.js +0 -179
- package/node_modules/picomatch/lib/parse.js +0 -1091
- package/node_modules/picomatch/lib/picomatch.js +0 -342
- package/node_modules/picomatch/lib/scan.js +0 -391
- package/node_modules/picomatch/lib/utils.js +0 -64
- package/node_modules/picomatch/package.json +0 -117
- package/node_modules/progress/CHANGELOG.md +0 -115
- package/node_modules/progress/LICENSE +0 -22
- package/node_modules/progress/Makefile +0 -8
- package/node_modules/progress/Readme.md +0 -146
- package/node_modules/progress/index.js +0 -1
- package/node_modules/progress/lib/node-progress.js +0 -236
- package/node_modules/progress/package.json +0 -74
- package/node_modules/qs/.editorconfig +0 -43
- package/node_modules/qs/.eslintrc +0 -38
- package/node_modules/qs/.github/FUNDING.yml +0 -12
- package/node_modules/qs/.nycrc +0 -13
- package/node_modules/qs/CHANGELOG.md +0 -546
- package/node_modules/qs/LICENSE.md +0 -29
- package/node_modules/qs/README.md +0 -625
- package/node_modules/qs/dist/qs.js +0 -2054
- package/node_modules/qs/lib/formats.js +0 -23
- package/node_modules/qs/lib/index.js +0 -11
- package/node_modules/qs/lib/parse.js +0 -263
- package/node_modules/qs/lib/stringify.js +0 -326
- package/node_modules/qs/lib/utils.js +0 -252
- package/node_modules/qs/package.json +0 -108
- package/node_modules/qs/test/parse.js +0 -855
- package/node_modules/qs/test/stringify.js +0 -909
- package/node_modules/qs/test/utils.js +0 -136
- package/node_modules/readdirp/LICENSE +0 -21
- package/node_modules/readdirp/README.md +0 -122
- package/node_modules/readdirp/index.d.ts +0 -43
- package/node_modules/readdirp/index.js +0 -287
- package/node_modules/readdirp/package.json +0 -162
- package/node_modules/require-directory/.jshintrc +0 -67
- package/node_modules/require-directory/.npmignore +0 -1
- package/node_modules/require-directory/.travis.yml +0 -3
- package/node_modules/require-directory/LICENSE +0 -22
- package/node_modules/require-directory/README.markdown +0 -184
- package/node_modules/require-directory/index.js +0 -86
- package/node_modules/require-directory/package.json +0 -72
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/safe-buffer/package.json +0 -69
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -568
- package/node_modules/semver/bin/semver.js +0 -183
- package/node_modules/semver/classes/comparator.js +0 -136
- package/node_modules/semver/classes/index.js +0 -5
- package/node_modules/semver/classes/range.js +0 -519
- package/node_modules/semver/classes/semver.js +0 -287
- package/node_modules/semver/functions/clean.js +0 -6
- package/node_modules/semver/functions/cmp.js +0 -52
- package/node_modules/semver/functions/coerce.js +0 -52
- package/node_modules/semver/functions/compare-build.js +0 -7
- package/node_modules/semver/functions/compare-loose.js +0 -3
- package/node_modules/semver/functions/compare.js +0 -5
- package/node_modules/semver/functions/diff.js +0 -23
- package/node_modules/semver/functions/eq.js +0 -3
- package/node_modules/semver/functions/gt.js +0 -3
- package/node_modules/semver/functions/gte.js +0 -3
- package/node_modules/semver/functions/inc.js +0 -18
- package/node_modules/semver/functions/lt.js +0 -3
- package/node_modules/semver/functions/lte.js +0 -3
- package/node_modules/semver/functions/major.js +0 -3
- package/node_modules/semver/functions/minor.js +0 -3
- package/node_modules/semver/functions/neq.js +0 -3
- package/node_modules/semver/functions/parse.js +0 -33
- package/node_modules/semver/functions/patch.js +0 -3
- package/node_modules/semver/functions/prerelease.js +0 -6
- package/node_modules/semver/functions/rcompare.js +0 -3
- package/node_modules/semver/functions/rsort.js +0 -3
- package/node_modules/semver/functions/satisfies.js +0 -10
- package/node_modules/semver/functions/sort.js +0 -3
- package/node_modules/semver/functions/valid.js +0 -6
- package/node_modules/semver/index.js +0 -48
- package/node_modules/semver/internal/constants.js +0 -17
- package/node_modules/semver/internal/debug.js +0 -9
- package/node_modules/semver/internal/identifiers.js +0 -23
- package/node_modules/semver/internal/parse-options.js +0 -11
- package/node_modules/semver/internal/re.js +0 -182
- package/node_modules/semver/package.json +0 -113
- package/node_modules/semver/preload.js +0 -2
- package/node_modules/semver/range.bnf +0 -16
- package/node_modules/semver/ranges/gtr.js +0 -4
- package/node_modules/semver/ranges/intersects.js +0 -7
- package/node_modules/semver/ranges/ltr.js +0 -4
- package/node_modules/semver/ranges/max-satisfying.js +0 -25
- package/node_modules/semver/ranges/min-satisfying.js +0 -24
- package/node_modules/semver/ranges/min-version.js +0 -61
- package/node_modules/semver/ranges/outside.js +0 -80
- package/node_modules/semver/ranges/simplify.js +0 -47
- package/node_modules/semver/ranges/subset.js +0 -244
- package/node_modules/semver/ranges/to-comparators.js +0 -8
- package/node_modules/semver/ranges/valid.js +0 -11
- package/node_modules/side-channel/.eslintignore +0 -1
- package/node_modules/side-channel/.eslintrc +0 -11
- package/node_modules/side-channel/.github/FUNDING.yml +0 -12
- package/node_modules/side-channel/.nycrc +0 -13
- package/node_modules/side-channel/CHANGELOG.md +0 -65
- package/node_modules/side-channel/LICENSE +0 -21
- package/node_modules/side-channel/README.md +0 -2
- package/node_modules/side-channel/index.js +0 -124
- package/node_modules/side-channel/package.json +0 -99
- package/node_modules/side-channel/test/index.js +0 -78
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/package.json +0 -98
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -64
- package/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/strip-ansi/license +0 -9
- package/node_modules/strip-ansi/package.json +0 -95
- package/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/superagent/.browserslistrc +0 -5
- package/node_modules/superagent/.dist.babelrc +0 -10
- package/node_modules/superagent/.dist.eslintrc +0 -35
- package/node_modules/superagent/.editorconfig +0 -9
- package/node_modules/superagent/.gitattributes +0 -1
- package/node_modules/superagent/.lib.babelrc +0 -11
- package/node_modules/superagent/.lib.eslintrc +0 -24
- package/node_modules/superagent/.remarkignore +0 -3
- package/node_modules/superagent/.zuul.yml +0 -16
- package/node_modules/superagent/CONTRIBUTING.md +0 -7
- package/node_modules/superagent/HISTORY.md +0 -692
- package/node_modules/superagent/LICENSE +0 -22
- package/node_modules/superagent/Makefile +0 -60
- package/node_modules/superagent/README.md +0 -266
- package/node_modules/superagent/dist/superagent.js +0 -2418
- package/node_modules/superagent/dist/superagent.min.js +0 -1
- package/node_modules/superagent/docs/head.html +0 -11
- package/node_modules/superagent/docs/images/bg.png +0 -0
- package/node_modules/superagent/docs/index.md +0 -736
- package/node_modules/superagent/docs/style.css +0 -87
- package/node_modules/superagent/docs/tail.html +0 -36
- package/node_modules/superagent/docs/test.html +0 -5072
- package/node_modules/superagent/index.html +0 -47
- package/node_modules/superagent/lib/agent-base.js +0 -42
- package/node_modules/superagent/lib/client.js +0 -1020
- package/node_modules/superagent/lib/is-object.js +0 -17
- package/node_modules/superagent/lib/node/agent.js +0 -113
- package/node_modules/superagent/lib/node/http2wrapper.js +0 -218
- package/node_modules/superagent/lib/node/index.js +0 -1376
- package/node_modules/superagent/lib/node/parsers/image.js +0 -13
- package/node_modules/superagent/lib/node/parsers/index.js +0 -12
- package/node_modules/superagent/lib/node/parsers/json.js +0 -26
- package/node_modules/superagent/lib/node/parsers/text.js +0 -11
- package/node_modules/superagent/lib/node/parsers/urlencoded.js +0 -22
- package/node_modules/superagent/lib/node/response.js +0 -126
- package/node_modules/superagent/lib/node/unzip.js +0 -72
- package/node_modules/superagent/lib/request-base.js +0 -757
- package/node_modules/superagent/lib/response-base.js +0 -131
- package/node_modules/superagent/lib/utils.js +0 -71
- package/node_modules/superagent/node_modules/form-data/License +0 -19
- package/node_modules/superagent/node_modules/form-data/README.md.bak +0 -356
- package/node_modules/superagent/node_modules/form-data/Readme.md +0 -356
- package/node_modules/superagent/node_modules/form-data/index.d.ts +0 -62
- package/node_modules/superagent/node_modules/form-data/lib/browser.js +0 -2
- package/node_modules/superagent/node_modules/form-data/lib/form_data.js +0 -498
- package/node_modules/superagent/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/superagent/node_modules/form-data/package.json +0 -104
- package/node_modules/superagent/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/superagent/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/superagent/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/superagent/node_modules/readable-stream/README.md +0 -106
- package/node_modules/superagent/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/superagent/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/superagent/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_duplex.js +0 -139
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_passthrough.js +0 -39
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_readable.js +0 -1124
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_transform.js +0 -201
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_writable.js +0 -697
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -207
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -210
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -105
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -104
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/from.js +0 -64
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -97
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/state.js +0 -27
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/superagent/node_modules/readable-stream/package.json +0 -100
- package/node_modules/superagent/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/superagent/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/superagent/package.json +0 -272
- package/node_modules/to-regex-range/LICENSE +0 -21
- package/node_modules/to-regex-range/README.md +0 -305
- package/node_modules/to-regex-range/index.js +0 -288
- package/node_modules/to-regex-range/package.json +0 -128
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -61
- package/node_modules/uuid/CHANGELOG.md +0 -229
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -505
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/esm-browser/index.js +0 -9
- package/node_modules/uuid/dist/esm-browser/md5.js +0 -215
- package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/node_modules/uuid/dist/esm-browser/parse.js +0 -35
- package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +0 -19
- package/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
- package/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
- package/node_modules/uuid/dist/esm-browser/v1.js +0 -95
- package/node_modules/uuid/dist/esm-browser/v3.js +0 -4
- package/node_modules/uuid/dist/esm-browser/v35.js +0 -64
- package/node_modules/uuid/dist/esm-browser/v4.js +0 -24
- package/node_modules/uuid/dist/esm-browser/v5.js +0 -4
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -7
- package/node_modules/uuid/dist/esm-browser/version.js +0 -11
- package/node_modules/uuid/dist/esm-node/index.js +0 -9
- package/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -29
- package/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -64
- package/node_modules/uuid/dist/esm-node/v4.js +0 -24
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/node_modules/uuid/dist/index.js +0 -79
- package/node_modules/uuid/dist/md5-browser.js +0 -223
- package/node_modules/uuid/dist/md5.js +0 -23
- package/node_modules/uuid/dist/nil.js +0 -8
- package/node_modules/uuid/dist/parse.js +0 -45
- package/node_modules/uuid/dist/regex.js +0 -8
- package/node_modules/uuid/dist/rng-browser.js +0 -26
- package/node_modules/uuid/dist/rng.js +0 -24
- package/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/node_modules/uuid/dist/sha1.js +0 -23
- package/node_modules/uuid/dist/stringify.js +0 -39
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- package/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/node_modules/uuid/dist/v1.js +0 -107
- package/node_modules/uuid/dist/v3.js +0 -16
- package/node_modules/uuid/dist/v35.js +0 -78
- package/node_modules/uuid/dist/v4.js +0 -37
- package/node_modules/uuid/dist/v5.js +0 -16
- package/node_modules/uuid/dist/validate.js +0 -17
- package/node_modules/uuid/dist/version.js +0 -21
- package/node_modules/uuid/package.json +0 -167
- package/node_modules/uuid/wrapper.mjs +0 -10
- package/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/wrap-ansi/license +0 -9
- package/node_modules/wrap-ansi/package.json +0 -98
- package/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -62
- package/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/y18n/CHANGELOG.md +0 -100
- package/node_modules/y18n/LICENSE +0 -13
- package/node_modules/y18n/README.md +0 -127
- package/node_modules/y18n/build/index.cjs +0 -203
- package/node_modules/y18n/build/lib/cjs.js +0 -6
- package/node_modules/y18n/build/lib/index.js +0 -174
- package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
- package/node_modules/y18n/index.mjs +0 -8
- package/node_modules/y18n/package.json +0 -104
- package/node_modules/yallist/LICENSE +0 -15
- package/node_modules/yallist/README.md +0 -204
- package/node_modules/yallist/iterator.js +0 -8
- package/node_modules/yallist/package.json +0 -68
- package/node_modules/yallist/yallist.js +0 -426
- package/node_modules/yargs/LICENSE +0 -21
- package/node_modules/yargs/README.md +0 -204
- package/node_modules/yargs/browser.mjs +0 -7
- package/node_modules/yargs/build/index.cjs +0 -1
- package/node_modules/yargs/build/lib/argsert.js +0 -62
- package/node_modules/yargs/build/lib/command.js +0 -447
- package/node_modules/yargs/build/lib/completion-templates.js +0 -48
- package/node_modules/yargs/build/lib/completion.js +0 -236
- package/node_modules/yargs/build/lib/middleware.js +0 -88
- package/node_modules/yargs/build/lib/parse-command.js +0 -32
- package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
- package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
- package/node_modules/yargs/build/lib/usage.js +0 -579
- package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
- package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
- package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -34
- package/node_modules/yargs/build/lib/utils/maybe-async-result.js +0 -17
- package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
- package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
- package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
- package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
- package/node_modules/yargs/build/lib/validation.js +0 -305
- package/node_modules/yargs/build/lib/yargs-factory.js +0 -1497
- package/node_modules/yargs/build/lib/yerror.js +0 -9
- package/node_modules/yargs/helpers/helpers.mjs +0 -10
- package/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/yargs/helpers/package.json +0 -3
- package/node_modules/yargs/index.cjs +0 -53
- package/node_modules/yargs/index.mjs +0 -8
- package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -95
- package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -73
- package/node_modules/yargs/locales/be.json +0 -46
- package/node_modules/yargs/locales/de.json +0 -46
- package/node_modules/yargs/locales/en.json +0 -51
- package/node_modules/yargs/locales/es.json +0 -46
- package/node_modules/yargs/locales/fi.json +0 -49
- package/node_modules/yargs/locales/fr.json +0 -53
- package/node_modules/yargs/locales/hi.json +0 -49
- package/node_modules/yargs/locales/hu.json +0 -46
- package/node_modules/yargs/locales/id.json +0 -50
- package/node_modules/yargs/locales/it.json +0 -46
- package/node_modules/yargs/locales/ja.json +0 -51
- package/node_modules/yargs/locales/ko.json +0 -49
- package/node_modules/yargs/locales/nb.json +0 -44
- package/node_modules/yargs/locales/nl.json +0 -49
- package/node_modules/yargs/locales/nn.json +0 -44
- package/node_modules/yargs/locales/pirate.json +0 -13
- package/node_modules/yargs/locales/pl.json +0 -49
- package/node_modules/yargs/locales/pt.json +0 -45
- package/node_modules/yargs/locales/pt_BR.json +0 -48
- package/node_modules/yargs/locales/ru.json +0 -51
- package/node_modules/yargs/locales/th.json +0 -46
- package/node_modules/yargs/locales/tr.json +0 -48
- package/node_modules/yargs/locales/uk_UA.json +0 -51
- package/node_modules/yargs/locales/uz.json +0 -52
- package/node_modules/yargs/locales/zh_CN.json +0 -48
- package/node_modules/yargs/locales/zh_TW.json +0 -51
- package/node_modules/yargs/package.json +0 -154
- package/node_modules/yargs/yargs +0 -9
- package/node_modules/yargs/yargs.mjs +0 -10
- package/node_modules/yargs-parser/CHANGELOG.md +0 -287
- package/node_modules/yargs-parser/LICENSE.txt +0 -14
- package/node_modules/yargs-parser/README.md +0 -518
- package/node_modules/yargs-parser/browser.js +0 -29
- package/node_modules/yargs-parser/build/index.cjs +0 -1048
- package/node_modules/yargs-parser/build/lib/index.js +0 -60
- package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
- package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
- package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1045
- package/node_modules/yargs-parser/package.json +0 -123
- package/src/clients/TrialAccount.js +0 -76
- package/src/commands/agent/index.js +0 -27
- package/src/commands/signup.js +0 -104
- package/test.sh +0 -2
- /package/src/commands/{agent → instances}/apps/install.js +0 -0
- /package/src/commands/{agent → instances}/ready.js +0 -0
@@ -1,2595 +0,0 @@
|
|
1
|
-
/* axios v0.27.2 | (c) 2022 by Matt Zabriskie */
|
2
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
3
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
4
|
-
module.exports = factory();
|
5
|
-
else if(typeof define === 'function' && define.amd)
|
6
|
-
define([], factory);
|
7
|
-
else if(typeof exports === 'object')
|
8
|
-
exports["axios"] = factory();
|
9
|
-
else
|
10
|
-
root["axios"] = factory();
|
11
|
-
})(this, function() {
|
12
|
-
return /******/ (function(modules) { // webpackBootstrap
|
13
|
-
/******/ // The module cache
|
14
|
-
/******/ var installedModules = {};
|
15
|
-
/******/
|
16
|
-
/******/ // The require function
|
17
|
-
/******/ function __webpack_require__(moduleId) {
|
18
|
-
/******/
|
19
|
-
/******/ // Check if module is in cache
|
20
|
-
/******/ if(installedModules[moduleId]) {
|
21
|
-
/******/ return installedModules[moduleId].exports;
|
22
|
-
/******/ }
|
23
|
-
/******/ // Create a new module (and put it into the cache)
|
24
|
-
/******/ var module = installedModules[moduleId] = {
|
25
|
-
/******/ i: moduleId,
|
26
|
-
/******/ l: false,
|
27
|
-
/******/ exports: {}
|
28
|
-
/******/ };
|
29
|
-
/******/
|
30
|
-
/******/ // Execute the module function
|
31
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
32
|
-
/******/
|
33
|
-
/******/ // Flag the module as loaded
|
34
|
-
/******/ module.l = true;
|
35
|
-
/******/
|
36
|
-
/******/ // Return the exports of the module
|
37
|
-
/******/ return module.exports;
|
38
|
-
/******/ }
|
39
|
-
/******/
|
40
|
-
/******/
|
41
|
-
/******/ // expose the modules object (__webpack_modules__)
|
42
|
-
/******/ __webpack_require__.m = modules;
|
43
|
-
/******/
|
44
|
-
/******/ // expose the module cache
|
45
|
-
/******/ __webpack_require__.c = installedModules;
|
46
|
-
/******/
|
47
|
-
/******/ // define getter function for harmony exports
|
48
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
49
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
50
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
51
|
-
/******/ }
|
52
|
-
/******/ };
|
53
|
-
/******/
|
54
|
-
/******/ // define __esModule on exports
|
55
|
-
/******/ __webpack_require__.r = function(exports) {
|
56
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
57
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
58
|
-
/******/ }
|
59
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
60
|
-
/******/ };
|
61
|
-
/******/
|
62
|
-
/******/ // create a fake namespace object
|
63
|
-
/******/ // mode & 1: value is a module id, require it
|
64
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
65
|
-
/******/ // mode & 4: return value when already ns object
|
66
|
-
/******/ // mode & 8|1: behave like require
|
67
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
68
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
69
|
-
/******/ if(mode & 8) return value;
|
70
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
71
|
-
/******/ var ns = Object.create(null);
|
72
|
-
/******/ __webpack_require__.r(ns);
|
73
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
74
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
75
|
-
/******/ return ns;
|
76
|
-
/******/ };
|
77
|
-
/******/
|
78
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
79
|
-
/******/ __webpack_require__.n = function(module) {
|
80
|
-
/******/ var getter = module && module.__esModule ?
|
81
|
-
/******/ function getDefault() { return module['default']; } :
|
82
|
-
/******/ function getModuleExports() { return module; };
|
83
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
84
|
-
/******/ return getter;
|
85
|
-
/******/ };
|
86
|
-
/******/
|
87
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
88
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
89
|
-
/******/
|
90
|
-
/******/ // __webpack_public_path__
|
91
|
-
/******/ __webpack_require__.p = "";
|
92
|
-
/******/
|
93
|
-
/******/
|
94
|
-
/******/ // Load entry module and return exports
|
95
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./index.js");
|
96
|
-
/******/ })
|
97
|
-
/************************************************************************/
|
98
|
-
/******/ ({
|
99
|
-
|
100
|
-
/***/ "./index.js":
|
101
|
-
/*!******************!*\
|
102
|
-
!*** ./index.js ***!
|
103
|
-
\******************/
|
104
|
-
/*! no static exports found */
|
105
|
-
/***/ (function(module, exports, __webpack_require__) {
|
106
|
-
|
107
|
-
module.exports = __webpack_require__(/*! ./lib/axios */ "./lib/axios.js");
|
108
|
-
|
109
|
-
/***/ }),
|
110
|
-
|
111
|
-
/***/ "./lib/adapters/xhr.js":
|
112
|
-
/*!*****************************!*\
|
113
|
-
!*** ./lib/adapters/xhr.js ***!
|
114
|
-
\*****************************/
|
115
|
-
/*! no static exports found */
|
116
|
-
/***/ (function(module, exports, __webpack_require__) {
|
117
|
-
|
118
|
-
"use strict";
|
119
|
-
|
120
|
-
|
121
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
122
|
-
var settle = __webpack_require__(/*! ./../core/settle */ "./lib/core/settle.js");
|
123
|
-
var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./lib/helpers/cookies.js");
|
124
|
-
var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./lib/helpers/buildURL.js");
|
125
|
-
var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./lib/core/buildFullPath.js");
|
126
|
-
var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./lib/helpers/parseHeaders.js");
|
127
|
-
var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./lib/helpers/isURLSameOrigin.js");
|
128
|
-
var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "./lib/defaults/transitional.js");
|
129
|
-
var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./lib/core/AxiosError.js");
|
130
|
-
var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "./lib/cancel/CanceledError.js");
|
131
|
-
var parseProtocol = __webpack_require__(/*! ../helpers/parseProtocol */ "./lib/helpers/parseProtocol.js");
|
132
|
-
|
133
|
-
module.exports = function xhrAdapter(config) {
|
134
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
135
|
-
var requestData = config.data;
|
136
|
-
var requestHeaders = config.headers;
|
137
|
-
var responseType = config.responseType;
|
138
|
-
var onCanceled;
|
139
|
-
function done() {
|
140
|
-
if (config.cancelToken) {
|
141
|
-
config.cancelToken.unsubscribe(onCanceled);
|
142
|
-
}
|
143
|
-
|
144
|
-
if (config.signal) {
|
145
|
-
config.signal.removeEventListener('abort', onCanceled);
|
146
|
-
}
|
147
|
-
}
|
148
|
-
|
149
|
-
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
150
|
-
delete requestHeaders['Content-Type']; // Let the browser set it
|
151
|
-
}
|
152
|
-
|
153
|
-
var request = new XMLHttpRequest();
|
154
|
-
|
155
|
-
// HTTP basic authentication
|
156
|
-
if (config.auth) {
|
157
|
-
var username = config.auth.username || '';
|
158
|
-
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
159
|
-
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
160
|
-
}
|
161
|
-
|
162
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
163
|
-
|
164
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
165
|
-
|
166
|
-
// Set the request timeout in MS
|
167
|
-
request.timeout = config.timeout;
|
168
|
-
|
169
|
-
function onloadend() {
|
170
|
-
if (!request) {
|
171
|
-
return;
|
172
|
-
}
|
173
|
-
// Prepare the response
|
174
|
-
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
175
|
-
var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
176
|
-
request.responseText : request.response;
|
177
|
-
var response = {
|
178
|
-
data: responseData,
|
179
|
-
status: request.status,
|
180
|
-
statusText: request.statusText,
|
181
|
-
headers: responseHeaders,
|
182
|
-
config: config,
|
183
|
-
request: request
|
184
|
-
};
|
185
|
-
|
186
|
-
settle(function _resolve(value) {
|
187
|
-
resolve(value);
|
188
|
-
done();
|
189
|
-
}, function _reject(err) {
|
190
|
-
reject(err);
|
191
|
-
done();
|
192
|
-
}, response);
|
193
|
-
|
194
|
-
// Clean up request
|
195
|
-
request = null;
|
196
|
-
}
|
197
|
-
|
198
|
-
if ('onloadend' in request) {
|
199
|
-
// Use onloadend if available
|
200
|
-
request.onloadend = onloadend;
|
201
|
-
} else {
|
202
|
-
// Listen for ready state to emulate onloadend
|
203
|
-
request.onreadystatechange = function handleLoad() {
|
204
|
-
if (!request || request.readyState !== 4) {
|
205
|
-
return;
|
206
|
-
}
|
207
|
-
|
208
|
-
// The request errored out and we didn't get a response, this will be
|
209
|
-
// handled by onerror instead
|
210
|
-
// With one exception: request that using file: protocol, most browsers
|
211
|
-
// will return status as 0 even though it's a successful request
|
212
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
213
|
-
return;
|
214
|
-
}
|
215
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
216
|
-
// so we should call onloadend on the next 'tick'
|
217
|
-
setTimeout(onloadend);
|
218
|
-
};
|
219
|
-
}
|
220
|
-
|
221
|
-
// Handle browser request cancellation (as opposed to a manual cancellation)
|
222
|
-
request.onabort = function handleAbort() {
|
223
|
-
if (!request) {
|
224
|
-
return;
|
225
|
-
}
|
226
|
-
|
227
|
-
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
228
|
-
|
229
|
-
// Clean up request
|
230
|
-
request = null;
|
231
|
-
};
|
232
|
-
|
233
|
-
// Handle low level network errors
|
234
|
-
request.onerror = function handleError() {
|
235
|
-
// Real errors are hidden from us by the browser
|
236
|
-
// onerror should only fire if it's a network error
|
237
|
-
reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request));
|
238
|
-
|
239
|
-
// Clean up request
|
240
|
-
request = null;
|
241
|
-
};
|
242
|
-
|
243
|
-
// Handle timeout
|
244
|
-
request.ontimeout = function handleTimeout() {
|
245
|
-
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
246
|
-
var transitional = config.transitional || transitionalDefaults;
|
247
|
-
if (config.timeoutErrorMessage) {
|
248
|
-
timeoutErrorMessage = config.timeoutErrorMessage;
|
249
|
-
}
|
250
|
-
reject(new AxiosError(
|
251
|
-
timeoutErrorMessage,
|
252
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
253
|
-
config,
|
254
|
-
request));
|
255
|
-
|
256
|
-
// Clean up request
|
257
|
-
request = null;
|
258
|
-
};
|
259
|
-
|
260
|
-
// Add xsrf header
|
261
|
-
// This is only done if running in a standard browser environment.
|
262
|
-
// Specifically not if we're in a web worker, or react-native.
|
263
|
-
if (utils.isStandardBrowserEnv()) {
|
264
|
-
// Add xsrf header
|
265
|
-
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
|
266
|
-
cookies.read(config.xsrfCookieName) :
|
267
|
-
undefined;
|
268
|
-
|
269
|
-
if (xsrfValue) {
|
270
|
-
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
271
|
-
}
|
272
|
-
}
|
273
|
-
|
274
|
-
// Add headers to the request
|
275
|
-
if ('setRequestHeader' in request) {
|
276
|
-
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
277
|
-
if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
278
|
-
// Remove Content-Type if data is undefined
|
279
|
-
delete requestHeaders[key];
|
280
|
-
} else {
|
281
|
-
// Otherwise add header to the request
|
282
|
-
request.setRequestHeader(key, val);
|
283
|
-
}
|
284
|
-
});
|
285
|
-
}
|
286
|
-
|
287
|
-
// Add withCredentials to request if needed
|
288
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
289
|
-
request.withCredentials = !!config.withCredentials;
|
290
|
-
}
|
291
|
-
|
292
|
-
// Add responseType to request if needed
|
293
|
-
if (responseType && responseType !== 'json') {
|
294
|
-
request.responseType = config.responseType;
|
295
|
-
}
|
296
|
-
|
297
|
-
// Handle progress if needed
|
298
|
-
if (typeof config.onDownloadProgress === 'function') {
|
299
|
-
request.addEventListener('progress', config.onDownloadProgress);
|
300
|
-
}
|
301
|
-
|
302
|
-
// Not all browsers support upload events
|
303
|
-
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
304
|
-
request.upload.addEventListener('progress', config.onUploadProgress);
|
305
|
-
}
|
306
|
-
|
307
|
-
if (config.cancelToken || config.signal) {
|
308
|
-
// Handle cancellation
|
309
|
-
// eslint-disable-next-line func-names
|
310
|
-
onCanceled = function(cancel) {
|
311
|
-
if (!request) {
|
312
|
-
return;
|
313
|
-
}
|
314
|
-
reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel);
|
315
|
-
request.abort();
|
316
|
-
request = null;
|
317
|
-
};
|
318
|
-
|
319
|
-
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
320
|
-
if (config.signal) {
|
321
|
-
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
322
|
-
}
|
323
|
-
}
|
324
|
-
|
325
|
-
if (!requestData) {
|
326
|
-
requestData = null;
|
327
|
-
}
|
328
|
-
|
329
|
-
var protocol = parseProtocol(fullPath);
|
330
|
-
|
331
|
-
if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
|
332
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
333
|
-
return;
|
334
|
-
}
|
335
|
-
|
336
|
-
|
337
|
-
// Send the request
|
338
|
-
request.send(requestData);
|
339
|
-
});
|
340
|
-
};
|
341
|
-
|
342
|
-
|
343
|
-
/***/ }),
|
344
|
-
|
345
|
-
/***/ "./lib/axios.js":
|
346
|
-
/*!**********************!*\
|
347
|
-
!*** ./lib/axios.js ***!
|
348
|
-
\**********************/
|
349
|
-
/*! no static exports found */
|
350
|
-
/***/ (function(module, exports, __webpack_require__) {
|
351
|
-
|
352
|
-
"use strict";
|
353
|
-
|
354
|
-
|
355
|
-
var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
356
|
-
var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js");
|
357
|
-
var Axios = __webpack_require__(/*! ./core/Axios */ "./lib/core/Axios.js");
|
358
|
-
var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./lib/core/mergeConfig.js");
|
359
|
-
var defaults = __webpack_require__(/*! ./defaults */ "./lib/defaults/index.js");
|
360
|
-
|
361
|
-
/**
|
362
|
-
* Create an instance of Axios
|
363
|
-
*
|
364
|
-
* @param {Object} defaultConfig The default config for the instance
|
365
|
-
* @return {Axios} A new instance of Axios
|
366
|
-
*/
|
367
|
-
function createInstance(defaultConfig) {
|
368
|
-
var context = new Axios(defaultConfig);
|
369
|
-
var instance = bind(Axios.prototype.request, context);
|
370
|
-
|
371
|
-
// Copy axios.prototype to instance
|
372
|
-
utils.extend(instance, Axios.prototype, context);
|
373
|
-
|
374
|
-
// Copy context to instance
|
375
|
-
utils.extend(instance, context);
|
376
|
-
|
377
|
-
// Factory for creating new instances
|
378
|
-
instance.create = function create(instanceConfig) {
|
379
|
-
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
380
|
-
};
|
381
|
-
|
382
|
-
return instance;
|
383
|
-
}
|
384
|
-
|
385
|
-
// Create the default instance to be exported
|
386
|
-
var axios = createInstance(defaults);
|
387
|
-
|
388
|
-
// Expose Axios class to allow class inheritance
|
389
|
-
axios.Axios = Axios;
|
390
|
-
|
391
|
-
// Expose Cancel & CancelToken
|
392
|
-
axios.CanceledError = __webpack_require__(/*! ./cancel/CanceledError */ "./lib/cancel/CanceledError.js");
|
393
|
-
axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./lib/cancel/CancelToken.js");
|
394
|
-
axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./lib/cancel/isCancel.js");
|
395
|
-
axios.VERSION = __webpack_require__(/*! ./env/data */ "./lib/env/data.js").version;
|
396
|
-
axios.toFormData = __webpack_require__(/*! ./helpers/toFormData */ "./lib/helpers/toFormData.js");
|
397
|
-
|
398
|
-
// Expose AxiosError class
|
399
|
-
axios.AxiosError = __webpack_require__(/*! ../lib/core/AxiosError */ "./lib/core/AxiosError.js");
|
400
|
-
|
401
|
-
// alias for CanceledError for backward compatibility
|
402
|
-
axios.Cancel = axios.CanceledError;
|
403
|
-
|
404
|
-
// Expose all/spread
|
405
|
-
axios.all = function all(promises) {
|
406
|
-
return Promise.all(promises);
|
407
|
-
};
|
408
|
-
axios.spread = __webpack_require__(/*! ./helpers/spread */ "./lib/helpers/spread.js");
|
409
|
-
|
410
|
-
// Expose isAxiosError
|
411
|
-
axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./lib/helpers/isAxiosError.js");
|
412
|
-
|
413
|
-
module.exports = axios;
|
414
|
-
|
415
|
-
// Allow use of default import syntax in TypeScript
|
416
|
-
module.exports.default = axios;
|
417
|
-
|
418
|
-
|
419
|
-
/***/ }),
|
420
|
-
|
421
|
-
/***/ "./lib/cancel/CancelToken.js":
|
422
|
-
/*!***********************************!*\
|
423
|
-
!*** ./lib/cancel/CancelToken.js ***!
|
424
|
-
\***********************************/
|
425
|
-
/*! no static exports found */
|
426
|
-
/***/ (function(module, exports, __webpack_require__) {
|
427
|
-
|
428
|
-
"use strict";
|
429
|
-
|
430
|
-
|
431
|
-
var CanceledError = __webpack_require__(/*! ./CanceledError */ "./lib/cancel/CanceledError.js");
|
432
|
-
|
433
|
-
/**
|
434
|
-
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
435
|
-
*
|
436
|
-
* @class
|
437
|
-
* @param {Function} executor The executor function.
|
438
|
-
*/
|
439
|
-
function CancelToken(executor) {
|
440
|
-
if (typeof executor !== 'function') {
|
441
|
-
throw new TypeError('executor must be a function.');
|
442
|
-
}
|
443
|
-
|
444
|
-
var resolvePromise;
|
445
|
-
|
446
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
447
|
-
resolvePromise = resolve;
|
448
|
-
});
|
449
|
-
|
450
|
-
var token = this;
|
451
|
-
|
452
|
-
// eslint-disable-next-line func-names
|
453
|
-
this.promise.then(function(cancel) {
|
454
|
-
if (!token._listeners) return;
|
455
|
-
|
456
|
-
var i;
|
457
|
-
var l = token._listeners.length;
|
458
|
-
|
459
|
-
for (i = 0; i < l; i++) {
|
460
|
-
token._listeners[i](cancel);
|
461
|
-
}
|
462
|
-
token._listeners = null;
|
463
|
-
});
|
464
|
-
|
465
|
-
// eslint-disable-next-line func-names
|
466
|
-
this.promise.then = function(onfulfilled) {
|
467
|
-
var _resolve;
|
468
|
-
// eslint-disable-next-line func-names
|
469
|
-
var promise = new Promise(function(resolve) {
|
470
|
-
token.subscribe(resolve);
|
471
|
-
_resolve = resolve;
|
472
|
-
}).then(onfulfilled);
|
473
|
-
|
474
|
-
promise.cancel = function reject() {
|
475
|
-
token.unsubscribe(_resolve);
|
476
|
-
};
|
477
|
-
|
478
|
-
return promise;
|
479
|
-
};
|
480
|
-
|
481
|
-
executor(function cancel(message) {
|
482
|
-
if (token.reason) {
|
483
|
-
// Cancellation has already been requested
|
484
|
-
return;
|
485
|
-
}
|
486
|
-
|
487
|
-
token.reason = new CanceledError(message);
|
488
|
-
resolvePromise(token.reason);
|
489
|
-
});
|
490
|
-
}
|
491
|
-
|
492
|
-
/**
|
493
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
494
|
-
*/
|
495
|
-
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
496
|
-
if (this.reason) {
|
497
|
-
throw this.reason;
|
498
|
-
}
|
499
|
-
};
|
500
|
-
|
501
|
-
/**
|
502
|
-
* Subscribe to the cancel signal
|
503
|
-
*/
|
504
|
-
|
505
|
-
CancelToken.prototype.subscribe = function subscribe(listener) {
|
506
|
-
if (this.reason) {
|
507
|
-
listener(this.reason);
|
508
|
-
return;
|
509
|
-
}
|
510
|
-
|
511
|
-
if (this._listeners) {
|
512
|
-
this._listeners.push(listener);
|
513
|
-
} else {
|
514
|
-
this._listeners = [listener];
|
515
|
-
}
|
516
|
-
};
|
517
|
-
|
518
|
-
/**
|
519
|
-
* Unsubscribe from the cancel signal
|
520
|
-
*/
|
521
|
-
|
522
|
-
CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
|
523
|
-
if (!this._listeners) {
|
524
|
-
return;
|
525
|
-
}
|
526
|
-
var index = this._listeners.indexOf(listener);
|
527
|
-
if (index !== -1) {
|
528
|
-
this._listeners.splice(index, 1);
|
529
|
-
}
|
530
|
-
};
|
531
|
-
|
532
|
-
/**
|
533
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
534
|
-
* cancels the `CancelToken`.
|
535
|
-
*/
|
536
|
-
CancelToken.source = function source() {
|
537
|
-
var cancel;
|
538
|
-
var token = new CancelToken(function executor(c) {
|
539
|
-
cancel = c;
|
540
|
-
});
|
541
|
-
return {
|
542
|
-
token: token,
|
543
|
-
cancel: cancel
|
544
|
-
};
|
545
|
-
};
|
546
|
-
|
547
|
-
module.exports = CancelToken;
|
548
|
-
|
549
|
-
|
550
|
-
/***/ }),
|
551
|
-
|
552
|
-
/***/ "./lib/cancel/CanceledError.js":
|
553
|
-
/*!*************************************!*\
|
554
|
-
!*** ./lib/cancel/CanceledError.js ***!
|
555
|
-
\*************************************/
|
556
|
-
/*! no static exports found */
|
557
|
-
/***/ (function(module, exports, __webpack_require__) {
|
558
|
-
|
559
|
-
"use strict";
|
560
|
-
|
561
|
-
|
562
|
-
var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./lib/core/AxiosError.js");
|
563
|
-
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
564
|
-
|
565
|
-
/**
|
566
|
-
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
567
|
-
*
|
568
|
-
* @class
|
569
|
-
* @param {string=} message The message.
|
570
|
-
*/
|
571
|
-
function CanceledError(message) {
|
572
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
573
|
-
AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED);
|
574
|
-
this.name = 'CanceledError';
|
575
|
-
}
|
576
|
-
|
577
|
-
utils.inherits(CanceledError, AxiosError, {
|
578
|
-
__CANCEL__: true
|
579
|
-
});
|
580
|
-
|
581
|
-
module.exports = CanceledError;
|
582
|
-
|
583
|
-
|
584
|
-
/***/ }),
|
585
|
-
|
586
|
-
/***/ "./lib/cancel/isCancel.js":
|
587
|
-
/*!********************************!*\
|
588
|
-
!*** ./lib/cancel/isCancel.js ***!
|
589
|
-
\********************************/
|
590
|
-
/*! no static exports found */
|
591
|
-
/***/ (function(module, exports, __webpack_require__) {
|
592
|
-
|
593
|
-
"use strict";
|
594
|
-
|
595
|
-
|
596
|
-
module.exports = function isCancel(value) {
|
597
|
-
return !!(value && value.__CANCEL__);
|
598
|
-
};
|
599
|
-
|
600
|
-
|
601
|
-
/***/ }),
|
602
|
-
|
603
|
-
/***/ "./lib/core/Axios.js":
|
604
|
-
/*!***************************!*\
|
605
|
-
!*** ./lib/core/Axios.js ***!
|
606
|
-
\***************************/
|
607
|
-
/*! no static exports found */
|
608
|
-
/***/ (function(module, exports, __webpack_require__) {
|
609
|
-
|
610
|
-
"use strict";
|
611
|
-
|
612
|
-
|
613
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
614
|
-
var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./lib/helpers/buildURL.js");
|
615
|
-
var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./lib/core/InterceptorManager.js");
|
616
|
-
var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./lib/core/dispatchRequest.js");
|
617
|
-
var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./lib/core/mergeConfig.js");
|
618
|
-
var buildFullPath = __webpack_require__(/*! ./buildFullPath */ "./lib/core/buildFullPath.js");
|
619
|
-
var validator = __webpack_require__(/*! ../helpers/validator */ "./lib/helpers/validator.js");
|
620
|
-
|
621
|
-
var validators = validator.validators;
|
622
|
-
/**
|
623
|
-
* Create a new instance of Axios
|
624
|
-
*
|
625
|
-
* @param {Object} instanceConfig The default config for the instance
|
626
|
-
*/
|
627
|
-
function Axios(instanceConfig) {
|
628
|
-
this.defaults = instanceConfig;
|
629
|
-
this.interceptors = {
|
630
|
-
request: new InterceptorManager(),
|
631
|
-
response: new InterceptorManager()
|
632
|
-
};
|
633
|
-
}
|
634
|
-
|
635
|
-
/**
|
636
|
-
* Dispatch a request
|
637
|
-
*
|
638
|
-
* @param {Object} config The config specific for this request (merged with this.defaults)
|
639
|
-
*/
|
640
|
-
Axios.prototype.request = function request(configOrUrl, config) {
|
641
|
-
/*eslint no-param-reassign:0*/
|
642
|
-
// Allow for axios('example/url'[, config]) a la fetch API
|
643
|
-
if (typeof configOrUrl === 'string') {
|
644
|
-
config = config || {};
|
645
|
-
config.url = configOrUrl;
|
646
|
-
} else {
|
647
|
-
config = configOrUrl || {};
|
648
|
-
}
|
649
|
-
|
650
|
-
config = mergeConfig(this.defaults, config);
|
651
|
-
|
652
|
-
// Set config.method
|
653
|
-
if (config.method) {
|
654
|
-
config.method = config.method.toLowerCase();
|
655
|
-
} else if (this.defaults.method) {
|
656
|
-
config.method = this.defaults.method.toLowerCase();
|
657
|
-
} else {
|
658
|
-
config.method = 'get';
|
659
|
-
}
|
660
|
-
|
661
|
-
var transitional = config.transitional;
|
662
|
-
|
663
|
-
if (transitional !== undefined) {
|
664
|
-
validator.assertOptions(transitional, {
|
665
|
-
silentJSONParsing: validators.transitional(validators.boolean),
|
666
|
-
forcedJSONParsing: validators.transitional(validators.boolean),
|
667
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
668
|
-
}, false);
|
669
|
-
}
|
670
|
-
|
671
|
-
// filter out skipped interceptors
|
672
|
-
var requestInterceptorChain = [];
|
673
|
-
var synchronousRequestInterceptors = true;
|
674
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
675
|
-
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
676
|
-
return;
|
677
|
-
}
|
678
|
-
|
679
|
-
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
680
|
-
|
681
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
682
|
-
});
|
683
|
-
|
684
|
-
var responseInterceptorChain = [];
|
685
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
686
|
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
687
|
-
});
|
688
|
-
|
689
|
-
var promise;
|
690
|
-
|
691
|
-
if (!synchronousRequestInterceptors) {
|
692
|
-
var chain = [dispatchRequest, undefined];
|
693
|
-
|
694
|
-
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
695
|
-
chain = chain.concat(responseInterceptorChain);
|
696
|
-
|
697
|
-
promise = Promise.resolve(config);
|
698
|
-
while (chain.length) {
|
699
|
-
promise = promise.then(chain.shift(), chain.shift());
|
700
|
-
}
|
701
|
-
|
702
|
-
return promise;
|
703
|
-
}
|
704
|
-
|
705
|
-
|
706
|
-
var newConfig = config;
|
707
|
-
while (requestInterceptorChain.length) {
|
708
|
-
var onFulfilled = requestInterceptorChain.shift();
|
709
|
-
var onRejected = requestInterceptorChain.shift();
|
710
|
-
try {
|
711
|
-
newConfig = onFulfilled(newConfig);
|
712
|
-
} catch (error) {
|
713
|
-
onRejected(error);
|
714
|
-
break;
|
715
|
-
}
|
716
|
-
}
|
717
|
-
|
718
|
-
try {
|
719
|
-
promise = dispatchRequest(newConfig);
|
720
|
-
} catch (error) {
|
721
|
-
return Promise.reject(error);
|
722
|
-
}
|
723
|
-
|
724
|
-
while (responseInterceptorChain.length) {
|
725
|
-
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
|
726
|
-
}
|
727
|
-
|
728
|
-
return promise;
|
729
|
-
};
|
730
|
-
|
731
|
-
Axios.prototype.getUri = function getUri(config) {
|
732
|
-
config = mergeConfig(this.defaults, config);
|
733
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
734
|
-
return buildURL(fullPath, config.params, config.paramsSerializer);
|
735
|
-
};
|
736
|
-
|
737
|
-
// Provide aliases for supported request methods
|
738
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
739
|
-
/*eslint func-names:0*/
|
740
|
-
Axios.prototype[method] = function(url, config) {
|
741
|
-
return this.request(mergeConfig(config || {}, {
|
742
|
-
method: method,
|
743
|
-
url: url,
|
744
|
-
data: (config || {}).data
|
745
|
-
}));
|
746
|
-
};
|
747
|
-
});
|
748
|
-
|
749
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
750
|
-
/*eslint func-names:0*/
|
751
|
-
|
752
|
-
function generateHTTPMethod(isForm) {
|
753
|
-
return function httpMethod(url, data, config) {
|
754
|
-
return this.request(mergeConfig(config || {}, {
|
755
|
-
method: method,
|
756
|
-
headers: isForm ? {
|
757
|
-
'Content-Type': 'multipart/form-data'
|
758
|
-
} : {},
|
759
|
-
url: url,
|
760
|
-
data: data
|
761
|
-
}));
|
762
|
-
};
|
763
|
-
}
|
764
|
-
|
765
|
-
Axios.prototype[method] = generateHTTPMethod();
|
766
|
-
|
767
|
-
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
768
|
-
});
|
769
|
-
|
770
|
-
module.exports = Axios;
|
771
|
-
|
772
|
-
|
773
|
-
/***/ }),
|
774
|
-
|
775
|
-
/***/ "./lib/core/AxiosError.js":
|
776
|
-
/*!********************************!*\
|
777
|
-
!*** ./lib/core/AxiosError.js ***!
|
778
|
-
\********************************/
|
779
|
-
/*! no static exports found */
|
780
|
-
/***/ (function(module, exports, __webpack_require__) {
|
781
|
-
|
782
|
-
"use strict";
|
783
|
-
|
784
|
-
|
785
|
-
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
786
|
-
|
787
|
-
/**
|
788
|
-
* Create an Error with the specified message, config, error code, request and response.
|
789
|
-
*
|
790
|
-
* @param {string} message The error message.
|
791
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
792
|
-
* @param {Object} [config] The config.
|
793
|
-
* @param {Object} [request] The request.
|
794
|
-
* @param {Object} [response] The response.
|
795
|
-
* @returns {Error} The created error.
|
796
|
-
*/
|
797
|
-
function AxiosError(message, code, config, request, response) {
|
798
|
-
Error.call(this);
|
799
|
-
this.message = message;
|
800
|
-
this.name = 'AxiosError';
|
801
|
-
code && (this.code = code);
|
802
|
-
config && (this.config = config);
|
803
|
-
request && (this.request = request);
|
804
|
-
response && (this.response = response);
|
805
|
-
}
|
806
|
-
|
807
|
-
utils.inherits(AxiosError, Error, {
|
808
|
-
toJSON: function toJSON() {
|
809
|
-
return {
|
810
|
-
// Standard
|
811
|
-
message: this.message,
|
812
|
-
name: this.name,
|
813
|
-
// Microsoft
|
814
|
-
description: this.description,
|
815
|
-
number: this.number,
|
816
|
-
// Mozilla
|
817
|
-
fileName: this.fileName,
|
818
|
-
lineNumber: this.lineNumber,
|
819
|
-
columnNumber: this.columnNumber,
|
820
|
-
stack: this.stack,
|
821
|
-
// Axios
|
822
|
-
config: this.config,
|
823
|
-
code: this.code,
|
824
|
-
status: this.response && this.response.status ? this.response.status : null
|
825
|
-
};
|
826
|
-
}
|
827
|
-
});
|
828
|
-
|
829
|
-
var prototype = AxiosError.prototype;
|
830
|
-
var descriptors = {};
|
831
|
-
|
832
|
-
[
|
833
|
-
'ERR_BAD_OPTION_VALUE',
|
834
|
-
'ERR_BAD_OPTION',
|
835
|
-
'ECONNABORTED',
|
836
|
-
'ETIMEDOUT',
|
837
|
-
'ERR_NETWORK',
|
838
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
839
|
-
'ERR_DEPRECATED',
|
840
|
-
'ERR_BAD_RESPONSE',
|
841
|
-
'ERR_BAD_REQUEST',
|
842
|
-
'ERR_CANCELED'
|
843
|
-
// eslint-disable-next-line func-names
|
844
|
-
].forEach(function(code) {
|
845
|
-
descriptors[code] = {value: code};
|
846
|
-
});
|
847
|
-
|
848
|
-
Object.defineProperties(AxiosError, descriptors);
|
849
|
-
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
850
|
-
|
851
|
-
// eslint-disable-next-line func-names
|
852
|
-
AxiosError.from = function(error, code, config, request, response, customProps) {
|
853
|
-
var axiosError = Object.create(prototype);
|
854
|
-
|
855
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
856
|
-
return obj !== Error.prototype;
|
857
|
-
});
|
858
|
-
|
859
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
860
|
-
|
861
|
-
axiosError.name = error.name;
|
862
|
-
|
863
|
-
customProps && Object.assign(axiosError, customProps);
|
864
|
-
|
865
|
-
return axiosError;
|
866
|
-
};
|
867
|
-
|
868
|
-
module.exports = AxiosError;
|
869
|
-
|
870
|
-
|
871
|
-
/***/ }),
|
872
|
-
|
873
|
-
/***/ "./lib/core/InterceptorManager.js":
|
874
|
-
/*!****************************************!*\
|
875
|
-
!*** ./lib/core/InterceptorManager.js ***!
|
876
|
-
\****************************************/
|
877
|
-
/*! no static exports found */
|
878
|
-
/***/ (function(module, exports, __webpack_require__) {
|
879
|
-
|
880
|
-
"use strict";
|
881
|
-
|
882
|
-
|
883
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
884
|
-
|
885
|
-
function InterceptorManager() {
|
886
|
-
this.handlers = [];
|
887
|
-
}
|
888
|
-
|
889
|
-
/**
|
890
|
-
* Add a new interceptor to the stack
|
891
|
-
*
|
892
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
893
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
894
|
-
*
|
895
|
-
* @return {Number} An ID used to remove interceptor later
|
896
|
-
*/
|
897
|
-
InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
|
898
|
-
this.handlers.push({
|
899
|
-
fulfilled: fulfilled,
|
900
|
-
rejected: rejected,
|
901
|
-
synchronous: options ? options.synchronous : false,
|
902
|
-
runWhen: options ? options.runWhen : null
|
903
|
-
});
|
904
|
-
return this.handlers.length - 1;
|
905
|
-
};
|
906
|
-
|
907
|
-
/**
|
908
|
-
* Remove an interceptor from the stack
|
909
|
-
*
|
910
|
-
* @param {Number} id The ID that was returned by `use`
|
911
|
-
*/
|
912
|
-
InterceptorManager.prototype.eject = function eject(id) {
|
913
|
-
if (this.handlers[id]) {
|
914
|
-
this.handlers[id] = null;
|
915
|
-
}
|
916
|
-
};
|
917
|
-
|
918
|
-
/**
|
919
|
-
* Iterate over all the registered interceptors
|
920
|
-
*
|
921
|
-
* This method is particularly useful for skipping over any
|
922
|
-
* interceptors that may have become `null` calling `eject`.
|
923
|
-
*
|
924
|
-
* @param {Function} fn The function to call for each interceptor
|
925
|
-
*/
|
926
|
-
InterceptorManager.prototype.forEach = function forEach(fn) {
|
927
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
928
|
-
if (h !== null) {
|
929
|
-
fn(h);
|
930
|
-
}
|
931
|
-
});
|
932
|
-
};
|
933
|
-
|
934
|
-
module.exports = InterceptorManager;
|
935
|
-
|
936
|
-
|
937
|
-
/***/ }),
|
938
|
-
|
939
|
-
/***/ "./lib/core/buildFullPath.js":
|
940
|
-
/*!***********************************!*\
|
941
|
-
!*** ./lib/core/buildFullPath.js ***!
|
942
|
-
\***********************************/
|
943
|
-
/*! no static exports found */
|
944
|
-
/***/ (function(module, exports, __webpack_require__) {
|
945
|
-
|
946
|
-
"use strict";
|
947
|
-
|
948
|
-
|
949
|
-
var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./lib/helpers/isAbsoluteURL.js");
|
950
|
-
var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./lib/helpers/combineURLs.js");
|
951
|
-
|
952
|
-
/**
|
953
|
-
* Creates a new URL by combining the baseURL with the requestedURL,
|
954
|
-
* only when the requestedURL is not already an absolute URL.
|
955
|
-
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
956
|
-
*
|
957
|
-
* @param {string} baseURL The base URL
|
958
|
-
* @param {string} requestedURL Absolute or relative URL to combine
|
959
|
-
* @returns {string} The combined full path
|
960
|
-
*/
|
961
|
-
module.exports = function buildFullPath(baseURL, requestedURL) {
|
962
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
963
|
-
return combineURLs(baseURL, requestedURL);
|
964
|
-
}
|
965
|
-
return requestedURL;
|
966
|
-
};
|
967
|
-
|
968
|
-
|
969
|
-
/***/ }),
|
970
|
-
|
971
|
-
/***/ "./lib/core/dispatchRequest.js":
|
972
|
-
/*!*************************************!*\
|
973
|
-
!*** ./lib/core/dispatchRequest.js ***!
|
974
|
-
\*************************************/
|
975
|
-
/*! no static exports found */
|
976
|
-
/***/ (function(module, exports, __webpack_require__) {
|
977
|
-
|
978
|
-
"use strict";
|
979
|
-
|
980
|
-
|
981
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
982
|
-
var transformData = __webpack_require__(/*! ./transformData */ "./lib/core/transformData.js");
|
983
|
-
var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./lib/cancel/isCancel.js");
|
984
|
-
var defaults = __webpack_require__(/*! ../defaults */ "./lib/defaults/index.js");
|
985
|
-
var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "./lib/cancel/CanceledError.js");
|
986
|
-
|
987
|
-
/**
|
988
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
989
|
-
*/
|
990
|
-
function throwIfCancellationRequested(config) {
|
991
|
-
if (config.cancelToken) {
|
992
|
-
config.cancelToken.throwIfRequested();
|
993
|
-
}
|
994
|
-
|
995
|
-
if (config.signal && config.signal.aborted) {
|
996
|
-
throw new CanceledError();
|
997
|
-
}
|
998
|
-
}
|
999
|
-
|
1000
|
-
/**
|
1001
|
-
* Dispatch a request to the server using the configured adapter.
|
1002
|
-
*
|
1003
|
-
* @param {object} config The config that is to be used for the request
|
1004
|
-
* @returns {Promise} The Promise to be fulfilled
|
1005
|
-
*/
|
1006
|
-
module.exports = function dispatchRequest(config) {
|
1007
|
-
throwIfCancellationRequested(config);
|
1008
|
-
|
1009
|
-
// Ensure headers exist
|
1010
|
-
config.headers = config.headers || {};
|
1011
|
-
|
1012
|
-
// Transform request data
|
1013
|
-
config.data = transformData.call(
|
1014
|
-
config,
|
1015
|
-
config.data,
|
1016
|
-
config.headers,
|
1017
|
-
config.transformRequest
|
1018
|
-
);
|
1019
|
-
|
1020
|
-
// Flatten headers
|
1021
|
-
config.headers = utils.merge(
|
1022
|
-
config.headers.common || {},
|
1023
|
-
config.headers[config.method] || {},
|
1024
|
-
config.headers
|
1025
|
-
);
|
1026
|
-
|
1027
|
-
utils.forEach(
|
1028
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
1029
|
-
function cleanHeaderConfig(method) {
|
1030
|
-
delete config.headers[method];
|
1031
|
-
}
|
1032
|
-
);
|
1033
|
-
|
1034
|
-
var adapter = config.adapter || defaults.adapter;
|
1035
|
-
|
1036
|
-
return adapter(config).then(function onAdapterResolution(response) {
|
1037
|
-
throwIfCancellationRequested(config);
|
1038
|
-
|
1039
|
-
// Transform response data
|
1040
|
-
response.data = transformData.call(
|
1041
|
-
config,
|
1042
|
-
response.data,
|
1043
|
-
response.headers,
|
1044
|
-
config.transformResponse
|
1045
|
-
);
|
1046
|
-
|
1047
|
-
return response;
|
1048
|
-
}, function onAdapterRejection(reason) {
|
1049
|
-
if (!isCancel(reason)) {
|
1050
|
-
throwIfCancellationRequested(config);
|
1051
|
-
|
1052
|
-
// Transform response data
|
1053
|
-
if (reason && reason.response) {
|
1054
|
-
reason.response.data = transformData.call(
|
1055
|
-
config,
|
1056
|
-
reason.response.data,
|
1057
|
-
reason.response.headers,
|
1058
|
-
config.transformResponse
|
1059
|
-
);
|
1060
|
-
}
|
1061
|
-
}
|
1062
|
-
|
1063
|
-
return Promise.reject(reason);
|
1064
|
-
});
|
1065
|
-
};
|
1066
|
-
|
1067
|
-
|
1068
|
-
/***/ }),
|
1069
|
-
|
1070
|
-
/***/ "./lib/core/mergeConfig.js":
|
1071
|
-
/*!*********************************!*\
|
1072
|
-
!*** ./lib/core/mergeConfig.js ***!
|
1073
|
-
\*********************************/
|
1074
|
-
/*! no static exports found */
|
1075
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1076
|
-
|
1077
|
-
"use strict";
|
1078
|
-
|
1079
|
-
|
1080
|
-
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
1081
|
-
|
1082
|
-
/**
|
1083
|
-
* Config-specific merge-function which creates a new config-object
|
1084
|
-
* by merging two configuration objects together.
|
1085
|
-
*
|
1086
|
-
* @param {Object} config1
|
1087
|
-
* @param {Object} config2
|
1088
|
-
* @returns {Object} New object resulting from merging config2 to config1
|
1089
|
-
*/
|
1090
|
-
module.exports = function mergeConfig(config1, config2) {
|
1091
|
-
// eslint-disable-next-line no-param-reassign
|
1092
|
-
config2 = config2 || {};
|
1093
|
-
var config = {};
|
1094
|
-
|
1095
|
-
function getMergedValue(target, source) {
|
1096
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
1097
|
-
return utils.merge(target, source);
|
1098
|
-
} else if (utils.isPlainObject(source)) {
|
1099
|
-
return utils.merge({}, source);
|
1100
|
-
} else if (utils.isArray(source)) {
|
1101
|
-
return source.slice();
|
1102
|
-
}
|
1103
|
-
return source;
|
1104
|
-
}
|
1105
|
-
|
1106
|
-
// eslint-disable-next-line consistent-return
|
1107
|
-
function mergeDeepProperties(prop) {
|
1108
|
-
if (!utils.isUndefined(config2[prop])) {
|
1109
|
-
return getMergedValue(config1[prop], config2[prop]);
|
1110
|
-
} else if (!utils.isUndefined(config1[prop])) {
|
1111
|
-
return getMergedValue(undefined, config1[prop]);
|
1112
|
-
}
|
1113
|
-
}
|
1114
|
-
|
1115
|
-
// eslint-disable-next-line consistent-return
|
1116
|
-
function valueFromConfig2(prop) {
|
1117
|
-
if (!utils.isUndefined(config2[prop])) {
|
1118
|
-
return getMergedValue(undefined, config2[prop]);
|
1119
|
-
}
|
1120
|
-
}
|
1121
|
-
|
1122
|
-
// eslint-disable-next-line consistent-return
|
1123
|
-
function defaultToConfig2(prop) {
|
1124
|
-
if (!utils.isUndefined(config2[prop])) {
|
1125
|
-
return getMergedValue(undefined, config2[prop]);
|
1126
|
-
} else if (!utils.isUndefined(config1[prop])) {
|
1127
|
-
return getMergedValue(undefined, config1[prop]);
|
1128
|
-
}
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
// eslint-disable-next-line consistent-return
|
1132
|
-
function mergeDirectKeys(prop) {
|
1133
|
-
if (prop in config2) {
|
1134
|
-
return getMergedValue(config1[prop], config2[prop]);
|
1135
|
-
} else if (prop in config1) {
|
1136
|
-
return getMergedValue(undefined, config1[prop]);
|
1137
|
-
}
|
1138
|
-
}
|
1139
|
-
|
1140
|
-
var mergeMap = {
|
1141
|
-
'url': valueFromConfig2,
|
1142
|
-
'method': valueFromConfig2,
|
1143
|
-
'data': valueFromConfig2,
|
1144
|
-
'baseURL': defaultToConfig2,
|
1145
|
-
'transformRequest': defaultToConfig2,
|
1146
|
-
'transformResponse': defaultToConfig2,
|
1147
|
-
'paramsSerializer': defaultToConfig2,
|
1148
|
-
'timeout': defaultToConfig2,
|
1149
|
-
'timeoutMessage': defaultToConfig2,
|
1150
|
-
'withCredentials': defaultToConfig2,
|
1151
|
-
'adapter': defaultToConfig2,
|
1152
|
-
'responseType': defaultToConfig2,
|
1153
|
-
'xsrfCookieName': defaultToConfig2,
|
1154
|
-
'xsrfHeaderName': defaultToConfig2,
|
1155
|
-
'onUploadProgress': defaultToConfig2,
|
1156
|
-
'onDownloadProgress': defaultToConfig2,
|
1157
|
-
'decompress': defaultToConfig2,
|
1158
|
-
'maxContentLength': defaultToConfig2,
|
1159
|
-
'maxBodyLength': defaultToConfig2,
|
1160
|
-
'beforeRedirect': defaultToConfig2,
|
1161
|
-
'transport': defaultToConfig2,
|
1162
|
-
'httpAgent': defaultToConfig2,
|
1163
|
-
'httpsAgent': defaultToConfig2,
|
1164
|
-
'cancelToken': defaultToConfig2,
|
1165
|
-
'socketPath': defaultToConfig2,
|
1166
|
-
'responseEncoding': defaultToConfig2,
|
1167
|
-
'validateStatus': mergeDirectKeys
|
1168
|
-
};
|
1169
|
-
|
1170
|
-
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
1171
|
-
var merge = mergeMap[prop] || mergeDeepProperties;
|
1172
|
-
var configValue = merge(prop);
|
1173
|
-
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
1174
|
-
});
|
1175
|
-
|
1176
|
-
return config;
|
1177
|
-
};
|
1178
|
-
|
1179
|
-
|
1180
|
-
/***/ }),
|
1181
|
-
|
1182
|
-
/***/ "./lib/core/settle.js":
|
1183
|
-
/*!****************************!*\
|
1184
|
-
!*** ./lib/core/settle.js ***!
|
1185
|
-
\****************************/
|
1186
|
-
/*! no static exports found */
|
1187
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1188
|
-
|
1189
|
-
"use strict";
|
1190
|
-
|
1191
|
-
|
1192
|
-
var AxiosError = __webpack_require__(/*! ./AxiosError */ "./lib/core/AxiosError.js");
|
1193
|
-
|
1194
|
-
/**
|
1195
|
-
* Resolve or reject a Promise based on response status.
|
1196
|
-
*
|
1197
|
-
* @param {Function} resolve A function that resolves the promise.
|
1198
|
-
* @param {Function} reject A function that rejects the promise.
|
1199
|
-
* @param {object} response The response.
|
1200
|
-
*/
|
1201
|
-
module.exports = function settle(resolve, reject, response) {
|
1202
|
-
var validateStatus = response.config.validateStatus;
|
1203
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
1204
|
-
resolve(response);
|
1205
|
-
} else {
|
1206
|
-
reject(new AxiosError(
|
1207
|
-
'Request failed with status code ' + response.status,
|
1208
|
-
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
1209
|
-
response.config,
|
1210
|
-
response.request,
|
1211
|
-
response
|
1212
|
-
));
|
1213
|
-
}
|
1214
|
-
};
|
1215
|
-
|
1216
|
-
|
1217
|
-
/***/ }),
|
1218
|
-
|
1219
|
-
/***/ "./lib/core/transformData.js":
|
1220
|
-
/*!***********************************!*\
|
1221
|
-
!*** ./lib/core/transformData.js ***!
|
1222
|
-
\***********************************/
|
1223
|
-
/*! no static exports found */
|
1224
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1225
|
-
|
1226
|
-
"use strict";
|
1227
|
-
|
1228
|
-
|
1229
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1230
|
-
var defaults = __webpack_require__(/*! ../defaults */ "./lib/defaults/index.js");
|
1231
|
-
|
1232
|
-
/**
|
1233
|
-
* Transform the data for a request or a response
|
1234
|
-
*
|
1235
|
-
* @param {Object|String} data The data to be transformed
|
1236
|
-
* @param {Array} headers The headers for the request or response
|
1237
|
-
* @param {Array|Function} fns A single function or Array of functions
|
1238
|
-
* @returns {*} The resulting transformed data
|
1239
|
-
*/
|
1240
|
-
module.exports = function transformData(data, headers, fns) {
|
1241
|
-
var context = this || defaults;
|
1242
|
-
/*eslint no-param-reassign:0*/
|
1243
|
-
utils.forEach(fns, function transform(fn) {
|
1244
|
-
data = fn.call(context, data, headers);
|
1245
|
-
});
|
1246
|
-
|
1247
|
-
return data;
|
1248
|
-
};
|
1249
|
-
|
1250
|
-
|
1251
|
-
/***/ }),
|
1252
|
-
|
1253
|
-
/***/ "./lib/defaults/index.js":
|
1254
|
-
/*!*******************************!*\
|
1255
|
-
!*** ./lib/defaults/index.js ***!
|
1256
|
-
\*******************************/
|
1257
|
-
/*! no static exports found */
|
1258
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1259
|
-
|
1260
|
-
"use strict";
|
1261
|
-
|
1262
|
-
|
1263
|
-
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
1264
|
-
var normalizeHeaderName = __webpack_require__(/*! ../helpers/normalizeHeaderName */ "./lib/helpers/normalizeHeaderName.js");
|
1265
|
-
var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./lib/core/AxiosError.js");
|
1266
|
-
var transitionalDefaults = __webpack_require__(/*! ./transitional */ "./lib/defaults/transitional.js");
|
1267
|
-
var toFormData = __webpack_require__(/*! ../helpers/toFormData */ "./lib/helpers/toFormData.js");
|
1268
|
-
|
1269
|
-
var DEFAULT_CONTENT_TYPE = {
|
1270
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
1271
|
-
};
|
1272
|
-
|
1273
|
-
function setContentTypeIfUnset(headers, value) {
|
1274
|
-
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
1275
|
-
headers['Content-Type'] = value;
|
1276
|
-
}
|
1277
|
-
}
|
1278
|
-
|
1279
|
-
function getDefaultAdapter() {
|
1280
|
-
var adapter;
|
1281
|
-
if (typeof XMLHttpRequest !== 'undefined') {
|
1282
|
-
// For browsers use XHR adapter
|
1283
|
-
adapter = __webpack_require__(/*! ../adapters/xhr */ "./lib/adapters/xhr.js");
|
1284
|
-
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
1285
|
-
// For node use HTTP adapter
|
1286
|
-
adapter = __webpack_require__(/*! ../adapters/http */ "./lib/adapters/xhr.js");
|
1287
|
-
}
|
1288
|
-
return adapter;
|
1289
|
-
}
|
1290
|
-
|
1291
|
-
function stringifySafely(rawValue, parser, encoder) {
|
1292
|
-
if (utils.isString(rawValue)) {
|
1293
|
-
try {
|
1294
|
-
(parser || JSON.parse)(rawValue);
|
1295
|
-
return utils.trim(rawValue);
|
1296
|
-
} catch (e) {
|
1297
|
-
if (e.name !== 'SyntaxError') {
|
1298
|
-
throw e;
|
1299
|
-
}
|
1300
|
-
}
|
1301
|
-
}
|
1302
|
-
|
1303
|
-
return (encoder || JSON.stringify)(rawValue);
|
1304
|
-
}
|
1305
|
-
|
1306
|
-
var defaults = {
|
1307
|
-
|
1308
|
-
transitional: transitionalDefaults,
|
1309
|
-
|
1310
|
-
adapter: getDefaultAdapter(),
|
1311
|
-
|
1312
|
-
transformRequest: [function transformRequest(data, headers) {
|
1313
|
-
normalizeHeaderName(headers, 'Accept');
|
1314
|
-
normalizeHeaderName(headers, 'Content-Type');
|
1315
|
-
|
1316
|
-
if (utils.isFormData(data) ||
|
1317
|
-
utils.isArrayBuffer(data) ||
|
1318
|
-
utils.isBuffer(data) ||
|
1319
|
-
utils.isStream(data) ||
|
1320
|
-
utils.isFile(data) ||
|
1321
|
-
utils.isBlob(data)
|
1322
|
-
) {
|
1323
|
-
return data;
|
1324
|
-
}
|
1325
|
-
if (utils.isArrayBufferView(data)) {
|
1326
|
-
return data.buffer;
|
1327
|
-
}
|
1328
|
-
if (utils.isURLSearchParams(data)) {
|
1329
|
-
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
1330
|
-
return data.toString();
|
1331
|
-
}
|
1332
|
-
|
1333
|
-
var isObjectPayload = utils.isObject(data);
|
1334
|
-
var contentType = headers && headers['Content-Type'];
|
1335
|
-
|
1336
|
-
var isFileList;
|
1337
|
-
|
1338
|
-
if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {
|
1339
|
-
var _FormData = this.env && this.env.FormData;
|
1340
|
-
return toFormData(isFileList ? {'files[]': data} : data, _FormData && new _FormData());
|
1341
|
-
} else if (isObjectPayload || contentType === 'application/json') {
|
1342
|
-
setContentTypeIfUnset(headers, 'application/json');
|
1343
|
-
return stringifySafely(data);
|
1344
|
-
}
|
1345
|
-
|
1346
|
-
return data;
|
1347
|
-
}],
|
1348
|
-
|
1349
|
-
transformResponse: [function transformResponse(data) {
|
1350
|
-
var transitional = this.transitional || defaults.transitional;
|
1351
|
-
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
1352
|
-
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
1353
|
-
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
1354
|
-
|
1355
|
-
if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
|
1356
|
-
try {
|
1357
|
-
return JSON.parse(data);
|
1358
|
-
} catch (e) {
|
1359
|
-
if (strictJSONParsing) {
|
1360
|
-
if (e.name === 'SyntaxError') {
|
1361
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
1362
|
-
}
|
1363
|
-
throw e;
|
1364
|
-
}
|
1365
|
-
}
|
1366
|
-
}
|
1367
|
-
|
1368
|
-
return data;
|
1369
|
-
}],
|
1370
|
-
|
1371
|
-
/**
|
1372
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
1373
|
-
* timeout is not created.
|
1374
|
-
*/
|
1375
|
-
timeout: 0,
|
1376
|
-
|
1377
|
-
xsrfCookieName: 'XSRF-TOKEN',
|
1378
|
-
xsrfHeaderName: 'X-XSRF-TOKEN',
|
1379
|
-
|
1380
|
-
maxContentLength: -1,
|
1381
|
-
maxBodyLength: -1,
|
1382
|
-
|
1383
|
-
env: {
|
1384
|
-
FormData: __webpack_require__(/*! ./env/FormData */ "./lib/helpers/null.js")
|
1385
|
-
},
|
1386
|
-
|
1387
|
-
validateStatus: function validateStatus(status) {
|
1388
|
-
return status >= 200 && status < 300;
|
1389
|
-
},
|
1390
|
-
|
1391
|
-
headers: {
|
1392
|
-
common: {
|
1393
|
-
'Accept': 'application/json, text/plain, */*'
|
1394
|
-
}
|
1395
|
-
}
|
1396
|
-
};
|
1397
|
-
|
1398
|
-
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
1399
|
-
defaults.headers[method] = {};
|
1400
|
-
});
|
1401
|
-
|
1402
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
1403
|
-
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
1404
|
-
});
|
1405
|
-
|
1406
|
-
module.exports = defaults;
|
1407
|
-
|
1408
|
-
|
1409
|
-
/***/ }),
|
1410
|
-
|
1411
|
-
/***/ "./lib/defaults/transitional.js":
|
1412
|
-
/*!**************************************!*\
|
1413
|
-
!*** ./lib/defaults/transitional.js ***!
|
1414
|
-
\**************************************/
|
1415
|
-
/*! no static exports found */
|
1416
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1417
|
-
|
1418
|
-
"use strict";
|
1419
|
-
|
1420
|
-
|
1421
|
-
module.exports = {
|
1422
|
-
silentJSONParsing: true,
|
1423
|
-
forcedJSONParsing: true,
|
1424
|
-
clarifyTimeoutError: false
|
1425
|
-
};
|
1426
|
-
|
1427
|
-
|
1428
|
-
/***/ }),
|
1429
|
-
|
1430
|
-
/***/ "./lib/env/data.js":
|
1431
|
-
/*!*************************!*\
|
1432
|
-
!*** ./lib/env/data.js ***!
|
1433
|
-
\*************************/
|
1434
|
-
/*! no static exports found */
|
1435
|
-
/***/ (function(module, exports) {
|
1436
|
-
|
1437
|
-
module.exports = {
|
1438
|
-
"version": "0.27.2"
|
1439
|
-
};
|
1440
|
-
|
1441
|
-
/***/ }),
|
1442
|
-
|
1443
|
-
/***/ "./lib/helpers/bind.js":
|
1444
|
-
/*!*****************************!*\
|
1445
|
-
!*** ./lib/helpers/bind.js ***!
|
1446
|
-
\*****************************/
|
1447
|
-
/*! no static exports found */
|
1448
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1449
|
-
|
1450
|
-
"use strict";
|
1451
|
-
|
1452
|
-
|
1453
|
-
module.exports = function bind(fn, thisArg) {
|
1454
|
-
return function wrap() {
|
1455
|
-
var args = new Array(arguments.length);
|
1456
|
-
for (var i = 0; i < args.length; i++) {
|
1457
|
-
args[i] = arguments[i];
|
1458
|
-
}
|
1459
|
-
return fn.apply(thisArg, args);
|
1460
|
-
};
|
1461
|
-
};
|
1462
|
-
|
1463
|
-
|
1464
|
-
/***/ }),
|
1465
|
-
|
1466
|
-
/***/ "./lib/helpers/buildURL.js":
|
1467
|
-
/*!*********************************!*\
|
1468
|
-
!*** ./lib/helpers/buildURL.js ***!
|
1469
|
-
\*********************************/
|
1470
|
-
/*! no static exports found */
|
1471
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1472
|
-
|
1473
|
-
"use strict";
|
1474
|
-
|
1475
|
-
|
1476
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1477
|
-
|
1478
|
-
function encode(val) {
|
1479
|
-
return encodeURIComponent(val).
|
1480
|
-
replace(/%3A/gi, ':').
|
1481
|
-
replace(/%24/g, '$').
|
1482
|
-
replace(/%2C/gi, ',').
|
1483
|
-
replace(/%20/g, '+').
|
1484
|
-
replace(/%5B/gi, '[').
|
1485
|
-
replace(/%5D/gi, ']');
|
1486
|
-
}
|
1487
|
-
|
1488
|
-
/**
|
1489
|
-
* Build a URL by appending params to the end
|
1490
|
-
*
|
1491
|
-
* @param {string} url The base of the url (e.g., http://www.google.com)
|
1492
|
-
* @param {object} [params] The params to be appended
|
1493
|
-
* @returns {string} The formatted url
|
1494
|
-
*/
|
1495
|
-
module.exports = function buildURL(url, params, paramsSerializer) {
|
1496
|
-
/*eslint no-param-reassign:0*/
|
1497
|
-
if (!params) {
|
1498
|
-
return url;
|
1499
|
-
}
|
1500
|
-
|
1501
|
-
var serializedParams;
|
1502
|
-
if (paramsSerializer) {
|
1503
|
-
serializedParams = paramsSerializer(params);
|
1504
|
-
} else if (utils.isURLSearchParams(params)) {
|
1505
|
-
serializedParams = params.toString();
|
1506
|
-
} else {
|
1507
|
-
var parts = [];
|
1508
|
-
|
1509
|
-
utils.forEach(params, function serialize(val, key) {
|
1510
|
-
if (val === null || typeof val === 'undefined') {
|
1511
|
-
return;
|
1512
|
-
}
|
1513
|
-
|
1514
|
-
if (utils.isArray(val)) {
|
1515
|
-
key = key + '[]';
|
1516
|
-
} else {
|
1517
|
-
val = [val];
|
1518
|
-
}
|
1519
|
-
|
1520
|
-
utils.forEach(val, function parseValue(v) {
|
1521
|
-
if (utils.isDate(v)) {
|
1522
|
-
v = v.toISOString();
|
1523
|
-
} else if (utils.isObject(v)) {
|
1524
|
-
v = JSON.stringify(v);
|
1525
|
-
}
|
1526
|
-
parts.push(encode(key) + '=' + encode(v));
|
1527
|
-
});
|
1528
|
-
});
|
1529
|
-
|
1530
|
-
serializedParams = parts.join('&');
|
1531
|
-
}
|
1532
|
-
|
1533
|
-
if (serializedParams) {
|
1534
|
-
var hashmarkIndex = url.indexOf('#');
|
1535
|
-
if (hashmarkIndex !== -1) {
|
1536
|
-
url = url.slice(0, hashmarkIndex);
|
1537
|
-
}
|
1538
|
-
|
1539
|
-
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
1540
|
-
}
|
1541
|
-
|
1542
|
-
return url;
|
1543
|
-
};
|
1544
|
-
|
1545
|
-
|
1546
|
-
/***/ }),
|
1547
|
-
|
1548
|
-
/***/ "./lib/helpers/combineURLs.js":
|
1549
|
-
/*!************************************!*\
|
1550
|
-
!*** ./lib/helpers/combineURLs.js ***!
|
1551
|
-
\************************************/
|
1552
|
-
/*! no static exports found */
|
1553
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1554
|
-
|
1555
|
-
"use strict";
|
1556
|
-
|
1557
|
-
|
1558
|
-
/**
|
1559
|
-
* Creates a new URL by combining the specified URLs
|
1560
|
-
*
|
1561
|
-
* @param {string} baseURL The base URL
|
1562
|
-
* @param {string} relativeURL The relative URL
|
1563
|
-
* @returns {string} The combined URL
|
1564
|
-
*/
|
1565
|
-
module.exports = function combineURLs(baseURL, relativeURL) {
|
1566
|
-
return relativeURL
|
1567
|
-
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
1568
|
-
: baseURL;
|
1569
|
-
};
|
1570
|
-
|
1571
|
-
|
1572
|
-
/***/ }),
|
1573
|
-
|
1574
|
-
/***/ "./lib/helpers/cookies.js":
|
1575
|
-
/*!********************************!*\
|
1576
|
-
!*** ./lib/helpers/cookies.js ***!
|
1577
|
-
\********************************/
|
1578
|
-
/*! no static exports found */
|
1579
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1580
|
-
|
1581
|
-
"use strict";
|
1582
|
-
|
1583
|
-
|
1584
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1585
|
-
|
1586
|
-
module.exports = (
|
1587
|
-
utils.isStandardBrowserEnv() ?
|
1588
|
-
|
1589
|
-
// Standard browser envs support document.cookie
|
1590
|
-
(function standardBrowserEnv() {
|
1591
|
-
return {
|
1592
|
-
write: function write(name, value, expires, path, domain, secure) {
|
1593
|
-
var cookie = [];
|
1594
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
1595
|
-
|
1596
|
-
if (utils.isNumber(expires)) {
|
1597
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
1598
|
-
}
|
1599
|
-
|
1600
|
-
if (utils.isString(path)) {
|
1601
|
-
cookie.push('path=' + path);
|
1602
|
-
}
|
1603
|
-
|
1604
|
-
if (utils.isString(domain)) {
|
1605
|
-
cookie.push('domain=' + domain);
|
1606
|
-
}
|
1607
|
-
|
1608
|
-
if (secure === true) {
|
1609
|
-
cookie.push('secure');
|
1610
|
-
}
|
1611
|
-
|
1612
|
-
document.cookie = cookie.join('; ');
|
1613
|
-
},
|
1614
|
-
|
1615
|
-
read: function read(name) {
|
1616
|
-
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
1617
|
-
return (match ? decodeURIComponent(match[3]) : null);
|
1618
|
-
},
|
1619
|
-
|
1620
|
-
remove: function remove(name) {
|
1621
|
-
this.write(name, '', Date.now() - 86400000);
|
1622
|
-
}
|
1623
|
-
};
|
1624
|
-
})() :
|
1625
|
-
|
1626
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
1627
|
-
(function nonStandardBrowserEnv() {
|
1628
|
-
return {
|
1629
|
-
write: function write() {},
|
1630
|
-
read: function read() { return null; },
|
1631
|
-
remove: function remove() {}
|
1632
|
-
};
|
1633
|
-
})()
|
1634
|
-
);
|
1635
|
-
|
1636
|
-
|
1637
|
-
/***/ }),
|
1638
|
-
|
1639
|
-
/***/ "./lib/helpers/isAbsoluteURL.js":
|
1640
|
-
/*!**************************************!*\
|
1641
|
-
!*** ./lib/helpers/isAbsoluteURL.js ***!
|
1642
|
-
\**************************************/
|
1643
|
-
/*! no static exports found */
|
1644
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1645
|
-
|
1646
|
-
"use strict";
|
1647
|
-
|
1648
|
-
|
1649
|
-
/**
|
1650
|
-
* Determines whether the specified URL is absolute
|
1651
|
-
*
|
1652
|
-
* @param {string} url The URL to test
|
1653
|
-
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
1654
|
-
*/
|
1655
|
-
module.exports = function isAbsoluteURL(url) {
|
1656
|
-
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
1657
|
-
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
1658
|
-
// by any combination of letters, digits, plus, period, or hyphen.
|
1659
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
1660
|
-
};
|
1661
|
-
|
1662
|
-
|
1663
|
-
/***/ }),
|
1664
|
-
|
1665
|
-
/***/ "./lib/helpers/isAxiosError.js":
|
1666
|
-
/*!*************************************!*\
|
1667
|
-
!*** ./lib/helpers/isAxiosError.js ***!
|
1668
|
-
\*************************************/
|
1669
|
-
/*! no static exports found */
|
1670
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1671
|
-
|
1672
|
-
"use strict";
|
1673
|
-
|
1674
|
-
|
1675
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1676
|
-
|
1677
|
-
/**
|
1678
|
-
* Determines whether the payload is an error thrown by Axios
|
1679
|
-
*
|
1680
|
-
* @param {*} payload The value to test
|
1681
|
-
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
1682
|
-
*/
|
1683
|
-
module.exports = function isAxiosError(payload) {
|
1684
|
-
return utils.isObject(payload) && (payload.isAxiosError === true);
|
1685
|
-
};
|
1686
|
-
|
1687
|
-
|
1688
|
-
/***/ }),
|
1689
|
-
|
1690
|
-
/***/ "./lib/helpers/isURLSameOrigin.js":
|
1691
|
-
/*!****************************************!*\
|
1692
|
-
!*** ./lib/helpers/isURLSameOrigin.js ***!
|
1693
|
-
\****************************************/
|
1694
|
-
/*! no static exports found */
|
1695
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1696
|
-
|
1697
|
-
"use strict";
|
1698
|
-
|
1699
|
-
|
1700
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1701
|
-
|
1702
|
-
module.exports = (
|
1703
|
-
utils.isStandardBrowserEnv() ?
|
1704
|
-
|
1705
|
-
// Standard browser envs have full support of the APIs needed to test
|
1706
|
-
// whether the request URL is of the same origin as current location.
|
1707
|
-
(function standardBrowserEnv() {
|
1708
|
-
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
1709
|
-
var urlParsingNode = document.createElement('a');
|
1710
|
-
var originURL;
|
1711
|
-
|
1712
|
-
/**
|
1713
|
-
* Parse a URL to discover it's components
|
1714
|
-
*
|
1715
|
-
* @param {String} url The URL to be parsed
|
1716
|
-
* @returns {Object}
|
1717
|
-
*/
|
1718
|
-
function resolveURL(url) {
|
1719
|
-
var href = url;
|
1720
|
-
|
1721
|
-
if (msie) {
|
1722
|
-
// IE needs attribute set twice to normalize properties
|
1723
|
-
urlParsingNode.setAttribute('href', href);
|
1724
|
-
href = urlParsingNode.href;
|
1725
|
-
}
|
1726
|
-
|
1727
|
-
urlParsingNode.setAttribute('href', href);
|
1728
|
-
|
1729
|
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
1730
|
-
return {
|
1731
|
-
href: urlParsingNode.href,
|
1732
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
1733
|
-
host: urlParsingNode.host,
|
1734
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
1735
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
1736
|
-
hostname: urlParsingNode.hostname,
|
1737
|
-
port: urlParsingNode.port,
|
1738
|
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
1739
|
-
urlParsingNode.pathname :
|
1740
|
-
'/' + urlParsingNode.pathname
|
1741
|
-
};
|
1742
|
-
}
|
1743
|
-
|
1744
|
-
originURL = resolveURL(window.location.href);
|
1745
|
-
|
1746
|
-
/**
|
1747
|
-
* Determine if a URL shares the same origin as the current location
|
1748
|
-
*
|
1749
|
-
* @param {String} requestURL The URL to test
|
1750
|
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
1751
|
-
*/
|
1752
|
-
return function isURLSameOrigin(requestURL) {
|
1753
|
-
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
1754
|
-
return (parsed.protocol === originURL.protocol &&
|
1755
|
-
parsed.host === originURL.host);
|
1756
|
-
};
|
1757
|
-
})() :
|
1758
|
-
|
1759
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
1760
|
-
(function nonStandardBrowserEnv() {
|
1761
|
-
return function isURLSameOrigin() {
|
1762
|
-
return true;
|
1763
|
-
};
|
1764
|
-
})()
|
1765
|
-
);
|
1766
|
-
|
1767
|
-
|
1768
|
-
/***/ }),
|
1769
|
-
|
1770
|
-
/***/ "./lib/helpers/normalizeHeaderName.js":
|
1771
|
-
/*!********************************************!*\
|
1772
|
-
!*** ./lib/helpers/normalizeHeaderName.js ***!
|
1773
|
-
\********************************************/
|
1774
|
-
/*! no static exports found */
|
1775
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1776
|
-
|
1777
|
-
"use strict";
|
1778
|
-
|
1779
|
-
|
1780
|
-
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
1781
|
-
|
1782
|
-
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
1783
|
-
utils.forEach(headers, function processHeader(value, name) {
|
1784
|
-
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
1785
|
-
headers[normalizedName] = value;
|
1786
|
-
delete headers[name];
|
1787
|
-
}
|
1788
|
-
});
|
1789
|
-
};
|
1790
|
-
|
1791
|
-
|
1792
|
-
/***/ }),
|
1793
|
-
|
1794
|
-
/***/ "./lib/helpers/null.js":
|
1795
|
-
/*!*****************************!*\
|
1796
|
-
!*** ./lib/helpers/null.js ***!
|
1797
|
-
\*****************************/
|
1798
|
-
/*! no static exports found */
|
1799
|
-
/***/ (function(module, exports) {
|
1800
|
-
|
1801
|
-
// eslint-disable-next-line strict
|
1802
|
-
module.exports = null;
|
1803
|
-
|
1804
|
-
|
1805
|
-
/***/ }),
|
1806
|
-
|
1807
|
-
/***/ "./lib/helpers/parseHeaders.js":
|
1808
|
-
/*!*************************************!*\
|
1809
|
-
!*** ./lib/helpers/parseHeaders.js ***!
|
1810
|
-
\*************************************/
|
1811
|
-
/*! no static exports found */
|
1812
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1813
|
-
|
1814
|
-
"use strict";
|
1815
|
-
|
1816
|
-
|
1817
|
-
var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
|
1818
|
-
|
1819
|
-
// Headers whose duplicates are ignored by node
|
1820
|
-
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
1821
|
-
var ignoreDuplicateOf = [
|
1822
|
-
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
1823
|
-
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
1824
|
-
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
1825
|
-
'referer', 'retry-after', 'user-agent'
|
1826
|
-
];
|
1827
|
-
|
1828
|
-
/**
|
1829
|
-
* Parse headers into an object
|
1830
|
-
*
|
1831
|
-
* ```
|
1832
|
-
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
1833
|
-
* Content-Type: application/json
|
1834
|
-
* Connection: keep-alive
|
1835
|
-
* Transfer-Encoding: chunked
|
1836
|
-
* ```
|
1837
|
-
*
|
1838
|
-
* @param {String} headers Headers needing to be parsed
|
1839
|
-
* @returns {Object} Headers parsed into an object
|
1840
|
-
*/
|
1841
|
-
module.exports = function parseHeaders(headers) {
|
1842
|
-
var parsed = {};
|
1843
|
-
var key;
|
1844
|
-
var val;
|
1845
|
-
var i;
|
1846
|
-
|
1847
|
-
if (!headers) { return parsed; }
|
1848
|
-
|
1849
|
-
utils.forEach(headers.split('\n'), function parser(line) {
|
1850
|
-
i = line.indexOf(':');
|
1851
|
-
key = utils.trim(line.substr(0, i)).toLowerCase();
|
1852
|
-
val = utils.trim(line.substr(i + 1));
|
1853
|
-
|
1854
|
-
if (key) {
|
1855
|
-
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
1856
|
-
return;
|
1857
|
-
}
|
1858
|
-
if (key === 'set-cookie') {
|
1859
|
-
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
1860
|
-
} else {
|
1861
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
1862
|
-
}
|
1863
|
-
}
|
1864
|
-
});
|
1865
|
-
|
1866
|
-
return parsed;
|
1867
|
-
};
|
1868
|
-
|
1869
|
-
|
1870
|
-
/***/ }),
|
1871
|
-
|
1872
|
-
/***/ "./lib/helpers/parseProtocol.js":
|
1873
|
-
/*!**************************************!*\
|
1874
|
-
!*** ./lib/helpers/parseProtocol.js ***!
|
1875
|
-
\**************************************/
|
1876
|
-
/*! no static exports found */
|
1877
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1878
|
-
|
1879
|
-
"use strict";
|
1880
|
-
|
1881
|
-
|
1882
|
-
module.exports = function parseProtocol(url) {
|
1883
|
-
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
1884
|
-
return match && match[1] || '';
|
1885
|
-
};
|
1886
|
-
|
1887
|
-
|
1888
|
-
/***/ }),
|
1889
|
-
|
1890
|
-
/***/ "./lib/helpers/spread.js":
|
1891
|
-
/*!*******************************!*\
|
1892
|
-
!*** ./lib/helpers/spread.js ***!
|
1893
|
-
\*******************************/
|
1894
|
-
/*! no static exports found */
|
1895
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1896
|
-
|
1897
|
-
"use strict";
|
1898
|
-
|
1899
|
-
|
1900
|
-
/**
|
1901
|
-
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
1902
|
-
*
|
1903
|
-
* Common use case would be to use `Function.prototype.apply`.
|
1904
|
-
*
|
1905
|
-
* ```js
|
1906
|
-
* function f(x, y, z) {}
|
1907
|
-
* var args = [1, 2, 3];
|
1908
|
-
* f.apply(null, args);
|
1909
|
-
* ```
|
1910
|
-
*
|
1911
|
-
* With `spread` this example can be re-written.
|
1912
|
-
*
|
1913
|
-
* ```js
|
1914
|
-
* spread(function(x, y, z) {})([1, 2, 3]);
|
1915
|
-
* ```
|
1916
|
-
*
|
1917
|
-
* @param {Function} callback
|
1918
|
-
* @returns {Function}
|
1919
|
-
*/
|
1920
|
-
module.exports = function spread(callback) {
|
1921
|
-
return function wrap(arr) {
|
1922
|
-
return callback.apply(null, arr);
|
1923
|
-
};
|
1924
|
-
};
|
1925
|
-
|
1926
|
-
|
1927
|
-
/***/ }),
|
1928
|
-
|
1929
|
-
/***/ "./lib/helpers/toFormData.js":
|
1930
|
-
/*!***********************************!*\
|
1931
|
-
!*** ./lib/helpers/toFormData.js ***!
|
1932
|
-
\***********************************/
|
1933
|
-
/*! no static exports found */
|
1934
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1935
|
-
|
1936
|
-
"use strict";
|
1937
|
-
|
1938
|
-
|
1939
|
-
var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
|
1940
|
-
|
1941
|
-
/**
|
1942
|
-
* Convert a data object to FormData
|
1943
|
-
* @param {Object} obj
|
1944
|
-
* @param {?Object} [formData]
|
1945
|
-
* @returns {Object}
|
1946
|
-
**/
|
1947
|
-
|
1948
|
-
function toFormData(obj, formData) {
|
1949
|
-
// eslint-disable-next-line no-param-reassign
|
1950
|
-
formData = formData || new FormData();
|
1951
|
-
|
1952
|
-
var stack = [];
|
1953
|
-
|
1954
|
-
function convertValue(value) {
|
1955
|
-
if (value === null) return '';
|
1956
|
-
|
1957
|
-
if (utils.isDate(value)) {
|
1958
|
-
return value.toISOString();
|
1959
|
-
}
|
1960
|
-
|
1961
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
1962
|
-
return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
1963
|
-
}
|
1964
|
-
|
1965
|
-
return value;
|
1966
|
-
}
|
1967
|
-
|
1968
|
-
function build(data, parentKey) {
|
1969
|
-
if (utils.isPlainObject(data) || utils.isArray(data)) {
|
1970
|
-
if (stack.indexOf(data) !== -1) {
|
1971
|
-
throw Error('Circular reference detected in ' + parentKey);
|
1972
|
-
}
|
1973
|
-
|
1974
|
-
stack.push(data);
|
1975
|
-
|
1976
|
-
utils.forEach(data, function each(value, key) {
|
1977
|
-
if (utils.isUndefined(value)) return;
|
1978
|
-
var fullKey = parentKey ? parentKey + '.' + key : key;
|
1979
|
-
var arr;
|
1980
|
-
|
1981
|
-
if (value && !parentKey && typeof value === 'object') {
|
1982
|
-
if (utils.endsWith(key, '{}')) {
|
1983
|
-
// eslint-disable-next-line no-param-reassign
|
1984
|
-
value = JSON.stringify(value);
|
1985
|
-
} else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
|
1986
|
-
// eslint-disable-next-line func-names
|
1987
|
-
arr.forEach(function(el) {
|
1988
|
-
!utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
|
1989
|
-
});
|
1990
|
-
return;
|
1991
|
-
}
|
1992
|
-
}
|
1993
|
-
|
1994
|
-
build(value, fullKey);
|
1995
|
-
});
|
1996
|
-
|
1997
|
-
stack.pop();
|
1998
|
-
} else {
|
1999
|
-
formData.append(parentKey, convertValue(data));
|
2000
|
-
}
|
2001
|
-
}
|
2002
|
-
|
2003
|
-
build(obj);
|
2004
|
-
|
2005
|
-
return formData;
|
2006
|
-
}
|
2007
|
-
|
2008
|
-
module.exports = toFormData;
|
2009
|
-
|
2010
|
-
|
2011
|
-
/***/ }),
|
2012
|
-
|
2013
|
-
/***/ "./lib/helpers/validator.js":
|
2014
|
-
/*!**********************************!*\
|
2015
|
-
!*** ./lib/helpers/validator.js ***!
|
2016
|
-
\**********************************/
|
2017
|
-
/*! no static exports found */
|
2018
|
-
/***/ (function(module, exports, __webpack_require__) {
|
2019
|
-
|
2020
|
-
"use strict";
|
2021
|
-
|
2022
|
-
|
2023
|
-
var VERSION = __webpack_require__(/*! ../env/data */ "./lib/env/data.js").version;
|
2024
|
-
var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./lib/core/AxiosError.js");
|
2025
|
-
|
2026
|
-
var validators = {};
|
2027
|
-
|
2028
|
-
// eslint-disable-next-line func-names
|
2029
|
-
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
|
2030
|
-
validators[type] = function validator(thing) {
|
2031
|
-
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
2032
|
-
};
|
2033
|
-
});
|
2034
|
-
|
2035
|
-
var deprecatedWarnings = {};
|
2036
|
-
|
2037
|
-
/**
|
2038
|
-
* Transitional option validator
|
2039
|
-
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
2040
|
-
* @param {string?} version - deprecated version / removed since version
|
2041
|
-
* @param {string?} message - some message with additional info
|
2042
|
-
* @returns {function}
|
2043
|
-
*/
|
2044
|
-
validators.transitional = function transitional(validator, version, message) {
|
2045
|
-
function formatMessage(opt, desc) {
|
2046
|
-
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
2047
|
-
}
|
2048
|
-
|
2049
|
-
// eslint-disable-next-line func-names
|
2050
|
-
return function(value, opt, opts) {
|
2051
|
-
if (validator === false) {
|
2052
|
-
throw new AxiosError(
|
2053
|
-
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
2054
|
-
AxiosError.ERR_DEPRECATED
|
2055
|
-
);
|
2056
|
-
}
|
2057
|
-
|
2058
|
-
if (version && !deprecatedWarnings[opt]) {
|
2059
|
-
deprecatedWarnings[opt] = true;
|
2060
|
-
// eslint-disable-next-line no-console
|
2061
|
-
console.warn(
|
2062
|
-
formatMessage(
|
2063
|
-
opt,
|
2064
|
-
' has been deprecated since v' + version + ' and will be removed in the near future'
|
2065
|
-
)
|
2066
|
-
);
|
2067
|
-
}
|
2068
|
-
|
2069
|
-
return validator ? validator(value, opt, opts) : true;
|
2070
|
-
};
|
2071
|
-
};
|
2072
|
-
|
2073
|
-
/**
|
2074
|
-
* Assert object's properties type
|
2075
|
-
* @param {object} options
|
2076
|
-
* @param {object} schema
|
2077
|
-
* @param {boolean?} allowUnknown
|
2078
|
-
*/
|
2079
|
-
|
2080
|
-
function assertOptions(options, schema, allowUnknown) {
|
2081
|
-
if (typeof options !== 'object') {
|
2082
|
-
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
2083
|
-
}
|
2084
|
-
var keys = Object.keys(options);
|
2085
|
-
var i = keys.length;
|
2086
|
-
while (i-- > 0) {
|
2087
|
-
var opt = keys[i];
|
2088
|
-
var validator = schema[opt];
|
2089
|
-
if (validator) {
|
2090
|
-
var value = options[opt];
|
2091
|
-
var result = value === undefined || validator(value, opt, options);
|
2092
|
-
if (result !== true) {
|
2093
|
-
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
2094
|
-
}
|
2095
|
-
continue;
|
2096
|
-
}
|
2097
|
-
if (allowUnknown !== true) {
|
2098
|
-
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
2099
|
-
}
|
2100
|
-
}
|
2101
|
-
}
|
2102
|
-
|
2103
|
-
module.exports = {
|
2104
|
-
assertOptions: assertOptions,
|
2105
|
-
validators: validators
|
2106
|
-
};
|
2107
|
-
|
2108
|
-
|
2109
|
-
/***/ }),
|
2110
|
-
|
2111
|
-
/***/ "./lib/utils.js":
|
2112
|
-
/*!**********************!*\
|
2113
|
-
!*** ./lib/utils.js ***!
|
2114
|
-
\**********************/
|
2115
|
-
/*! no static exports found */
|
2116
|
-
/***/ (function(module, exports, __webpack_require__) {
|
2117
|
-
|
2118
|
-
"use strict";
|
2119
|
-
|
2120
|
-
|
2121
|
-
var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js");
|
2122
|
-
|
2123
|
-
// utils is a library of generic helper functions non-specific to axios
|
2124
|
-
|
2125
|
-
var toString = Object.prototype.toString;
|
2126
|
-
|
2127
|
-
// eslint-disable-next-line func-names
|
2128
|
-
var kindOf = (function(cache) {
|
2129
|
-
// eslint-disable-next-line func-names
|
2130
|
-
return function(thing) {
|
2131
|
-
var str = toString.call(thing);
|
2132
|
-
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
2133
|
-
};
|
2134
|
-
})(Object.create(null));
|
2135
|
-
|
2136
|
-
function kindOfTest(type) {
|
2137
|
-
type = type.toLowerCase();
|
2138
|
-
return function isKindOf(thing) {
|
2139
|
-
return kindOf(thing) === type;
|
2140
|
-
};
|
2141
|
-
}
|
2142
|
-
|
2143
|
-
/**
|
2144
|
-
* Determine if a value is an Array
|
2145
|
-
*
|
2146
|
-
* @param {Object} val The value to test
|
2147
|
-
* @returns {boolean} True if value is an Array, otherwise false
|
2148
|
-
*/
|
2149
|
-
function isArray(val) {
|
2150
|
-
return Array.isArray(val);
|
2151
|
-
}
|
2152
|
-
|
2153
|
-
/**
|
2154
|
-
* Determine if a value is undefined
|
2155
|
-
*
|
2156
|
-
* @param {Object} val The value to test
|
2157
|
-
* @returns {boolean} True if the value is undefined, otherwise false
|
2158
|
-
*/
|
2159
|
-
function isUndefined(val) {
|
2160
|
-
return typeof val === 'undefined';
|
2161
|
-
}
|
2162
|
-
|
2163
|
-
/**
|
2164
|
-
* Determine if a value is a Buffer
|
2165
|
-
*
|
2166
|
-
* @param {Object} val The value to test
|
2167
|
-
* @returns {boolean} True if value is a Buffer, otherwise false
|
2168
|
-
*/
|
2169
|
-
function isBuffer(val) {
|
2170
|
-
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
2171
|
-
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
2172
|
-
}
|
2173
|
-
|
2174
|
-
/**
|
2175
|
-
* Determine if a value is an ArrayBuffer
|
2176
|
-
*
|
2177
|
-
* @function
|
2178
|
-
* @param {Object} val The value to test
|
2179
|
-
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
2180
|
-
*/
|
2181
|
-
var isArrayBuffer = kindOfTest('ArrayBuffer');
|
2182
|
-
|
2183
|
-
|
2184
|
-
/**
|
2185
|
-
* Determine if a value is a view on an ArrayBuffer
|
2186
|
-
*
|
2187
|
-
* @param {Object} val The value to test
|
2188
|
-
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
2189
|
-
*/
|
2190
|
-
function isArrayBufferView(val) {
|
2191
|
-
var result;
|
2192
|
-
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
2193
|
-
result = ArrayBuffer.isView(val);
|
2194
|
-
} else {
|
2195
|
-
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
2196
|
-
}
|
2197
|
-
return result;
|
2198
|
-
}
|
2199
|
-
|
2200
|
-
/**
|
2201
|
-
* Determine if a value is a String
|
2202
|
-
*
|
2203
|
-
* @param {Object} val The value to test
|
2204
|
-
* @returns {boolean} True if value is a String, otherwise false
|
2205
|
-
*/
|
2206
|
-
function isString(val) {
|
2207
|
-
return typeof val === 'string';
|
2208
|
-
}
|
2209
|
-
|
2210
|
-
/**
|
2211
|
-
* Determine if a value is a Number
|
2212
|
-
*
|
2213
|
-
* @param {Object} val The value to test
|
2214
|
-
* @returns {boolean} True if value is a Number, otherwise false
|
2215
|
-
*/
|
2216
|
-
function isNumber(val) {
|
2217
|
-
return typeof val === 'number';
|
2218
|
-
}
|
2219
|
-
|
2220
|
-
/**
|
2221
|
-
* Determine if a value is an Object
|
2222
|
-
*
|
2223
|
-
* @param {Object} val The value to test
|
2224
|
-
* @returns {boolean} True if value is an Object, otherwise false
|
2225
|
-
*/
|
2226
|
-
function isObject(val) {
|
2227
|
-
return val !== null && typeof val === 'object';
|
2228
|
-
}
|
2229
|
-
|
2230
|
-
/**
|
2231
|
-
* Determine if a value is a plain Object
|
2232
|
-
*
|
2233
|
-
* @param {Object} val The value to test
|
2234
|
-
* @return {boolean} True if value is a plain Object, otherwise false
|
2235
|
-
*/
|
2236
|
-
function isPlainObject(val) {
|
2237
|
-
if (kindOf(val) !== 'object') {
|
2238
|
-
return false;
|
2239
|
-
}
|
2240
|
-
|
2241
|
-
var prototype = Object.getPrototypeOf(val);
|
2242
|
-
return prototype === null || prototype === Object.prototype;
|
2243
|
-
}
|
2244
|
-
|
2245
|
-
/**
|
2246
|
-
* Determine if a value is a Date
|
2247
|
-
*
|
2248
|
-
* @function
|
2249
|
-
* @param {Object} val The value to test
|
2250
|
-
* @returns {boolean} True if value is a Date, otherwise false
|
2251
|
-
*/
|
2252
|
-
var isDate = kindOfTest('Date');
|
2253
|
-
|
2254
|
-
/**
|
2255
|
-
* Determine if a value is a File
|
2256
|
-
*
|
2257
|
-
* @function
|
2258
|
-
* @param {Object} val The value to test
|
2259
|
-
* @returns {boolean} True if value is a File, otherwise false
|
2260
|
-
*/
|
2261
|
-
var isFile = kindOfTest('File');
|
2262
|
-
|
2263
|
-
/**
|
2264
|
-
* Determine if a value is a Blob
|
2265
|
-
*
|
2266
|
-
* @function
|
2267
|
-
* @param {Object} val The value to test
|
2268
|
-
* @returns {boolean} True if value is a Blob, otherwise false
|
2269
|
-
*/
|
2270
|
-
var isBlob = kindOfTest('Blob');
|
2271
|
-
|
2272
|
-
/**
|
2273
|
-
* Determine if a value is a FileList
|
2274
|
-
*
|
2275
|
-
* @function
|
2276
|
-
* @param {Object} val The value to test
|
2277
|
-
* @returns {boolean} True if value is a File, otherwise false
|
2278
|
-
*/
|
2279
|
-
var isFileList = kindOfTest('FileList');
|
2280
|
-
|
2281
|
-
/**
|
2282
|
-
* Determine if a value is a Function
|
2283
|
-
*
|
2284
|
-
* @param {Object} val The value to test
|
2285
|
-
* @returns {boolean} True if value is a Function, otherwise false
|
2286
|
-
*/
|
2287
|
-
function isFunction(val) {
|
2288
|
-
return toString.call(val) === '[object Function]';
|
2289
|
-
}
|
2290
|
-
|
2291
|
-
/**
|
2292
|
-
* Determine if a value is a Stream
|
2293
|
-
*
|
2294
|
-
* @param {Object} val The value to test
|
2295
|
-
* @returns {boolean} True if value is a Stream, otherwise false
|
2296
|
-
*/
|
2297
|
-
function isStream(val) {
|
2298
|
-
return isObject(val) && isFunction(val.pipe);
|
2299
|
-
}
|
2300
|
-
|
2301
|
-
/**
|
2302
|
-
* Determine if a value is a FormData
|
2303
|
-
*
|
2304
|
-
* @param {Object} thing The value to test
|
2305
|
-
* @returns {boolean} True if value is an FormData, otherwise false
|
2306
|
-
*/
|
2307
|
-
function isFormData(thing) {
|
2308
|
-
var pattern = '[object FormData]';
|
2309
|
-
return thing && (
|
2310
|
-
(typeof FormData === 'function' && thing instanceof FormData) ||
|
2311
|
-
toString.call(thing) === pattern ||
|
2312
|
-
(isFunction(thing.toString) && thing.toString() === pattern)
|
2313
|
-
);
|
2314
|
-
}
|
2315
|
-
|
2316
|
-
/**
|
2317
|
-
* Determine if a value is a URLSearchParams object
|
2318
|
-
* @function
|
2319
|
-
* @param {Object} val The value to test
|
2320
|
-
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
2321
|
-
*/
|
2322
|
-
var isURLSearchParams = kindOfTest('URLSearchParams');
|
2323
|
-
|
2324
|
-
/**
|
2325
|
-
* Trim excess whitespace off the beginning and end of a string
|
2326
|
-
*
|
2327
|
-
* @param {String} str The String to trim
|
2328
|
-
* @returns {String} The String freed of excess whitespace
|
2329
|
-
*/
|
2330
|
-
function trim(str) {
|
2331
|
-
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
|
2332
|
-
}
|
2333
|
-
|
2334
|
-
/**
|
2335
|
-
* Determine if we're running in a standard browser environment
|
2336
|
-
*
|
2337
|
-
* This allows axios to run in a web worker, and react-native.
|
2338
|
-
* Both environments support XMLHttpRequest, but not fully standard globals.
|
2339
|
-
*
|
2340
|
-
* web workers:
|
2341
|
-
* typeof window -> undefined
|
2342
|
-
* typeof document -> undefined
|
2343
|
-
*
|
2344
|
-
* react-native:
|
2345
|
-
* navigator.product -> 'ReactNative'
|
2346
|
-
* nativescript
|
2347
|
-
* navigator.product -> 'NativeScript' or 'NS'
|
2348
|
-
*/
|
2349
|
-
function isStandardBrowserEnv() {
|
2350
|
-
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
2351
|
-
navigator.product === 'NativeScript' ||
|
2352
|
-
navigator.product === 'NS')) {
|
2353
|
-
return false;
|
2354
|
-
}
|
2355
|
-
return (
|
2356
|
-
typeof window !== 'undefined' &&
|
2357
|
-
typeof document !== 'undefined'
|
2358
|
-
);
|
2359
|
-
}
|
2360
|
-
|
2361
|
-
/**
|
2362
|
-
* Iterate over an Array or an Object invoking a function for each item.
|
2363
|
-
*
|
2364
|
-
* If `obj` is an Array callback will be called passing
|
2365
|
-
* the value, index, and complete array for each item.
|
2366
|
-
*
|
2367
|
-
* If 'obj' is an Object callback will be called passing
|
2368
|
-
* the value, key, and complete object for each property.
|
2369
|
-
*
|
2370
|
-
* @param {Object|Array} obj The object to iterate
|
2371
|
-
* @param {Function} fn The callback to invoke for each item
|
2372
|
-
*/
|
2373
|
-
function forEach(obj, fn) {
|
2374
|
-
// Don't bother if no value provided
|
2375
|
-
if (obj === null || typeof obj === 'undefined') {
|
2376
|
-
return;
|
2377
|
-
}
|
2378
|
-
|
2379
|
-
// Force an array if not already something iterable
|
2380
|
-
if (typeof obj !== 'object') {
|
2381
|
-
/*eslint no-param-reassign:0*/
|
2382
|
-
obj = [obj];
|
2383
|
-
}
|
2384
|
-
|
2385
|
-
if (isArray(obj)) {
|
2386
|
-
// Iterate over array values
|
2387
|
-
for (var i = 0, l = obj.length; i < l; i++) {
|
2388
|
-
fn.call(null, obj[i], i, obj);
|
2389
|
-
}
|
2390
|
-
} else {
|
2391
|
-
// Iterate over object keys
|
2392
|
-
for (var key in obj) {
|
2393
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
2394
|
-
fn.call(null, obj[key], key, obj);
|
2395
|
-
}
|
2396
|
-
}
|
2397
|
-
}
|
2398
|
-
}
|
2399
|
-
|
2400
|
-
/**
|
2401
|
-
* Accepts varargs expecting each argument to be an object, then
|
2402
|
-
* immutably merges the properties of each object and returns result.
|
2403
|
-
*
|
2404
|
-
* When multiple objects contain the same key the later object in
|
2405
|
-
* the arguments list will take precedence.
|
2406
|
-
*
|
2407
|
-
* Example:
|
2408
|
-
*
|
2409
|
-
* ```js
|
2410
|
-
* var result = merge({foo: 123}, {foo: 456});
|
2411
|
-
* console.log(result.foo); // outputs 456
|
2412
|
-
* ```
|
2413
|
-
*
|
2414
|
-
* @param {Object} obj1 Object to merge
|
2415
|
-
* @returns {Object} Result of all merge properties
|
2416
|
-
*/
|
2417
|
-
function merge(/* obj1, obj2, obj3, ... */) {
|
2418
|
-
var result = {};
|
2419
|
-
function assignValue(val, key) {
|
2420
|
-
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
2421
|
-
result[key] = merge(result[key], val);
|
2422
|
-
} else if (isPlainObject(val)) {
|
2423
|
-
result[key] = merge({}, val);
|
2424
|
-
} else if (isArray(val)) {
|
2425
|
-
result[key] = val.slice();
|
2426
|
-
} else {
|
2427
|
-
result[key] = val;
|
2428
|
-
}
|
2429
|
-
}
|
2430
|
-
|
2431
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
2432
|
-
forEach(arguments[i], assignValue);
|
2433
|
-
}
|
2434
|
-
return result;
|
2435
|
-
}
|
2436
|
-
|
2437
|
-
/**
|
2438
|
-
* Extends object a by mutably adding to it the properties of object b.
|
2439
|
-
*
|
2440
|
-
* @param {Object} a The object to be extended
|
2441
|
-
* @param {Object} b The object to copy properties from
|
2442
|
-
* @param {Object} thisArg The object to bind function to
|
2443
|
-
* @return {Object} The resulting value of object a
|
2444
|
-
*/
|
2445
|
-
function extend(a, b, thisArg) {
|
2446
|
-
forEach(b, function assignValue(val, key) {
|
2447
|
-
if (thisArg && typeof val === 'function') {
|
2448
|
-
a[key] = bind(val, thisArg);
|
2449
|
-
} else {
|
2450
|
-
a[key] = val;
|
2451
|
-
}
|
2452
|
-
});
|
2453
|
-
return a;
|
2454
|
-
}
|
2455
|
-
|
2456
|
-
/**
|
2457
|
-
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
2458
|
-
*
|
2459
|
-
* @param {string} content with BOM
|
2460
|
-
* @return {string} content value without BOM
|
2461
|
-
*/
|
2462
|
-
function stripBOM(content) {
|
2463
|
-
if (content.charCodeAt(0) === 0xFEFF) {
|
2464
|
-
content = content.slice(1);
|
2465
|
-
}
|
2466
|
-
return content;
|
2467
|
-
}
|
2468
|
-
|
2469
|
-
/**
|
2470
|
-
* Inherit the prototype methods from one constructor into another
|
2471
|
-
* @param {function} constructor
|
2472
|
-
* @param {function} superConstructor
|
2473
|
-
* @param {object} [props]
|
2474
|
-
* @param {object} [descriptors]
|
2475
|
-
*/
|
2476
|
-
|
2477
|
-
function inherits(constructor, superConstructor, props, descriptors) {
|
2478
|
-
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
2479
|
-
constructor.prototype.constructor = constructor;
|
2480
|
-
props && Object.assign(constructor.prototype, props);
|
2481
|
-
}
|
2482
|
-
|
2483
|
-
/**
|
2484
|
-
* Resolve object with deep prototype chain to a flat object
|
2485
|
-
* @param {Object} sourceObj source object
|
2486
|
-
* @param {Object} [destObj]
|
2487
|
-
* @param {Function} [filter]
|
2488
|
-
* @returns {Object}
|
2489
|
-
*/
|
2490
|
-
|
2491
|
-
function toFlatObject(sourceObj, destObj, filter) {
|
2492
|
-
var props;
|
2493
|
-
var i;
|
2494
|
-
var prop;
|
2495
|
-
var merged = {};
|
2496
|
-
|
2497
|
-
destObj = destObj || {};
|
2498
|
-
|
2499
|
-
do {
|
2500
|
-
props = Object.getOwnPropertyNames(sourceObj);
|
2501
|
-
i = props.length;
|
2502
|
-
while (i-- > 0) {
|
2503
|
-
prop = props[i];
|
2504
|
-
if (!merged[prop]) {
|
2505
|
-
destObj[prop] = sourceObj[prop];
|
2506
|
-
merged[prop] = true;
|
2507
|
-
}
|
2508
|
-
}
|
2509
|
-
sourceObj = Object.getPrototypeOf(sourceObj);
|
2510
|
-
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
2511
|
-
|
2512
|
-
return destObj;
|
2513
|
-
}
|
2514
|
-
|
2515
|
-
/*
|
2516
|
-
* determines whether a string ends with the characters of a specified string
|
2517
|
-
* @param {String} str
|
2518
|
-
* @param {String} searchString
|
2519
|
-
* @param {Number} [position= 0]
|
2520
|
-
* @returns {boolean}
|
2521
|
-
*/
|
2522
|
-
function endsWith(str, searchString, position) {
|
2523
|
-
str = String(str);
|
2524
|
-
if (position === undefined || position > str.length) {
|
2525
|
-
position = str.length;
|
2526
|
-
}
|
2527
|
-
position -= searchString.length;
|
2528
|
-
var lastIndex = str.indexOf(searchString, position);
|
2529
|
-
return lastIndex !== -1 && lastIndex === position;
|
2530
|
-
}
|
2531
|
-
|
2532
|
-
|
2533
|
-
/**
|
2534
|
-
* Returns new array from array like object
|
2535
|
-
* @param {*} [thing]
|
2536
|
-
* @returns {Array}
|
2537
|
-
*/
|
2538
|
-
function toArray(thing) {
|
2539
|
-
if (!thing) return null;
|
2540
|
-
var i = thing.length;
|
2541
|
-
if (isUndefined(i)) return null;
|
2542
|
-
var arr = new Array(i);
|
2543
|
-
while (i-- > 0) {
|
2544
|
-
arr[i] = thing[i];
|
2545
|
-
}
|
2546
|
-
return arr;
|
2547
|
-
}
|
2548
|
-
|
2549
|
-
// eslint-disable-next-line func-names
|
2550
|
-
var isTypedArray = (function(TypedArray) {
|
2551
|
-
// eslint-disable-next-line func-names
|
2552
|
-
return function(thing) {
|
2553
|
-
return TypedArray && thing instanceof TypedArray;
|
2554
|
-
};
|
2555
|
-
})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
|
2556
|
-
|
2557
|
-
module.exports = {
|
2558
|
-
isArray: isArray,
|
2559
|
-
isArrayBuffer: isArrayBuffer,
|
2560
|
-
isBuffer: isBuffer,
|
2561
|
-
isFormData: isFormData,
|
2562
|
-
isArrayBufferView: isArrayBufferView,
|
2563
|
-
isString: isString,
|
2564
|
-
isNumber: isNumber,
|
2565
|
-
isObject: isObject,
|
2566
|
-
isPlainObject: isPlainObject,
|
2567
|
-
isUndefined: isUndefined,
|
2568
|
-
isDate: isDate,
|
2569
|
-
isFile: isFile,
|
2570
|
-
isBlob: isBlob,
|
2571
|
-
isFunction: isFunction,
|
2572
|
-
isStream: isStream,
|
2573
|
-
isURLSearchParams: isURLSearchParams,
|
2574
|
-
isStandardBrowserEnv: isStandardBrowserEnv,
|
2575
|
-
forEach: forEach,
|
2576
|
-
merge: merge,
|
2577
|
-
extend: extend,
|
2578
|
-
trim: trim,
|
2579
|
-
stripBOM: stripBOM,
|
2580
|
-
inherits: inherits,
|
2581
|
-
toFlatObject: toFlatObject,
|
2582
|
-
kindOf: kindOf,
|
2583
|
-
kindOfTest: kindOfTest,
|
2584
|
-
endsWith: endsWith,
|
2585
|
-
toArray: toArray,
|
2586
|
-
isTypedArray: isTypedArray,
|
2587
|
-
isFileList: isFileList
|
2588
|
-
};
|
2589
|
-
|
2590
|
-
|
2591
|
-
/***/ })
|
2592
|
-
|
2593
|
-
/******/ });
|
2594
|
-
});
|
2595
|
-
//# sourceMappingURL=axios.map
|