node-red-contrib-tak-registration 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +8 -6
- package/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/node_modules/@types/node/buffer.d.ts +7 -3
- package/node_modules/@types/node/child_process.d.ts +28 -124
- package/node_modules/@types/node/cluster.d.ts +15 -15
- package/node_modules/@types/node/console.d.ts +17 -17
- package/node_modules/@types/node/crypto.d.ts +95 -38
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/diagnostics_channel.d.ts +18 -13
- package/node_modules/@types/node/dns/promises.d.ts +36 -9
- package/node_modules/@types/node/dns.d.ts +89 -36
- package/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/node/events.d.ts +1 -2
- package/node_modules/@types/node/fs/promises.d.ts +67 -40
- package/node_modules/@types/node/fs.d.ts +88 -52
- package/node_modules/@types/node/globals.d.ts +148 -351
- package/node_modules/@types/node/globals.typedarray.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +73 -7
- package/node_modules/@types/node/http2.d.ts +88 -15
- package/node_modules/@types/node/https.d.ts +1 -1
- package/node_modules/@types/node/index.d.ts +13 -6
- package/node_modules/@types/node/inspector.d.ts +222 -13
- package/node_modules/@types/node/module.d.ts +153 -31
- package/node_modules/@types/node/net.d.ts +3 -6
- package/node_modules/@types/node/os.d.ts +8 -7
- package/node_modules/@types/node/package.json +14 -84
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +24 -10
- package/node_modules/@types/node/process.d.ts +21 -11
- package/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/node/readline/promises.d.ts +0 -1
- package/node_modules/@types/node/readline.d.ts +13 -13
- package/node_modules/@types/node/repl.d.ts +25 -17
- package/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/node/sqlite.d.ts +209 -3
- package/node_modules/@types/node/stream/web.d.ts +8 -0
- package/node_modules/@types/node/stream.d.ts +30 -24
- package/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +2029 -1975
- package/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/node/timers.d.ts +1 -3
- package/node_modules/@types/node/tls.d.ts +2 -48
- package/node_modules/@types/node/trace_events.d.ts +6 -6
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +15 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +101 -0
- package/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/node/url.d.ts +73 -20
- package/node_modules/@types/node/util.d.ts +23 -298
- package/node_modules/@types/node/v8.d.ts +62 -32
- package/node_modules/@types/node/vm.d.ts +132 -24
- package/node_modules/@types/node/wasi.d.ts +22 -1
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +94 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +85 -26
- package/node_modules/@types/node/zlib.d.ts +13 -9
- package/node_modules/axios/CHANGELOG.md +58 -0
- package/node_modules/axios/README.md +87 -10
- package/node_modules/axios/dist/axios.js +355 -289
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +286 -213
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +286 -213
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +377 -213
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +12 -5
- package/node_modules/axios/index.d.ts +13 -4
- package/node_modules/axios/lib/adapters/adapters.js +6 -4
- package/node_modules/axios/lib/adapters/fetch.js +221 -162
- package/node_modules/axios/lib/adapters/http.js +18 -0
- package/node_modules/axios/lib/adapters/xhr.js +11 -8
- package/node_modules/axios/lib/core/Axios.js +0 -2
- package/node_modules/axios/lib/core/AxiosError.js +10 -3
- package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +1 -3
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
- package/node_modules/axios/lib/utils.js +5 -3
- package/node_modules/axios/package.json +18 -12
- package/node_modules/bignumber.js/CHANGELOG.md +6 -1
- package/node_modules/bignumber.js/README.md +5 -4
- package/node_modules/bignumber.js/bignumber.js +2 -2
- package/node_modules/bignumber.js/bignumber.mjs +2 -2
- package/node_modules/bignumber.js/package.json +1 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/undici-types/agent.d.ts +11 -7
- package/node_modules/undici-types/api.d.ts +24 -24
- package/node_modules/undici-types/balanced-pool.d.ts +11 -11
- package/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +18 -16
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +19 -10
- package/node_modules/undici-types/dispatcher.d.ts +119 -93
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +69 -47
- package/node_modules/undici-types/eventsource.d.ts +3 -3
- package/node_modules/undici-types/fetch.d.ts +18 -16
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +75 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +51 -47
- package/node_modules/undici-types/interceptors.d.ts +25 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -19
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -12
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +18 -15
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +50 -8
- package/node_modules/undici-types/websocket.d.ts +36 -2
- package/node_modules/uuid/README.md +8 -19
- package/node_modules/uuid/dist/{esm-browser/uuid-bin.js → uuid-bin.js} +1 -1
- package/node_modules/uuid/dist/{esm-browser/v4.js → v4.js} +7 -4
- package/node_modules/uuid/{dist/esm → dist-node}/md5.js +1 -1
- package/node_modules/uuid/dist-node/native.js +2 -0
- package/node_modules/uuid/{dist/esm → dist-node}/rng.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/sha1.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/uuid-bin.js +1 -1
- package/node_modules/uuid/{dist/esm → dist-node}/v4.js +7 -4
- package/node_modules/uuid/package.json +28 -41
- package/package.json +4 -4
- package/tak-registration.bak +557 -0
- package/tak-registration.js +8 -8
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs/index.js +0 -31
- package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/max.js +0 -3
- package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/node_modules/uuid/dist/cjs/native.js +0 -4
- package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/node_modules/uuid/dist/cjs/package.json +0 -1
- package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs/types.js +0 -2
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs/v35.js +0 -41
- package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v6.js +0 -19
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/version.js +0 -10
- package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
- package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/node_modules/uuid/dist/esm/native.js +0 -2
- package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
- /package/node_modules/uuid/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/index.js → index.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/max.js → max.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/md5.d.ts → md5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/md5.js → md5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/native.d.ts → native.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/native.js → native.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/nil.js → nil.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/parse.js → parse.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/regex.js → regex.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/rng.js → rng.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/sha1.d.ts → sha1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm-browser/sha1.js → sha1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/stringify.js → stringify.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/types.d.ts → types.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/types.js → types.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1.d.ts → v1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1.js → v1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v3.d.ts → v3.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v3.js → v3.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v35.d.ts → v35.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v35.js → v35.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v4.d.ts → v4.d.ts} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v5.d.ts → v5.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v5.js → v5.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6.d.ts → v6.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6.js → v6.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/v7.d.ts → v7.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/v7.js → v7.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/validate.js → validate.js} +0 -0
- /package/node_modules/uuid/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
- /package/node_modules/uuid/dist/{esm/version.js → version.js} +0 -0
- /package/node_modules/uuid/{dist/esm → dist-node}/bin/uuid +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/index.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/max.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/nil.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/parse.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/regex.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/stringify.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/types.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1ToV6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v3.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v35.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v5.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6ToV1.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/v7.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/validate.js +0 -0
- /package/node_modules/uuid/{dist/esm-browser → dist-node}/version.js +0 -0
|
@@ -16,6 +16,8 @@ type ContentType = axios.AxiosHeaderValue | 'text/html' | 'text/plain' | 'multip
|
|
|
16
16
|
|
|
17
17
|
type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' | 'Cache-Control'| 'Content-Encoding';
|
|
18
18
|
|
|
19
|
+
type BrowserProgressEvent = any;
|
|
20
|
+
|
|
19
21
|
declare class AxiosHeaders {
|
|
20
22
|
constructor(
|
|
21
23
|
headers?: RawAxiosHeaders | AxiosHeaders | string
|
|
@@ -98,7 +100,8 @@ declare class AxiosError<T = unknown, D = any> extends Error {
|
|
|
98
100
|
isAxiosError: boolean;
|
|
99
101
|
status?: number;
|
|
100
102
|
toJSON: () => object;
|
|
101
|
-
cause?:
|
|
103
|
+
cause?: unknown;
|
|
104
|
+
event?: BrowserProgressEvent;
|
|
102
105
|
static from<T = unknown, D = any>(
|
|
103
106
|
error: Error | unknown,
|
|
104
107
|
code?: string,
|
|
@@ -352,8 +355,6 @@ declare namespace axios {
|
|
|
352
355
|
|
|
353
356
|
type MaxDownloadRate = number;
|
|
354
357
|
|
|
355
|
-
type BrowserProgressEvent = any;
|
|
356
|
-
|
|
357
358
|
interface AxiosProgressEvent {
|
|
358
359
|
loaded: number;
|
|
359
360
|
total?: number;
|
|
@@ -422,6 +423,12 @@ declare namespace axios {
|
|
|
422
423
|
insecureHTTPParser?: boolean;
|
|
423
424
|
env?: {
|
|
424
425
|
FormData?: new (...args: any[]) => object;
|
|
426
|
+
fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
|
|
427
|
+
Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
|
|
428
|
+
Response?: new (
|
|
429
|
+
body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
|
|
430
|
+
init?: ResponseInit
|
|
431
|
+
) => Response;
|
|
425
432
|
};
|
|
426
433
|
formSerializer?: FormSerializerOptions;
|
|
427
434
|
family?: AddressFamily;
|
|
@@ -460,11 +467,11 @@ declare namespace axios {
|
|
|
460
467
|
headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
|
|
461
468
|
}
|
|
462
469
|
|
|
463
|
-
interface AxiosResponse<T = any, D = any> {
|
|
470
|
+
interface AxiosResponse<T = any, D = any, H = {}> {
|
|
464
471
|
data: T;
|
|
465
472
|
status: number;
|
|
466
473
|
statusText: string;
|
|
467
|
-
headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
|
|
474
|
+
headers: H & RawAxiosResponseHeaders | AxiosResponseHeaders;
|
|
468
475
|
config: InternalAxiosRequestConfig<D>;
|
|
469
476
|
request?: any;
|
|
470
477
|
}
|
|
@@ -355,12 +355,19 @@ export interface AxiosRequestConfig<D = any> {
|
|
|
355
355
|
insecureHTTPParser?: boolean;
|
|
356
356
|
env?: {
|
|
357
357
|
FormData?: new (...args: any[]) => object;
|
|
358
|
+
fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
|
|
359
|
+
Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
|
|
360
|
+
Response?: new (
|
|
361
|
+
body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
|
|
362
|
+
init?: ResponseInit
|
|
363
|
+
) => Response;
|
|
358
364
|
};
|
|
359
365
|
formSerializer?: FormSerializerOptions;
|
|
360
366
|
family?: AddressFamily;
|
|
361
367
|
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
|
|
362
368
|
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
|
|
363
369
|
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
|
370
|
+
parseReviver?: (this: any, key: string, value: any) => any;
|
|
364
371
|
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
|
|
365
372
|
}
|
|
366
373
|
|
|
@@ -393,11 +400,11 @@ export interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>
|
|
|
393
400
|
headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
|
|
394
401
|
}
|
|
395
402
|
|
|
396
|
-
export interface AxiosResponse<T = any, D = any> {
|
|
403
|
+
export interface AxiosResponse<T = any, D = any, H = {}> {
|
|
397
404
|
data: T;
|
|
398
405
|
status: number;
|
|
399
406
|
statusText: string;
|
|
400
|
-
headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
|
|
407
|
+
headers: H & RawAxiosResponseHeaders | AxiosResponseHeaders;
|
|
401
408
|
config: InternalAxiosRequestConfig<D>;
|
|
402
409
|
request?: any;
|
|
403
410
|
}
|
|
@@ -418,7 +425,8 @@ export class AxiosError<T = unknown, D = any> extends Error {
|
|
|
418
425
|
isAxiosError: boolean;
|
|
419
426
|
status?: number;
|
|
420
427
|
toJSON: () => object;
|
|
421
|
-
cause?:
|
|
428
|
+
cause?: unknown;
|
|
429
|
+
event?: BrowserProgressEvent;
|
|
422
430
|
static from<T = unknown, D = any>(
|
|
423
431
|
error: Error | unknown,
|
|
424
432
|
code?: string,
|
|
@@ -442,6 +450,7 @@ export class AxiosError<T = unknown, D = any> extends Error {
|
|
|
442
450
|
}
|
|
443
451
|
|
|
444
452
|
export class CanceledError<T> extends AxiosError<T> {
|
|
453
|
+
readonly name: "CanceledError";
|
|
445
454
|
}
|
|
446
455
|
|
|
447
456
|
export type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
|
|
@@ -542,7 +551,7 @@ export function isAxiosError<T = any, D = any>(payload: any): payload is AxiosEr
|
|
|
542
551
|
|
|
543
552
|
export function spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R;
|
|
544
553
|
|
|
545
|
-
export function isCancel(value: any): value is
|
|
554
|
+
export function isCancel<T = any>(value: any): value is CanceledError<T>;
|
|
546
555
|
|
|
547
556
|
export function all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
|
|
548
557
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import utils from '../utils.js';
|
|
2
2
|
import httpAdapter from './http.js';
|
|
3
3
|
import xhrAdapter from './xhr.js';
|
|
4
|
-
import fetchAdapter from './fetch.js';
|
|
4
|
+
import * as fetchAdapter from './fetch.js';
|
|
5
5
|
import AxiosError from "../core/AxiosError.js";
|
|
6
6
|
|
|
7
7
|
const knownAdapters = {
|
|
8
8
|
http: httpAdapter,
|
|
9
9
|
xhr: xhrAdapter,
|
|
10
|
-
fetch:
|
|
10
|
+
fetch: {
|
|
11
|
+
get: fetchAdapter.getFetch,
|
|
12
|
+
}
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
utils.forEach(knownAdapters, (fn, value) => {
|
|
@@ -26,7 +28,7 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
26
28
|
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
27
29
|
|
|
28
30
|
export default {
|
|
29
|
-
getAdapter: (adapters) => {
|
|
31
|
+
getAdapter: (adapters, config) => {
|
|
30
32
|
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
31
33
|
|
|
32
34
|
const {length} = adapters;
|
|
@@ -49,7 +51,7 @@ export default {
|
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
if (adapter) {
|
|
54
|
+
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
53
55
|
break;
|
|
54
56
|
}
|
|
55
57
|
|
|
@@ -8,14 +8,18 @@ import {progressEventReducer, progressEventDecorator, asyncDecorator} from "../h
|
|
|
8
8
|
import resolveConfig from "../helpers/resolveConfig.js";
|
|
9
9
|
import settle from "../core/settle.js";
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
12
|
+
|
|
13
|
+
const {isFunction} = utils;
|
|
14
|
+
|
|
15
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
16
|
+
Request, Response
|
|
17
|
+
}))(utils.global);
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
ReadableStream, TextEncoder
|
|
21
|
+
} = utils.global;
|
|
13
22
|
|
|
14
|
-
// used only inside the fetch adapter
|
|
15
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
16
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
17
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
18
|
-
);
|
|
19
23
|
|
|
20
24
|
const test = (fn, ...args) => {
|
|
21
25
|
try {
|
|
@@ -25,205 +29,260 @@ const test = (fn, ...args) => {
|
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
const
|
|
29
|
-
|
|
32
|
+
const factory = (env) => {
|
|
33
|
+
env = utils.merge.call({
|
|
34
|
+
skipUndefined: true
|
|
35
|
+
}, globalFetchAPI, env);
|
|
30
36
|
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
duplexAccessed = true;
|
|
36
|
-
return 'half';
|
|
37
|
-
},
|
|
38
|
-
}).headers.has('Content-Type');
|
|
37
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
38
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
39
|
+
const isRequestSupported = isFunction(Request);
|
|
40
|
+
const isResponseSupported = isFunction(Response);
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
if (!isFetchSupported) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
42
45
|
|
|
43
|
-
const
|
|
46
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
|
|
44
47
|
|
|
45
|
-
const
|
|
46
|
-
|
|
48
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
49
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
50
|
+
async (str) => new Uint8Array(await new Request(str).arrayBuffer())
|
|
51
|
+
);
|
|
47
52
|
|
|
53
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
54
|
+
let duplexAccessed = false;
|
|
48
55
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
const hasContentType = new Request(platform.origin, {
|
|
57
|
+
body: new ReadableStream(),
|
|
58
|
+
method: 'POST',
|
|
59
|
+
get duplex() {
|
|
60
|
+
duplexAccessed = true;
|
|
61
|
+
return 'half';
|
|
62
|
+
},
|
|
63
|
+
}).headers.has('Content-Type');
|
|
52
64
|
|
|
53
|
-
|
|
54
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
55
|
-
!resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :
|
|
56
|
-
(_, config) => {
|
|
57
|
-
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
58
|
-
})
|
|
65
|
+
return duplexAccessed && !hasContentType;
|
|
59
66
|
});
|
|
60
|
-
})(new Response));
|
|
61
67
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
return 0;
|
|
65
|
-
}
|
|
68
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
|
|
69
|
+
test(() => utils.isReadableStream(new Response('').body));
|
|
66
70
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
71
|
+
const resolvers = {
|
|
72
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
73
|
+
};
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
isFetchSupported && ((() => {
|
|
76
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
77
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
78
|
+
let method = res && res[type];
|
|
79
|
+
|
|
80
|
+
if (method) {
|
|
81
|
+
return method.call(res);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
85
|
+
})
|
|
75
86
|
});
|
|
76
|
-
|
|
77
|
-
}
|
|
87
|
+
})());
|
|
78
88
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
89
|
+
const getBodyLength = async (body) => {
|
|
90
|
+
if (body == null) {
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (utils.isBlob(body)) {
|
|
95
|
+
return body.size;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (utils.isSpecCompliantForm(body)) {
|
|
99
|
+
const _request = new Request(platform.origin, {
|
|
100
|
+
method: 'POST',
|
|
101
|
+
body,
|
|
102
|
+
});
|
|
103
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
104
|
+
}
|
|
82
105
|
|
|
83
|
-
|
|
84
|
-
|
|
106
|
+
if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {
|
|
107
|
+
return body.byteLength;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (utils.isURLSearchParams(body)) {
|
|
111
|
+
body = body + '';
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (utils.isString(body)) {
|
|
115
|
+
return (await encodeText(body)).byteLength;
|
|
116
|
+
}
|
|
85
117
|
}
|
|
86
118
|
|
|
87
|
-
|
|
88
|
-
|
|
119
|
+
const resolveBodyLength = async (headers, body) => {
|
|
120
|
+
const length = utils.toFiniteNumber(headers.getContentLength());
|
|
121
|
+
|
|
122
|
+
return length == null ? getBodyLength(body) : length;
|
|
89
123
|
}
|
|
90
|
-
}
|
|
91
124
|
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
return async (config) => {
|
|
126
|
+
let {
|
|
127
|
+
url,
|
|
128
|
+
method,
|
|
129
|
+
data,
|
|
130
|
+
signal,
|
|
131
|
+
cancelToken,
|
|
132
|
+
timeout,
|
|
133
|
+
onDownloadProgress,
|
|
134
|
+
onUploadProgress,
|
|
135
|
+
responseType,
|
|
136
|
+
headers,
|
|
137
|
+
withCredentials = 'same-origin',
|
|
138
|
+
fetchOptions
|
|
139
|
+
} = resolveConfig(config);
|
|
94
140
|
|
|
95
|
-
|
|
96
|
-
|
|
141
|
+
let _fetch = envFetch || fetch;
|
|
142
|
+
|
|
143
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
97
144
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
signal,
|
|
104
|
-
cancelToken,
|
|
105
|
-
timeout,
|
|
106
|
-
onDownloadProgress,
|
|
107
|
-
onUploadProgress,
|
|
108
|
-
responseType,
|
|
109
|
-
headers,
|
|
110
|
-
withCredentials = 'same-origin',
|
|
111
|
-
fetchOptions
|
|
112
|
-
} = resolveConfig(config);
|
|
113
|
-
|
|
114
|
-
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
115
|
-
|
|
116
|
-
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
117
|
-
|
|
118
|
-
let request;
|
|
119
|
-
|
|
120
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
145
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
146
|
+
|
|
147
|
+
let request = null;
|
|
148
|
+
|
|
149
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
121
150
|
composedSignal.unsubscribe();
|
|
122
|
-
|
|
151
|
+
});
|
|
123
152
|
|
|
124
|
-
|
|
153
|
+
let requestContentLength;
|
|
125
154
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
155
|
+
try {
|
|
156
|
+
if (
|
|
157
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
158
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
159
|
+
) {
|
|
160
|
+
let _request = new Request(url, {
|
|
161
|
+
method: 'POST',
|
|
162
|
+
body: data,
|
|
163
|
+
duplex: "half"
|
|
164
|
+
});
|
|
136
165
|
|
|
137
|
-
|
|
166
|
+
let contentTypeHeader;
|
|
138
167
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
168
|
+
if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
169
|
+
headers.setContentType(contentTypeHeader)
|
|
170
|
+
}
|
|
142
171
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
172
|
+
if (_request.body) {
|
|
173
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
174
|
+
requestContentLength,
|
|
175
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
176
|
+
);
|
|
148
177
|
|
|
149
|
-
|
|
178
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
179
|
+
}
|
|
150
180
|
}
|
|
151
|
-
}
|
|
152
181
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
182
|
+
if (!utils.isString(withCredentials)) {
|
|
183
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
184
|
+
}
|
|
156
185
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
request = new Request(url, {
|
|
161
|
-
...fetchOptions,
|
|
162
|
-
signal: composedSignal,
|
|
163
|
-
method: method.toUpperCase(),
|
|
164
|
-
headers: headers.normalize().toJSON(),
|
|
165
|
-
body: data,
|
|
166
|
-
duplex: "half",
|
|
167
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
168
|
-
});
|
|
186
|
+
// Cloudflare Workers throws when credentials are defined
|
|
187
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
188
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
169
189
|
|
|
170
|
-
|
|
190
|
+
const resolvedOptions = {
|
|
191
|
+
...fetchOptions,
|
|
192
|
+
signal: composedSignal,
|
|
193
|
+
method: method.toUpperCase(),
|
|
194
|
+
headers: headers.normalize().toJSON(),
|
|
195
|
+
body: data,
|
|
196
|
+
duplex: "half",
|
|
197
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
198
|
+
};
|
|
171
199
|
|
|
172
|
-
|
|
200
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
173
201
|
|
|
174
|
-
|
|
175
|
-
const options = {};
|
|
202
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
176
203
|
|
|
177
|
-
|
|
178
|
-
options[prop] = response[prop];
|
|
179
|
-
});
|
|
204
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
180
205
|
|
|
181
|
-
|
|
206
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
207
|
+
const options = {};
|
|
182
208
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
) || [];
|
|
209
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
210
|
+
options[prop] = response[prop];
|
|
211
|
+
});
|
|
187
212
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
213
|
+
const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));
|
|
214
|
+
|
|
215
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
216
|
+
responseContentLength,
|
|
217
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
218
|
+
) || [];
|
|
219
|
+
|
|
220
|
+
response = new Response(
|
|
221
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
222
|
+
flush && flush();
|
|
223
|
+
unsubscribe && unsubscribe();
|
|
224
|
+
}),
|
|
225
|
+
options
|
|
226
|
+
);
|
|
227
|
+
}
|
|
196
228
|
|
|
197
|
-
|
|
229
|
+
responseType = responseType || 'text';
|
|
198
230
|
|
|
199
|
-
|
|
231
|
+
let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);
|
|
200
232
|
|
|
201
|
-
|
|
233
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
202
234
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
235
|
+
return await new Promise((resolve, reject) => {
|
|
236
|
+
settle(resolve, reject, {
|
|
237
|
+
data: responseData,
|
|
238
|
+
headers: AxiosHeaders.from(response.headers),
|
|
239
|
+
status: response.status,
|
|
240
|
+
statusText: response.statusText,
|
|
241
|
+
config,
|
|
242
|
+
request
|
|
243
|
+
})
|
|
211
244
|
})
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
245
|
+
} catch (err) {
|
|
246
|
+
unsubscribe && unsubscribe();
|
|
247
|
+
|
|
248
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
249
|
+
throw Object.assign(
|
|
250
|
+
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
|
251
|
+
{
|
|
252
|
+
cause: err.cause || err
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
223
258
|
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const seedCache = new Map();
|
|
263
|
+
|
|
264
|
+
export const getFetch = (config) => {
|
|
265
|
+
let env = config ? config.env : {};
|
|
266
|
+
const {fetch, Request, Response} = env;
|
|
267
|
+
const seeds = [
|
|
268
|
+
Request, Response, fetch
|
|
269
|
+
];
|
|
270
|
+
|
|
271
|
+
let len = seeds.length, i = len,
|
|
272
|
+
seed, target, map = seedCache;
|
|
224
273
|
|
|
225
|
-
|
|
274
|
+
while (i--) {
|
|
275
|
+
seed = seeds[i];
|
|
276
|
+
target = map.get(seed);
|
|
277
|
+
|
|
278
|
+
target === undefined && map.set(seed, target = (i ? new Map() : factory(env)))
|
|
279
|
+
|
|
280
|
+
map = target;
|
|
226
281
|
}
|
|
227
|
-
});
|
|
228
282
|
|
|
283
|
+
return target;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const adapter = getFetch();
|
|
229
287
|
|
|
288
|
+
export default adapter;
|
|
@@ -25,6 +25,7 @@ import readBlob from "../helpers/readBlob.js";
|
|
|
25
25
|
import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';
|
|
26
26
|
import callbackify from "../helpers/callbackify.js";
|
|
27
27
|
import {progressEventReducer, progressEventDecorator, asyncDecorator} from "../helpers/progressEventReducer.js";
|
|
28
|
+
import estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';
|
|
28
29
|
|
|
29
30
|
const zlibOptions = {
|
|
30
31
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
@@ -46,6 +47,7 @@ const supportedProtocols = platform.protocols.map(protocol => {
|
|
|
46
47
|
return protocol + ':';
|
|
47
48
|
});
|
|
48
49
|
|
|
50
|
+
|
|
49
51
|
const flushOnFinish = (stream, [throttled, flush]) => {
|
|
50
52
|
stream
|
|
51
53
|
.on('end', flush)
|
|
@@ -54,6 +56,7 @@ const flushOnFinish = (stream, [throttled, flush]) => {
|
|
|
54
56
|
return throttled;
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
|
|
57
60
|
/**
|
|
58
61
|
* If the proxy or config beforeRedirects functions are defined, call them with the options
|
|
59
62
|
* object.
|
|
@@ -233,6 +236,21 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
233
236
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
234
237
|
|
|
235
238
|
if (protocol === 'data:') {
|
|
239
|
+
// Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set.
|
|
240
|
+
if (config.maxContentLength > -1) {
|
|
241
|
+
// Use the exact string passed to fromDataURI (config.url); fall back to fullPath if needed.
|
|
242
|
+
const dataUrl = String(config.url || fullPath || '');
|
|
243
|
+
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
244
|
+
|
|
245
|
+
if (estimated > config.maxContentLength) {
|
|
246
|
+
return reject(new AxiosError(
|
|
247
|
+
'maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
|
248
|
+
AxiosError.ERR_BAD_RESPONSE,
|
|
249
|
+
config
|
|
250
|
+
));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
236
254
|
let convertedData;
|
|
237
255
|
|
|
238
256
|
if (method !== 'GET') {
|
|
@@ -104,15 +104,18 @@ export default isXHRAdapterSupported && function (config) {
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
// Handle low level network errors
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
request.onerror = function handleError(event) {
|
|
108
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
109
|
+
// (message may be empty; when present, surface it)
|
|
110
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
111
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
112
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
113
|
+
// attach the underlying event for consumers who want details
|
|
114
|
+
err.event = event || null;
|
|
115
|
+
reject(err);
|
|
116
|
+
request = null;
|
|
114
117
|
};
|
|
115
|
-
|
|
118
|
+
|
|
116
119
|
// Handle timeout
|
|
117
120
|
request.ontimeout = function handleTimeout() {
|
|
118
121
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|