@scalar/api-reference 1.25.11 → 1.25.12
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 +38 -0
- package/dist/browser/standalone.js +12142 -11718
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiClientModal.vue.js +37 -32
- package/dist/components/Content/Authentication/Authentication.stories.d.ts.map +1 -1
- package/dist/components/api-client-bus.d.ts +3 -3
- package/dist/components/api-client-bus.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +81 -87
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +18 -15
- package/dist/index.js +1 -1
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecurityScheme.vue.js +1 -1
- package/dist/legacy/components/SecurityScheme.vue2.js +158 -129
- package/dist/legacy/fixtures/httpRequestMethods.d.ts +1 -1
- package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +1 -1
- package/dist/legacy/helpers/normalizeHeaders.js +5 -5
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts +1 -1
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -1
- package/dist/legacy/helpers/normalizeRequestMethod.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityScheme.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecurityScheme.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SecurityScheme.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecurityScheme.vue"],"names":[],"mappings":"AAqhBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;;YAkBxE,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;YAHV,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;AAixBhB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SecurityScheme.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a66a7911"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,74 +1,103 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { concatenateUrlAndPath as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import
|
|
5
|
-
import te from "./
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as Q, computed as X, openBlock as l, createBlock as f, withModifiers as Y, withCtx as o, unref as u, createElementBlock as g, Fragment as P, createTextVNode as i, toDisplayString as Z, createCommentVNode as w, createVNode as c, createElementVNode as W } from "vue";
|
|
2
|
+
import { concatenateUrlAndPath as _, redirectToProxy as x } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { useToasts as ee } from "@scalar/use-toasts";
|
|
4
|
+
import { apiClientBus as C } from "../../components/api-client-bus.js";
|
|
5
|
+
import te from "./CardForm.vue.js";
|
|
6
|
+
import ae from "./CardFormButton.vue.js";
|
|
7
|
+
import S from "./CardFormGroup.vue.js";
|
|
7
8
|
import j from "./CardFormRows.vue.js";
|
|
8
9
|
import v from "./CardFormTextInput.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import { useServerStore as
|
|
10
|
+
import R from "./SecuritySchemeScopes.vue.js";
|
|
11
|
+
import { useServerStore as re } from "../stores/useServerStore.js";
|
|
11
12
|
import { getUrlFromServerState as oe } from "../helpers/getUrlFromServerState.js";
|
|
12
13
|
import { useAuthenticationStore as se } from "../stores/useAuthenticationStore.js";
|
|
13
|
-
const
|
|
14
|
+
const ke = /* @__PURE__ */ Q({
|
|
14
15
|
__name: "SecurityScheme",
|
|
15
16
|
props: {
|
|
16
17
|
value: {},
|
|
17
18
|
proxy: {}
|
|
18
19
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const { toast:
|
|
20
|
+
setup(ue) {
|
|
21
|
+
const { toast: L } = ee(), { server: N } = re(), { authentication: t, setAuthentication: p } = se(), V = (e) => {
|
|
22
|
+
const a = e.target.value;
|
|
21
23
|
p({
|
|
22
24
|
apiKey: {
|
|
23
25
|
...t.apiKey,
|
|
24
|
-
token:
|
|
26
|
+
token: a
|
|
27
|
+
}
|
|
28
|
+
}), t.preferredSecurityScheme && C.emit({
|
|
29
|
+
updateAuth: {
|
|
30
|
+
nameKey: t.preferredSecurityScheme,
|
|
31
|
+
propertyKey: "value",
|
|
32
|
+
value: a
|
|
25
33
|
}
|
|
26
34
|
});
|
|
27
|
-
},
|
|
35
|
+
}, D = (e) => {
|
|
36
|
+
const a = e.target.value;
|
|
28
37
|
p({
|
|
29
38
|
http: {
|
|
30
39
|
...t.http,
|
|
31
40
|
basic: {
|
|
32
41
|
...t.http.basic,
|
|
33
|
-
username:
|
|
42
|
+
username: a
|
|
34
43
|
}
|
|
35
44
|
}
|
|
45
|
+
}), t.preferredSecurityScheme && C.emit({
|
|
46
|
+
updateAuth: {
|
|
47
|
+
nameKey: t.preferredSecurityScheme,
|
|
48
|
+
propertyKey: "username",
|
|
49
|
+
value: a
|
|
50
|
+
}
|
|
36
51
|
});
|
|
37
|
-
},
|
|
52
|
+
}, E = (e) => {
|
|
53
|
+
const a = e.target.value;
|
|
38
54
|
p({
|
|
39
55
|
http: {
|
|
40
56
|
...t.http,
|
|
41
57
|
basic: {
|
|
42
58
|
...t.http.basic,
|
|
43
|
-
password:
|
|
59
|
+
password: a
|
|
44
60
|
}
|
|
45
61
|
}
|
|
62
|
+
}), t.preferredSecurityScheme && C.emit({
|
|
63
|
+
updateAuth: {
|
|
64
|
+
nameKey: t.preferredSecurityScheme,
|
|
65
|
+
propertyKey: "password",
|
|
66
|
+
value: a
|
|
67
|
+
}
|
|
46
68
|
});
|
|
47
|
-
},
|
|
69
|
+
}, H = (e) => {
|
|
70
|
+
const a = e.target.value;
|
|
48
71
|
p({
|
|
49
72
|
http: {
|
|
50
73
|
...t.http,
|
|
51
74
|
bearer: {
|
|
52
75
|
...t.http.bearer,
|
|
53
|
-
token:
|
|
76
|
+
token: a
|
|
54
77
|
}
|
|
55
78
|
}
|
|
79
|
+
}), t.preferredSecurityScheme && C.emit({
|
|
80
|
+
updateAuth: {
|
|
81
|
+
nameKey: t.preferredSecurityScheme,
|
|
82
|
+
propertyKey: "token",
|
|
83
|
+
value: a
|
|
84
|
+
}
|
|
56
85
|
});
|
|
57
|
-
},
|
|
86
|
+
}, T = (e) => {
|
|
58
87
|
p({
|
|
59
88
|
oAuth2: {
|
|
60
89
|
...t.oAuth2,
|
|
61
90
|
clientId: e.target.value
|
|
62
91
|
}
|
|
63
92
|
});
|
|
64
|
-
},
|
|
93
|
+
}, M = (e) => {
|
|
65
94
|
p({
|
|
66
95
|
oAuth2: {
|
|
67
96
|
...t.oAuth2,
|
|
68
97
|
username: e.target.value
|
|
69
98
|
}
|
|
70
99
|
});
|
|
71
|
-
},
|
|
100
|
+
}, G = (e) => {
|
|
72
101
|
p({
|
|
73
102
|
oAuth2: {
|
|
74
103
|
...t.oAuth2,
|
|
@@ -76,58 +105,58 @@ const Ae = /* @__PURE__ */ J({
|
|
|
76
105
|
}
|
|
77
106
|
});
|
|
78
107
|
};
|
|
79
|
-
function
|
|
80
|
-
const a = t.oAuth2.scopes.join(" "),
|
|
108
|
+
function $(e) {
|
|
109
|
+
const a = t.oAuth2.scopes.join(" "), n = (Math.random() + 1).toString(36).substring(7), r = new URL(e.authorizationUrl);
|
|
81
110
|
return p({
|
|
82
|
-
oAuth2: { ...t.oAuth2, state:
|
|
83
|
-
}),
|
|
111
|
+
oAuth2: { ...t.oAuth2, state: n }
|
|
112
|
+
}), r.searchParams.set("response_type", "token"), r.searchParams.set("client_id", t.oAuth2.clientId), r.searchParams.set("redirect_uri", window.location.href), r.searchParams.set("scope", a), r.searchParams.set("state", n), r.toString();
|
|
84
113
|
}
|
|
85
|
-
function
|
|
114
|
+
function q(e, a) {
|
|
86
115
|
if (typeof e != "string") {
|
|
87
116
|
console.log("tokenUrl is not a string");
|
|
88
117
|
return;
|
|
89
118
|
}
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
a != null && a.proxy ?
|
|
119
|
+
const n = a != null && a.baseUrl && !e.startsWith("http") ? _(a == null ? void 0 : a.baseUrl, e) : e, r = new URL(n);
|
|
120
|
+
r.searchParams.set("grant_type", "password"), r.searchParams.set("username", t.oAuth2.username), r.searchParams.set("password", t.oAuth2.password), r.searchParams.set("client_id", t.oAuth2.clientId), r.searchParams.set("scope", t.oAuth2.scopes.join(" ")), fetch(
|
|
121
|
+
a != null && a.proxy ? x(a == null ? void 0 : a.proxy, r.toString()) : r.toString(),
|
|
93
122
|
{
|
|
94
123
|
method: "POST",
|
|
95
124
|
headers: {
|
|
96
125
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
97
126
|
}
|
|
98
127
|
}
|
|
99
|
-
).then((
|
|
100
|
-
if (!
|
|
128
|
+
).then((s) => {
|
|
129
|
+
if (!s.ok)
|
|
101
130
|
throw new Error(
|
|
102
131
|
"Failed to get an access token. Please check your credentials."
|
|
103
132
|
);
|
|
104
|
-
return
|
|
105
|
-
}).then((
|
|
133
|
+
return s.json();
|
|
134
|
+
}).then((s) => {
|
|
106
135
|
p({
|
|
107
|
-
oAuth2: { ...t.oAuth2, accessToken:
|
|
136
|
+
oAuth2: { ...t.oAuth2, accessToken: s.access_token }
|
|
108
137
|
});
|
|
109
|
-
}).catch((
|
|
110
|
-
|
|
138
|
+
}).catch((s) => {
|
|
139
|
+
L("Couldn’t retrieve the password grant token", "warn", {
|
|
111
140
|
description: "Open your browser console to get more information."
|
|
112
|
-
}), console.error("[authorizeWithPassword]",
|
|
141
|
+
}), console.error("[authorizeWithPassword]", s);
|
|
113
142
|
});
|
|
114
143
|
}
|
|
115
|
-
const
|
|
144
|
+
const b = X({
|
|
116
145
|
get: () => t.oAuth2.scopes,
|
|
117
146
|
set: (e) => p({ oAuth2: { ...t.oAuth2, scopes: e } })
|
|
118
|
-
}),
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
const
|
|
122
|
-
var
|
|
147
|
+
}), J = (e) => {
|
|
148
|
+
const n = window.open(e, "openAuth2Window", "left=100,top=100,width=800,height=600");
|
|
149
|
+
if (n) {
|
|
150
|
+
const r = setInterval(function() {
|
|
151
|
+
var s;
|
|
123
152
|
try {
|
|
124
|
-
const h = new URLSearchParams(
|
|
125
|
-
if (
|
|
126
|
-
clearInterval(
|
|
127
|
-
const m = (
|
|
153
|
+
const h = new URLSearchParams(n.location.href).get("access_token");
|
|
154
|
+
if (n.closed || h) {
|
|
155
|
+
clearInterval(r);
|
|
156
|
+
const m = (s = n.location.href.match(/state=([^&]*)/)) == null ? void 0 : s[1];
|
|
128
157
|
h && t.oAuth2.state === m && p({
|
|
129
158
|
oAuth2: { ...t.oAuth2, accessToken: h }
|
|
130
|
-
}),
|
|
159
|
+
}), n.close();
|
|
131
160
|
}
|
|
132
161
|
} catch {
|
|
133
162
|
}
|
|
@@ -135,90 +164,90 @@ const Ae = /* @__PURE__ */ J({
|
|
|
135
164
|
}
|
|
136
165
|
};
|
|
137
166
|
return (e, a) => {
|
|
138
|
-
var
|
|
139
|
-
return e.value && ((
|
|
167
|
+
var n;
|
|
168
|
+
return e.value && ((n = e.value) != null && n.type) ? (l(), f(te, {
|
|
140
169
|
key: 0,
|
|
141
|
-
onSubmit: a[5] || (a[5] =
|
|
170
|
+
onSubmit: a[5] || (a[5] = Y(() => {
|
|
142
171
|
}, ["prevent"]))
|
|
143
172
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
e.value.type === "apiKey" ? (
|
|
173
|
+
default: o(() => [
|
|
174
|
+
e.value.type === "apiKey" ? (l(), f(v, {
|
|
146
175
|
key: 0,
|
|
147
176
|
id: `security-scheme-${e.value.name}`,
|
|
148
177
|
placeholder: "Token",
|
|
149
178
|
type: "password",
|
|
150
179
|
value: u(t).apiKey.token,
|
|
151
|
-
onInput:
|
|
180
|
+
onInput: V
|
|
152
181
|
}, {
|
|
153
|
-
default:
|
|
154
|
-
var
|
|
182
|
+
default: o(() => {
|
|
183
|
+
var r, s, d;
|
|
155
184
|
return [
|
|
156
|
-
e.value.in ? (
|
|
157
|
-
i(
|
|
158
|
-
], 64)) :
|
|
185
|
+
e.value.in ? (l(), g(P, { key: 0 }, [
|
|
186
|
+
i(Z(((s = (r = e.value.in) == null ? void 0 : r.charAt(0)) == null ? void 0 : s.toUpperCase()) + ((d = e.value.in) == null ? void 0 : d.slice(1))), 1)
|
|
187
|
+
], 64)) : w("", !0),
|
|
159
188
|
i(" API ")
|
|
160
189
|
];
|
|
161
190
|
}),
|
|
162
191
|
_: 1
|
|
163
|
-
}, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (
|
|
164
|
-
e.value.type === "basic" || e.value.scheme === "basic" ? (
|
|
165
|
-
default:
|
|
166
|
-
|
|
192
|
+
}, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (l(), g(P, { key: 1 }, [
|
|
193
|
+
e.value.type === "basic" || e.value.scheme === "basic" ? (l(), f(S, { key: 0 }, {
|
|
194
|
+
default: o(() => [
|
|
195
|
+
c(v, {
|
|
167
196
|
id: "http.basic.username",
|
|
168
197
|
placeholder: "Username",
|
|
169
198
|
value: u(t).http.basic.username,
|
|
170
|
-
onInput:
|
|
199
|
+
onInput: D
|
|
171
200
|
}, {
|
|
172
|
-
default:
|
|
201
|
+
default: o(() => [
|
|
173
202
|
i(" Username ")
|
|
174
203
|
]),
|
|
175
204
|
_: 1
|
|
176
205
|
}, 8, ["value"]),
|
|
177
|
-
|
|
206
|
+
c(v, {
|
|
178
207
|
id: "http.basic.password",
|
|
179
208
|
placeholder: "Password",
|
|
180
209
|
type: "password",
|
|
181
210
|
value: u(t).http.basic.password,
|
|
182
|
-
onInput:
|
|
211
|
+
onInput: E
|
|
183
212
|
}, {
|
|
184
|
-
default:
|
|
213
|
+
default: o(() => [
|
|
185
214
|
i(" Password ")
|
|
186
215
|
]),
|
|
187
216
|
_: 1
|
|
188
217
|
}, 8, ["value"])
|
|
189
218
|
]),
|
|
190
219
|
_: 1
|
|
191
|
-
})) : e.value.type === "http" && e.value.scheme === "bearer" ? (
|
|
220
|
+
})) : e.value.type === "http" && e.value.scheme === "bearer" ? (l(), f(v, {
|
|
192
221
|
key: 1,
|
|
193
222
|
id: "http.bearer.token",
|
|
194
223
|
placeholder: "Token",
|
|
195
224
|
type: "password",
|
|
196
225
|
value: u(t).http.bearer.token,
|
|
197
|
-
onInput:
|
|
226
|
+
onInput: H
|
|
198
227
|
}, {
|
|
199
|
-
default:
|
|
228
|
+
default: o(() => [
|
|
200
229
|
i(" Bearer Token ")
|
|
201
230
|
]),
|
|
202
231
|
_: 1
|
|
203
|
-
}, 8, ["value"])) :
|
|
204
|
-
], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (
|
|
205
|
-
default:
|
|
206
|
-
var
|
|
232
|
+
}, 8, ["value"])) : w("", !0)
|
|
233
|
+
], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (l(), f(S, { key: 2 }, {
|
|
234
|
+
default: o(() => {
|
|
235
|
+
var r, s;
|
|
207
236
|
return [
|
|
208
|
-
e.value.flows.implicit ? (
|
|
209
|
-
u(t).oAuth2.accessToken ? (
|
|
210
|
-
|
|
237
|
+
e.value.flows.implicit ? (l(), g(P, { key: 0 }, [
|
|
238
|
+
u(t).oAuth2.accessToken ? (l(), g(P, { key: 0 }, [
|
|
239
|
+
c(v, {
|
|
211
240
|
id: "oAuth2.accessToken",
|
|
212
241
|
placeholder: "xxxxx",
|
|
213
242
|
type: "password",
|
|
214
243
|
value: u(t).oAuth2.accessToken
|
|
215
244
|
}, {
|
|
216
|
-
default:
|
|
245
|
+
default: o(() => [
|
|
217
246
|
i(" Access Token ")
|
|
218
247
|
]),
|
|
219
248
|
_: 1
|
|
220
249
|
}, 8, ["value"]),
|
|
221
|
-
|
|
250
|
+
c(ae, {
|
|
222
251
|
onClick: a[0] || (a[0] = () => u(p)({
|
|
223
252
|
oAuth2: {
|
|
224
253
|
...u(t).oAuth2,
|
|
@@ -227,36 +256,36 @@ const Ae = /* @__PURE__ */ J({
|
|
|
227
256
|
}
|
|
228
257
|
}))
|
|
229
258
|
}, {
|
|
230
|
-
default:
|
|
259
|
+
default: o(() => [
|
|
231
260
|
i(" Reset ")
|
|
232
261
|
]),
|
|
233
262
|
_: 1
|
|
234
263
|
})
|
|
235
|
-
], 64)) :
|
|
236
|
-
], 64)) :
|
|
237
|
-
(
|
|
238
|
-
default:
|
|
239
|
-
|
|
240
|
-
default:
|
|
241
|
-
|
|
264
|
+
], 64)) : w("", !0)
|
|
265
|
+
], 64)) : w("", !0),
|
|
266
|
+
(s = (r = e.value) == null ? void 0 : r.flows) != null && s.password ? (l(), f(j, { key: 1 }, {
|
|
267
|
+
default: o(() => [
|
|
268
|
+
c(S, null, {
|
|
269
|
+
default: o(() => [
|
|
270
|
+
c(v, {
|
|
242
271
|
id: "oAuth2.username",
|
|
243
272
|
placeholder: "Username",
|
|
244
273
|
value: u(t).oAuth2.username,
|
|
245
|
-
onInput:
|
|
274
|
+
onInput: M
|
|
246
275
|
}, {
|
|
247
|
-
default:
|
|
276
|
+
default: o(() => [
|
|
248
277
|
i(" Username ")
|
|
249
278
|
]),
|
|
250
279
|
_: 1
|
|
251
280
|
}, 8, ["value"]),
|
|
252
|
-
|
|
281
|
+
c(v, {
|
|
253
282
|
id: "oAuth2.password",
|
|
254
283
|
placeholder: "Password",
|
|
255
284
|
type: "password",
|
|
256
285
|
value: u(t).oAuth2.password,
|
|
257
|
-
onInput:
|
|
286
|
+
onInput: G
|
|
258
287
|
}, {
|
|
259
|
-
default:
|
|
288
|
+
default: o(() => [
|
|
260
289
|
i(" Password ")
|
|
261
290
|
]),
|
|
262
291
|
_: 1
|
|
@@ -264,39 +293,39 @@ const Ae = /* @__PURE__ */ J({
|
|
|
264
293
|
]),
|
|
265
294
|
_: 1
|
|
266
295
|
}),
|
|
267
|
-
|
|
268
|
-
default:
|
|
269
|
-
var
|
|
296
|
+
c(S, null, {
|
|
297
|
+
default: o(() => {
|
|
298
|
+
var d, h, m, y, A, k, U, K, F, B, O;
|
|
270
299
|
return [
|
|
271
|
-
|
|
300
|
+
c(v, {
|
|
272
301
|
id: "oAuth2.clientId",
|
|
273
302
|
placeholder: "12345",
|
|
274
303
|
type: "text",
|
|
275
304
|
value: u(t).oAuth2.clientId,
|
|
276
|
-
onInput:
|
|
305
|
+
onInput: T
|
|
277
306
|
}, {
|
|
278
|
-
default:
|
|
307
|
+
default: o(() => [
|
|
279
308
|
i(" Client ID ")
|
|
280
309
|
]),
|
|
281
310
|
_: 1
|
|
282
311
|
}, 8, ["value"]),
|
|
283
312
|
e.value !== void 0 && Object.entries(
|
|
284
|
-
((m = (h = (
|
|
285
|
-
).length > 0 ? (
|
|
313
|
+
((m = (h = (d = e.value) == null ? void 0 : d.flows) == null ? void 0 : h.implicit) == null ? void 0 : m.scopes) ?? ((k = (A = (y = e.value) == null ? void 0 : y.flows) == null ? void 0 : A.password) == null ? void 0 : k.scopes) ?? {}
|
|
314
|
+
).length > 0 ? (l(), f(R, {
|
|
286
315
|
key: 0,
|
|
287
|
-
selected:
|
|
288
|
-
"onUpdate:selected": a[1] || (a[1] = (
|
|
289
|
-
scopes: ((F = (
|
|
290
|
-
}, null, 8, ["selected", "scopes"])) :
|
|
316
|
+
selected: b.value,
|
|
317
|
+
"onUpdate:selected": a[1] || (a[1] = (I) => b.value = I),
|
|
318
|
+
scopes: ((F = (K = (U = e.value) == null ? void 0 : U.flows) == null ? void 0 : K.implicit) == null ? void 0 : F.scopes) ?? ((O = (B = e.value) == null ? void 0 : B.flows) == null ? void 0 : O.password.scopes)
|
|
319
|
+
}, null, 8, ["selected", "scopes"])) : w("", !0),
|
|
291
320
|
W("button", {
|
|
292
321
|
class: "cardform-auth-button",
|
|
293
322
|
type: "button",
|
|
294
323
|
onClick: a[2] || (a[2] = () => {
|
|
295
|
-
var
|
|
296
|
-
return
|
|
297
|
-
(z = (
|
|
324
|
+
var I, z;
|
|
325
|
+
return q(
|
|
326
|
+
(z = (I = e.value.flows) == null ? void 0 : I.password) == null ? void 0 : z.tokenUrl,
|
|
298
327
|
{
|
|
299
|
-
baseUrl: u(oe)(u(
|
|
328
|
+
baseUrl: u(oe)(u(N)),
|
|
300
329
|
proxy: e.proxy
|
|
301
330
|
}
|
|
302
331
|
);
|
|
@@ -308,40 +337,40 @@ const Ae = /* @__PURE__ */ J({
|
|
|
308
337
|
})
|
|
309
338
|
]),
|
|
310
339
|
_: 1
|
|
311
|
-
})) : (
|
|
312
|
-
default:
|
|
313
|
-
|
|
314
|
-
default:
|
|
315
|
-
var
|
|
340
|
+
})) : (l(), f(j, { key: 2 }, {
|
|
341
|
+
default: o(() => [
|
|
342
|
+
c(S, null, {
|
|
343
|
+
default: o(() => {
|
|
344
|
+
var d, h;
|
|
316
345
|
return [
|
|
317
|
-
|
|
346
|
+
c(v, {
|
|
318
347
|
id: "oAuth2.clientId",
|
|
319
348
|
placeholder: "12345",
|
|
320
349
|
type: "text",
|
|
321
350
|
value: u(t).oAuth2.clientId,
|
|
322
|
-
onInput:
|
|
351
|
+
onInput: T
|
|
323
352
|
}, {
|
|
324
|
-
default:
|
|
353
|
+
default: o(() => [
|
|
325
354
|
i(" Client ID ")
|
|
326
355
|
]),
|
|
327
356
|
_: 1
|
|
328
357
|
}, 8, ["value"]),
|
|
329
358
|
e.value !== void 0 && Object.entries(
|
|
330
|
-
((
|
|
331
|
-
).length > 0 ? (
|
|
359
|
+
((d = e.value.flows.implicit) == null ? void 0 : d.scopes) ?? e.value.flows.password.scopes
|
|
360
|
+
).length > 0 ? (l(), f(R, {
|
|
332
361
|
key: 0,
|
|
333
|
-
selected:
|
|
334
|
-
"onUpdate:selected": a[3] || (a[3] = (m) =>
|
|
362
|
+
selected: b.value,
|
|
363
|
+
"onUpdate:selected": a[3] || (a[3] = (m) => b.value = m),
|
|
335
364
|
scopes: ((h = e.value.flows.implicit) == null ? void 0 : h.scopes) ?? e.value.flows.password.scopes
|
|
336
|
-
}, null, 8, ["selected", "scopes"])) :
|
|
365
|
+
}, null, 8, ["selected", "scopes"])) : w("", !0),
|
|
337
366
|
W("button", {
|
|
338
367
|
class: "cardform-auth-button",
|
|
339
368
|
type: "button",
|
|
340
369
|
onClick: a[4] || (a[4] = () => {
|
|
341
|
-
var m,
|
|
342
|
-
return
|
|
343
|
-
|
|
344
|
-
((
|
|
370
|
+
var m, y, A, k;
|
|
371
|
+
return J(
|
|
372
|
+
$(
|
|
373
|
+
((y = (m = e.value) == null ? void 0 : m.flows) == null ? void 0 : y.implicit) ?? ((k = (A = e.value) == null ? void 0 : A.flows) == null ? void 0 : k.password)
|
|
345
374
|
)
|
|
346
375
|
);
|
|
347
376
|
})
|
|
@@ -356,13 +385,13 @@ const Ae = /* @__PURE__ */ J({
|
|
|
356
385
|
];
|
|
357
386
|
}),
|
|
358
387
|
_: 1
|
|
359
|
-
})) :
|
|
388
|
+
})) : w("", !0)
|
|
360
389
|
]),
|
|
361
390
|
_: 1
|
|
362
|
-
})) :
|
|
391
|
+
})) : w("", !0);
|
|
363
392
|
};
|
|
364
393
|
}
|
|
365
394
|
});
|
|
366
395
|
export {
|
|
367
|
-
|
|
396
|
+
ke as default
|
|
368
397
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const validRequestMethods: readonly ["GET", "POST", "PUT", "HEAD", "DELETE", "PATCH", "OPTIONS", "CONNECT", "TRACE"];
|
|
2
|
-
export type RequestMethod = typeof validRequestMethods[number];
|
|
2
|
+
export type RequestMethod = (typeof validRequestMethods)[number];
|
|
3
3
|
export declare function isRequestMethod(s: string): s is RequestMethod;
|
|
4
4
|
export declare const requestMethodColors: {
|
|
5
5
|
[x in RequestMethod]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeHeaderName as n } from "./normalizeHeaderName.js";
|
|
2
|
-
const
|
|
2
|
+
const o = (a) => {
|
|
3
3
|
if (Array.isArray(a)) {
|
|
4
4
|
const r = /* @__PURE__ */ new Map();
|
|
5
5
|
return a.forEach((e) => {
|
|
@@ -11,12 +11,12 @@ const f = (a) => {
|
|
|
11
11
|
}
|
|
12
12
|
return Object.fromEntries(
|
|
13
13
|
Object.entries(a ?? {}).reverse().filter(
|
|
14
|
-
([r, e
|
|
15
|
-
([
|
|
16
|
-
) ===
|
|
14
|
+
([r], e, m) => m.findIndex(
|
|
15
|
+
([t]) => n(t) === n(r)
|
|
16
|
+
) === e
|
|
17
17
|
).reverse().map(([r, e]) => [n(r), e])
|
|
18
18
|
);
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
o as normalizeHeaders
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAMpE;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAsBxD,CAAA"}
|