@scalar/api-client 2.1.52 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +36 -43
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
- package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +20 -19
- package/dist/components/SideNav/SideNav.vue.js +4 -4
- package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +165 -5
- package/dist/components/TopNav/TopNav.vue2.js +2 -164
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- 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 +5 -5
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/useLayout.d.ts +2 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useLayout.js +4 -3
- package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +35 -31
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +673 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -102
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +2 -3
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +127 -123
- package/dist/store/active-entities.d.ts +333 -0
- package/dist/store/active-entities.d.ts.map +1 -0
- package/dist/store/active-entities.js +97 -0
- package/dist/store/collections.d.ts +4 -274
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +0 -54
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.js +4 -3
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +15 -15
- package/dist/store/security-schemes.d.ts +527 -317
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +33 -41
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store-context.d.ts +0 -3
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +640 -5297
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +111 -189
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +14 -24
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind/desktop-variants.d.ts +18 -0
- package/dist/tailwind/desktop-variants.d.ts.map +1 -0
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -13
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +14 -13
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +92 -92
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
- 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 +94 -100
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +17 -16
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -73
- 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 +111 -109
- 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 +15 -16
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +25 -21
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -25
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
- package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +16 -8
- package/dist/views/Request/handle-drag.d.ts +2 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +23 -25
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
- package/dist/views/Request/libs/auth.d.ts +1 -29
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +2 -9
- package/dist/views/Request/libs/index.js +6 -8
- package/dist/views/Request/libs/live-sync.d.ts +6 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +164 -185
- package/dist/views/Request/libs/oauth2.d.ts +6 -10
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -69
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +14 -13
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -17
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
- package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
- package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
- package/package.json +9 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
|
@@ -1,56 +1,54 @@
|
|
|
1
|
-
function
|
|
1
|
+
function I(s, {
|
|
2
2
|
collections: r,
|
|
3
|
-
collectionMutators:
|
|
3
|
+
collectionMutators: o,
|
|
4
|
+
isReadOnly: D,
|
|
4
5
|
tags: l,
|
|
5
|
-
tagMutators:
|
|
6
|
-
|
|
7
|
-
requestHistory: C,
|
|
8
|
-
workspaceMutators: x,
|
|
9
|
-
activeWorkspace: t
|
|
6
|
+
tagMutators: p,
|
|
7
|
+
workspaceMutators: x
|
|
10
8
|
}) {
|
|
11
9
|
function U(n, f) {
|
|
12
|
-
r[n] ?
|
|
10
|
+
r[n] ? o.edit(n, "children", f) : l[n] && p.edit(n, "children", f);
|
|
13
11
|
}
|
|
14
|
-
function
|
|
12
|
+
function v(n, f) {
|
|
15
13
|
if (!n || !f) return;
|
|
16
|
-
const { id: d, parentId: i } = n, { id:
|
|
17
|
-
if (i ? r[i] ?
|
|
14
|
+
const { id: d, parentId: i } = n, { id: t, parentId: u, offset: a } = f;
|
|
15
|
+
if (i ? r[i] ? o.edit(
|
|
18
16
|
i,
|
|
19
17
|
"children",
|
|
20
18
|
r[i].children.filter(
|
|
21
19
|
(e) => e !== d
|
|
22
20
|
)
|
|
23
|
-
) : l[i] &&
|
|
21
|
+
) : l[i] && p.edit(
|
|
24
22
|
i,
|
|
25
23
|
"children",
|
|
26
24
|
l[i].children.filter((e) => e !== d)
|
|
27
25
|
) : x.edit(
|
|
28
|
-
|
|
26
|
+
s.value.uid,
|
|
29
27
|
"collections",
|
|
30
|
-
|
|
28
|
+
s.value.collections.filter((e) => e !== d)
|
|
31
29
|
), a === 2) {
|
|
32
|
-
const e = r[
|
|
33
|
-
U(
|
|
34
|
-
} else if (
|
|
35
|
-
const
|
|
36
|
-
|
|
30
|
+
const e = r[t] || l[t];
|
|
31
|
+
U(t, [...e.children, d]);
|
|
32
|
+
} else if (u) {
|
|
33
|
+
const h = [...(r[u] || l[u]).children], c = h.findIndex((C) => t === C) ?? 0;
|
|
34
|
+
h.splice(c + a, 0, d), U(u, h);
|
|
37
35
|
} else {
|
|
38
|
-
const e = [...
|
|
39
|
-
e.splice(
|
|
40
|
-
|
|
36
|
+
const e = [...s.value.collections], h = e.findIndex((c) => t === c) ?? 0;
|
|
37
|
+
e.splice(h + a, 0, d), x.edit(
|
|
38
|
+
s.value.uid,
|
|
41
39
|
"collections",
|
|
42
40
|
e
|
|
43
41
|
);
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
return {
|
|
47
|
-
handleDragEnd:
|
|
45
|
+
handleDragEnd: v,
|
|
48
46
|
isDroppable: (n, f) => {
|
|
49
47
|
var d, i;
|
|
50
|
-
return !(
|
|
48
|
+
return !(D || !r[n.id] && f.offset !== 2 || r[n.id] && ((i = (d = r[f.id]) == null ? void 0 : d.info) == null ? void 0 : i.title) === "Drafts");
|
|
51
49
|
}
|
|
52
50
|
};
|
|
53
51
|
}
|
|
54
52
|
export {
|
|
55
|
-
|
|
53
|
+
I as dragHandlerFactory
|
|
56
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenApiWatcher.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/hooks/useOpenApiWatcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useOpenApiWatcher.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/hooks/useOpenApiWatcher.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YA2I7B,CAAA"}
|
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { useActiveEntities as E } from "../../../store/active-entities.js";
|
|
2
|
+
import { specDictionary as f } from "../../../store/import-spec.js";
|
|
3
|
+
import { combineRenameDiffs as R, mutateCollectionDiff as S, mutateSecuritySchemeDiff as d, mutateServerDiff as g, mutateTagDiff as D, mutateRequestDiff as T } from "../libs/live-sync.js";
|
|
4
|
+
import { fetchSpecFromUrl as M, createHash as I } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { parseSchema as v } from "@scalar/oas-utils/transforms";
|
|
6
|
+
import { useToasts as U } from "@scalar/use-toasts";
|
|
7
|
+
import { useTimeoutPoll as C } from "@vueuse/core";
|
|
8
|
+
import L from "microdiff";
|
|
9
|
+
import { watch as N } from "vue";
|
|
10
|
+
import { useWorkspace as b } from "../../../store/store.js";
|
|
11
|
+
const P = 5 * 1e3, k = 60 * 1e3, B = () => {
|
|
12
|
+
const { toast: h } = U(), c = E(), o = b(), { activeCollection: t, activeWorkspace: O } = c, { collectionMutators: n } = o, r = (e) => h(
|
|
12
13
|
`[useOpenApiWatcher] Changes to the ${e} were not applied`,
|
|
13
14
|
"error"
|
|
14
|
-
),
|
|
15
|
-
e.path[0] === "info" || e.path[0] === "security" ?
|
|
16
|
-
}, { pause:
|
|
17
|
-
var
|
|
18
|
-
const e = (
|
|
15
|
+
), W = (e) => {
|
|
16
|
+
e.path[0] === "info" || e.path[0] === "security" ? S(e, c, o) || r("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? d(e, c, o) || r("securitySchemes") : e.path[0] === "servers" ? g(e, c, o) || r("servers") : e.path[0] === "tags" ? D(e, c, o) || r("tags") : e.path[0] === "paths" && (T(e, c, o) || r("requests"));
|
|
17
|
+
}, { pause: p, resume: m } = C(async () => {
|
|
18
|
+
var l;
|
|
19
|
+
const e = (l = t.value) == null ? void 0 : l.documentUrl;
|
|
19
20
|
if (!e) return;
|
|
20
|
-
const s =
|
|
21
|
+
const s = f[e];
|
|
21
22
|
try {
|
|
22
|
-
const
|
|
23
|
+
const a = await M(
|
|
23
24
|
e,
|
|
24
|
-
|
|
25
|
+
O.value.proxyUrl,
|
|
25
26
|
!1
|
|
26
|
-
),
|
|
27
|
-
if (
|
|
27
|
+
), u = I(a);
|
|
28
|
+
if (n.edit(
|
|
28
29
|
t.value.uid,
|
|
29
30
|
"watchModeStatus",
|
|
30
31
|
"WATCHING"
|
|
31
32
|
), s != null && s.hash)
|
|
32
|
-
if (s.hash && s.hash !==
|
|
33
|
-
const { schema:
|
|
33
|
+
if (s.hash && s.hash !== u) {
|
|
34
|
+
const { schema: i } = await v(a), w = L(s.schema, i), A = R(w);
|
|
34
35
|
try {
|
|
35
|
-
|
|
36
|
-
hash:
|
|
37
|
-
schema:
|
|
36
|
+
A.forEach(W), f[e] = {
|
|
37
|
+
hash: u,
|
|
38
|
+
schema: i
|
|
38
39
|
};
|
|
39
40
|
} catch (y) {
|
|
40
41
|
console.error("[useOpenApiWatcher] Error:", y);
|
|
41
42
|
}
|
|
42
43
|
} else console.log("[useOpenApiWatcher] No changes detected yet…");
|
|
43
44
|
else {
|
|
44
|
-
const { schema:
|
|
45
|
-
|
|
46
|
-
hash:
|
|
47
|
-
schema:
|
|
45
|
+
const { schema: i } = await v(a);
|
|
46
|
+
i && (f[e] = {
|
|
47
|
+
hash: u,
|
|
48
|
+
schema: i
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
|
-
} catch (
|
|
51
|
-
console.error("[useOpenApiWatcher] Error:",
|
|
51
|
+
} catch (a) {
|
|
52
|
+
console.error("[useOpenApiWatcher] Error:", a), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"), p(), n.edit(
|
|
52
53
|
t.value.uid,
|
|
53
54
|
"watchModeStatus",
|
|
54
55
|
"ERROR"
|
|
55
|
-
),
|
|
56
|
+
), h(
|
|
56
57
|
"[useOpenApiWatcher] Unable to fetch the spec file, paused the watcher for 60 seconds",
|
|
57
58
|
"error"
|
|
58
59
|
), setTimeout(() => {
|
|
59
|
-
console.info("[useOpenApiWatcher] Resuming watcher"),
|
|
60
|
-
},
|
|
60
|
+
console.info("[useOpenApiWatcher] Resuming watcher"), m();
|
|
61
|
+
}, k);
|
|
61
62
|
}
|
|
62
|
-
},
|
|
63
|
-
|
|
63
|
+
}, P);
|
|
64
|
+
N(
|
|
64
65
|
[
|
|
65
66
|
() => {
|
|
66
67
|
var e;
|
|
@@ -72,7 +73,7 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
|
|
|
72
73
|
}
|
|
73
74
|
],
|
|
74
75
|
([e, s]) => {
|
|
75
|
-
e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`),
|
|
76
|
+
e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), m()) : t.value && (p(), n.edit(
|
|
76
77
|
t.value.uid,
|
|
77
78
|
"watchModeStatus",
|
|
78
79
|
"IDLE"
|
|
@@ -82,5 +83,5 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
|
|
|
82
83
|
);
|
|
83
84
|
};
|
|
84
85
|
export {
|
|
85
|
-
|
|
86
|
+
B as useOpenApiWatcher
|
|
86
87
|
};
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Create a new value set for a given scheme type */
|
|
3
|
-
export declare const createSchemeValueSet: (scheme: SecurityScheme) => {
|
|
4
|
-
type: "apiKey";
|
|
5
|
-
value: string;
|
|
6
|
-
name: string;
|
|
7
|
-
} | {
|
|
8
|
-
type: "http";
|
|
9
|
-
username: string;
|
|
10
|
-
password: string;
|
|
11
|
-
token: string;
|
|
12
|
-
} | {
|
|
13
|
-
type: "oauth-implicit";
|
|
14
|
-
token: string;
|
|
15
|
-
} | {
|
|
16
|
-
type: "oauth-password";
|
|
17
|
-
username: string;
|
|
18
|
-
password: string;
|
|
19
|
-
token: string;
|
|
20
|
-
clientSecret: string;
|
|
21
|
-
} | {
|
|
22
|
-
type: "oauth-clientCredentials";
|
|
23
|
-
token: string;
|
|
24
|
-
clientSecret: string;
|
|
25
|
-
} | {
|
|
26
|
-
type: "oauth-authorizationCode";
|
|
27
|
-
token: string;
|
|
28
|
-
clientSecret: string;
|
|
29
|
-
};
|
|
1
|
+
import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
30
2
|
/** Format a scheme object into a display object */
|
|
31
3
|
export declare const displaySchemeFormatter: (s: SecurityScheme) => {
|
|
32
4
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/auth.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE,mDAAmD;AACnD,eAAO,MAAM,sBAAsB,MAAO,cAAc;;;CAKvD,CAAA"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
const o = (e) => {
|
|
3
|
-
const t = e.type === "oauth2" ? `oauth-${e.flow.type}` : e.type;
|
|
4
|
-
return a.parse({
|
|
5
|
-
type: t
|
|
6
|
-
});
|
|
7
|
-
}, p = (e) => ({
|
|
1
|
+
const r = (e) => ({
|
|
8
2
|
id: e.uid,
|
|
9
3
|
label: e.nameKey
|
|
10
4
|
});
|
|
11
5
|
export {
|
|
12
|
-
|
|
13
|
-
p as displaySchemeFormatter
|
|
6
|
+
r as displaySchemeFormatter
|
|
14
7
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { authorizeOauth2 as
|
|
1
|
+
import { displaySchemeFormatter as o } from "./auth.js";
|
|
2
|
+
import { authorizeOauth2 as a, authorizeServers as h, generateCodeChallenge as m } from "./oauth2.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
l as generateCodeChallenge,
|
|
9
|
-
u as isOauth2Example
|
|
4
|
+
a as authorizeOauth2,
|
|
5
|
+
h as authorizeServers,
|
|
6
|
+
o as displaySchemeFormatter,
|
|
7
|
+
m as generateCodeChallenge
|
|
10
8
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceStore } from '../../../store/index.js';
|
|
2
|
+
import type { ActiveEntitiesStore } from '../../../store/active-entities.js';
|
|
2
3
|
import { type Path, type PathValue } from '@scalar/object-utils/nested';
|
|
3
4
|
import { type Difference } from 'microdiff';
|
|
4
5
|
import { type ZodSchema, type ZodTypeDef } from 'zod';
|
|
@@ -37,15 +38,15 @@ export declare const parseDiff: <T>(schema: ZodSchema<T, ZodTypeDef, any>, diff:
|
|
|
37
38
|
*
|
|
38
39
|
* @returns true if it succeeds, and false for a failure
|
|
39
40
|
*/
|
|
40
|
-
export declare const mutateCollectionDiff: (diff: Difference, { activeCollection, collectionMutators }: WorkspaceStore) => boolean;
|
|
41
|
+
export declare const mutateCollectionDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { collectionMutators }: WorkspaceStore) => boolean;
|
|
41
42
|
/**
|
|
42
43
|
* Generates an array of payloads for the request mutator from the request diff, also executes the mutation
|
|
43
44
|
*/
|
|
44
|
-
export declare const mutateRequestDiff: (diff: Difference, store: WorkspaceStore) => boolean;
|
|
45
|
+
export declare const mutateRequestDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, store: WorkspaceStore) => boolean;
|
|
45
46
|
/** Generates a payload for the server mutator from the server diff including the mutator method */
|
|
46
|
-
export declare const mutateServerDiff: (diff: Difference, { activeCollection, servers, serverMutators }: WorkspaceStore) => boolean;
|
|
47
|
+
export declare const mutateServerDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { servers, serverMutators }: WorkspaceStore) => boolean;
|
|
47
48
|
/** Generates a payload for the tag mutator from the tag diff */
|
|
48
|
-
export declare const mutateTagDiff: (diff: Difference, { activeCollection, tags, tagMutators }: WorkspaceStore) => boolean;
|
|
49
|
+
export declare const mutateTagDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { tags, tagMutators }: WorkspaceStore) => boolean;
|
|
49
50
|
/** Narrows down a zod union schema */
|
|
50
51
|
export declare const narrowUnionSchema: (schema: ZodSchema, key: string, value: string) => ZodSchema | null;
|
|
51
52
|
/**
|
|
@@ -55,5 +56,5 @@ export declare const narrowUnionSchema: (schema: ZodSchema, key: string, value:
|
|
|
55
56
|
*
|
|
56
57
|
* @returns true if it succeeds, and false for a failure
|
|
57
58
|
*/
|
|
58
|
-
export declare const mutateSecuritySchemeDiff: (diff: Difference, { activeCollection, securitySchemes, securitySchemeMutators }: WorkspaceStore) => boolean;
|
|
59
|
+
export declare const mutateSecuritySchemeDiff: (diff: Difference, { activeCollection }: ActiveEntitiesStore, { securitySchemes, securitySchemeMutators }: WorkspaceStore) => boolean;
|
|
59
60
|
//# sourceMappingURL=live-sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAelE,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,6BAA6B,CAAA;AAEpC,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAK,MAAM,KAAK,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,EAAE,eACN,MAAM,EAAE,KACnB,UAAU,EAqFZ,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,YAAY,GAAI,CAAC,OACvB,MAAM,EAAE,aACF,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,aACjB,CAAC,QAAQ,EAAE,CAAC,KAAK,OAAO,KAClC,CAAC,GAAG,IAMN,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WACpB,SAAS,QACX,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KACxB,SAAS,GAAG,IAqDd,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,UACjB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,QAC/B,UAAU,KACf;IACD,0DAA0D;IAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACb,mGAAmG;IACnG,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACrB,2DAA2D;IAC3D,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;CACzC,GAAG,IAwBH,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,wBACM,mBAAmB,0BACjB,cAAc,KACrC,OA0CF,CAAA;AAwBD;;GAEG;AACH,eAAO,MAAM,iBAAiB,SACtB,UAAU,wBACM,mBAAmB,SAClC,cAAc,KACpB,OAwIF,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,SACrB,UAAU,wBACM,mBAAmB,+BACZ,cAAc,KAC1C,OAoCF,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,SAClB,UAAU,wBACM,mBAAmB,yBAClB,cAAc,KACpC,OA+BF,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,WACpB,SAAS,OACZ,MAAM,SACJ,MAAM,KACZ,SAAS,GAAG,IAmBd,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,wBACM,mBAAmB,+CACI,cAAc,KAC1D,OA0CF,CAAA"}
|