@scalar/api-client 2.1.47 → 2.1.48
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 +17 -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 +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +13 -13
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- 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 +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +15 -15
- package/package.json +7 -7
|
@@ -1,4 +1,99 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as L, ref as U, computed as n, openBlock as s, createBlock as u, createSlots as V, withCtx as m, createTextVNode as w, toDisplayString as g, createElementBlock as j, createElementVNode as h, createCommentVNode as c, createVNode as C } from "vue";
|
|
2
|
+
import O from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { extractFilename as T } from "../../../libs/extractAttachmentFilename.js";
|
|
4
|
+
import N from "whatwg-mimetype";
|
|
5
|
+
import S from "./ResponseBodyDownload.vue.js";
|
|
6
|
+
import P from "./ResponseBodyInfo.vue.js";
|
|
7
|
+
import $ from "./ResponseBodyPreview.vue.js";
|
|
8
|
+
import E from "./ResponseBodyRaw.vue.js";
|
|
9
|
+
import F from "./ResponseBodyToggle.vue.js";
|
|
10
|
+
import { mediaTypes as D } from "../consts/mediaTypes.js";
|
|
11
|
+
const I = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "max-h-[calc(100%-32px)] border-1/2 flex flex-col rounded bg-b-1 overflow-hidden"
|
|
14
|
+
}, J = { class: "flex justify-between items-center border-b-1/2 px-3 py-1.5" }, M = { class: "text-xxs leading-3 font-code" }, Z = /* @__PURE__ */ L({
|
|
15
|
+
__name: "ResponseBody",
|
|
16
|
+
props: {
|
|
17
|
+
title: {},
|
|
18
|
+
data: {},
|
|
19
|
+
headers: {}
|
|
20
|
+
},
|
|
21
|
+
setup(b) {
|
|
22
|
+
const a = b, x = (e) => e instanceof Blob, d = U(!0), p = n(
|
|
23
|
+
() => {
|
|
24
|
+
var e;
|
|
25
|
+
return !!((e = o.value) != null && e.raw && o.value.preview);
|
|
26
|
+
}
|
|
27
|
+
), B = n(() => d.value || !p.value), R = n(() => !d.value || !p.value), r = n(() => {
|
|
28
|
+
var t;
|
|
29
|
+
const e = ((t = a.headers.find((l) => l.name.toLowerCase() === "content-type")) == null ? void 0 : t.value) ?? "";
|
|
30
|
+
return new N(e);
|
|
31
|
+
}), _ = n(() => {
|
|
32
|
+
var t;
|
|
33
|
+
const e = ((t = a.headers.find(
|
|
34
|
+
(l) => l.name.toLowerCase() === "content-disposition"
|
|
35
|
+
)) == null ? void 0 : t.value) ?? "";
|
|
36
|
+
return T(e);
|
|
37
|
+
}), o = n(() => D[r.value.essence]), i = n(() => x(a.data) ? URL.createObjectURL(a.data) : typeof a.data == "string" ? URL.createObjectURL(
|
|
38
|
+
new Blob([a.data], { type: r.value.toString() })
|
|
39
|
+
) : a.data instanceof Object && Object.keys(a.data).length ? URL.createObjectURL(
|
|
40
|
+
new Blob([JSON.stringify(a.data)], {
|
|
41
|
+
type: r.value.toString()
|
|
42
|
+
})
|
|
43
|
+
) : "");
|
|
44
|
+
return (e, t) => (s(), u(O, { class: "max-h-content overflow-x-auto" }, V({
|
|
45
|
+
title: m(() => [
|
|
46
|
+
w(g(e.title), 1)
|
|
47
|
+
]),
|
|
48
|
+
default: m(() => {
|
|
49
|
+
var l, v, f, y;
|
|
50
|
+
return [
|
|
51
|
+
e.data ? (s(), j("div", I, [
|
|
52
|
+
h("div", J, [
|
|
53
|
+
h("span", M, g(r.value.essence), 1),
|
|
54
|
+
p.value ? (s(), u(F, {
|
|
55
|
+
key: 0,
|
|
56
|
+
modelValue: d.value,
|
|
57
|
+
"onUpdate:modelValue": t[0] || (t[0] = (k) => d.value = k)
|
|
58
|
+
}, null, 8, ["modelValue"])) : c("", !0)
|
|
59
|
+
]),
|
|
60
|
+
(l = o.value) != null && l.raw && R.value ? (s(), u(E, {
|
|
61
|
+
key: i.value,
|
|
62
|
+
content: e.data,
|
|
63
|
+
language: o.value.language
|
|
64
|
+
}, null, 8, ["content", "language"])) : c("", !0),
|
|
65
|
+
(v = o.value) != null && v.preview && B.value ? (s(), u($, {
|
|
66
|
+
key: i.value,
|
|
67
|
+
alpha: o.value.alpha,
|
|
68
|
+
mode: o.value.preview,
|
|
69
|
+
src: i.value,
|
|
70
|
+
type: r.value.essence
|
|
71
|
+
}, null, 8, ["alpha", "mode", "src", "type"])) : c("", !0),
|
|
72
|
+
!((f = o.value) != null && f.raw) && !((y = o.value) != null && y.preview) ? (s(), u(P, { key: 2 }, {
|
|
73
|
+
default: m(() => t[1] || (t[1] = [
|
|
74
|
+
w(" Binary file ")
|
|
75
|
+
])),
|
|
76
|
+
_: 1
|
|
77
|
+
})) : c("", !0)
|
|
78
|
+
])) : c("", !0)
|
|
79
|
+
];
|
|
80
|
+
}),
|
|
81
|
+
_: 2
|
|
82
|
+
}, [
|
|
83
|
+
e.data && i.value ? {
|
|
84
|
+
name: "actions",
|
|
85
|
+
fn: m(() => [
|
|
86
|
+
C(S, {
|
|
87
|
+
filename: _.value,
|
|
88
|
+
href: i.value,
|
|
89
|
+
type: r.value.essence
|
|
90
|
+
}, null, 8, ["filename", "href", "type"])
|
|
91
|
+
]),
|
|
92
|
+
key: "0"
|
|
93
|
+
} : void 0
|
|
94
|
+
]), 1024));
|
|
95
|
+
}
|
|
96
|
+
});
|
|
2
97
|
export {
|
|
3
|
-
|
|
98
|
+
Z as default
|
|
4
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseCookies.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseCookies.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;
|
|
1
|
+
{"version":3,"file":"ResponseCookies.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseCookies.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAoHF,wBAOG"}
|
|
@@ -5,7 +5,7 @@ import m from "../../../components/DataTable/DataTableText.vue.js";
|
|
|
5
5
|
import k from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
6
6
|
const x = {
|
|
7
7
|
key: 1,
|
|
8
|
-
class: "text-c-3 px-4 text-sm border border-1/2 rounded min-h-12 justify-center flex items-center bg-b-1
|
|
8
|
+
class: "text-c-3 px-4 text-sm border border-1/2 rounded min-h-12 justify-center flex items-center bg-b-1"
|
|
9
9
|
}, N = /* @__PURE__ */ f({
|
|
10
10
|
__name: "ResponseCookies",
|
|
11
11
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AA4PA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0fc4c4e0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -15,7 +15,7 @@ const V = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, B = { cl
|
|
|
15
15
|
s.commandPalette.emit({ commandName: "Create Request" });
|
|
16
16
|
}, i = (a) => {
|
|
17
17
|
a != null && a.createNew && y.name === "request" && m();
|
|
18
|
-
}, k = "2.1.
|
|
18
|
+
}, k = "2.1.48";
|
|
19
19
|
return R(() => s.hotKeys.on(i)), g(() => s.hotKeys.off(i)), (a, e) => (r(), n("div", V, [
|
|
20
20
|
o("div", B, [
|
|
21
21
|
t(f).isReadOnly ? p("", !0) : (r(), n("div", S, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AA0EA,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;;
|
|
1
|
+
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AA0EA,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;;AAyJF,wBAOG"}
|
|
@@ -7,7 +7,7 @@ import b from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
|
7
7
|
import { httpHeaders as g } from "../../../data/httpHeaders.js";
|
|
8
8
|
const w = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "border max-h-[calc(100%-32px)] overflow-y-auto rounded
|
|
10
|
+
class: "border max-h-[calc(100%-32px)] overflow-y-auto rounded"
|
|
11
11
|
}, C = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
@@ -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 r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6fdb06f8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as m, ref as g, openBlock as n, createBlock as i, withCtx as u, createElementVNode as l, normalizeClass as f, createCommentVNode as c, createVNode as v, createElementBlock as y, Fragment as x } from "vue";
|
|
2
|
+
import R from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import S from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import j from "./ResponseBody.vue.js";
|
|
5
5
|
import b from "./ResponseEmpty.vue.js";
|
|
6
6
|
import H from "./ResponseLoadingOverlay.vue.js";
|
|
7
7
|
import V from "./ResponseMetaInformation.vue.js";
|
|
8
8
|
import w from "./ResponseBodyVirtual.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import L from "./ResponseCookies.vue.js";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import z from "./ResponseHeaders.vue.js";
|
|
12
|
+
const E = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ */ _({
|
|
13
13
|
__name: "ResponseSection",
|
|
14
14
|
props: {
|
|
15
15
|
response: {}
|
|
@@ -41,7 +41,7 @@ const z = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
|
|
|
41
41
|
} : [];
|
|
42
42
|
})) ?? [];
|
|
43
43
|
}
|
|
44
|
-
), C = ["All", "Cookies", "Headers", "Body"], a = g("All"),
|
|
44
|
+
), C = ["All", "Cookies", "Headers", "Body"], a = g("All"), A = m(() => {
|
|
45
45
|
var r, p;
|
|
46
46
|
if (!t.response) return !1;
|
|
47
47
|
const e = ((r = t.response.headers) == null ? void 0 : r["content-type"]) || ((p = t.response.headers) == null ? void 0 : p["Content-Type"]);
|
|
@@ -72,11 +72,11 @@ const z = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
|
|
|
72
72
|
"application/x-java-source",
|
|
73
73
|
// Form data
|
|
74
74
|
"application/x-www-form-urlencoded"
|
|
75
|
-
].some((
|
|
75
|
+
].some((T) => e.includes(T)) && (t.response.size ?? 0) > h;
|
|
76
76
|
});
|
|
77
|
-
return (e, s) => (n(), i(
|
|
77
|
+
return (e, s) => (n(), i(S, { "aria-label": "Response" }, {
|
|
78
78
|
title: u(() => [
|
|
79
|
-
l("div",
|
|
79
|
+
l("div", E, [
|
|
80
80
|
l("div", {
|
|
81
81
|
"aria-live": "polite",
|
|
82
82
|
class: f(["flex items-center", { "animate-response-heading": e.response }])
|
|
@@ -88,7 +88,7 @@ const z = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
|
|
|
88
88
|
response: e.response
|
|
89
89
|
}, null, 8, ["response"])) : c("", !0)
|
|
90
90
|
], 2),
|
|
91
|
-
v(
|
|
91
|
+
v(R, {
|
|
92
92
|
activeSection: a.value,
|
|
93
93
|
sections: C,
|
|
94
94
|
onSetActiveSection: s[0] || (s[0] = (o) => a.value = o)
|
|
@@ -99,7 +99,7 @@ const z = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
|
|
|
99
99
|
var o;
|
|
100
100
|
return [
|
|
101
101
|
l("div", {
|
|
102
|
-
class: f(["custom-scroll h-full relative grid gap-[.5px] px-2 xl:px-
|
|
102
|
+
class: f(["custom-scroll h-full relative grid gap-[.5px] px-2 xl:px-3 py-2.5", {
|
|
103
103
|
"content-start": e.response
|
|
104
104
|
}])
|
|
105
105
|
}, [
|
|
@@ -108,15 +108,15 @@ const z = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
|
|
|
108
108
|
key: 0,
|
|
109
109
|
cookies: B.value
|
|
110
110
|
}, null, 8, ["cookies"])) : c("", !0),
|
|
111
|
-
a.value === "All" || a.value === "Headers" ? (n(), i(
|
|
111
|
+
a.value === "All" || a.value === "Headers" ? (n(), i(z, {
|
|
112
112
|
key: 1,
|
|
113
113
|
headers: d.value
|
|
114
114
|
}, null, 8, ["headers"])) : c("", !0),
|
|
115
115
|
a.value === "All" || a.value === "Body" ? (n(), y(x, { key: 2 }, [
|
|
116
|
-
|
|
116
|
+
A.value ? (n(), i(w, {
|
|
117
117
|
key: 0,
|
|
118
118
|
content: t.response.data
|
|
119
|
-
}, null, 8, ["content"])) : (n(), i(
|
|
119
|
+
}, null, 8, ["content"])) : (n(), i(j, {
|
|
120
120
|
key: 1,
|
|
121
121
|
active: !0,
|
|
122
122
|
data: (o = t.response) == null ? void 0 : o.data,
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.48",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -155,17 +155,17 @@
|
|
|
155
155
|
"whatwg-mimetype": "^4.0.0",
|
|
156
156
|
"yaml": "^2.4.5",
|
|
157
157
|
"zod": "^3.23.8",
|
|
158
|
-
"@scalar/components": "0.12.
|
|
158
|
+
"@scalar/components": "0.12.68",
|
|
159
|
+
"@scalar/draggable": "0.1.7",
|
|
159
160
|
"@scalar/icons": "0.1.1",
|
|
160
161
|
"@scalar/import": "0.1.1",
|
|
161
|
-
"@scalar/
|
|
162
|
-
"@scalar/openapi-parser": "0.8.9",
|
|
163
|
-
"@scalar/oas-utils": "0.2.73",
|
|
162
|
+
"@scalar/oas-utils": "0.2.74",
|
|
164
163
|
"@scalar/object-utils": "1.1.12",
|
|
165
|
-
"@scalar/themes": "0.9.47",
|
|
166
164
|
"@scalar/openapi-types": "0.1.5",
|
|
165
|
+
"@scalar/themes": "0.9.48",
|
|
166
|
+
"@scalar/openapi-parser": "0.8.9",
|
|
167
167
|
"@scalar/types": "0.0.19",
|
|
168
|
-
"@scalar/use-codemirror": "0.11.
|
|
168
|
+
"@scalar/use-codemirror": "0.11.35",
|
|
169
169
|
"@scalar/use-toasts": "0.7.7",
|
|
170
170
|
"@scalar/use-tooltip": "1.0.4"
|
|
171
171
|
},
|