@scalar/api-client 2.3.15 → 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 +8 -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 +2 -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/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 +58 -58
- 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/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/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 +6 -6
|
@@ -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
|
},
|
|
@@ -194,17 +194,17 @@
|
|
|
194
194
|
"@scalar/draggable": "0.1.11",
|
|
195
195
|
"@scalar/import": "0.3.11",
|
|
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
203
|
"@scalar/use-codemirror": "0.11.90",
|
|
205
|
-
"@scalar/
|
|
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",
|