@supernovaio/cli 1.1.0 → 1.1.2
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/commands/describe-design-system.js +1 -1
- package/dist/commands/describe-workspaces.js +1 -1
- package/dist/commands/publish-documentation.d.ts +1 -0
- package/dist/commands/publish-documentation.js +59 -9
- package/dist/commands/run-local-exporter.js +5 -2
- package/dist/commands/sync-tokens.js +5 -2
- package/dist/index.d.ts +1 -1
- package/dist/utils/common.d.ts +1 -0
- package/dist/utils/common.js +7 -0
- package/dist/utils/figma-tokens-data-loader.js +51 -49
- package/dist/utils/sdk.js +6 -4
- package/node_modules/@supernova-studio/pulsar-core/build/main/pulsar-core.js +2 -2
- package/node_modules/@supernova-studio/pulsar-core/package.json +8 -26
- package/node_modules/@supernova-studio/pulsar-language/build/main/language/src/extensions/dsm/DSMBridge.d.ts +4 -0
- package/node_modules/@supernova-studio/pulsar-language/build/main/pulsar-language.js +1 -1
- package/node_modules/@supernova-studio/pulsar-language/package.json +7 -22
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDocumentation.d.ts +4 -4
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKDataCore.d.ts +2 -2
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/exports.d.ts +1 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPageBlock.d.ts +11 -4
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAssetGroup.d.ts +25 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuideline.d.ts +11 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuidelineProps.d.ts +17 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuidelines.d.ts +8 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockImage.d.ts +2 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockSwatch.d.ts +9 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageBlockType.d.ts +3 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +6 -0
- package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/tsconfig.tsbuildinfo +6395 -0
- package/node_modules/@supernovaio/supernova-sdk/build/supernova-sdk-typescript.js +1 -1
- package/node_modules/@supernovaio/supernova-sdk/build/supernova-sdk-typescript.js.map +1 -1
- package/node_modules/@supernovaio/supernova-sdk/package.json +7 -8
- package/node_modules/axios/CHANGELOG.md +895 -746
- package/node_modules/axios/README.md +37 -42
- package/node_modules/axios/dist/axios.js +1168 -299
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +810 -315
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +810 -315
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +824 -396
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -2
- package/node_modules/axios/index.d.ts +5 -2
- package/node_modules/axios/lib/adapters/adapters.js +3 -1
- package/node_modules/axios/lib/adapters/fetch.js +229 -0
- package/node_modules/axios/lib/adapters/http.js +27 -17
- package/node_modules/axios/lib/adapters/xhr.js +36 -99
- package/node_modules/axios/lib/cancel/CancelToken.js +14 -0
- package/node_modules/axios/lib/core/Axios.js +9 -6
- package/node_modules/axios/lib/core/AxiosError.js +5 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
- package/node_modules/axios/lib/defaults/index.js +7 -2
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +3 -51
- package/node_modules/axios/lib/helpers/composeSignals.js +48 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +1 -1
- package/node_modules/axios/lib/helpers/progressEventReducer.js +44 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
- package/node_modules/axios/lib/helpers/throttle.js +30 -19
- package/node_modules/axios/lib/helpers/trackStream.js +87 -0
- package/node_modules/axios/lib/platform/common/utils.js +9 -5
- package/node_modules/axios/lib/utils.js +40 -3
- package/node_modules/axios/package.json +4 -3
- package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts.map +1 -1
- package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js +2 -2
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/package.json +2 -2
- package/oclif.manifest.json +7 -1
- package/package.json +109 -108
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/README.md +0 -95
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.d.ts +0 -38
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.js +0 -112
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/package.json +0 -49
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/README.md +0 -97
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.d.ts +0 -46
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.js +0 -174
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/package.json +0 -50
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.d.ts +0 -15
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.js +0 -66
- package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.js +0 -175
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -15
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/package.json +0 -50
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/LICENSE +0 -22
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/README.md +0 -69
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.d.ts +0 -15
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.js +0 -66
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.d.ts +0 -41
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.d.ts.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.js +0 -175
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/package.json +0 -49
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/LICENSE +0 -22
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/README.md +0 -70
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/index.d.ts +0 -47
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -15
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
- package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/browser-bundle.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKBrand.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKBrandWriter.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystemVersion.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystemVersionWriter.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKSupernova.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKWorkspace.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKConfiguration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKDataBridge.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/errors/SDKSupernovaError.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKAssetGroupResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKComponentResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKDocumentationItemResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKTokenGroupResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKTokenResolver.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/index.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/assets/SDKAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/assets/SDKRenderedAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/components/SDKComponent.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/components/SDKDesignComponent.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationConfiguration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationItem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPage.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPageAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichText.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichTextSpan.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichTextSpanAttribute.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockAsset.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockAssets.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCallout.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCode.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockColumn.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockColumnItem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCustom.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockDivider.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedFigma.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedGeneric.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedLink.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedStorybook.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedYoutube.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockFrame.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockFrames.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockHeading.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockOrderedList.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockQuote.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockRenderCode.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockShortcut.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockShortcuts.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTab.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTabItem.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTable.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableCell.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableColumn.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableRow.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockText.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockToken.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTokenGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTokenList.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockUnorderedList.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/builder/SDKDocumentationBlockBuilder.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/configuration/SDKDocumentationItemConfiguration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/configuration/SDKDocumentationItemHeader.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementDataView.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementDataViewColumn.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementProperty.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementPropertyOption.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/values/SDKElementPropertyValue.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAlignment.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetFormat.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetScale.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetScaleType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKBlurType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKBorderPosition.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationCalloutType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationEnvironment.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationGroupBehavior.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationHeadingType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationItemType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageAssetType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageBlockThemeType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKFrameAlignment.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKFrameLayout.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKGradientType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKRichTextSpanAttributeType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKShadowType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKSourceType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTextCase.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTextDecoration.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTokenType.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKUnit.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/SDKExporter.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlock.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlockProperty.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlockVariant.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_properties/SDKExporterConfigurationProperty.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKAssetGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKDesignComponentGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKTokenGroup.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKDesignComponentOrigin.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKFrameOrigin.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKSize.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKSource.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKTokenOrigin.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKWorkspaceNPMRegistry.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKThemeUtilities.d.ts +0 -0
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKTokenTheme.d.ts +5 -5
- package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKTokenThemeOverride.d.ts +5 -5
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKBlurToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKBorderToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKColorToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKFontToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKGenericToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKGradientToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKMeasureToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKRadiusToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKShadowToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTextToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTokenCompator.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTokenValue.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTypographyToken.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenData.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/users/SDKUser.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Brand.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Components.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/DesignSystem.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/DesignSystemVersion.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Documentation.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Supernova.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Theme.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Workspace.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/PluginFigmaTokens.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/PluginJSONBuilder.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/ToolDocSearch.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/ToolMarkdownTransform.spec.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/helpers.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONGroupBuilder.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONLoader.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTMapResolver.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenGroupTreeMerger.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenMerger.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenSetResolver.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/collection/SDKDTTokenCollection.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/expression/SDKDTExpressionParser.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTGroupTreeNode.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTParentChildMapping.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/SDKToolsJSONBuilder.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementStyleDictionaryTransformer.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformCustomBlock.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/search-index/SDKToolsDocSearch.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/token-transform/SDKToolsTokenTransform.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/utils/FlowUtils.d.ts +0 -0
- /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/utils/StringUtils.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/LICENSE +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/README.md +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.d.ts.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.js +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.js.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.d.ts.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.js +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.js.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/package.json +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/LICENSE +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/README.md +0 -0
- /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts.map +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js +0 -0
- /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js.map +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Axios v1.
|
|
1
|
+
// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
function bind(fn, thisArg) {
|
|
@@ -214,6 +214,8 @@ const isFormData = (thing) => {
|
|
|
214
214
|
*/
|
|
215
215
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
216
216
|
|
|
217
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
|
|
218
|
+
|
|
217
219
|
/**
|
|
218
220
|
* Trim excess whitespace off the beginning and end of a string
|
|
219
221
|
*
|
|
@@ -602,8 +604,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
602
604
|
const noop = () => {};
|
|
603
605
|
|
|
604
606
|
const toFiniteNumber = (value, defaultValue) => {
|
|
605
|
-
value = +value;
|
|
606
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
607
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
607
608
|
};
|
|
608
609
|
|
|
609
610
|
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
@@ -673,6 +674,36 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
673
674
|
const isThenable = (thing) =>
|
|
674
675
|
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
675
676
|
|
|
677
|
+
// original code
|
|
678
|
+
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
679
|
+
|
|
680
|
+
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
681
|
+
if (setImmediateSupported) {
|
|
682
|
+
return setImmediate;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
686
|
+
_global.addEventListener("message", ({source, data}) => {
|
|
687
|
+
if (source === _global && data === token) {
|
|
688
|
+
callbacks.length && callbacks.shift()();
|
|
689
|
+
}
|
|
690
|
+
}, false);
|
|
691
|
+
|
|
692
|
+
return (cb) => {
|
|
693
|
+
callbacks.push(cb);
|
|
694
|
+
_global.postMessage(token, "*");
|
|
695
|
+
}
|
|
696
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
697
|
+
})(
|
|
698
|
+
typeof setImmediate === 'function',
|
|
699
|
+
isFunction(_global.postMessage)
|
|
700
|
+
);
|
|
701
|
+
|
|
702
|
+
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
703
|
+
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
|
|
704
|
+
|
|
705
|
+
// *********************
|
|
706
|
+
|
|
676
707
|
var utils$1 = {
|
|
677
708
|
isArray,
|
|
678
709
|
isArrayBuffer,
|
|
@@ -684,6 +715,10 @@ var utils$1 = {
|
|
|
684
715
|
isBoolean,
|
|
685
716
|
isObject,
|
|
686
717
|
isPlainObject,
|
|
718
|
+
isReadableStream,
|
|
719
|
+
isRequest,
|
|
720
|
+
isResponse,
|
|
721
|
+
isHeaders,
|
|
687
722
|
isUndefined,
|
|
688
723
|
isDate,
|
|
689
724
|
isFile,
|
|
@@ -724,7 +759,9 @@ var utils$1 = {
|
|
|
724
759
|
isSpecCompliantForm,
|
|
725
760
|
toJSONObject,
|
|
726
761
|
isAsyncFn,
|
|
727
|
-
isThenable
|
|
762
|
+
isThenable,
|
|
763
|
+
setImmediate: _setImmediate,
|
|
764
|
+
asap
|
|
728
765
|
};
|
|
729
766
|
|
|
730
767
|
/**
|
|
@@ -752,7 +789,10 @@ function AxiosError(message, code, config, request, response) {
|
|
|
752
789
|
code && (this.code = code);
|
|
753
790
|
config && (this.config = config);
|
|
754
791
|
request && (this.request = request);
|
|
755
|
-
|
|
792
|
+
if (response) {
|
|
793
|
+
this.response = response;
|
|
794
|
+
this.status = response.status ? response.status : null;
|
|
795
|
+
}
|
|
756
796
|
}
|
|
757
797
|
|
|
758
798
|
utils$1.inherits(AxiosError, Error, {
|
|
@@ -772,7 +812,7 @@ utils$1.inherits(AxiosError, Error, {
|
|
|
772
812
|
// Axios
|
|
773
813
|
config: utils$1.toJSONObject(this.config),
|
|
774
814
|
code: this.code,
|
|
775
|
-
status: this.
|
|
815
|
+
status: this.status
|
|
776
816
|
};
|
|
777
817
|
}
|
|
778
818
|
});
|
|
@@ -1240,6 +1280,8 @@ var platform$1 = {
|
|
|
1240
1280
|
|
|
1241
1281
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1242
1282
|
|
|
1283
|
+
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
1284
|
+
|
|
1243
1285
|
/**
|
|
1244
1286
|
* Determine if we're running in a standard browser environment
|
|
1245
1287
|
*
|
|
@@ -1257,10 +1299,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
|
|
|
1257
1299
|
*
|
|
1258
1300
|
* @returns {boolean}
|
|
1259
1301
|
*/
|
|
1260
|
-
const hasStandardBrowserEnv =
|
|
1261
|
-
(product)
|
|
1262
|
-
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
1263
|
-
})(typeof navigator !== 'undefined' && navigator.product);
|
|
1302
|
+
const hasStandardBrowserEnv = hasBrowserEnv &&
|
|
1303
|
+
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
1264
1304
|
|
|
1265
1305
|
/**
|
|
1266
1306
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -1280,11 +1320,15 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
1280
1320
|
);
|
|
1281
1321
|
})();
|
|
1282
1322
|
|
|
1323
|
+
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
1324
|
+
|
|
1283
1325
|
var utils = /*#__PURE__*/Object.freeze({
|
|
1284
1326
|
__proto__: null,
|
|
1285
1327
|
hasBrowserEnv: hasBrowserEnv,
|
|
1286
1328
|
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1287
|
-
hasStandardBrowserEnv: hasStandardBrowserEnv
|
|
1329
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
1330
|
+
navigator: _navigator,
|
|
1331
|
+
origin: origin
|
|
1288
1332
|
});
|
|
1289
1333
|
|
|
1290
1334
|
var platform = {
|
|
@@ -1424,7 +1468,7 @@ const defaults = {
|
|
|
1424
1468
|
|
|
1425
1469
|
transitional: transitionalDefaults,
|
|
1426
1470
|
|
|
1427
|
-
adapter: ['xhr', 'http'],
|
|
1471
|
+
adapter: ['xhr', 'http', 'fetch'],
|
|
1428
1472
|
|
|
1429
1473
|
transformRequest: [function transformRequest(data, headers) {
|
|
1430
1474
|
const contentType = headers.getContentType() || '';
|
|
@@ -1445,7 +1489,8 @@ const defaults = {
|
|
|
1445
1489
|
utils$1.isBuffer(data) ||
|
|
1446
1490
|
utils$1.isStream(data) ||
|
|
1447
1491
|
utils$1.isFile(data) ||
|
|
1448
|
-
utils$1.isBlob(data)
|
|
1492
|
+
utils$1.isBlob(data) ||
|
|
1493
|
+
utils$1.isReadableStream(data)
|
|
1449
1494
|
) {
|
|
1450
1495
|
return data;
|
|
1451
1496
|
}
|
|
@@ -1488,6 +1533,10 @@ const defaults = {
|
|
|
1488
1533
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1489
1534
|
const JSONRequested = this.responseType === 'json';
|
|
1490
1535
|
|
|
1536
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
1537
|
+
return data;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1491
1540
|
if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
1492
1541
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1493
1542
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
@@ -1691,6 +1740,10 @@ class AxiosHeaders {
|
|
|
1691
1740
|
setHeaders(header, valueOrRewrite);
|
|
1692
1741
|
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1693
1742
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1743
|
+
} else if (utils$1.isHeaders(header)) {
|
|
1744
|
+
for (const [key, value] of header.entries()) {
|
|
1745
|
+
setHeader(value, key, rewrite);
|
|
1746
|
+
}
|
|
1694
1747
|
} else {
|
|
1695
1748
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
1696
1749
|
}
|
|
@@ -1958,96 +2011,153 @@ function settle(resolve, reject, response) {
|
|
|
1958
2011
|
}
|
|
1959
2012
|
}
|
|
1960
2013
|
|
|
1961
|
-
|
|
2014
|
+
function parseProtocol(url) {
|
|
2015
|
+
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
2016
|
+
return match && match[1] || '';
|
|
2017
|
+
}
|
|
1962
2018
|
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
2019
|
+
/**
|
|
2020
|
+
* Calculate data maxRate
|
|
2021
|
+
* @param {Number} [samplesCount= 10]
|
|
2022
|
+
* @param {Number} [min= 1000]
|
|
2023
|
+
* @returns {Function}
|
|
2024
|
+
*/
|
|
2025
|
+
function speedometer(samplesCount, min) {
|
|
2026
|
+
samplesCount = samplesCount || 10;
|
|
2027
|
+
const bytes = new Array(samplesCount);
|
|
2028
|
+
const timestamps = new Array(samplesCount);
|
|
2029
|
+
let head = 0;
|
|
2030
|
+
let tail = 0;
|
|
2031
|
+
let firstSampleTS;
|
|
1967
2032
|
|
|
1968
|
-
|
|
2033
|
+
min = min !== undefined ? min : 1000;
|
|
1969
2034
|
|
|
1970
|
-
|
|
2035
|
+
return function push(chunkLength) {
|
|
2036
|
+
const now = Date.now();
|
|
1971
2037
|
|
|
1972
|
-
|
|
2038
|
+
const startedAt = timestamps[tail];
|
|
1973
2039
|
|
|
1974
|
-
|
|
2040
|
+
if (!firstSampleTS) {
|
|
2041
|
+
firstSampleTS = now;
|
|
2042
|
+
}
|
|
1975
2043
|
|
|
1976
|
-
|
|
1977
|
-
|
|
2044
|
+
bytes[head] = chunkLength;
|
|
2045
|
+
timestamps[head] = now;
|
|
1978
2046
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
return (match ? decodeURIComponent(match[3]) : null);
|
|
1982
|
-
},
|
|
2047
|
+
let i = tail;
|
|
2048
|
+
let bytesCount = 0;
|
|
1983
2049
|
|
|
1984
|
-
|
|
1985
|
-
|
|
2050
|
+
while (i !== head) {
|
|
2051
|
+
bytesCount += bytes[i++];
|
|
2052
|
+
i = i % samplesCount;
|
|
1986
2053
|
}
|
|
1987
|
-
}
|
|
1988
2054
|
|
|
1989
|
-
|
|
2055
|
+
head = (head + 1) % samplesCount;
|
|
1990
2056
|
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
read() {
|
|
1995
|
-
return null;
|
|
1996
|
-
},
|
|
1997
|
-
remove() {}
|
|
1998
|
-
};
|
|
2057
|
+
if (head === tail) {
|
|
2058
|
+
tail = (tail + 1) % samplesCount;
|
|
2059
|
+
}
|
|
1999
2060
|
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
* @param {string} url The URL to test
|
|
2004
|
-
*
|
|
2005
|
-
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
2006
|
-
*/
|
|
2007
|
-
function isAbsoluteURL(url) {
|
|
2008
|
-
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
2009
|
-
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
2010
|
-
// by any combination of letters, digits, plus, period, or hyphen.
|
|
2011
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
2012
|
-
}
|
|
2061
|
+
if (now - firstSampleTS < min) {
|
|
2062
|
+
return;
|
|
2063
|
+
}
|
|
2013
2064
|
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
*
|
|
2017
|
-
|
|
2018
|
-
* @param {string} relativeURL The relative URL
|
|
2019
|
-
*
|
|
2020
|
-
* @returns {string} The combined URL
|
|
2021
|
-
*/
|
|
2022
|
-
function combineURLs(baseURL, relativeURL) {
|
|
2023
|
-
return relativeURL
|
|
2024
|
-
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
2025
|
-
: baseURL;
|
|
2065
|
+
const passed = startedAt && now - startedAt;
|
|
2066
|
+
|
|
2067
|
+
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
2068
|
+
};
|
|
2026
2069
|
}
|
|
2027
2070
|
|
|
2028
2071
|
/**
|
|
2029
|
-
*
|
|
2030
|
-
*
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2033
|
-
* @param {string} baseURL The base URL
|
|
2034
|
-
* @param {string} requestedURL Absolute or relative URL to combine
|
|
2035
|
-
*
|
|
2036
|
-
* @returns {string} The combined full path
|
|
2072
|
+
* Throttle decorator
|
|
2073
|
+
* @param {Function} fn
|
|
2074
|
+
* @param {Number} freq
|
|
2075
|
+
* @return {Function}
|
|
2037
2076
|
*/
|
|
2038
|
-
function
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2077
|
+
function throttle(fn, freq) {
|
|
2078
|
+
let timestamp = 0;
|
|
2079
|
+
let threshold = 1000 / freq;
|
|
2080
|
+
let lastArgs;
|
|
2081
|
+
let timer;
|
|
2082
|
+
|
|
2083
|
+
const invoke = (args, now = Date.now()) => {
|
|
2084
|
+
timestamp = now;
|
|
2085
|
+
lastArgs = null;
|
|
2086
|
+
if (timer) {
|
|
2087
|
+
clearTimeout(timer);
|
|
2088
|
+
timer = null;
|
|
2089
|
+
}
|
|
2090
|
+
fn.apply(null, args);
|
|
2091
|
+
};
|
|
2092
|
+
|
|
2093
|
+
const throttled = (...args) => {
|
|
2094
|
+
const now = Date.now();
|
|
2095
|
+
const passed = now - timestamp;
|
|
2096
|
+
if ( passed >= threshold) {
|
|
2097
|
+
invoke(args, now);
|
|
2098
|
+
} else {
|
|
2099
|
+
lastArgs = args;
|
|
2100
|
+
if (!timer) {
|
|
2101
|
+
timer = setTimeout(() => {
|
|
2102
|
+
timer = null;
|
|
2103
|
+
invoke(lastArgs);
|
|
2104
|
+
}, threshold - passed);
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
};
|
|
2108
|
+
|
|
2109
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
|
2110
|
+
|
|
2111
|
+
return [throttled, flush];
|
|
2043
2112
|
}
|
|
2044
2113
|
|
|
2114
|
+
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
2115
|
+
let bytesNotified = 0;
|
|
2116
|
+
const _speedometer = speedometer(50, 250);
|
|
2117
|
+
|
|
2118
|
+
return throttle(e => {
|
|
2119
|
+
const loaded = e.loaded;
|
|
2120
|
+
const total = e.lengthComputable ? e.total : undefined;
|
|
2121
|
+
const progressBytes = loaded - bytesNotified;
|
|
2122
|
+
const rate = _speedometer(progressBytes);
|
|
2123
|
+
const inRange = loaded <= total;
|
|
2124
|
+
|
|
2125
|
+
bytesNotified = loaded;
|
|
2126
|
+
|
|
2127
|
+
const data = {
|
|
2128
|
+
loaded,
|
|
2129
|
+
total,
|
|
2130
|
+
progress: total ? (loaded / total) : undefined,
|
|
2131
|
+
bytes: progressBytes,
|
|
2132
|
+
rate: rate ? rate : undefined,
|
|
2133
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
2134
|
+
event: e,
|
|
2135
|
+
lengthComputable: total != null,
|
|
2136
|
+
[isDownloadStream ? 'download' : 'upload']: true
|
|
2137
|
+
};
|
|
2138
|
+
|
|
2139
|
+
listener(data);
|
|
2140
|
+
}, freq);
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2143
|
+
const progressEventDecorator = (total, throttled) => {
|
|
2144
|
+
const lengthComputable = total != null;
|
|
2145
|
+
|
|
2146
|
+
return [(loaded) => throttled[0]({
|
|
2147
|
+
lengthComputable,
|
|
2148
|
+
total,
|
|
2149
|
+
loaded
|
|
2150
|
+
}), throttled[1]];
|
|
2151
|
+
};
|
|
2152
|
+
|
|
2153
|
+
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
2154
|
+
|
|
2045
2155
|
var isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
2046
2156
|
|
|
2047
2157
|
// Standard browser envs have full support of the APIs needed to test
|
|
2048
2158
|
// whether the request URL is of the same origin as current location.
|
|
2049
2159
|
(function standardBrowserEnv() {
|
|
2050
|
-
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
2160
|
+
const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
|
|
2051
2161
|
const urlParsingNode = document.createElement('a');
|
|
2052
2162
|
let originURL;
|
|
2053
2163
|
|
|
@@ -2105,137 +2215,267 @@ var isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
|
2105
2215
|
};
|
|
2106
2216
|
})();
|
|
2107
2217
|
|
|
2108
|
-
|
|
2109
|
-
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
2110
|
-
return match && match[1] || '';
|
|
2111
|
-
}
|
|
2218
|
+
var cookies = platform.hasStandardBrowserEnv ?
|
|
2112
2219
|
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
* @returns {Function}
|
|
2118
|
-
*/
|
|
2119
|
-
function speedometer(samplesCount, min) {
|
|
2120
|
-
samplesCount = samplesCount || 10;
|
|
2121
|
-
const bytes = new Array(samplesCount);
|
|
2122
|
-
const timestamps = new Array(samplesCount);
|
|
2123
|
-
let head = 0;
|
|
2124
|
-
let tail = 0;
|
|
2125
|
-
let firstSampleTS;
|
|
2220
|
+
// Standard browser envs support document.cookie
|
|
2221
|
+
{
|
|
2222
|
+
write(name, value, expires, path, domain, secure) {
|
|
2223
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
2126
2224
|
|
|
2127
|
-
|
|
2225
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
2128
2226
|
|
|
2129
|
-
|
|
2130
|
-
const now = Date.now();
|
|
2227
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
|
2131
2228
|
|
|
2132
|
-
|
|
2229
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
|
2133
2230
|
|
|
2134
|
-
|
|
2135
|
-
firstSampleTS = now;
|
|
2136
|
-
}
|
|
2231
|
+
secure === true && cookie.push('secure');
|
|
2137
2232
|
|
|
2138
|
-
|
|
2139
|
-
|
|
2233
|
+
document.cookie = cookie.join('; ');
|
|
2234
|
+
},
|
|
2140
2235
|
|
|
2141
|
-
|
|
2142
|
-
|
|
2236
|
+
read(name) {
|
|
2237
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
2238
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
2239
|
+
},
|
|
2143
2240
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
i = i % samplesCount;
|
|
2241
|
+
remove(name) {
|
|
2242
|
+
this.write(name, '', Date.now() - 86400000);
|
|
2147
2243
|
}
|
|
2244
|
+
}
|
|
2148
2245
|
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
if (head === tail) {
|
|
2152
|
-
tail = (tail + 1) % samplesCount;
|
|
2153
|
-
}
|
|
2246
|
+
:
|
|
2154
2247
|
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
}
|
|
2248
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
2249
|
+
{
|
|
2250
|
+
write() {},
|
|
2251
|
+
read() {
|
|
2252
|
+
return null;
|
|
2253
|
+
},
|
|
2254
|
+
remove() {}
|
|
2255
|
+
};
|
|
2158
2256
|
|
|
2159
|
-
|
|
2257
|
+
/**
|
|
2258
|
+
* Determines whether the specified URL is absolute
|
|
2259
|
+
*
|
|
2260
|
+
* @param {string} url The URL to test
|
|
2261
|
+
*
|
|
2262
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
2263
|
+
*/
|
|
2264
|
+
function isAbsoluteURL(url) {
|
|
2265
|
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
2266
|
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
2267
|
+
// by any combination of letters, digits, plus, period, or hyphen.
|
|
2268
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
2269
|
+
}
|
|
2160
2270
|
|
|
2161
|
-
|
|
2162
|
-
|
|
2271
|
+
/**
|
|
2272
|
+
* Creates a new URL by combining the specified URLs
|
|
2273
|
+
*
|
|
2274
|
+
* @param {string} baseURL The base URL
|
|
2275
|
+
* @param {string} relativeURL The relative URL
|
|
2276
|
+
*
|
|
2277
|
+
* @returns {string} The combined URL
|
|
2278
|
+
*/
|
|
2279
|
+
function combineURLs(baseURL, relativeURL) {
|
|
2280
|
+
return relativeURL
|
|
2281
|
+
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
2282
|
+
: baseURL;
|
|
2163
2283
|
}
|
|
2164
2284
|
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2285
|
+
/**
|
|
2286
|
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
2287
|
+
* only when the requestedURL is not already an absolute URL.
|
|
2288
|
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
2289
|
+
*
|
|
2290
|
+
* @param {string} baseURL The base URL
|
|
2291
|
+
* @param {string} requestedURL Absolute or relative URL to combine
|
|
2292
|
+
*
|
|
2293
|
+
* @returns {string} The combined full path
|
|
2294
|
+
*/
|
|
2295
|
+
function buildFullPath(baseURL, requestedURL) {
|
|
2296
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
2297
|
+
return combineURLs(baseURL, requestedURL);
|
|
2298
|
+
}
|
|
2299
|
+
return requestedURL;
|
|
2300
|
+
}
|
|
2168
2301
|
|
|
2169
|
-
|
|
2170
|
-
const loaded = e.loaded;
|
|
2171
|
-
const total = e.lengthComputable ? e.total : undefined;
|
|
2172
|
-
const progressBytes = loaded - bytesNotified;
|
|
2173
|
-
const rate = _speedometer(progressBytes);
|
|
2174
|
-
const inRange = loaded <= total;
|
|
2302
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
2175
2303
|
|
|
2176
|
-
|
|
2304
|
+
/**
|
|
2305
|
+
* Config-specific merge-function which creates a new config-object
|
|
2306
|
+
* by merging two configuration objects together.
|
|
2307
|
+
*
|
|
2308
|
+
* @param {Object} config1
|
|
2309
|
+
* @param {Object} config2
|
|
2310
|
+
*
|
|
2311
|
+
* @returns {Object} New object resulting from merging config2 to config1
|
|
2312
|
+
*/
|
|
2313
|
+
function mergeConfig(config1, config2) {
|
|
2314
|
+
// eslint-disable-next-line no-param-reassign
|
|
2315
|
+
config2 = config2 || {};
|
|
2316
|
+
const config = {};
|
|
2177
2317
|
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2318
|
+
function getMergedValue(target, source, caseless) {
|
|
2319
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
2320
|
+
return utils$1.merge.call({caseless}, target, source);
|
|
2321
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
2322
|
+
return utils$1.merge({}, source);
|
|
2323
|
+
} else if (utils$1.isArray(source)) {
|
|
2324
|
+
return source.slice();
|
|
2325
|
+
}
|
|
2326
|
+
return source;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
// eslint-disable-next-line consistent-return
|
|
2330
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
2331
|
+
if (!utils$1.isUndefined(b)) {
|
|
2332
|
+
return getMergedValue(a, b, caseless);
|
|
2333
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2334
|
+
return getMergedValue(undefined, a, caseless);
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2187
2337
|
|
|
2188
|
-
|
|
2338
|
+
// eslint-disable-next-line consistent-return
|
|
2339
|
+
function valueFromConfig2(a, b) {
|
|
2340
|
+
if (!utils$1.isUndefined(b)) {
|
|
2341
|
+
return getMergedValue(undefined, b);
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2189
2344
|
|
|
2190
|
-
|
|
2345
|
+
// eslint-disable-next-line consistent-return
|
|
2346
|
+
function defaultToConfig2(a, b) {
|
|
2347
|
+
if (!utils$1.isUndefined(b)) {
|
|
2348
|
+
return getMergedValue(undefined, b);
|
|
2349
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2350
|
+
return getMergedValue(undefined, a);
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
// eslint-disable-next-line consistent-return
|
|
2355
|
+
function mergeDirectKeys(a, b, prop) {
|
|
2356
|
+
if (prop in config2) {
|
|
2357
|
+
return getMergedValue(a, b);
|
|
2358
|
+
} else if (prop in config1) {
|
|
2359
|
+
return getMergedValue(undefined, a);
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
const mergeMap = {
|
|
2364
|
+
url: valueFromConfig2,
|
|
2365
|
+
method: valueFromConfig2,
|
|
2366
|
+
data: valueFromConfig2,
|
|
2367
|
+
baseURL: defaultToConfig2,
|
|
2368
|
+
transformRequest: defaultToConfig2,
|
|
2369
|
+
transformResponse: defaultToConfig2,
|
|
2370
|
+
paramsSerializer: defaultToConfig2,
|
|
2371
|
+
timeout: defaultToConfig2,
|
|
2372
|
+
timeoutMessage: defaultToConfig2,
|
|
2373
|
+
withCredentials: defaultToConfig2,
|
|
2374
|
+
withXSRFToken: defaultToConfig2,
|
|
2375
|
+
adapter: defaultToConfig2,
|
|
2376
|
+
responseType: defaultToConfig2,
|
|
2377
|
+
xsrfCookieName: defaultToConfig2,
|
|
2378
|
+
xsrfHeaderName: defaultToConfig2,
|
|
2379
|
+
onUploadProgress: defaultToConfig2,
|
|
2380
|
+
onDownloadProgress: defaultToConfig2,
|
|
2381
|
+
decompress: defaultToConfig2,
|
|
2382
|
+
maxContentLength: defaultToConfig2,
|
|
2383
|
+
maxBodyLength: defaultToConfig2,
|
|
2384
|
+
beforeRedirect: defaultToConfig2,
|
|
2385
|
+
transport: defaultToConfig2,
|
|
2386
|
+
httpAgent: defaultToConfig2,
|
|
2387
|
+
httpsAgent: defaultToConfig2,
|
|
2388
|
+
cancelToken: defaultToConfig2,
|
|
2389
|
+
socketPath: defaultToConfig2,
|
|
2390
|
+
responseEncoding: defaultToConfig2,
|
|
2391
|
+
validateStatus: mergeDirectKeys,
|
|
2392
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
2191
2393
|
};
|
|
2394
|
+
|
|
2395
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2396
|
+
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
2397
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2398
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
2399
|
+
});
|
|
2400
|
+
|
|
2401
|
+
return config;
|
|
2192
2402
|
}
|
|
2193
2403
|
|
|
2194
|
-
|
|
2404
|
+
var resolveConfig = (config) => {
|
|
2405
|
+
const newConfig = mergeConfig({}, config);
|
|
2195
2406
|
|
|
2196
|
-
|
|
2197
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2198
|
-
let requestData = config.data;
|
|
2199
|
-
const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
2200
|
-
let {responseType, withXSRFToken} = config;
|
|
2201
|
-
let onCanceled;
|
|
2202
|
-
function done() {
|
|
2203
|
-
if (config.cancelToken) {
|
|
2204
|
-
config.cancelToken.unsubscribe(onCanceled);
|
|
2205
|
-
}
|
|
2407
|
+
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
2206
2408
|
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2409
|
+
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
2410
|
+
|
|
2411
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
|
2412
|
+
|
|
2413
|
+
// HTTP basic authentication
|
|
2414
|
+
if (auth) {
|
|
2415
|
+
headers.set('Authorization', 'Basic ' +
|
|
2416
|
+
btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
|
|
2417
|
+
);
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
let contentType;
|
|
2421
|
+
|
|
2422
|
+
if (utils$1.isFormData(data)) {
|
|
2423
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
2424
|
+
headers.setContentType(undefined); // Let the browser set it
|
|
2425
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
|
2426
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
2427
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
2428
|
+
headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
2210
2429
|
}
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
// Add xsrf header
|
|
2433
|
+
// This is only done if running in a standard browser environment.
|
|
2434
|
+
// Specifically not if we're in a web worker, or react-native.
|
|
2435
|
+
|
|
2436
|
+
if (platform.hasStandardBrowserEnv) {
|
|
2437
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
2211
2438
|
|
|
2212
|
-
|
|
2439
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
|
|
2440
|
+
// Add xsrf header
|
|
2441
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
2213
2442
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
requestHeaders.setContentType(false); // Let the browser set it
|
|
2217
|
-
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
2218
|
-
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
2219
|
-
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
2220
|
-
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
2443
|
+
if (xsrfValue) {
|
|
2444
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
|
2221
2445
|
}
|
|
2222
2446
|
}
|
|
2447
|
+
}
|
|
2223
2448
|
|
|
2224
|
-
|
|
2449
|
+
return newConfig;
|
|
2450
|
+
};
|
|
2451
|
+
|
|
2452
|
+
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
2453
|
+
|
|
2454
|
+
var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2455
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2456
|
+
const _config = resolveConfig(config);
|
|
2457
|
+
let requestData = _config.data;
|
|
2458
|
+
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
2459
|
+
let {responseType, onUploadProgress, onDownloadProgress} = _config;
|
|
2460
|
+
let onCanceled;
|
|
2461
|
+
let uploadThrottled, downloadThrottled;
|
|
2462
|
+
let flushUpload, flushDownload;
|
|
2225
2463
|
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2464
|
+
function done() {
|
|
2465
|
+
flushUpload && flushUpload(); // flush events
|
|
2466
|
+
flushDownload && flushDownload(); // flush events
|
|
2467
|
+
|
|
2468
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
2469
|
+
|
|
2470
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
2231
2471
|
}
|
|
2232
2472
|
|
|
2233
|
-
|
|
2473
|
+
let request = new XMLHttpRequest();
|
|
2234
2474
|
|
|
2235
|
-
request.open(
|
|
2475
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
2236
2476
|
|
|
2237
2477
|
// Set the request timeout in MS
|
|
2238
|
-
request.timeout =
|
|
2478
|
+
request.timeout = _config.timeout;
|
|
2239
2479
|
|
|
2240
2480
|
function onloadend() {
|
|
2241
2481
|
if (!request) {
|
|
@@ -2315,10 +2555,10 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2315
2555
|
|
|
2316
2556
|
// Handle timeout
|
|
2317
2557
|
request.ontimeout = function handleTimeout() {
|
|
2318
|
-
let timeoutErrorMessage =
|
|
2319
|
-
const transitional =
|
|
2320
|
-
if (
|
|
2321
|
-
timeoutErrorMessage =
|
|
2558
|
+
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
2559
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
2560
|
+
if (_config.timeoutErrorMessage) {
|
|
2561
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
2322
2562
|
}
|
|
2323
2563
|
reject(new AxiosError(
|
|
2324
2564
|
timeoutErrorMessage,
|
|
@@ -2330,22 +2570,6 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2330
2570
|
request = null;
|
|
2331
2571
|
};
|
|
2332
2572
|
|
|
2333
|
-
// Add xsrf header
|
|
2334
|
-
// This is only done if running in a standard browser environment.
|
|
2335
|
-
// Specifically not if we're in a web worker, or react-native.
|
|
2336
|
-
if(platform.hasStandardBrowserEnv) {
|
|
2337
|
-
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
2338
|
-
|
|
2339
|
-
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
|
2340
|
-
// Add xsrf header
|
|
2341
|
-
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
2342
|
-
|
|
2343
|
-
if (xsrfValue) {
|
|
2344
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
2345
|
-
}
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
2573
|
// Remove Content-Type if data is undefined
|
|
2350
2574
|
requestData === undefined && requestHeaders.setContentType(null);
|
|
2351
2575
|
|
|
@@ -2357,26 +2581,31 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2357
2581
|
}
|
|
2358
2582
|
|
|
2359
2583
|
// Add withCredentials to request if needed
|
|
2360
|
-
if (!utils$1.isUndefined(
|
|
2361
|
-
request.withCredentials = !!
|
|
2584
|
+
if (!utils$1.isUndefined(_config.withCredentials)) {
|
|
2585
|
+
request.withCredentials = !!_config.withCredentials;
|
|
2362
2586
|
}
|
|
2363
2587
|
|
|
2364
2588
|
// Add responseType to request if needed
|
|
2365
2589
|
if (responseType && responseType !== 'json') {
|
|
2366
|
-
request.responseType =
|
|
2590
|
+
request.responseType = _config.responseType;
|
|
2367
2591
|
}
|
|
2368
2592
|
|
|
2369
2593
|
// Handle progress if needed
|
|
2370
|
-
if (
|
|
2371
|
-
|
|
2594
|
+
if (onDownloadProgress) {
|
|
2595
|
+
([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
|
|
2596
|
+
request.addEventListener('progress', downloadThrottled);
|
|
2372
2597
|
}
|
|
2373
2598
|
|
|
2374
2599
|
// Not all browsers support upload events
|
|
2375
|
-
if (
|
|
2376
|
-
|
|
2600
|
+
if (onUploadProgress && request.upload) {
|
|
2601
|
+
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
2602
|
+
|
|
2603
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
2604
|
+
|
|
2605
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
2377
2606
|
}
|
|
2378
2607
|
|
|
2379
|
-
if (
|
|
2608
|
+
if (_config.cancelToken || _config.signal) {
|
|
2380
2609
|
// Handle cancellation
|
|
2381
2610
|
// eslint-disable-next-line func-names
|
|
2382
2611
|
onCanceled = cancel => {
|
|
@@ -2388,13 +2617,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2388
2617
|
request = null;
|
|
2389
2618
|
};
|
|
2390
2619
|
|
|
2391
|
-
|
|
2392
|
-
if (
|
|
2393
|
-
|
|
2620
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
2621
|
+
if (_config.signal) {
|
|
2622
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
2394
2623
|
}
|
|
2395
2624
|
}
|
|
2396
2625
|
|
|
2397
|
-
const protocol = parseProtocol(
|
|
2626
|
+
const protocol = parseProtocol(_config.url);
|
|
2398
2627
|
|
|
2399
2628
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
2400
2629
|
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
@@ -2407,9 +2636,360 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2407
2636
|
});
|
|
2408
2637
|
};
|
|
2409
2638
|
|
|
2639
|
+
const composeSignals = (signals, timeout) => {
|
|
2640
|
+
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
2641
|
+
|
|
2642
|
+
if (timeout || length) {
|
|
2643
|
+
let controller = new AbortController();
|
|
2644
|
+
|
|
2645
|
+
let aborted;
|
|
2646
|
+
|
|
2647
|
+
const onabort = function (reason) {
|
|
2648
|
+
if (!aborted) {
|
|
2649
|
+
aborted = true;
|
|
2650
|
+
unsubscribe();
|
|
2651
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
2652
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
2653
|
+
}
|
|
2654
|
+
};
|
|
2655
|
+
|
|
2656
|
+
let timer = timeout && setTimeout(() => {
|
|
2657
|
+
timer = null;
|
|
2658
|
+
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
2659
|
+
}, timeout);
|
|
2660
|
+
|
|
2661
|
+
const unsubscribe = () => {
|
|
2662
|
+
if (signals) {
|
|
2663
|
+
timer && clearTimeout(timer);
|
|
2664
|
+
timer = null;
|
|
2665
|
+
signals.forEach(signal => {
|
|
2666
|
+
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
2667
|
+
});
|
|
2668
|
+
signals = null;
|
|
2669
|
+
}
|
|
2670
|
+
};
|
|
2671
|
+
|
|
2672
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
2673
|
+
|
|
2674
|
+
const {signal} = controller;
|
|
2675
|
+
|
|
2676
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
2677
|
+
|
|
2678
|
+
return signal;
|
|
2679
|
+
}
|
|
2680
|
+
};
|
|
2681
|
+
|
|
2682
|
+
var composeSignals$1 = composeSignals;
|
|
2683
|
+
|
|
2684
|
+
const streamChunk = function* (chunk, chunkSize) {
|
|
2685
|
+
let len = chunk.byteLength;
|
|
2686
|
+
|
|
2687
|
+
if (!chunkSize || len < chunkSize) {
|
|
2688
|
+
yield chunk;
|
|
2689
|
+
return;
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
let pos = 0;
|
|
2693
|
+
let end;
|
|
2694
|
+
|
|
2695
|
+
while (pos < len) {
|
|
2696
|
+
end = pos + chunkSize;
|
|
2697
|
+
yield chunk.slice(pos, end);
|
|
2698
|
+
pos = end;
|
|
2699
|
+
}
|
|
2700
|
+
};
|
|
2701
|
+
|
|
2702
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
2703
|
+
for await (const chunk of readStream(iterable)) {
|
|
2704
|
+
yield* streamChunk(chunk, chunkSize);
|
|
2705
|
+
}
|
|
2706
|
+
};
|
|
2707
|
+
|
|
2708
|
+
const readStream = async function* (stream) {
|
|
2709
|
+
if (stream[Symbol.asyncIterator]) {
|
|
2710
|
+
yield* stream;
|
|
2711
|
+
return;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
const reader = stream.getReader();
|
|
2715
|
+
try {
|
|
2716
|
+
for (;;) {
|
|
2717
|
+
const {done, value} = await reader.read();
|
|
2718
|
+
if (done) {
|
|
2719
|
+
break;
|
|
2720
|
+
}
|
|
2721
|
+
yield value;
|
|
2722
|
+
}
|
|
2723
|
+
} finally {
|
|
2724
|
+
await reader.cancel();
|
|
2725
|
+
}
|
|
2726
|
+
};
|
|
2727
|
+
|
|
2728
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
2729
|
+
const iterator = readBytes(stream, chunkSize);
|
|
2730
|
+
|
|
2731
|
+
let bytes = 0;
|
|
2732
|
+
let done;
|
|
2733
|
+
let _onFinish = (e) => {
|
|
2734
|
+
if (!done) {
|
|
2735
|
+
done = true;
|
|
2736
|
+
onFinish && onFinish(e);
|
|
2737
|
+
}
|
|
2738
|
+
};
|
|
2739
|
+
|
|
2740
|
+
return new ReadableStream({
|
|
2741
|
+
async pull(controller) {
|
|
2742
|
+
try {
|
|
2743
|
+
const {done, value} = await iterator.next();
|
|
2744
|
+
|
|
2745
|
+
if (done) {
|
|
2746
|
+
_onFinish();
|
|
2747
|
+
controller.close();
|
|
2748
|
+
return;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
let len = value.byteLength;
|
|
2752
|
+
if (onProgress) {
|
|
2753
|
+
let loadedBytes = bytes += len;
|
|
2754
|
+
onProgress(loadedBytes);
|
|
2755
|
+
}
|
|
2756
|
+
controller.enqueue(new Uint8Array(value));
|
|
2757
|
+
} catch (err) {
|
|
2758
|
+
_onFinish(err);
|
|
2759
|
+
throw err;
|
|
2760
|
+
}
|
|
2761
|
+
},
|
|
2762
|
+
cancel(reason) {
|
|
2763
|
+
_onFinish(reason);
|
|
2764
|
+
return iterator.return();
|
|
2765
|
+
}
|
|
2766
|
+
}, {
|
|
2767
|
+
highWaterMark: 2
|
|
2768
|
+
})
|
|
2769
|
+
};
|
|
2770
|
+
|
|
2771
|
+
const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
|
|
2772
|
+
const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
|
|
2773
|
+
|
|
2774
|
+
// used only inside the fetch adapter
|
|
2775
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
2776
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
2777
|
+
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
2778
|
+
);
|
|
2779
|
+
|
|
2780
|
+
const test = (fn, ...args) => {
|
|
2781
|
+
try {
|
|
2782
|
+
return !!fn(...args);
|
|
2783
|
+
} catch (e) {
|
|
2784
|
+
return false
|
|
2785
|
+
}
|
|
2786
|
+
};
|
|
2787
|
+
|
|
2788
|
+
const supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
2789
|
+
let duplexAccessed = false;
|
|
2790
|
+
|
|
2791
|
+
const hasContentType = new Request(platform.origin, {
|
|
2792
|
+
body: new ReadableStream(),
|
|
2793
|
+
method: 'POST',
|
|
2794
|
+
get duplex() {
|
|
2795
|
+
duplexAccessed = true;
|
|
2796
|
+
return 'half';
|
|
2797
|
+
},
|
|
2798
|
+
}).headers.has('Content-Type');
|
|
2799
|
+
|
|
2800
|
+
return duplexAccessed && !hasContentType;
|
|
2801
|
+
});
|
|
2802
|
+
|
|
2803
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
2804
|
+
|
|
2805
|
+
const supportsResponseStream = isReadableStreamSupported &&
|
|
2806
|
+
test(() => utils$1.isReadableStream(new Response('').body));
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
const resolvers = {
|
|
2810
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
2811
|
+
};
|
|
2812
|
+
|
|
2813
|
+
isFetchSupported && (((res) => {
|
|
2814
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
2815
|
+
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
|
2816
|
+
(_, config) => {
|
|
2817
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
2818
|
+
});
|
|
2819
|
+
});
|
|
2820
|
+
})(new Response));
|
|
2821
|
+
|
|
2822
|
+
const getBodyLength = async (body) => {
|
|
2823
|
+
if (body == null) {
|
|
2824
|
+
return 0;
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
if(utils$1.isBlob(body)) {
|
|
2828
|
+
return body.size;
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
if(utils$1.isSpecCompliantForm(body)) {
|
|
2832
|
+
const _request = new Request(platform.origin, {
|
|
2833
|
+
method: 'POST',
|
|
2834
|
+
body,
|
|
2835
|
+
});
|
|
2836
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
2840
|
+
return body.byteLength;
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
if(utils$1.isURLSearchParams(body)) {
|
|
2844
|
+
body = body + '';
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
if(utils$1.isString(body)) {
|
|
2848
|
+
return (await encodeText(body)).byteLength;
|
|
2849
|
+
}
|
|
2850
|
+
};
|
|
2851
|
+
|
|
2852
|
+
const resolveBodyLength = async (headers, body) => {
|
|
2853
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
2854
|
+
|
|
2855
|
+
return length == null ? getBodyLength(body) : length;
|
|
2856
|
+
};
|
|
2857
|
+
|
|
2858
|
+
var fetchAdapter = isFetchSupported && (async (config) => {
|
|
2859
|
+
let {
|
|
2860
|
+
url,
|
|
2861
|
+
method,
|
|
2862
|
+
data,
|
|
2863
|
+
signal,
|
|
2864
|
+
cancelToken,
|
|
2865
|
+
timeout,
|
|
2866
|
+
onDownloadProgress,
|
|
2867
|
+
onUploadProgress,
|
|
2868
|
+
responseType,
|
|
2869
|
+
headers,
|
|
2870
|
+
withCredentials = 'same-origin',
|
|
2871
|
+
fetchOptions
|
|
2872
|
+
} = resolveConfig(config);
|
|
2873
|
+
|
|
2874
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
2875
|
+
|
|
2876
|
+
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
2877
|
+
|
|
2878
|
+
let request;
|
|
2879
|
+
|
|
2880
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
2881
|
+
composedSignal.unsubscribe();
|
|
2882
|
+
});
|
|
2883
|
+
|
|
2884
|
+
let requestContentLength;
|
|
2885
|
+
|
|
2886
|
+
try {
|
|
2887
|
+
if (
|
|
2888
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
2889
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
2890
|
+
) {
|
|
2891
|
+
let _request = new Request(url, {
|
|
2892
|
+
method: 'POST',
|
|
2893
|
+
body: data,
|
|
2894
|
+
duplex: "half"
|
|
2895
|
+
});
|
|
2896
|
+
|
|
2897
|
+
let contentTypeHeader;
|
|
2898
|
+
|
|
2899
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
2900
|
+
headers.setContentType(contentTypeHeader);
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2903
|
+
if (_request.body) {
|
|
2904
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
2905
|
+
requestContentLength,
|
|
2906
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
2907
|
+
);
|
|
2908
|
+
|
|
2909
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
if (!utils$1.isString(withCredentials)) {
|
|
2914
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
// Cloudflare Workers throws when credentials are defined
|
|
2918
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
2919
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
2920
|
+
request = new Request(url, {
|
|
2921
|
+
...fetchOptions,
|
|
2922
|
+
signal: composedSignal,
|
|
2923
|
+
method: method.toUpperCase(),
|
|
2924
|
+
headers: headers.normalize().toJSON(),
|
|
2925
|
+
body: data,
|
|
2926
|
+
duplex: "half",
|
|
2927
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
2928
|
+
});
|
|
2929
|
+
|
|
2930
|
+
let response = await fetch(request);
|
|
2931
|
+
|
|
2932
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
2933
|
+
|
|
2934
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
2935
|
+
const options = {};
|
|
2936
|
+
|
|
2937
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
2938
|
+
options[prop] = response[prop];
|
|
2939
|
+
});
|
|
2940
|
+
|
|
2941
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
2942
|
+
|
|
2943
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
2944
|
+
responseContentLength,
|
|
2945
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
2946
|
+
) || [];
|
|
2947
|
+
|
|
2948
|
+
response = new Response(
|
|
2949
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
2950
|
+
flush && flush();
|
|
2951
|
+
unsubscribe && unsubscribe();
|
|
2952
|
+
}),
|
|
2953
|
+
options
|
|
2954
|
+
);
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
responseType = responseType || 'text';
|
|
2958
|
+
|
|
2959
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
2960
|
+
|
|
2961
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
2962
|
+
|
|
2963
|
+
return await new Promise((resolve, reject) => {
|
|
2964
|
+
settle(resolve, reject, {
|
|
2965
|
+
data: responseData,
|
|
2966
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
2967
|
+
status: response.status,
|
|
2968
|
+
statusText: response.statusText,
|
|
2969
|
+
config,
|
|
2970
|
+
request
|
|
2971
|
+
});
|
|
2972
|
+
})
|
|
2973
|
+
} catch (err) {
|
|
2974
|
+
unsubscribe && unsubscribe();
|
|
2975
|
+
|
|
2976
|
+
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
|
2977
|
+
throw Object.assign(
|
|
2978
|
+
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
|
2979
|
+
{
|
|
2980
|
+
cause: err.cause || err
|
|
2981
|
+
}
|
|
2982
|
+
)
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
2986
|
+
}
|
|
2987
|
+
});
|
|
2988
|
+
|
|
2410
2989
|
const knownAdapters = {
|
|
2411
2990
|
http: httpAdapter,
|
|
2412
|
-
xhr: xhrAdapter
|
|
2991
|
+
xhr: xhrAdapter,
|
|
2992
|
+
fetch: fetchAdapter
|
|
2413
2993
|
};
|
|
2414
2994
|
|
|
2415
2995
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
@@ -2553,109 +3133,7 @@ function dispatchRequest(config) {
|
|
|
2553
3133
|
});
|
|
2554
3134
|
}
|
|
2555
3135
|
|
|
2556
|
-
const
|
|
2557
|
-
|
|
2558
|
-
/**
|
|
2559
|
-
* Config-specific merge-function which creates a new config-object
|
|
2560
|
-
* by merging two configuration objects together.
|
|
2561
|
-
*
|
|
2562
|
-
* @param {Object} config1
|
|
2563
|
-
* @param {Object} config2
|
|
2564
|
-
*
|
|
2565
|
-
* @returns {Object} New object resulting from merging config2 to config1
|
|
2566
|
-
*/
|
|
2567
|
-
function mergeConfig(config1, config2) {
|
|
2568
|
-
// eslint-disable-next-line no-param-reassign
|
|
2569
|
-
config2 = config2 || {};
|
|
2570
|
-
const config = {};
|
|
2571
|
-
|
|
2572
|
-
function getMergedValue(target, source, caseless) {
|
|
2573
|
-
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
2574
|
-
return utils$1.merge.call({caseless}, target, source);
|
|
2575
|
-
} else if (utils$1.isPlainObject(source)) {
|
|
2576
|
-
return utils$1.merge({}, source);
|
|
2577
|
-
} else if (utils$1.isArray(source)) {
|
|
2578
|
-
return source.slice();
|
|
2579
|
-
}
|
|
2580
|
-
return source;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
// eslint-disable-next-line consistent-return
|
|
2584
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
2585
|
-
if (!utils$1.isUndefined(b)) {
|
|
2586
|
-
return getMergedValue(a, b, caseless);
|
|
2587
|
-
} else if (!utils$1.isUndefined(a)) {
|
|
2588
|
-
return getMergedValue(undefined, a, caseless);
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
|
|
2592
|
-
// eslint-disable-next-line consistent-return
|
|
2593
|
-
function valueFromConfig2(a, b) {
|
|
2594
|
-
if (!utils$1.isUndefined(b)) {
|
|
2595
|
-
return getMergedValue(undefined, b);
|
|
2596
|
-
}
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
// eslint-disable-next-line consistent-return
|
|
2600
|
-
function defaultToConfig2(a, b) {
|
|
2601
|
-
if (!utils$1.isUndefined(b)) {
|
|
2602
|
-
return getMergedValue(undefined, b);
|
|
2603
|
-
} else if (!utils$1.isUndefined(a)) {
|
|
2604
|
-
return getMergedValue(undefined, a);
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
// eslint-disable-next-line consistent-return
|
|
2609
|
-
function mergeDirectKeys(a, b, prop) {
|
|
2610
|
-
if (prop in config2) {
|
|
2611
|
-
return getMergedValue(a, b);
|
|
2612
|
-
} else if (prop in config1) {
|
|
2613
|
-
return getMergedValue(undefined, a);
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
const mergeMap = {
|
|
2618
|
-
url: valueFromConfig2,
|
|
2619
|
-
method: valueFromConfig2,
|
|
2620
|
-
data: valueFromConfig2,
|
|
2621
|
-
baseURL: defaultToConfig2,
|
|
2622
|
-
transformRequest: defaultToConfig2,
|
|
2623
|
-
transformResponse: defaultToConfig2,
|
|
2624
|
-
paramsSerializer: defaultToConfig2,
|
|
2625
|
-
timeout: defaultToConfig2,
|
|
2626
|
-
timeoutMessage: defaultToConfig2,
|
|
2627
|
-
withCredentials: defaultToConfig2,
|
|
2628
|
-
withXSRFToken: defaultToConfig2,
|
|
2629
|
-
adapter: defaultToConfig2,
|
|
2630
|
-
responseType: defaultToConfig2,
|
|
2631
|
-
xsrfCookieName: defaultToConfig2,
|
|
2632
|
-
xsrfHeaderName: defaultToConfig2,
|
|
2633
|
-
onUploadProgress: defaultToConfig2,
|
|
2634
|
-
onDownloadProgress: defaultToConfig2,
|
|
2635
|
-
decompress: defaultToConfig2,
|
|
2636
|
-
maxContentLength: defaultToConfig2,
|
|
2637
|
-
maxBodyLength: defaultToConfig2,
|
|
2638
|
-
beforeRedirect: defaultToConfig2,
|
|
2639
|
-
transport: defaultToConfig2,
|
|
2640
|
-
httpAgent: defaultToConfig2,
|
|
2641
|
-
httpsAgent: defaultToConfig2,
|
|
2642
|
-
cancelToken: defaultToConfig2,
|
|
2643
|
-
socketPath: defaultToConfig2,
|
|
2644
|
-
responseEncoding: defaultToConfig2,
|
|
2645
|
-
validateStatus: mergeDirectKeys,
|
|
2646
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
2647
|
-
};
|
|
2648
|
-
|
|
2649
|
-
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2650
|
-
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
2651
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2652
|
-
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
2653
|
-
});
|
|
2654
|
-
|
|
2655
|
-
return config;
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
const VERSION = "1.6.8";
|
|
3136
|
+
const VERSION = "1.7.7";
|
|
2659
3137
|
|
|
2660
3138
|
const validators$1 = {};
|
|
2661
3139
|
|
|
@@ -2781,12 +3259,15 @@ class Axios {
|
|
|
2781
3259
|
|
|
2782
3260
|
// slice off the Error: ... line
|
|
2783
3261
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
3262
|
+
try {
|
|
3263
|
+
if (!err.stack) {
|
|
3264
|
+
err.stack = stack;
|
|
3265
|
+
// match without the 2 top stack lines
|
|
3266
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
|
3267
|
+
err.stack += '\n' + stack;
|
|
3268
|
+
}
|
|
3269
|
+
} catch (e) {
|
|
3270
|
+
// ignore the case where "stack" is an un-writable property
|
|
2790
3271
|
}
|
|
2791
3272
|
}
|
|
2792
3273
|
|
|
@@ -3059,6 +3540,20 @@ class CancelToken {
|
|
|
3059
3540
|
}
|
|
3060
3541
|
}
|
|
3061
3542
|
|
|
3543
|
+
toAbortSignal() {
|
|
3544
|
+
const controller = new AbortController();
|
|
3545
|
+
|
|
3546
|
+
const abort = (err) => {
|
|
3547
|
+
controller.abort(err);
|
|
3548
|
+
};
|
|
3549
|
+
|
|
3550
|
+
this.subscribe(abort);
|
|
3551
|
+
|
|
3552
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
3553
|
+
|
|
3554
|
+
return controller.signal;
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3062
3557
|
/**
|
|
3063
3558
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
3064
3559
|
* cancels the `CancelToken`.
|