@scalar/api-client 2.0.60 → 2.0.62
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 +34 -0
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +16 -15
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +35 -30
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +3 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +114 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +4 -0
- package/dist/layouts/App/create-api-client-app.d.ts +153 -129
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +306 -258
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +153 -129
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
- package/dist/libs/local-storage.js +1 -1
- package/dist/libs/normalizeHeaders.d.ts +1 -2
- package/dist/libs/normalizeHeaders.d.ts.map +1 -1
- package/dist/libs/sendRequest.d.ts +4 -5
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +104 -86
- package/dist/store/workspace.d.ts +302 -257
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +219 -216
- package/dist/style.css +1 -1
- package/dist/views/Environment/Environment.vue2.js +12 -12
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +54 -52
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +4 -4
- package/dist/views/Request/Request.vue2.js +91 -89
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
- 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 +82 -80
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +47 -42
- package/package.json +9 -9
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as c, unref as y, createElementVNode as f, createTextVNode as C, createCommentVNode as i, createElementBlock as A, Fragment as B } from "vue";
|
|
2
|
+
import S from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import g from "./ResponseBody.vue.js";
|
|
5
|
+
import E from "./ResponseEmpty.vue.js";
|
|
6
|
+
import H from "./ResponseLoadingOverlay.vue.js";
|
|
7
7
|
import N from "./ResponseMetaInformation.vue.js";
|
|
8
8
|
import { ScalarIcon as R } from "@scalar/components";
|
|
9
9
|
import V from "./ResponseCookies.vue.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import L from "./ResponseHeaders.vue.js";
|
|
11
|
+
const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, X = /* @__PURE__ */ h({
|
|
12
12
|
__name: "ResponseSection",
|
|
13
13
|
props: {
|
|
14
14
|
response: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
16
|
+
setup(v) {
|
|
17
|
+
const a = v, m = u(() => {
|
|
18
18
|
var s;
|
|
19
|
-
const e = (s =
|
|
19
|
+
const e = (s = a.response) == null ? void 0 : s.headers;
|
|
20
20
|
return e ? Object.keys(e).map((o) => ({
|
|
21
21
|
name: o,
|
|
22
22
|
value: e[o],
|
|
@@ -27,58 +27,63 @@ const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll rel
|
|
|
27
27
|
"X-API-Client-Content-Length"
|
|
28
28
|
].includes(o.name)
|
|
29
29
|
) : [];
|
|
30
|
-
}),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
}), k = u(
|
|
31
|
+
() => {
|
|
32
|
+
var e;
|
|
33
|
+
return ((e = a.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((s) => {
|
|
34
|
+
var l, p;
|
|
35
|
+
const o = (p = (l = a.response) == null ? void 0 : l.headers) == null ? void 0 : p[s];
|
|
36
|
+
return o ? {
|
|
37
|
+
name: s,
|
|
38
|
+
value: o,
|
|
39
|
+
required: !1
|
|
40
|
+
} : [];
|
|
41
|
+
})) ?? [];
|
|
42
|
+
}
|
|
43
|
+
), _ = ["All", "Body", "Headers", "Cookies"], t = x("All");
|
|
44
|
+
return (e, s) => (r(), n($, null, {
|
|
45
|
+
title: d(() => [
|
|
46
|
+
c(y(R), {
|
|
42
47
|
class: "text-c-3 mr-2 rotate-180",
|
|
43
48
|
icon: "ExternalLink",
|
|
44
49
|
size: "sm",
|
|
45
50
|
thickness: "2.5"
|
|
46
51
|
}),
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
f("div", q, [
|
|
53
|
+
C(" Response "),
|
|
49
54
|
e.response ? (r(), n(N, {
|
|
50
55
|
key: 0,
|
|
51
56
|
response: e.response
|
|
52
|
-
}, null, 8, ["response"])) :
|
|
57
|
+
}, null, 8, ["response"])) : i("", !0)
|
|
53
58
|
])
|
|
54
59
|
]),
|
|
55
|
-
default:
|
|
60
|
+
default: d(() => {
|
|
56
61
|
var o;
|
|
57
62
|
return [
|
|
58
|
-
|
|
59
|
-
e.response ? (r(),
|
|
60
|
-
c(
|
|
63
|
+
f("div", I, [
|
|
64
|
+
e.response ? (r(), A(B, { key: 1 }, [
|
|
65
|
+
c(S, {
|
|
61
66
|
activeSection: t.value,
|
|
62
|
-
sections:
|
|
63
|
-
onSetActiveSection: s[0] || (s[0] = (
|
|
67
|
+
sections: _,
|
|
68
|
+
onSetActiveSection: s[0] || (s[0] = (l) => t.value = l)
|
|
64
69
|
}, null, 8, ["activeSection"]),
|
|
65
70
|
t.value === "All" || t.value === "Cookies" ? (r(), n(V, {
|
|
66
71
|
key: 0,
|
|
67
|
-
cookies:
|
|
68
|
-
}, null, 8, ["cookies"])) :
|
|
69
|
-
t.value === "All" || t.value === "Headers" ? (r(), n(
|
|
72
|
+
cookies: k.value
|
|
73
|
+
}, null, 8, ["cookies"])) : i("", !0),
|
|
74
|
+
t.value === "All" || t.value === "Headers" ? (r(), n(L, {
|
|
70
75
|
key: 1,
|
|
71
76
|
headers: m.value
|
|
72
|
-
}, null, 8, ["headers"])) :
|
|
73
|
-
t.value === "All" || t.value === "Body" ? (r(), n(
|
|
77
|
+
}, null, 8, ["headers"])) : i("", !0),
|
|
78
|
+
t.value === "All" || t.value === "Body" ? (r(), n(g, {
|
|
74
79
|
key: 2,
|
|
75
80
|
active: !0,
|
|
76
|
-
data: (o =
|
|
81
|
+
data: (o = a.response) == null ? void 0 : o.data,
|
|
77
82
|
headers: m.value,
|
|
78
83
|
title: "Body"
|
|
79
|
-
}, null, 8, ["data", "headers"])) :
|
|
80
|
-
], 64)) : (r(), n(
|
|
81
|
-
c(
|
|
84
|
+
}, null, 8, ["data", "headers"])) : i("", !0)
|
|
85
|
+
], 64)) : (r(), n(E, { key: 0 })),
|
|
86
|
+
c(H)
|
|
82
87
|
])
|
|
83
88
|
];
|
|
84
89
|
}),
|
|
@@ -87,5 +92,5 @@ const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll rel
|
|
|
87
92
|
}
|
|
88
93
|
});
|
|
89
94
|
export {
|
|
90
|
-
|
|
95
|
+
X as default
|
|
91
96
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.62",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -114,9 +114,7 @@
|
|
|
114
114
|
"dependencies": {
|
|
115
115
|
"@headlessui/tailwindcss": "^0.2.0",
|
|
116
116
|
"@headlessui/vue": "^1.7.20",
|
|
117
|
-
"@scalar/openapi-parser": "^0.7.2",
|
|
118
117
|
"@vueuse/core": "^10.10.0",
|
|
119
|
-
"axios": "^1.6.8",
|
|
120
118
|
"cva": "1.0.0-beta.1",
|
|
121
119
|
"fuse.js": "^7.0.0",
|
|
122
120
|
"js-cookie": "^3.0.5",
|
|
@@ -127,15 +125,17 @@
|
|
|
127
125
|
"vue-router": "^4.3.0",
|
|
128
126
|
"whatwg-mimetype": "^4.0.0",
|
|
129
127
|
"zod": "^3.22.4",
|
|
130
|
-
"@scalar/components": "0.12.
|
|
131
|
-
"@scalar/draggable": "0.1.4",
|
|
132
|
-
"@scalar/oas-utils": "0.2.39",
|
|
128
|
+
"@scalar/components": "0.12.42",
|
|
133
129
|
"@scalar/object-utils": "1.1.7",
|
|
130
|
+
"@scalar/oas-utils": "0.2.41",
|
|
131
|
+
"@scalar/openapi-parser": "0.8.1",
|
|
134
132
|
"@scalar/themes": "0.9.28",
|
|
135
|
-
"@scalar/types": "0.0.
|
|
133
|
+
"@scalar/types": "0.0.6",
|
|
134
|
+
"@scalar/openapi-types": "0.1.0",
|
|
136
135
|
"@scalar/use-codemirror": "0.11.10",
|
|
137
|
-
"@scalar/use-
|
|
138
|
-
"@scalar/
|
|
136
|
+
"@scalar/use-toasts": "0.7.5",
|
|
137
|
+
"@scalar/draggable": "0.1.4",
|
|
138
|
+
"@scalar/use-tooltip": "1.0.2"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@types/content-type": "^1.1.8",
|