@scalar/api-client 2.2.60 → 2.2.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 +29 -0
- package/dist/layouts/App/create-api-client-app.d.ts +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +2 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -83
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAqVA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAe1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkYF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8ab24b0b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as I, useId as L, ref as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import
|
|
5
|
-
import { useLayout as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { getSecurityRequirements as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as I, useId as L, ref as D, computed as h, openBlock as m, createBlock as N, withCtx as d, createElementVNode as i, unref as r, toDisplayString as k, createElementBlock as p, normalizeClass as z, createCommentVNode as E, createVNode as f, Fragment as x, createTextVNode as q } from "vue";
|
|
2
|
+
import { useModal as K, ScalarComboboxMultiselect as W, ScalarButton as F, ScalarIcon as G } from "@scalar/components";
|
|
3
|
+
import { isDefined as H } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
|
+
import { useLayout as P } from "../../../../hooks/useLayout.js";
|
|
6
|
+
import { useWorkspace as Q } from "../../../../store/store.js";
|
|
7
|
+
import X from "./DeleteRequestAuthModal.vue.js";
|
|
8
|
+
import Y from "./RequestAuthDataTable.vue.js";
|
|
9
|
+
import { getSecurityRequirements as Z, formatComplexScheme as _, formatScheme as ee, getSchemeOptions as te } from "../../libs/auth.js";
|
|
10
|
+
const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1" }, he = /* @__PURE__ */ I({
|
|
11
11
|
__name: "RequestAuth",
|
|
12
12
|
props: {
|
|
13
13
|
collection: {},
|
|
@@ -21,123 +21,128 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
21
21
|
workspace: {}
|
|
22
22
|
},
|
|
23
23
|
setup(s) {
|
|
24
|
-
const { layout:
|
|
25
|
-
securitySchemes:
|
|
26
|
-
securitySchemeMutators:
|
|
24
|
+
const { layout: v } = P(), {
|
|
25
|
+
securitySchemes: S,
|
|
26
|
+
securitySchemeMutators: O,
|
|
27
27
|
requestMutators: w,
|
|
28
|
-
collectionMutators:
|
|
29
|
-
} =
|
|
28
|
+
collectionMutators: M
|
|
29
|
+
} = Q(), R = L(), C = D(null), y = K(), b = D(
|
|
30
30
|
null
|
|
31
|
-
), A =
|
|
32
|
-
const e =
|
|
33
|
-
return { filteredRequirements: e.filter((
|
|
34
|
-
}),
|
|
31
|
+
), A = h(() => {
|
|
32
|
+
const e = Z(s.operation, s.collection);
|
|
33
|
+
return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
|
|
34
|
+
}), g = h(() => {
|
|
35
35
|
const { filteredRequirements: e, requirements: t } = A.value;
|
|
36
36
|
if (!t.length) return null;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const n = !t.some(
|
|
38
|
+
(u) => Object.keys(u).length > 1
|
|
39
|
+
) && e.length < t.length, l = n ? "Unlock" : "Lock", c = n ? "Optional" : "Required", j = `${e.length === 1 ? (() => {
|
|
40
|
+
const u = Object.keys(e[0] || {});
|
|
41
|
+
return u.length > 1 ? u.join(" & ") : u[0] || "";
|
|
42
|
+
})() : ""} ${c}`;
|
|
43
|
+
return { icon: l, text: j };
|
|
44
|
+
}), a = h(
|
|
40
45
|
() => s.selectedSecuritySchemeUids.map((e) => {
|
|
41
|
-
if (Array.isArray(e)) return
|
|
42
|
-
const t =
|
|
46
|
+
if (Array.isArray(e)) return _(e, S);
|
|
47
|
+
const t = S[e ?? ""];
|
|
43
48
|
if (t)
|
|
44
|
-
return
|
|
45
|
-
}).filter(
|
|
49
|
+
return ee(t);
|
|
50
|
+
}).filter(H)
|
|
46
51
|
);
|
|
47
|
-
function
|
|
52
|
+
function U(e) {
|
|
48
53
|
var n;
|
|
49
|
-
const t = e.find((
|
|
50
|
-
const c =
|
|
51
|
-
return c.length > 1 ? c :
|
|
54
|
+
const t = e.find((l) => l.payload), o = e.filter((l) => !l.payload).map(({ id: l }) => {
|
|
55
|
+
const c = l.split(",");
|
|
56
|
+
return c.length > 1 ? c : l;
|
|
52
57
|
});
|
|
53
58
|
if (t != null && t.payload) {
|
|
54
|
-
const
|
|
59
|
+
const l = O.add(
|
|
55
60
|
t.payload,
|
|
56
61
|
(n = s.collection) == null ? void 0 : n.uid
|
|
57
62
|
);
|
|
58
|
-
|
|
63
|
+
l && o.push(l.uid);
|
|
59
64
|
}
|
|
60
|
-
V(
|
|
65
|
+
V(o);
|
|
61
66
|
}
|
|
62
67
|
const V = (e) => {
|
|
63
68
|
var t;
|
|
64
|
-
|
|
69
|
+
v === "modal" || s.layout === "reference" ? M.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
|
|
65
70
|
};
|
|
66
|
-
function
|
|
67
|
-
|
|
71
|
+
function $({ id: e, label: t }) {
|
|
72
|
+
b.value = { id: e, label: t }, y.show();
|
|
68
73
|
}
|
|
69
|
-
const
|
|
70
|
-
var
|
|
74
|
+
const B = (e) => {
|
|
75
|
+
var o;
|
|
71
76
|
if (!e) return;
|
|
72
77
|
const t = s.selectedSecuritySchemeUids.filter((n) => {
|
|
73
|
-
const
|
|
74
|
-
return
|
|
78
|
+
const l = e.split(",");
|
|
79
|
+
return l.length > 1 && Array.isArray(n) && l.length === n.length ? n.every((c) => !l.includes(c)) : n !== e;
|
|
75
80
|
});
|
|
76
|
-
V(t), (
|
|
77
|
-
},
|
|
81
|
+
V(t), (o = C.value) == null || o.$el.focus(), y.hide();
|
|
82
|
+
}, T = h(
|
|
78
83
|
() => {
|
|
79
84
|
var e;
|
|
80
|
-
return
|
|
85
|
+
return te(
|
|
81
86
|
A.value.filteredRequirements,
|
|
82
87
|
((e = s.collection) == null ? void 0 : e.securitySchemes) ?? [],
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
S,
|
|
89
|
+
v === "modal" || s.layout === "reference"
|
|
85
90
|
);
|
|
86
91
|
}
|
|
87
92
|
);
|
|
88
|
-
return (e, t) => (
|
|
93
|
+
return (e, t) => (m(), N(J, {
|
|
89
94
|
class: "group/params",
|
|
90
95
|
itemCount: a.value.length,
|
|
91
96
|
layout: e.layout
|
|
92
97
|
}, {
|
|
93
|
-
title:
|
|
98
|
+
title: d(() => [
|
|
94
99
|
i("div", {
|
|
95
|
-
id: r(
|
|
100
|
+
id: r(R),
|
|
96
101
|
class: "inline-flex items-center gap-1"
|
|
97
102
|
}, [
|
|
98
|
-
i("span", null,
|
|
99
|
-
|
|
103
|
+
i("span", null, k(e.title), 1),
|
|
104
|
+
g.value ? (m(), p("span", {
|
|
100
105
|
key: 0,
|
|
101
|
-
class:
|
|
102
|
-
}, g
|
|
103
|
-
], 8,
|
|
106
|
+
class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }])
|
|
107
|
+
}, k(g.value.text), 3)) : E("", !0)
|
|
108
|
+
], 8, le)
|
|
104
109
|
]),
|
|
105
|
-
actions:
|
|
106
|
-
i("div",
|
|
107
|
-
|
|
110
|
+
actions: d(() => [
|
|
111
|
+
i("div", oe, [
|
|
112
|
+
f(r(W), {
|
|
108
113
|
class: "w-72 text-xs",
|
|
109
|
-
isDeletable: r(
|
|
114
|
+
isDeletable: r(v) !== "modal" && e.layout !== "reference",
|
|
110
115
|
modelValue: a.value,
|
|
111
116
|
multiple: "",
|
|
112
|
-
options:
|
|
113
|
-
onDelete:
|
|
114
|
-
"onUpdate:modelValue":
|
|
117
|
+
options: T.value,
|
|
118
|
+
onDelete: $,
|
|
119
|
+
"onUpdate:modelValue": U
|
|
115
120
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
|
|
121
|
+
default: d(() => [
|
|
122
|
+
f(r(F), {
|
|
118
123
|
ref_key: "comboboxButtonRef",
|
|
119
|
-
ref:
|
|
120
|
-
"aria-describedby": r(
|
|
124
|
+
ref: C,
|
|
125
|
+
"aria-describedby": r(R),
|
|
121
126
|
class: "py-0.75 hover:bg-b-3 text-c-1 hover:text-c-1 h-auto px-1.5 font-normal",
|
|
122
127
|
fullWidth: "",
|
|
123
128
|
variant: "ghost"
|
|
124
129
|
}, {
|
|
125
|
-
default:
|
|
126
|
-
var
|
|
130
|
+
default: d(() => {
|
|
131
|
+
var o;
|
|
127
132
|
return [
|
|
128
|
-
i("div",
|
|
129
|
-
a.value.length === 0 ? (
|
|
133
|
+
i("div", ne, [
|
|
134
|
+
a.value.length === 0 ? (m(), p(x, { key: 0 }, [
|
|
130
135
|
t[2] || (t[2] = i("span", { class: "sr-only" }, "Select", -1)),
|
|
131
|
-
t[3] || (t[3] =
|
|
132
|
-
], 64)) : a.value.length === 1 ? (
|
|
136
|
+
t[3] || (t[3] = q(" Auth Type "))
|
|
137
|
+
], 64)) : a.value.length === 1 ? (m(), p(x, { key: 1 }, [
|
|
133
138
|
t[4] || (t[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
134
|
-
|
|
135
|
-
], 64)) : (
|
|
136
|
-
t[5] || (t[5] =
|
|
139
|
+
q(" " + k((o = a.value[0]) == null ? void 0 : o.label), 1)
|
|
140
|
+
], 64)) : (m(), p(x, { key: 2 }, [
|
|
141
|
+
t[5] || (t[5] = q(" Multiple ")),
|
|
137
142
|
t[6] || (t[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
138
143
|
], 64))
|
|
139
144
|
]),
|
|
140
|
-
|
|
145
|
+
f(r(G), {
|
|
141
146
|
class: "ml-1 shrink-0",
|
|
142
147
|
icon: "ChevronDown",
|
|
143
148
|
size: "sm"
|
|
@@ -151,8 +156,8 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
151
156
|
}, 8, ["isDeletable", "modelValue", "options"])
|
|
152
157
|
])
|
|
153
158
|
]),
|
|
154
|
-
default:
|
|
155
|
-
|
|
159
|
+
default: d(() => [
|
|
160
|
+
f(Y, {
|
|
156
161
|
collection: e.collection,
|
|
157
162
|
envVariables: e.envVariables,
|
|
158
163
|
environment: e.environment,
|
|
@@ -161,13 +166,13 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
161
166
|
server: e.server,
|
|
162
167
|
workspace: e.workspace
|
|
163
168
|
}, null, 8, ["collection", "envVariables", "environment", "layout", "selectedSchemeOptions", "server", "workspace"]),
|
|
164
|
-
|
|
165
|
-
scheme:
|
|
166
|
-
state: r(
|
|
167
|
-
onClose: t[0] || (t[0] = (
|
|
168
|
-
onDelete: t[1] || (t[1] = (
|
|
169
|
+
f(X, {
|
|
170
|
+
scheme: b.value,
|
|
171
|
+
state: r(y),
|
|
172
|
+
onClose: t[0] || (t[0] = (o) => r(y).hide()),
|
|
173
|
+
onDelete: t[1] || (t[1] = (o) => {
|
|
169
174
|
var n;
|
|
170
|
-
return
|
|
175
|
+
return B((n = b.value) == null ? void 0 : n.id);
|
|
171
176
|
})
|
|
172
177
|
}, null, 8, ["scheme", "state"])
|
|
173
178
|
]),
|
|
@@ -176,5 +181,5 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
176
181
|
}
|
|
177
182
|
});
|
|
178
183
|
export {
|
|
179
|
-
|
|
184
|
+
he as default
|
|
180
185
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuthTab.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-00684fd6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -36,7 +36,7 @@ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
|
|
|
36
36
|
}));
|
|
37
37
|
}, y = (s) => {
|
|
38
38
|
s != null && s.createNew && w.name === "request" && k();
|
|
39
|
-
}, N = "2.2.
|
|
39
|
+
}, N = "2.2.62";
|
|
40
40
|
return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
|
|
41
41
|
o("div", {
|
|
42
42
|
class: q(["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.2.
|
|
21
|
+
"version": "2.2.62",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -188,21 +188,21 @@
|
|
|
188
188
|
"whatwg-mimetype": "^4.0.0",
|
|
189
189
|
"yaml": "^2.4.5",
|
|
190
190
|
"zod": "^3.23.8",
|
|
191
|
-
"@scalar/components": "0.13.
|
|
191
|
+
"@scalar/components": "0.13.33",
|
|
192
192
|
"@scalar/draggable": "0.1.11",
|
|
193
193
|
"@scalar/icons": "0.1.3",
|
|
194
|
+
"@scalar/import": "0.2.36",
|
|
194
195
|
"@scalar/object-utils": "1.1.13",
|
|
195
|
-
"@scalar/oas-utils": "0.2.
|
|
196
|
+
"@scalar/oas-utils": "0.2.116",
|
|
197
|
+
"@scalar/openapi-parser": "0.10.10",
|
|
196
198
|
"@scalar/openapi-types": "0.1.9",
|
|
197
|
-
"@scalar/
|
|
198
|
-
"@scalar/postman-to-openapi": "0.1.37",
|
|
199
|
-
"@scalar/openapi-parser": "0.10.9",
|
|
200
|
-
"@scalar/themes": "0.9.74",
|
|
199
|
+
"@scalar/postman-to-openapi": "0.1.39",
|
|
201
200
|
"@scalar/snippetz": "0.2.16",
|
|
202
|
-
"@scalar/
|
|
203
|
-
"@scalar/
|
|
201
|
+
"@scalar/themes": "0.9.75",
|
|
202
|
+
"@scalar/types": "0.0.40",
|
|
203
|
+
"@scalar/use-hooks": "0.1.29",
|
|
204
|
+
"@scalar/use-codemirror": "0.11.78",
|
|
204
205
|
"@scalar/use-toasts": "0.7.9",
|
|
205
|
-
"@scalar/use-hooks": "0.1.28",
|
|
206
206
|
"@scalar/use-tooltip": "1.0.6"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
"vite": "^5.4.10",
|
|
220
220
|
"vite-svg-loader": "^5.1.0",
|
|
221
221
|
"vitest": "^1.6.0",
|
|
222
|
-
"@scalar/
|
|
223
|
-
"@scalar/
|
|
222
|
+
"@scalar/build-tooling": "0.1.17",
|
|
223
|
+
"@scalar/galaxy": "0.2.24"
|
|
224
224
|
},
|
|
225
225
|
"scripts": {
|
|
226
226
|
"build": "scalar-build-vite",
|