@supernovaio/cli 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/publish-documentation.js +25 -3
- package/dist/utils/figma-tokens-data-loader.js +51 -49
- 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 +1 -1
- package/package.json +108 -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,10 +1,144 @@
|
|
|
1
|
-
// Axios v1.
|
|
1
|
+
// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
5
5
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
|
|
6
6
|
})(this, (function () { 'use strict';
|
|
7
7
|
|
|
8
|
+
function _AsyncGenerator(e) {
|
|
9
|
+
var r, t;
|
|
10
|
+
function resume(r, t) {
|
|
11
|
+
try {
|
|
12
|
+
var n = e[r](t),
|
|
13
|
+
o = n.value,
|
|
14
|
+
u = o instanceof _OverloadYield;
|
|
15
|
+
Promise.resolve(u ? o.v : o).then(function (t) {
|
|
16
|
+
if (u) {
|
|
17
|
+
var i = "return" === r ? "return" : "next";
|
|
18
|
+
if (!o.k || t.done) return resume(i, t);
|
|
19
|
+
t = e[i](t).value;
|
|
20
|
+
}
|
|
21
|
+
settle(n.done ? "return" : "normal", t);
|
|
22
|
+
}, function (e) {
|
|
23
|
+
resume("throw", e);
|
|
24
|
+
});
|
|
25
|
+
} catch (e) {
|
|
26
|
+
settle("throw", e);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function settle(e, n) {
|
|
30
|
+
switch (e) {
|
|
31
|
+
case "return":
|
|
32
|
+
r.resolve({
|
|
33
|
+
value: n,
|
|
34
|
+
done: !0
|
|
35
|
+
});
|
|
36
|
+
break;
|
|
37
|
+
case "throw":
|
|
38
|
+
r.reject(n);
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
r.resolve({
|
|
42
|
+
value: n,
|
|
43
|
+
done: !1
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
(r = r.next) ? resume(r.key, r.arg) : t = null;
|
|
47
|
+
}
|
|
48
|
+
this._invoke = function (e, n) {
|
|
49
|
+
return new Promise(function (o, u) {
|
|
50
|
+
var i = {
|
|
51
|
+
key: e,
|
|
52
|
+
arg: n,
|
|
53
|
+
resolve: o,
|
|
54
|
+
reject: u,
|
|
55
|
+
next: null
|
|
56
|
+
};
|
|
57
|
+
t ? t = t.next = i : (r = t = i, resume(e, n));
|
|
58
|
+
});
|
|
59
|
+
}, "function" != typeof e.return && (this.return = void 0);
|
|
60
|
+
}
|
|
61
|
+
_AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
|
|
62
|
+
return this;
|
|
63
|
+
}, _AsyncGenerator.prototype.next = function (e) {
|
|
64
|
+
return this._invoke("next", e);
|
|
65
|
+
}, _AsyncGenerator.prototype.throw = function (e) {
|
|
66
|
+
return this._invoke("throw", e);
|
|
67
|
+
}, _AsyncGenerator.prototype.return = function (e) {
|
|
68
|
+
return this._invoke("return", e);
|
|
69
|
+
};
|
|
70
|
+
function _OverloadYield(t, e) {
|
|
71
|
+
this.v = t, this.k = e;
|
|
72
|
+
}
|
|
73
|
+
function _asyncGeneratorDelegate(t) {
|
|
74
|
+
var e = {},
|
|
75
|
+
n = !1;
|
|
76
|
+
function pump(e, r) {
|
|
77
|
+
return n = !0, r = new Promise(function (n) {
|
|
78
|
+
n(t[e](r));
|
|
79
|
+
}), {
|
|
80
|
+
done: !1,
|
|
81
|
+
value: new _OverloadYield(r, 1)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
|
|
85
|
+
return this;
|
|
86
|
+
}, e.next = function (t) {
|
|
87
|
+
return n ? (n = !1, t) : pump("next", t);
|
|
88
|
+
}, "function" == typeof t.throw && (e.throw = function (t) {
|
|
89
|
+
if (n) throw n = !1, t;
|
|
90
|
+
return pump("throw", t);
|
|
91
|
+
}), "function" == typeof t.return && (e.return = function (t) {
|
|
92
|
+
return n ? (n = !1, t) : pump("return", t);
|
|
93
|
+
}), e;
|
|
94
|
+
}
|
|
95
|
+
function _asyncIterator(r) {
|
|
96
|
+
var n,
|
|
97
|
+
t,
|
|
98
|
+
o,
|
|
99
|
+
e = 2;
|
|
100
|
+
for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
|
|
101
|
+
if (t && null != (n = r[t])) return n.call(r);
|
|
102
|
+
if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
|
|
103
|
+
t = "@@asyncIterator", o = "@@iterator";
|
|
104
|
+
}
|
|
105
|
+
throw new TypeError("Object is not async iterable");
|
|
106
|
+
}
|
|
107
|
+
function AsyncFromSyncIterator(r) {
|
|
108
|
+
function AsyncFromSyncIteratorContinuation(r) {
|
|
109
|
+
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
|
|
110
|
+
var n = r.done;
|
|
111
|
+
return Promise.resolve(r.value).then(function (r) {
|
|
112
|
+
return {
|
|
113
|
+
value: r,
|
|
114
|
+
done: n
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return AsyncFromSyncIterator = function (r) {
|
|
119
|
+
this.s = r, this.n = r.next;
|
|
120
|
+
}, AsyncFromSyncIterator.prototype = {
|
|
121
|
+
s: null,
|
|
122
|
+
n: null,
|
|
123
|
+
next: function () {
|
|
124
|
+
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
|
|
125
|
+
},
|
|
126
|
+
return: function (r) {
|
|
127
|
+
var n = this.s.return;
|
|
128
|
+
return void 0 === n ? Promise.resolve({
|
|
129
|
+
value: r,
|
|
130
|
+
done: !0
|
|
131
|
+
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
|
|
132
|
+
},
|
|
133
|
+
throw: function (r) {
|
|
134
|
+
var n = this.s.return;
|
|
135
|
+
return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
|
|
136
|
+
}
|
|
137
|
+
}, new AsyncFromSyncIterator(r);
|
|
138
|
+
}
|
|
139
|
+
function _awaitAsyncGenerator(e) {
|
|
140
|
+
return new _OverloadYield(e, 0);
|
|
141
|
+
}
|
|
8
142
|
function _iterableToArrayLimit(r, l) {
|
|
9
143
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
10
144
|
if (null != t) {
|
|
@@ -377,6 +511,11 @@
|
|
|
377
511
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
378
512
|
}, _typeof(o);
|
|
379
513
|
}
|
|
514
|
+
function _wrapAsyncGenerator(fn) {
|
|
515
|
+
return function () {
|
|
516
|
+
return new _AsyncGenerator(fn.apply(this, arguments));
|
|
517
|
+
};
|
|
518
|
+
}
|
|
380
519
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
381
520
|
try {
|
|
382
521
|
var info = gen[key](arg);
|
|
@@ -480,6 +619,57 @@
|
|
|
480
619
|
function _nonIterableRest() {
|
|
481
620
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
482
621
|
}
|
|
622
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
623
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
624
|
+
if (!it) {
|
|
625
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
626
|
+
if (it) o = it;
|
|
627
|
+
var i = 0;
|
|
628
|
+
var F = function () {};
|
|
629
|
+
return {
|
|
630
|
+
s: F,
|
|
631
|
+
n: function () {
|
|
632
|
+
if (i >= o.length) return {
|
|
633
|
+
done: true
|
|
634
|
+
};
|
|
635
|
+
return {
|
|
636
|
+
done: false,
|
|
637
|
+
value: o[i++]
|
|
638
|
+
};
|
|
639
|
+
},
|
|
640
|
+
e: function (e) {
|
|
641
|
+
throw e;
|
|
642
|
+
},
|
|
643
|
+
f: F
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
647
|
+
}
|
|
648
|
+
var normalCompletion = true,
|
|
649
|
+
didErr = false,
|
|
650
|
+
err;
|
|
651
|
+
return {
|
|
652
|
+
s: function () {
|
|
653
|
+
it = it.call(o);
|
|
654
|
+
},
|
|
655
|
+
n: function () {
|
|
656
|
+
var step = it.next();
|
|
657
|
+
normalCompletion = step.done;
|
|
658
|
+
return step;
|
|
659
|
+
},
|
|
660
|
+
e: function (e) {
|
|
661
|
+
didErr = true;
|
|
662
|
+
err = e;
|
|
663
|
+
},
|
|
664
|
+
f: function () {
|
|
665
|
+
try {
|
|
666
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
667
|
+
} finally {
|
|
668
|
+
if (didErr) throw err;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
}
|
|
483
673
|
|
|
484
674
|
function bind(fn, thisArg) {
|
|
485
675
|
return function wrap() {
|
|
@@ -695,6 +885,12 @@
|
|
|
695
885
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
696
886
|
*/
|
|
697
887
|
var isURLSearchParams = kindOfTest('URLSearchParams');
|
|
888
|
+
var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
|
|
889
|
+
_map2 = _slicedToArray(_map, 4),
|
|
890
|
+
isReadableStream = _map2[0],
|
|
891
|
+
isRequest = _map2[1],
|
|
892
|
+
isResponse = _map2[2],
|
|
893
|
+
isHeaders = _map2[3];
|
|
698
894
|
|
|
699
895
|
/**
|
|
700
896
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -1068,8 +1264,7 @@
|
|
|
1068
1264
|
};
|
|
1069
1265
|
var noop = function noop() {};
|
|
1070
1266
|
var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
|
|
1071
|
-
value = +value;
|
|
1072
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
1267
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
1073
1268
|
};
|
|
1074
1269
|
var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
1075
1270
|
var DIGIT = '0123456789';
|
|
@@ -1125,6 +1320,34 @@
|
|
|
1125
1320
|
var isThenable = function isThenable(thing) {
|
|
1126
1321
|
return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing["catch"]);
|
|
1127
1322
|
};
|
|
1323
|
+
|
|
1324
|
+
// original code
|
|
1325
|
+
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
1326
|
+
|
|
1327
|
+
var _setImmediate = function (setImmediateSupported, postMessageSupported) {
|
|
1328
|
+
if (setImmediateSupported) {
|
|
1329
|
+
return setImmediate;
|
|
1330
|
+
}
|
|
1331
|
+
return postMessageSupported ? function (token, callbacks) {
|
|
1332
|
+
_global.addEventListener("message", function (_ref5) {
|
|
1333
|
+
var source = _ref5.source,
|
|
1334
|
+
data = _ref5.data;
|
|
1335
|
+
if (source === _global && data === token) {
|
|
1336
|
+
callbacks.length && callbacks.shift()();
|
|
1337
|
+
}
|
|
1338
|
+
}, false);
|
|
1339
|
+
return function (cb) {
|
|
1340
|
+
callbacks.push(cb);
|
|
1341
|
+
_global.postMessage(token, "*");
|
|
1342
|
+
};
|
|
1343
|
+
}("axios@".concat(Math.random()), []) : function (cb) {
|
|
1344
|
+
return setTimeout(cb);
|
|
1345
|
+
};
|
|
1346
|
+
}(typeof setImmediate === 'function', isFunction(_global.postMessage));
|
|
1347
|
+
var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate;
|
|
1348
|
+
|
|
1349
|
+
// *********************
|
|
1350
|
+
|
|
1128
1351
|
var utils$1 = {
|
|
1129
1352
|
isArray: isArray,
|
|
1130
1353
|
isArrayBuffer: isArrayBuffer,
|
|
@@ -1136,6 +1359,10 @@
|
|
|
1136
1359
|
isBoolean: isBoolean,
|
|
1137
1360
|
isObject: isObject,
|
|
1138
1361
|
isPlainObject: isPlainObject,
|
|
1362
|
+
isReadableStream: isReadableStream,
|
|
1363
|
+
isRequest: isRequest,
|
|
1364
|
+
isResponse: isResponse,
|
|
1365
|
+
isHeaders: isHeaders,
|
|
1139
1366
|
isUndefined: isUndefined,
|
|
1140
1367
|
isDate: isDate,
|
|
1141
1368
|
isFile: isFile,
|
|
@@ -1177,7 +1404,9 @@
|
|
|
1177
1404
|
isSpecCompliantForm: isSpecCompliantForm,
|
|
1178
1405
|
toJSONObject: toJSONObject,
|
|
1179
1406
|
isAsyncFn: isAsyncFn,
|
|
1180
|
-
isThenable: isThenable
|
|
1407
|
+
isThenable: isThenable,
|
|
1408
|
+
setImmediate: _setImmediate,
|
|
1409
|
+
asap: asap
|
|
1181
1410
|
};
|
|
1182
1411
|
|
|
1183
1412
|
/**
|
|
@@ -1203,7 +1432,10 @@
|
|
|
1203
1432
|
code && (this.code = code);
|
|
1204
1433
|
config && (this.config = config);
|
|
1205
1434
|
request && (this.request = request);
|
|
1206
|
-
|
|
1435
|
+
if (response) {
|
|
1436
|
+
this.response = response;
|
|
1437
|
+
this.status = response.status ? response.status : null;
|
|
1438
|
+
}
|
|
1207
1439
|
}
|
|
1208
1440
|
utils$1.inherits(AxiosError, Error, {
|
|
1209
1441
|
toJSON: function toJSON() {
|
|
@@ -1222,7 +1454,7 @@
|
|
|
1222
1454
|
// Axios
|
|
1223
1455
|
config: utils$1.toJSONObject(this.config),
|
|
1224
1456
|
code: this.code,
|
|
1225
|
-
status: this.
|
|
1457
|
+
status: this.status
|
|
1226
1458
|
};
|
|
1227
1459
|
}
|
|
1228
1460
|
});
|
|
@@ -1631,6 +1863,7 @@
|
|
|
1631
1863
|
};
|
|
1632
1864
|
|
|
1633
1865
|
var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1866
|
+
var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined;
|
|
1634
1867
|
|
|
1635
1868
|
/**
|
|
1636
1869
|
* Determine if we're running in a standard browser environment
|
|
@@ -1649,9 +1882,7 @@
|
|
|
1649
1882
|
*
|
|
1650
1883
|
* @returns {boolean}
|
|
1651
1884
|
*/
|
|
1652
|
-
var hasStandardBrowserEnv =
|
|
1653
|
-
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0;
|
|
1654
|
-
}(typeof navigator !== 'undefined' && navigator.product);
|
|
1885
|
+
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
1655
1886
|
|
|
1656
1887
|
/**
|
|
1657
1888
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -1667,12 +1898,15 @@
|
|
|
1667
1898
|
// eslint-disable-next-line no-undef
|
|
1668
1899
|
self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
|
|
1669
1900
|
}();
|
|
1901
|
+
var origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
1670
1902
|
|
|
1671
1903
|
var utils = /*#__PURE__*/Object.freeze({
|
|
1672
1904
|
__proto__: null,
|
|
1673
1905
|
hasBrowserEnv: hasBrowserEnv,
|
|
1674
1906
|
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1675
|
-
hasStandardBrowserEnv: hasStandardBrowserEnv
|
|
1907
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
1908
|
+
navigator: _navigator,
|
|
1909
|
+
origin: origin
|
|
1676
1910
|
});
|
|
1677
1911
|
|
|
1678
1912
|
var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
|
|
@@ -1792,7 +2026,7 @@
|
|
|
1792
2026
|
}
|
|
1793
2027
|
var defaults = {
|
|
1794
2028
|
transitional: transitionalDefaults,
|
|
1795
|
-
adapter: ['xhr', 'http'],
|
|
2029
|
+
adapter: ['xhr', 'http', 'fetch'],
|
|
1796
2030
|
transformRequest: [function transformRequest(data, headers) {
|
|
1797
2031
|
var contentType = headers.getContentType() || '';
|
|
1798
2032
|
var hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
@@ -1804,7 +2038,7 @@
|
|
|
1804
2038
|
if (isFormData) {
|
|
1805
2039
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
1806
2040
|
}
|
|
1807
|
-
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
|
|
2041
|
+
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
|
|
1808
2042
|
return data;
|
|
1809
2043
|
}
|
|
1810
2044
|
if (utils$1.isArrayBufferView(data)) {
|
|
@@ -1836,6 +2070,9 @@
|
|
|
1836
2070
|
var transitional = this.transitional || defaults.transitional;
|
|
1837
2071
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1838
2072
|
var JSONRequested = this.responseType === 'json';
|
|
2073
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
2074
|
+
return data;
|
|
2075
|
+
}
|
|
1839
2076
|
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
1840
2077
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1841
2078
|
var strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
@@ -2004,6 +2241,21 @@
|
|
|
2004
2241
|
setHeaders(header, valueOrRewrite);
|
|
2005
2242
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
2006
2243
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
2244
|
+
} else if (utils$1.isHeaders(header)) {
|
|
2245
|
+
var _iterator = _createForOfIteratorHelper(header.entries()),
|
|
2246
|
+
_step;
|
|
2247
|
+
try {
|
|
2248
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2249
|
+
var _step$value = _slicedToArray(_step.value, 2),
|
|
2250
|
+
key = _step$value[0],
|
|
2251
|
+
value = _step$value[1];
|
|
2252
|
+
setHeader(value, key, rewrite);
|
|
2253
|
+
}
|
|
2254
|
+
} catch (err) {
|
|
2255
|
+
_iterator.e(err);
|
|
2256
|
+
} finally {
|
|
2257
|
+
_iterator.f();
|
|
2258
|
+
}
|
|
2007
2259
|
} else {
|
|
2008
2260
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
2009
2261
|
}
|
|
@@ -2255,6 +2507,196 @@
|
|
|
2255
2507
|
}
|
|
2256
2508
|
}
|
|
2257
2509
|
|
|
2510
|
+
function parseProtocol(url) {
|
|
2511
|
+
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
2512
|
+
return match && match[1] || '';
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
/**
|
|
2516
|
+
* Calculate data maxRate
|
|
2517
|
+
* @param {Number} [samplesCount= 10]
|
|
2518
|
+
* @param {Number} [min= 1000]
|
|
2519
|
+
* @returns {Function}
|
|
2520
|
+
*/
|
|
2521
|
+
function speedometer(samplesCount, min) {
|
|
2522
|
+
samplesCount = samplesCount || 10;
|
|
2523
|
+
var bytes = new Array(samplesCount);
|
|
2524
|
+
var timestamps = new Array(samplesCount);
|
|
2525
|
+
var head = 0;
|
|
2526
|
+
var tail = 0;
|
|
2527
|
+
var firstSampleTS;
|
|
2528
|
+
min = min !== undefined ? min : 1000;
|
|
2529
|
+
return function push(chunkLength) {
|
|
2530
|
+
var now = Date.now();
|
|
2531
|
+
var startedAt = timestamps[tail];
|
|
2532
|
+
if (!firstSampleTS) {
|
|
2533
|
+
firstSampleTS = now;
|
|
2534
|
+
}
|
|
2535
|
+
bytes[head] = chunkLength;
|
|
2536
|
+
timestamps[head] = now;
|
|
2537
|
+
var i = tail;
|
|
2538
|
+
var bytesCount = 0;
|
|
2539
|
+
while (i !== head) {
|
|
2540
|
+
bytesCount += bytes[i++];
|
|
2541
|
+
i = i % samplesCount;
|
|
2542
|
+
}
|
|
2543
|
+
head = (head + 1) % samplesCount;
|
|
2544
|
+
if (head === tail) {
|
|
2545
|
+
tail = (tail + 1) % samplesCount;
|
|
2546
|
+
}
|
|
2547
|
+
if (now - firstSampleTS < min) {
|
|
2548
|
+
return;
|
|
2549
|
+
}
|
|
2550
|
+
var passed = startedAt && now - startedAt;
|
|
2551
|
+
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
2552
|
+
};
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* Throttle decorator
|
|
2557
|
+
* @param {Function} fn
|
|
2558
|
+
* @param {Number} freq
|
|
2559
|
+
* @return {Function}
|
|
2560
|
+
*/
|
|
2561
|
+
function throttle(fn, freq) {
|
|
2562
|
+
var timestamp = 0;
|
|
2563
|
+
var threshold = 1000 / freq;
|
|
2564
|
+
var lastArgs;
|
|
2565
|
+
var timer;
|
|
2566
|
+
var invoke = function invoke(args) {
|
|
2567
|
+
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
|
|
2568
|
+
timestamp = now;
|
|
2569
|
+
lastArgs = null;
|
|
2570
|
+
if (timer) {
|
|
2571
|
+
clearTimeout(timer);
|
|
2572
|
+
timer = null;
|
|
2573
|
+
}
|
|
2574
|
+
fn.apply(null, args);
|
|
2575
|
+
};
|
|
2576
|
+
var throttled = function throttled() {
|
|
2577
|
+
var now = Date.now();
|
|
2578
|
+
var passed = now - timestamp;
|
|
2579
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2580
|
+
args[_key] = arguments[_key];
|
|
2581
|
+
}
|
|
2582
|
+
if (passed >= threshold) {
|
|
2583
|
+
invoke(args, now);
|
|
2584
|
+
} else {
|
|
2585
|
+
lastArgs = args;
|
|
2586
|
+
if (!timer) {
|
|
2587
|
+
timer = setTimeout(function () {
|
|
2588
|
+
timer = null;
|
|
2589
|
+
invoke(lastArgs);
|
|
2590
|
+
}, threshold - passed);
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
};
|
|
2594
|
+
var flush = function flush() {
|
|
2595
|
+
return lastArgs && invoke(lastArgs);
|
|
2596
|
+
};
|
|
2597
|
+
return [throttled, flush];
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
var progressEventReducer = function progressEventReducer(listener, isDownloadStream) {
|
|
2601
|
+
var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
2602
|
+
var bytesNotified = 0;
|
|
2603
|
+
var _speedometer = speedometer(50, 250);
|
|
2604
|
+
return throttle(function (e) {
|
|
2605
|
+
var loaded = e.loaded;
|
|
2606
|
+
var total = e.lengthComputable ? e.total : undefined;
|
|
2607
|
+
var progressBytes = loaded - bytesNotified;
|
|
2608
|
+
var rate = _speedometer(progressBytes);
|
|
2609
|
+
var inRange = loaded <= total;
|
|
2610
|
+
bytesNotified = loaded;
|
|
2611
|
+
var data = _defineProperty({
|
|
2612
|
+
loaded: loaded,
|
|
2613
|
+
total: total,
|
|
2614
|
+
progress: total ? loaded / total : undefined,
|
|
2615
|
+
bytes: progressBytes,
|
|
2616
|
+
rate: rate ? rate : undefined,
|
|
2617
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
2618
|
+
event: e,
|
|
2619
|
+
lengthComputable: total != null
|
|
2620
|
+
}, isDownloadStream ? 'download' : 'upload', true);
|
|
2621
|
+
listener(data);
|
|
2622
|
+
}, freq);
|
|
2623
|
+
};
|
|
2624
|
+
var progressEventDecorator = function progressEventDecorator(total, throttled) {
|
|
2625
|
+
var lengthComputable = total != null;
|
|
2626
|
+
return [function (loaded) {
|
|
2627
|
+
return throttled[0]({
|
|
2628
|
+
lengthComputable: lengthComputable,
|
|
2629
|
+
total: total,
|
|
2630
|
+
loaded: loaded
|
|
2631
|
+
});
|
|
2632
|
+
}, throttled[1]];
|
|
2633
|
+
};
|
|
2634
|
+
var asyncDecorator = function asyncDecorator(fn) {
|
|
2635
|
+
return function () {
|
|
2636
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2637
|
+
args[_key] = arguments[_key];
|
|
2638
|
+
}
|
|
2639
|
+
return utils$1.asap(function () {
|
|
2640
|
+
return fn.apply(void 0, args);
|
|
2641
|
+
});
|
|
2642
|
+
};
|
|
2643
|
+
};
|
|
2644
|
+
|
|
2645
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
2646
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
2647
|
+
// whether the request URL is of the same origin as current location.
|
|
2648
|
+
function standardBrowserEnv() {
|
|
2649
|
+
var msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
|
|
2650
|
+
var urlParsingNode = document.createElement('a');
|
|
2651
|
+
var originURL;
|
|
2652
|
+
|
|
2653
|
+
/**
|
|
2654
|
+
* Parse a URL to discover its components
|
|
2655
|
+
*
|
|
2656
|
+
* @param {String} url The URL to be parsed
|
|
2657
|
+
* @returns {Object}
|
|
2658
|
+
*/
|
|
2659
|
+
function resolveURL(url) {
|
|
2660
|
+
var href = url;
|
|
2661
|
+
if (msie) {
|
|
2662
|
+
// IE needs attribute set twice to normalize properties
|
|
2663
|
+
urlParsingNode.setAttribute('href', href);
|
|
2664
|
+
href = urlParsingNode.href;
|
|
2665
|
+
}
|
|
2666
|
+
urlParsingNode.setAttribute('href', href);
|
|
2667
|
+
|
|
2668
|
+
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
2669
|
+
return {
|
|
2670
|
+
href: urlParsingNode.href,
|
|
2671
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
2672
|
+
host: urlParsingNode.host,
|
|
2673
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
2674
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
2675
|
+
hostname: urlParsingNode.hostname,
|
|
2676
|
+
port: urlParsingNode.port,
|
|
2677
|
+
pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
|
|
2678
|
+
};
|
|
2679
|
+
}
|
|
2680
|
+
originURL = resolveURL(window.location.href);
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* Determine if a URL shares the same origin as the current location
|
|
2684
|
+
*
|
|
2685
|
+
* @param {String} requestURL The URL to test
|
|
2686
|
+
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
2687
|
+
*/
|
|
2688
|
+
return function isURLSameOrigin(requestURL) {
|
|
2689
|
+
var parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
2690
|
+
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
2691
|
+
};
|
|
2692
|
+
}() :
|
|
2693
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
2694
|
+
function nonStandardBrowserEnv() {
|
|
2695
|
+
return function isURLSameOrigin() {
|
|
2696
|
+
return true;
|
|
2697
|
+
};
|
|
2698
|
+
}();
|
|
2699
|
+
|
|
2258
2700
|
var cookies = platform.hasStandardBrowserEnv ?
|
|
2259
2701
|
// Standard browser envs support document.cookie
|
|
2260
2702
|
{
|
|
@@ -2326,173 +2768,182 @@
|
|
|
2326
2768
|
return requestedURL;
|
|
2327
2769
|
}
|
|
2328
2770
|
|
|
2329
|
-
var
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
function standardBrowserEnv() {
|
|
2333
|
-
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
2334
|
-
var urlParsingNode = document.createElement('a');
|
|
2335
|
-
var originURL;
|
|
2771
|
+
var headersToObject = function headersToObject(thing) {
|
|
2772
|
+
return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
|
|
2773
|
+
};
|
|
2336
2774
|
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2775
|
+
/**
|
|
2776
|
+
* Config-specific merge-function which creates a new config-object
|
|
2777
|
+
* by merging two configuration objects together.
|
|
2778
|
+
*
|
|
2779
|
+
* @param {Object} config1
|
|
2780
|
+
* @param {Object} config2
|
|
2781
|
+
*
|
|
2782
|
+
* @returns {Object} New object resulting from merging config2 to config1
|
|
2783
|
+
*/
|
|
2784
|
+
function mergeConfig(config1, config2) {
|
|
2785
|
+
// eslint-disable-next-line no-param-reassign
|
|
2786
|
+
config2 = config2 || {};
|
|
2787
|
+
var config = {};
|
|
2788
|
+
function getMergedValue(target, source, caseless) {
|
|
2789
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
2790
|
+
return utils$1.merge.call({
|
|
2791
|
+
caseless: caseless
|
|
2792
|
+
}, target, source);
|
|
2793
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
2794
|
+
return utils$1.merge({}, source);
|
|
2795
|
+
} else if (utils$1.isArray(source)) {
|
|
2796
|
+
return source.slice();
|
|
2349
2797
|
}
|
|
2350
|
-
|
|
2798
|
+
return source;
|
|
2799
|
+
}
|
|
2351
2800
|
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
hostname: urlParsingNode.hostname,
|
|
2360
|
-
port: urlParsingNode.port,
|
|
2361
|
-
pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
|
|
2362
|
-
};
|
|
2801
|
+
// eslint-disable-next-line consistent-return
|
|
2802
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
2803
|
+
if (!utils$1.isUndefined(b)) {
|
|
2804
|
+
return getMergedValue(a, b, caseless);
|
|
2805
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2806
|
+
return getMergedValue(undefined, a, caseless);
|
|
2807
|
+
}
|
|
2363
2808
|
}
|
|
2364
|
-
originURL = resolveURL(window.location.href);
|
|
2365
|
-
|
|
2366
|
-
/**
|
|
2367
|
-
* Determine if a URL shares the same origin as the current location
|
|
2368
|
-
*
|
|
2369
|
-
* @param {String} requestURL The URL to test
|
|
2370
|
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
2371
|
-
*/
|
|
2372
|
-
return function isURLSameOrigin(requestURL) {
|
|
2373
|
-
var parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
2374
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
2375
|
-
};
|
|
2376
|
-
}() :
|
|
2377
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
2378
|
-
function nonStandardBrowserEnv() {
|
|
2379
|
-
return function isURLSameOrigin() {
|
|
2380
|
-
return true;
|
|
2381
|
-
};
|
|
2382
|
-
}();
|
|
2383
2809
|
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
/**
|
|
2390
|
-
* Calculate data maxRate
|
|
2391
|
-
* @param {Number} [samplesCount= 10]
|
|
2392
|
-
* @param {Number} [min= 1000]
|
|
2393
|
-
* @returns {Function}
|
|
2394
|
-
*/
|
|
2395
|
-
function speedometer(samplesCount, min) {
|
|
2396
|
-
samplesCount = samplesCount || 10;
|
|
2397
|
-
var bytes = new Array(samplesCount);
|
|
2398
|
-
var timestamps = new Array(samplesCount);
|
|
2399
|
-
var head = 0;
|
|
2400
|
-
var tail = 0;
|
|
2401
|
-
var firstSampleTS;
|
|
2402
|
-
min = min !== undefined ? min : 1000;
|
|
2403
|
-
return function push(chunkLength) {
|
|
2404
|
-
var now = Date.now();
|
|
2405
|
-
var startedAt = timestamps[tail];
|
|
2406
|
-
if (!firstSampleTS) {
|
|
2407
|
-
firstSampleTS = now;
|
|
2810
|
+
// eslint-disable-next-line consistent-return
|
|
2811
|
+
function valueFromConfig2(a, b) {
|
|
2812
|
+
if (!utils$1.isUndefined(b)) {
|
|
2813
|
+
return getMergedValue(undefined, b);
|
|
2408
2814
|
}
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
// eslint-disable-next-line consistent-return
|
|
2818
|
+
function defaultToConfig2(a, b) {
|
|
2819
|
+
if (!utils$1.isUndefined(b)) {
|
|
2820
|
+
return getMergedValue(undefined, b);
|
|
2821
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2822
|
+
return getMergedValue(undefined, a);
|
|
2416
2823
|
}
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
// eslint-disable-next-line consistent-return
|
|
2827
|
+
function mergeDirectKeys(a, b, prop) {
|
|
2828
|
+
if (prop in config2) {
|
|
2829
|
+
return getMergedValue(a, b);
|
|
2830
|
+
} else if (prop in config1) {
|
|
2831
|
+
return getMergedValue(undefined, a);
|
|
2420
2832
|
}
|
|
2421
|
-
|
|
2422
|
-
|
|
2833
|
+
}
|
|
2834
|
+
var mergeMap = {
|
|
2835
|
+
url: valueFromConfig2,
|
|
2836
|
+
method: valueFromConfig2,
|
|
2837
|
+
data: valueFromConfig2,
|
|
2838
|
+
baseURL: defaultToConfig2,
|
|
2839
|
+
transformRequest: defaultToConfig2,
|
|
2840
|
+
transformResponse: defaultToConfig2,
|
|
2841
|
+
paramsSerializer: defaultToConfig2,
|
|
2842
|
+
timeout: defaultToConfig2,
|
|
2843
|
+
timeoutMessage: defaultToConfig2,
|
|
2844
|
+
withCredentials: defaultToConfig2,
|
|
2845
|
+
withXSRFToken: defaultToConfig2,
|
|
2846
|
+
adapter: defaultToConfig2,
|
|
2847
|
+
responseType: defaultToConfig2,
|
|
2848
|
+
xsrfCookieName: defaultToConfig2,
|
|
2849
|
+
xsrfHeaderName: defaultToConfig2,
|
|
2850
|
+
onUploadProgress: defaultToConfig2,
|
|
2851
|
+
onDownloadProgress: defaultToConfig2,
|
|
2852
|
+
decompress: defaultToConfig2,
|
|
2853
|
+
maxContentLength: defaultToConfig2,
|
|
2854
|
+
maxBodyLength: defaultToConfig2,
|
|
2855
|
+
beforeRedirect: defaultToConfig2,
|
|
2856
|
+
transport: defaultToConfig2,
|
|
2857
|
+
httpAgent: defaultToConfig2,
|
|
2858
|
+
httpsAgent: defaultToConfig2,
|
|
2859
|
+
cancelToken: defaultToConfig2,
|
|
2860
|
+
socketPath: defaultToConfig2,
|
|
2861
|
+
responseEncoding: defaultToConfig2,
|
|
2862
|
+
validateStatus: mergeDirectKeys,
|
|
2863
|
+
headers: function headers(a, b) {
|
|
2864
|
+
return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
|
|
2423
2865
|
}
|
|
2424
|
-
var passed = startedAt && now - startedAt;
|
|
2425
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
2426
2866
|
};
|
|
2867
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2868
|
+
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
2869
|
+
var configValue = merge(config1[prop], config2[prop], prop);
|
|
2870
|
+
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
2871
|
+
});
|
|
2872
|
+
return config;
|
|
2427
2873
|
}
|
|
2428
2874
|
|
|
2429
|
-
function
|
|
2430
|
-
var
|
|
2431
|
-
var
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2875
|
+
var resolveConfig = (function (config) {
|
|
2876
|
+
var newConfig = mergeConfig({}, config);
|
|
2877
|
+
var data = newConfig.data,
|
|
2878
|
+
withXSRFToken = newConfig.withXSRFToken,
|
|
2879
|
+
xsrfHeaderName = newConfig.xsrfHeaderName,
|
|
2880
|
+
xsrfCookieName = newConfig.xsrfCookieName,
|
|
2881
|
+
headers = newConfig.headers,
|
|
2882
|
+
auth = newConfig.auth;
|
|
2883
|
+
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
2884
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
|
2885
|
+
|
|
2886
|
+
// HTTP basic authentication
|
|
2887
|
+
if (auth) {
|
|
2888
|
+
headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
|
|
2889
|
+
}
|
|
2890
|
+
var contentType;
|
|
2891
|
+
if (utils$1.isFormData(data)) {
|
|
2892
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
2893
|
+
headers.setContentType(undefined); // Let the browser set it
|
|
2894
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
|
2895
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
2896
|
+
var _ref = contentType ? contentType.split(';').map(function (token) {
|
|
2897
|
+
return token.trim();
|
|
2898
|
+
}).filter(Boolean) : [],
|
|
2899
|
+
_ref2 = _toArray(_ref),
|
|
2900
|
+
type = _ref2[0],
|
|
2901
|
+
tokens = _ref2.slice(1);
|
|
2902
|
+
headers.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
// Add xsrf header
|
|
2907
|
+
// This is only done if running in a standard browser environment.
|
|
2908
|
+
// Specifically not if we're in a web worker, or react-native.
|
|
2909
|
+
|
|
2910
|
+
if (platform.hasStandardBrowserEnv) {
|
|
2911
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
2912
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
|
|
2913
|
+
// Add xsrf header
|
|
2914
|
+
var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
2915
|
+
if (xsrfValue) {
|
|
2916
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
return newConfig;
|
|
2921
|
+
});
|
|
2922
|
+
|
|
2452
2923
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
2453
2924
|
var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2454
2925
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2455
|
-
var
|
|
2456
|
-
var
|
|
2457
|
-
var
|
|
2458
|
-
|
|
2926
|
+
var _config = resolveConfig(config);
|
|
2927
|
+
var requestData = _config.data;
|
|
2928
|
+
var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
2929
|
+
var responseType = _config.responseType,
|
|
2930
|
+
onUploadProgress = _config.onUploadProgress,
|
|
2931
|
+
onDownloadProgress = _config.onDownloadProgress;
|
|
2459
2932
|
var onCanceled;
|
|
2933
|
+
var uploadThrottled, downloadThrottled;
|
|
2934
|
+
var flushUpload, flushDownload;
|
|
2460
2935
|
function done() {
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
if (config.signal) {
|
|
2465
|
-
config.signal.removeEventListener('abort', onCanceled);
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
var contentType;
|
|
2469
|
-
if (utils$1.isFormData(requestData)) {
|
|
2470
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
2471
|
-
requestHeaders.setContentType(false); // Let the browser set it
|
|
2472
|
-
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
2473
|
-
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
2474
|
-
var _ref = contentType ? contentType.split(';').map(function (token) {
|
|
2475
|
-
return token.trim();
|
|
2476
|
-
}).filter(Boolean) : [],
|
|
2477
|
-
_ref2 = _toArray(_ref),
|
|
2478
|
-
type = _ref2[0],
|
|
2479
|
-
tokens = _ref2.slice(1);
|
|
2480
|
-
requestHeaders.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
var request = new XMLHttpRequest();
|
|
2936
|
+
flushUpload && flushUpload(); // flush events
|
|
2937
|
+
flushDownload && flushDownload(); // flush events
|
|
2484
2938
|
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
var username = config.auth.username || '';
|
|
2488
|
-
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
2489
|
-
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
|
|
2939
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
2940
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
2490
2941
|
}
|
|
2491
|
-
var
|
|
2492
|
-
request.open(
|
|
2942
|
+
var request = new XMLHttpRequest();
|
|
2943
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
2493
2944
|
|
|
2494
2945
|
// Set the request timeout in MS
|
|
2495
|
-
request.timeout =
|
|
2946
|
+
request.timeout = _config.timeout;
|
|
2496
2947
|
function onloadend() {
|
|
2497
2948
|
if (!request) {
|
|
2498
2949
|
return;
|
|
@@ -2565,10 +3016,10 @@
|
|
|
2565
3016
|
|
|
2566
3017
|
// Handle timeout
|
|
2567
3018
|
request.ontimeout = function handleTimeout() {
|
|
2568
|
-
var timeoutErrorMessage =
|
|
2569
|
-
var transitional =
|
|
2570
|
-
if (
|
|
2571
|
-
timeoutErrorMessage =
|
|
3019
|
+
var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
3020
|
+
var transitional = _config.transitional || transitionalDefaults;
|
|
3021
|
+
if (_config.timeoutErrorMessage) {
|
|
3022
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
2572
3023
|
}
|
|
2573
3024
|
reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
|
|
2574
3025
|
|
|
@@ -2576,20 +3027,6 @@
|
|
|
2576
3027
|
request = null;
|
|
2577
3028
|
};
|
|
2578
3029
|
|
|
2579
|
-
// Add xsrf header
|
|
2580
|
-
// This is only done if running in a standard browser environment.
|
|
2581
|
-
// Specifically not if we're in a web worker, or react-native.
|
|
2582
|
-
if (platform.hasStandardBrowserEnv) {
|
|
2583
|
-
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
2584
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
|
|
2585
|
-
// Add xsrf header
|
|
2586
|
-
var xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
2587
|
-
if (xsrfValue) {
|
|
2588
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
3030
|
// Remove Content-Type if data is undefined
|
|
2594
3031
|
requestData === undefined && requestHeaders.setContentType(null);
|
|
2595
3032
|
|
|
@@ -2601,25 +3038,34 @@
|
|
|
2601
3038
|
}
|
|
2602
3039
|
|
|
2603
3040
|
// Add withCredentials to request if needed
|
|
2604
|
-
if (!utils$1.isUndefined(
|
|
2605
|
-
request.withCredentials = !!
|
|
3041
|
+
if (!utils$1.isUndefined(_config.withCredentials)) {
|
|
3042
|
+
request.withCredentials = !!_config.withCredentials;
|
|
2606
3043
|
}
|
|
2607
3044
|
|
|
2608
3045
|
// Add responseType to request if needed
|
|
2609
3046
|
if (responseType && responseType !== 'json') {
|
|
2610
|
-
request.responseType =
|
|
3047
|
+
request.responseType = _config.responseType;
|
|
2611
3048
|
}
|
|
2612
3049
|
|
|
2613
3050
|
// Handle progress if needed
|
|
2614
|
-
if (
|
|
2615
|
-
|
|
3051
|
+
if (onDownloadProgress) {
|
|
3052
|
+
var _progressEventReducer = progressEventReducer(onDownloadProgress, true);
|
|
3053
|
+
var _progressEventReducer2 = _slicedToArray(_progressEventReducer, 2);
|
|
3054
|
+
downloadThrottled = _progressEventReducer2[0];
|
|
3055
|
+
flushDownload = _progressEventReducer2[1];
|
|
3056
|
+
request.addEventListener('progress', downloadThrottled);
|
|
2616
3057
|
}
|
|
2617
3058
|
|
|
2618
3059
|
// Not all browsers support upload events
|
|
2619
|
-
if (
|
|
2620
|
-
|
|
3060
|
+
if (onUploadProgress && request.upload) {
|
|
3061
|
+
var _progressEventReducer3 = progressEventReducer(onUploadProgress);
|
|
3062
|
+
var _progressEventReducer4 = _slicedToArray(_progressEventReducer3, 2);
|
|
3063
|
+
uploadThrottled = _progressEventReducer4[0];
|
|
3064
|
+
flushUpload = _progressEventReducer4[1];
|
|
3065
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
3066
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
2621
3067
|
}
|
|
2622
|
-
if (
|
|
3068
|
+
if (_config.cancelToken || _config.signal) {
|
|
2623
3069
|
// Handle cancellation
|
|
2624
3070
|
// eslint-disable-next-line func-names
|
|
2625
3071
|
onCanceled = function onCanceled(cancel) {
|
|
@@ -2630,12 +3076,12 @@
|
|
|
2630
3076
|
request.abort();
|
|
2631
3077
|
request = null;
|
|
2632
3078
|
};
|
|
2633
|
-
|
|
2634
|
-
if (
|
|
2635
|
-
|
|
3079
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
3080
|
+
if (_config.signal) {
|
|
3081
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
2636
3082
|
}
|
|
2637
3083
|
}
|
|
2638
|
-
var protocol = parseProtocol(
|
|
3084
|
+
var protocol = parseProtocol(_config.url);
|
|
2639
3085
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
2640
3086
|
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
2641
3087
|
return;
|
|
@@ -2646,9 +3092,518 @@
|
|
|
2646
3092
|
});
|
|
2647
3093
|
};
|
|
2648
3094
|
|
|
3095
|
+
var composeSignals = function composeSignals(signals, timeout) {
|
|
3096
|
+
var _signals = signals = signals ? signals.filter(Boolean) : [],
|
|
3097
|
+
length = _signals.length;
|
|
3098
|
+
if (timeout || length) {
|
|
3099
|
+
var controller = new AbortController();
|
|
3100
|
+
var aborted;
|
|
3101
|
+
var onabort = function onabort(reason) {
|
|
3102
|
+
if (!aborted) {
|
|
3103
|
+
aborted = true;
|
|
3104
|
+
unsubscribe();
|
|
3105
|
+
var err = reason instanceof Error ? reason : this.reason;
|
|
3106
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
3107
|
+
}
|
|
3108
|
+
};
|
|
3109
|
+
var timer = timeout && setTimeout(function () {
|
|
3110
|
+
timer = null;
|
|
3111
|
+
onabort(new AxiosError("timeout ".concat(timeout, " of ms exceeded"), AxiosError.ETIMEDOUT));
|
|
3112
|
+
}, timeout);
|
|
3113
|
+
var unsubscribe = function unsubscribe() {
|
|
3114
|
+
if (signals) {
|
|
3115
|
+
timer && clearTimeout(timer);
|
|
3116
|
+
timer = null;
|
|
3117
|
+
signals.forEach(function (signal) {
|
|
3118
|
+
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
3119
|
+
});
|
|
3120
|
+
signals = null;
|
|
3121
|
+
}
|
|
3122
|
+
};
|
|
3123
|
+
signals.forEach(function (signal) {
|
|
3124
|
+
return signal.addEventListener('abort', onabort);
|
|
3125
|
+
});
|
|
3126
|
+
var signal = controller.signal;
|
|
3127
|
+
signal.unsubscribe = function () {
|
|
3128
|
+
return utils$1.asap(unsubscribe);
|
|
3129
|
+
};
|
|
3130
|
+
return signal;
|
|
3131
|
+
}
|
|
3132
|
+
};
|
|
3133
|
+
var composeSignals$1 = composeSignals;
|
|
3134
|
+
|
|
3135
|
+
var streamChunk = /*#__PURE__*/_regeneratorRuntime().mark(function streamChunk(chunk, chunkSize) {
|
|
3136
|
+
var len, pos, end;
|
|
3137
|
+
return _regeneratorRuntime().wrap(function streamChunk$(_context) {
|
|
3138
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3139
|
+
case 0:
|
|
3140
|
+
len = chunk.byteLength;
|
|
3141
|
+
if (!(!chunkSize || len < chunkSize)) {
|
|
3142
|
+
_context.next = 5;
|
|
3143
|
+
break;
|
|
3144
|
+
}
|
|
3145
|
+
_context.next = 4;
|
|
3146
|
+
return chunk;
|
|
3147
|
+
case 4:
|
|
3148
|
+
return _context.abrupt("return");
|
|
3149
|
+
case 5:
|
|
3150
|
+
pos = 0;
|
|
3151
|
+
case 6:
|
|
3152
|
+
if (!(pos < len)) {
|
|
3153
|
+
_context.next = 13;
|
|
3154
|
+
break;
|
|
3155
|
+
}
|
|
3156
|
+
end = pos + chunkSize;
|
|
3157
|
+
_context.next = 10;
|
|
3158
|
+
return chunk.slice(pos, end);
|
|
3159
|
+
case 10:
|
|
3160
|
+
pos = end;
|
|
3161
|
+
_context.next = 6;
|
|
3162
|
+
break;
|
|
3163
|
+
case 13:
|
|
3164
|
+
case "end":
|
|
3165
|
+
return _context.stop();
|
|
3166
|
+
}
|
|
3167
|
+
}, streamChunk);
|
|
3168
|
+
});
|
|
3169
|
+
var readBytes = /*#__PURE__*/function () {
|
|
3170
|
+
var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize) {
|
|
3171
|
+
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
|
|
3172
|
+
return _regeneratorRuntime().wrap(function _callee$(_context2) {
|
|
3173
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
3174
|
+
case 0:
|
|
3175
|
+
_iteratorAbruptCompletion = false;
|
|
3176
|
+
_didIteratorError = false;
|
|
3177
|
+
_context2.prev = 2;
|
|
3178
|
+
_iterator = _asyncIterator(readStream(iterable));
|
|
3179
|
+
case 4:
|
|
3180
|
+
_context2.next = 6;
|
|
3181
|
+
return _awaitAsyncGenerator(_iterator.next());
|
|
3182
|
+
case 6:
|
|
3183
|
+
if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
|
|
3184
|
+
_context2.next = 12;
|
|
3185
|
+
break;
|
|
3186
|
+
}
|
|
3187
|
+
chunk = _step.value;
|
|
3188
|
+
return _context2.delegateYield(_asyncGeneratorDelegate(_asyncIterator(streamChunk(chunk, chunkSize))), "t0", 9);
|
|
3189
|
+
case 9:
|
|
3190
|
+
_iteratorAbruptCompletion = false;
|
|
3191
|
+
_context2.next = 4;
|
|
3192
|
+
break;
|
|
3193
|
+
case 12:
|
|
3194
|
+
_context2.next = 18;
|
|
3195
|
+
break;
|
|
3196
|
+
case 14:
|
|
3197
|
+
_context2.prev = 14;
|
|
3198
|
+
_context2.t1 = _context2["catch"](2);
|
|
3199
|
+
_didIteratorError = true;
|
|
3200
|
+
_iteratorError = _context2.t1;
|
|
3201
|
+
case 18:
|
|
3202
|
+
_context2.prev = 18;
|
|
3203
|
+
_context2.prev = 19;
|
|
3204
|
+
if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
|
|
3205
|
+
_context2.next = 23;
|
|
3206
|
+
break;
|
|
3207
|
+
}
|
|
3208
|
+
_context2.next = 23;
|
|
3209
|
+
return _awaitAsyncGenerator(_iterator["return"]());
|
|
3210
|
+
case 23:
|
|
3211
|
+
_context2.prev = 23;
|
|
3212
|
+
if (!_didIteratorError) {
|
|
3213
|
+
_context2.next = 26;
|
|
3214
|
+
break;
|
|
3215
|
+
}
|
|
3216
|
+
throw _iteratorError;
|
|
3217
|
+
case 26:
|
|
3218
|
+
return _context2.finish(23);
|
|
3219
|
+
case 27:
|
|
3220
|
+
return _context2.finish(18);
|
|
3221
|
+
case 28:
|
|
3222
|
+
case "end":
|
|
3223
|
+
return _context2.stop();
|
|
3224
|
+
}
|
|
3225
|
+
}, _callee, null, [[2, 14, 18, 28], [19,, 23, 27]]);
|
|
3226
|
+
}));
|
|
3227
|
+
return function readBytes(_x, _x2) {
|
|
3228
|
+
return _ref.apply(this, arguments);
|
|
3229
|
+
};
|
|
3230
|
+
}();
|
|
3231
|
+
var readStream = /*#__PURE__*/function () {
|
|
3232
|
+
var _ref2 = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) {
|
|
3233
|
+
var reader, _yield$_awaitAsyncGen, done, value;
|
|
3234
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context3) {
|
|
3235
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
3236
|
+
case 0:
|
|
3237
|
+
if (!stream[Symbol.asyncIterator]) {
|
|
3238
|
+
_context3.next = 3;
|
|
3239
|
+
break;
|
|
3240
|
+
}
|
|
3241
|
+
return _context3.delegateYield(_asyncGeneratorDelegate(_asyncIterator(stream)), "t0", 2);
|
|
3242
|
+
case 2:
|
|
3243
|
+
return _context3.abrupt("return");
|
|
3244
|
+
case 3:
|
|
3245
|
+
reader = stream.getReader();
|
|
3246
|
+
_context3.prev = 4;
|
|
3247
|
+
case 5:
|
|
3248
|
+
_context3.next = 7;
|
|
3249
|
+
return _awaitAsyncGenerator(reader.read());
|
|
3250
|
+
case 7:
|
|
3251
|
+
_yield$_awaitAsyncGen = _context3.sent;
|
|
3252
|
+
done = _yield$_awaitAsyncGen.done;
|
|
3253
|
+
value = _yield$_awaitAsyncGen.value;
|
|
3254
|
+
if (!done) {
|
|
3255
|
+
_context3.next = 12;
|
|
3256
|
+
break;
|
|
3257
|
+
}
|
|
3258
|
+
return _context3.abrupt("break", 16);
|
|
3259
|
+
case 12:
|
|
3260
|
+
_context3.next = 14;
|
|
3261
|
+
return value;
|
|
3262
|
+
case 14:
|
|
3263
|
+
_context3.next = 5;
|
|
3264
|
+
break;
|
|
3265
|
+
case 16:
|
|
3266
|
+
_context3.prev = 16;
|
|
3267
|
+
_context3.next = 19;
|
|
3268
|
+
return _awaitAsyncGenerator(reader.cancel());
|
|
3269
|
+
case 19:
|
|
3270
|
+
return _context3.finish(16);
|
|
3271
|
+
case 20:
|
|
3272
|
+
case "end":
|
|
3273
|
+
return _context3.stop();
|
|
3274
|
+
}
|
|
3275
|
+
}, _callee2, null, [[4,, 16, 20]]);
|
|
3276
|
+
}));
|
|
3277
|
+
return function readStream(_x3) {
|
|
3278
|
+
return _ref2.apply(this, arguments);
|
|
3279
|
+
};
|
|
3280
|
+
}();
|
|
3281
|
+
var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) {
|
|
3282
|
+
var iterator = readBytes(stream, chunkSize);
|
|
3283
|
+
var bytes = 0;
|
|
3284
|
+
var done;
|
|
3285
|
+
var _onFinish = function _onFinish(e) {
|
|
3286
|
+
if (!done) {
|
|
3287
|
+
done = true;
|
|
3288
|
+
onFinish && onFinish(e);
|
|
3289
|
+
}
|
|
3290
|
+
};
|
|
3291
|
+
return new ReadableStream({
|
|
3292
|
+
pull: function pull(controller) {
|
|
3293
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
3294
|
+
var _yield$iterator$next, _done, value, len, loadedBytes;
|
|
3295
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context4) {
|
|
3296
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
3297
|
+
case 0:
|
|
3298
|
+
_context4.prev = 0;
|
|
3299
|
+
_context4.next = 3;
|
|
3300
|
+
return iterator.next();
|
|
3301
|
+
case 3:
|
|
3302
|
+
_yield$iterator$next = _context4.sent;
|
|
3303
|
+
_done = _yield$iterator$next.done;
|
|
3304
|
+
value = _yield$iterator$next.value;
|
|
3305
|
+
if (!_done) {
|
|
3306
|
+
_context4.next = 10;
|
|
3307
|
+
break;
|
|
3308
|
+
}
|
|
3309
|
+
_onFinish();
|
|
3310
|
+
controller.close();
|
|
3311
|
+
return _context4.abrupt("return");
|
|
3312
|
+
case 10:
|
|
3313
|
+
len = value.byteLength;
|
|
3314
|
+
if (onProgress) {
|
|
3315
|
+
loadedBytes = bytes += len;
|
|
3316
|
+
onProgress(loadedBytes);
|
|
3317
|
+
}
|
|
3318
|
+
controller.enqueue(new Uint8Array(value));
|
|
3319
|
+
_context4.next = 19;
|
|
3320
|
+
break;
|
|
3321
|
+
case 15:
|
|
3322
|
+
_context4.prev = 15;
|
|
3323
|
+
_context4.t0 = _context4["catch"](0);
|
|
3324
|
+
_onFinish(_context4.t0);
|
|
3325
|
+
throw _context4.t0;
|
|
3326
|
+
case 19:
|
|
3327
|
+
case "end":
|
|
3328
|
+
return _context4.stop();
|
|
3329
|
+
}
|
|
3330
|
+
}, _callee3, null, [[0, 15]]);
|
|
3331
|
+
}))();
|
|
3332
|
+
},
|
|
3333
|
+
cancel: function cancel(reason) {
|
|
3334
|
+
_onFinish(reason);
|
|
3335
|
+
return iterator["return"]();
|
|
3336
|
+
}
|
|
3337
|
+
}, {
|
|
3338
|
+
highWaterMark: 2
|
|
3339
|
+
});
|
|
3340
|
+
};
|
|
3341
|
+
|
|
3342
|
+
var isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
|
|
3343
|
+
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
|
|
3344
|
+
|
|
3345
|
+
// used only inside the fetch adapter
|
|
3346
|
+
var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
|
|
3347
|
+
return function (str) {
|
|
3348
|
+
return encoder.encode(str);
|
|
3349
|
+
};
|
|
3350
|
+
}(new TextEncoder()) : ( /*#__PURE__*/function () {
|
|
3351
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(str) {
|
|
3352
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3353
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3354
|
+
case 0:
|
|
3355
|
+
_context.t0 = Uint8Array;
|
|
3356
|
+
_context.next = 3;
|
|
3357
|
+
return new Response(str).arrayBuffer();
|
|
3358
|
+
case 3:
|
|
3359
|
+
_context.t1 = _context.sent;
|
|
3360
|
+
return _context.abrupt("return", new _context.t0(_context.t1));
|
|
3361
|
+
case 5:
|
|
3362
|
+
case "end":
|
|
3363
|
+
return _context.stop();
|
|
3364
|
+
}
|
|
3365
|
+
}, _callee);
|
|
3366
|
+
}));
|
|
3367
|
+
return function (_x) {
|
|
3368
|
+
return _ref.apply(this, arguments);
|
|
3369
|
+
};
|
|
3370
|
+
}()));
|
|
3371
|
+
var test = function test(fn) {
|
|
3372
|
+
try {
|
|
3373
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3374
|
+
args[_key - 1] = arguments[_key];
|
|
3375
|
+
}
|
|
3376
|
+
return !!fn.apply(void 0, args);
|
|
3377
|
+
} catch (e) {
|
|
3378
|
+
return false;
|
|
3379
|
+
}
|
|
3380
|
+
};
|
|
3381
|
+
var supportsRequestStream = isReadableStreamSupported && test(function () {
|
|
3382
|
+
var duplexAccessed = false;
|
|
3383
|
+
var hasContentType = new Request(platform.origin, {
|
|
3384
|
+
body: new ReadableStream(),
|
|
3385
|
+
method: 'POST',
|
|
3386
|
+
get duplex() {
|
|
3387
|
+
duplexAccessed = true;
|
|
3388
|
+
return 'half';
|
|
3389
|
+
}
|
|
3390
|
+
}).headers.has('Content-Type');
|
|
3391
|
+
return duplexAccessed && !hasContentType;
|
|
3392
|
+
});
|
|
3393
|
+
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
3394
|
+
var supportsResponseStream = isReadableStreamSupported && test(function () {
|
|
3395
|
+
return utils$1.isReadableStream(new Response('').body);
|
|
3396
|
+
});
|
|
3397
|
+
var resolvers = {
|
|
3398
|
+
stream: supportsResponseStream && function (res) {
|
|
3399
|
+
return res.body;
|
|
3400
|
+
}
|
|
3401
|
+
};
|
|
3402
|
+
isFetchSupported && function (res) {
|
|
3403
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
|
|
3404
|
+
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? function (res) {
|
|
3405
|
+
return res[type]();
|
|
3406
|
+
} : function (_, config) {
|
|
3407
|
+
throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
|
|
3408
|
+
});
|
|
3409
|
+
});
|
|
3410
|
+
}(new Response());
|
|
3411
|
+
var getBodyLength = /*#__PURE__*/function () {
|
|
3412
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
|
|
3413
|
+
var _request;
|
|
3414
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3415
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
3416
|
+
case 0:
|
|
3417
|
+
if (!(body == null)) {
|
|
3418
|
+
_context2.next = 2;
|
|
3419
|
+
break;
|
|
3420
|
+
}
|
|
3421
|
+
return _context2.abrupt("return", 0);
|
|
3422
|
+
case 2:
|
|
3423
|
+
if (!utils$1.isBlob(body)) {
|
|
3424
|
+
_context2.next = 4;
|
|
3425
|
+
break;
|
|
3426
|
+
}
|
|
3427
|
+
return _context2.abrupt("return", body.size);
|
|
3428
|
+
case 4:
|
|
3429
|
+
if (!utils$1.isSpecCompliantForm(body)) {
|
|
3430
|
+
_context2.next = 9;
|
|
3431
|
+
break;
|
|
3432
|
+
}
|
|
3433
|
+
_request = new Request(platform.origin, {
|
|
3434
|
+
method: 'POST',
|
|
3435
|
+
body: body
|
|
3436
|
+
});
|
|
3437
|
+
_context2.next = 8;
|
|
3438
|
+
return _request.arrayBuffer();
|
|
3439
|
+
case 8:
|
|
3440
|
+
return _context2.abrupt("return", _context2.sent.byteLength);
|
|
3441
|
+
case 9:
|
|
3442
|
+
if (!(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body))) {
|
|
3443
|
+
_context2.next = 11;
|
|
3444
|
+
break;
|
|
3445
|
+
}
|
|
3446
|
+
return _context2.abrupt("return", body.byteLength);
|
|
3447
|
+
case 11:
|
|
3448
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
3449
|
+
body = body + '';
|
|
3450
|
+
}
|
|
3451
|
+
if (!utils$1.isString(body)) {
|
|
3452
|
+
_context2.next = 16;
|
|
3453
|
+
break;
|
|
3454
|
+
}
|
|
3455
|
+
_context2.next = 15;
|
|
3456
|
+
return encodeText(body);
|
|
3457
|
+
case 15:
|
|
3458
|
+
return _context2.abrupt("return", _context2.sent.byteLength);
|
|
3459
|
+
case 16:
|
|
3460
|
+
case "end":
|
|
3461
|
+
return _context2.stop();
|
|
3462
|
+
}
|
|
3463
|
+
}, _callee2);
|
|
3464
|
+
}));
|
|
3465
|
+
return function getBodyLength(_x2) {
|
|
3466
|
+
return _ref2.apply(this, arguments);
|
|
3467
|
+
};
|
|
3468
|
+
}();
|
|
3469
|
+
var resolveBodyLength = /*#__PURE__*/function () {
|
|
3470
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(headers, body) {
|
|
3471
|
+
var length;
|
|
3472
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
3473
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
3474
|
+
case 0:
|
|
3475
|
+
length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
3476
|
+
return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
|
|
3477
|
+
case 2:
|
|
3478
|
+
case "end":
|
|
3479
|
+
return _context3.stop();
|
|
3480
|
+
}
|
|
3481
|
+
}, _callee3);
|
|
3482
|
+
}));
|
|
3483
|
+
return function resolveBodyLength(_x3, _x4) {
|
|
3484
|
+
return _ref3.apply(this, arguments);
|
|
3485
|
+
};
|
|
3486
|
+
}();
|
|
3487
|
+
var fetchAdapter = isFetchSupported && ( /*#__PURE__*/function () {
|
|
3488
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) {
|
|
3489
|
+
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, response, isStreamResponse, options, responseContentLength, _ref5, _ref6, _onProgress, _flush, responseData;
|
|
3490
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
3491
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
3492
|
+
case 0:
|
|
3493
|
+
_resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
|
|
3494
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
3495
|
+
composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
3496
|
+
unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
|
|
3497
|
+
composedSignal.unsubscribe();
|
|
3498
|
+
};
|
|
3499
|
+
_context4.prev = 4;
|
|
3500
|
+
_context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
|
|
3501
|
+
if (!_context4.t0) {
|
|
3502
|
+
_context4.next = 11;
|
|
3503
|
+
break;
|
|
3504
|
+
}
|
|
3505
|
+
_context4.next = 9;
|
|
3506
|
+
return resolveBodyLength(headers, data);
|
|
3507
|
+
case 9:
|
|
3508
|
+
_context4.t1 = requestContentLength = _context4.sent;
|
|
3509
|
+
_context4.t0 = _context4.t1 !== 0;
|
|
3510
|
+
case 11:
|
|
3511
|
+
if (!_context4.t0) {
|
|
3512
|
+
_context4.next = 15;
|
|
3513
|
+
break;
|
|
3514
|
+
}
|
|
3515
|
+
_request = new Request(url, {
|
|
3516
|
+
method: 'POST',
|
|
3517
|
+
body: data,
|
|
3518
|
+
duplex: "half"
|
|
3519
|
+
});
|
|
3520
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
3521
|
+
headers.setContentType(contentTypeHeader);
|
|
3522
|
+
}
|
|
3523
|
+
if (_request.body) {
|
|
3524
|
+
_progressEventDecorat = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))), _progressEventDecorat2 = _slicedToArray(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1];
|
|
3525
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
3526
|
+
}
|
|
3527
|
+
case 15:
|
|
3528
|
+
if (!utils$1.isString(withCredentials)) {
|
|
3529
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
// Cloudflare Workers throws when credentials are defined
|
|
3533
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
3534
|
+
isCredentialsSupported = "credentials" in Request.prototype;
|
|
3535
|
+
request = new Request(url, _objectSpread2(_objectSpread2({}, fetchOptions), {}, {
|
|
3536
|
+
signal: composedSignal,
|
|
3537
|
+
method: method.toUpperCase(),
|
|
3538
|
+
headers: headers.normalize().toJSON(),
|
|
3539
|
+
body: data,
|
|
3540
|
+
duplex: "half",
|
|
3541
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
3542
|
+
}));
|
|
3543
|
+
_context4.next = 20;
|
|
3544
|
+
return fetch(request);
|
|
3545
|
+
case 20:
|
|
3546
|
+
response = _context4.sent;
|
|
3547
|
+
isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
3548
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
3549
|
+
options = {};
|
|
3550
|
+
['status', 'statusText', 'headers'].forEach(function (prop) {
|
|
3551
|
+
options[prop] = response[prop];
|
|
3552
|
+
});
|
|
3553
|
+
responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
3554
|
+
_ref5 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref6 = _slicedToArray(_ref5, 2), _onProgress = _ref6[0], _flush = _ref6[1];
|
|
3555
|
+
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
|
|
3556
|
+
_flush && _flush();
|
|
3557
|
+
unsubscribe && unsubscribe();
|
|
3558
|
+
}), options);
|
|
3559
|
+
}
|
|
3560
|
+
responseType = responseType || 'text';
|
|
3561
|
+
_context4.next = 26;
|
|
3562
|
+
return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
3563
|
+
case 26:
|
|
3564
|
+
responseData = _context4.sent;
|
|
3565
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
3566
|
+
_context4.next = 30;
|
|
3567
|
+
return new Promise(function (resolve, reject) {
|
|
3568
|
+
settle(resolve, reject, {
|
|
3569
|
+
data: responseData,
|
|
3570
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
3571
|
+
status: response.status,
|
|
3572
|
+
statusText: response.statusText,
|
|
3573
|
+
config: config,
|
|
3574
|
+
request: request
|
|
3575
|
+
});
|
|
3576
|
+
});
|
|
3577
|
+
case 30:
|
|
3578
|
+
return _context4.abrupt("return", _context4.sent);
|
|
3579
|
+
case 33:
|
|
3580
|
+
_context4.prev = 33;
|
|
3581
|
+
_context4.t2 = _context4["catch"](4);
|
|
3582
|
+
unsubscribe && unsubscribe();
|
|
3583
|
+
if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
|
|
3584
|
+
_context4.next = 38;
|
|
3585
|
+
break;
|
|
3586
|
+
}
|
|
3587
|
+
throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
|
|
3588
|
+
cause: _context4.t2.cause || _context4.t2
|
|
3589
|
+
});
|
|
3590
|
+
case 38:
|
|
3591
|
+
throw AxiosError.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request);
|
|
3592
|
+
case 39:
|
|
3593
|
+
case "end":
|
|
3594
|
+
return _context4.stop();
|
|
3595
|
+
}
|
|
3596
|
+
}, _callee4, null, [[4, 33]]);
|
|
3597
|
+
}));
|
|
3598
|
+
return function (_x5) {
|
|
3599
|
+
return _ref4.apply(this, arguments);
|
|
3600
|
+
};
|
|
3601
|
+
}());
|
|
3602
|
+
|
|
2649
3603
|
var knownAdapters = {
|
|
2650
3604
|
http: httpAdapter,
|
|
2651
|
-
xhr: xhrAdapter
|
|
3605
|
+
xhr: xhrAdapter,
|
|
3606
|
+
fetch: fetchAdapter
|
|
2652
3607
|
};
|
|
2653
3608
|
utils$1.forEach(knownAdapters, function (fn, value) {
|
|
2654
3609
|
if (fn) {
|
|
@@ -2762,111 +3717,7 @@
|
|
|
2762
3717
|
});
|
|
2763
3718
|
}
|
|
2764
3719
|
|
|
2765
|
-
var
|
|
2766
|
-
return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
|
|
2767
|
-
};
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* Config-specific merge-function which creates a new config-object
|
|
2771
|
-
* by merging two configuration objects together.
|
|
2772
|
-
*
|
|
2773
|
-
* @param {Object} config1
|
|
2774
|
-
* @param {Object} config2
|
|
2775
|
-
*
|
|
2776
|
-
* @returns {Object} New object resulting from merging config2 to config1
|
|
2777
|
-
*/
|
|
2778
|
-
function mergeConfig(config1, config2) {
|
|
2779
|
-
// eslint-disable-next-line no-param-reassign
|
|
2780
|
-
config2 = config2 || {};
|
|
2781
|
-
var config = {};
|
|
2782
|
-
function getMergedValue(target, source, caseless) {
|
|
2783
|
-
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
2784
|
-
return utils$1.merge.call({
|
|
2785
|
-
caseless: caseless
|
|
2786
|
-
}, target, source);
|
|
2787
|
-
} else if (utils$1.isPlainObject(source)) {
|
|
2788
|
-
return utils$1.merge({}, source);
|
|
2789
|
-
} else if (utils$1.isArray(source)) {
|
|
2790
|
-
return source.slice();
|
|
2791
|
-
}
|
|
2792
|
-
return source;
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
|
-
// eslint-disable-next-line consistent-return
|
|
2796
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
2797
|
-
if (!utils$1.isUndefined(b)) {
|
|
2798
|
-
return getMergedValue(a, b, caseless);
|
|
2799
|
-
} else if (!utils$1.isUndefined(a)) {
|
|
2800
|
-
return getMergedValue(undefined, a, caseless);
|
|
2801
|
-
}
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
// eslint-disable-next-line consistent-return
|
|
2805
|
-
function valueFromConfig2(a, b) {
|
|
2806
|
-
if (!utils$1.isUndefined(b)) {
|
|
2807
|
-
return getMergedValue(undefined, b);
|
|
2808
|
-
}
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
// eslint-disable-next-line consistent-return
|
|
2812
|
-
function defaultToConfig2(a, b) {
|
|
2813
|
-
if (!utils$1.isUndefined(b)) {
|
|
2814
|
-
return getMergedValue(undefined, b);
|
|
2815
|
-
} else if (!utils$1.isUndefined(a)) {
|
|
2816
|
-
return getMergedValue(undefined, a);
|
|
2817
|
-
}
|
|
2818
|
-
}
|
|
2819
|
-
|
|
2820
|
-
// eslint-disable-next-line consistent-return
|
|
2821
|
-
function mergeDirectKeys(a, b, prop) {
|
|
2822
|
-
if (prop in config2) {
|
|
2823
|
-
return getMergedValue(a, b);
|
|
2824
|
-
} else if (prop in config1) {
|
|
2825
|
-
return getMergedValue(undefined, a);
|
|
2826
|
-
}
|
|
2827
|
-
}
|
|
2828
|
-
var mergeMap = {
|
|
2829
|
-
url: valueFromConfig2,
|
|
2830
|
-
method: valueFromConfig2,
|
|
2831
|
-
data: valueFromConfig2,
|
|
2832
|
-
baseURL: defaultToConfig2,
|
|
2833
|
-
transformRequest: defaultToConfig2,
|
|
2834
|
-
transformResponse: defaultToConfig2,
|
|
2835
|
-
paramsSerializer: defaultToConfig2,
|
|
2836
|
-
timeout: defaultToConfig2,
|
|
2837
|
-
timeoutMessage: defaultToConfig2,
|
|
2838
|
-
withCredentials: defaultToConfig2,
|
|
2839
|
-
withXSRFToken: defaultToConfig2,
|
|
2840
|
-
adapter: defaultToConfig2,
|
|
2841
|
-
responseType: defaultToConfig2,
|
|
2842
|
-
xsrfCookieName: defaultToConfig2,
|
|
2843
|
-
xsrfHeaderName: defaultToConfig2,
|
|
2844
|
-
onUploadProgress: defaultToConfig2,
|
|
2845
|
-
onDownloadProgress: defaultToConfig2,
|
|
2846
|
-
decompress: defaultToConfig2,
|
|
2847
|
-
maxContentLength: defaultToConfig2,
|
|
2848
|
-
maxBodyLength: defaultToConfig2,
|
|
2849
|
-
beforeRedirect: defaultToConfig2,
|
|
2850
|
-
transport: defaultToConfig2,
|
|
2851
|
-
httpAgent: defaultToConfig2,
|
|
2852
|
-
httpsAgent: defaultToConfig2,
|
|
2853
|
-
cancelToken: defaultToConfig2,
|
|
2854
|
-
socketPath: defaultToConfig2,
|
|
2855
|
-
responseEncoding: defaultToConfig2,
|
|
2856
|
-
validateStatus: mergeDirectKeys,
|
|
2857
|
-
headers: function headers(a, b) {
|
|
2858
|
-
return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
|
|
2859
|
-
}
|
|
2860
|
-
};
|
|
2861
|
-
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2862
|
-
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
2863
|
-
var configValue = merge(config1[prop], config2[prop], prop);
|
|
2864
|
-
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
2865
|
-
});
|
|
2866
|
-
return config;
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
|
-
var VERSION = "1.6.8";
|
|
3720
|
+
var VERSION = "1.7.7";
|
|
2870
3721
|
|
|
2871
3722
|
var validators$1 = {};
|
|
2872
3723
|
|
|
@@ -2991,11 +3842,15 @@
|
|
|
2991
3842
|
|
|
2992
3843
|
// slice off the Error: ... line
|
|
2993
3844
|
stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
2994
|
-
|
|
2995
|
-
_context.t0.stack
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
_context.t0.stack
|
|
3845
|
+
try {
|
|
3846
|
+
if (!_context.t0.stack) {
|
|
3847
|
+
_context.t0.stack = stack;
|
|
3848
|
+
// match without the 2 top stack lines
|
|
3849
|
+
} else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
|
3850
|
+
_context.t0.stack += '\n' + stack;
|
|
3851
|
+
}
|
|
3852
|
+
} catch (e) {
|
|
3853
|
+
// ignore the case where "stack" is an un-writable property
|
|
2999
3854
|
}
|
|
3000
3855
|
}
|
|
3001
3856
|
throw _context.t0;
|
|
@@ -3243,6 +4098,20 @@
|
|
|
3243
4098
|
this._listeners.splice(index, 1);
|
|
3244
4099
|
}
|
|
3245
4100
|
}
|
|
4101
|
+
}, {
|
|
4102
|
+
key: "toAbortSignal",
|
|
4103
|
+
value: function toAbortSignal() {
|
|
4104
|
+
var _this = this;
|
|
4105
|
+
var controller = new AbortController();
|
|
4106
|
+
var abort = function abort(err) {
|
|
4107
|
+
controller.abort(err);
|
|
4108
|
+
};
|
|
4109
|
+
this.subscribe(abort);
|
|
4110
|
+
controller.signal.unsubscribe = function () {
|
|
4111
|
+
return _this.unsubscribe(abort);
|
|
4112
|
+
};
|
|
4113
|
+
return controller.signal;
|
|
4114
|
+
}
|
|
3246
4115
|
|
|
3247
4116
|
/**
|
|
3248
4117
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|