@scalar/api-client 2.0.64 → 2.1.0
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 +44 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +64 -62
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +77 -69
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +121 -0
- package/dist/components/AddressBar/AddressBarServer.vue2.js +4 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +22 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +57 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue2.js +4 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -6
- 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.vue2.js +87 -82
- package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +70 -63
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +33 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.js +41 -0
- package/dist/components/CommandPalette/CommandActionForm.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +20 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.js +42 -0
- package/dist/components/CommandPalette/CommandActionInput.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +33 -56
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +88 -109
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -73
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +21 -2
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +122 -133
- package/dist/components/CommandPalette/{CommandPaletteFolder.vue.d.ts → CommandPaletteServer.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +92 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +7 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +87 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +33 -49
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +22 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +3 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +107 -101
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +2 -2
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +13 -13
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +39 -40
- package/dist/components/DataTable/index.js +12 -12
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +7 -7
- package/dist/components/Form/Form.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +30 -30
- package/dist/components/HttpMethod/helpers.d.ts +4 -0
- package/dist/components/HttpMethod/helpers.d.ts.map +1 -0
- package/dist/components/HttpMethod/helpers.js +5 -0
- package/dist/components/HttpMethod/index.d.ts +1 -0
- package/dist/components/HttpMethod/index.d.ts.map +1 -1
- package/dist/components/HttpMethod/index.js +4 -2
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +2 -2
- package/dist/components/Search/SearchModal.vue2.js +29 -27
- package/dist/components/Search/useSearch.js +35 -35
- package/dist/components/SideNav/SideNavLink.vue.js +6 -6
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +14 -17
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts +22 -0
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +1 -0
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.js +29 -0
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +4 -0
- 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.vue2.js +38 -35
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -1
- 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.vue2.js +37 -34
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +11 -11
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +3 -3
- package/dist/components/SubpageHeader.vue2.js +3 -3
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +23 -23
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +21 -21
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -5
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +4 -4
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +39 -53
- package/dist/layouts/App/create-api-client-app.d.ts +2058 -1941
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +12 -12
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4590 -4356
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +18 -23
- package/dist/libs/create-client.d.ts +2086 -1972
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +85 -76
- package/dist/libs/environment-parser.d.ts +9 -0
- package/dist/libs/environment-parser.d.ts.map +1 -0
- package/dist/libs/environment-parser.js +17 -0
- package/dist/libs/errors.d.ts +21 -0
- package/dist/libs/errors.d.ts.map +1 -0
- package/dist/libs/errors.js +14 -0
- package/dist/libs/event-busses/command-palette-bus.d.ts +1 -1
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +4 -4
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +17 -19
- package/dist/libs/index.d.ts +5 -2
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -24
- package/dist/libs/local-storage.d.ts +3 -3
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +24 -12
- package/dist/libs/normalize-headers.d.ts +14 -0
- package/dist/libs/normalize-headers.d.ts.map +1 -0
- package/dist/libs/normalize-headers.js +32 -0
- package/dist/libs/send-request.d.ts +28 -0
- package/dist/libs/send-request.d.ts.map +1 -0
- package/dist/libs/send-request.js +186 -0
- package/dist/libs/string-template.d.ts +19 -0
- package/dist/libs/string-template.d.ts.map +1 -0
- package/dist/libs/string-template.js +30 -0
- package/dist/router.d.ts +5 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +36 -27
- package/dist/store/collections.d.ts +705 -0
- package/dist/store/collections.d.ts.map +1 -0
- package/dist/store/collections.js +63 -0
- package/dist/store/cookies.d.ts +135 -0
- package/dist/store/cookies.d.ts.map +1 -0
- package/dist/store/cookies.js +29 -0
- package/dist/store/environment.d.ts +80 -0
- package/dist/store/environment.d.ts.map +1 -0
- package/dist/store/environment.js +39 -0
- package/dist/store/import-spec.d.ts +8 -0
- package/dist/store/import-spec.d.ts.map +1 -0
- package/dist/store/import-spec.js +45 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/request-example.d.ts +1111 -0
- package/dist/store/request-example.d.ts.map +1 -0
- package/dist/store/request-example.js +47 -0
- package/dist/store/requests.d.ts +371 -0
- package/dist/store/requests.d.ts.map +1 -0
- package/dist/store/requests.js +107 -0
- package/dist/store/router-params.d.ts +15 -0
- package/dist/store/router-params.d.ts.map +1 -0
- package/dist/store/router-params.js +21 -0
- package/dist/store/security-schemes.d.ts +616 -0
- package/dist/store/security-schemes.d.ts.map +1 -0
- package/dist/store/security-schemes.js +68 -0
- package/dist/store/servers.d.ts +99 -0
- package/dist/store/servers.d.ts.map +1 -0
- package/dist/store/servers.js +46 -0
- package/dist/store/store-context.d.ts +29 -0
- package/dist/store/store-context.d.ts.map +1 -0
- package/dist/store/store.d.ts +7504 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +200 -0
- package/dist/store/tags.d.ts +169 -0
- package/dist/store/tags.d.ts.map +1 -0
- package/dist/store/tags.js +57 -0
- package/dist/store/workspace.d.ts +93 -7150
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +49 -543
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +2 -2
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +10 -10
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +21 -23
- package/dist/views/Environment/Environment.vue2.js +27 -28
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +11 -5
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +79 -59
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +87 -318
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +36 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +59 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +4 -0
- package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue.d.ts +3 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +216 -0
- package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -0
- package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +183 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +30 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +3 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +140 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +167 -186
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +49 -49
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +26 -22
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +103 -102
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +5 -5
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts +30 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSidebar.vue.js +7 -0
- package/dist/views/Request/RequestSidebar.vue2.js +179 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +6 -7
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +283 -254
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +9 -7
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +24 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSubpageHeader.vue.js +7 -0
- package/dist/views/Request/RequestSubpageHeader.vue2.js +48 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +17 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +37 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +69 -90
- package/dist/views/Request/components/index.d.ts +0 -1
- package/dist/views/Request/components/index.d.ts.map +1 -1
- package/dist/views/Request/components/index.js +2 -4
- package/dist/views/Request/consts/new-auth-options.d.ts +11 -1
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +17 -7
- package/dist/views/Request/handle-drag.d.ts +8 -0
- package/dist/views/Request/handle-drag.d.ts.map +1 -0
- package/dist/views/Request/handle-drag.js +56 -0
- package/dist/views/Request/libs/auth.d.ts +35 -0
- package/dist/views/Request/libs/auth.d.ts.map +1 -0
- package/dist/views/Request/libs/auth.js +14 -0
- package/dist/views/Request/libs/index.d.ts +1 -0
- package/dist/views/Request/libs/index.d.ts.map +1 -1
- package/dist/views/Request/libs/index.js +7 -3
- package/dist/views/Request/libs/oauth2.d.ts +12 -3
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +42 -27
- package/dist/views/Servers/ServerForm.vue.js +22 -22
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +17 -14
- package/package.json +9 -9
- package/dist/components/CodeInput/codeDropdownWidget.d.ts +0 -32
- package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +0 -1
- package/dist/components/CodeInput/codeDropdownWidget.js +0 -121
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +0 -106
- package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +0 -4
- package/dist/errors.d.ts +0 -5
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -7
- package/dist/libs/normalizeHeaders.d.ts +0 -11
- package/dist/libs/normalizeHeaders.d.ts.map +0 -1
- package/dist/libs/normalizeHeaders.js +0 -25
- package/dist/libs/pathParams.d.ts +0 -10
- package/dist/libs/pathParams.d.ts.map +0 -1
- package/dist/libs/pathParams.js +0 -36
- package/dist/libs/sendRequest.d.ts +0 -14
- package/dist/libs/sendRequest.d.ts.map +0 -1
- package/dist/libs/sendRequest.js +0 -163
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +0 -351
- package/dist/views/Request/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/views/Request/components/OAuth2.vue.js +0 -208
- package/dist/views/Request/components/OAuthScopesInput.vue.d.ts.map +0 -1
- /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue2.js +0 -0
- /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue2.js +0 -0
- /package/dist/views/Request/RequestSection/{RequestAuth.vue.d.ts → RequestAuth/RequestAuth.vue.d.ts} +0 -0
|
@@ -1,48 +1,62 @@
|
|
|
1
|
-
const
|
|
1
|
+
const y = (t) => t.type.startsWith("oauth"), _ = (t, r) => new Promise((i, a) => {
|
|
2
|
+
const e = t.flow.selectedScopes.join(" ");
|
|
2
3
|
if (t.flow.type === "clientCredentials" || t.flow.type === "password")
|
|
3
|
-
|
|
4
|
+
p(
|
|
5
|
+
t,
|
|
6
|
+
r,
|
|
7
|
+
e
|
|
8
|
+
).then(i).catch(a);
|
|
4
9
|
else {
|
|
5
|
-
const
|
|
6
|
-
t.flow.type === "implicit" ? o.searchParams.set("response_type", "token") : t.flow.type === "authorizationCode" && o.searchParams.set("response_type", "code"), o.searchParams.set("client_id", t
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
var
|
|
11
|
-
let
|
|
10
|
+
const c = (Math.random() + 1).toString(36).substring(7), o = new URL(t.flow.authorizationUrl);
|
|
11
|
+
t.flow.type === "implicit" ? o.searchParams.set("response_type", "token") : t.flow.type === "authorizationCode" && o.searchParams.set("response_type", "code"), o.searchParams.set("client_id", t["x-scalar-client-id"]), o.searchParams.set("redirect_uri", t.flow["x-scalar-redirect-uri"]), o.searchParams.set("scope", e), o.searchParams.set("state", c);
|
|
12
|
+
const s = window.open(o, "openAuth2Window", "left=100,top=100,width=800,height=600");
|
|
13
|
+
if (s) {
|
|
14
|
+
const f = setInterval(function() {
|
|
15
|
+
var h;
|
|
16
|
+
let n = null, l = null;
|
|
12
17
|
try {
|
|
13
|
-
const
|
|
14
|
-
|
|
18
|
+
const w = new URL(s.location.href).searchParams;
|
|
19
|
+
n = w.get("access_token"), l = w.get("code");
|
|
20
|
+
const u = new URLSearchParams(
|
|
21
|
+
s.location.href.split("#")[1]
|
|
22
|
+
);
|
|
23
|
+
n || (n = u.get("access_token")), l || (l = u.get("code"));
|
|
15
24
|
} catch {
|
|
16
25
|
}
|
|
17
|
-
if (
|
|
18
|
-
if (clearInterval(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
} else
|
|
26
|
+
if (s.closed || n || l)
|
|
27
|
+
if (clearInterval(f), s.close(), n) {
|
|
28
|
+
const w = (h = s.location.href.match(/state=([^&]*)/)) == null ? void 0 : h[1];
|
|
29
|
+
n && w === c && i(n);
|
|
30
|
+
} else l ? p(
|
|
31
|
+
t,
|
|
32
|
+
r,
|
|
33
|
+
e,
|
|
34
|
+
l
|
|
35
|
+
).then(i).catch(a) : (clearInterval(f), a(
|
|
22
36
|
new Error("Window was closed without granting authorization")
|
|
23
37
|
));
|
|
24
38
|
}, 200);
|
|
25
39
|
}
|
|
26
40
|
}
|
|
27
|
-
}),
|
|
28
|
-
if (!("clientSecret" in
|
|
41
|
+
}), p = async (t, r, i, a) => {
|
|
42
|
+
if (!("clientSecret" in r))
|
|
29
43
|
throw new Error(
|
|
30
44
|
"Authorize Servers only works for Client Credentials or Authorization Code flow"
|
|
31
45
|
);
|
|
32
46
|
if (!t.flow) throw new Error("OAuth2 flow was not defined");
|
|
33
|
-
const
|
|
34
|
-
e.set("client_id", t
|
|
47
|
+
const e = new URLSearchParams();
|
|
48
|
+
e.set("client_id", t["x-scalar-client-id"]), e.set("scope", i), r.clientSecret && e.set("client_secret", r.clientSecret), "x-scalar-redirect-uri" in t.flow && e.set("redirect_uri", t.flow["x-scalar-redirect-uri"]), a ? (e.set("code", a), e.set("grant_type", "authorization_code")) : r.type === "oauth-password" ? (e.set("grant_type", "password"), e.set("username", r.username), e.set("password", r.password)) : e.set("grant_type", "client_credentials");
|
|
35
49
|
try {
|
|
36
|
-
const
|
|
50
|
+
const c = {
|
|
37
51
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
38
52
|
};
|
|
39
|
-
t
|
|
53
|
+
t["x-scalar-client-id"] && r.clientSecret && (c.Authorization = `Basic ${btoa(`${t["x-scalar-client-id"]}:${r.clientSecret}`)}`);
|
|
40
54
|
const o = await fetch(t.flow.tokenUrl, {
|
|
41
55
|
method: "POST",
|
|
42
|
-
headers:
|
|
56
|
+
headers: c,
|
|
43
57
|
body: e
|
|
44
|
-
}), { access_token:
|
|
45
|
-
return
|
|
58
|
+
}), { access_token: d } = await o.json();
|
|
59
|
+
return d;
|
|
46
60
|
} catch {
|
|
47
61
|
throw new Error(
|
|
48
62
|
"Failed to get an access token. Please check your credentials."
|
|
@@ -50,6 +64,7 @@ const p = (t) => new Promise((r, n) => {
|
|
|
50
64
|
}
|
|
51
65
|
};
|
|
52
66
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
_ as authorizeOauth2,
|
|
68
|
+
p as authorizeServers,
|
|
69
|
+
y as isOauth2Example
|
|
55
70
|
};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, computed as l, openBlock as u, createElementBlock as d, Fragment as b, createVNode as g, createBlock as y, createCommentVNode as p } from "vue";
|
|
2
2
|
import m from "../../components/Form/Form.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const j = { class: "w-full" }, L = /* @__PURE__ */
|
|
3
|
+
import { useRoute as O } from "vue-router";
|
|
4
|
+
import { useWorkspace as V } from "../../store/store.js";
|
|
5
|
+
const j = { class: "w-full" }, L = /* @__PURE__ */ S({
|
|
6
6
|
__name: "ServerForm",
|
|
7
7
|
setup(B) {
|
|
8
|
-
const { activeCollection:
|
|
8
|
+
const { activeCollection: a, servers: v, serverMutators: n } = V(), f = [
|
|
9
9
|
{ label: "URL", key: "url", placeholder: "https://void.scalar.com/api" },
|
|
10
10
|
{
|
|
11
11
|
label: "Label",
|
|
12
12
|
key: "description",
|
|
13
13
|
placeholder: "Production"
|
|
14
14
|
}
|
|
15
|
-
], c =
|
|
15
|
+
], c = O(), o = l(
|
|
16
16
|
() => {
|
|
17
17
|
var e, t;
|
|
18
|
-
return v[
|
|
18
|
+
return v[a.value && c.params.server === "default" ? (e = a.value) == null ? void 0 : e.servers[0] : ((t = a.value) == null ? void 0 : t.servers.find(
|
|
19
19
|
(r) => r === c.params.server
|
|
20
20
|
)) ?? ""];
|
|
21
21
|
}
|
|
22
22
|
), _ = (e, t) => {
|
|
23
|
-
|
|
23
|
+
a.value && n.edit(o.value.uid, e, t);
|
|
24
24
|
}, k = (e, t) => {
|
|
25
|
-
|
|
25
|
+
a.value && n.edit(o.value.uid, `variables.${e}.value`, t);
|
|
26
26
|
}, h = l(
|
|
27
27
|
() => {
|
|
28
28
|
var e;
|
|
29
|
-
return Object.entries(((e =
|
|
29
|
+
return Object.entries(((e = o.value) == null ? void 0 : e.variables) ?? {}).map(
|
|
30
30
|
([t, r]) => {
|
|
31
31
|
var s;
|
|
32
32
|
return {
|
|
33
33
|
key: t,
|
|
34
34
|
label: t,
|
|
35
|
-
placeholder: r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? ""
|
|
35
|
+
placeholder: (r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? "").toString()
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
|
-
),
|
|
41
|
-
() => Object.entries(
|
|
40
|
+
), i = l(
|
|
41
|
+
() => Object.entries(o.value.variables ?? {}).reduce((e, [t, r]) => {
|
|
42
42
|
var s;
|
|
43
|
-
return e[t] = r.
|
|
43
|
+
return e[t] = (r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? "").toString(), e;
|
|
44
44
|
}, {})
|
|
45
45
|
);
|
|
46
|
-
return (e, t) => (u(),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
data:
|
|
46
|
+
return (e, t) => (u(), d("div", j, [
|
|
47
|
+
o.value ? (u(), d(b, { key: 0 }, [
|
|
48
|
+
g(m, {
|
|
49
|
+
data: o.value,
|
|
50
50
|
onUpdate: _,
|
|
51
51
|
options: f,
|
|
52
52
|
title: "Server"
|
|
53
53
|
}, null, 8, ["data"]),
|
|
54
|
-
Object.keys(
|
|
54
|
+
Object.keys(i.value).length ? (u(), y(m, {
|
|
55
55
|
key: 0,
|
|
56
|
-
data:
|
|
56
|
+
data: i.value,
|
|
57
57
|
onUpdate: k,
|
|
58
58
|
options: h.value,
|
|
59
59
|
title: "Variables"
|
|
60
|
-
}, null, 8, ["data", "options"])) :
|
|
61
|
-
], 64)) :
|
|
60
|
+
}, null, 8, ["data", "options"])) : p("", !0)
|
|
61
|
+
], 64)) : p("", !0)
|
|
62
62
|
]));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAiOA,wBAKG"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, openBlock as l, createBlock as i, withCtx as e, createVNode as r, unref as n, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
|
|
2
2
|
import b from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
3
|
import h from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
4
|
import k from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
5
5
|
import L from "../../components/SubpageHeader.vue.js";
|
|
6
6
|
import V from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
7
7
|
import w from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import E from "
|
|
8
|
+
import { serverSchema as C } from "@scalar/oas-utils/entities/spec";
|
|
9
|
+
import { useRouter as y } from "vue-router";
|
|
10
|
+
import B from "./ServerForm.vue.js";
|
|
11
|
+
import { useWorkspace as E } from "../../store/store.js";
|
|
12
12
|
import N from "../../components/Sidebar/Sidebar.vue.js";
|
|
13
|
-
const $ = { class: "flex-1" }, J = /* @__PURE__ */
|
|
13
|
+
const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
|
|
14
14
|
__name: "Servers",
|
|
15
15
|
setup(g) {
|
|
16
|
-
const { activeCollection: t, servers: m, serverMutators: u } =
|
|
16
|
+
const { activeCollection: t, servers: m, serverMutators: u } = E(), { push: c } = y(), f = () => {
|
|
17
17
|
if (!t.value) return;
|
|
18
|
-
const o =
|
|
18
|
+
const o = C.parse({ url: "http://localhost" });
|
|
19
19
|
u.add(o, t.value.uid), c(`/servers/${o.uid}`);
|
|
20
20
|
};
|
|
21
|
-
return (o, H) => (l(),
|
|
21
|
+
return (o, H) => (l(), i(L, null, {
|
|
22
22
|
default: e(() => [
|
|
23
23
|
r(V, null, {
|
|
24
24
|
default: e(() => [
|
|
@@ -27,12 +27,15 @@ const $ = { class: "flex-1" }, J = /* @__PURE__ */ f({
|
|
|
27
27
|
p("div", $, [
|
|
28
28
|
r(h, null, {
|
|
29
29
|
default: e(() => {
|
|
30
|
-
var
|
|
30
|
+
var s;
|
|
31
31
|
return [
|
|
32
|
-
(l(!0), _(v, null, S((
|
|
32
|
+
(l(!0), _(v, null, S((s = n(t)) == null ? void 0 : s.servers, (a) => (l(), i(k, {
|
|
33
33
|
key: a,
|
|
34
34
|
class: "text-xs",
|
|
35
|
-
variable: {
|
|
35
|
+
variable: {
|
|
36
|
+
name: n(m)[a].url ?? "",
|
|
37
|
+
uid: a
|
|
38
|
+
}
|
|
36
39
|
}, null, 8, ["variable"]))), 128))
|
|
37
40
|
];
|
|
38
41
|
}),
|
|
@@ -41,7 +44,7 @@ const $ = { class: "flex-1" }, J = /* @__PURE__ */ f({
|
|
|
41
44
|
])
|
|
42
45
|
]),
|
|
43
46
|
button: e(() => [
|
|
44
|
-
r(b, { click:
|
|
47
|
+
r(b, { click: f }, {
|
|
45
48
|
title: e(() => [
|
|
46
49
|
x("Add Server")
|
|
47
50
|
]),
|
|
@@ -52,7 +55,7 @@ const $ = { class: "flex-1" }, J = /* @__PURE__ */ f({
|
|
|
52
55
|
}),
|
|
53
56
|
r(w, { class: "flex-1" }, {
|
|
54
57
|
default: e(() => [
|
|
55
|
-
r(
|
|
58
|
+
r(B)
|
|
56
59
|
]),
|
|
57
60
|
_: 1
|
|
58
61
|
})
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0
|
|
21
|
+
"version": "2.1.0",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -124,16 +124,16 @@
|
|
|
124
124
|
"vue": "^3.4.29",
|
|
125
125
|
"vue-router": "^4.3.0",
|
|
126
126
|
"whatwg-mimetype": "^4.0.0",
|
|
127
|
-
"zod": "^3.
|
|
128
|
-
"@scalar/components": "0.12.
|
|
127
|
+
"zod": "^3.23.8",
|
|
128
|
+
"@scalar/components": "0.12.45",
|
|
129
129
|
"@scalar/draggable": "0.1.5",
|
|
130
|
-
"@scalar/
|
|
131
|
-
"@scalar/
|
|
132
|
-
"@scalar/themes": "0.9.29",
|
|
133
|
-
"@scalar/openapi-parser": "0.8.2",
|
|
134
|
-
"@scalar/types": "0.0.8",
|
|
130
|
+
"@scalar/oas-utils": "0.2.44",
|
|
131
|
+
"@scalar/openapi-parser": "0.8.3",
|
|
135
132
|
"@scalar/openapi-types": "0.1.1",
|
|
136
|
-
"@scalar/
|
|
133
|
+
"@scalar/types": "0.0.9",
|
|
134
|
+
"@scalar/object-utils": "1.1.8",
|
|
135
|
+
"@scalar/use-codemirror": "0.11.11",
|
|
136
|
+
"@scalar/themes": "0.9.30",
|
|
137
137
|
"@scalar/use-toasts": "0.7.6",
|
|
138
138
|
"@scalar/use-tooltip": "1.0.2"
|
|
139
139
|
},
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '../../store/index.js';
|
|
2
|
-
import { type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate, WidgetType } from '@scalar/use-codemirror';
|
|
3
|
-
import type { Router } from 'vue-router';
|
|
4
|
-
declare class DropdownWidget extends WidgetType {
|
|
5
|
-
private queryTerm;
|
|
6
|
-
private onSelect;
|
|
7
|
-
private dropdown;
|
|
8
|
-
private withServers?;
|
|
9
|
-
private activeParsedEnvironments;
|
|
10
|
-
private environments;
|
|
11
|
-
private router;
|
|
12
|
-
constructor(queryTerm: string, onSelect: (item: string) => void, activeParsedEnvironments: WorkspaceStore['activeParsedEnvironments'], environments: WorkspaceStore['environments'], router: Router, withServers?: boolean);
|
|
13
|
-
updateQueryTerm(newQueryTerm: string): void;
|
|
14
|
-
getQueryTerm(): string;
|
|
15
|
-
toDOM(view: EditorView): HTMLSpanElement;
|
|
16
|
-
destroy(): void;
|
|
17
|
-
eq(other: WidgetType): boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare const dropdownPlugin: (props: {
|
|
20
|
-
withServers?: boolean;
|
|
21
|
-
activeParsedEnvironments: WorkspaceStore["activeParsedEnvironments"];
|
|
22
|
-
environments: WorkspaceStore["environments"];
|
|
23
|
-
router: Router;
|
|
24
|
-
}) => ViewPlugin<{
|
|
25
|
-
decorations: DecorationSet;
|
|
26
|
-
widget: DropdownWidget | null;
|
|
27
|
-
view: EditorView;
|
|
28
|
-
handleDropdownSelect(item: string): void;
|
|
29
|
-
update(update: ViewUpdate): void;
|
|
30
|
-
}>;
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=codeDropdownWidget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeDropdownWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeDropdownWidget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,UAAU,EACV,KAAK,UAAU,EACf,UAAU,EACX,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,cAAM,cAAe,SAAQ,UAAU;IACrC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,QAAQ,CAAY;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,wBAAwB,CAA4C;IAC5E,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,MAAM,CAAQ;gBAGpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAChC,wBAAwB,EAAE,cAAc,CAAC,0BAA0B,CAAC,EACpE,YAAY,EAAE,cAAc,CAAC,cAAc,CAAC,EAC5C,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,OAAO;IAWvB,eAAe,CAAC,YAAY,EAAE,MAAM;IAMpC,YAAY;IAIZ,KAAK,CAAC,IAAI,EAAE,UAAU;IAuCtB,OAAO;IAOP,EAAE,CAAC,KAAK,EAAE,UAAU;CAGrB;AAED,eAAO,MAAM,cAAc,UAAW;IACpC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,wBAAwB,EAAE,cAAc,CAAC,0BAA0B,CAAC,CAAA;IACpE,YAAY,EAAE,cAAc,CAAC,cAAc,CAAC,CAAA;IAC5C,MAAM,EAAE,MAAM,CAAA;CACf;iBAGkB,aAAa;YAClB,cAAc,GAAG,IAAI;UACvB,UAAU;+BAQW,MAAM;mBAwClB,UAAU;EAyC5B,CAAA"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
var g = Object.defineProperty;
|
|
2
|
-
var f = (s, t, e) => t in s ? g(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
-
var o = (s, t, e) => f(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { ViewPlugin as p, Decoration as h, StateEffect as v, WidgetType as y } from "@scalar/use-codemirror";
|
|
5
|
-
import { createApp as T, h as w, Teleport as S } from "vue";
|
|
6
|
-
import q from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
7
|
-
class u extends y {
|
|
8
|
-
constructor(e, i, d, n, c, r) {
|
|
9
|
-
super();
|
|
10
|
-
o(this, "queryTerm");
|
|
11
|
-
o(this, "onSelect");
|
|
12
|
-
o(this, "dropdown", null);
|
|
13
|
-
o(this, "withServers");
|
|
14
|
-
o(this, "activeParsedEnvironments");
|
|
15
|
-
o(this, "environments");
|
|
16
|
-
o(this, "router");
|
|
17
|
-
this.queryTerm = e, this.onSelect = i, this.withServers = r, this.activeParsedEnvironments = d, this.environments = n, this.router = c;
|
|
18
|
-
}
|
|
19
|
-
updateQueryTerm(e) {
|
|
20
|
-
this.queryTerm !== e && (this.queryTerm = e);
|
|
21
|
-
}
|
|
22
|
-
getQueryTerm() {
|
|
23
|
-
return this.queryTerm;
|
|
24
|
-
}
|
|
25
|
-
toDOM(e) {
|
|
26
|
-
const i = document.createElement("span");
|
|
27
|
-
return i.style.position = "fixed", setTimeout(() => {
|
|
28
|
-
var c;
|
|
29
|
-
const d = e.state.selection.main.head, n = e.coordsAtPos(d - this.queryTerm.length - 2);
|
|
30
|
-
if (n) {
|
|
31
|
-
const r = (c = document.querySelector(".scalar-client")) == null ? void 0 : c.getBoundingClientRect();
|
|
32
|
-
r && (this.dropdown = T({
|
|
33
|
-
render: () => w(S, { to: ".scalar-client" }, [
|
|
34
|
-
w(q, {
|
|
35
|
-
query: this.queryTerm,
|
|
36
|
-
onSelect: this.onSelect,
|
|
37
|
-
withServers: this.withServers,
|
|
38
|
-
activeParsedEnvironments: this.activeParsedEnvironments,
|
|
39
|
-
environments: this.environments,
|
|
40
|
-
router: this.router,
|
|
41
|
-
style: {
|
|
42
|
-
position: "absolute",
|
|
43
|
-
left: `${n.left - r.left}px`,
|
|
44
|
-
top: `calc(${n.bottom - r.top}px + 6px)`
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
])
|
|
48
|
-
})), this.dropdown.use(this.router), this.dropdown.mount(i);
|
|
49
|
-
}
|
|
50
|
-
}, 0), i;
|
|
51
|
-
}
|
|
52
|
-
destroy() {
|
|
53
|
-
this.dropdown && (this.dropdown.unmount(), this.dropdown = null);
|
|
54
|
-
}
|
|
55
|
-
eq(e) {
|
|
56
|
-
return e instanceof u && this.queryTerm === e.queryTerm;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const C = (s) => p.fromClass(
|
|
60
|
-
class {
|
|
61
|
-
constructor(t) {
|
|
62
|
-
o(this, "decorations");
|
|
63
|
-
o(this, "widget", null);
|
|
64
|
-
o(this, "view");
|
|
65
|
-
this.view = t, this.decorations = h.none, this.handleDropdownSelect = this.handleDropdownSelect.bind(this);
|
|
66
|
-
}
|
|
67
|
-
handleDropdownSelect(t) {
|
|
68
|
-
var m;
|
|
69
|
-
if (!this.widget) return;
|
|
70
|
-
const { state: e, dispatch: i } = this.view, d = e.selection.main.head, n = Math.max(0, d - this.widget.getQueryTerm().length - 2), c = d, r = `{{${t}}}`;
|
|
71
|
-
i({
|
|
72
|
-
changes: { from: n, to: c, insert: r }
|
|
73
|
-
}), (m = this.widget) == null || m.destroy(), this.widget = null, this.decorations = h.none, this.view.dispatch({
|
|
74
|
-
effects: v.appendConfig.of([])
|
|
75
|
-
});
|
|
76
|
-
const a = n + r.length, l = "";
|
|
77
|
-
this.widget = new u(
|
|
78
|
-
l,
|
|
79
|
-
this.handleDropdownSelect,
|
|
80
|
-
s.activeParsedEnvironments,
|
|
81
|
-
s.environments,
|
|
82
|
-
s.router,
|
|
83
|
-
s.withServers
|
|
84
|
-
), this.decorations = h.set([
|
|
85
|
-
h.widget({
|
|
86
|
-
widget: this.widget,
|
|
87
|
-
side: 1
|
|
88
|
-
}).range(a)
|
|
89
|
-
]), this.view.dispatch({
|
|
90
|
-
selection: { anchor: a }
|
|
91
|
-
}), this.view.focus();
|
|
92
|
-
}
|
|
93
|
-
update(t) {
|
|
94
|
-
var r, a;
|
|
95
|
-
const e = t.state.selection.main.head, i = t.state.doc.sliceString(0, e), d = [], n = i.lastIndexOf("{{"), c = i.lastIndexOf("}}");
|
|
96
|
-
if (n > c) {
|
|
97
|
-
const l = i.slice(n + 2);
|
|
98
|
-
!this.widget || this.widget.getQueryTerm() !== l ? ((r = this.widget) == null || r.destroy(), this.widget = new u(
|
|
99
|
-
l,
|
|
100
|
-
this.handleDropdownSelect,
|
|
101
|
-
s.activeParsedEnvironments,
|
|
102
|
-
s.environments,
|
|
103
|
-
s.router
|
|
104
|
-
)) : this.widget.updateQueryTerm(l), d.push(
|
|
105
|
-
h.widget({
|
|
106
|
-
widget: this.widget,
|
|
107
|
-
side: 1
|
|
108
|
-
}).range(e)
|
|
109
|
-
);
|
|
110
|
-
} else
|
|
111
|
-
(a = this.widget) == null || a.destroy(), this.widget = null;
|
|
112
|
-
this.decorations = h.set(d);
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
decorations: (t) => t.decorations
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
export {
|
|
120
|
-
C as dropdownPlugin
|
|
121
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":";;;;;AA6UA,wBAMG"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, ref as d, computed as v, onMounted as V, openBlock as k, createElementBlock as N, createElementVNode as s, withDirectives as S, withKeys as F, withModifiers as I, vModelText as M, createVNode as n, unref as i, withCtx as u, normalizeClass as B, toDisplayString as D, createTextVNode as K } from "vue";
|
|
2
|
-
import { useWorkspace as T } from "../../store/workspace.js";
|
|
3
|
-
import { ScalarListbox as z, ScalarButton as x, ScalarIcon as E } from "@scalar/components";
|
|
4
|
-
import { useToasts as P } from "@scalar/use-toasts";
|
|
5
|
-
const U = { class: "flex w-full flex-col gap-3" }, W = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, j = /* @__PURE__ */ s("label", {
|
|
6
|
-
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
7
|
-
for: "foldername"
|
|
8
|
-
}, null, -1), L = ["onKeydown"], q = { class: "flex" }, A = { class: "flex flex-1 gap-2 max-h-8" }, R = /* @__PURE__ */ y({
|
|
9
|
-
__name: "CommandPaletteFolder",
|
|
10
|
-
emits: ["close"],
|
|
11
|
-
setup(G, { emit: h }) {
|
|
12
|
-
var p;
|
|
13
|
-
const b = h, { activeWorkspaceCollections: _, folderMutators: w, activeCollection: C } = T(), t = d(""), r = d(((p = C.value) == null ? void 0 : p.uid) ?? ""), { toast: g } = P(), c = v(
|
|
14
|
-
() => _.value.map((e) => {
|
|
15
|
-
var l, a;
|
|
16
|
-
return {
|
|
17
|
-
id: e.uid,
|
|
18
|
-
label: ((a = (l = e.spec) == null ? void 0 : l.info) == null ? void 0 : a.title) ?? ""
|
|
19
|
-
};
|
|
20
|
-
})
|
|
21
|
-
), o = v({
|
|
22
|
-
get: () => c.value.find(
|
|
23
|
-
({ id: e }) => e === r.value
|
|
24
|
-
),
|
|
25
|
-
set: (e) => {
|
|
26
|
-
e != null && e.id && (r.value = e.id);
|
|
27
|
-
}
|
|
28
|
-
}), f = () => {
|
|
29
|
-
if (!t.value) {
|
|
30
|
-
g("Please enter a name before creating a folder.", "error");
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
t.value && o.value && (w.add(
|
|
34
|
-
{
|
|
35
|
-
name: t.value
|
|
36
|
-
},
|
|
37
|
-
r.value
|
|
38
|
-
), b("close"));
|
|
39
|
-
}, m = d(null);
|
|
40
|
-
return V(() => {
|
|
41
|
-
var e;
|
|
42
|
-
(e = m.value) == null || e.focus();
|
|
43
|
-
}), (e, l) => (k(), N("div", U, [
|
|
44
|
-
s("div", W, [
|
|
45
|
-
j,
|
|
46
|
-
S(s("input", {
|
|
47
|
-
id: "foldername",
|
|
48
|
-
ref_key: "folderInput",
|
|
49
|
-
ref: m,
|
|
50
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) => t.value = a),
|
|
51
|
-
autocomplete: "off",
|
|
52
|
-
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
53
|
-
"data-form-type": "other",
|
|
54
|
-
"data-lpignore": "true",
|
|
55
|
-
label: "Folder Name",
|
|
56
|
-
placeholder: "Folder Name",
|
|
57
|
-
onKeydown: F(I(f, ["prevent"]), ["enter"])
|
|
58
|
-
}, null, 40, L), [
|
|
59
|
-
[M, t.value]
|
|
60
|
-
])
|
|
61
|
-
]),
|
|
62
|
-
s("div", q, [
|
|
63
|
-
s("div", A, [
|
|
64
|
-
n(i(z), {
|
|
65
|
-
modelValue: o.value,
|
|
66
|
-
"onUpdate:modelValue": l[1] || (l[1] = (a) => o.value = a),
|
|
67
|
-
options: c.value
|
|
68
|
-
}, {
|
|
69
|
-
default: u(() => [
|
|
70
|
-
n(i(x), {
|
|
71
|
-
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
72
|
-
variant: "outlined"
|
|
73
|
-
}, {
|
|
74
|
-
default: u(() => [
|
|
75
|
-
s("span", {
|
|
76
|
-
class: B(o.value ? "text-c-1" : "text-c-3")
|
|
77
|
-
}, D(o.value ? o.value.label : "Select Collection"), 3),
|
|
78
|
-
n(i(E), {
|
|
79
|
-
class: "text-c-3",
|
|
80
|
-
icon: "ChevronDown",
|
|
81
|
-
size: "xs"
|
|
82
|
-
})
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
})
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
}, 8, ["modelValue", "options"])
|
|
89
|
-
]),
|
|
90
|
-
n(i(x), {
|
|
91
|
-
class: "max-h-8 text-xs p-0 px-3",
|
|
92
|
-
disabled: !t.value.trim(),
|
|
93
|
-
onClick: f
|
|
94
|
-
}, {
|
|
95
|
-
default: u(() => [
|
|
96
|
-
K(" Create Folder ")
|
|
97
|
-
]),
|
|
98
|
-
_: 1
|
|
99
|
-
}, 8, ["disabled"])
|
|
100
|
-
])
|
|
101
|
-
]));
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
export {
|
|
105
|
-
R as default
|
|
106
|
-
};
|
package/dist/errors.d.ts
DELETED
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGlB,CAAA"}
|
package/dist/errors.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Normalize headers:
|
|
3
|
-
*
|
|
4
|
-
* - Electron modifies the headers to allow CORS, this function hides the modifications
|
|
5
|
-
* - Restores original headers
|
|
6
|
-
* - Normalizes the header keys
|
|
7
|
-
* - Sorts headers alphabetically
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare function normalizeHeaders(headers: Record<string, string>): Record<string, string>;
|
|
11
|
-
//# sourceMappingURL=normalizeHeaders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeHeaders.d.ts","sourceRoot":"","sources":["../../src/libs/normalizeHeaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgDxB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
function l(o) {
|
|
2
|
-
var r, c;
|
|
3
|
-
const e = Object.keys(o).find(
|
|
4
|
-
(t) => t.toLowerCase() === "x-scalar-modified-headers"
|
|
5
|
-
), n = e ? ((c = (r = o[e]) == null ? void 0 : r.toString().split(", ")) == null ? void 0 : c.map((t) => t.toLowerCase())) ?? [] : [];
|
|
6
|
-
return Object.keys(o).forEach((t) => {
|
|
7
|
-
n.includes(t.toLowerCase()) && delete o[t];
|
|
8
|
-
}), e && delete o[e], Object.keys(o).forEach((t) => {
|
|
9
|
-
if (t.toLowerCase().startsWith("x-scalar-original-")) {
|
|
10
|
-
const i = t.replace("X-Scalar-Original-", "");
|
|
11
|
-
o[i] = o[t], delete o[t];
|
|
12
|
-
}
|
|
13
|
-
}), Object.keys(o).forEach((t) => {
|
|
14
|
-
const i = a(t);
|
|
15
|
-
t !== i && (o[i] = o[t], delete o[t]);
|
|
16
|
-
}), Object.fromEntries(
|
|
17
|
-
Object.entries(o).sort(([t], [i]) => t.localeCompare(i))
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function a(o) {
|
|
21
|
-
return o.split("-").map((e) => e.charAt(0).toUpperCase() + e.toLowerCase().slice(1)).join("-");
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
l as normalizeHeaders
|
|
25
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type RequestExample, type RequestExampleParameter } from '@scalar/oas-utils/entities/workspace/spec';
|
|
2
|
-
import type { Path } from '@scalar/object-utils/nested';
|
|
3
|
-
/**
|
|
4
|
-
* Uses the new, and old URL values to update/create/delete path params
|
|
5
|
-
*/
|
|
6
|
-
export declare const syncPathParamsFromURL: <P extends Path<RequestExample>>(newURL?: string, oldURL?: string, pathParams?: RequestExampleParameter[]) => {
|
|
7
|
-
key: P;
|
|
8
|
-
value: string | RequestExampleParameter[];
|
|
9
|
-
} | null;
|
|
10
|
-
//# sourceMappingURL=pathParams.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pathParams.d.ts","sourceRoot":"","sources":["../../src/libs/pathParams.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAA;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,IAAI,CAAC,cAAc,CAAC,WACzD,MAAM,WACN,MAAM,eACH,uBAAuB,EAAE,KACpC;IAAE,GAAG,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,uBAAuB,EAAE,CAAA;CAAE,GAAG,IAmD1D,CAAA"}
|