@scalar/api-client 2.5.28 → 2.5.30
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 +32 -0
- package/dist/libs/find-request.d.ts +1 -1
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/find-request.js +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +14 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +49 -47
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +202 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +100 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +200 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +64 -44
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +14 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +104 -121
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +9 -0
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +28 -0
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.js +6 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +25 -24
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +13 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as D, computed as v, useId as P, ref as M, watch as S, createBlock as
|
|
1
|
+
import { defineComponent as D, computed as v, useId as P, ref as M, watch as S, createBlock as d, openBlock as r, withCtx as c, createElementVNode as h, withDirectives as s, createCommentVNode as k, createElementBlock as f, createVNode as i, unref as n, vShow as u, Fragment as K, renderList as L, resolveDynamicComponent as Q, toDisplayString as $ } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as C } from "@scalar/components";
|
|
3
|
-
import { canMethodHaveBody as b, isDefined as j, REGEX as
|
|
3
|
+
import { canMethodHaveBody as b, isDefined as j, REGEX as R } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import F from "../../../components/SectionFilter.vue.js";
|
|
5
5
|
import T from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
6
|
import { matchesDomain as W } from "../../../libs/send-request/set-request-cookies.js";
|
|
@@ -29,7 +29,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
29
29
|
workspace: {}
|
|
30
30
|
},
|
|
31
31
|
setup(l) {
|
|
32
|
-
const
|
|
32
|
+
const O = [
|
|
33
33
|
"Auth",
|
|
34
34
|
"Variables",
|
|
35
35
|
"Cookies",
|
|
@@ -37,15 +37,15 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
37
37
|
"Query",
|
|
38
38
|
"Body"
|
|
39
39
|
// 'Scripts',
|
|
40
|
-
], { requestMutators: w, cookies:
|
|
41
|
-
const e = /* @__PURE__ */ new Set(["All", ...
|
|
40
|
+
], { requestMutators: w, cookies: B, securitySchemes: A } = Z(), { layout: m } = x(), q = v(() => {
|
|
41
|
+
const e = /* @__PURE__ */ new Set(["All", ...O]);
|
|
42
42
|
return l.example.parameters.path.length || e.delete("Variables"), b(l.operation.method ?? "get") || e.delete("Body"), y.value && e.delete("Auth"), [...e];
|
|
43
43
|
}), t = v(
|
|
44
44
|
() => Object.fromEntries(
|
|
45
45
|
q.value.map((e) => [e, P()])
|
|
46
46
|
)
|
|
47
47
|
), y = v(
|
|
48
|
-
() =>
|
|
48
|
+
() => m === "modal" && !l.operation.security && !Object.keys(A ?? {}).length
|
|
49
49
|
), a = M("All");
|
|
50
50
|
S(
|
|
51
51
|
() => l.operation,
|
|
@@ -57,7 +57,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
57
57
|
const o = e.target;
|
|
58
58
|
w.edit(l.operation.uid, "summary", o.value);
|
|
59
59
|
}, H = v(
|
|
60
|
-
() => (l.workspace.cookies ?? []).map((e) =>
|
|
60
|
+
() => (l.workspace.cookies ?? []).map((e) => B[e]).filter(j).filter((e) => e.name).filter(
|
|
61
61
|
(e) => {
|
|
62
62
|
var o;
|
|
63
63
|
return W(((o = l.server) == null ? void 0 : o.url) || l.operation.path, e.domain);
|
|
@@ -73,23 +73,23 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
73
73
|
},
|
|
74
74
|
enabled: !0
|
|
75
75
|
}))
|
|
76
|
-
), N = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(
|
|
76
|
+
), N = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(R.PROTOCOL, "") ? l.operation.path.replace(R.PROTOCOL, "") : "Request Name", g = P(), I = Y().getViewComponents("request.section"), U = (e, o) => w.edit(l.operation.uid, e, o);
|
|
77
77
|
return S(
|
|
78
78
|
() => y.value,
|
|
79
79
|
(e) => {
|
|
80
80
|
e && a.value === "Auth" && (a.value = "All");
|
|
81
81
|
}
|
|
82
|
-
), (e, o) => (r(),
|
|
82
|
+
), (e, o) => (r(), d(T, {
|
|
83
83
|
"aria-label": `Request: ${e.operation.summary}`
|
|
84
84
|
}, {
|
|
85
85
|
title: c(() => [
|
|
86
86
|
h("div", _, [
|
|
87
|
-
n(
|
|
87
|
+
n(m) !== "modal" ? (r(), f("label", {
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
90
90
|
for: n(g)
|
|
91
91
|
}, null, 8, ee)) : k("", !0),
|
|
92
|
-
n(
|
|
92
|
+
n(m) !== "modal" ? (r(), f("input", {
|
|
93
93
|
key: 1,
|
|
94
94
|
id: n(g),
|
|
95
95
|
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
@@ -100,7 +100,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
100
100
|
]),
|
|
101
101
|
i(F, {
|
|
102
102
|
modelValue: a.value,
|
|
103
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
103
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => a.value = p),
|
|
104
104
|
filterIds: t.value,
|
|
105
105
|
filters: q.value
|
|
106
106
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
@@ -111,13 +111,14 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
111
111
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col",
|
|
112
112
|
role: a.value === "All" ? "tabpanel" : "none"
|
|
113
113
|
}, [
|
|
114
|
-
e.collection && e.workspace && (n(
|
|
114
|
+
e.collection && e.workspace && (n(m) !== "modal" || Object.keys(n(A) ?? {}).length) ? s((r(), d(X, {
|
|
115
115
|
key: 0,
|
|
116
116
|
id: t.value.Auth,
|
|
117
117
|
class: "request-section-content-auth",
|
|
118
118
|
collection: e.collection,
|
|
119
119
|
envVariables: e.envVariables,
|
|
120
120
|
environment: e.environment,
|
|
121
|
+
isReadOnly: n(m) === "modal",
|
|
121
122
|
layout: "client",
|
|
122
123
|
operation: e.operation,
|
|
123
124
|
role: a.value === "All" ? "none" : "tabpanel",
|
|
@@ -125,7 +126,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
125
126
|
server: e.server,
|
|
126
127
|
title: "Authentication",
|
|
127
128
|
workspace: e.workspace
|
|
128
|
-
}, null, 8, ["id", "collection", "envVariables", "environment", "operation", "role", "selectedSecuritySchemeUids", "server", "workspace"])), [
|
|
129
|
+
}, null, 8, ["id", "collection", "envVariables", "environment", "isReadOnly", "operation", "role", "selectedSecuritySchemeUids", "server", "workspace"])), [
|
|
129
130
|
[
|
|
130
131
|
u,
|
|
131
132
|
!y.value && (a.value === "All" || a.value === "Auth")
|
|
@@ -198,7 +199,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
198
199
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
199
200
|
[u, a.value === "All" || a.value === "Query"]
|
|
200
201
|
]),
|
|
201
|
-
e.operation.method && (a.value === "All" || a.value === "Body") && n(b)(e.operation.method) ? (r(),
|
|
202
|
+
e.operation.method && (a.value === "All" || a.value === "Body") && n(b)(e.operation.method) ? (r(), d(z, {
|
|
202
203
|
key: 1,
|
|
203
204
|
id: t.value.Body,
|
|
204
205
|
class: "request-section-content-body",
|
|
@@ -210,15 +211,15 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
210
211
|
title: "Body",
|
|
211
212
|
workspace: e.workspace
|
|
212
213
|
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : k("", !0),
|
|
213
|
-
(r(!0), f(K, null, L(n(I), (
|
|
214
|
-
key:
|
|
214
|
+
(r(!0), f(K, null, L(n(I), (p) => (r(), d(n(C), {
|
|
215
|
+
key: p.component
|
|
215
216
|
}, {
|
|
216
217
|
default: c(() => [
|
|
217
|
-
s((r(),
|
|
218
|
-
|
|
219
|
-
operation:
|
|
218
|
+
s((r(), d(Q(p.component), {
|
|
219
|
+
operation: e.operation,
|
|
220
|
+
"onUpdate:operation": U
|
|
220
221
|
}, null, 40, ["operation"])), [
|
|
221
|
-
[u, a.value === "All" || a.value ===
|
|
222
|
+
[u, a.value === "All" || a.value === p.title]
|
|
222
223
|
])
|
|
223
224
|
]),
|
|
224
225
|
_: 2
|
|
@@ -229,12 +230,12 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
229
230
|
i(J, {
|
|
230
231
|
class: "request-section-content-code-example -mt-1/2 border-t",
|
|
231
232
|
collection: e.collection,
|
|
233
|
+
environment: e.envVariables,
|
|
232
234
|
example: e.example,
|
|
233
235
|
operation: e.operation,
|
|
234
236
|
server: e.server,
|
|
235
|
-
workspace: e.workspace
|
|
236
|
-
|
|
237
|
-
}, null, 8, ["collection", "example", "operation", "server", "workspace", "environment"])
|
|
237
|
+
workspace: e.workspace
|
|
238
|
+
}, null, 8, ["collection", "environment", "example", "operation", "server", "workspace"])
|
|
238
239
|
]),
|
|
239
240
|
_: 1
|
|
240
241
|
})
|
|
@@ -34,7 +34,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
34
34
|
}));
|
|
35
35
|
}, k = (o) => {
|
|
36
36
|
o != null && o.createNew && g.name === "request" && f();
|
|
37
|
-
}, w = "2.5.
|
|
37
|
+
}, w = "2.5.30";
|
|
38
38
|
return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (u(), i("div", W, [
|
|
39
39
|
s("div", {
|
|
40
40
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.5.
|
|
21
|
+
"version": "2.5.30",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -207,23 +207,23 @@
|
|
|
207
207
|
"yaml": "2.8.0",
|
|
208
208
|
"zod": "3.24.1",
|
|
209
209
|
"@scalar/analytics-client": "1.0.0",
|
|
210
|
-
"@scalar/components": "0.14.
|
|
211
|
-
"@scalar/helpers": "0.0.
|
|
210
|
+
"@scalar/components": "0.14.31",
|
|
211
|
+
"@scalar/helpers": "0.0.10",
|
|
212
212
|
"@scalar/draggable": "0.2.0",
|
|
213
|
-
"@scalar/import": "0.4.20",
|
|
214
213
|
"@scalar/icons": "0.4.7",
|
|
215
|
-
"@scalar/
|
|
216
|
-
"@scalar/
|
|
214
|
+
"@scalar/openapi-parser": "0.20.4",
|
|
215
|
+
"@scalar/object-utils": "1.2.6",
|
|
216
|
+
"@scalar/import": "0.4.22",
|
|
217
|
+
"@scalar/oas-utils": "0.4.26",
|
|
217
218
|
"@scalar/openapi-types": "0.3.7",
|
|
218
|
-
"@scalar/postman-to-openapi": "0.3.
|
|
219
|
+
"@scalar/postman-to-openapi": "0.3.29",
|
|
219
220
|
"@scalar/snippetz": "0.4.9",
|
|
220
221
|
"@scalar/types": "0.2.15",
|
|
221
|
-
"@scalar/
|
|
222
|
-
"@scalar/use-
|
|
223
|
-
"@scalar/use-toasts": "0.8.0",
|
|
224
|
-
"@scalar/workspace-store": "0.15.1",
|
|
222
|
+
"@scalar/use-codemirror": "0.12.32",
|
|
223
|
+
"@scalar/use-hooks": "0.2.4",
|
|
225
224
|
"@scalar/themes": "0.13.16",
|
|
226
|
-
"@scalar/use-
|
|
225
|
+
"@scalar/use-toasts": "0.8.0",
|
|
226
|
+
"@scalar/workspace-store": "0.15.3"
|
|
227
227
|
},
|
|
228
228
|
"devDependencies": {
|
|
229
229
|
"@tailwindcss/vite": "^4.1.7",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"vite": "6.1.6",
|
|
237
237
|
"vite-svg-loader": "^5.1.0",
|
|
238
238
|
"vitest": "^3.2.4",
|
|
239
|
-
"@scalar/build-tooling": "0.2.
|
|
239
|
+
"@scalar/build-tooling": "0.2.7",
|
|
240
240
|
"@scalar/galaxy": "0.5.8"
|
|
241
241
|
},
|
|
242
242
|
"scripts": {
|