@teammy/server 0.1.3 → 0.1.5
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/dist/main.js +705 -33
- package/dist/web/assets/Assistant-B3h2yQF3.css +1 -0
- package/dist/web/assets/Assistant-Dm_p8EZl.js +1 -0
- package/dist/web/assets/{Dashboard-CKFP7yNR.js → Dashboard-fwW9NxcC.js} +1 -1
- package/dist/web/assets/{Files-yA3LmJcB.js → Files-D-KCDWmO.js} +1 -1
- package/dist/web/assets/{Markdown-DD5hV21X.js → Markdown-oZagG-wy.js} +1 -1
- package/dist/web/assets/{Sessions-6CSHCq6e.js → Sessions-BQhGiLvz.js} +1 -1
- package/dist/web/assets/{WorkspaceTree-CeHWFFYr.js → WorkspaceTree-B9733pV3.js} +1 -1
- package/dist/web/assets/{file-links-Qi15HqFr.js → file-links-CD346_jf.js} +1 -1
- package/dist/web/assets/{index-B-MqU_88.css → index-Be5hGscJ.css} +1 -1
- package/dist/web/assets/index-BiiPuwDi.js +66 -0
- package/dist/web/index.html +2 -2
- package/node_modules/@wecom/aibot-node-sdk/README.md +786 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/api.d.ts +17 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/client.d.ts +217 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/crypto.d.ts +12 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js +1563 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js.map +1 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.d.ts +1324 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js +1544 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js.map +1 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/logger.d.ts +14 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/message-handler.d.ts +29 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/api.d.ts +466 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/common.d.ts +30 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/config.d.ts +34 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/event.d.ts +109 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/index.d.ts +10 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/message.d.ts +158 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/utils.d.ts +19 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/wecom-crypto/index.d.ts +46 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/ws.d.ts +161 -0
- package/node_modules/@wecom/aibot-node-sdk/package.json +43 -0
- package/node_modules/asynckit/LICENSE +21 -0
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +63 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/axios/CHANGELOG.md +1934 -0
- package/node_modules/axios/LICENSE +7 -0
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2786 -0
- package/node_modules/axios/dist/axios.js +6460 -0
- package/node_modules/axios/dist/axios.min.js +5 -0
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +6509 -0
- package/node_modules/axios/dist/esm/axios.js +6530 -0
- package/node_modules/axios/dist/esm/axios.min.js +3 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +7491 -0
- package/node_modules/axios/index.d.cts +785 -0
- package/node_modules/axios/index.d.ts +804 -0
- package/node_modules/axios/index.js +45 -0
- package/node_modules/axios/lib/adapters/README.md +36 -0
- package/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/axios/lib/adapters/fetch.js +749 -0
- package/node_modules/axios/lib/adapters/http.js +1609 -0
- package/node_modules/axios/lib/adapters/xhr.js +384 -0
- package/node_modules/axios/lib/axios.js +89 -0
- package/node_modules/axios/lib/cancel/CancelToken.js +135 -0
- package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
- package/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/axios/lib/core/Axios.js +361 -0
- package/node_modules/axios/lib/core/AxiosError.js +278 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +487 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +182 -0
- package/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
- package/node_modules/axios/lib/core/buildFullPath.js +76 -0
- package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +115 -0
- package/node_modules/axios/lib/core/mergeConfig.js +237 -0
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/core/settle.js +27 -0
- package/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/axios/lib/defaults/index.js +178 -0
- package/node_modules/axios/lib/defaults/transitional.js +11 -0
- package/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -0
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +165 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
- package/node_modules/axios/lib/helpers/Http2Sessions.js +122 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
- package/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/axios/lib/helpers/bind.js +14 -0
- package/node_modules/axios/lib/helpers/buildURL.js +69 -0
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +23 -0
- package/node_modules/axios/lib/helpers/composeSignals.js +71 -0
- package/node_modules/axios/lib/helpers/cookies.js +88 -0
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +193 -0
- package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +149 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +75 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
- package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +11 -0
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +72 -0
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +120 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +520 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +28 -0
- package/node_modules/axios/lib/helpers/throttle.js +45 -0
- package/node_modules/axios/lib/helpers/toFormData.js +279 -0
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/axios/lib/helpers/validator.js +112 -0
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +13 -0
- package/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/axios/lib/platform/index.js +7 -0
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +37 -0
- package/node_modules/axios/lib/utils.js +1201 -0
- package/node_modules/axios/node_modules/agent-base/README.md +145 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/package.json +202 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/combined-stream/License +19 -0
- package/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/node_modules/combined-stream/package.json +25 -0
- package/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/delayed-stream/License +19 -0
- package/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/delayed-stream/package.json +27 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/eventemitter3/LICENSE +21 -0
- package/node_modules/eventemitter3/README.md +85 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.js +355 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.js +363 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
- package/node_modules/eventemitter3/index.d.ts +135 -0
- package/node_modules/eventemitter3/index.js +336 -0
- package/node_modules/eventemitter3/index.mjs +4 -0
- package/node_modules/eventemitter3/package.json +62 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +183 -0
- package/node_modules/follow-redirects/debug.js +15 -0
- package/node_modules/follow-redirects/http.js +1 -0
- package/node_modules/follow-redirects/https.js +1 -0
- package/node_modules/follow-redirects/index.js +714 -0
- package/node_modules/follow-redirects/package.json +58 -0
- package/node_modules/form-data/CHANGELOG.md +686 -0
- package/node_modules/form-data/License +19 -0
- package/node_modules/form-data/README.md +355 -0
- package/node_modules/form-data/index.d.ts +62 -0
- package/node_modules/form-data/lib/browser.js +4 -0
- package/node_modules/form-data/lib/form_data.js +506 -0
- package/node_modules/form-data/lib/populate.js +10 -0
- package/node_modules/form-data/package.json +82 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +163 -0
- package/node_modules/proxy-from-env/index.cjs +105 -0
- package/node_modules/proxy-from-env/index.js +103 -0
- package/node_modules/proxy-from-env/package.json +43 -0
- package/package.json +2 -1
- package/dist/web/assets/Assistant-CpCuE2gu.css +0 -1
- package/dist/web/assets/Assistant-D5WOntPC.js +0 -1
- package/dist/web/assets/index-DC8a4uzu.js +0 -66
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
import settle from '../core/settle.js';
|
|
3
|
+
import transitionalDefaults from '../defaults/transitional.js';
|
|
4
|
+
import AxiosError from '../core/AxiosError.js';
|
|
5
|
+
import CanceledError from '../cancel/CanceledError.js';
|
|
6
|
+
import normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';
|
|
7
|
+
import parseProtocol from '../helpers/parseProtocol.js';
|
|
8
|
+
import platform from '../platform/index.js';
|
|
9
|
+
import AxiosHeaders from '../core/AxiosHeaders.js';
|
|
10
|
+
import cookies from '../helpers/cookies.js';
|
|
11
|
+
import { progressEventReducer } from '../helpers/progressEventReducer.js';
|
|
12
|
+
import resolveConfig from '../helpers/resolveConfig.js';
|
|
13
|
+
import { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';
|
|
14
|
+
|
|
15
|
+
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
16
|
+
|
|
17
|
+
export default isXHRAdapterSupported &&
|
|
18
|
+
function (config) {
|
|
19
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
20
|
+
let useAsyncXsrf;
|
|
21
|
+
try {
|
|
22
|
+
const store =
|
|
23
|
+
platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore;
|
|
24
|
+
useAsyncXsrf = store && utils.isFunction(store.get);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
// A restricted Cookie Store getter must retain the synchronous fallback.
|
|
27
|
+
}
|
|
28
|
+
let xsrfCookieName;
|
|
29
|
+
const _config = resolveConfig(
|
|
30
|
+
config,
|
|
31
|
+
useAsyncXsrf
|
|
32
|
+
? (name) => {
|
|
33
|
+
xsrfCookieName = name;
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
: undefined
|
|
37
|
+
);
|
|
38
|
+
let requestData = _config.data;
|
|
39
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
40
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
41
|
+
let onCanceled;
|
|
42
|
+
let timeoutId;
|
|
43
|
+
let uploadThrottled, downloadThrottled;
|
|
44
|
+
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
45
|
+
|
|
46
|
+
function done() {
|
|
47
|
+
clearTimeout(timeoutId);
|
|
48
|
+
// A final progress callback must not prevent the remaining cleanup.
|
|
49
|
+
// Report errors asynchronously, as onloadend and the throttle timer do.
|
|
50
|
+
try {
|
|
51
|
+
flushUpload && flushUpload(); // flush events
|
|
52
|
+
} catch (err) {
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
throw err;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
flushDownload && flushDownload(); // flush events
|
|
59
|
+
} catch (err) {
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
throw err;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// A flush can synchronously cancel the request and reenter done().
|
|
66
|
+
// In that case the inner call has already detached these listeners.
|
|
67
|
+
if (request) {
|
|
68
|
+
downloadThrottled && request.removeEventListener('progress', downloadThrottled);
|
|
69
|
+
if (request.upload) {
|
|
70
|
+
uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled);
|
|
71
|
+
flushUpload && request.upload.removeEventListener('loadend', flushUpload);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
76
|
+
|
|
77
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let request = new XMLHttpRequest();
|
|
81
|
+
|
|
82
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
83
|
+
|
|
84
|
+
// Set the request timeout in MS
|
|
85
|
+
request.timeout = _config.timeout;
|
|
86
|
+
|
|
87
|
+
function onloadend(event) {
|
|
88
|
+
if (!request) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Status 0 means no response was received, which onerror and onabort normally
|
|
93
|
+
// reject before this runs. Firefox 152 fires only readystatechange and loadend for
|
|
94
|
+
// navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
|
|
95
|
+
// leaving settle() to resolve them as an empty success. ECONNABORTED is the error
|
|
96
|
+
// onabort raised on Firefox 151. Reads over file:, which some environments report as
|
|
97
|
+
// status 0 on success, are excluded by the request URL's scheme after browser-style
|
|
98
|
+
// preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
|
|
99
|
+
// by responseURL where implemented.
|
|
100
|
+
if (
|
|
101
|
+
request.status === 0 &&
|
|
102
|
+
(parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||
|
|
103
|
+
parseProtocol(platform.origin)) !== 'file' &&
|
|
104
|
+
!(request.responseURL && request.responseURL.startsWith('file:'))
|
|
105
|
+
) {
|
|
106
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
107
|
+
done();
|
|
108
|
+
|
|
109
|
+
// Clean up request
|
|
110
|
+
request = null;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// When loadend is still dispatching, flushing with it gives progress
|
|
115
|
+
// listeners a final delivery whose event has a live target. The legacy
|
|
116
|
+
// ready-state fallback has no event, so replay its pending progress.
|
|
117
|
+
// A throwing listener must not block settlement; rethrow asynchronously,
|
|
118
|
+
// matching how listener errors surface on the throttle timer path.
|
|
119
|
+
try {
|
|
120
|
+
if (event) {
|
|
121
|
+
flushDownloadWithEvent && flushDownloadWithEvent(event);
|
|
122
|
+
} else {
|
|
123
|
+
flushDownload && flushDownload();
|
|
124
|
+
}
|
|
125
|
+
} catch (err) {
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
throw err;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// A final progress callback can cancel the request synchronously.
|
|
132
|
+
if (!request) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Prepare the response
|
|
137
|
+
const responseHeaders = AxiosHeaders.from(
|
|
138
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
139
|
+
);
|
|
140
|
+
const responseData =
|
|
141
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
142
|
+
? request.responseText
|
|
143
|
+
: request.response;
|
|
144
|
+
const response = {
|
|
145
|
+
data: responseData,
|
|
146
|
+
status: request.status,
|
|
147
|
+
statusText: request.statusText,
|
|
148
|
+
headers: responseHeaders,
|
|
149
|
+
config,
|
|
150
|
+
request,
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
settle(
|
|
154
|
+
function _resolve(value) {
|
|
155
|
+
resolve(value);
|
|
156
|
+
done();
|
|
157
|
+
},
|
|
158
|
+
function _reject(err) {
|
|
159
|
+
reject(err);
|
|
160
|
+
done();
|
|
161
|
+
},
|
|
162
|
+
response
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
// Clean up request
|
|
166
|
+
request = null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if ('onloadend' in request) {
|
|
170
|
+
// Use onloadend if available
|
|
171
|
+
request.onloadend = onloadend;
|
|
172
|
+
} else {
|
|
173
|
+
// Listen for ready state to emulate onloadend
|
|
174
|
+
request.onreadystatechange = function handleLoad() {
|
|
175
|
+
if (!request || request.readyState !== 4) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// The request errored out and we didn't get a response, this will be
|
|
180
|
+
// handled by onerror instead
|
|
181
|
+
// With one exception: request that using file: protocol, most browsers
|
|
182
|
+
// will return status as 0 even though it's a successful request
|
|
183
|
+
if (
|
|
184
|
+
request.status === 0 &&
|
|
185
|
+
!(request.responseURL && request.responseURL.startsWith('file:'))
|
|
186
|
+
) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
190
|
+
// so we should call onloadend on the next 'tick'
|
|
191
|
+
setTimeout(onloadend);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
196
|
+
request.onabort = function handleAbort() {
|
|
197
|
+
if (!request) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
202
|
+
done();
|
|
203
|
+
|
|
204
|
+
// Clean up request
|
|
205
|
+
request = null;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
// Handle low level network errors
|
|
209
|
+
request.onerror = function handleError(event) {
|
|
210
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
211
|
+
// (message may be empty; when present, surface it)
|
|
212
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
213
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
214
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
215
|
+
// attach the underlying event for consumers who want details
|
|
216
|
+
err.event = event || null;
|
|
217
|
+
reject(err);
|
|
218
|
+
done();
|
|
219
|
+
request = null;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Handle timeout
|
|
223
|
+
request.ontimeout = function handleTimeout() {
|
|
224
|
+
if (!request) return;
|
|
225
|
+
let timeoutErrorMessage = _config.timeout
|
|
226
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
227
|
+
: 'timeout exceeded';
|
|
228
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
229
|
+
if (_config.timeoutErrorMessage) {
|
|
230
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
231
|
+
}
|
|
232
|
+
reject(
|
|
233
|
+
new AxiosError(
|
|
234
|
+
timeoutErrorMessage,
|
|
235
|
+
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
236
|
+
config,
|
|
237
|
+
request
|
|
238
|
+
)
|
|
239
|
+
);
|
|
240
|
+
done();
|
|
241
|
+
|
|
242
|
+
// Clean up request
|
|
243
|
+
request = null;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// Remove Content-Type if data is undefined
|
|
247
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
248
|
+
|
|
249
|
+
// Add withCredentials to request if needed
|
|
250
|
+
if (!utils.isUndefined(_config.withCredentials)) {
|
|
251
|
+
request.withCredentials = !!_config.withCredentials;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Add responseType to request if needed
|
|
255
|
+
if (responseType && responseType !== 'json') {
|
|
256
|
+
request.responseType = _config.responseType;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Handle progress if needed
|
|
260
|
+
if (onDownloadProgress) {
|
|
261
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
|
|
262
|
+
onDownloadProgress,
|
|
263
|
+
true
|
|
264
|
+
);
|
|
265
|
+
request.addEventListener('progress', downloadThrottled);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Not all browsers support upload events
|
|
269
|
+
if (onUploadProgress && request.upload) {
|
|
270
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
271
|
+
|
|
272
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
273
|
+
|
|
274
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (_config.cancelToken || _config.signal) {
|
|
278
|
+
// Handle cancellation
|
|
279
|
+
// eslint-disable-next-line func-names
|
|
280
|
+
onCanceled = (cancel) => {
|
|
281
|
+
if (!request) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
285
|
+
const xhr = request;
|
|
286
|
+
done();
|
|
287
|
+
request = null;
|
|
288
|
+
xhr.abort();
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
292
|
+
if (!request) return;
|
|
293
|
+
if (_config.signal) {
|
|
294
|
+
_config.signal.aborted
|
|
295
|
+
? onCanceled()
|
|
296
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (!request) return;
|
|
301
|
+
|
|
302
|
+
const protocol = parseProtocol(_config.url);
|
|
303
|
+
|
|
304
|
+
if (protocol && !platform.protocols.includes(protocol)) {
|
|
305
|
+
reject(
|
|
306
|
+
new AxiosError(
|
|
307
|
+
'Unsupported protocol ' + protocol + ':',
|
|
308
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
309
|
+
config
|
|
310
|
+
)
|
|
311
|
+
);
|
|
312
|
+
done();
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const sendRequest = () => {
|
|
317
|
+
if (!request) return;
|
|
318
|
+
// Apply headers after an asynchronous XSRF read so existing headers are
|
|
319
|
+
// replaced through AxiosHeaders rather than appended by the native XHR.
|
|
320
|
+
if ('setRequestHeader' in request) {
|
|
321
|
+
utils.forEach(
|
|
322
|
+
toByteStringHeaderObject(requestHeaders),
|
|
323
|
+
function setRequestHeader(val, key) {
|
|
324
|
+
request.setRequestHeader(key, val);
|
|
325
|
+
}
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
request.send(requestData || null);
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
if (xsrfCookieName) {
|
|
332
|
+
// Native XHR timeout starts at send(). Cover cookie preparation and the
|
|
333
|
+
// subsequent request with the same budget and existing timeout handler.
|
|
334
|
+
const now =
|
|
335
|
+
typeof performance !== 'undefined' && utils.isFunction(performance.now)
|
|
336
|
+
? () => performance.now()
|
|
337
|
+
: Date.now;
|
|
338
|
+
const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined;
|
|
339
|
+
const abortOnTimeout = () => {
|
|
340
|
+
if (!request) return;
|
|
341
|
+
const xhr = request;
|
|
342
|
+
xhr.ontimeout();
|
|
343
|
+
xhr.abort();
|
|
344
|
+
};
|
|
345
|
+
if (deadline !== undefined) {
|
|
346
|
+
const scheduleTimeout = () => {
|
|
347
|
+
const remaining = deadline - now();
|
|
348
|
+
if (remaining > 0) {
|
|
349
|
+
// Browser timers overflow above the signed 32-bit delay limit.
|
|
350
|
+
timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff));
|
|
351
|
+
} else {
|
|
352
|
+
abortOnTimeout();
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
scheduleTimeout();
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
cookies
|
|
359
|
+
.readAsync(xsrfCookieName)
|
|
360
|
+
.then((value) => {
|
|
361
|
+
if (!request) return;
|
|
362
|
+
// Promise callbacks may run before an overdue timer after a busy task.
|
|
363
|
+
if (deadline !== undefined && now() >= deadline) {
|
|
364
|
+
abortOnTimeout();
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
if (value) {
|
|
368
|
+
const headerName =
|
|
369
|
+
utils.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName;
|
|
370
|
+
requestHeaders.set(headerName, value);
|
|
371
|
+
}
|
|
372
|
+
sendRequest();
|
|
373
|
+
})
|
|
374
|
+
.catch((error) => {
|
|
375
|
+
if (!request) return;
|
|
376
|
+
reject(AxiosError.from(error, null, config, request));
|
|
377
|
+
done();
|
|
378
|
+
request = null;
|
|
379
|
+
});
|
|
380
|
+
} else {
|
|
381
|
+
sendRequest();
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from './utils.js';
|
|
4
|
+
import bind from './helpers/bind.js';
|
|
5
|
+
import Axios from './core/Axios.js';
|
|
6
|
+
import mergeConfig from './core/mergeConfig.js';
|
|
7
|
+
import defaults from './defaults/index.js';
|
|
8
|
+
import formDataToJSON from './helpers/formDataToJSON.js';
|
|
9
|
+
import CanceledError from './cancel/CanceledError.js';
|
|
10
|
+
import CancelToken from './cancel/CancelToken.js';
|
|
11
|
+
import isCancel from './cancel/isCancel.js';
|
|
12
|
+
import { VERSION } from './env/data.js';
|
|
13
|
+
import toFormData from './helpers/toFormData.js';
|
|
14
|
+
import AxiosError from './core/AxiosError.js';
|
|
15
|
+
import spread from './helpers/spread.js';
|
|
16
|
+
import isAxiosError from './helpers/isAxiosError.js';
|
|
17
|
+
import AxiosHeaders from './core/AxiosHeaders.js';
|
|
18
|
+
import adapters from './adapters/adapters.js';
|
|
19
|
+
import HttpStatusCode from './helpers/HttpStatusCode.js';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create an instance of Axios
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} defaultConfig The default config for the instance
|
|
25
|
+
*
|
|
26
|
+
* @returns {Axios} A new instance of Axios
|
|
27
|
+
*/
|
|
28
|
+
function createInstance(defaultConfig) {
|
|
29
|
+
const context = new Axios(defaultConfig);
|
|
30
|
+
const instance = bind(Axios.prototype.request, context);
|
|
31
|
+
|
|
32
|
+
// Copy axios.prototype to instance
|
|
33
|
+
utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
34
|
+
|
|
35
|
+
// Copy context to instance
|
|
36
|
+
utils.extend(instance, context, null, { allOwnKeys: true });
|
|
37
|
+
|
|
38
|
+
// Factory for creating new instances
|
|
39
|
+
instance.create = function create(instanceConfig) {
|
|
40
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return instance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Create the default instance to be exported
|
|
47
|
+
const axios = createInstance(defaults);
|
|
48
|
+
|
|
49
|
+
// Expose Axios class to allow class inheritance
|
|
50
|
+
axios.Axios = Axios;
|
|
51
|
+
|
|
52
|
+
// Expose Cancel & CancelToken
|
|
53
|
+
axios.CanceledError = CanceledError;
|
|
54
|
+
axios.CancelToken = CancelToken;
|
|
55
|
+
axios.isCancel = isCancel;
|
|
56
|
+
axios.VERSION = VERSION;
|
|
57
|
+
axios.toFormData = toFormData;
|
|
58
|
+
|
|
59
|
+
// Expose AxiosError class
|
|
60
|
+
axios.AxiosError = AxiosError;
|
|
61
|
+
|
|
62
|
+
// alias for CanceledError for backward compatibility
|
|
63
|
+
axios.Cancel = axios.CanceledError;
|
|
64
|
+
|
|
65
|
+
// Expose all/spread
|
|
66
|
+
axios.all = function all(promises) {
|
|
67
|
+
return Promise.all(promises);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
axios.spread = spread;
|
|
71
|
+
|
|
72
|
+
// Expose isAxiosError
|
|
73
|
+
axios.isAxiosError = isAxiosError;
|
|
74
|
+
|
|
75
|
+
// Expose mergeConfig
|
|
76
|
+
axios.mergeConfig = mergeConfig;
|
|
77
|
+
|
|
78
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
79
|
+
|
|
80
|
+
axios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
81
|
+
|
|
82
|
+
axios.getAdapter = adapters.getAdapter;
|
|
83
|
+
|
|
84
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
85
|
+
|
|
86
|
+
axios.default = axios;
|
|
87
|
+
|
|
88
|
+
// this module should only have a default export
|
|
89
|
+
export default axios;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import CanceledError from './CanceledError.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
7
|
+
*
|
|
8
|
+
* @param {Function} executor The executor function.
|
|
9
|
+
*
|
|
10
|
+
* @returns {CancelToken}
|
|
11
|
+
*/
|
|
12
|
+
class CancelToken {
|
|
13
|
+
constructor(executor) {
|
|
14
|
+
if (typeof executor !== 'function') {
|
|
15
|
+
throw new TypeError('executor must be a function.');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let resolvePromise;
|
|
19
|
+
|
|
20
|
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
21
|
+
resolvePromise = resolve;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const token = this;
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line func-names
|
|
27
|
+
this.promise.then((cancel) => {
|
|
28
|
+
if (!token._listeners) return;
|
|
29
|
+
|
|
30
|
+
let i = token._listeners.length;
|
|
31
|
+
|
|
32
|
+
while (i-- > 0) {
|
|
33
|
+
token._listeners[i](cancel);
|
|
34
|
+
}
|
|
35
|
+
token._listeners = null;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line func-names
|
|
39
|
+
this.promise.then = (onfulfilled) => {
|
|
40
|
+
let _resolve;
|
|
41
|
+
// eslint-disable-next-line func-names
|
|
42
|
+
const promise = new Promise((resolve) => {
|
|
43
|
+
token.subscribe(resolve);
|
|
44
|
+
_resolve = resolve;
|
|
45
|
+
}).then(onfulfilled);
|
|
46
|
+
|
|
47
|
+
promise.cancel = function reject() {
|
|
48
|
+
token.unsubscribe(_resolve);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return promise;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
executor(function cancel(message, config, request) {
|
|
55
|
+
if (token.reason) {
|
|
56
|
+
// Cancellation has already been requested
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
token.reason = new CanceledError(message, config, request);
|
|
61
|
+
resolvePromise(token.reason);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
67
|
+
*/
|
|
68
|
+
throwIfRequested() {
|
|
69
|
+
if (this.reason) {
|
|
70
|
+
throw this.reason;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Subscribe to the cancel signal
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
subscribe(listener) {
|
|
79
|
+
if (this.reason) {
|
|
80
|
+
listener(this.reason);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (this._listeners) {
|
|
85
|
+
this._listeners.push(listener);
|
|
86
|
+
} else {
|
|
87
|
+
this._listeners = [listener];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Unsubscribe from the cancel signal
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
unsubscribe(listener) {
|
|
96
|
+
if (!this._listeners) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const index = this._listeners.indexOf(listener);
|
|
100
|
+
if (index !== -1) {
|
|
101
|
+
this._listeners.splice(index, 1);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
toAbortSignal() {
|
|
106
|
+
const controller = new AbortController();
|
|
107
|
+
|
|
108
|
+
const abort = (err) => {
|
|
109
|
+
controller.abort(err);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
this.subscribe(abort);
|
|
113
|
+
|
|
114
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
115
|
+
|
|
116
|
+
return controller.signal;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
121
|
+
* cancels the `CancelToken`.
|
|
122
|
+
*/
|
|
123
|
+
static source() {
|
|
124
|
+
let cancel;
|
|
125
|
+
const token = new CancelToken(function executor(c) {
|
|
126
|
+
cancel = c;
|
|
127
|
+
});
|
|
128
|
+
return {
|
|
129
|
+
token,
|
|
130
|
+
cancel,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export default CancelToken;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import AxiosError from '../core/AxiosError.js';
|
|
4
|
+
|
|
5
|
+
class CanceledError extends AxiosError {
|
|
6
|
+
/**
|
|
7
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
8
|
+
*
|
|
9
|
+
* @param {string=} message The message.
|
|
10
|
+
* @param {Object=} config The config.
|
|
11
|
+
* @param {Object=} request The request.
|
|
12
|
+
*
|
|
13
|
+
* @returns {CanceledError} The created error.
|
|
14
|
+
*/
|
|
15
|
+
constructor(message, config, request) {
|
|
16
|
+
super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
17
|
+
this.name = 'CanceledError';
|
|
18
|
+
this.__CANCEL__ = true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default CanceledError;
|