@scalar/api-client 2.3.30 → 2.3.32
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 +36 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +3 -3
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +4 -4
- package/dist/components/CommandPalette/CommandActionForm.vue.js +2 -2
- package/dist/components/CommandPalette/CommandActionInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +6 -6
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +5 -5
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +7 -7
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +7 -7
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +6 -6
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +5 -5
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +2 -2
- package/dist/components/DataTable/DataTable.vue.js +5 -5
- package/dist/components/DataTable/DataTableCell.vue.js +2 -2
- package/dist/components/DataTable/DataTableCheckbox.vue.js +2 -2
- package/dist/components/DataTable/DataTableHeader.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +9 -9
- package/dist/components/DataTable/DataTableInputSelect.vue.js +5 -5
- package/dist/components/DataTable/DataTableRow.vue.js +2 -2
- package/dist/components/DataTable/DataTableText.vue.js +2 -2
- package/dist/components/DataTable/index.js +14 -14
- package/dist/components/EmptyState.vue2.js +2 -2
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +12 -12
- package/dist/components/Form/Form.vue.js +4 -4
- package/dist/components/Form/LabelInput.vue2.js +4 -4
- package/dist/components/HelpfulLink.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +3 -3
- package/dist/components/IconSelector.vue.js +5 -5
- package/dist/components/ImportCollection/DropEventListener.vue.js +3 -3
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +3 -3
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +2 -2
- package/dist/components/ImportCollection/PrefetchError.vue.js +4 -4
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +10 -10
- package/dist/components/OpenApiClientButton.vue2.js +4 -4
- package/dist/components/ScalarAsciiArt.vue2.js +3 -3
- package/dist/components/ScalarHotkey.vue.js +2 -2
- package/dist/components/SectionFilter.vue2.js +1 -1
- package/dist/components/SectionFilterButton.vue.js +2 -2
- package/dist/components/Server/ServerDropdown.vue.js +21 -21
- package/dist/components/Server/ServerDropdownItem.vue2.js +4 -4
- package/dist/components/Server/ServerSelector.vue.js +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +4 -4
- package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +2 -2
- package/dist/components/Server/index.js +6 -6
- package/dist/components/SideNav/DownloadAppButton.vue2.js +5 -5
- package/dist/components/SideNav/SideHelp.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue.js +5 -5
- package/dist/components/SideNav/SideNavGroup.vue.js +2 -2
- package/dist/components/SideNav/SideNavLink.vue.js +4 -4
- package/dist/components/SideNav/SideNavRouterLink.vue.js +2 -2
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +4 -4
- package/dist/components/Sidebar/SidebarButton.vue.js +3 -3
- package/dist/components/Sidebar/SidebarList.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +9 -9
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +20 -20
- package/dist/components/ViewLayout/ViewLayout.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
- package/dist/hooks/useClientConfig.d.ts +3 -3
- package/dist/layouts/App/ApiClientApp.vue.js +10 -10
- package/dist/layouts/App/MainLayout.vue.js +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/index.js +5 -4
- package/dist/layouts/Modal/ApiClientModal.vue2.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +2 -2
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/router.js +4 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/store/import-spec.js +3 -3
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/store.d.ts +2 -2
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +37 -42
- package/dist/store/workspace.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue2.js +2 -2
- package/dist/views/Collection/CollectionAuthentication.vue2.js +5 -5
- package/dist/views/Collection/CollectionCookies.vue2.js +2 -2
- package/dist/views/Collection/CollectionEnvironment.vue2.js +2 -2
- package/dist/views/Collection/CollectionInfoForm.vue2.js +2 -2
- package/dist/views/Collection/CollectionNavigation.vue.js +1 -1
- package/dist/views/Collection/CollectionOverview.vue2.js +3 -3
- package/dist/views/Collection/CollectionScripts.vue2.js +2 -2
- package/dist/views/Collection/CollectionServerForm.vue.js +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +3 -3
- package/dist/views/Collection/CollectionSettings.vue2.js +4 -4
- package/dist/views/Collection/CollectionSync.vue2.js +2 -2
- package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +16 -14
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +3 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +74 -31
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +3 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +8 -6
- package/dist/views/Components/CodeSnippet/index.js +8 -8
- package/dist/views/Cookies/CookieForm.vue.js +2 -2
- package/dist/views/Cookies/CookieModal.vue2.js +2 -2
- package/dist/views/Cookies/Cookies.vue2.js +6 -6
- package/dist/views/Environment/Environment.vue2.js +7 -7
- package/dist/views/Environment/EnvironmentColorModal.vue.js +2 -2
- package/dist/views/Environment/EnvironmentColors.vue.js +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +7 -7
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +10 -10
- package/dist/views/Request/Request.vue2.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +10 -10
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +11 -11
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +56 -61
- package/dist/views/Request/RequestSection/RequestParams.vue.js +13 -13
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +5 -5
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +23 -22
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +7 -7
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +9 -9
- package/dist/views/Request/RequestSidebar.vue2.js +25 -25
- package/dist/views/Request/RequestSidebarItem.vue2.js +25 -25
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +5 -5
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +5 -5
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +6 -6
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +15 -15
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +5 -5
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +1 -0
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +3 -3
- package/dist/views/Settings/SettingsGeneral.vue.js +1 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.js +10 -10
- package/dist/views/Settings/components/SettingsSection.vue.js +4 -4
- package/package.json +19 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as c, ref as n, computed as l, watch as p,
|
|
1
|
+
import { defineComponent as c, ref as n, computed as l, watch as p, createBlock as _, openBlock as d, withCtx as s, createVNode as r, createElementVNode as h, unref as x } from "vue";
|
|
2
2
|
import { useScroll as v } from "@vueuse/core";
|
|
3
3
|
import { useRouter as w, RouterView as k } from "vue-router";
|
|
4
4
|
import y from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
@@ -25,7 +25,7 @@ const V = { class: "w-full md:mx-auto md:max-w-[720px]" }, g = /* @__PURE__ */ c
|
|
|
25
25
|
{
|
|
26
26
|
immediate: !0
|
|
27
27
|
}
|
|
28
|
-
), (t, e) => (
|
|
28
|
+
), (t, e) => (d(), _(y, {
|
|
29
29
|
ref_key: "el",
|
|
30
30
|
ref: o,
|
|
31
31
|
class: "h-fit overflow-auto pb-6 xl:overflow-auto"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v,
|
|
1
|
+
import { defineComponent as v, createElementBlock as h, openBlock as r, createElementVNode as o, createBlock as x, createCommentVNode as y, createVNode as S, unref as e, normalizeClass as b } from "vue";
|
|
2
2
|
import { ScalarToggle as C } from "@scalar/components";
|
|
3
3
|
import { useActiveEntities as _ } from "../../store/active-entities.js";
|
|
4
4
|
import { useWorkspace as V } from "../../store/store.js";
|
|
@@ -29,15 +29,15 @@ const k = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, w = { cla
|
|
|
29
29
|
], -1)),
|
|
30
30
|
o("div", A, [
|
|
31
31
|
l[0] || (l[0] = o("p", { class: "text-c-2 flex flex-1 text-balance" }, " Don’t want to set up the authentication for each request? Enable this option to set the authentication once for the whole collection. ", -1)),
|
|
32
|
-
|
|
32
|
+
S(e(C), {
|
|
33
33
|
class: "w-4",
|
|
34
34
|
modelValue: ((n = e(t)) == null ? void 0 : n.useCollectionSecurity) ?? !1,
|
|
35
35
|
"onUpdate:modelValue": f
|
|
36
36
|
}, null, 8, ["modelValue"])
|
|
37
37
|
]),
|
|
38
|
-
e(t) && e(i) ? (r(),
|
|
38
|
+
e(t) && e(i) ? (r(), x(e(g), {
|
|
39
39
|
key: 0,
|
|
40
|
-
class:
|
|
40
|
+
class: b([
|
|
41
41
|
"scalar-collection-auth",
|
|
42
42
|
!((s = e(t)) != null && s.useCollectionSecurity) && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
43
43
|
]),
|
|
@@ -49,7 +49,7 @@ const k = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, w = { cla
|
|
|
49
49
|
server: e(d),
|
|
50
50
|
title: "Authentication",
|
|
51
51
|
workspace: e(i)
|
|
52
|
-
}, null, 8, ["class", "collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) :
|
|
52
|
+
}, null, 8, ["class", "collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : y("", !0)
|
|
53
53
|
])
|
|
54
54
|
]);
|
|
55
55
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as o,
|
|
1
|
+
import { defineComponent as o, createBlock as t, openBlock as n, withCtx as r, createTextVNode as i } from "vue";
|
|
2
2
|
import _ from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
3
3
|
const c = /* @__PURE__ */ o({
|
|
4
4
|
__name: "CollectionCookies",
|
|
5
5
|
setup(l) {
|
|
6
|
-
return (m, e) => (
|
|
6
|
+
return (m, e) => (n(), t(_, null, {
|
|
7
7
|
title: r(() => e[0] || (e[0] = [
|
|
8
8
|
i("Cookies")
|
|
9
9
|
])),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
1
|
+
import { defineComponent as e, createBlock as n, openBlock as o, withCtx as r, createTextVNode as i } from "vue";
|
|
2
2
|
import m from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
3
3
|
const s = /* @__PURE__ */ e({
|
|
4
4
|
__name: "CollectionEnvironment",
|
|
5
5
|
setup(_) {
|
|
6
|
-
return (l, t) => (
|
|
6
|
+
return (l, t) => (o(), n(m, null, {
|
|
7
7
|
title: r(() => t[0] || (t[0] = [
|
|
8
8
|
i("Environments")
|
|
9
9
|
])),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as p,
|
|
1
|
+
import { defineComponent as b, computed as p, createElementBlock as v, openBlock as h, createVNode as a, createElementVNode as V, withCtx as c, unref as f } from "vue";
|
|
2
2
|
import { ScalarButton as w } from "@scalar/components";
|
|
3
3
|
import { LibraryIcon as I } from "@scalar/icons/library";
|
|
4
4
|
import g from "../../components/Form/LabelInput.vue.js";
|
|
@@ -27,7 +27,7 @@ const N = ["aria-label"], U = { class: "ml-1.25 group relative" }, S = /* @__PUR
|
|
|
27
27
|
version: (m = (d = e == null ? void 0 : e.value) == null ? void 0 : d.info) == null ? void 0 : m.version
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
|
-
return (t, r) => (
|
|
30
|
+
return (t, r) => (h(), v("div", {
|
|
31
31
|
"aria-label": `Collection: ${u.value.title}`,
|
|
32
32
|
class: "mx-auto flex h-fit w-full flex-col gap-2 pb-3 pt-6 md:mx-auto md:max-w-[720px]"
|
|
33
33
|
}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as k,
|
|
1
|
+
import { defineComponent as b, computed as k, createElementBlock as a, openBlock as r, createVNode as x, createElementVNode as n, normalizeClass as c, createCommentVNode as _, unref as t, toDisplayString as h, Fragment as g, renderList as C, createBlock as N, withCtx as S } from "vue";
|
|
2
2
|
import { LibraryIcon as B } from "@scalar/icons/library";
|
|
3
3
|
import { useRouter as z, RouterLink as E } from "vue-router";
|
|
4
4
|
import { PathId as m } from "../../routes.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as u,
|
|
1
|
+
import { defineComponent as u, createBlock as c, openBlock as l, withCtx as v, createCommentVNode as d, unref as e } from "vue";
|
|
2
2
|
import f from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
3
3
|
import { useActiveEntities as _ } from "../../store/active-entities.js";
|
|
4
4
|
import k from "./components/MarkdownInput.vue.js";
|
|
@@ -14,11 +14,11 @@ const M = /* @__PURE__ */ u({
|
|
|
14
14
|
} = _(), { collectionMutators: m } = V(), p = (i) => {
|
|
15
15
|
o.value && m.edit(o.value.uid, "info.description", i);
|
|
16
16
|
};
|
|
17
|
-
return (i, w) => (
|
|
17
|
+
return (i, w) => (l(), c(f, null, {
|
|
18
18
|
default: v(() => {
|
|
19
19
|
var r, a;
|
|
20
20
|
return [
|
|
21
|
-
e(t) && e(n) ? (
|
|
21
|
+
e(t) && e(n) ? (l(), c(k, {
|
|
22
22
|
key: 0,
|
|
23
23
|
envVariables: e(s),
|
|
24
24
|
environment: e(t),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
1
|
+
import { defineComponent as e, createBlock as o, openBlock as r, withCtx as n, createTextVNode as i } from "vue";
|
|
2
2
|
import p from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
3
3
|
const s = /* @__PURE__ */ e({
|
|
4
4
|
__name: "CollectionScripts",
|
|
5
5
|
setup(c) {
|
|
6
|
-
return (_, t) => (
|
|
6
|
+
return (_, t) => (r(), o(p, null, {
|
|
7
7
|
title: n(() => t[0] || (t[0] = [
|
|
8
8
|
i("Scripts")
|
|
9
9
|
])),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, computed as u, watch as h,
|
|
1
|
+
import { defineComponent as _, computed as u, watch as h, createElementBlock as c, openBlock as o, normalizeClass as k, createCommentVNode as n, Fragment as x, createVNode as y, createBlock as U } from "vue";
|
|
2
2
|
import { REGEX as E } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import g from "../../components/Form/Form.vue.js";
|
|
4
4
|
import C from "../../components/Server/ServerVariablesForm.vue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as y, ref as C, computed as w,
|
|
1
|
+
import { defineComponent as y, ref as C, computed as w, createElementBlock as u, openBlock as o, createElementVNode as c, createVNode as n, createStaticVNode as A, Fragment as M, renderList as N, createBlock as m, createCommentVNode as D, unref as e, toDisplayString as I, withCtx as f } from "vue";
|
|
2
2
|
import { useModal as $, ScalarMarkdown as j, ScalarButton as p, ScalarIcon as z, ScalarModal as B } from "@scalar/components";
|
|
3
3
|
import { ScalarIconTrash as U } from "@scalar/icons";
|
|
4
4
|
import V from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
@@ -41,7 +41,7 @@ const T = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, F = { cla
|
|
|
41
41
|
key: 0,
|
|
42
42
|
value: r.description,
|
|
43
43
|
class: "self-center"
|
|
44
|
-
}, null, 8, ["value"])) : (o(), u("span", W, "Server " +
|
|
44
|
+
}, null, 8, ["value"])) : (o(), u("span", W, "Server " + I(k + 1), 1)),
|
|
45
45
|
n(e(p), {
|
|
46
46
|
class: "hover:bg-b-3 hover:text-c-1 p-1.25 h-fit",
|
|
47
47
|
variant: "ghost",
|
|
@@ -57,7 +57,7 @@ const T = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, F = { cla
|
|
|
57
57
|
key: 0,
|
|
58
58
|
collectionId: e(l).uid,
|
|
59
59
|
serverUid: r.uid
|
|
60
|
-
}, null, 8, ["collectionId", "serverUid"])) :
|
|
60
|
+
}, null, 8, ["collectionId", "serverUid"])) : D("", !0)
|
|
61
61
|
])
|
|
62
62
|
]))), 128)),
|
|
63
63
|
c("div", Y, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as D,
|
|
1
|
+
import { defineComponent as D, createElementBlock as d, openBlock as c, Fragment as u, createElementVNode as t, createVNode as s, unref as l, createTextVNode as b, toDisplayString as N, withCtx as w } from "vue";
|
|
2
2
|
import { useModal as S, ScalarToggle as W, ScalarIcon as _, ScalarButton as T, ScalarModal as V } from "@scalar/components";
|
|
3
3
|
import { useRouter as A } from "vue-router";
|
|
4
4
|
import B from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
@@ -32,7 +32,7 @@ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { cla
|
|
|
32
32
|
}
|
|
33
33
|
return (n, e) => {
|
|
34
34
|
var f, p, v, x, g;
|
|
35
|
-
return
|
|
35
|
+
return c(), d(u, null, [
|
|
36
36
|
t("div", $, [
|
|
37
37
|
t("div", L, [
|
|
38
38
|
e[5] || (e[5] = t("div", { class: "flex h-8 items-center" }, [
|
|
@@ -53,7 +53,7 @@ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { cla
|
|
|
53
53
|
]),
|
|
54
54
|
t("div", R, [
|
|
55
55
|
t("div", j, [
|
|
56
|
-
(v = l(o)) != null && v.documentUrl ? (
|
|
56
|
+
(v = l(o)) != null && v.documentUrl ? (c(), d(u, { key: 0 }, [
|
|
57
57
|
e[3] || (e[3] = t("span", { class: "bg-b-2 sticky left-0 pl-3 pr-2" }, "Source", -1)),
|
|
58
58
|
t("a", {
|
|
59
59
|
class: "text-c-2 group rounded pr-3 no-underline hover:underline",
|
|
@@ -66,7 +66,7 @@ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { cla
|
|
|
66
66
|
icon: "ExternalLink"
|
|
67
67
|
})
|
|
68
68
|
], 8, z)
|
|
69
|
-
], 64)) : (
|
|
69
|
+
], 64)) : (c(), d(u, { key: 1 }, [
|
|
70
70
|
s(l(_), {
|
|
71
71
|
class: "text-c-2 ml-3 mr-2 w-4",
|
|
72
72
|
icon: "NotAllowed",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
1
|
+
import { defineComponent as e, createBlock as o, openBlock as n, withCtx as r, createTextVNode as c } from "vue";
|
|
2
2
|
import _ from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
3
3
|
const a = /* @__PURE__ */ e({
|
|
4
4
|
__name: "CollectionSync",
|
|
5
5
|
setup(i) {
|
|
6
|
-
return (l, t) => (
|
|
6
|
+
return (l, t) => (n(), o(_, null, {
|
|
7
7
|
title: r(() => t[0] || (t[0] = [
|
|
8
8
|
c("Sync")
|
|
9
9
|
])),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as p, watch as w, nextTick as x,
|
|
1
|
+
import { defineComponent as g, ref as p, watch as w, nextTick as x, createElementBlock as i, openBlock as o, createElementVNode as n, createBlock as u, createCommentVNode as a, unref as s, withCtx as v, createVNode as d, Fragment as f } from "vue";
|
|
2
2
|
import { ScalarButton as c, ScalarIcon as b, ScalarMarkdown as h } from "@scalar/components";
|
|
3
3
|
import y from "../../../components/CodeInput/CodeInput.vue.js";
|
|
4
4
|
const z = { class: "flex h-full w-full flex-col gap-2 pt-8" }, C = { class: "flex min-h-8 items-center justify-between gap-2 pl-1.5" }, I = { class: "has-[:focus-visible]:bg-b-1 z-1 group relative flex flex-col rounded-lg" }, B = { class: "flex h-full min-h-[calc(1rem*4)] flex-col" }, $ = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Operation, RequestExample, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { ClientId, TargetId } from '@scalar/snippetz';
|
|
3
|
+
import type { EnvVariables } from '../../../libs/env-helpers';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
target: TargetId;
|
|
5
6
|
client: ClientId<TargetId>;
|
|
@@ -7,6 +8,7 @@ type __VLS_Props = {
|
|
|
7
8
|
server?: Server | undefined;
|
|
8
9
|
example?: RequestExample | undefined;
|
|
9
10
|
securitySchemes?: SecurityScheme[];
|
|
11
|
+
environment?: EnvVariables | undefined;
|
|
10
12
|
};
|
|
11
13
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Components/CodeSnippet/CodeSnippet.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Components/CodeSnippet/CodeSnippet.vue"],"names":[],"mappings":"AAgGA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKtD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,CAAC;;AAmIF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as u, computed as
|
|
2
|
-
import { ScalarCodeBlock as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import { getSnippet as
|
|
1
|
+
import { defineComponent as u, computed as a, createElementBlock as c, createBlock as s, createCommentVNode as d, openBlock as l, toDisplayString as m, unref as f } from "vue";
|
|
2
|
+
import { ScalarCodeBlock as p } from "@scalar/components";
|
|
3
|
+
import { isDefined as v } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { getSnippet as y } from "./helpers/get-snippet.js";
|
|
5
5
|
const g = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "text-c-3 flex min-h-16 items-center justify-center px-4 text-sm"
|
|
@@ -13,32 +13,34 @@ const g = {
|
|
|
13
13
|
operation: {},
|
|
14
14
|
server: {},
|
|
15
15
|
example: {},
|
|
16
|
-
securitySchemes: { default: () => [] }
|
|
16
|
+
securitySchemes: { default: () => [] },
|
|
17
|
+
environment: {}
|
|
17
18
|
},
|
|
18
19
|
setup(t) {
|
|
19
|
-
const i =
|
|
20
|
+
const i = a(
|
|
20
21
|
() => t.securitySchemes.flatMap((e) => e.type === "apiKey" ? e.value : (e == null ? void 0 : e.type) === "http" ? [
|
|
21
22
|
e.token,
|
|
22
23
|
e.password,
|
|
23
24
|
btoa(`${e.username}:${e.password}`)
|
|
24
|
-
] : e.type === "oauth2" ? Object.values(e.flows).map((r) => r == null ? void 0 : r.token).filter(
|
|
25
|
-
),
|
|
26
|
-
const [e, r] =
|
|
25
|
+
] : e.type === "oauth2" ? Object.values(e.flows).map((r) => r == null ? void 0 : r.token).filter(v) : [])
|
|
26
|
+
), n = a(() => {
|
|
27
|
+
const [e, r] = y(t.target, t.client, {
|
|
27
28
|
operation: t.operation,
|
|
28
29
|
example: t.example,
|
|
29
30
|
server: t.server,
|
|
30
|
-
securitySchemes: t.securitySchemes
|
|
31
|
+
securitySchemes: t.securitySchemes,
|
|
32
|
+
environment: t.environment
|
|
31
33
|
});
|
|
32
34
|
return { error: e, payload: r };
|
|
33
|
-
}), o =
|
|
34
|
-
return (e, r) =>
|
|
35
|
+
}), o = a(() => t.target === "shell" && t.client === "curl" ? "curl" : t.target ?? "plaintext");
|
|
36
|
+
return (e, r) => n.value.error ? (l(), c("div", g, m(n.value.error.message), 1)) : n.value.payload ? (l(), s(f(p), {
|
|
35
37
|
key: 1,
|
|
36
38
|
class: "w-full",
|
|
37
|
-
content:
|
|
39
|
+
content: n.value.payload,
|
|
38
40
|
hideCredentials: i.value,
|
|
39
41
|
lang: o.value,
|
|
40
42
|
lineNumbers: ""
|
|
41
|
-
}, null, 8, ["content", "hideCredentials", "lang"])) :
|
|
43
|
+
}, null, 8, ["content", "hideCredentials", "lang"])) : d("", !0);
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
export {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { Operation, RequestExample, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { HarRequest } from '@scalar/snippetz';
|
|
3
|
+
import type { EnvVariables } from '../../../../libs/env-helpers';
|
|
3
4
|
/**
|
|
4
5
|
* Creates a snippetz-compatible HarRequest from OpenAPI-like store entities
|
|
5
6
|
*/
|
|
6
|
-
export declare const getHarRequest: ({ operation, example, server, securitySchemes, }: {
|
|
7
|
+
export declare const getHarRequest: ({ operation, example, server, securitySchemes, environment, }: {
|
|
7
8
|
operation?: Operation | undefined;
|
|
8
9
|
example?: RequestExample | undefined;
|
|
9
10
|
server?: Server | undefined;
|
|
10
11
|
securitySchemes?: SecurityScheme[];
|
|
12
|
+
environment?: EnvVariables | undefined;
|
|
11
13
|
}) => HarRequest;
|
|
12
14
|
//# sourceMappingURL=get-har-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-har-request.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-har-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-har-request.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-har-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMtD;;GAEG;AACH,eAAO,MAAM,aAAa,kEAMvB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,KAAG,UA0GH,CAAA"}
|
|
@@ -1,43 +1,86 @@
|
|
|
1
|
-
import { buildRequestSecurity as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { buildRequestSecurity as V } from "../../../../libs/send-request/build-request-security.js";
|
|
2
|
+
import { replaceTemplateVariables as A } from "../../../../libs/string-template.js";
|
|
3
|
+
import { REGEX as s } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { convertToHarRequest as L } from "./convert-to-har-request.js";
|
|
5
|
+
const v = "YOUR_SECRET_TOKEN", g = ({
|
|
6
|
+
operation: e,
|
|
7
|
+
example: u,
|
|
8
|
+
server: r,
|
|
9
|
+
securitySchemes: i = [],
|
|
10
|
+
environment: E
|
|
8
11
|
}) => {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const n = E && Array.isArray(E) ? Object.fromEntries(E.map((t) => [t.key, t.value])) : E || {}, T = (() => {
|
|
13
|
+
if (r != null && r.url && (s.VARIABLES.test(r.url) || s.PATH.test(r.url))) {
|
|
14
|
+
const t = Object.entries((r == null ? void 0 : r.variables) || {}).reduce(
|
|
15
|
+
(a, [d, l]) => {
|
|
16
|
+
var o, R;
|
|
17
|
+
const c = (R = (o = u == null ? void 0 : u.parameters) == null ? void 0 : o.path.find((b) => b.enabled && b.key === d)) == null ? void 0 : R.value;
|
|
18
|
+
return c ? a[d] = A(c, n) : l.default && (a[d] = A(l.default, n)), a;
|
|
19
|
+
},
|
|
20
|
+
{}
|
|
21
|
+
);
|
|
22
|
+
return A(A(r.url, n), t);
|
|
23
|
+
}
|
|
24
|
+
return r == null ? void 0 : r.url;
|
|
25
|
+
})(), P = (() => {
|
|
26
|
+
var a;
|
|
27
|
+
const t = (e == null ? void 0 : e.path) ?? "/";
|
|
28
|
+
if (t && (s.VARIABLES.test(t) || s.PATH.test(t))) {
|
|
29
|
+
const d = (((a = u == null ? void 0 : u.parameters) == null ? void 0 : a.path) ?? []).reduce((l, c) => (c.enabled && (l[c.key] = A(c.value, n)), l), {});
|
|
30
|
+
return A(A(t, n), d);
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
33
|
+
})(), f = V(i, n, v), y = [
|
|
34
|
+
...((u == null ? void 0 : u.parameters.headers) ?? []).map((t) => ({
|
|
35
|
+
...t,
|
|
36
|
+
value: s.VARIABLES.test(t.value) || s.PATH.test(t.value) ? A(t.value, n) : t.value
|
|
37
|
+
})) ?? [],
|
|
38
|
+
...Object.entries(f.headers).map(([t, a]) => ({
|
|
39
|
+
key: t,
|
|
40
|
+
value: a,
|
|
14
41
|
enabled: !0
|
|
15
42
|
}))
|
|
16
|
-
],
|
|
17
|
-
...(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
43
|
+
], S = [
|
|
44
|
+
...((u == null ? void 0 : u.parameters.cookies) ?? []).map((t) => ({
|
|
45
|
+
...t,
|
|
46
|
+
value: s.VARIABLES.test(t.value) || s.PATH.test(t.value) ? A(t.value, n) : t.value
|
|
47
|
+
})) ?? [],
|
|
48
|
+
...f.cookies.map((t) => ({
|
|
49
|
+
key: t.name,
|
|
50
|
+
value: t.value,
|
|
21
51
|
enabled: !0
|
|
22
52
|
}))
|
|
23
|
-
],
|
|
24
|
-
...(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
53
|
+
], h = [
|
|
54
|
+
...((u == null ? void 0 : u.parameters.query) ?? []).map((t) => ({
|
|
55
|
+
...t,
|
|
56
|
+
value: s.VARIABLES.test(t.value) || s.PATH.test(t.value) ? A(t.value, n) : t.value
|
|
57
|
+
})) ?? [],
|
|
58
|
+
...Array.from(f.urlParams.entries()).map(([t, a]) => ({
|
|
59
|
+
key: t,
|
|
60
|
+
value: a,
|
|
28
61
|
enabled: !0
|
|
29
62
|
}))
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
63
|
+
], H = (() => {
|
|
64
|
+
var a;
|
|
65
|
+
const t = u == null ? void 0 : u.body;
|
|
66
|
+
return (a = t == null ? void 0 : t.raw) != null && a.value && (s.VARIABLES.test(t.raw.value) || s.PATH.test(t.raw.value)) ? {
|
|
67
|
+
...t,
|
|
68
|
+
raw: {
|
|
69
|
+
...t.raw,
|
|
70
|
+
value: A(t.raw.value, n)
|
|
71
|
+
}
|
|
72
|
+
} : t;
|
|
73
|
+
})();
|
|
74
|
+
return L({
|
|
75
|
+
baseUrl: T,
|
|
76
|
+
method: (e == null ? void 0 : e.method) ?? "get",
|
|
77
|
+
path: P,
|
|
78
|
+
body: H,
|
|
79
|
+
cookies: S,
|
|
37
80
|
headers: y,
|
|
38
|
-
query:
|
|
81
|
+
query: h
|
|
39
82
|
});
|
|
40
83
|
};
|
|
41
84
|
export {
|
|
42
|
-
|
|
85
|
+
g as getHarRequest
|
|
43
86
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { ErrorResponse } from '../../../../libs/errors';
|
|
2
2
|
import type { Operation, RequestExample, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
|
|
3
3
|
import { type ClientId, type TargetId } from '@scalar/snippetz';
|
|
4
|
+
import type { EnvVariables } from '../../../../libs/env-helpers';
|
|
4
5
|
/**
|
|
5
6
|
* Returns a code example for given operation
|
|
6
7
|
*/
|
|
7
|
-
export declare const getSnippet: <T extends TargetId>(target: T | "javascript", client: ClientId<T>, { operation, example, server, securitySchemes, }: {
|
|
8
|
+
export declare const getSnippet: <T extends TargetId>(target: T | "javascript", client: ClientId<T>, { operation, example, server, securitySchemes, environment, }: {
|
|
8
9
|
operation?: Operation | undefined;
|
|
9
10
|
example?: RequestExample | undefined;
|
|
10
11
|
server?: Server | undefined;
|
|
11
12
|
securitySchemes?: SecurityScheme[];
|
|
13
|
+
environment?: EnvVariables | undefined;
|
|
12
14
|
}) => ErrorResponse<string>;
|
|
13
15
|
//# sourceMappingURL=get-snippet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAOtD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,iEAOhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,KACA,aAAa,CAAC,MAAM,CAkDtB,CAAA"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { snippetz as a } from "@scalar/snippetz";
|
|
2
|
-
import { getHarRequest as
|
|
3
|
-
const s = "ws://replace.me",
|
|
2
|
+
import { getHarRequest as d } from "./get-har-request.js";
|
|
3
|
+
const s = "ws://replace.me", f = (i, t, {
|
|
4
4
|
operation: l,
|
|
5
5
|
example: u,
|
|
6
6
|
server: c,
|
|
7
|
-
securitySchemes: g = []
|
|
7
|
+
securitySchemes: g = [],
|
|
8
|
+
environment: E
|
|
8
9
|
}) => {
|
|
9
10
|
var n;
|
|
10
11
|
try {
|
|
11
|
-
const r =
|
|
12
|
+
const r = d({
|
|
12
13
|
operation: l,
|
|
13
14
|
example: u,
|
|
14
15
|
server: c,
|
|
15
|
-
securitySchemes: g
|
|
16
|
+
securitySchemes: g,
|
|
17
|
+
environment: E
|
|
16
18
|
});
|
|
17
19
|
if (!r.url)
|
|
18
20
|
return [new Error("Please enter a URL to see a code snippet"), null];
|
|
@@ -39,5 +41,5 @@ const s = "ws://replace.me", S = (i, t, {
|
|
|
39
41
|
return [new Error("No snippet found"), null];
|
|
40
42
|
};
|
|
41
43
|
export {
|
|
42
|
-
|
|
44
|
+
f as getSnippet
|
|
43
45
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { default as o } from "./CodeSnippet.vue.js";
|
|
2
|
+
import { convertToHarRequest as p } from "./helpers/convert-to-har-request.js";
|
|
3
|
+
import { getHarRequest as a } from "./helpers/get-har-request.js";
|
|
4
|
+
import { getSnippet as x } from "./helpers/get-snippet.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
o as CodeSnippet,
|
|
7
|
+
p as convertToHarRequest,
|
|
8
|
+
a as getHarRequest,
|
|
9
|
+
x as getSnippet
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, computed as l,
|
|
1
|
+
import { defineComponent as s, computed as l, createBlock as r, openBlock as p } from "vue";
|
|
2
2
|
import { cookieSchema as d } from "@scalar/oas-utils/entities/cookie";
|
|
3
3
|
import u from "../../components/Form/Form.vue.js";
|
|
4
4
|
import { useActiveEntities as k } from "../../store/active-entities.js";
|
|
@@ -22,7 +22,7 @@ const x = /* @__PURE__ */ s({
|
|
|
22
22
|
), n = (o, a) => {
|
|
23
23
|
i.edit(e.value, o, a);
|
|
24
24
|
};
|
|
25
|
-
return (o, a) => (
|
|
25
|
+
return (o, a) => (p(), r(u, {
|
|
26
26
|
data: m.value,
|
|
27
27
|
onUpdate: n,
|
|
28
28
|
options: c
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as V, ref as c, watch as x,
|
|
1
|
+
import { defineComponent as V, ref as c, watch as x, createBlock as b, openBlock as k, unref as C, withCtx as m, createVNode as t, createElementVNode as i, createTextVNode as l } from "vue";
|
|
2
2
|
import { ScalarModal as g } from "@scalar/components";
|
|
3
3
|
import { useToasts as N } from "@scalar/use-toasts";
|
|
4
4
|
import S from "../../components/CommandPalette/CommandActionForm.vue.js";
|
|
@@ -30,7 +30,7 @@ const U = { class: "flex h-8 items-start gap-2 text-sm" }, $ = { class: "flex h-
|
|
|
30
30
|
domain: ""
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
), (s, e) => (
|
|
33
|
+
), (s, e) => (k(), b(C(g), {
|
|
34
34
|
size: "xs",
|
|
35
35
|
state: s.state,
|
|
36
36
|
title: "Add Cookie"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, onMounted as L, onBeforeUnmount as V, computed as h,
|
|
1
|
+
import { defineComponent as K, onMounted as L, onBeforeUnmount as V, computed as h, createBlock as d, openBlock as n, withCtx as a, createVNode as r, unref as u, createTextVNode as b, createElementVNode as y, createElementBlock as w, Fragment as j, renderList as A, withModifiers as O } from "vue";
|
|
2
2
|
import { useModal as H } from "@scalar/components";
|
|
3
3
|
import { cookieSchema as I } from "@scalar/oas-utils/entities/cookie";
|
|
4
4
|
import { useRouter as R, useRoute as W } from "vue-router";
|
|
@@ -83,14 +83,14 @@ const Z = { class: "flex-1" }, ee = { class: "relative mb-[.5px] last:mb-0" }, h
|
|
|
83
83
|
default: a(() => [
|
|
84
84
|
r(u(Y), { title: "Cookies" }, {
|
|
85
85
|
content: a(() => [
|
|
86
|
-
|
|
86
|
+
y("div", Z, [
|
|
87
87
|
r(P, null, {
|
|
88
88
|
default: a(() => [
|
|
89
|
-
(n(!0),
|
|
89
|
+
(n(!0), w(j, null, A(Object.values(u(c)), (e) => (n(), w("li", {
|
|
90
90
|
key: e.uid,
|
|
91
91
|
class: "gap-1/2 flex flex-col"
|
|
92
92
|
}, [
|
|
93
|
-
|
|
93
|
+
y("div", ee, [
|
|
94
94
|
(n(), d(T, {
|
|
95
95
|
key: e.uid,
|
|
96
96
|
class: "text-xs",
|
|
@@ -120,7 +120,7 @@ const Z = { class: "flex-1" }, ee = { class: "relative mb-[.5px] last:mb-0" }, h
|
|
|
120
120
|
hotkey: "N"
|
|
121
121
|
}, {
|
|
122
122
|
title: a(() => o[1] || (o[1] = [
|
|
123
|
-
|
|
123
|
+
b(" Add Cookie ")
|
|
124
124
|
])),
|
|
125
125
|
_: 1
|
|
126
126
|
})
|
|
@@ -134,7 +134,7 @@ const Z = { class: "flex-1" }, ee = { class: "relative mb-[.5px] last:mb-0" }, h
|
|
|
134
134
|
class: "*:border-b-0"
|
|
135
135
|
}, {
|
|
136
136
|
title: a(() => o[2] || (o[2] = [
|
|
137
|
-
|
|
137
|
+
b("Edit Cookie")
|
|
138
138
|
])),
|
|
139
139
|
default: a(() => [
|
|
140
140
|
r(G)
|