@scalar/api-client 2.1.19 → 2.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -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 +77 -79
- package/dist/components/AddressBar/AddressBarServer.vue.js +23 -23
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +6 -0
- 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 +89 -91
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue2.js +41 -40
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +38 -38
- package/dist/layouts/App/create-api-client-app.d.ts +33 -26
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +15 -15
- package/dist/layouts/Modal/create-api-client-modal.d.ts +66 -52
- 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 +30 -30
- package/dist/layouts/Web/create-api-client-web.d.ts +33 -26
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +33 -26
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-bus.d.ts +41 -0
- package/dist/libs/event-bus.d.ts.map +1 -0
- package/dist/libs/event-bus.js +32 -0
- package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
- package/dist/libs/hot-keys.d.ts.map +1 -0
- package/dist/libs/hot-keys.js +45 -0
- package/dist/libs/index.d.ts +3 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -33
- package/dist/libs/send-request.d.ts +4 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +103 -103
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/events.d.ts +29 -0
- package/dist/store/events.d.ts.map +1 -0
- package/dist/store/events.js +31 -0
- package/dist/store/request-example.d.ts +2 -2
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +66 -52
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +75 -73
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +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 +63 -63
- 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 +101 -102
- 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 +76 -76
- 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 +33 -34
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +17 -18
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
- package/package.json +5 -5
- package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/cancel-request-bus.js +0 -5
- package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/command-palette-bus.js +0 -5
- package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-request-bus.js +0 -5
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-keys-bus.js +0 -47
- package/dist/libs/event-busses/index.d.ts +0 -6
- package/dist/libs/event-busses/index.d.ts.map +0 -1
- package/dist/libs/event-busses/index.js +0 -15
- package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
- package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/request-status-bus.js +0 -5
|
@@ -1,62 +1,59 @@
|
|
|
1
|
-
import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as n, createElementBlock as r, createElementVNode as e, unref as t, createTextVNode as c, toDisplayString as b, createCommentVNode as d, createVNode as l, pushScopeId as g, popScopeId as C } from "vue";
|
|
2
|
+
import v from "../../../assets/computer.ascii.js";
|
|
3
|
+
import N from "../../../components/ScalarAsciiArt.vue.js";
|
|
4
4
|
import u from "../../../components/ScalarHotkey.vue.js";
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
|
|
7
|
-
import { executeRequestBus as S } from "../../../libs/event-busses/execute-request-bus.js";
|
|
8
|
-
import { commandPaletteBus as q } from "../../../libs/event-busses/command-palette-bus.js";
|
|
9
|
-
const f = (o) => (g("data-v-43fc1968"), o = o(), b(), o), V = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, E = {
|
|
5
|
+
import { useWorkspace as S } from "../../../store/store.js";
|
|
6
|
+
const f = (o) => (g("data-v-cddb96c9"), o = o(), C(), o), q = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, B = {
|
|
10
7
|
key: 0,
|
|
11
8
|
class: "scalar-version-number"
|
|
12
|
-
},
|
|
9
|
+
}, w = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Beta", -1)), E = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
|
|
13
10
|
/* @__PURE__ */ e("a", {
|
|
14
11
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
15
12
|
target: "_blank"
|
|
16
13
|
}, " Roadmap ")
|
|
17
|
-
], -1)),
|
|
14
|
+
], -1)), I = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, j = /* @__PURE__ */ y({
|
|
18
15
|
__name: "ResponseEmpty",
|
|
19
16
|
setup(o) {
|
|
20
|
-
const { isReadOnly: _, activeWorkspace: h } =
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
}, x = "2.1.
|
|
25
|
-
return k(() =>
|
|
26
|
-
e("div",
|
|
27
|
-
t(h).isReadOnly ?
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
const { isReadOnly: _, activeWorkspace: h, events: s } = S(), i = () => {
|
|
18
|
+
s.commandPalette.emit({ commandName: "Create Request" });
|
|
19
|
+
}, m = (a) => {
|
|
20
|
+
a != null && a.openCommandPaletteRequest && i();
|
|
21
|
+
}, x = "2.1.20";
|
|
22
|
+
return k(() => s.hotKeys.on(m)), R(() => s.hotKeys.off(m)), (a, p) => (n(), r("div", q, [
|
|
23
|
+
e("div", V, [
|
|
24
|
+
t(h).isReadOnly ? d("", !0) : (n(), r("div", B, [
|
|
25
|
+
c(" Scalar V" + b(t(x)) + " ", 1),
|
|
26
|
+
w,
|
|
27
|
+
c(" Release "),
|
|
28
|
+
E
|
|
32
29
|
])),
|
|
33
|
-
|
|
34
|
-
art: t(
|
|
30
|
+
l(N, {
|
|
31
|
+
art: t(v),
|
|
35
32
|
class: "text-c-3"
|
|
36
33
|
}, null, 8, ["art"])
|
|
37
34
|
]),
|
|
38
|
-
e("div",
|
|
35
|
+
e("div", I, [
|
|
39
36
|
e("button", {
|
|
40
37
|
class: "flex items-center gap-1.5",
|
|
41
38
|
type: "button",
|
|
42
|
-
onClick:
|
|
39
|
+
onClick: p[0] || (p[0] = (K) => t(s).executeRequest.emit())
|
|
43
40
|
}, [
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
c(" Send Request "),
|
|
42
|
+
l(u, { hotkey: "↵" })
|
|
46
43
|
]),
|
|
47
|
-
t(_) ?
|
|
44
|
+
t(_) ? d("", !0) : (n(), r("button", {
|
|
48
45
|
key: 0,
|
|
49
46
|
class: "flex items-center gap-1.5",
|
|
50
47
|
type: "button",
|
|
51
|
-
onClick:
|
|
48
|
+
onClick: i
|
|
52
49
|
}, [
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
c(" New Request "),
|
|
51
|
+
l(u, { hotkey: "N" })
|
|
55
52
|
]))
|
|
56
53
|
])
|
|
57
54
|
]));
|
|
58
55
|
}
|
|
59
56
|
});
|
|
60
57
|
export {
|
|
61
|
-
|
|
58
|
+
j as default
|
|
62
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";AA4LA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseLoadingOverlay.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ef5f83d8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLoadingState as
|
|
3
|
-
import {
|
|
4
|
-
import { requestStatusBus as B } from "../../../libs/event-busses/request-status-bus.js";
|
|
1
|
+
import { defineComponent as c, ref as u, openBlock as i, createBlock as d, Transition as m, withCtx as l, unref as e, createElementBlock as f, createVNode as r, createTextVNode as p, createCommentVNode as g } from "vue";
|
|
2
|
+
import { useLoadingState as _, ScalarLoading as v, ScalarButton as x } from "@scalar/components";
|
|
3
|
+
import { useWorkspace as k } from "../../../store/store.js";
|
|
5
4
|
const L = {
|
|
6
5
|
key: 0,
|
|
7
6
|
class: "absolute inset-0 bg-b-1 flex flex-col gap-6 items-center justify-center"
|
|
8
|
-
},
|
|
7
|
+
}, y = /* @__PURE__ */ c({
|
|
9
8
|
__name: "ResponseLoadingOverlay",
|
|
10
9
|
setup(S) {
|
|
11
|
-
const t =
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}), (
|
|
15
|
-
default:
|
|
16
|
-
e(t).isLoading ? (
|
|
17
|
-
r(e(
|
|
10
|
+
const { events: a } = k(), t = _(), o = u();
|
|
11
|
+
return a.requestStatus.on((n) => {
|
|
12
|
+
n === "start" ? o.value = setTimeout(() => t.startLoading(), 1e3) : (clearTimeout(o.value), o.value = void 0, t.stopLoading());
|
|
13
|
+
}), (n, s) => (i(), d(m, null, {
|
|
14
|
+
default: l(() => [
|
|
15
|
+
e(t).isLoading ? (i(), f("div", L, [
|
|
16
|
+
r(e(v), {
|
|
18
17
|
class: "text-c-3",
|
|
19
18
|
loadingState: e(t),
|
|
20
19
|
size: "3xl"
|
|
21
20
|
}, null, 8, ["loadingState"]),
|
|
22
|
-
r(e(
|
|
21
|
+
r(e(x), {
|
|
23
22
|
variant: "ghost",
|
|
24
|
-
onClick:
|
|
23
|
+
onClick: s[0] || (s[0] = (C) => e(a).cancelRequest.emit())
|
|
25
24
|
}, {
|
|
26
|
-
default:
|
|
27
|
-
|
|
25
|
+
default: l(() => [
|
|
26
|
+
p(" Cancel ")
|
|
28
27
|
]),
|
|
29
28
|
_: 1
|
|
30
29
|
})
|
|
31
|
-
])) :
|
|
30
|
+
])) : g("", !0)
|
|
32
31
|
]),
|
|
33
32
|
_: 1
|
|
34
33
|
}));
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
y as default
|
|
39
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AAgIlD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import
|
|
3
|
-
import { httpStatusCodes as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as y, ref as i, computed as g, openBlock as t, createElementBlock as s, toDisplayString as o, unref as m, Fragment as d, createElementVNode as C, createCommentVNode as v, createBlock as I, withCtx as B, createTextVNode as S } from "vue";
|
|
2
|
+
import L from "../../../components/HelpfulLink.vue.js";
|
|
3
|
+
import { httpStatusCodes as N } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import V from "pretty-bytes";
|
|
5
5
|
import f from "pretty-ms";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
6
|
+
import { useWorkspace as w } from "../../../store/store.js";
|
|
7
|
+
const E = { class: "flex gap-1.5 text-c-3 pl-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
|
|
8
8
|
__name: "ResponseMetaInformation",
|
|
9
9
|
props: {
|
|
10
10
|
response: {}
|
|
11
11
|
},
|
|
12
12
|
setup(h) {
|
|
13
|
-
const _ = h, r =
|
|
14
|
-
|
|
13
|
+
const _ = h, { events: k } = w(), r = i(), a = i(0);
|
|
14
|
+
k.requestStatus.on((e) => {
|
|
15
15
|
e === "start" ? r.value = setInterval(() => a.value += 1e3, 1e3) : (clearInterval(r.value), r.value = void 0, a.value = 0);
|
|
16
16
|
});
|
|
17
17
|
const l = (e) => {
|
|
18
|
-
var p,
|
|
18
|
+
var p, c;
|
|
19
19
|
const u = parseInt(
|
|
20
|
-
((p = e.headers) == null ? void 0 : p["Content-Length"]) || ((
|
|
20
|
+
((p = e.headers) == null ? void 0 : p["Content-Length"]) || ((c = e.headers) == null ? void 0 : c["content-length"]) || "0",
|
|
21
21
|
10
|
|
22
22
|
);
|
|
23
|
-
return u ?
|
|
24
|
-
}, n =
|
|
23
|
+
return u ? V(u) : void 0;
|
|
24
|
+
}, n = g(() => {
|
|
25
25
|
const e = _.response.status;
|
|
26
26
|
if (e)
|
|
27
|
-
return
|
|
27
|
+
return N[e] ?? void 0;
|
|
28
28
|
});
|
|
29
|
-
return (e, u) => (t(), s("div",
|
|
30
|
-
r.value && a.value ? (t(), s("span",
|
|
31
|
-
|
|
32
|
-
l(e.response) ? (t(), s("span",
|
|
29
|
+
return (e, u) => (t(), s("div", E, [
|
|
30
|
+
r.value && a.value ? (t(), s("span", M, o(m(f)(a.value)), 1)) : (t(), s(d, { key: 1 }, [
|
|
31
|
+
C("span", null, o(m(f)(e.response.duration)), 1),
|
|
32
|
+
l(e.response) ? (t(), s("span", q, o(l(e.response)), 1)) : v("", !0),
|
|
33
33
|
n.value ? (t(), s(d, { key: 1 }, [
|
|
34
|
-
n.value.url ? (t(),
|
|
34
|
+
n.value.url ? (t(), I(L, {
|
|
35
35
|
key: 0,
|
|
36
36
|
href: n.value.url
|
|
37
37
|
}, {
|
|
38
38
|
default: B(() => [
|
|
39
|
-
|
|
39
|
+
S(o(e.response.status) + " " + o(n.value.name), 1)
|
|
40
40
|
]),
|
|
41
41
|
_: 1
|
|
42
|
-
}, 8, ["href"])) : (t(), s("span",
|
|
42
|
+
}, 8, ["href"])) : (t(), s("span", x, o(e.response.status) + " " + o(n.value.name), 1))
|
|
43
43
|
], 64)) : v("", !0)
|
|
44
44
|
], 64))
|
|
45
45
|
]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+HA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkPxC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,89 +1,101 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { ScalarIcon as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as A, computed as i, ref as C, openBlock as t, createBlock as a, withCtx as d, createVNode as c, unref as S, createElementVNode as f, createTextVNode as B, createCommentVNode as l, createElementBlock as v, Fragment as _ } from "vue";
|
|
2
|
+
import g from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import H from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import R from "./ResponseBody.vue.js";
|
|
5
|
+
import V from "./ResponseEmpty.vue.js";
|
|
6
|
+
import $ from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
+
import E from "./ResponseMetaInformation.vue.js";
|
|
8
|
+
import { ScalarIcon as I } from "@scalar/components";
|
|
9
|
+
import L from "./ResponseBodyVirtual.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import N from "./ResponseCookies.vue.js";
|
|
12
|
+
import O from "./ResponseHeaders.vue.js";
|
|
13
|
+
const T = { class: "flex items-center flex-1" }, q = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, z = 5e6, J = /* @__PURE__ */ A({
|
|
12
14
|
__name: "ResponseSection",
|
|
13
15
|
props: {
|
|
14
16
|
response: {}
|
|
15
17
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
name:
|
|
22
|
-
value: o
|
|
18
|
+
setup(k) {
|
|
19
|
+
const r = k, p = i(() => {
|
|
20
|
+
var n;
|
|
21
|
+
const e = (n = r.response) == null ? void 0 : n.headers;
|
|
22
|
+
return e ? Object.keys(e).map((o) => ({
|
|
23
|
+
name: o,
|
|
24
|
+
value: e[o],
|
|
23
25
|
required: !1
|
|
24
26
|
})).filter(
|
|
25
|
-
(
|
|
27
|
+
(o) => ![
|
|
26
28
|
"rest-api-client-content-length",
|
|
27
29
|
"X-API-Client-Content-Length"
|
|
28
|
-
].includes(
|
|
30
|
+
].includes(o.name)
|
|
29
31
|
) : [];
|
|
30
|
-
}),
|
|
32
|
+
}), y = i(
|
|
31
33
|
() => {
|
|
32
|
-
var
|
|
33
|
-
return ((
|
|
34
|
-
var m,
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
name:
|
|
38
|
-
value:
|
|
34
|
+
var e;
|
|
35
|
+
return ((e = r.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((n) => {
|
|
36
|
+
var m, u;
|
|
37
|
+
const o = (u = (m = r.response) == null ? void 0 : m.headers) == null ? void 0 : u[n];
|
|
38
|
+
return o ? {
|
|
39
|
+
name: n,
|
|
40
|
+
value: o,
|
|
39
41
|
required: !1
|
|
40
42
|
} : [];
|
|
41
43
|
})) ?? [];
|
|
42
44
|
}
|
|
43
|
-
),
|
|
44
|
-
|
|
45
|
+
), h = ["All", "Cookies", "Headers", "Body"], s = C("All"), x = i(
|
|
46
|
+
() => {
|
|
47
|
+
var e;
|
|
48
|
+
return typeof ((e = r.response) == null ? void 0 : e.data) == "string" && r.response.data.length > z;
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
return (e, n) => (t(), a(H, null, {
|
|
45
52
|
title: d(() => [
|
|
46
|
-
|
|
53
|
+
c(S(I), {
|
|
47
54
|
class: "text-c-3 mr-2 rotate-180",
|
|
48
55
|
icon: "ExternalLink",
|
|
49
56
|
size: "sm",
|
|
50
57
|
thickness: "2.5"
|
|
51
58
|
}),
|
|
52
|
-
f("div",
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
f("div", T, [
|
|
60
|
+
B(" Response "),
|
|
61
|
+
e.response ? (t(), a(E, {
|
|
55
62
|
key: 0,
|
|
56
|
-
response:
|
|
63
|
+
response: e.response
|
|
57
64
|
}, null, 8, ["response"])) : l("", !0),
|
|
58
|
-
|
|
59
|
-
activeSection:
|
|
60
|
-
sections:
|
|
61
|
-
onSetActiveSection:
|
|
65
|
+
c(g, {
|
|
66
|
+
activeSection: s.value,
|
|
67
|
+
sections: h,
|
|
68
|
+
onSetActiveSection: n[0] || (n[0] = (o) => s.value = o)
|
|
62
69
|
}, null, 8, ["activeSection"])
|
|
63
70
|
])
|
|
64
71
|
]),
|
|
65
72
|
default: d(() => {
|
|
66
|
-
var
|
|
73
|
+
var o;
|
|
67
74
|
return [
|
|
68
|
-
f("div",
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
f("div", q, [
|
|
76
|
+
e.response ? (t(), v(_, { key: 1 }, [
|
|
77
|
+
s.value === "All" || s.value === "Cookies" ? (t(), a(N, {
|
|
71
78
|
key: 0,
|
|
72
|
-
cookies:
|
|
79
|
+
cookies: y.value
|
|
73
80
|
}, null, 8, ["cookies"])) : l("", !0),
|
|
74
|
-
|
|
81
|
+
s.value === "All" || s.value === "Headers" ? (t(), a(O, {
|
|
75
82
|
key: 1,
|
|
76
|
-
headers:
|
|
83
|
+
headers: p.value
|
|
77
84
|
}, null, 8, ["headers"])) : l("", !0),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
s.value === "All" || s.value === "Body" ? (t(), v(_, { key: 2 }, [
|
|
86
|
+
x.value ? (t(), a(L, {
|
|
87
|
+
key: 0,
|
|
88
|
+
content: r.response.data
|
|
89
|
+
}, null, 8, ["content"])) : (t(), a(R, {
|
|
90
|
+
key: 1,
|
|
91
|
+
active: !0,
|
|
92
|
+
data: (o = r.response) == null ? void 0 : o.data,
|
|
93
|
+
headers: p.value,
|
|
94
|
+
title: "Body"
|
|
95
|
+
}, null, 8, ["data", "headers"]))
|
|
96
|
+
], 64)) : l("", !0)
|
|
97
|
+
], 64)) : (t(), a(V, { key: 0 })),
|
|
98
|
+
c($)
|
|
87
99
|
])
|
|
88
100
|
];
|
|
89
101
|
}),
|
|
@@ -92,5 +104,5 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
|
|
|
92
104
|
}
|
|
93
105
|
});
|
|
94
106
|
export {
|
|
95
|
-
|
|
107
|
+
J as default
|
|
96
108
|
};
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
import { commandPaletteBus as G } from "../../../libs/event-busses/command-palette-bus.js";
|
|
1
|
+
import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, createElementVNode as o, createVNode as t, unref as e, withCtx as s, Fragment as I, renderList as L, createBlock as x, withModifiers as r, normalizeClass as U, toDisplayString as z } from "vue";
|
|
2
|
+
import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
4
|
+
import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as F, ScalarButton as S, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
|
|
5
|
+
import { useRouter as Y } from "vue-router";
|
|
6
|
+
import { useWorkspace as G } from "../../../store/store.js";
|
|
8
7
|
const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
9
8
|
/* @__PURE__ */ o("div", { class: "flex items-center text-c-2" }, [
|
|
10
9
|
/* @__PURE__ */ o("span", null, "Only workspace cannot be deleted.")
|
|
11
10
|
])
|
|
12
|
-
], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1),
|
|
11
|
+
], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), pe = /* @__PURE__ */ O({
|
|
13
12
|
__name: "WorkspaceDropdown",
|
|
14
13
|
setup(oe) {
|
|
15
|
-
const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } =
|
|
14
|
+
const { activeWorkspace: f, workspaces: d, workspaceMutators: _, events: T } = G(), { push: g } = Y(), E = (n) => {
|
|
16
15
|
n !== f.value.uid && g(`/workspace/${n}`);
|
|
17
|
-
}, b =
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
n.trim() && (_.edit(c.value, "name", n.trim()),
|
|
16
|
+
}, b = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), c = M(""), h = C(), w = C(), y = (n) => {
|
|
17
|
+
v.value = d[n].name, c.value = n, h.show();
|
|
18
|
+
}, B = (n) => {
|
|
19
|
+
n.trim() && (_.edit(c.value, "name", n.trim()), h.hide());
|
|
21
20
|
}, D = (n) => {
|
|
22
|
-
|
|
23
|
-
},
|
|
21
|
+
v.value = d[n].name, c.value = n, w.show();
|
|
22
|
+
}, R = async () => {
|
|
24
23
|
if (!b.value) {
|
|
25
24
|
const n = f.value.uid === c.value, a = { ...d };
|
|
26
25
|
if (delete a[c.value], _.delete(c.value), n) {
|
|
@@ -34,14 +33,14 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
34
33
|
o("div", H, [
|
|
35
34
|
t(e($), null, {
|
|
36
35
|
items: s(() => [
|
|
37
|
-
(u(!0), W(
|
|
36
|
+
(u(!0), W(I, null, L(e(d), (p, l) => (u(), x(e(m), {
|
|
38
37
|
key: l,
|
|
39
38
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
40
|
-
onClick: r((k) =>
|
|
39
|
+
onClick: r((k) => E(l), ["stop"])
|
|
41
40
|
}, {
|
|
42
41
|
default: s(() => [
|
|
43
42
|
o("div", {
|
|
44
|
-
class:
|
|
43
|
+
class: U([
|
|
45
44
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
46
45
|
e(f).uid === l ? "bg-blue text-b-1" : "text-transparent"
|
|
47
46
|
])
|
|
@@ -71,7 +70,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
71
70
|
]),
|
|
72
71
|
_: 2
|
|
73
72
|
}, 1032, ["onMousedown", "onTouchend"]),
|
|
74
|
-
b.value ? (u(), x(e(
|
|
73
|
+
b.value ? (u(), x(e(F), {
|
|
75
74
|
key: 0,
|
|
76
75
|
class: "z-10",
|
|
77
76
|
side: "bottom"
|
|
@@ -140,10 +139,10 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
140
139
|
]),
|
|
141
140
|
_: 2
|
|
142
141
|
}, 1032, ["onClick"]))), 128)),
|
|
143
|
-
t(e(
|
|
142
|
+
t(e(P)),
|
|
144
143
|
t(e(m), {
|
|
145
144
|
class: "flex items-center gap-1.5",
|
|
146
|
-
onClick:
|
|
145
|
+
onClick: j
|
|
147
146
|
}, {
|
|
148
147
|
default: s(() => [
|
|
149
148
|
o("div", se, [
|
|
@@ -186,25 +185,25 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
186
185
|
title: "Delete workspace"
|
|
187
186
|
}, {
|
|
188
187
|
default: s(() => [
|
|
189
|
-
t(
|
|
190
|
-
variableName:
|
|
188
|
+
t(V, {
|
|
189
|
+
variableName: v.value,
|
|
191
190
|
warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
|
|
192
191
|
onClose: a[2] || (a[2] = (p) => e(w).hide()),
|
|
193
|
-
onDelete:
|
|
192
|
+
onDelete: R
|
|
194
193
|
}, null, 8, ["variableName"])
|
|
195
194
|
]),
|
|
196
195
|
_: 1
|
|
197
196
|
}, 8, ["state"]),
|
|
198
197
|
t(e(N), {
|
|
199
198
|
size: "xxs",
|
|
200
|
-
state: e(
|
|
199
|
+
state: e(h),
|
|
201
200
|
title: "Rename Workspace"
|
|
202
201
|
}, {
|
|
203
202
|
default: s(() => [
|
|
204
|
-
t(
|
|
205
|
-
name:
|
|
206
|
-
onClose: a[3] || (a[3] = (p) => e(
|
|
207
|
-
onEdit:
|
|
203
|
+
t(q, {
|
|
204
|
+
name: v.value,
|
|
205
|
+
onClose: a[3] || (a[3] = (p) => e(h).hide()),
|
|
206
|
+
onEdit: B
|
|
208
207
|
}, null, 8, ["name"])
|
|
209
208
|
]),
|
|
210
209
|
_: 1
|
|
@@ -213,5 +212,5 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
213
212
|
}
|
|
214
213
|
});
|
|
215
214
|
export {
|
|
216
|
-
|
|
215
|
+
pe as default
|
|
217
216
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.20",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -157,17 +157,17 @@
|
|
|
157
157
|
"whatwg-mimetype": "^4.0.0",
|
|
158
158
|
"yaml": "^2.4.5",
|
|
159
159
|
"zod": "^3.23.8",
|
|
160
|
-
"@scalar/
|
|
161
|
-
"@scalar/components": "0.12.51",
|
|
160
|
+
"@scalar/components": "0.12.52",
|
|
162
161
|
"@scalar/draggable": "0.1.5",
|
|
163
|
-
"@scalar/
|
|
162
|
+
"@scalar/icons": "0.1.0",
|
|
164
163
|
"@scalar/object-utils": "1.1.10",
|
|
164
|
+
"@scalar/oas-utils": "0.2.55",
|
|
165
165
|
"@scalar/openapi-parser": "0.8.6",
|
|
166
166
|
"@scalar/openapi-types": "0.1.2",
|
|
167
167
|
"@scalar/types": "0.0.14",
|
|
168
|
+
"@scalar/use-codemirror": "0.11.19",
|
|
168
169
|
"@scalar/themes": "0.9.36",
|
|
169
170
|
"@scalar/use-toasts": "0.7.6",
|
|
170
|
-
"@scalar/use-codemirror": "0.11.18",
|
|
171
171
|
"@scalar/use-tooltip": "1.0.2"
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancel-request-bus.d.ts","sourceRoot":"","sources":["../../../src/libs/event-busses/cancel-request-bus.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,qDAAmC,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CommandNames } from '../../components/CommandPalette/TheCommandPalette.vue.js';
|
|
2
|
-
export type CommandPaletteEvent = {
|
|
3
|
-
/** The command name which matches with the command palette */
|
|
4
|
-
commandName?: CommandNames;
|
|
5
|
-
/** Any extra metadata we want to pass to the command palettes */
|
|
6
|
-
metaData?: Record<string, any>;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Event bus for controlling the Command Palette
|
|
10
|
-
*
|
|
11
|
-
* @param commandName - the command name you wish to execute, leave empty for the full palette
|
|
12
|
-
*/
|
|
13
|
-
export declare const commandPaletteBus: import("@vueuse/core").UseEventBusReturn<CommandPaletteEvent, any>;
|
|
14
|
-
//# sourceMappingURL=command-palette-bus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette-bus.d.ts","sourceRoot":"","sources":["../../../src/libs/event-busses/command-palette-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAA;AAGrF,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CAAA;AAGD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,oEAAiC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execute-request-bus.d.ts","sourceRoot":"","sources":["../../../src/libs/event-busses/execute-request-bus.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,qDAAoC,CAAA"}
|