@scalar/api-client 2.3.10 → 2.3.11
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 +27 -0
- package/dist/layouts/App/create-api-client-app.d.ts +18 -160
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +36 -320
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +18 -160
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +18 -160
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +2 -154
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +16 -6
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +18 -160
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +2 -0
- 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 +35 -33
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +63 -62
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +11 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +81 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +2 -0
- 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 +73 -60
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +1 -0
- package/package.json +13 -13
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { defineComponent as j, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import E from "./
|
|
7
|
-
import O from "./ResponseMetaInformation.vue.js";
|
|
8
|
-
import $ from "./ResponseBodyVirtual.vue.js";
|
|
1
|
+
import { defineComponent as j, computed as u, ref as C, useId as T, openBlock as l, createBlock as i, withCtx as f, createElementVNode as c, normalizeClass as y, createCommentVNode as d, createVNode as h, createElementBlock as k, Fragment as b } from "vue";
|
|
2
|
+
import V from "../../../components/SectionFilter.vue.js";
|
|
3
|
+
import I from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import g from "./RequestHeaders.vue.js";
|
|
5
|
+
import $ from "./ResponseBody.vue.js";
|
|
6
|
+
import E from "./ResponseBodyVirtual.vue.js";
|
|
9
7
|
/* empty css */
|
|
10
|
-
import
|
|
8
|
+
import O from "./ResponseCookies.vue.js";
|
|
9
|
+
import w from "./ResponseEmpty.vue.js";
|
|
11
10
|
import z from "./ResponseHeaders.vue.js";
|
|
12
|
-
|
|
11
|
+
import N from "./ResponseLoadingOverlay.vue.js";
|
|
12
|
+
import S from "./ResponseMetaInformation.vue.js";
|
|
13
|
+
const W = { class: "flex h-8 flex-1 items-center" }, F = ["id", "role"], A = 2e5, _ = /* @__PURE__ */ j({
|
|
13
14
|
__name: "ResponseSection",
|
|
14
15
|
props: {
|
|
15
16
|
numWorkspaceRequests: {},
|
|
16
|
-
response: {}
|
|
17
|
+
response: {},
|
|
18
|
+
requestResult: {}
|
|
17
19
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const m =
|
|
20
|
+
setup(n) {
|
|
21
|
+
const m = u(() => {
|
|
20
22
|
var a;
|
|
21
|
-
const e = (a =
|
|
23
|
+
const e = (a = n.response) == null ? void 0 : a.headers;
|
|
22
24
|
return e ? Object.keys(e).map((o) => ({
|
|
23
25
|
name: o,
|
|
24
26
|
value: e[o] ?? "",
|
|
25
27
|
required: !1
|
|
26
|
-
}))
|
|
27
|
-
|
|
28
|
-
"rest-api-client-content-length",
|
|
29
|
-
"X-API-Client-Content-Length"
|
|
30
|
-
].includes(o.name)
|
|
31
|
-
) : [];
|
|
32
|
-
}), x = c(
|
|
28
|
+
})) : [];
|
|
29
|
+
}), R = u(
|
|
33
30
|
() => {
|
|
34
31
|
var e;
|
|
35
|
-
return ((e =
|
|
36
|
-
var
|
|
37
|
-
const o = (r = (
|
|
32
|
+
return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((a) => {
|
|
33
|
+
var t, r;
|
|
34
|
+
const o = (r = (t = n.response) == null ? void 0 : t.headers) == null ? void 0 : r[a];
|
|
38
35
|
return o ? {
|
|
39
36
|
name: a,
|
|
40
37
|
value: o,
|
|
@@ -42,16 +39,16 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], b = 2e5
|
|
|
42
39
|
} : [];
|
|
43
40
|
})) ?? [];
|
|
44
41
|
}
|
|
45
|
-
),
|
|
42
|
+
), x = ["Cookies", "Headers", "Body"], s = C("All"), v = u(() => ["All", ...x]), p = u(
|
|
46
43
|
() => Object.fromEntries(
|
|
47
|
-
|
|
44
|
+
v.value.map((e) => [e, T()])
|
|
48
45
|
)
|
|
49
|
-
),
|
|
50
|
-
var
|
|
51
|
-
if (!
|
|
46
|
+
), B = u(() => {
|
|
47
|
+
var t, r;
|
|
48
|
+
if (!n.response)
|
|
52
49
|
return !1;
|
|
53
|
-
const e = ((
|
|
54
|
-
return !e || (
|
|
50
|
+
const e = ((t = n.response.headers) == null ? void 0 : t["content-type"]) || ((r = n.response.headers) == null ? void 0 : r["Content-Type"]);
|
|
51
|
+
return !e || (n.response.size ?? 0) <= A || e.includes("text/html") ? !1 : [
|
|
55
52
|
// Text types
|
|
56
53
|
"text/",
|
|
57
54
|
// JSON types
|
|
@@ -78,64 +75,80 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], b = 2e5
|
|
|
78
75
|
"application/x-java-source",
|
|
79
76
|
// Form data
|
|
80
77
|
"application/x-www-form-urlencoded"
|
|
81
|
-
].some((
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
].some((H) => e.includes(H)) && (n.response.size ?? 0) > A;
|
|
79
|
+
}), q = u(
|
|
80
|
+
() => {
|
|
81
|
+
var e;
|
|
82
|
+
return ((e = n.requestResult) == null ? void 0 : e.request.parameters.headers.filter((a) => a.enabled).map((a) => ({
|
|
83
|
+
name: a.key,
|
|
84
|
+
value: a.value,
|
|
85
|
+
required: !0
|
|
86
|
+
}))) ?? [];
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
return (e, a) => (l(), i(I, { "aria-label": "Response" }, {
|
|
90
|
+
title: f(() => [
|
|
91
|
+
c("div", W, [
|
|
92
|
+
c("div", {
|
|
87
93
|
"aria-live": "polite",
|
|
88
94
|
class: y(["flex items-center", { "animate-response-heading": e.response }])
|
|
89
95
|
}, [
|
|
90
|
-
a[1] || (a[1] =
|
|
91
|
-
e.response ? (
|
|
96
|
+
a[1] || (a[1] = c("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
97
|
+
e.response ? (l(), i(S, {
|
|
92
98
|
key: 0,
|
|
93
99
|
class: "animate-response-children",
|
|
94
100
|
response: e.response
|
|
95
|
-
}, null, 8, ["response"])) :
|
|
101
|
+
}, null, 8, ["response"])) : d("", !0)
|
|
96
102
|
], 2),
|
|
97
|
-
h(
|
|
103
|
+
h(V, {
|
|
98
104
|
modelValue: s.value,
|
|
99
105
|
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
|
|
100
106
|
filterIds: p.value,
|
|
101
|
-
filters:
|
|
107
|
+
filters: v.value
|
|
102
108
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
103
109
|
])
|
|
104
110
|
]),
|
|
105
|
-
default:
|
|
106
|
-
var o,
|
|
111
|
+
default: f(() => {
|
|
112
|
+
var o, t, r;
|
|
107
113
|
return [
|
|
108
|
-
|
|
114
|
+
c("div", {
|
|
109
115
|
id: p.value.All,
|
|
110
116
|
class: y(["custom-scroll response-section-content relative grid h-full justify-stretch", {
|
|
111
117
|
"content-start": e.response
|
|
112
118
|
}]),
|
|
113
119
|
role: s.value === "All" && e.response ? "tabpanel" : "none"
|
|
114
120
|
}, [
|
|
115
|
-
e.response ? (
|
|
116
|
-
s.value === "All" || s.value === "Cookies" ? (
|
|
121
|
+
e.response ? (l(), k(b, { key: 1 }, [
|
|
122
|
+
s.value === "All" || s.value === "Cookies" ? (l(), i(O, {
|
|
117
123
|
key: 0,
|
|
118
124
|
class: "response-section-content-cookies",
|
|
119
125
|
id: p.value.Cookies,
|
|
120
|
-
cookies:
|
|
126
|
+
cookies: R.value,
|
|
121
127
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
122
|
-
}, null, 8, ["id", "cookies", "role"])) :
|
|
123
|
-
s.value === "All" || s.value === "Headers" ? (
|
|
128
|
+
}, null, 8, ["id", "cookies", "role"])) : d("", !0),
|
|
129
|
+
s.value === "All" || s.value === "Headers" ? (l(), i(g, {
|
|
124
130
|
key: 1,
|
|
125
131
|
class: "response-section-content-headers",
|
|
126
132
|
id: p.value.Headers,
|
|
133
|
+
headers: q.value,
|
|
134
|
+
role: s.value === "All" ? "none" : "tabpanel"
|
|
135
|
+
}, null, 8, ["id", "headers", "role"])) : d("", !0),
|
|
136
|
+
s.value === "All" || s.value === "Headers" ? (l(), i(z, {
|
|
137
|
+
key: 2,
|
|
138
|
+
class: "response-section-content-headers",
|
|
139
|
+
id: p.value.Headers,
|
|
127
140
|
headers: m.value,
|
|
128
141
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
129
|
-
}, null, 8, ["id", "headers", "role"])) :
|
|
130
|
-
s.value === "All" || s.value === "Body" ? (
|
|
131
|
-
|
|
142
|
+
}, null, 8, ["id", "headers", "role"])) : d("", !0),
|
|
143
|
+
s.value === "All" || s.value === "Body" ? (l(), k(b, { key: 3 }, [
|
|
144
|
+
B.value && typeof ((o = e.response) == null ? void 0 : o.data) == "string" ? (l(), i(E, {
|
|
132
145
|
key: 0,
|
|
133
146
|
id: p.value.Body,
|
|
134
147
|
content: e.response.data,
|
|
135
|
-
data: (
|
|
148
|
+
data: (t = e.response) == null ? void 0 : t.data,
|
|
136
149
|
headers: m.value,
|
|
137
150
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
138
|
-
}, null, 8, ["id", "content", "data", "headers", "role"])) : (
|
|
151
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (l(), i($, {
|
|
139
152
|
key: 1,
|
|
140
153
|
class: "response-section-content-body",
|
|
141
154
|
id: p.value.Body,
|
|
@@ -145,13 +158,13 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], b = 2e5
|
|
|
145
158
|
role: s.value === "All" ? "none" : "tabpanel",
|
|
146
159
|
title: "Body"
|
|
147
160
|
}, null, 8, ["id", "data", "headers", "role"]))
|
|
148
|
-
], 64)) :
|
|
149
|
-
], 64)) : (
|
|
161
|
+
], 64)) : d("", !0)
|
|
162
|
+
], 64)) : (l(), i(w, {
|
|
150
163
|
key: 0,
|
|
151
164
|
numWorkspaceRequests: e.numWorkspaceRequests
|
|
152
165
|
}, null, 8, ["numWorkspaceRequests"])),
|
|
153
|
-
h(
|
|
154
|
-
], 10,
|
|
166
|
+
h(N)
|
|
167
|
+
], 10, F)
|
|
155
168
|
];
|
|
156
169
|
}),
|
|
157
170
|
_: 1
|
|
@@ -159,5 +172,5 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], b = 2e5
|
|
|
159
172
|
}
|
|
160
173
|
});
|
|
161
174
|
export {
|
|
162
|
-
|
|
175
|
+
_ as default
|
|
163
176
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA6GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
|
|
@@ -10,6 +10,7 @@ const n = {
|
|
|
10
10
|
raw: !0,
|
|
11
11
|
language: "json"
|
|
12
12
|
},
|
|
13
|
+
"application/vnd.api+json": { extension: ".json", raw: !0, language: "json" },
|
|
13
14
|
"application/msword": { extension: ".doc" },
|
|
14
15
|
"application/octet-stream": { extension: ".bin" },
|
|
15
16
|
"application/ogg": { extension: ".ogx" },
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.3.
|
|
21
|
+
"version": "2.3.11",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -189,21 +189,21 @@
|
|
|
189
189
|
"whatwg-mimetype": "^4.0.0",
|
|
190
190
|
"yaml": "^2.4.5",
|
|
191
191
|
"zod": "^3.23.8",
|
|
192
|
-
"@scalar/components": "0.13.
|
|
193
|
-
"@scalar/draggable": "0.1.11",
|
|
192
|
+
"@scalar/components": "0.13.42",
|
|
194
193
|
"@scalar/icons": "0.1.3",
|
|
195
|
-
"@scalar/
|
|
196
|
-
"@scalar/
|
|
197
|
-
"@scalar/oas-utils": "0.2.124",
|
|
198
|
-
"@scalar/openapi-types": "0.1.9",
|
|
199
|
-
"@scalar/postman-to-openapi": "0.1.47",
|
|
194
|
+
"@scalar/draggable": "0.1.11",
|
|
195
|
+
"@scalar/import": "0.3.8",
|
|
200
196
|
"@scalar/object-utils": "1.1.13",
|
|
201
|
-
"@scalar/
|
|
202
|
-
"@scalar/
|
|
203
|
-
"@scalar/
|
|
204
|
-
"@scalar/
|
|
197
|
+
"@scalar/openapi-parser": "0.10.13",
|
|
198
|
+
"@scalar/oas-utils": "0.2.125",
|
|
199
|
+
"@scalar/openapi-types": "0.2.0",
|
|
200
|
+
"@scalar/snippetz": "0.2.19",
|
|
201
|
+
"@scalar/postman-to-openapi": "0.1.48",
|
|
202
|
+
"@scalar/themes": "0.9.83",
|
|
203
|
+
"@scalar/types": "0.1.5",
|
|
204
|
+
"@scalar/use-codemirror": "0.11.87",
|
|
205
205
|
"@scalar/use-toasts": "0.7.9",
|
|
206
|
-
"@scalar/use-
|
|
206
|
+
"@scalar/use-hooks": "0.1.37",
|
|
207
207
|
"@scalar/use-tooltip": "1.0.6"
|
|
208
208
|
},
|
|
209
209
|
"devDependencies": {
|