@scalar/api-client 2.2.22 → 2.2.23
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 +10 -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 +69 -70
- package/dist/components/AddressBar/AddressBarServer.vue.js +26 -26
- 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 +46 -46
- 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 +42 -38
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
- package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +22 -19
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +57 -49
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +71 -64
- package/dist/layouts/App/ApiClientApp.vue.js +4 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
- package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
- package/dist/libs/create-client.d.ts +10 -10
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +42 -36
- package/dist/libs/extractAttachmentFilename.d.ts +3 -0
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +7 -7
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +18 -18
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -2
- package/dist/libs/parse-curl.js +39 -36
- package/dist/store/active-entities.d.ts +4 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +88 -86
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +29 -29
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +27 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +94 -77
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +27 -27
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +18 -18
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +35 -33
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -9
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +39 -37
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +94 -89
- 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 +121 -119
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
- 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 +149 -144
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +37 -31
- package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +147 -130
- package/dist/views/Request/types/sidebar-item.d.ts +4 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +38 -35
- package/dist/views/Servers/Servers.vue2.js +38 -35
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -15
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CookieForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/CookieForm.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CookieForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/CookieForm.vue"],"names":[],"mappings":";AAyLA,wBAMG"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as p, openBlock as m, createBlock as d, withCtx as k, createElementVNode as t } from "vue";
|
|
2
2
|
import v from "../../components/Form/Form.vue.js";
|
|
3
3
|
import { useActiveEntities as f } from "../../store/active-entities.js";
|
|
4
4
|
import { useWorkspace as h } from "../../store/store.js";
|
|
5
|
-
const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F = /* @__PURE__ */
|
|
5
|
+
const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F = /* @__PURE__ */ c({
|
|
6
6
|
__name: "CookieForm",
|
|
7
7
|
setup(b) {
|
|
8
|
-
const { activeCookieId: o } = f(), { cookies:
|
|
8
|
+
const { activeCookieId: o } = f(), { cookies: r, cookieMutators: i } = h(), s = [
|
|
9
9
|
{ label: "Key", key: "key", placeholder: "Username" },
|
|
10
10
|
{ label: "Value", key: "value", placeholder: "123" },
|
|
11
11
|
{ label: "Domain", key: "domain", placeholder: "scalar.com" },
|
|
@@ -13,12 +13,17 @@ const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F =
|
|
|
13
13
|
{ label: "Expires", key: "expires", placeholder: "Tomorrow" },
|
|
14
14
|
{ label: "Secure", key: "secure", placeholder: "True/False" },
|
|
15
15
|
{ label: "HttpOnly", key: "httpOnly", placeholder: "True/False" }
|
|
16
|
-
], l =
|
|
17
|
-
() =>
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
], l = p(
|
|
17
|
+
() => r[o.value] || {
|
|
18
|
+
value: "",
|
|
19
|
+
uid: "",
|
|
20
|
+
name: "",
|
|
21
|
+
sameSite: "Lax"
|
|
22
|
+
}
|
|
23
|
+
), a = (n, e) => {
|
|
24
|
+
o.value && i.edit(o.value, n, e);
|
|
20
25
|
};
|
|
21
|
-
return (
|
|
26
|
+
return (n, e) => (m(), d(v, {
|
|
22
27
|
data: l.value,
|
|
23
28
|
onUpdate: a,
|
|
24
29
|
options: s
|
|
@@ -34,7 +39,7 @@ const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F =
|
|
|
34
39
|
class: "md:pl-1 outline-none border-0 text-c-2 rounded pointer-events-auto relative w-full",
|
|
35
40
|
placeholder: "Cookie Name",
|
|
36
41
|
value: l.value.name,
|
|
37
|
-
onInput: e[0] || (e[0] = (
|
|
42
|
+
onInput: e[0] || (e[0] = (u) => a("name", u.target.value))
|
|
38
43
|
}, null, 40, _)
|
|
39
44
|
])
|
|
40
45
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA8iBA,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as D, computed as K, onMounted as R, onBeforeUnmount as F, openBlock as n, createBlock as N, withCtx as
|
|
1
|
+
import { defineComponent as D, computed as K, onMounted as R, onBeforeUnmount as F, openBlock as n, createBlock as N, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as d, Fragment as _, renderList as k, normalizeClass as O, createTextVNode as x, toDisplayString as j, withDirectives as E, withModifiers as A, vShow as z } from "vue";
|
|
2
2
|
import H from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
3
|
import I from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
4
|
import P from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
@@ -16,8 +16,8 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
|
|
|
16
16
|
__name: "Cookies",
|
|
17
17
|
setup(ne) {
|
|
18
18
|
const { cookies: b, cookieMutators: v, events: g } = X(), { collapsedSidebarFolders: c, toggleSidebarFolder: y } = Z(), m = q(), M = G(), C = () => {
|
|
19
|
-
const
|
|
20
|
-
name: `Cookie ${
|
|
19
|
+
const e = Object.keys(b).length, t = W.parse({
|
|
20
|
+
name: `Cookie ${e}`,
|
|
21
21
|
value: "",
|
|
22
22
|
domain: "example.com",
|
|
23
23
|
path: "/",
|
|
@@ -25,43 +25,45 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
|
|
|
25
25
|
httpOnly: !1,
|
|
26
26
|
sameSite: "None"
|
|
27
27
|
});
|
|
28
|
-
v.add(
|
|
29
|
-
}, V = (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
v.add(t), m.push(t.uid);
|
|
29
|
+
}, V = (e) => {
|
|
30
|
+
var o;
|
|
31
|
+
v.delete(e);
|
|
32
|
+
const t = Object.values(b).filter(
|
|
33
|
+
(r) => r.uid !== e
|
|
33
34
|
);
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
m.push(
|
|
37
|
-
} else
|
|
35
|
+
if (t.length > 1) {
|
|
36
|
+
const r = t[t.length - 1];
|
|
37
|
+
r && m.push(r.uid);
|
|
38
|
+
} else t.length === 1 && ((o = t[0]) == null ? void 0 : o.uid) === "default" && m.push("default");
|
|
38
39
|
}, h = K(() => {
|
|
39
|
-
const
|
|
40
|
-
return Object.values(b).forEach((
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
const e = {};
|
|
41
|
+
return Object.values(b).forEach((t) => {
|
|
42
|
+
const o = t.domain ?? "", r = t.path ?? "";
|
|
43
|
+
e[o] || (e[o] = {}), e[o][r] || (e[o][r] = []), e[o][r].push(t);
|
|
44
|
+
}), e;
|
|
45
|
+
}), w = (e) => c[e], S = (e) => {
|
|
46
|
+
e != null && e.createNew && M.name === "cookies" && C();
|
|
47
|
+
}, B = (e, t) => {
|
|
48
|
+
const o = `/workspace/default/cookies/${t}`;
|
|
49
|
+
e.metaKey ? window.open(o, "_blank") : m.push({ path: o });
|
|
48
50
|
};
|
|
49
51
|
return R(() => {
|
|
50
|
-
const
|
|
52
|
+
const e = Object.keys(h.value), t = Object.entries(h.value).flatMap(
|
|
51
53
|
([o, r]) => Object.keys(r).map((p) => o + p)
|
|
52
54
|
);
|
|
53
|
-
|
|
55
|
+
e.forEach((o) => {
|
|
54
56
|
c[o] = !0;
|
|
55
|
-
}),
|
|
57
|
+
}), t.forEach((o) => {
|
|
56
58
|
c[o] = !0;
|
|
57
59
|
}), g.hotKeys.on(S);
|
|
58
|
-
}), F(() => g.hotKeys.off(S)), (
|
|
59
|
-
default:
|
|
60
|
+
}), F(() => g.hotKeys.off(S)), (e, t) => (n(), N(T, null, {
|
|
61
|
+
default: a(() => [
|
|
60
62
|
s(l(Y), { title: "Cookies" }, {
|
|
61
|
-
content:
|
|
63
|
+
content: a(() => [
|
|
62
64
|
f("div", ee, [
|
|
63
65
|
s(I, null, {
|
|
64
|
-
default:
|
|
66
|
+
default: a(() => [
|
|
65
67
|
(n(!0), d(_, null, k(h.value, (o, r) => (n(), d("div", { key: r }, [
|
|
66
68
|
f("button", {
|
|
67
69
|
class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
@@ -82,7 +84,7 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
|
|
|
82
84
|
f("button", {
|
|
83
85
|
class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
84
86
|
type: "button",
|
|
85
|
-
onClick: (
|
|
87
|
+
onClick: (i) => l(y)(r + u)
|
|
86
88
|
}, [
|
|
87
89
|
s(l(L), {
|
|
88
90
|
class: O(["text-c-3", {
|
|
@@ -94,14 +96,14 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
|
|
|
94
96
|
x(" " + j(u), 1)
|
|
95
97
|
], 8, re),
|
|
96
98
|
E(f("div", se, [
|
|
97
|
-
(n(!0), d(_, null, k(p, (
|
|
98
|
-
key:
|
|
99
|
+
(n(!0), d(_, null, k(p, (i) => (n(), N(P, {
|
|
100
|
+
key: i.uid,
|
|
99
101
|
class: "cookie text-xs",
|
|
100
102
|
type: "cookies",
|
|
101
|
-
variable: { name:
|
|
103
|
+
variable: { name: i.name, uid: i.uid },
|
|
102
104
|
warningMessage: "Are you sure you want to delete this cookie?",
|
|
103
|
-
onClick: A(($) => B($,
|
|
104
|
-
onDelete: ($) => V(
|
|
105
|
+
onClick: A(($) => B($, i.uid), ["prevent"]),
|
|
106
|
+
onDelete: ($) => V(i.uid)
|
|
105
107
|
}, null, 8, ["variable", "onClick", "onDelete"]))), 128))
|
|
106
108
|
], 512), [
|
|
107
109
|
[z, w(r + u)]
|
|
@@ -116,12 +118,12 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
|
|
|
116
118
|
})
|
|
117
119
|
])
|
|
118
120
|
]),
|
|
119
|
-
button:
|
|
121
|
+
button: a(() => [
|
|
120
122
|
s(H, {
|
|
121
123
|
click: C,
|
|
122
124
|
hotkey: "N"
|
|
123
125
|
}, {
|
|
124
|
-
title:
|
|
126
|
+
title: a(() => t[0] || (t[0] = [
|
|
125
127
|
x("Add Cookie")
|
|
126
128
|
])),
|
|
127
129
|
_: 1
|
|
@@ -130,7 +132,7 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
|
|
|
130
132
|
_: 1
|
|
131
133
|
}),
|
|
132
134
|
s(U, { class: "flex-1" }, {
|
|
133
|
-
default:
|
|
135
|
+
default: a(() => [
|
|
134
136
|
s(J),
|
|
135
137
|
s(Q)
|
|
136
138
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA41CA,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, ref as
|
|
1
|
+
import { defineComponent as re, ref as p, watch as se, onMounted as ie, onBeforeUnmount as ue, openBlock as m, createBlock as y, withCtx as d, createVNode as u, createElementVNode as C, createElementBlock as M, Fragment as U, renderList as z, unref as s, normalizeClass as A, createTextVNode as B, toDisplayString as W, withDirectives as de, withModifiers as ce, createCommentVNode as K, vShow as me, createSlots as ve } from "vue";
|
|
2
2
|
import fe from "../../components/CodeInput/CodeInput.vue.js";
|
|
3
3
|
import pe from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
4
4
|
import xe from "../../components/Sidebar/Sidebar.vue.js";
|
|
@@ -20,7 +20,7 @@ import { useSidebar as Oe } from "../../hooks/useSidebar.js";
|
|
|
20
20
|
const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
21
21
|
__name: "Environment",
|
|
22
22
|
setup(De) {
|
|
23
|
-
const
|
|
23
|
+
const x = Se(), k = Me(), { activeWorkspace: V, activeEnvironment: J, activeWorkspaceCollections: i } = Ee(), { events: N, workspaceMutators: T, collectionMutators: b } = Ne(), { collapsedSidebarFolders: h, toggleSidebarFolder: E } = Oe(), g = $(), _ = $(), I = $(), O = p(null), l = p("default"), R = p(""), f = p(void 0), c = p(void 0), w = p(void 0), { toast: j } = we(), H = (e) => JSON.parse(e);
|
|
24
24
|
function D(e, o, n) {
|
|
25
25
|
var t;
|
|
26
26
|
e && (o.uid === n ? j(
|
|
@@ -29,141 +29,146 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
29
29
|
) : j("Environment name already used in another collection", "error"));
|
|
30
30
|
}
|
|
31
31
|
function q(e) {
|
|
32
|
-
|
|
32
|
+
i.value.some(
|
|
33
33
|
(n) => {
|
|
34
34
|
const t = Object.keys(
|
|
35
35
|
n["x-scalar-environments"] || {}
|
|
36
36
|
).includes(e.name);
|
|
37
37
|
return D(t, n, e.collectionId), t;
|
|
38
38
|
}
|
|
39
|
-
) || (e.collectionId && (
|
|
39
|
+
) || (e.collectionId && (b.addEnvironment(
|
|
40
40
|
e.name,
|
|
41
41
|
{
|
|
42
42
|
variables: {},
|
|
43
43
|
color: e.color
|
|
44
44
|
},
|
|
45
45
|
e.collectionId
|
|
46
|
-
),
|
|
46
|
+
), h[e.collectionId] || E(e.collectionId), x.push({
|
|
47
47
|
name: "environment.collection",
|
|
48
48
|
params: {
|
|
49
49
|
collectionId: e.collectionId,
|
|
50
50
|
environmentId: e.name
|
|
51
51
|
}
|
|
52
|
-
})),
|
|
52
|
+
})), _.hide());
|
|
53
53
|
}
|
|
54
54
|
function P(e) {
|
|
55
|
-
var o;
|
|
55
|
+
var o, n;
|
|
56
56
|
if (J) {
|
|
57
|
-
const
|
|
57
|
+
const t = H(e);
|
|
58
58
|
if (l.value === "default")
|
|
59
59
|
T.edit(
|
|
60
|
-
V.value.uid,
|
|
60
|
+
((o = V.value) == null ? void 0 : o.uid) ?? "",
|
|
61
61
|
"environments",
|
|
62
|
-
|
|
62
|
+
t
|
|
63
63
|
);
|
|
64
64
|
else {
|
|
65
|
-
const
|
|
66
|
-
(
|
|
67
|
-
var
|
|
68
|
-
return (
|
|
65
|
+
const a = i.value.find(
|
|
66
|
+
(r) => {
|
|
67
|
+
var v;
|
|
68
|
+
return (v = r["x-scalar-environments"]) == null ? void 0 : v[l.value ?? ""];
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
if ((n = a == null ? void 0 : a["x-scalar-environments"]) != null && n[l.value ?? ""]) {
|
|
72
|
+
const r = a["x-scalar-environments"][l.value ?? ""];
|
|
73
|
+
r && (r.variables = t, b.edit(
|
|
74
|
+
a.uid,
|
|
75
|
+
"x-scalar-environments",
|
|
76
|
+
a["x-scalar-environments"]
|
|
77
|
+
));
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
const S = (e) => {
|
|
80
|
-
|
|
83
|
+
f.value = e, _.show();
|
|
81
84
|
}, Q = (e, o) => {
|
|
82
|
-
c.value = e,
|
|
85
|
+
c.value = e, f.value = o, w.value = e, I.show();
|
|
83
86
|
}, X = (e) => {
|
|
84
87
|
var o, n, t;
|
|
85
|
-
O.value = e, R.value = ((t = (n = (o =
|
|
88
|
+
O.value = e, R.value = ((t = (n = (o = i.value.find(
|
|
86
89
|
(a) => {
|
|
87
|
-
var
|
|
88
|
-
return (
|
|
90
|
+
var r;
|
|
91
|
+
return (r = a["x-scalar-environments"]) == null ? void 0 : r[e];
|
|
89
92
|
}
|
|
90
|
-
)) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[e]) == null ? void 0 : t.color) ?? "",
|
|
93
|
+
)) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[e]) == null ? void 0 : t.color) ?? "", g.show();
|
|
91
94
|
}, Y = (e) => {
|
|
92
95
|
const o = O.value;
|
|
93
|
-
typeof o == "string" && (
|
|
96
|
+
typeof o == "string" && (i.value.some(
|
|
94
97
|
(t) => {
|
|
95
98
|
var a;
|
|
96
99
|
return (a = t["x-scalar-environments"]) == null ? void 0 : a[o];
|
|
97
100
|
}
|
|
98
|
-
) &&
|
|
101
|
+
) && i.value.forEach((t) => {
|
|
99
102
|
var a;
|
|
100
|
-
(a = t["x-scalar-environments"]) != null && a[o] && (t["x-scalar-environments"][o].color = e,
|
|
103
|
+
(a = t["x-scalar-environments"]) != null && a[o] && (t["x-scalar-environments"][o].color = e, b.edit(
|
|
101
104
|
t.uid,
|
|
102
105
|
"x-scalar-environments",
|
|
103
106
|
t["x-scalar-environments"]
|
|
104
107
|
));
|
|
105
|
-
}),
|
|
108
|
+
}), g.hide());
|
|
106
109
|
};
|
|
107
110
|
function Z(e) {
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
i.value.forEach((n) => {
|
|
112
|
+
b.removeEnvironment(e, n.uid);
|
|
110
113
|
});
|
|
111
|
-
const o =
|
|
114
|
+
const o = i.value.flatMap(
|
|
112
115
|
(n) => Object.keys(n["x-scalar-environments"] || {})
|
|
113
116
|
);
|
|
114
117
|
if (o.length > 0) {
|
|
115
|
-
const n = o[o.length - 1]
|
|
118
|
+
const n = o[o.length - 1];
|
|
119
|
+
if (!n) return;
|
|
120
|
+
const t = i.value.find(
|
|
116
121
|
(a) => Object.keys(a["x-scalar-environments"] || {}).includes(
|
|
117
122
|
n
|
|
118
123
|
)
|
|
119
124
|
);
|
|
120
|
-
l.value = n,
|
|
125
|
+
l.value = n, x.push({
|
|
121
126
|
name: "environment.collection",
|
|
122
127
|
params: {
|
|
123
128
|
collectionId: t == null ? void 0 : t.uid,
|
|
124
129
|
environmentId: n
|
|
125
130
|
}
|
|
126
|
-
}), t && !
|
|
131
|
+
}), t && !h[t.uid] && E(t.uid);
|
|
127
132
|
} else
|
|
128
|
-
l.value = "default",
|
|
133
|
+
l.value = "default", x.push({
|
|
129
134
|
name: "environment",
|
|
130
135
|
params: { environment: "default" }
|
|
131
136
|
});
|
|
132
137
|
}
|
|
133
138
|
const ee = () => l.value === "default" ? "Global Environment" : l.value, ne = () => {
|
|
134
|
-
var e, o, n;
|
|
135
|
-
return l.value === "default" ? JSON.stringify(V.value.environments, null, 2) : JSON.stringify(
|
|
136
|
-
(
|
|
137
|
-
(
|
|
138
|
-
var
|
|
139
|
-
return (
|
|
139
|
+
var e, o, n, t;
|
|
140
|
+
return l.value === "default" ? JSON.stringify((e = V.value) == null ? void 0 : e.environments, null, 2) : JSON.stringify(
|
|
141
|
+
(t = (n = (o = i.value.find(
|
|
142
|
+
(a) => {
|
|
143
|
+
var r;
|
|
144
|
+
return (r = a["x-scalar-environments"]) == null ? void 0 : r[l.value ?? ""];
|
|
140
145
|
}
|
|
141
|
-
)) == null ? void 0 :
|
|
146
|
+
)) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[l.value ?? ""]) == null ? void 0 : t.variables,
|
|
142
147
|
null,
|
|
143
148
|
2
|
|
144
149
|
);
|
|
145
|
-
}, te = (e) =>
|
|
146
|
-
e != null && e.createNew &&
|
|
150
|
+
}, te = (e) => h[e], L = (e) => {
|
|
151
|
+
e != null && e.createNew && k.name === "environment" && S();
|
|
147
152
|
};
|
|
148
153
|
se(
|
|
149
|
-
() => [
|
|
154
|
+
() => [k.params.collectionId, k.params.environmentId],
|
|
150
155
|
([e, o]) => {
|
|
151
156
|
e ? l.value = o : l.value = "default";
|
|
152
157
|
}
|
|
153
158
|
), ie(() => {
|
|
154
|
-
l.value =
|
|
155
|
-
const { collectionId: e } =
|
|
156
|
-
e && !
|
|
159
|
+
l.value = k.params.environmentId || "default", N.hotKeys.on(L);
|
|
160
|
+
const { collectionId: e } = x.currentRoute.value.params;
|
|
161
|
+
e && !h[e] && E(e);
|
|
157
162
|
}), ue(() => N.hotKeys.off(L));
|
|
158
163
|
const oe = (e, o, n) => {
|
|
159
164
|
const t = n ? `/workspace/default/environment/${n}/${o}` : `/workspace/default/environment/${o}`;
|
|
160
|
-
e.metaKey ? window.open(t, "_blank") :
|
|
165
|
+
e.metaKey ? window.open(t, "_blank") : x.push({ path: t });
|
|
161
166
|
};
|
|
162
167
|
function ae() {
|
|
163
|
-
c.value = void 0,
|
|
168
|
+
c.value = void 0, f.value = void 0, w.value = void 0, I.hide();
|
|
164
169
|
}
|
|
165
170
|
function le(e) {
|
|
166
|
-
|
|
171
|
+
i.value.some(
|
|
167
172
|
(n) => {
|
|
168
173
|
const t = Object.keys(
|
|
169
174
|
n["x-scalar-environments"] || {}
|
|
@@ -171,29 +176,29 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
171
176
|
return D(
|
|
172
177
|
t,
|
|
173
178
|
n,
|
|
174
|
-
|
|
179
|
+
f.value
|
|
175
180
|
), t;
|
|
176
181
|
}
|
|
177
|
-
) || (e && c.value !== "default" &&
|
|
182
|
+
) || (e && c.value !== "default" && i.value.forEach((n) => {
|
|
178
183
|
var t;
|
|
179
184
|
if ((t = n["x-scalar-environments"]) != null && t[c.value ?? ""]) {
|
|
180
185
|
const a = n["x-scalar-environments"][c.value ?? ""];
|
|
181
|
-
delete n["x-scalar-environments"][c.value ?? ""], n["x-scalar-environments"][e] = a,
|
|
186
|
+
a && (delete n["x-scalar-environments"][c.value ?? ""], n["x-scalar-environments"][e] = a, b.edit(
|
|
182
187
|
n.uid,
|
|
183
188
|
"x-scalar-environments",
|
|
184
189
|
n["x-scalar-environments"]
|
|
185
|
-
);
|
|
190
|
+
));
|
|
186
191
|
}
|
|
187
|
-
}), e && l.value === c.value && (l.value = e), c.value = void 0,
|
|
192
|
+
}), e && l.value === c.value && (l.value = e), c.value = void 0, f.value = void 0, w.value = void 0, I.hide());
|
|
188
193
|
}
|
|
189
|
-
return (e, o) => (m(),
|
|
194
|
+
return (e, o) => (m(), y(ye, null, {
|
|
190
195
|
default: d(() => [
|
|
191
196
|
u(xe, { title: "Collections" }, {
|
|
192
197
|
content: d(() => [
|
|
193
|
-
|
|
198
|
+
C("div", Re, [
|
|
194
199
|
u(he, null, {
|
|
195
200
|
default: d(() => [
|
|
196
|
-
(m(),
|
|
201
|
+
(m(), y(F, {
|
|
197
202
|
key: "default",
|
|
198
203
|
class: "text-xs",
|
|
199
204
|
isCopyable: !1,
|
|
@@ -205,24 +210,24 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
205
210
|
isDefault: !0
|
|
206
211
|
}
|
|
207
212
|
})),
|
|
208
|
-
(m(!0), M(U, null, z(
|
|
213
|
+
(m(!0), M(U, null, z(s(i), (n) => {
|
|
209
214
|
var t;
|
|
210
215
|
return m(), M("div", {
|
|
211
216
|
key: n.uid,
|
|
212
217
|
class: "flex flex-col gap-0.25"
|
|
213
218
|
}, [
|
|
214
|
-
|
|
219
|
+
C("button", {
|
|
215
220
|
class: "flex font-medium gap-1.5 group items-center p-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
216
221
|
type: "button",
|
|
217
|
-
onClick: (a) =>
|
|
222
|
+
onClick: (a) => s(E)(n.uid)
|
|
218
223
|
}, [
|
|
219
|
-
u(
|
|
224
|
+
u(s(Ie), {
|
|
220
225
|
class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
|
|
221
226
|
src: n["x-scalar-icon"] || "interface-content-folder"
|
|
222
227
|
}, null, 8, ["src"]),
|
|
223
|
-
u(
|
|
228
|
+
u(s(G), {
|
|
224
229
|
class: A(["text-c-3 hidden text-sm group-hover:block", {
|
|
225
|
-
"rotate-90":
|
|
230
|
+
"rotate-90": s(h)[n.uid]
|
|
226
231
|
}]),
|
|
227
232
|
icon: "ChevronRight",
|
|
228
233
|
size: "sm",
|
|
@@ -230,13 +235,13 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
230
235
|
}, null, 8, ["class"]),
|
|
231
236
|
B(" " + W(((t = n.info) == null ? void 0 : t.title) ?? ""), 1)
|
|
232
237
|
], 8, je),
|
|
233
|
-
de(
|
|
238
|
+
de(C("div", {
|
|
234
239
|
class: A({
|
|
235
240
|
"before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] flex flex-col gap-px mb-[.5px] last:mb-0 relative": Object.keys(n["x-scalar-environments"] || {}).length > 0
|
|
236
241
|
})
|
|
237
242
|
}, [
|
|
238
|
-
(m(!0), M(U, null, z(n["x-scalar-environments"], (a,
|
|
239
|
-
key:
|
|
243
|
+
(m(!0), M(U, null, z(n["x-scalar-environments"], (a, r) => (m(), y(F, {
|
|
244
|
+
key: r,
|
|
240
245
|
class: "text-xs [&>a]:pl-5",
|
|
241
246
|
collectionId: n.uid,
|
|
242
247
|
isCopyable: !1,
|
|
@@ -244,30 +249,30 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
244
249
|
isRenameable: !0,
|
|
245
250
|
type: "environment",
|
|
246
251
|
variable: {
|
|
247
|
-
name:
|
|
248
|
-
uid:
|
|
252
|
+
name: r,
|
|
253
|
+
uid: r,
|
|
249
254
|
color: a.color ?? "#8E8E8E",
|
|
250
255
|
isDefault: !1
|
|
251
256
|
},
|
|
252
257
|
warningMessage: "Are you sure you want to delete this environment?",
|
|
253
|
-
onClick: ce((
|
|
254
|
-
onColorModal: (
|
|
255
|
-
onDelete: (
|
|
256
|
-
onRename: (
|
|
258
|
+
onClick: ce((v) => oe(v, r, n.uid), ["prevent"]),
|
|
259
|
+
onColorModal: (v) => X(r),
|
|
260
|
+
onDelete: (v) => Z(r),
|
|
261
|
+
onRename: (v) => Q(r, n.uid)
|
|
257
262
|
}, null, 8, ["collectionId", "variable", "onClick", "onColorModal", "onDelete", "onRename"]))), 128)),
|
|
258
|
-
Object.keys(n["x-scalar-environments"] || {}).length === 0 ? (m(),
|
|
263
|
+
Object.keys(n["x-scalar-environments"] || {}).length === 0 ? (m(), y(s(ge), {
|
|
259
264
|
key: 0,
|
|
260
265
|
class: "mb-[.5px] flex gap-1.5 h-8 text-c-1 pl-6 py-0 justify-start text-xs w-full hover:bg-b-2",
|
|
261
266
|
variant: "ghost",
|
|
262
267
|
onClick: (a) => S(n.uid)
|
|
263
268
|
}, {
|
|
264
269
|
default: d(() => [
|
|
265
|
-
u(
|
|
270
|
+
u(s(G), {
|
|
266
271
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
267
272
|
icon: "Add",
|
|
268
273
|
thickness: "3"
|
|
269
274
|
}),
|
|
270
|
-
o[2] || (o[2] =
|
|
275
|
+
o[2] || (o[2] = C("span", null, "Add Environment", -1))
|
|
271
276
|
]),
|
|
272
277
|
_: 2
|
|
273
278
|
}, 1032, ["onClick"])) : K("", !0)
|
|
@@ -298,7 +303,7 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
298
303
|
default: d(() => [
|
|
299
304
|
u(ke, null, ve({
|
|
300
305
|
default: d(() => [
|
|
301
|
-
l.value ? (m(),
|
|
306
|
+
l.value ? (m(), y(fe, {
|
|
302
307
|
key: 0,
|
|
303
308
|
class: "pl-px pr-2 md:px-4 py-2",
|
|
304
309
|
isCopyable: "",
|
|
@@ -314,7 +319,7 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
314
319
|
l.value ? {
|
|
315
320
|
name: "title",
|
|
316
321
|
fn: d(() => [
|
|
317
|
-
|
|
322
|
+
C("span", null, W(ee()), 1)
|
|
318
323
|
]),
|
|
319
324
|
key: "0"
|
|
320
325
|
} : void 0
|
|
@@ -324,25 +329,25 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
|
|
|
324
329
|
}),
|
|
325
330
|
u($e, {
|
|
326
331
|
selectedColor: R.value,
|
|
327
|
-
state:
|
|
328
|
-
onCancel: o[0] || (o[0] = (n) =>
|
|
332
|
+
state: s(g),
|
|
333
|
+
onCancel: o[0] || (o[0] = (n) => s(g).hide()),
|
|
329
334
|
onSubmit: Y
|
|
330
335
|
}, null, 8, ["selectedColor", "state"]),
|
|
331
336
|
u(Ve, {
|
|
332
|
-
activeWorkspaceCollections:
|
|
333
|
-
collectionId:
|
|
334
|
-
state:
|
|
335
|
-
onCancel: o[1] || (o[1] = (n) =>
|
|
337
|
+
activeWorkspaceCollections: s(i),
|
|
338
|
+
collectionId: f.value,
|
|
339
|
+
state: s(_),
|
|
340
|
+
onCancel: o[1] || (o[1] = (n) => s(_).hide()),
|
|
336
341
|
onSubmit: q
|
|
337
342
|
}, null, 8, ["activeWorkspaceCollections", "collectionId", "state"]),
|
|
338
|
-
u(
|
|
343
|
+
u(s(_e), {
|
|
339
344
|
size: "xxs",
|
|
340
|
-
state:
|
|
345
|
+
state: s(I),
|
|
341
346
|
title: `Edit ${c.value}`
|
|
342
347
|
}, {
|
|
343
348
|
default: d(() => [
|
|
344
349
|
u(pe, {
|
|
345
|
-
name:
|
|
350
|
+
name: w.value ?? "",
|
|
346
351
|
onClose: ae,
|
|
347
352
|
onEdit: le
|
|
348
353
|
}, null, 8, ["name"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAyS8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAqajD,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32033bf8"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|