@scalar/api-client 2.3.14 → 2.3.16
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 +16 -0
- package/dist/components/DataTable/DataTable.vue.d.ts +2 -0
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +17 -15
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +6 -9
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +68 -23
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +41 -54
- package/dist/components/ImportCollection/utils/import-collection.d.ts +12 -0
- package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/import-collection.js +29 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +6 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +7 -0
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +11 -8
- package/dist/components/ScalarHotkey.test.d.ts +2 -0
- package/dist/components/ScalarHotkey.test.d.ts.map +1 -0
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +34 -11
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +39 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +2 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +4 -1
- 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 +4 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +19 -16
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +67 -64
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +123 -126
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -69
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +53 -35
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +56 -59
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +53 -35
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +5 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +40 -34
- package/package.json +7 -7
|
@@ -1,107 +1,104 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as q, onMounted as R, onBeforeUnmount as v, openBlock as l, createElementBlock as u, createElementVNode as s, normalizeClass as y, unref as t, createTextVNode as c, toDisplayString as h, createCommentVNode as p, createVNode as m, nextTick as C } from "vue";
|
|
2
|
+
import { useRoute as N, useRouter as S } from "vue-router";
|
|
3
|
+
import B from "../../../assets/computer.ascii.js";
|
|
4
|
+
import V from "../../../components/EmptyState.vue.js";
|
|
5
|
+
import E from "../../../components/ScalarAsciiArt.vue.js";
|
|
6
6
|
import d from "../../../components/ScalarHotkey.vue.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
|
|
7
|
+
import { useWorkspace as K } from "../../../store/store.js";
|
|
8
|
+
import { useLayout as A } from "../../../hooks/useLayout.js";
|
|
9
|
+
const W = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, $ = {
|
|
11
10
|
key: 0,
|
|
12
11
|
class: "scalar-version-number"
|
|
13
|
-
},
|
|
12
|
+
}, j = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, U = /* @__PURE__ */ q({
|
|
14
13
|
__name: "ResponseEmpty",
|
|
15
14
|
props: {
|
|
15
|
+
collection: {},
|
|
16
|
+
operation: {},
|
|
17
|
+
workspace: {},
|
|
16
18
|
numWorkspaceRequests: {}
|
|
17
19
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const { events:
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const s = (g = (v = p.value) == null ? void 0 : v.tags) != null && g.length ? { tags: p.value.tags[0] ? [p.value.tags[0]] : [] } : {}, e = R.add(
|
|
24
|
-
s,
|
|
25
|
-
(x = f.value) == null ? void 0 : x.uid
|
|
26
|
-
);
|
|
27
|
-
e && (h.push({
|
|
20
|
+
setup(r) {
|
|
21
|
+
const { events: a, requestMutators: g } = K(), x = N(), b = S(), { layout: n } = A(), f = () => {
|
|
22
|
+
var i;
|
|
23
|
+
const o = (i = r.operation.tags) != null && i.length ? { tags: r.operation.tags[0] ? [r.operation.tags[0]] : [] } : {}, e = g.add(o, r.collection.uid);
|
|
24
|
+
e && (b.push({
|
|
28
25
|
name: "request",
|
|
29
26
|
params: {
|
|
30
|
-
workspace:
|
|
27
|
+
workspace: r.workspace.uid,
|
|
31
28
|
request: e.uid
|
|
32
29
|
}
|
|
33
|
-
}),
|
|
34
|
-
|
|
30
|
+
}), C(() => {
|
|
31
|
+
a.hotKeys.emit({
|
|
35
32
|
focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
|
|
36
33
|
});
|
|
37
34
|
}));
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
class:
|
|
44
|
-
"hidden opacity-0":
|
|
35
|
+
}, k = (o) => {
|
|
36
|
+
o != null && o.createNew && x.name === "request" && f();
|
|
37
|
+
}, w = "2.3.16";
|
|
38
|
+
return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (l(), u("div", W, [
|
|
39
|
+
s("div", {
|
|
40
|
+
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
41
|
+
"hidden opacity-0": o.numWorkspaceRequests <= 1 && t(n) !== "modal"
|
|
45
42
|
}])
|
|
46
43
|
}, [
|
|
47
|
-
t(
|
|
48
|
-
|
|
49
|
-
e[3] || (e[3] =
|
|
50
|
-
|
|
44
|
+
t(n) !== "modal" ? (l(), u("div", $, [
|
|
45
|
+
c(" Scalar App V" + h(t(w)) + " Beta ", 1),
|
|
46
|
+
e[3] || (e[3] = s("div", { class: "mt-2" }, [
|
|
47
|
+
s("a", {
|
|
51
48
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
52
49
|
target: "_blank"
|
|
53
50
|
}, " Roadmap ")
|
|
54
51
|
], -1))
|
|
55
|
-
])) :
|
|
56
|
-
e[4] || (e[4] =
|
|
52
|
+
])) : p("", !0),
|
|
53
|
+
e[4] || (e[4] = s("a", {
|
|
57
54
|
class: "gitbook-show scalar-version-number",
|
|
58
55
|
href: "https://www.scalar.com",
|
|
59
56
|
target: "_blank"
|
|
60
57
|
}, " Powered By Scalar.com ", -1)),
|
|
61
|
-
|
|
62
|
-
art: t(
|
|
58
|
+
m(E, {
|
|
59
|
+
art: t(B),
|
|
63
60
|
class: "text-c-3"
|
|
64
61
|
}, null, 8, ["art"])
|
|
65
62
|
], 2),
|
|
66
|
-
t(
|
|
63
|
+
t(n) !== "modal" ? (l(), u("div", {
|
|
67
64
|
key: 0,
|
|
68
|
-
class:
|
|
69
|
-
"!flex opacity-100":
|
|
65
|
+
class: y(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
|
|
66
|
+
"!flex opacity-100": o.numWorkspaceRequests == 1
|
|
70
67
|
}])
|
|
71
68
|
}, [
|
|
72
|
-
|
|
73
|
-
], 2)) :
|
|
74
|
-
|
|
75
|
-
t(
|
|
69
|
+
m(V)
|
|
70
|
+
], 2)) : p("", !0),
|
|
71
|
+
s("div", j, [
|
|
72
|
+
t(n) !== "modal" ? (l(), u("button", {
|
|
76
73
|
key: 0,
|
|
77
74
|
class: "flex items-center gap-1.5",
|
|
78
75
|
type: "button",
|
|
79
|
-
onClick: e[0] || (e[0] = (
|
|
76
|
+
onClick: e[0] || (e[0] = (i) => t(a).commandPalette.emit())
|
|
80
77
|
}, [
|
|
81
|
-
e[5] || (e[5] =
|
|
82
|
-
|
|
83
|
-
])) :
|
|
84
|
-
t(
|
|
78
|
+
e[5] || (e[5] = c(" Get Started ")),
|
|
79
|
+
m(d, { hotkey: "k" })
|
|
80
|
+
])) : p("", !0),
|
|
81
|
+
t(n) === "desktop" ? (l(), u("button", {
|
|
85
82
|
key: 1,
|
|
86
83
|
class: "flex items-center gap-1.5",
|
|
87
84
|
type: "button",
|
|
88
|
-
onClick: e[1] || (e[1] = (
|
|
85
|
+
onClick: e[1] || (e[1] = (i) => f())
|
|
89
86
|
}, [
|
|
90
|
-
e[6] || (e[6] =
|
|
91
|
-
|
|
92
|
-
])) :
|
|
93
|
-
|
|
87
|
+
e[6] || (e[6] = c(" New Request ")),
|
|
88
|
+
m(d, { hotkey: "N" })
|
|
89
|
+
])) : p("", !0),
|
|
90
|
+
s("button", {
|
|
94
91
|
class: "flex items-center gap-1.5",
|
|
95
92
|
type: "button",
|
|
96
|
-
onClick: e[2] || (e[2] = (
|
|
93
|
+
onClick: e[2] || (e[2] = (i) => t(a).executeRequest.emit())
|
|
97
94
|
}, [
|
|
98
|
-
e[7] || (e[7] =
|
|
99
|
-
|
|
95
|
+
e[7] || (e[7] = c(" Send Request ")),
|
|
96
|
+
m(d, { hotkey: "↵" })
|
|
100
97
|
])
|
|
101
98
|
])
|
|
102
99
|
]));
|
|
103
100
|
}
|
|
104
101
|
});
|
|
105
102
|
export {
|
|
106
|
-
|
|
103
|
+
U as default
|
|
107
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAgFA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAiLF,wBAOG"}
|
|
@@ -1,68 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as y, openBlock as t, createBlock as f, withCtx as e, createTextVNode as n, createElementBlock as l, createVNode as a, unref as u, Fragment as i, renderList as b, toDisplayString as p } from "vue";
|
|
2
|
+
import g from "../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import c from "../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import _ from "../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
+
import k from "../../../components/HelpfulLink.vue.js";
|
|
6
6
|
import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
-
import { httpHeaders as
|
|
8
|
-
|
|
7
|
+
import { httpHeaders as h } from "../../../data/httpHeaders.js";
|
|
8
|
+
import x from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
9
|
+
const H = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "max-h-[calc(100%-32px)] overflow-y-auto border-t"
|
|
11
|
-
},
|
|
12
|
+
}, C = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "text-c-3 bg-b-1 flex min-h-12 items-center justify-center rounded border px-4 text-sm"
|
|
14
|
-
},
|
|
15
|
+
}, T = /* @__PURE__ */ y({
|
|
15
16
|
__name: "ResponseHeaders",
|
|
16
17
|
props: {
|
|
17
18
|
headers: {}
|
|
18
19
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
(
|
|
20
|
+
setup(v) {
|
|
21
|
+
const m = (s) => h.find(
|
|
22
|
+
(r) => r.name.toLowerCase() === s.toLowerCase()
|
|
22
23
|
);
|
|
23
|
-
return (
|
|
24
|
+
return (s, r) => (t(), f(w, {
|
|
24
25
|
class: "overflow-auto",
|
|
25
26
|
defaultOpen: !1,
|
|
26
|
-
itemCount:
|
|
27
|
+
itemCount: s.headers.length
|
|
27
28
|
}, {
|
|
28
|
-
title:
|
|
29
|
-
|
|
29
|
+
title: e(() => r[0] || (r[0] = [
|
|
30
|
+
n("Response Headers")
|
|
30
31
|
])),
|
|
31
|
-
default:
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
default: e(() => [
|
|
33
|
+
s.headers.length ? (t(), l("div", H, [
|
|
34
|
+
a(g, {
|
|
34
35
|
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
35
36
|
scroll: ""
|
|
36
37
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
(
|
|
39
|
-
|
|
38
|
+
default: e(() => [
|
|
39
|
+
a(c, { class: "sr-only !block" }, {
|
|
40
|
+
default: e(() => [
|
|
41
|
+
a(u(x), null, {
|
|
42
|
+
default: e(() => r[1] || (r[1] = [
|
|
43
|
+
n("Header Key")
|
|
44
|
+
])),
|
|
45
|
+
_: 1
|
|
46
|
+
}),
|
|
47
|
+
a(u(x), null, {
|
|
48
|
+
default: e(() => r[2] || (r[2] = [
|
|
49
|
+
n("Header Value")
|
|
50
|
+
])),
|
|
51
|
+
_: 1
|
|
52
|
+
})
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}),
|
|
56
|
+
(t(!0), l(i, null, b(s.headers, (o) => (t(), f(c, {
|
|
57
|
+
key: o.name,
|
|
40
58
|
class: "group/row text-c-1"
|
|
41
59
|
}, {
|
|
42
|
-
default:
|
|
43
|
-
|
|
44
|
-
default:
|
|
60
|
+
default: e(() => [
|
|
61
|
+
a(_, { class: "z-1 bg-b-1 sticky left-0 max-w-48 group-first/row:border-t-0" }, {
|
|
62
|
+
default: e(() => {
|
|
45
63
|
var d;
|
|
46
64
|
return [
|
|
47
|
-
typeof ((d =
|
|
65
|
+
typeof ((d = m(o.name)) == null ? void 0 : d.url) == "string" ? (t(), f(k, {
|
|
48
66
|
key: 0,
|
|
49
67
|
class: "decoration-c-3",
|
|
50
|
-
href:
|
|
68
|
+
href: m(o.name).url
|
|
51
69
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
70
|
+
default: e(() => [
|
|
71
|
+
n(p(o.name), 1)
|
|
54
72
|
]),
|
|
55
73
|
_: 2
|
|
56
|
-
}, 1032, ["href"])) : (
|
|
57
|
-
|
|
74
|
+
}, 1032, ["href"])) : (t(), l(i, { key: 1 }, [
|
|
75
|
+
n(p(o.name), 1)
|
|
58
76
|
], 64))
|
|
59
77
|
];
|
|
60
78
|
}),
|
|
61
79
|
_: 2
|
|
62
80
|
}, 1024),
|
|
63
|
-
|
|
81
|
+
a(_, {
|
|
64
82
|
class: "z-0 group-first/row:border-t-0",
|
|
65
|
-
text:
|
|
83
|
+
text: o.value
|
|
66
84
|
}, null, 8, ["text"])
|
|
67
85
|
]),
|
|
68
86
|
_: 2
|
|
@@ -70,12 +88,12 @@ const b = {
|
|
|
70
88
|
]),
|
|
71
89
|
_: 1
|
|
72
90
|
})
|
|
73
|
-
])) : (
|
|
91
|
+
])) : (t(), l("div", C, " No Headers "))
|
|
74
92
|
]),
|
|
75
93
|
_: 1
|
|
76
94
|
}, 8, ["itemCount"]));
|
|
77
95
|
}
|
|
78
96
|
});
|
|
79
97
|
export {
|
|
80
|
-
|
|
98
|
+
T as default
|
|
81
99
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
1
|
+
import type { Collection, Operation, ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
2
3
|
import type { SendRequestResult } from '../../../libs/send-request/create-request-operation';
|
|
3
4
|
type __VLS_Props = {
|
|
5
|
+
collection: Collection;
|
|
6
|
+
operation: Operation;
|
|
7
|
+
workspace: Workspace;
|
|
4
8
|
numWorkspaceRequests: number;
|
|
5
9
|
response: ResponseInstance | undefined;
|
|
6
10
|
requestResult: SendRequestResult | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+PA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,gBAAgB,EACjB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAKrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAarF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACtC,aAAa,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAA;CACpD,CAAC;;AA0SF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-15bfba2e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { defineComponent as j, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as j, computed as c, ref as C, useId as T, openBlock as l, createBlock as i, withCtx as f, createElementVNode as d, normalizeClass as y, createCommentVNode as u, createVNode as k, createElementBlock as h, Fragment as b } from "vue";
|
|
2
|
+
import w from "../../../components/SectionFilter.vue.js";
|
|
3
|
+
import V from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import I from "./RequestHeaders.vue.js";
|
|
5
|
+
import g from "./ResponseBody.vue.js";
|
|
6
|
+
import $ from "./ResponseBodyVirtual.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import E from "./ResponseCookies.vue.js";
|
|
9
|
+
import O from "./ResponseEmpty.vue.js";
|
|
10
10
|
import z from "./ResponseHeaders.vue.js";
|
|
11
11
|
import N from "./ResponseLoadingOverlay.vue.js";
|
|
12
12
|
import S from "./ResponseMetaInformation.vue.js";
|
|
13
13
|
const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5, _ = /* @__PURE__ */ j({
|
|
14
14
|
__name: "ResponseSection",
|
|
15
15
|
props: {
|
|
16
|
+
collection: {},
|
|
17
|
+
operation: {},
|
|
18
|
+
workspace: {},
|
|
16
19
|
numWorkspaceRequests: {},
|
|
17
20
|
response: {},
|
|
18
21
|
requestResult: {}
|
|
19
22
|
},
|
|
20
23
|
setup(n) {
|
|
21
|
-
const m =
|
|
24
|
+
const m = c(() => {
|
|
22
25
|
var a;
|
|
23
26
|
const e = (a = n.response) == null ? void 0 : a.headers;
|
|
24
27
|
return e ? Object.keys(e).map((o) => ({
|
|
@@ -26,7 +29,7 @@ const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5
|
|
|
26
29
|
value: e[o] ?? "",
|
|
27
30
|
required: !1
|
|
28
31
|
})) : [];
|
|
29
|
-
}), R =
|
|
32
|
+
}), R = c(
|
|
30
33
|
() => {
|
|
31
34
|
var e;
|
|
32
35
|
return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((a) => {
|
|
@@ -39,11 +42,11 @@ const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5
|
|
|
39
42
|
} : [];
|
|
40
43
|
})) ?? [];
|
|
41
44
|
}
|
|
42
|
-
),
|
|
45
|
+
), B = ["Cookies", "Headers", "Body"], s = C("All"), v = c(() => ["All", ...B]), p = c(
|
|
43
46
|
() => Object.fromEntries(
|
|
44
47
|
v.value.map((e) => [e, T()])
|
|
45
48
|
)
|
|
46
|
-
),
|
|
49
|
+
), q = c(() => {
|
|
47
50
|
var t, r;
|
|
48
51
|
if (!n.response)
|
|
49
52
|
return !1;
|
|
@@ -76,7 +79,7 @@ const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5
|
|
|
76
79
|
// Form data
|
|
77
80
|
"application/x-www-form-urlencoded"
|
|
78
81
|
].some((H) => e.includes(H)) && (n.response.size ?? 0) > A;
|
|
79
|
-
}),
|
|
82
|
+
}), x = c(
|
|
80
83
|
() => {
|
|
81
84
|
var e;
|
|
82
85
|
return ((e = n.requestResult) == null ? void 0 : e.request.parameters.headers.filter((a) => a.enabled).map((a) => ({
|
|
@@ -86,21 +89,21 @@ const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5
|
|
|
86
89
|
}))) ?? [];
|
|
87
90
|
}
|
|
88
91
|
);
|
|
89
|
-
return (e, a) => (l(), i(
|
|
92
|
+
return (e, a) => (l(), i(V, { "aria-label": "Response" }, {
|
|
90
93
|
title: f(() => [
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
d("div", W, [
|
|
95
|
+
d("div", {
|
|
93
96
|
"aria-live": "polite",
|
|
94
97
|
class: y(["flex items-center", { "animate-response-heading": e.response }])
|
|
95
98
|
}, [
|
|
96
|
-
a[1] || (a[1] =
|
|
99
|
+
a[1] || (a[1] = d("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
97
100
|
e.response ? (l(), i(S, {
|
|
98
101
|
key: 0,
|
|
99
102
|
class: "animate-response-children",
|
|
100
103
|
response: e.response
|
|
101
|
-
}, null, 8, ["response"])) :
|
|
104
|
+
}, null, 8, ["response"])) : u("", !0)
|
|
102
105
|
], 2),
|
|
103
|
-
|
|
106
|
+
k(w, {
|
|
104
107
|
modelValue: s.value,
|
|
105
108
|
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
|
|
106
109
|
filterIds: p.value,
|
|
@@ -111,44 +114,44 @@ const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5
|
|
|
111
114
|
default: f(() => {
|
|
112
115
|
var o, t, r;
|
|
113
116
|
return [
|
|
114
|
-
|
|
117
|
+
d("div", {
|
|
115
118
|
id: p.value.All,
|
|
116
119
|
class: y(["custom-scroll response-section-content relative grid h-full justify-stretch", {
|
|
117
120
|
"content-start": e.response
|
|
118
121
|
}]),
|
|
119
122
|
role: s.value === "All" && e.response ? "tabpanel" : "none"
|
|
120
123
|
}, [
|
|
121
|
-
e.response ? (l(),
|
|
122
|
-
s.value === "All" || s.value === "Cookies" ? (l(), i(
|
|
124
|
+
e.response ? (l(), h(b, { key: 1 }, [
|
|
125
|
+
s.value === "All" || s.value === "Cookies" ? (l(), i(E, {
|
|
123
126
|
key: 0,
|
|
124
127
|
class: "response-section-content-cookies",
|
|
125
128
|
id: p.value.Cookies,
|
|
126
129
|
cookies: R.value,
|
|
127
130
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
128
|
-
}, null, 8, ["id", "cookies", "role"])) :
|
|
129
|
-
s.value === "All" || s.value === "Headers" ? (l(), i(
|
|
131
|
+
}, null, 8, ["id", "cookies", "role"])) : u("", !0),
|
|
132
|
+
s.value === "All" || s.value === "Headers" ? (l(), i(I, {
|
|
130
133
|
key: 1,
|
|
131
134
|
class: "response-section-content-headers",
|
|
132
135
|
id: p.value.Headers,
|
|
133
|
-
headers:
|
|
136
|
+
headers: x.value,
|
|
134
137
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
135
|
-
}, null, 8, ["id", "headers", "role"])) :
|
|
138
|
+
}, null, 8, ["id", "headers", "role"])) : u("", !0),
|
|
136
139
|
s.value === "All" || s.value === "Headers" ? (l(), i(z, {
|
|
137
140
|
key: 2,
|
|
138
141
|
class: "response-section-content-headers",
|
|
139
142
|
id: p.value.Headers,
|
|
140
143
|
headers: m.value,
|
|
141
144
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
142
|
-
}, null, 8, ["id", "headers", "role"])) :
|
|
143
|
-
s.value === "All" || s.value === "Body" ? (l(),
|
|
144
|
-
|
|
145
|
+
}, null, 8, ["id", "headers", "role"])) : u("", !0),
|
|
146
|
+
s.value === "All" || s.value === "Body" ? (l(), h(b, { key: 3 }, [
|
|
147
|
+
q.value && typeof ((o = e.response) == null ? void 0 : o.data) == "string" ? (l(), i($, {
|
|
145
148
|
key: 0,
|
|
146
149
|
id: p.value.Body,
|
|
147
150
|
content: e.response.data,
|
|
148
151
|
data: (t = e.response) == null ? void 0 : t.data,
|
|
149
152
|
headers: m.value,
|
|
150
153
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
151
|
-
}, null, 8, ["id", "content", "data", "headers", "role"])) : (l(), i(
|
|
154
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (l(), i(g, {
|
|
152
155
|
key: 1,
|
|
153
156
|
class: "response-section-content-body",
|
|
154
157
|
id: p.value.Body,
|
|
@@ -158,12 +161,15 @@ const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5
|
|
|
158
161
|
role: s.value === "All" ? "none" : "tabpanel",
|
|
159
162
|
title: "Body"
|
|
160
163
|
}, null, 8, ["id", "data", "headers", "role"]))
|
|
161
|
-
], 64)) :
|
|
162
|
-
], 64)) : (l(), i(
|
|
164
|
+
], 64)) : u("", !0)
|
|
165
|
+
], 64)) : (l(), i(O, {
|
|
163
166
|
key: 0,
|
|
167
|
+
collection: e.collection,
|
|
168
|
+
operation: e.operation,
|
|
169
|
+
workspace: e.workspace,
|
|
164
170
|
numWorkspaceRequests: e.numWorkspaceRequests
|
|
165
|
-
}, null, 8, ["numWorkspaceRequests"])),
|
|
166
|
-
|
|
171
|
+
}, null, 8, ["collection", "operation", "workspace", "numWorkspaceRequests"])),
|
|
172
|
+
k(N)
|
|
167
173
|
], 10, F)
|
|
168
174
|
];
|
|
169
175
|
}),
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.3.
|
|
21
|
+
"version": "2.3.16",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -190,21 +190,21 @@
|
|
|
190
190
|
"yaml": "^2.4.5",
|
|
191
191
|
"zod": "^3.23.8",
|
|
192
192
|
"@scalar/components": "0.13.45",
|
|
193
|
+
"@scalar/icons": "0.1.3",
|
|
193
194
|
"@scalar/draggable": "0.1.11",
|
|
194
195
|
"@scalar/import": "0.3.11",
|
|
195
|
-
"@scalar/icons": "0.1.3",
|
|
196
196
|
"@scalar/oas-utils": "0.2.128",
|
|
197
|
-
"@scalar/object-utils": "1.1.13",
|
|
198
|
-
"@scalar/openapi-parser": "0.10.14",
|
|
199
197
|
"@scalar/openapi-types": "0.2.0",
|
|
198
|
+
"@scalar/object-utils": "1.1.13",
|
|
200
199
|
"@scalar/postman-to-openapi": "0.2.1",
|
|
200
|
+
"@scalar/openapi-parser": "0.10.14",
|
|
201
201
|
"@scalar/snippetz": "0.2.19",
|
|
202
202
|
"@scalar/themes": "0.9.84",
|
|
203
|
-
"@scalar/types": "0.1.6",
|
|
204
|
-
"@scalar/use-hooks": "0.1.38",
|
|
205
203
|
"@scalar/use-codemirror": "0.11.90",
|
|
204
|
+
"@scalar/types": "0.1.6",
|
|
206
205
|
"@scalar/use-toasts": "0.7.9",
|
|
207
|
-
"@scalar/use-tooltip": "1.0.6"
|
|
206
|
+
"@scalar/use-tooltip": "1.0.6",
|
|
207
|
+
"@scalar/use-hooks": "0.1.38"
|
|
208
208
|
},
|
|
209
209
|
"devDependencies": {
|
|
210
210
|
"@types/shell-quote": "^1.7.5",
|