@scalar/api-client 2.5.18 → 2.5.20
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 +60 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +2 -2
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue3.js +4 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue3.js +4 -0
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -5
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue3.js +4 -0
- package/dist/components/CodeInput/CodeInput.vue4.js +4 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.d.ts +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +3 -3
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +22 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue3.js +4 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +1 -1
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +40 -40
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue3.js +4 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EmptyState.vue3.js +4 -0
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/LabelInput.vue.d.ts +2 -2
- package/dist/components/Form/LabelInput.vue.js +1 -1
- package/dist/components/Form/LabelInput.vue3.js +4 -0
- package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue3.js +4 -0
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +1 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +2 -2
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +3 -3
- package/dist/components/OpenApiClientButton.vue2.js +11 -8
- package/dist/components/OpenApiClientButton.vue3.js +4 -0
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue3.js +4 -0
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/SectionFilter.vue.d.ts +1 -1
- package/dist/components/SectionFilter.vue.d.ts.map +1 -1
- package/dist/components/SectionFilter.vue.js +3 -3
- package/dist/components/SectionFilter.vue2.js +8 -8
- package/dist/components/SectionFilter.vue3.js +4 -0
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue3.js +4 -0
- package/dist/components/Server/ServerSelector.vue.d.ts +1 -1
- package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerSelector.vue.js +28 -27
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +5 -2
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js +18 -18
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +1 -1
- package/dist/components/Server/index.d.ts +3 -3
- package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue3.js +4 -0
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +4 -0
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue3.js +4 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +4 -4
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue3.js +4 -0
- package/dist/components/Sidebar/SidebarListElement.vue4.js +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -2
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts +5 -5
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue3.js +4 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +14 -14
- package/dist/components/ViewLayout/index.d.ts +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/hooks/index.d.ts +5 -5
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.d.ts +2 -2
- package/dist/layouts/App/ApiClientApp.vue2.js +4 -0
- package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +131 -101
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +1 -1
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue3.js +4 -0
- package/dist/layouts/Modal/create-api-client-modal.d.ts +263 -203
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Web/ApiClientWeb.vue2.js +4 -0
- package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +131 -101
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +1 -1
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/layouts/Web/index.js +1 -1
- package/dist/libs/create-client.d.ts +131 -101
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/find-request.d.ts +2 -2
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/index.d.ts +16 -16
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/libs/send-request/create-request-operation.test.d.ts +9 -9
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/index.d.ts +3 -3
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +2 -2
- package/dist/router.d.ts +1 -1
- package/dist/routes.d.ts +38 -38
- package/dist/store/active-entities.d.ts +9 -9
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/events.d.ts +8 -8
- package/dist/store/import-spec.d.ts +1 -1
- package/dist/store/index.d.ts +2 -2
- package/dist/store/request-example.d.ts +70 -70
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +23 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +32 -2
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +129 -99
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.js +4 -0
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue3.js +4 -0
- package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue3.js +4 -0
- package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue3.js +4 -0
- package/dist/views/Collection/CollectionSettings.vue.js +1 -1
- package/dist/views/Collection/CollectionSettings.vue3.js +4 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue3.js +4 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +2 -2
- package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue3.js +4 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
- package/dist/views/Cookies/CookieModal.vue.d.ts +3 -3
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/CookieModal.vue3.js +4 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -2
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Request/Request.vue.d.ts +3 -3
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +3 -3
- package/dist/views/Request/Request.vue2.js +22 -22
- package/dist/views/Request/Request.vue3.js +4 -0
- package/dist/views/Request/RequestRoot.vue.d.ts +2 -2
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +57 -59
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +35 -33
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +239 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +2 -244
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -9
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue3.js +4 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +4 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +10 -10
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts +3 -3
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue3.js +4 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +14 -14
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue3.js +4 -0
- package/dist/views/Request/RequestSidebarItem.vue4.js +4 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +5 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue3.js +4 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +4 -0
- package/dist/views/Request/ResponseSection/index.d.ts +2 -2
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/consts/index.d.ts +3 -3
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +51 -51
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/vitest.setup.d.ts +21 -7
- package/dist/vitest.setup.d.ts.map +1 -1
- package/package.json +21 -21
|
@@ -2,98 +2,98 @@ import { shouldUseProxy as S } from "@scalar/oas-utils/helpers";
|
|
|
2
2
|
const k = () => {
|
|
3
3
|
const e = new Uint8Array(32);
|
|
4
4
|
return crypto.getRandomValues(e), btoa(String.fromCharCode(...e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
5
|
-
},
|
|
6
|
-
if (
|
|
5
|
+
}, C = async (e, l) => {
|
|
6
|
+
if (l === "plain")
|
|
7
7
|
return e;
|
|
8
|
-
const
|
|
9
|
-
return btoa(String.fromCharCode(...new Uint8Array(
|
|
10
|
-
},
|
|
8
|
+
const n = new TextEncoder().encode(e), i = await crypto.subtle.digest("SHA-256", n);
|
|
9
|
+
return btoa(String.fromCharCode(...new Uint8Array(i))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
10
|
+
}, b = async (e, l, u) => {
|
|
11
11
|
try {
|
|
12
12
|
if (!e)
|
|
13
13
|
return [new Error("Flow not found"), null];
|
|
14
|
-
const
|
|
14
|
+
const n = e.selectedScopes.join(" ");
|
|
15
15
|
if (e.type === "clientCredentials" || e.type === "password")
|
|
16
|
-
return
|
|
16
|
+
return P(e, n, {
|
|
17
17
|
proxyUrl: u
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
let
|
|
19
|
+
const i = (Math.random() + 1).toString(36).substring(2, 10), t = new URL(e.authorizationUrl);
|
|
20
|
+
let m = null;
|
|
21
21
|
if (e.type === "implicit")
|
|
22
22
|
t.searchParams.set("response_type", "token");
|
|
23
23
|
else if (e.type === "authorizationCode" && (t.searchParams.set("response_type", "code"), e["x-usePkce"] !== "no")) {
|
|
24
|
-
const r = k(),
|
|
25
|
-
|
|
24
|
+
const r = k(), s = await C(r, e["x-usePkce"]);
|
|
25
|
+
m = {
|
|
26
26
|
codeVerifier: r,
|
|
27
|
-
codeChallenge:
|
|
27
|
+
codeChallenge: s,
|
|
28
28
|
codeChallengeMethod: e["x-usePkce"] === "SHA-256" ? "S256" : "plain"
|
|
29
|
-
}, t.searchParams.set("code_challenge",
|
|
29
|
+
}, t.searchParams.set("code_challenge", s), t.searchParams.set("code_challenge_method", m.codeChallengeMethod);
|
|
30
30
|
}
|
|
31
31
|
if (e["x-scalar-redirect-uri"].startsWith("/")) {
|
|
32
|
-
const r =
|
|
33
|
-
t.searchParams.set("redirect_uri",
|
|
32
|
+
const r = l.url || window.location.origin + window.location.pathname, s = new URL(e["x-scalar-redirect-uri"], r).toString();
|
|
33
|
+
t.searchParams.set("redirect_uri", s);
|
|
34
34
|
} else
|
|
35
35
|
t.searchParams.set("redirect_uri", e["x-scalar-redirect-uri"]);
|
|
36
36
|
e["x-scalar-security-query"] && Object.keys(e["x-scalar-security-query"]).forEach((r) => {
|
|
37
|
-
var
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}), t.searchParams.set("client_id", e["x-scalar-client-id"]), t.searchParams.set("state",
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
const
|
|
37
|
+
var c;
|
|
38
|
+
const s = (c = e["x-scalar-security-query"]) == null ? void 0 : c[r];
|
|
39
|
+
s && t.searchParams.set(r, s);
|
|
40
|
+
}), t.searchParams.set("client_id", e["x-scalar-client-id"]), t.searchParams.set("state", i), n && t.searchParams.set("scope", n);
|
|
41
|
+
const a = window.open(t, "openAuth2Window", "left=100,top=100,width=800,height=600");
|
|
42
|
+
return a ? new Promise((r) => {
|
|
43
|
+
const s = setInterval(() => {
|
|
44
44
|
var _;
|
|
45
|
-
let
|
|
45
|
+
let c = null, d = null, h = null, g = null;
|
|
46
46
|
try {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const y = new URLSearchParams(
|
|
50
|
-
|
|
47
|
+
const o = new URL(a.location.href).searchParams, x = e["x-tokenName"] || "access_token";
|
|
48
|
+
c = o.get(x), d = o.get("code"), h = o.get("error"), g = o.get("error_description");
|
|
49
|
+
const y = new URLSearchParams(a.location.href.split("#")[1]);
|
|
50
|
+
c || (c = y.get(x)), d || (d = y.get("code")), h || (h = y.get("error")), g || (g = y.get("error_description"));
|
|
51
51
|
} catch {
|
|
52
52
|
}
|
|
53
|
-
if (
|
|
54
|
-
if (clearInterval(
|
|
55
|
-
r([new Error(`OAuth error: ${
|
|
56
|
-
else if (
|
|
57
|
-
const
|
|
58
|
-
r(
|
|
59
|
-
} else
|
|
60
|
-
code:
|
|
61
|
-
pkce:
|
|
53
|
+
if (a.closed || c || d || h)
|
|
54
|
+
if (clearInterval(s), a.close(), h)
|
|
55
|
+
r([new Error(`OAuth error: ${h}${g ? ` (${g})` : ""}`), null]);
|
|
56
|
+
else if (c) {
|
|
57
|
+
const o = (_ = a.location.href.match(/state=([^&]*)/)) == null ? void 0 : _[1];
|
|
58
|
+
r(o === i ? [null, c] : [new Error("State mismatch"), null]);
|
|
59
|
+
} else d ? new URL(a.location.href).searchParams.get("state") === i ? P(e, n, {
|
|
60
|
+
code: d,
|
|
61
|
+
pkce: m,
|
|
62
62
|
proxyUrl: u
|
|
63
|
-
}).then(r) : r([new Error("State mismatch"), null]) : (clearInterval(
|
|
63
|
+
}).then(r) : r([new Error("State mismatch"), null]) : (clearInterval(s), r([new Error("Window was closed without granting authorization"), null]));
|
|
64
64
|
}, 200);
|
|
65
65
|
}) : [new Error("Failed to open auth window"), null];
|
|
66
66
|
} catch {
|
|
67
67
|
return [new Error("Failed to authorize oauth2 flow"), null];
|
|
68
68
|
}
|
|
69
|
-
},
|
|
69
|
+
}, P = async (e, l, {
|
|
70
70
|
code: u,
|
|
71
|
-
pkce:
|
|
72
|
-
proxyUrl:
|
|
71
|
+
pkce: n,
|
|
72
|
+
proxyUrl: i
|
|
73
73
|
} = {}) => {
|
|
74
74
|
if (!e)
|
|
75
75
|
return [new Error("OAuth2 flow was not defined"), null];
|
|
76
76
|
const t = new URLSearchParams();
|
|
77
|
-
t.set("client_id", e["x-scalar-client-id"]),
|
|
78
|
-
|
|
77
|
+
t.set("client_id", e["x-scalar-client-id"]), l && (e.type === "clientCredentials" || e.type === "password") && t.set("scope", l), e.clientSecret && (!e["x-scalar-credentials-location"] || e["x-scalar-credentials-location"] === "body") && t.set("client_secret", e.clientSecret), "x-scalar-redirect-uri" in e && e["x-scalar-redirect-uri"] && t.set("redirect_uri", e["x-scalar-redirect-uri"]), u ? (t.set("code", u), t.set("grant_type", "authorization_code"), n && t.set("code_verifier", n.codeVerifier)) : e.type === "password" ? (t.set("grant_type", "password"), t.set("username", e.username), t.set("password", e.password)) : t.set("grant_type", "client_credentials"), e["x-scalar-security-body"] && Object.entries(e["x-scalar-security-body"]).forEach(([p, a]) => {
|
|
78
|
+
a && t.set(p, a);
|
|
79
79
|
});
|
|
80
80
|
try {
|
|
81
|
-
const
|
|
81
|
+
const p = {
|
|
82
82
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
83
83
|
};
|
|
84
|
-
e.clientSecret && (
|
|
85
|
-
const
|
|
84
|
+
e.clientSecret && (!e["x-scalar-credentials-location"] || e["x-scalar-credentials-location"] === "header") && (p.Authorization = `Basic ${btoa(`${e["x-scalar-client-id"]}:${e.clientSecret}`)}`);
|
|
85
|
+
const r = S(i, e.tokenUrl) ? `${i}?${new URLSearchParams([["scalar_url", e.tokenUrl]]).toString()}` : e.tokenUrl, c = await (await fetch(r, {
|
|
86
86
|
method: "POST",
|
|
87
|
-
headers:
|
|
87
|
+
headers: p,
|
|
88
88
|
body: t
|
|
89
|
-
})).json(),
|
|
90
|
-
return [null,
|
|
89
|
+
})).json(), d = e["x-tokenName"] || "access_token";
|
|
90
|
+
return [null, c[d]];
|
|
91
91
|
} catch {
|
|
92
92
|
return [new Error("Failed to get an access token. Please check your credentials."), null];
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
b as authorizeOauth2,
|
|
97
|
+
P as authorizeServers,
|
|
98
|
+
C as generateCodeChallenge
|
|
99
99
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '../../../store';
|
|
2
|
-
import type { ActiveEntitiesStore } from '../../../store/active-entities';
|
|
1
|
+
import type { WorkspaceStore } from '../../../store/index.js';
|
|
2
|
+
import type { ActiveEntitiesStore } from '../../../store/active-entities.js';
|
|
3
3
|
import { type Path, type PathValue } from '@scalar/object-utils/nested';
|
|
4
4
|
import { type Difference } from 'microdiff';
|
|
5
5
|
import { type ZodSchema, type ZodTypeDef } from 'zod';
|
package/dist/vitest.setup.d.ts
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
1
|
+
export declare const mockUseLayout: () => {
|
|
2
|
+
layout: import("./hooks/useLayout.js").ClientLayout;
|
|
3
|
+
};
|
|
4
|
+
export declare const mockUseSidebar: () => {
|
|
5
|
+
collapsedSidebarFolders: {
|
|
6
|
+
readonly [x: string]: boolean;
|
|
7
|
+
};
|
|
8
|
+
isSidebarOpen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
9
|
+
setCollapsedSidebarFolder: (uid: string, value: boolean) => boolean;
|
|
10
|
+
toggleSidebarFolder: (key: string) => boolean;
|
|
11
|
+
setSidebarOpen: (value: boolean) => boolean;
|
|
12
|
+
toggleSidebarOpen: () => boolean;
|
|
13
|
+
};
|
|
6
14
|
/** Spy on console.warn */
|
|
7
|
-
export declare const consoleWarnSpy: import("vitest").MockInstance<
|
|
15
|
+
export declare const consoleWarnSpy: import("vitest").MockInstance<{
|
|
16
|
+
(...data: any[]): void;
|
|
17
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
18
|
+
}>;
|
|
8
19
|
/** Spy on console.error */
|
|
9
|
-
export declare const consoleErrorSpy: import("vitest").MockInstance<
|
|
20
|
+
export declare const consoleErrorSpy: import("vitest").MockInstance<{
|
|
21
|
+
(...data: any[]): void;
|
|
22
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
23
|
+
}>;
|
|
10
24
|
/** Reset the spies */
|
|
11
25
|
export declare const resetConsoleSpies: () => void;
|
|
12
26
|
/** Helper to re-enable console warn checks */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../src/vitest.setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../src/vitest.setup.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa;;CAAY,CAAA;AAMtC,eAAO,MAAM,cAAc;;;;;;;;;CAAa,CAAA;AAExC,0BAA0B;AAC1B,eAAO,MAAM,cAAc;;;EAA4B,CAAA;AAGvD,2BAA2B;AAC3B,eAAO,MAAM,eAAe;;;EAA6B,CAAA;AAGzD,sBAAsB;AACtB,eAAO,MAAM,iBAAiB,YAG7B,CAAA;AAED,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,eAAsC,CAAA;AAEpE,4CAA4C;AAC5C,eAAO,MAAM,kBAAkB,eAAuC,CAAA;AAEtE,4CAA4C;AAC5C,eAAO,MAAM,kBAAkB,eAAuC,CAAA;AAEtE,6CAA6C;AAC7C,eAAO,MAAM,mBAAmB,eAAwC,CAAA"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.5.
|
|
21
|
+
"version": "2.5.20",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"@headlessui/tailwindcss": "^0.2.2",
|
|
191
191
|
"@headlessui/vue": "^1.7.23",
|
|
192
192
|
"@types/har-format": "^1.2.15",
|
|
193
|
-
"@vueuse/core": "^
|
|
193
|
+
"@vueuse/core": "^11.2.0",
|
|
194
194
|
"@vueuse/integrations": "^11.2.0",
|
|
195
195
|
"focus-trap": "^7",
|
|
196
196
|
"fuse.js": "^7.1.0",
|
|
@@ -205,37 +205,37 @@
|
|
|
205
205
|
"whatwg-mimetype": "^4.0.0",
|
|
206
206
|
"yaml": "2.8.0",
|
|
207
207
|
"zod": "3.24.1",
|
|
208
|
-
"@scalar/
|
|
209
|
-
"@scalar/components": "0.14.19",
|
|
208
|
+
"@scalar/components": "0.14.21",
|
|
210
209
|
"@scalar/icons": "0.4.6",
|
|
211
|
-
"@scalar/
|
|
212
|
-
"@scalar/import": "0.4.
|
|
213
|
-
"@scalar/oas-utils": "0.4.
|
|
214
|
-
"@scalar/object-utils": "1.2.
|
|
215
|
-
"@scalar/openapi-parser": "0.18.
|
|
216
|
-
"@scalar/
|
|
217
|
-
"@scalar/
|
|
218
|
-
"@scalar/
|
|
219
|
-
"@scalar/
|
|
220
|
-
"@scalar/
|
|
210
|
+
"@scalar/draggable": "0.2.0",
|
|
211
|
+
"@scalar/import": "0.4.15",
|
|
212
|
+
"@scalar/oas-utils": "0.4.16",
|
|
213
|
+
"@scalar/object-utils": "1.2.3",
|
|
214
|
+
"@scalar/openapi-parser": "0.18.3",
|
|
215
|
+
"@scalar/helpers": "0.0.7",
|
|
216
|
+
"@scalar/openapi-types": "0.3.7",
|
|
217
|
+
"@scalar/postman-to-openapi": "0.3.19",
|
|
218
|
+
"@scalar/snippetz": "0.4.4",
|
|
219
|
+
"@scalar/themes": "0.13.12",
|
|
220
|
+
"@scalar/types": "0.2.11",
|
|
221
|
+
"@scalar/use-codemirror": "0.12.22",
|
|
221
222
|
"@scalar/use-hooks": "0.2.4",
|
|
222
|
-
"@scalar/use-tooltip": "1.1.0",
|
|
223
223
|
"@scalar/use-toasts": "0.8.0",
|
|
224
|
-
"@scalar/
|
|
224
|
+
"@scalar/use-tooltip": "1.1.0"
|
|
225
225
|
},
|
|
226
226
|
"devDependencies": {
|
|
227
227
|
"@tailwindcss/vite": "^4.1.7",
|
|
228
228
|
"@types/shell-quote": "^1.7.5",
|
|
229
229
|
"@types/whatwg-mimetype": "^3.0.2",
|
|
230
|
-
"@vitejs/plugin-vue": "^5.
|
|
230
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
231
231
|
"@vue/test-utils": "^2.4.1",
|
|
232
232
|
"jsdom": "^22.1.0",
|
|
233
233
|
"tailwindcss": "^4.1.7",
|
|
234
|
-
"vite": "
|
|
234
|
+
"vite": "6.1.6",
|
|
235
235
|
"vite-svg-loader": "^5.1.0",
|
|
236
|
-
"vitest": "^
|
|
237
|
-
"@scalar/
|
|
238
|
-
"@scalar/
|
|
236
|
+
"vitest": "^3.2.4",
|
|
237
|
+
"@scalar/galaxy": "0.5.5",
|
|
238
|
+
"@scalar/build-tooling": "0.2.4"
|
|
239
239
|
},
|
|
240
240
|
"scripts": {
|
|
241
241
|
"build": "scalar-build-vite",
|