@teammy/server 0.1.4 → 0.1.6
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 +11646 -7952
- package/dist/native-pi-entry.js +14 -1
- package/dist/project-pi-entry.js +46 -8
- package/dist/runtime/workflows/task-bootstrap/prompt.md +2 -0
- package/dist/web/assets/{Assistant-B3h2yQF3.css → Assistant-4yZWjYm-.css} +1 -1
- package/dist/web/assets/Assistant-BNVXOHQZ.js +1 -0
- package/dist/web/assets/Dashboard-zKTK6EZD.js +1 -0
- package/dist/web/assets/Files-DI98WkdW.js +1 -0
- package/dist/web/assets/{Markdown-Bq8P_NBV.js → Markdown-D3cU0ani.js} +4 -4
- package/dist/web/assets/Materials-CK-mbNmo.css +1 -0
- package/dist/web/assets/Materials-CWptgAHz.js +6 -0
- package/dist/web/assets/Sessions-DiDwqXLI.js +1 -0
- package/dist/web/assets/WorkspaceTree-DeAA1QtV.js +1 -0
- package/dist/web/assets/{file-links-CFCIacLV.js → file-links-GfCXWkEh.js} +1 -1
- package/dist/web/assets/index-BwEl1PIa.js +66 -0
- package/dist/web/assets/{index-B-MqU_88.css → index-CTIAGUGG.css} +1 -1
- package/dist/web/downloads/teammy-skill.zip +0 -0
- package/dist/web/index.html +2 -2
- package/node_modules/@isaacs/nonrecursive-glob-match/LICENSE.md +55 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/README.md +333 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts +114 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js +762 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts +4 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js +142 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts +114 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js +758 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js.map +7 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts +4 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js +138 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/package.json +56 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/index.ts +900 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/parse-class.ts +158 -0
- 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/glob/README.md +388 -214
- package/node_modules/glob/dist/commonjs/glob.d.ts +20 -11
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/glob.js +22 -29
- package/node_modules/glob/dist/commonjs/glob.js.map +1 -1
- package/node_modules/glob/dist/commonjs/has-magic.d.ts +1 -1
- package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/has-magic.js +1 -4
- package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -1
- package/node_modules/glob/dist/commonjs/ignore.d.ts +16 -4
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/ignore.js +24 -4
- package/node_modules/glob/dist/commonjs/ignore.js.map +1 -1
- package/node_modules/glob/dist/commonjs/index.d.ts +3 -2
- package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/index.js.map +1 -1
- package/node_modules/glob/dist/commonjs/index.min.js +2 -3
- package/node_modules/glob/dist/commonjs/index.min.js.map +4 -4
- package/node_modules/glob/dist/commonjs/pattern.d.ts +10 -3
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/pattern.js +27 -15
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -1
- package/node_modules/glob/dist/commonjs/processor.d.ts +23 -10
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/processor.js +36 -23
- package/node_modules/glob/dist/commonjs/processor.js.map +1 -1
- package/node_modules/glob/dist/commonjs/walker.d.ts +19 -17
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/walker.js +50 -35
- package/node_modules/glob/dist/commonjs/walker.js.map +1 -1
- package/node_modules/glob/dist/esm/glob.d.ts +20 -11
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/glob.js +22 -29
- package/node_modules/glob/dist/esm/glob.js.map +1 -1
- package/node_modules/glob/dist/esm/has-magic.d.ts +1 -1
- package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/has-magic.js +1 -4
- package/node_modules/glob/dist/esm/has-magic.js.map +1 -1
- package/node_modules/glob/dist/esm/ignore.d.ts +16 -4
- package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/ignore.js +25 -5
- package/node_modules/glob/dist/esm/ignore.js.map +1 -1
- package/node_modules/glob/dist/esm/index.d.ts +3 -2
- package/node_modules/glob/dist/esm/index.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/index.js.map +1 -1
- package/node_modules/glob/dist/esm/index.min.js +2 -3
- package/node_modules/glob/dist/esm/index.min.js.map +4 -4
- package/node_modules/glob/dist/esm/pattern.d.ts +10 -3
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/pattern.js +27 -15
- package/node_modules/glob/dist/esm/pattern.js.map +1 -1
- package/node_modules/glob/dist/esm/processor.d.ts +23 -10
- package/node_modules/glob/dist/esm/processor.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/processor.js +36 -23
- package/node_modules/glob/dist/esm/processor.js.map +1 -1
- package/node_modules/glob/dist/esm/walker.d.ts +19 -17
- package/node_modules/glob/dist/esm/walker.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/walker.js +51 -36
- package/node_modules/glob/dist/esm/walker.js.map +1 -1
- package/node_modules/glob/package.json +28 -12
- package/node_modules/glob/src/glob.ts +655 -0
- package/node_modules/glob/src/has-magic.ts +23 -0
- package/node_modules/glob/src/ignore.ts +162 -0
- package/node_modules/glob/src/index.ts +225 -0
- package/node_modules/glob/src/pattern.ts +286 -0
- package/node_modules/glob/src/processor.ts +333 -0
- package/node_modules/glob/src/walker.ts +523 -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/minimatch/README.md +125 -107
- package/node_modules/minimatch/dist/commonjs/index.d.ts +49 -38
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/minimatch/dist/commonjs/index.js +782 -359
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -1
- package/node_modules/minimatch/dist/esm/index.d.ts +49 -38
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -1
- package/node_modules/minimatch/dist/esm/index.js +781 -356
- package/node_modules/minimatch/dist/esm/index.js.map +1 -1
- package/node_modules/minimatch/package.json +5 -4
- package/node_modules/path-scurry/README.md +0 -1
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +7 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/path-scurry/dist/commonjs/index.js +59 -21
- package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -1
- package/node_modules/path-scurry/dist/esm/index.d.ts +7 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -1
- package/node_modules/path-scurry/dist/esm/index.js +42 -14
- package/node_modules/path-scurry/dist/esm/index.js.map +1 -1
- package/node_modules/path-scurry/package.json +4 -4
- 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 +3 -1
- package/dist/web/assets/Assistant-DSQAdSiW.js +0 -1
- package/dist/web/assets/Dashboard-dCu2Cdxd.js +0 -1
- package/dist/web/assets/Files-cRhoWviM.js +0 -1
- package/dist/web/assets/Sessions-BxHsX1C5.js +0 -1
- package/dist/web/assets/WorkspaceTree-CD94JsaJ.js +0 -1
- package/dist/web/assets/index-BXpTaAUz.js +0 -66
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -22
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
- package/node_modules/minimatch/dist/commonjs/ast.js +0 -845
- package/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -150
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
- package/node_modules/minimatch/dist/esm/ast.d.ts +0 -22
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
- package/node_modules/minimatch/dist/esm/ast.js +0 -841
- package/node_modules/minimatch/dist/esm/ast.js.map +0 -1
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
- package/node_modules/minimatch/dist/esm/brace-expressions.js +0 -146
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
import parseHeaders from '../helpers/parseHeaders.js';
|
|
5
|
+
import { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js';
|
|
6
|
+
|
|
7
|
+
const $internals = Symbol('internals');
|
|
8
|
+
|
|
9
|
+
function normalizeHeader(header) {
|
|
10
|
+
return header && String(header).trim().toLowerCase();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function normalizeValue(value) {
|
|
14
|
+
if (value === false || value == null) {
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function parseTokens(str) {
|
|
22
|
+
const tokens = Object.create(null);
|
|
23
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
24
|
+
let match;
|
|
25
|
+
|
|
26
|
+
while ((match = tokensRE.exec(str))) {
|
|
27
|
+
tokens[match[1]] = match[2];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return tokens;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
34
|
+
|
|
35
|
+
function trimOWS(value) {
|
|
36
|
+
let start = 0;
|
|
37
|
+
let end = value.length;
|
|
38
|
+
|
|
39
|
+
while (start < end) {
|
|
40
|
+
const code = value.charCodeAt(start);
|
|
41
|
+
|
|
42
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
start += 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
while (end > start) {
|
|
50
|
+
const code = value.charCodeAt(end - 1);
|
|
51
|
+
|
|
52
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
end -= 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function decodeQuotedString(value) {
|
|
63
|
+
const last = value.length - 1;
|
|
64
|
+
|
|
65
|
+
if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
let decoded = '';
|
|
70
|
+
|
|
71
|
+
for (let i = 1; i < last; i++) {
|
|
72
|
+
const code = value.charCodeAt(i);
|
|
73
|
+
|
|
74
|
+
if (code === 0x22) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (code === 0x5c) {
|
|
79
|
+
i += 1;
|
|
80
|
+
|
|
81
|
+
if (i >= last) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
decoded += value[i];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return decoded;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function parseParameters(value) {
|
|
93
|
+
const parameters = Object.create(null);
|
|
94
|
+
const str = String(value);
|
|
95
|
+
let start = 0;
|
|
96
|
+
let quoted = false;
|
|
97
|
+
let escaped = false;
|
|
98
|
+
|
|
99
|
+
function parseParameter(end) {
|
|
100
|
+
const part = trimOWS(str.slice(start, end));
|
|
101
|
+
const equals = part.indexOf('=');
|
|
102
|
+
|
|
103
|
+
if (equals < 1) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const name = trimOWS(part.slice(0, equals));
|
|
108
|
+
|
|
109
|
+
if (!parameterNameRE.test(name)) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const normalizedName = name.toLowerCase();
|
|
114
|
+
|
|
115
|
+
if (
|
|
116
|
+
normalizedName === '__proto__' ||
|
|
117
|
+
normalizedName === 'constructor' ||
|
|
118
|
+
normalizedName === 'prototype'
|
|
119
|
+
) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const parameterValue = trimOWS(part.slice(equals + 1));
|
|
124
|
+
parameters[normalizedName] = decodeQuotedString(parameterValue);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
for (let i = 0; i < str.length; i++) {
|
|
128
|
+
const code = str.charCodeAt(i);
|
|
129
|
+
|
|
130
|
+
if (quoted) {
|
|
131
|
+
if (escaped) {
|
|
132
|
+
escaped = false;
|
|
133
|
+
} else if (code === 0x5c) {
|
|
134
|
+
escaped = true;
|
|
135
|
+
} else if (code === 0x22) {
|
|
136
|
+
quoted = false;
|
|
137
|
+
}
|
|
138
|
+
} else if (code === 0x22) {
|
|
139
|
+
quoted = true;
|
|
140
|
+
} else if (code === 0x2c || code === 0x3b) {
|
|
141
|
+
parseParameter(i);
|
|
142
|
+
start = i + 1;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
parseParameter(str.length);
|
|
147
|
+
|
|
148
|
+
return parameters;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
152
|
+
|
|
153
|
+
// `__proto__` is a valid field name, and the one name the uppercase mapping at
|
|
154
|
+
// the bottom of this file cannot reach: it is inherited from Object.prototype
|
|
155
|
+
// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v`
|
|
156
|
+
// runs the inherited setter. That silently discards the header, and an array
|
|
157
|
+
// value replaces the instance prototype, taking every method with it.
|
|
158
|
+
// Store it under the same kind of case variant that mapping uses for `set` and
|
|
159
|
+
// `constructor`. Header lookup is caseless, so it reads back under either
|
|
160
|
+
// spelling, and no own `__proto__` slot is ever created for a later
|
|
161
|
+
// `Object.assign` to copy onto a plain object through the same setter.
|
|
162
|
+
const PROTO_HEADER_SLOT = '__Proto__';
|
|
163
|
+
|
|
164
|
+
const headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name);
|
|
165
|
+
|
|
166
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
167
|
+
if (utils.isFunction(filter)) {
|
|
168
|
+
return filter.call(context, value, header);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (isHeaderNameFilter) {
|
|
172
|
+
value = header;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (!utils.isString(value)) return;
|
|
176
|
+
|
|
177
|
+
if (utils.isString(filter)) {
|
|
178
|
+
return value.indexOf(filter) !== -1;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (utils.isRegExp(filter)) {
|
|
182
|
+
return filter.test(value);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function formatHeader(header) {
|
|
187
|
+
return header
|
|
188
|
+
.trim()
|
|
189
|
+
.toLowerCase()
|
|
190
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
191
|
+
return char.toUpperCase() + str;
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function buildAccessors(obj, header) {
|
|
196
|
+
const accessorName = utils.toCamelCase(' ' + header);
|
|
197
|
+
|
|
198
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
199
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
200
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
201
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
202
|
+
__proto__: null,
|
|
203
|
+
value: function (arg1, arg2, arg3) {
|
|
204
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
205
|
+
},
|
|
206
|
+
configurable: true,
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
class AxiosHeaders {
|
|
212
|
+
constructor(headers) {
|
|
213
|
+
headers && this.set(headers);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
set(header, valueOrRewrite, rewrite) {
|
|
217
|
+
const self = this;
|
|
218
|
+
|
|
219
|
+
function setHeader(_value, _header, _rewrite) {
|
|
220
|
+
const lHeader = normalizeHeader(_header);
|
|
221
|
+
|
|
222
|
+
if (!lHeader) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const key = utils.findKey(self, lHeader);
|
|
227
|
+
|
|
228
|
+
if (
|
|
229
|
+
!key ||
|
|
230
|
+
self[key] === undefined ||
|
|
231
|
+
_rewrite === true ||
|
|
232
|
+
(_rewrite === undefined && self[key] !== false)
|
|
233
|
+
) {
|
|
234
|
+
self[headerSlot(key || _header)] = normalizeValue(_value);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const setHeaders = (headers, _rewrite) =>
|
|
239
|
+
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
240
|
+
|
|
241
|
+
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
242
|
+
setHeaders(header, valueOrRewrite);
|
|
243
|
+
} else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
244
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
245
|
+
} else if (utils.isObject(header) && utils.isSafeIterable(header)) {
|
|
246
|
+
let obj = Object.create(null),
|
|
247
|
+
dest,
|
|
248
|
+
key;
|
|
249
|
+
for (const entry of header) {
|
|
250
|
+
if (!utils.isArray(entry)) {
|
|
251
|
+
throw new TypeError('Object iterator must return a key-value pair');
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
key = entry[0];
|
|
255
|
+
|
|
256
|
+
if (utils.hasOwnProp(obj, key)) {
|
|
257
|
+
dest = obj[key];
|
|
258
|
+
obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
259
|
+
} else {
|
|
260
|
+
obj[key] = entry[1];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
setHeaders(obj, valueOrRewrite);
|
|
265
|
+
} else {
|
|
266
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
get(header, parser) {
|
|
273
|
+
header = normalizeHeader(header);
|
|
274
|
+
|
|
275
|
+
if (header) {
|
|
276
|
+
const key = utils.findKey(this, header);
|
|
277
|
+
|
|
278
|
+
if (key) {
|
|
279
|
+
const value = this[key];
|
|
280
|
+
|
|
281
|
+
if (!parser) {
|
|
282
|
+
return value;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (parser === true) {
|
|
286
|
+
return parseTokens(value);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (utils.isFunction(parser)) {
|
|
290
|
+
return parser.call(this, value, key);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if (utils.isRegExp(parser)) {
|
|
294
|
+
return parser.exec(value);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
throw new TypeError('parser must be boolean|regexp|function');
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
has(header, matcher) {
|
|
303
|
+
header = normalizeHeader(header);
|
|
304
|
+
|
|
305
|
+
if (header) {
|
|
306
|
+
const key = utils.findKey(this, header);
|
|
307
|
+
|
|
308
|
+
return !!(
|
|
309
|
+
key &&
|
|
310
|
+
this[key] !== undefined &&
|
|
311
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
delete(header, matcher) {
|
|
319
|
+
const self = this;
|
|
320
|
+
let deleted = false;
|
|
321
|
+
|
|
322
|
+
function deleteHeader(_header) {
|
|
323
|
+
_header = normalizeHeader(_header);
|
|
324
|
+
|
|
325
|
+
if (_header) {
|
|
326
|
+
const key = utils.findKey(self, _header);
|
|
327
|
+
|
|
328
|
+
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
329
|
+
delete self[key];
|
|
330
|
+
|
|
331
|
+
deleted = true;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (utils.isArray(header)) {
|
|
337
|
+
header.forEach(deleteHeader);
|
|
338
|
+
} else {
|
|
339
|
+
deleteHeader(header);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return deleted;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
clear(matcher) {
|
|
346
|
+
const keys = Object.keys(this);
|
|
347
|
+
let i = keys.length;
|
|
348
|
+
let deleted = false;
|
|
349
|
+
|
|
350
|
+
while (i--) {
|
|
351
|
+
const key = keys[i];
|
|
352
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
353
|
+
delete this[key];
|
|
354
|
+
deleted = true;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
return deleted;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
normalize(format) {
|
|
362
|
+
const self = this;
|
|
363
|
+
const headers = Object.create(null);
|
|
364
|
+
|
|
365
|
+
utils.forEach(this, (value, header) => {
|
|
366
|
+
const key = utils.findKey(headers, header);
|
|
367
|
+
|
|
368
|
+
if (key) {
|
|
369
|
+
self[key] = normalizeValue(value);
|
|
370
|
+
delete self[header];
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());
|
|
375
|
+
|
|
376
|
+
if (normalized !== header) {
|
|
377
|
+
delete self[header];
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
self[normalized] = normalizeValue(value);
|
|
381
|
+
|
|
382
|
+
headers[normalized] = true;
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
return this;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
concat(...targets) {
|
|
389
|
+
return this.constructor.concat(this, ...targets);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
toJSON(asStrings) {
|
|
393
|
+
const obj = Object.create(null);
|
|
394
|
+
|
|
395
|
+
utils.forEach(this, (value, header) => {
|
|
396
|
+
value != null &&
|
|
397
|
+
value !== false &&
|
|
398
|
+
(obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
return obj;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
[Symbol.iterator]() {
|
|
405
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
toString() {
|
|
409
|
+
return Object.entries(this.toJSON())
|
|
410
|
+
.map(([header, value]) => header + ': ' + value)
|
|
411
|
+
.join('\n');
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
getSetCookie() {
|
|
415
|
+
const value = this.get('set-cookie');
|
|
416
|
+
return utils.isArray(value) ? value : value == null || value === false ? [] : [value];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
get [Symbol.toStringTag]() {
|
|
420
|
+
return 'AxiosHeaders';
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
static from(thing) {
|
|
424
|
+
return thing instanceof this ? thing : new this(thing);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
static parseParameters(value) {
|
|
428
|
+
return parseParameters(value);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
static concat(first, ...targets) {
|
|
432
|
+
const computed = new this(first);
|
|
433
|
+
|
|
434
|
+
targets.forEach((target) => computed.set(target));
|
|
435
|
+
|
|
436
|
+
return computed;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
static accessor(header) {
|
|
440
|
+
const internals =
|
|
441
|
+
(this[$internals] =
|
|
442
|
+
this[$internals] =
|
|
443
|
+
{
|
|
444
|
+
accessors: {},
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
const accessors = internals.accessors;
|
|
448
|
+
const prototype = this.prototype;
|
|
449
|
+
|
|
450
|
+
function defineAccessor(_header) {
|
|
451
|
+
const lHeader = normalizeHeader(_header);
|
|
452
|
+
|
|
453
|
+
if (!accessors[lHeader]) {
|
|
454
|
+
buildAccessors(prototype, _header);
|
|
455
|
+
accessors[lHeader] = true;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
460
|
+
|
|
461
|
+
return this;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
AxiosHeaders.accessor([
|
|
466
|
+
'Content-Type',
|
|
467
|
+
'Content-Length',
|
|
468
|
+
'Accept',
|
|
469
|
+
'Accept-Encoding',
|
|
470
|
+
'User-Agent',
|
|
471
|
+
'Authorization',
|
|
472
|
+
]);
|
|
473
|
+
|
|
474
|
+
// reserved names hotfix
|
|
475
|
+
utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
476
|
+
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
477
|
+
return {
|
|
478
|
+
get: () => value,
|
|
479
|
+
set(headerValue) {
|
|
480
|
+
this[mapped] = headerValue;
|
|
481
|
+
},
|
|
482
|
+
};
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
utils.freezeMethods(AxiosHeaders);
|
|
486
|
+
|
|
487
|
+
export default AxiosHeaders;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
|
|
5
|
+
const $internals = Symbol('internals');
|
|
6
|
+
|
|
7
|
+
// `handlers` is public and may be replaced with a nullish value by user code;
|
|
8
|
+
// `clear()` has always tolerated that. Treat it as an empty stack rather than
|
|
9
|
+
// dereferencing it.
|
|
10
|
+
function countHandlers(handlers) {
|
|
11
|
+
return handlers ? handlers.length : 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function trimHandlers(handlers) {
|
|
15
|
+
if (!handlers) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
while (handlers.length && handlers[handlers.length - 1] === null) {
|
|
20
|
+
handlers.pop();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Preserve the array-key coercion used before IDs were stored in a Map, without
|
|
25
|
+
// treating null, empty strings, or noncanonical numeric strings as ID zero.
|
|
26
|
+
function normalizeHandlerId(id) {
|
|
27
|
+
if (typeof id === 'string' && id !== '' && String(Number(id)) === id) {
|
|
28
|
+
return Number(id);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return id;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function syncHandlerEntries(manager, internals) {
|
|
35
|
+
const handlers = manager.handlers;
|
|
36
|
+
const length = countHandlers(handlers);
|
|
37
|
+
|
|
38
|
+
if (handlers !== internals.handlersRef) {
|
|
39
|
+
internals.handlersRef = handlers;
|
|
40
|
+
internals.handlerEntries.clear();
|
|
41
|
+
} else if (length !== internals.handlersLength) {
|
|
42
|
+
if (!length) {
|
|
43
|
+
internals.handlerEntries.clear();
|
|
44
|
+
} else {
|
|
45
|
+
internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
|
|
46
|
+
if (handlers[entry.index] !== entry.handler) {
|
|
47
|
+
internals.handlerEntries.delete(id);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
internals.handlersLength = length;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
class InterceptorManager {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.handlers = [];
|
|
59
|
+
this[$internals] = {
|
|
60
|
+
handlersRef: this.handlers,
|
|
61
|
+
handlersLength: this.handlers.length,
|
|
62
|
+
handlerEntries: new Map(),
|
|
63
|
+
iterationDepth: 0,
|
|
64
|
+
nextId: 0,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Add a new interceptor to the stack
|
|
70
|
+
*
|
|
71
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
72
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
73
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
74
|
+
*
|
|
75
|
+
* @return {Number} An ID used to remove interceptor later
|
|
76
|
+
*/
|
|
77
|
+
use(fulfilled, rejected, options) {
|
|
78
|
+
const handler = {
|
|
79
|
+
fulfilled,
|
|
80
|
+
rejected,
|
|
81
|
+
synchronous: options ? options.synchronous : false,
|
|
82
|
+
runWhen: options ? options.runWhen : null,
|
|
83
|
+
};
|
|
84
|
+
const internals = this[$internals];
|
|
85
|
+
|
|
86
|
+
if (this.handlers == null) {
|
|
87
|
+
this.handlers = [];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
syncHandlerEntries(this, internals);
|
|
91
|
+
|
|
92
|
+
const id = internals.nextId++;
|
|
93
|
+
|
|
94
|
+
this.handlers.push(handler);
|
|
95
|
+
internals.handlerEntries.set(id, {
|
|
96
|
+
handler,
|
|
97
|
+
index: this.handlers.length - 1,
|
|
98
|
+
});
|
|
99
|
+
internals.handlersLength = this.handlers.length;
|
|
100
|
+
|
|
101
|
+
return id;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Remove an interceptor from the stack
|
|
106
|
+
*
|
|
107
|
+
* @param {Number} id The ID that was returned by `use`
|
|
108
|
+
*
|
|
109
|
+
* @returns {void}
|
|
110
|
+
*/
|
|
111
|
+
eject(id) {
|
|
112
|
+
const internals = this[$internals];
|
|
113
|
+
|
|
114
|
+
syncHandlerEntries(this, internals);
|
|
115
|
+
|
|
116
|
+
const handlerId = normalizeHandlerId(id);
|
|
117
|
+
const entry = internals.handlerEntries.get(handlerId);
|
|
118
|
+
|
|
119
|
+
if (entry) {
|
|
120
|
+
internals.handlerEntries.delete(handlerId);
|
|
121
|
+
|
|
122
|
+
// Ignore IDs invalidated by clear or direct replacement of handlers.
|
|
123
|
+
if (this.handlers[entry.index] !== entry.handler) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.handlers[entry.index] = null;
|
|
128
|
+
|
|
129
|
+
// Do not reuse an index while forEach is walking its length snapshot.
|
|
130
|
+
if (!internals.iterationDepth) {
|
|
131
|
+
trimHandlers(this.handlers);
|
|
132
|
+
internals.handlersLength = this.handlers.length;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Clear all interceptors from the stack
|
|
139
|
+
*
|
|
140
|
+
* @returns {void}
|
|
141
|
+
*/
|
|
142
|
+
clear() {
|
|
143
|
+
if (this.handlers) {
|
|
144
|
+
this.handlers = [];
|
|
145
|
+
syncHandlerEntries(this, this[$internals]);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Iterate over all the registered interceptors
|
|
151
|
+
*
|
|
152
|
+
* This method is particularly useful for skipping over any
|
|
153
|
+
* interceptors that may have become `null` calling `eject`.
|
|
154
|
+
*
|
|
155
|
+
* @param {Function} fn The function to call for each interceptor
|
|
156
|
+
*
|
|
157
|
+
* @returns {void}
|
|
158
|
+
*/
|
|
159
|
+
forEach(fn) {
|
|
160
|
+
const internals = this[$internals];
|
|
161
|
+
|
|
162
|
+
syncHandlerEntries(this, internals);
|
|
163
|
+
|
|
164
|
+
internals.iterationDepth++;
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
168
|
+
if (h !== null) {
|
|
169
|
+
fn(h);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
} finally {
|
|
173
|
+
if (!--internals.iterationDepth) {
|
|
174
|
+
syncHandlerEntries(this, internals);
|
|
175
|
+
trimHandlers(this.handlers);
|
|
176
|
+
internals.handlersLength = countHandlers(this.handlers);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export default InterceptorManager;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# axios // core
|
|
2
|
+
|
|
3
|
+
The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are:
|
|
4
|
+
|
|
5
|
+
- Dispatching requests
|
|
6
|
+
- Requests sent via `adapters/` (see lib/adapters/README.md)
|
|
7
|
+
- Managing interceptors
|
|
8
|
+
- Handling config
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
import AxiosError from './AxiosError.js';
|
|
5
|
+
|
|
6
|
+
export default function assertParamsAcyclic(params) {
|
|
7
|
+
const pending = [{ value: params }];
|
|
8
|
+
const active = new WeakSet();
|
|
9
|
+
const visited = new WeakSet();
|
|
10
|
+
|
|
11
|
+
while (pending.length) {
|
|
12
|
+
const { value, done } = pending.pop();
|
|
13
|
+
if (!utils.isPlainObject(value) && !utils.isArray(value)) continue;
|
|
14
|
+
if (done) {
|
|
15
|
+
active.delete(value);
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (active.has(value)) {
|
|
19
|
+
throw new AxiosError(
|
|
20
|
+
'Circular reference detected in params',
|
|
21
|
+
AxiosError.ERR_BAD_OPTION_VALUE
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
if (visited.has(value)) continue;
|
|
25
|
+
visited.add(value);
|
|
26
|
+
active.add(value);
|
|
27
|
+
pending.push({ value, done: true });
|
|
28
|
+
|
|
29
|
+
const keys = Object.keys(value);
|
|
30
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
31
|
+
Object.getOwnPropertySymbols(value).forEach((key) => {
|
|
32
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
33
|
+
if (descriptor && descriptor.enumerable) keys.push(key);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// Shallow array elements retain fields filtered during plain-object merges.
|
|
37
|
+
// Inspect reserved data properties without evaluating their accessors.
|
|
38
|
+
keys.forEach((key) => {
|
|
39
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
40
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
41
|
+
if (descriptor && utils.hasOwnProp(descriptor, 'value')) {
|
|
42
|
+
pending.push({ value: descriptor.value });
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
pending.push({ value: value[key] });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|