@scalar/api-client 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/computer.ascii.js +34 -0
- package/dist/clientBus.js +5 -0
- package/dist/components/ApiClient/AddressBar.vue.d.ts +3 -3
- package/dist/components/ApiClient/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/AddressBar.vue.js +8 -0
- package/dist/components/ApiClient/AddressBar.vue2.js +158 -0
- package/dist/components/ApiClient/AddressBar.vue3.js +4 -0
- package/dist/components/ApiClient/AddressBar.vue4.js +4 -0
- package/dist/components/ApiClient/ApiClient.vue.d.ts +11 -11
- package/dist/components/ApiClient/ApiClient.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/ApiClient.vue.js +124 -0
- package/dist/components/ApiClient/ApiClient.vue2.js +4 -0
- package/dist/components/ApiClient/ApiClient.vue3.js +5 -0
- package/dist/components/ApiClient/Request/Request.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/Request.vue.js +79 -0
- package/dist/components/ApiClient/Request/Request.vue2.js +4 -0
- package/dist/components/ApiClient/Request/Request.vue3.js +5 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardForm.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardForm.vue.js +13 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardForm.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue2.js +18 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormButton.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormGroup.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormGroup.vue.js +13 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormGroup.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormRows.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormRows.vue.js +13 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormRows.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue.d.ts +8 -8
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue2.js +37 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/CardFormTextInput.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue2.js +86 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/RequestAuthentication.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue2.js +357 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecurityScheme.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue2.js +96 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeScopes.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue.js +7 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue2.js +64 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/SecuritySchemeSelector.vue3.js +4 -0
- package/dist/components/ApiClient/Request/RequestAuthentication/index.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestBody.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestBody.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestBody.vue.js +39 -0
- package/dist/components/ApiClient/Request/RequestBody.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestCookies.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestCookies.vue.js +74 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestCookies.vue3.js +5 -0
- package/dist/components/ApiClient/Request/RequestHeaders.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestHeaders.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestHeaders.vue.js +74 -0
- package/dist/components/ApiClient/Request/RequestHeaders.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestQuery.vue.js +75 -0
- package/dist/components/ApiClient/Request/RequestQuery.vue2.js +4 -0
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts +3 -3
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestVariables.vue.js +69 -0
- package/dist/components/ApiClient/Request/RequestVariables.vue2.js +4 -0
- package/dist/components/ApiClient/Request/index.d.ts +1 -1
- package/dist/components/ApiClient/RequestHistory.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/RequestHistory.vue.js +27 -0
- package/dist/components/ApiClient/RequestHistory.vue2.js +4 -0
- package/dist/components/ApiClient/RequestHistory.vue3.js +5 -0
- package/dist/components/ApiClient/RequestHistoryItem.vue.d.ts +3 -3
- package/dist/components/ApiClient/RequestHistoryItem.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/RequestHistoryItem.vue.js +7 -0
- package/dist/components/ApiClient/RequestHistoryItem.vue2.js +49 -0
- package/dist/components/ApiClient/RequestHistoryItem.vue3.js +4 -0
- package/dist/components/ApiClient/RequestMethodSelect.vue.d.ts +11 -11
- package/dist/components/ApiClient/RequestMethodSelect.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/RequestMethodSelect.vue.js +7 -0
- package/dist/components/ApiClient/RequestMethodSelect.vue2.js +42 -0
- package/dist/components/ApiClient/RequestMethodSelect.vue3.js +4 -0
- package/dist/components/ApiClient/Response/Response.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/Response.vue.js +65 -0
- package/dist/components/ApiClient/Response/Response.vue2.js +4 -0
- package/dist/components/ApiClient/Response/Response.vue3.js +5 -0
- package/dist/components/ApiClient/Response/ResponseBody.vue.d.ts +3 -3
- package/dist/components/ApiClient/Response/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/ResponseBody.vue.js +54 -0
- package/dist/components/ApiClient/Response/ResponseBody.vue2.js +4 -0
- package/dist/components/ApiClient/Response/ResponseHeaders.vue.d.ts +3 -3
- package/dist/components/ApiClient/Response/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/ResponseHeaders.vue.js +76 -0
- package/dist/components/ApiClient/Response/ResponseHeaders.vue2.js +4 -0
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue.d.ts +3 -3
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue.js +56 -0
- package/dist/components/ApiClient/Response/ResponseMetaInformation.vue2.js +4 -0
- package/dist/components/ApiClient/Response/index.d.ts +1 -1
- package/dist/components/ApiClient/index.d.ts +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/CollapsibleSection/CollapsibleSection.vue.d.ts +11 -11
- package/dist/components/CollapsibleSection/CollapsibleSection.vue.d.ts.map +1 -1
- package/dist/components/CollapsibleSection/CollapsibleSection.vue.js +76 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.vue2.js +4 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.vue3.js +5 -0
- package/dist/components/CollapsibleSection/index.d.ts +1 -1
- package/dist/components/Grid/Grid.vue.d.ts +3 -3
- package/dist/components/Grid/Grid.vue.d.ts.map +1 -1
- package/dist/components/Grid/Grid.vue.js +7 -0
- package/dist/components/Grid/Grid.vue2.js +77 -0
- package/dist/components/Grid/Grid.vue3.js +4 -0
- package/dist/components/Grid/GridHeader.vue.d.ts +3 -3
- package/dist/components/Grid/GridHeader.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridHeader.vue.js +7 -0
- package/dist/components/Grid/GridHeader.vue2.js +46 -0
- package/dist/components/Grid/GridHeader.vue3.js +4 -0
- package/dist/components/Grid/GridRow.vue.d.ts +8 -8
- package/dist/components/Grid/GridRow.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridRow.vue.js +7 -0
- package/dist/components/Grid/GridRow.vue2.js +29 -0
- package/dist/components/Grid/GridRow.vue3.js +4 -0
- package/dist/components/Grid/GridRowEditable.vue.d.ts +3 -3
- package/dist/components/Grid/GridRowEditable.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridRowEditable.vue.js +7 -0
- package/dist/components/Grid/GridRowEditable.vue2.js +105 -0
- package/dist/components/Grid/GridRowEditable.vue3.js +4 -0
- package/dist/components/Grid/GridRowGenerated.vue.d.ts +4 -4
- package/dist/components/Grid/GridRowGenerated.vue.d.ts.map +1 -1
- package/dist/components/Grid/GridRowGenerated.vue.js +7 -0
- package/dist/components/Grid/GridRowGenerated.vue2.js +37 -0
- package/dist/components/Grid/GridRowGenerated.vue3.js +4 -0
- package/dist/components/Grid/SimpleGrid.vue.d.ts +3 -3
- package/dist/components/Grid/SimpleGrid.vue.d.ts.map +1 -1
- package/dist/components/Grid/SimpleGrid.vue.js +7 -0
- package/dist/components/Grid/SimpleGrid.vue2.js +28 -0
- package/dist/components/Grid/SimpleGrid.vue3.js +4 -0
- package/dist/components/Grid/index.d.ts +2 -2
- package/dist/components/HelpfulLink.vue.d.ts +8 -8
- package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
- package/dist/components/HelpfulLink.vue.js +7 -0
- package/dist/components/HelpfulLink.vue2.js +19 -0
- package/dist/components/HelpfulLink.vue3.js +4 -0
- package/dist/components/HttpMethod.vue.d.ts +9 -8
- package/dist/components/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod.vue.js +27 -0
- package/dist/components/HttpMethod.vue2.js +4 -0
- package/dist/components/ScalarAsciiArt.vue.d.ts +3 -3
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.js +7 -0
- package/dist/components/ScalarAsciiArt.vue2.js +23 -0
- package/dist/components/ScalarAsciiArt.vue3.js +4 -0
- package/dist/components/SimpleTable/SimpleCell.vue.d.ts +13 -12
- package/dist/components/SimpleTable/SimpleCell.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleCell.vue.js +7 -0
- package/dist/components/SimpleTable/SimpleCell.vue2.js +28 -0
- package/dist/components/SimpleTable/SimpleCell.vue3.js +4 -0
- package/dist/components/SimpleTable/SimpleHeader.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleHeader.vue.js +7 -0
- package/dist/components/SimpleTable/SimpleHeader.vue2.js +19 -0
- package/dist/components/SimpleTable/SimpleHeader.vue3.js +4 -0
- package/dist/components/SimpleTable/SimpleRow.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleRow.vue.js +13 -0
- package/dist/components/SimpleTable/SimpleRow.vue2.js +4 -0
- package/dist/components/SimpleTable/SimpleTable.vue.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleTable.vue.js +15 -0
- package/dist/components/SimpleTable/SimpleTable.vue2.js +4 -0
- package/dist/components/SimpleTable/index.d.ts +4 -4
- package/dist/fixtures/httpHeaders.js +529 -0
- package/dist/fixtures/httpRequestMethods.js +41 -0
- package/dist/fixtures/index.d.ts +2 -2
- package/dist/helpers/concatenateUrlAndPath.js +9 -0
- package/dist/helpers/createPlaceholderRequest.js +14 -0
- package/dist/helpers/encodeStringAsBase64.js +6 -0
- package/dist/helpers/findVariables.js +7 -0
- package/dist/helpers/getRequestFromAuthentication.js +85 -0
- package/dist/helpers/getUrlFromServerState.js +12 -0
- package/dist/helpers/humanDiff.js +21 -0
- package/dist/helpers/index.d.ts +16 -16
- package/dist/helpers/mapFromArray.js +9 -0
- package/dist/helpers/normalizeHeaders.js +6 -0
- package/dist/helpers/normalizePath.js +9 -0
- package/dist/helpers/normalizeRequestMethod.d.ts +2 -1
- package/dist/helpers/normalizeRequestMethod.d.ts.map +1 -1
- package/dist/helpers/normalizeRequestMethod.js +14 -0
- package/dist/helpers/normalizeUrl.js +13 -0
- package/dist/helpers/prepareClientRequestConfig.d.ts +0 -7
- package/dist/helpers/prepareClientRequestConfig.d.ts.map +1 -1
- package/dist/helpers/prepareClientRequestConfig.js +41 -0
- package/dist/helpers/redirectToProxy.js +7 -0
- package/dist/helpers/replaceVariables.js +10 -0
- package/dist/helpers/sendRequest.js +111 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +83 -33496
- package/dist/stores/index.d.ts +5 -5
- package/dist/stores/useApiClientStore.js +32 -0
- package/dist/stores/useAuthenticationStore.d.ts +1 -1
- package/dist/stores/useAuthenticationStore.d.ts.map +1 -1
- package/dist/stores/useAuthenticationStore.js +36 -0
- package/dist/stores/useOpenApiStore.d.ts +1 -1
- package/dist/stores/useOpenApiStore.js +24 -0
- package/dist/stores/useRequestStore.js +29 -0
- package/dist/stores/useServerStore.js +18 -0
- package/dist/style.css +1 -2567
- package/package.json +19 -18
- package/dist/Add-yNxGpRcH-B1LyqGlJ.js +0 -21
- package/dist/ArrowLeft-D7tW1xQo-BY1SMb43.js +0 -20
- package/dist/ArrowRight-DmO-sdb2-DYqgcTpu.js +0 -20
- package/dist/Background-CU9VIbfN-DvxzmwCx.js +0 -17
- package/dist/Brackets-CI207-BL-BBaUg7lM.js +0 -21
- package/dist/Branch-CXwj8YuG-IxKqRWkx.js +0 -34
- package/dist/CallToAction-XLYRSI1h-DkdGfSAS.js +0 -20
- package/dist/Checkmark-DhbrPM0P-Bnd3e6-4.js +0 -21
- package/dist/ChevronDown-Co7EAKAv-DHNwXUbS.js +0 -21
- package/dist/ChevronLeft-DYt0idAu-DAzCtmws.js +0 -21
- package/dist/ChevronRight-ylxToVWl-CDFDuBE1.js +0 -21
- package/dist/ChevronUp-xAnukIfj-CuKFLVD3.js +0 -21
- package/dist/Clipboard-CU_KxGEv-DWrQtWVi.js +0 -16
- package/dist/Close-xHiYwS8Q-CWI8mlaM.js +0 -21
- package/dist/CodeFolder-Cv_igzJE-CoWfaY0Z.js +0 -27
- package/dist/Cookie-CEHvXpqB-D960ImBy.js +0 -37
- package/dist/DarkMode-BMR457PH-CVcoMGeO.js +0 -16
- package/dist/Delete-BCZmxrDD-BHoCf_u4.js +0 -21
- package/dist/Discord-BHYOFBB2-NYBGYy-_.js +0 -16
- package/dist/DocsPage-Dwx7ZMU9-D3s0nKun.js +0 -27
- package/dist/Duplicate-DRWEv4R_-5xIOj7QF.js +0 -17
- package/dist/Edit-Br04RNYb-BhCyac4t.js +0 -19
- package/dist/Ellipses-Bo_X36Hx-CsJmKvlE.js +0 -16
- package/dist/Error-C5LiISnw-BIMzByff.js +0 -16
- package/dist/ExternalLink-DK8L-EH7-ANJEzoHO.js +0 -21
- package/dist/FilterList-CS8Il7NE-CagRN2wd.js +0 -21
- package/dist/Folder-CTvnVSEo-B2z_4abD.js +0 -16
- package/dist/GitHub-NdE6Zs9k-BAGzgXH_.js +0 -16
- package/dist/Hide-BgcCtErz-CAC_2jsk.js +0 -27
- package/dist/History-D9nmhNIn-BU9mR55a.js +0 -27
- package/dist/JsonObject-hGdHUQ4M-Cm1hXgAn.js +0 -21
- package/dist/Key-CWXJqX28-DdNUhB11.js +0 -21
- package/dist/Leave-K1J3uwoG-WgTmlwgs.js +0 -21
- package/dist/LightDarkModeToggle-De3vO47x-D3WCuqcH.js +0 -16
- package/dist/LightMode-BeoMphBY-CDedz2JM.js +0 -16
- package/dist/Link-Bzuc__Nc-Bvtx0HZG.js +0 -21
- package/dist/Lock-xhiH1mKz-Rrlr3fGv.js +0 -21
- package/dist/Logo-DwEDtgj--pmO6SPQX.js +0 -19
- package/dist/LogoAPI-CohCfL3L-CzbaXJLs.js +0 -19
- package/dist/LogoClient-Bq5O2QL2-Bw2epmD5.js +0 -16
- package/dist/LogoMarket-DwlApcab-_INRDSLs.js +0 -16
- package/dist/LogoSwagger-CH60H5qW-DFEpFXIU.js +0 -16
- package/dist/Magic-Dsi9_bEc-BYN42_eH.js +0 -21
- package/dist/Menu-CFK5cOsm-CqE9Tsgr.js +0 -21
- package/dist/Page-DA7CO5gc-DfccxJJv.js +0 -17
- package/dist/PaperAirplane-BC-4mGEB-BrV5fX8s.js +0 -21
- package/dist/Payment-hzcXP1Xb-B2G1p4-i.js +0 -21
- package/dist/Play-Cd4-o7Ji-xTTrC7nd.js +0 -16
- package/dist/Refresh-BHRzzQ8P-DMGXg62S.js +0 -27
- package/dist/Response-DsTlT4S--CGVlb2Cj.js +0 -20
- package/dist/Search-DqtlswRG-D-hprEk0.js +0 -19
- package/dist/Show-CbiiMLUa-G7jnye-t.js +0 -27
- package/dist/SideBarClosed-K53-CtXh-DmurFyoL.js +0 -17
- package/dist/SideBarOpen-C7UgT82P-BG6NE13Z.js +0 -21
- package/dist/Sort-CaVMT7jM-CseseOA9.js +0 -16
- package/dist/Terminal-DJ7x2McL-BUB3Qs0m.js +0 -27
- package/dist/ThumbsDown-BMgnsASL-B2YFxB8i.js +0 -21
- package/dist/ThumbsUp-C1j6zY2j-DKqh3z1D.js +0 -21
- package/dist/Trash-BpA3zWPD-BAjuQdys.js +0 -21
- package/dist/Unlock-HVYHMLxl-D89vmw_N.js +0 -16
- package/dist/Upload-D_pwqBDY-Bg4YHBfw.js +0 -16
- package/dist/User-BLGkPc5I-XzPjc0Gv.js +0 -16
- package/dist/prism-autoloader-Dlh8Vzlw-BR-Zk31i.js +0 -370
- package/dist/programming-framework-angular-DD4Vjgbk-Bzc9D9am.js +0 -16
- package/dist/programming-framework-astro-CLfrRt19-CfPlyy6T.js +0 -16
- package/dist/programming-framework-laravel-kAy2wVLy-Cty_4oXq.js +0 -21
- package/dist/programming-framework-nextdotjs-BKdd_DY_-DUTv-t1Q.js +0 -16
- package/dist/programming-framework-react-PDgmtZuN-DdUogL85.js +0 -16
- package/dist/programming-framework-vuedotjs-Cim7D5tw-COH3lflr.js +0 -17
- package/dist/programming-language-c-hPGu2Zvg-QG1pSdJG.js +0 -16
- package/dist/programming-language-clojure-uqYXn7U6-UAUP9oZz.js +0 -16
- package/dist/programming-language-csharp-CGxYkVA6-DkAhKOzF.js +0 -16
- package/dist/programming-language-css3-Dpp4Cr6b-Bf5XF7-p.js +0 -16
- package/dist/programming-language-go-CuKo8iD9-Dkewryvm.js +0 -16
- package/dist/programming-language-html5-DlqJK4EL-Bl9dTA-D.js +0 -16
- package/dist/programming-language-http-f3NXC-Ae-BY_awyxD.js +0 -16
- package/dist/programming-language-java-BBodetdf-BHELDLTj.js +0 -18
- package/dist/programming-language-javascript-VxLvi1QG-DFjYF_MP.js +0 -16
- package/dist/programming-language-json-Dq_K-q5f-BlovheYp.js +0 -17
- package/dist/programming-language-kotlin-eTASnmL3-D8AoUcB1.js +0 -16
- package/dist/programming-language-node-oucaVOgY-CzP8mlvs.js +0 -17
- package/dist/programming-language-objc-CPgQxmNi-DjsFgTok.js +0 -17
- package/dist/programming-language-ocaml-Q1-Jv5Q5-D2vDLKwp.js +0 -16
- package/dist/programming-language-php-GY38f8r4-DQ_8EMFH.js +0 -16
- package/dist/programming-language-powershell-xLOxAYP_-DAvJS1A9.js +0 -20
- package/dist/programming-language-python-Ct-_kNjo-BCrlyfv0.js +0 -16
- package/dist/programming-language-r-Ch3T1qiC-I_IE4uwz.js +0 -20
- package/dist/programming-language-ruby-DhdM4d7g-Dd3La6Kn.js +0 -16
- package/dist/programming-language-scala-BVg0dToJ-Bz_n-CNw.js +0 -16
- package/dist/programming-language-shell-uj1zoCVW-Bg0d3E28.js +0 -16
- package/dist/programming-language-swift-Dn72xPjg-BUvu5_SV.js +0 -16
- package/dist/programming-language-typescript-CdF-HuRi-CaDO02MW.js +0 -16
- package/dist/programming-script-code-CUHv6qR8-CzD7HjI2.js +0 -21
- package/dist/programming-tool-git-C-BMJCAo-BFJIU2--.js +0 -16
- package/dist/programming-tool-tailwindcss-xjXi0E6g-ky2wbsII.js +0 -16
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const o = [
|
|
2
|
+
"GET",
|
|
3
|
+
"POST",
|
|
4
|
+
"PUT",
|
|
5
|
+
"HEAD",
|
|
6
|
+
"DELETE",
|
|
7
|
+
"PATCH",
|
|
8
|
+
"OPTIONS",
|
|
9
|
+
"CONNECT",
|
|
10
|
+
"TRACE"
|
|
11
|
+
];
|
|
12
|
+
function a(r) {
|
|
13
|
+
return o.includes(r);
|
|
14
|
+
}
|
|
15
|
+
const T = {
|
|
16
|
+
POST: "var(--scalar-color-green)",
|
|
17
|
+
DELETE: "var(--scalar-color-red)",
|
|
18
|
+
PATCH: "var(--scalar-color-yellow)",
|
|
19
|
+
GET: "var(--scalar-color-blue)",
|
|
20
|
+
PUT: "var(--scalar-color-orange)",
|
|
21
|
+
OPTIONS: "var(--scalar-color-purple)",
|
|
22
|
+
HEAD: "var(--scalar-color-2)",
|
|
23
|
+
CONNECT: "var(--scalar-color-2)",
|
|
24
|
+
TRACE: "var(--scalar-color-2)"
|
|
25
|
+
}, l = {
|
|
26
|
+
POST: "POST",
|
|
27
|
+
DELETE: "DEL",
|
|
28
|
+
PATCH: "PATCH",
|
|
29
|
+
GET: "GET",
|
|
30
|
+
PUT: "PUT",
|
|
31
|
+
OPTIONS: "OPTS",
|
|
32
|
+
HEAD: "HEAD",
|
|
33
|
+
CONNECT: "CONN",
|
|
34
|
+
TRACE: "TRACE"
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
a as isRequestMethod,
|
|
38
|
+
l as requestMethodAbbreviations,
|
|
39
|
+
T as requestMethodColors,
|
|
40
|
+
o as validRequestMethods
|
|
41
|
+
};
|
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './httpHeaders';
|
|
2
|
-
export * from './httpRequestMethods';
|
|
1
|
+
export * from './httpHeaders.js';
|
|
2
|
+
export * from './httpRequestMethods.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { encodeStringAsBase64 as k } from "./encodeStringAsBase64.js";
|
|
2
|
+
function i(e) {
|
|
3
|
+
return !(!e || Array.isArray(e) && !e.length || (e ?? []).some(
|
|
4
|
+
(r) => !Object.keys(r).length
|
|
5
|
+
));
|
|
6
|
+
}
|
|
7
|
+
function K(e, r) {
|
|
8
|
+
var o, c;
|
|
9
|
+
const n = [], p = [], l = [];
|
|
10
|
+
if (!e.customSecurity && (!e.preferredSecurityScheme || !i(r)))
|
|
11
|
+
return { headers: n, queryString: p, cookies: l };
|
|
12
|
+
const m = (r == null ? void 0 : r.some(
|
|
13
|
+
(t) => e.preferredSecurityScheme && Object.keys(t).includes(
|
|
14
|
+
e.preferredSecurityScheme
|
|
15
|
+
)
|
|
16
|
+
)) || e.customSecurity ? e.preferredSecurityScheme : Object.keys((r == null ? void 0 : r[0]) ?? {}).pop(), s = (o = e.securitySchemes) == null ? void 0 : o[m ?? ""];
|
|
17
|
+
if (s) {
|
|
18
|
+
if ("type" in s && s.type === "apiKey") {
|
|
19
|
+
if ("in" in s && s.in === "header") {
|
|
20
|
+
const t = (c = e.apiKey.token) != null && c.length ? e.apiKey.token : "YOUR_TOKEN";
|
|
21
|
+
n.push({
|
|
22
|
+
name: "name" in s ? s.name : "",
|
|
23
|
+
value: t
|
|
24
|
+
});
|
|
25
|
+
} else if ("in" in s && s.in === "cookie") {
|
|
26
|
+
const t = e.apiKey.token.length ? e.apiKey.token : "YOUR_TOKEN";
|
|
27
|
+
l.push({
|
|
28
|
+
name: s.name,
|
|
29
|
+
value: t
|
|
30
|
+
});
|
|
31
|
+
} else if ("in" in s && s.in === "query") {
|
|
32
|
+
const t = e.apiKey.token.length ? e.apiKey.token : "YOUR_TOKEN";
|
|
33
|
+
p.push({
|
|
34
|
+
name: s.name,
|
|
35
|
+
value: t
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
} else if ("type" in s && // @ts-ignore
|
|
39
|
+
(s.type === "http" || s.type === "basic")) {
|
|
40
|
+
if ("type" in s && // @ts-ignore
|
|
41
|
+
(s.type === "basic" || s.type === "http" && s.scheme === "basic")) {
|
|
42
|
+
const { username: t, password: y } = e.http.basic, h = f(t, y);
|
|
43
|
+
n.push({
|
|
44
|
+
name: "Authorization",
|
|
45
|
+
value: `Basic ${h}`.trim()
|
|
46
|
+
});
|
|
47
|
+
} else if ("type" in s && s.type === "http" && s.scheme === "bearer") {
|
|
48
|
+
const t = e.http.bearer.token.length ? e.http.bearer.token : "YOUR_SECRET_TOKEN";
|
|
49
|
+
n.push({
|
|
50
|
+
name: "Authorization",
|
|
51
|
+
value: `Bearer ${t}`
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
} else if ("type" in s && s.type.toLowerCase() === "oauth2") {
|
|
55
|
+
const t = e.oAuth2.accessToken || "YOUR_SECRET_TOKEN";
|
|
56
|
+
n.push({
|
|
57
|
+
name: "Authorization",
|
|
58
|
+
value: `Bearer ${t}`
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return { headers: n, queryString: p, cookies: l };
|
|
63
|
+
}
|
|
64
|
+
function f(e, r) {
|
|
65
|
+
return e != null && e.length || r != null && r.length ? k(`${e}:${r}`) : "";
|
|
66
|
+
}
|
|
67
|
+
function S(e) {
|
|
68
|
+
return [
|
|
69
|
+
e.apiKey.token,
|
|
70
|
+
e.http.bearer.token,
|
|
71
|
+
e.oAuth2.accessToken,
|
|
72
|
+
// The basic auth token is the base64 encoded username and password
|
|
73
|
+
f(
|
|
74
|
+
e.http.basic.username,
|
|
75
|
+
e.http.basic.password
|
|
76
|
+
),
|
|
77
|
+
// The plain text password shouldn’t appear anyway, but just in case
|
|
78
|
+
e.http.basic.password
|
|
79
|
+
].filter(Boolean);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
f as getBase64Token,
|
|
83
|
+
K as getRequestFromAuthentication,
|
|
84
|
+
S as getSecretCredentialsFromAuthentication
|
|
85
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { replaceVariables as c } from "./replaceVariables.js";
|
|
2
|
+
function p(l) {
|
|
3
|
+
var u;
|
|
4
|
+
const r = (u = l == null ? void 0 : l.servers) == null ? void 0 : u[l.selectedServer ?? 0], e = l.variables.reduce(
|
|
5
|
+
(n, o) => (n[o.name] = o.value, n),
|
|
6
|
+
{}
|
|
7
|
+
);
|
|
8
|
+
return typeof (r == null ? void 0 : r.url) == "string" ? c(r == null ? void 0 : r.url, e) : r == null ? void 0 : r.url;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
p as getUrlFromServerState
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function s(a) {
|
|
2
|
+
const o = Math.floor(((/* @__PURE__ */ new Date()).getTime() - a) / 1e3);
|
|
3
|
+
if (o < 45)
|
|
4
|
+
return "just now";
|
|
5
|
+
if (o < 60)
|
|
6
|
+
return `${o} seconds ago`;
|
|
7
|
+
const t = Math.floor(o / 60);
|
|
8
|
+
if (t < 60)
|
|
9
|
+
return `${t} minute${t === 1 ? "" : "s"} ago`;
|
|
10
|
+
const n = Math.floor(t / 60);
|
|
11
|
+
if (n < 24)
|
|
12
|
+
return `${n} hour${n === 1 ? "" : "s"} ago`;
|
|
13
|
+
const r = Math.floor(n / 24);
|
|
14
|
+
if (r < 30)
|
|
15
|
+
return `${r} day${r === 1 ? "" : "s"} ago`;
|
|
16
|
+
const e = Math.floor(r / 30);
|
|
17
|
+
return e < 12 ? `${e} month${e === 1 ? "" : "s"} ago` : "more than a year ago";
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
s as humanDiff
|
|
21
|
+
};
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from './concatenateUrlAndPath';
|
|
2
|
-
export * from './createPlaceholderRequest';
|
|
3
|
-
export * from './encodeStringAsBase64';
|
|
4
|
-
export * from './findVariables';
|
|
5
|
-
export * from './getRequestFromAuthentication';
|
|
6
|
-
export * from './getUrlFromServerState';
|
|
7
|
-
export * from './humanDiff';
|
|
8
|
-
export * from './mapFromArray';
|
|
9
|
-
export * from './normalizeHeaders';
|
|
10
|
-
export * from './normalizePath';
|
|
11
|
-
export * from './normalizeRequestMethod';
|
|
12
|
-
export * from './normalizeUrl';
|
|
13
|
-
export * from './prepareClientRequestConfig';
|
|
14
|
-
export * from './redirectToProxy';
|
|
15
|
-
export * from './replaceVariables';
|
|
16
|
-
export * from './sendRequest';
|
|
1
|
+
export * from './concatenateUrlAndPath.js';
|
|
2
|
+
export * from './createPlaceholderRequest.js';
|
|
3
|
+
export * from './encodeStringAsBase64.js';
|
|
4
|
+
export * from './findVariables.js';
|
|
5
|
+
export * from './getRequestFromAuthentication.js';
|
|
6
|
+
export * from './getUrlFromServerState.js';
|
|
7
|
+
export * from './humanDiff.js';
|
|
8
|
+
export * from './mapFromArray.js';
|
|
9
|
+
export * from './normalizeHeaders.js';
|
|
10
|
+
export * from './normalizePath.js';
|
|
11
|
+
export * from './normalizeRequestMethod.js';
|
|
12
|
+
export * from './normalizeUrl.js';
|
|
13
|
+
export * from './prepareClientRequestConfig.js';
|
|
14
|
+
export * from './redirectToProxy.js';
|
|
15
|
+
export * from './replaceVariables.js';
|
|
16
|
+
export * from './sendRequest.js';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { RequestMethod } from '@scalar/oas-utils/helpers';
|
|
1
2
|
/**
|
|
2
3
|
* Get a normalized request method (e.g. GET, POST, etc.)
|
|
3
4
|
*/
|
|
4
|
-
export declare const normalizeRequestMethod: (method?: string) =>
|
|
5
|
+
export declare const normalizeRequestMethod: (method?: string) => RequestMethod;
|
|
5
6
|
//# sourceMappingURL=normalizeRequestMethod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAM9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAsBxD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isRequestMethod as s } from "../fixtures/httpRequestMethods.js";
|
|
2
|
+
const e = "GET", r = (t) => {
|
|
3
|
+
if (typeof t != "string")
|
|
4
|
+
return console.warn(
|
|
5
|
+
`Request method is not a string. Using ${e} as the default.`
|
|
6
|
+
), e;
|
|
7
|
+
const o = t.trim().toUpperCase();
|
|
8
|
+
return s(o) ? o : (console.warn(
|
|
9
|
+
`${t} is not a valid request method. Using ${e} as the default.`
|
|
10
|
+
), e);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
r as normalizeRequestMethod
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const n = (e) => {
|
|
2
|
+
if (typeof e != "string")
|
|
3
|
+
return console.warn(
|
|
4
|
+
"[sendRequest] URL is not a string. Using an empty string as the default."
|
|
5
|
+
), "";
|
|
6
|
+
let t = e;
|
|
7
|
+
return t.startsWith("http") || (console.warn(
|
|
8
|
+
"[sendRequest] URL does not start with http. Adding http:// as the default prefix."
|
|
9
|
+
), t = `http://${t}`), t.trim();
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
n as normalizeUrl
|
|
13
|
+
};
|
|
@@ -11,13 +11,6 @@ export declare const prepareClientRequestConfig: (configuration: {
|
|
|
11
11
|
}) => {
|
|
12
12
|
id?: string | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Before a request is sent to the server, we’ll do some final preparation.
|
|
16
|
-
*
|
|
17
|
-
* - Add Content-Type header if request.body is JSON
|
|
18
|
-
* - Parse request.body if it’s JSON
|
|
19
|
-
* - Remove duplicate headers
|
|
20
|
-
*/
|
|
21
14
|
url: string;
|
|
22
15
|
type: string;
|
|
23
16
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareClientRequestConfig.d.ts","sourceRoot":"","sources":["../../src/helpers/prepareClientRequestConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAUnD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,kBAAmB;IACxD,OAAO,EAAE,mBAAmB,CAAA;CAC7B
|
|
1
|
+
{"version":3,"file":"prepareClientRequestConfig.d.ts","sourceRoot":"","sources":["../../src/helpers/prepareClientRequestConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAUnD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,kBAAmB;IACxD,OAAO,EAAE,mBAAmB,CAAA;CAC7B;;;;;;;;;;;;CAuDA,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { isJsonString as p } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { getRequestFromAuthentication as m } from "./getRequestFromAuthentication.js";
|
|
3
|
+
import { useAuthenticationStore as d } from "../stores/useAuthenticationStore.js";
|
|
4
|
+
import { useOpenApiStore as h } from "../stores/useOpenApiStore.js";
|
|
5
|
+
function t(o) {
|
|
6
|
+
return (o ?? []).map((e) => ({ ...e, enabled: !0 }));
|
|
7
|
+
}
|
|
8
|
+
const C = (o) => {
|
|
9
|
+
var s, i;
|
|
10
|
+
const { request: e } = o, { authentication: a } = d(), {
|
|
11
|
+
openApi: { operation: n, globalSecurity: u }
|
|
12
|
+
} = h(), r = m(
|
|
13
|
+
a,
|
|
14
|
+
((s = n == null ? void 0 : n.information) == null ? void 0 : s.security) ?? u
|
|
15
|
+
);
|
|
16
|
+
return e.headers = [
|
|
17
|
+
...e.headers ?? [],
|
|
18
|
+
...t(r.headers)
|
|
19
|
+
], e.cookies = [
|
|
20
|
+
...e.cookies ?? [],
|
|
21
|
+
...t(r.cookies)
|
|
22
|
+
], e.query = [
|
|
23
|
+
...e.query ?? [],
|
|
24
|
+
...t(r.queryString)
|
|
25
|
+
], e.body && p(e.body) && ((i = e.headers) != null && i.some(
|
|
26
|
+
(c) => c.name.toLowerCase() === "content-type"
|
|
27
|
+
) || (e.headers = [
|
|
28
|
+
...e.headers ?? [],
|
|
29
|
+
...t([
|
|
30
|
+
{
|
|
31
|
+
name: "Content-Type",
|
|
32
|
+
value: "application/json; charset=utf-8"
|
|
33
|
+
}
|
|
34
|
+
])
|
|
35
|
+
]), e.body = JSON.parse(e.body)), {
|
|
36
|
+
...e
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
C as prepareClientRequestConfig
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function l(s, e) {
|
|
2
|
+
const c = /{{\s*([\w.-]+)\s*}}/g, o = /{\s*([\w.-]+)\s*}/g, t = (u, n) => {
|
|
3
|
+
var r;
|
|
4
|
+
return typeof e == "function" ? e(n) : (r = e[n]) == null ? void 0 : r.toString();
|
|
5
|
+
};
|
|
6
|
+
return s.replace(c, t).replace(o, t);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
l as replaceVariables
|
|
10
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import C from "axios";
|
|
2
|
+
import { nanoid as L } from "nanoid";
|
|
3
|
+
import { redirectToProxy as S } from "./redirectToProxy.js";
|
|
4
|
+
import { normalizeRequestMethod as v } from "./normalizeRequestMethod.js";
|
|
5
|
+
import { mapFromArray as r } from "./mapFromArray.js";
|
|
6
|
+
import { normalizeUrl as R } from "./normalizeUrl.js";
|
|
7
|
+
import { normalizePath as x } from "./normalizePath.js";
|
|
8
|
+
import { concatenateUrlAndPath as O } from "./concatenateUrlAndPath.js";
|
|
9
|
+
import { replaceVariables as T } from "./replaceVariables.js";
|
|
10
|
+
function z(a) {
|
|
11
|
+
const { hostname: n } = new URL(a);
|
|
12
|
+
return ["localhost", "127.0.0.1", "[::1]"].includes(n);
|
|
13
|
+
}
|
|
14
|
+
async function W(a, n) {
|
|
15
|
+
var p;
|
|
16
|
+
const i = v(a.type), c = r(
|
|
17
|
+
(a.headers ?? []).filter((t) => t.enabled),
|
|
18
|
+
"name",
|
|
19
|
+
"value"
|
|
20
|
+
), l = R(a.url), m = x(a.path), [y, ...b] = O(
|
|
21
|
+
l,
|
|
22
|
+
m
|
|
23
|
+
).split("?"), k = T(
|
|
24
|
+
y,
|
|
25
|
+
r(
|
|
26
|
+
(a.variables ?? []).filter((t) => t.enabled),
|
|
27
|
+
"name",
|
|
28
|
+
"value"
|
|
29
|
+
)
|
|
30
|
+
), d = [];
|
|
31
|
+
b.forEach((t) => {
|
|
32
|
+
new URLSearchParams(t ?? "").forEach((o, s) => {
|
|
33
|
+
d.push({
|
|
34
|
+
name: s,
|
|
35
|
+
value: o,
|
|
36
|
+
enabled: !0
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const h = new URLSearchParams(
|
|
41
|
+
// TODO: No type-casting
|
|
42
|
+
r(
|
|
43
|
+
[
|
|
44
|
+
...(a.query ?? []).filter((t) => t.enabled),
|
|
45
|
+
...d
|
|
46
|
+
],
|
|
47
|
+
"name",
|
|
48
|
+
"value"
|
|
49
|
+
)
|
|
50
|
+
).toString(), U = `${k}${h ? "?" + h : ""}`, $ = {
|
|
51
|
+
type: "none"
|
|
52
|
+
}, w = Date.now();
|
|
53
|
+
if (a.cookies && ((p = a.cookies) == null ? void 0 : p.length) > 0) {
|
|
54
|
+
const t = r(
|
|
55
|
+
(a.cookies ?? []).filter((o) => o.enabled),
|
|
56
|
+
"name",
|
|
57
|
+
"value"
|
|
58
|
+
);
|
|
59
|
+
c.Cookie = Object.keys(t).map((o) => `${o}=${t[o]}`).join("; ");
|
|
60
|
+
}
|
|
61
|
+
const e = {
|
|
62
|
+
method: i,
|
|
63
|
+
url: U,
|
|
64
|
+
auth: $,
|
|
65
|
+
headers: c,
|
|
66
|
+
data: a.body
|
|
67
|
+
}, u = n && !z(e.url), f = {
|
|
68
|
+
method: e.method,
|
|
69
|
+
url: u ? S(n, e.url) : e.url,
|
|
70
|
+
headers: e.headers,
|
|
71
|
+
data: e.data
|
|
72
|
+
};
|
|
73
|
+
c.cookies && (f.withCredentials = !0), console.info(
|
|
74
|
+
u ? `${e.method} ${e.url} (proxy: ${n})` : `${e.method} ${e.url}`
|
|
75
|
+
);
|
|
76
|
+
const P = await C(f).then((t) => ({
|
|
77
|
+
...t,
|
|
78
|
+
statusCode: t.status,
|
|
79
|
+
data: t.data,
|
|
80
|
+
error: !1
|
|
81
|
+
})).catch((t) => {
|
|
82
|
+
var s, g;
|
|
83
|
+
const { response: o } = t;
|
|
84
|
+
return console.error("ERROR", t), {
|
|
85
|
+
data: t.code ?? t.message,
|
|
86
|
+
...o,
|
|
87
|
+
statusCode: (o == null ? void 0 : o.status) ?? 0,
|
|
88
|
+
error: {
|
|
89
|
+
message: ((s = o == null ? void 0 : o.data) == null ? void 0 : s.message) ?? t.message,
|
|
90
|
+
stack: ((g = o == null ? void 0 : o.data) == null ? void 0 : g.stack) ?? t.stack
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
sentTime: Date.now(),
|
|
96
|
+
request: {
|
|
97
|
+
...a,
|
|
98
|
+
type: i,
|
|
99
|
+
url: l,
|
|
100
|
+
path: m
|
|
101
|
+
},
|
|
102
|
+
response: {
|
|
103
|
+
...P,
|
|
104
|
+
duration: Date.now() - w
|
|
105
|
+
},
|
|
106
|
+
responseId: L()
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
W as sendRequest
|
|
111
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ApiClient } from './components/ApiClient';
|
|
2
2
|
export * from './components/ApiClient/Request/RequestAuthentication';
|
|
3
|
-
export { default as HttpMethod } from './components/HttpMethod.vue';
|
|
3
|
+
export { default as HttpMethod } from './components/HttpMethod.vue.js';
|
|
4
4
|
export * from './helpers';
|
|
5
5
|
export * from './stores';
|
|
6
6
|
export * from './types';
|