@scalar/api-client 2.31.0 → 2.31.1
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 +41 -0
- package/dist/components/DataTable/DataTableCell.vue.js +1 -1
- package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerSelector.vue.js +5 -5
- package/dist/components/Sidebar/Sidebar.vue.js +3 -3
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +20 -19
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +7 -7
- package/dist/v2/components/data-table/DataTableCell.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +21 -20
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
- package/dist/v2/helpers/drag-handle-factory.js +41 -41
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +24 -24
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +16 -16
- package/dist/v2/helpers/remove-circular.d.ts +0 -15
- package/dist/v2/helpers/remove-circular.d.ts.map +0 -1
- package/dist/v2/helpers/remove-circular.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAsjBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAEV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAU1E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAW7G,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAA;CACnC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,oBAAoB,EAAE,CAAA;IACrC,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;AAsrBF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBlock.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-22abab53"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -11,8 +11,8 @@ import { getExample as re } from "../operation-block/helpers/get-example.js";
|
|
|
11
11
|
import { getResolvedUrl as ie } from "../operation-block/helpers/get-resolved-url.js";
|
|
12
12
|
import ue from "./components/RequestBody.vue.js";
|
|
13
13
|
import se from "./components/RequestCodeSnippet.vue.js";
|
|
14
|
-
import
|
|
15
|
-
import { createParameterHandlers as
|
|
14
|
+
import S from "./components/RequestParams.vue.js";
|
|
15
|
+
import { createParameterHandlers as k } from "./helpers/create-parameter-handlers.js";
|
|
16
16
|
import { getDefaultHeaders as me } from "./helpers/get-default-headers.js";
|
|
17
17
|
import { getParameterSchema as de } from "./helpers/get-parameter-schema.js";
|
|
18
18
|
import { groupBy as D } from "./helpers/group-by.js";
|
|
@@ -75,7 +75,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
75
75
|
)
|
|
76
76
|
), N = n(
|
|
77
77
|
() => me({ method: e.method, operation: e.operation, exampleKey: e.exampleKey })
|
|
78
|
-
),
|
|
78
|
+
), A = n(() => {
|
|
79
79
|
const t = e.operation["x-scalar-disable-parameters"]?.["default-headers"]?.[e.exampleKey] ?? {};
|
|
80
80
|
return N.value.map((a) => {
|
|
81
81
|
const l = I.value[a.name.toLowerCase()]?.[0];
|
|
@@ -88,8 +88,8 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
88
88
|
isDisabled: t[a.name.toLowerCase()] ?? !1
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
|
-
}),
|
|
92
|
-
...
|
|
91
|
+
}), p = n(() => [
|
|
92
|
+
...A.value,
|
|
93
93
|
...r.value.header ?? []
|
|
94
94
|
]), V = n(() => {
|
|
95
95
|
const t = ie({
|
|
@@ -154,18 +154,18 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
154
154
|
payload: { summary: a.trim() }
|
|
155
155
|
});
|
|
156
156
|
}, B = n(() => ({
|
|
157
|
-
path:
|
|
157
|
+
path: k("path", e.eventBus, o.value, {
|
|
158
158
|
context: r.value.path ?? []
|
|
159
159
|
}),
|
|
160
|
-
cookie:
|
|
160
|
+
cookie: k("cookie", e.eventBus, o.value, {
|
|
161
161
|
context: P.value ?? [],
|
|
162
162
|
globalParameters: V.value.length
|
|
163
163
|
}),
|
|
164
|
-
header:
|
|
165
|
-
context:
|
|
166
|
-
defaultParameters:
|
|
164
|
+
header: k("header", e.eventBus, o.value, {
|
|
165
|
+
context: p.value,
|
|
166
|
+
defaultParameters: A.value.length
|
|
167
167
|
}),
|
|
168
|
-
query:
|
|
168
|
+
query: k("query", e.eventBus, o.value, {
|
|
169
169
|
context: r.value.query ?? []
|
|
170
170
|
})
|
|
171
171
|
})), G = (t) => e.eventBus.emit("operation:update:requestBody:contentType", {
|
|
@@ -195,7 +195,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
195
195
|
e.eventBus.emit(
|
|
196
196
|
"operation:update:requestBody:formValue",
|
|
197
197
|
{
|
|
198
|
-
payload: t.map((
|
|
198
|
+
payload: t.map((g) => ae(g, { depth: 1 })),
|
|
199
199
|
contentType: a,
|
|
200
200
|
meta: o.value
|
|
201
201
|
},
|
|
@@ -238,6 +238,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
238
238
|
}, [
|
|
239
239
|
m(d(y(ve), {
|
|
240
240
|
id: u.value.Auth,
|
|
241
|
+
createAnySecurityScheme: e.layout !== "modal",
|
|
241
242
|
environment: e.environment,
|
|
242
243
|
eventBus: e.eventBus,
|
|
243
244
|
meta: e.authMeta,
|
|
@@ -248,10 +249,10 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
248
249
|
selectedSecuritySchemes: e.selectedSecuritySchemes,
|
|
249
250
|
server: e.server,
|
|
250
251
|
title: "Authentication"
|
|
251
|
-
}, null, 8, ["id", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "selectedSecuritySchemes", "server"]), [
|
|
252
|
+
}, null, 8, ["id", "createAnySecurityScheme", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "selectedSecuritySchemes", "server"]), [
|
|
252
253
|
[c, h("Auth") && !H.value]
|
|
253
254
|
]),
|
|
254
|
-
m(d(
|
|
255
|
+
m(d(S, f({
|
|
255
256
|
id: u.value.Variables,
|
|
256
257
|
environment: e.environment,
|
|
257
258
|
eventBus: e.eventBus,
|
|
@@ -262,7 +263,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
262
263
|
}, b(B.value.path)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
263
264
|
[c, h("Variables") && r.value.path?.length]
|
|
264
265
|
]),
|
|
265
|
-
m(d(
|
|
266
|
+
m(d(S, f({
|
|
266
267
|
id: u.value.Cookies,
|
|
267
268
|
environment: e.environment,
|
|
268
269
|
eventBus: e.eventBus,
|
|
@@ -273,17 +274,17 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
273
274
|
}, b(B.value.cookie)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
274
275
|
[c, h("Cookies")]
|
|
275
276
|
]),
|
|
276
|
-
m(d(
|
|
277
|
+
m(d(S, f({
|
|
277
278
|
id: u.value.Headers,
|
|
278
279
|
environment: e.environment,
|
|
279
280
|
eventBus: e.eventBus,
|
|
280
281
|
exampleKey: e.exampleKey,
|
|
281
|
-
rows:
|
|
282
|
+
rows: p.value ?? [],
|
|
282
283
|
title: "Headers"
|
|
283
284
|
}, b(B.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
284
285
|
[c, h("Headers")]
|
|
285
286
|
]),
|
|
286
|
-
m(d(
|
|
287
|
+
m(d(S, f({
|
|
287
288
|
id: u.value.Query,
|
|
288
289
|
environment: e.environment,
|
|
289
290
|
eventBus: e.eventBus,
|
|
@@ -305,7 +306,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
305
306
|
}, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
|
|
306
307
|
[c, h("Body") && y(w)(e.method)]
|
|
307
308
|
]),
|
|
308
|
-
(v(!0), x(W, null, Y(e.plugins, (l,
|
|
309
|
+
(v(!0), x(W, null, Y(e.plugins, (l, g) => (v(), q(y(ee), { key: g }, {
|
|
309
310
|
default: C(() => [
|
|
310
311
|
l?.components?.request ? m((v(), q(Z(l.components.request.component), f({
|
|
311
312
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody as m } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as y } from "../../../../libs/electron.js";
|
|
4
|
-
const l = "2.31.
|
|
4
|
+
const l = "2.31.1", T = "application/json", C = "*/*", a = (n, s, o) => ({
|
|
5
5
|
name: n,
|
|
6
6
|
defaultValue: s,
|
|
7
7
|
isOverridden: o.has(n.toLowerCase())
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseBody.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-94c74c13"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -10,7 +10,7 @@ import S from "../../../components/layout/CollapsibleSection.vue.js";
|
|
|
10
10
|
const _ = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden"
|
|
13
|
-
}, $ = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" }, E = { class: "text-xxs font-code leading-
|
|
13
|
+
}, $ = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" }, E = { class: "text-xxs font-code leading-5" }, H = /* @__PURE__ */ h({
|
|
14
14
|
__name: "ResponseBody",
|
|
15
15
|
props: {
|
|
16
16
|
title: {},
|
|
@@ -62,7 +62,7 @@ const j = { class: "flex w-full items-center justify-between" }, H = {
|
|
|
62
62
|
v("div", {
|
|
63
63
|
ref_key: "contentContainer",
|
|
64
64
|
ref: c,
|
|
65
|
-
class: "text-xxs font-code h-full overflow-auto leading-
|
|
65
|
+
class: "text-xxs font-code h-full overflow-auto leading-6 whitespace-pre-wrap"
|
|
66
66
|
}, [
|
|
67
67
|
s.value ? (u(), m("div", U, k(s.value.message), 1)) : g("", !0),
|
|
68
68
|
o.value ? (u(), m("div", $, k(o.value), 1)) : g("", !0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as U, useId as $, ref as
|
|
1
|
+
import { defineComponent as U, useId as $, ref as v, computed as S, createBlock as x, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as p, createElementBlock as y, Fragment as b, createElementVNode as u, createTextVNode as g, toDisplayString as f, withModifiers as q, normalizeClass as M } from "vue";
|
|
2
2
|
import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
|
|
4
4
|
import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
@@ -13,7 +13,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
13
13
|
props: {
|
|
14
14
|
environment: {},
|
|
15
15
|
eventBus: {},
|
|
16
|
-
createAnySecurityScheme: { type: Boolean, default: !
|
|
16
|
+
createAnySecurityScheme: { type: Boolean, default: !1 },
|
|
17
17
|
isStatic: { type: Boolean, default: !1 },
|
|
18
18
|
meta: {},
|
|
19
19
|
proxyUrl: {},
|
|
@@ -24,7 +24,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
24
24
|
title: {}
|
|
25
25
|
},
|
|
26
26
|
setup(e, { expose: A }) {
|
|
27
|
-
const k = $(), C =
|
|
27
|
+
const k = $(), C = v(null), B = v(!1), d = N(), o = v(null), h = S(() => {
|
|
28
28
|
if (!e.securityRequirements?.length)
|
|
29
29
|
return null;
|
|
30
30
|
const l = J(e.securityRequirements);
|
|
@@ -87,13 +87,13 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
87
87
|
id: s(k),
|
|
88
88
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
89
89
|
}, [
|
|
90
|
-
u("span", null,
|
|
90
|
+
u("span", null, f(e.title), 1),
|
|
91
91
|
h.value ? (c(), y("span", {
|
|
92
92
|
key: 0,
|
|
93
93
|
class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -my-0.5 -mr-1 cursor-pointer rounded px-1 py-0.5 leading-[normal] font-normal", { "text-c-1": h.value.text === "Required" }]),
|
|
94
94
|
"data-testid": "auth-indicator",
|
|
95
95
|
onClick: D
|
|
96
|
-
},
|
|
96
|
+
}, f(h.value.text), 3)) : p("", !0)
|
|
97
97
|
], 8, Z)
|
|
98
98
|
]),
|
|
99
99
|
actions: r(() => [
|
|
@@ -112,7 +112,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
112
112
|
multiselect: "",
|
|
113
113
|
selected: a
|
|
114
114
|
}, null, 8, ["selected"]),
|
|
115
|
-
u("div", _,
|
|
115
|
+
u("div", _, f(n.label), 1),
|
|
116
116
|
n.isDeletable ? (c(), x(s(E), {
|
|
117
117
|
key: 0,
|
|
118
118
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
@@ -133,7 +133,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
133
133
|
default: r(() => [
|
|
134
134
|
i.value.length === 1 ? (c(), y(b, { key: 0 }, [
|
|
135
135
|
t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
136
|
-
g(" " +
|
|
136
|
+
g(" " + f(i.value[0]?.label), 1)
|
|
137
137
|
], 64)) : i.value.length > 1 ? (c(), y(b, { key: 1 }, [
|
|
138
138
|
t[3] || (t[3] = g(" Multiple ", -1)),
|
|
139
139
|
t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,iBAAiB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,yBAAyB,CAAA;CAAE;;;;;CAK9F,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAIxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE;AAC5C,gEAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,iBAAiB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,yBAAyB,CAAA;CAAE;;;;;CAK9F,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAIxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE;AAC5C,gEAAgE;AAChE,uBAAqB,KACpB,oBAAoB,EAAE,GAAG,mBAAmB,EA2E9C,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { generateHash as b } from "@scalar/helpers/string/generate-hash";
|
|
2
2
|
import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { authOptions as S } from "./auth-options.js";
|
|
4
|
-
const
|
|
4
|
+
const l = ({ name: o, value: i }) => ({
|
|
5
5
|
id: b(JSON.stringify(i)),
|
|
6
6
|
label: o,
|
|
7
7
|
value: i,
|
|
8
8
|
isDeletable: !0
|
|
9
|
-
}), g = (o) =>
|
|
9
|
+
}), g = (o) => l({
|
|
10
10
|
name: Object.keys(o).join(" & "),
|
|
11
11
|
value: o
|
|
12
12
|
}), u = (o, i) => {
|
|
@@ -14,8 +14,8 @@ const c = ({ name: o, value: i }) => ({
|
|
|
14
14
|
if (n.length > 1)
|
|
15
15
|
return g(o);
|
|
16
16
|
if (n[0])
|
|
17
|
-
return h(i[n[0]]) ?
|
|
18
|
-
}, y = (o, i, n,
|
|
17
|
+
return h(i[n[0]]) ? l({ name: n[0], value: o }) : void 0;
|
|
18
|
+
}, y = (o, i, n, c = !1) => {
|
|
19
19
|
const { requiredFormatted: f, requiredSchemeNames: p, existingIds: d } = o.reduce(
|
|
20
20
|
(e, t) => {
|
|
21
21
|
const s = u(t, i);
|
|
@@ -34,7 +34,7 @@ const c = ({ name: o, value: i }) => ({
|
|
|
34
34
|
if (p.has(e))
|
|
35
35
|
continue;
|
|
36
36
|
if (h(t)) {
|
|
37
|
-
const r =
|
|
37
|
+
const r = l({ name: e, value: { [e]: [] } });
|
|
38
38
|
a.push(r), d.add(r.id);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -46,7 +46,7 @@ const c = ({ name: o, value: i }) => ({
|
|
|
46
46
|
{ label: "Required authentication", options: f },
|
|
47
47
|
{ label: "Available authentication", options: a }
|
|
48
48
|
];
|
|
49
|
-
return
|
|
49
|
+
return c ? (m.push({
|
|
50
50
|
label: "Add new authentication",
|
|
51
51
|
options: Object.entries(S).map(([e, t]) => ({
|
|
52
52
|
id: e,
|
|
@@ -59,6 +59,6 @@ const c = ({ name: o, value: i }) => ({
|
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
61
|
g as formatComplexScheme,
|
|
62
|
-
|
|
62
|
+
l as formatScheme,
|
|
63
63
|
y as getSecuritySchemeOptions
|
|
64
64
|
};
|
|
@@ -10,7 +10,7 @@ const f = /* @__PURE__ */ o({
|
|
|
10
10
|
const { cx: r } = i();
|
|
11
11
|
return (t, m) => (n(), a(l(e.is), s(
|
|
12
12
|
b(r)(
|
|
13
|
-
"box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-base last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
|
|
13
|
+
"box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-base/5 last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
|
|
14
14
|
),
|
|
15
15
|
{ class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger" }
|
|
16
16
|
), {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import p from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ p(o, [["__scopeId", "data-v-feb6f541"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -222,7 +222,7 @@ const ue = { class: "flex" }, me = { class: "flex items-center gap-0.5" }, ce =
|
|
|
222
222
|
]),
|
|
223
223
|
e[14] || (e[14] = r("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
|
|
224
224
|
r("b", { class: "font-medium" }, "Let's Get Started"),
|
|
225
|
-
r("p", { class: "mt-2 leading-
|
|
225
|
+
r("p", { class: "mt-2 leading-5" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
226
226
|
], -1))
|
|
227
227
|
])) : c("", !0),
|
|
228
228
|
r("div", be, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DownloadAppButton.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-9b609275"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as o, openBlock as n, createVNode as a, createElementVNode as m, unref as l } from "vue";
|
|
2
2
|
import { ScalarIconDownloadSimple as r } from "@scalar/icons";
|
|
3
3
|
const s = {
|
|
4
|
-
class: "download-app-button flex w-full flex-row items-center justify-center gap-2 rounded px-3.5 py-2 text-sm leading-
|
|
4
|
+
class: "download-app-button flex w-full flex-row items-center justify-center gap-2 rounded px-3.5 py-2 text-sm leading-4 font-medium",
|
|
5
5
|
href: "https://scalar.com/download?utm_source=web_client&utm_medium=download_button&utm_campaign=topnav",
|
|
6
6
|
target: "_blank",
|
|
7
7
|
type: "button"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":"AAghBA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./Authentication.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-60f72663"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, computed as n, ref as B, watchEffect as N, createBlock as O, openBlock as s, createSlots as U, withCtx as c, createElementVNode as o, normalizeClass as d, createVNode as v, unref as h, createElementBlock as y, Fragment as f, createTextVNode as u } from "vue";
|
|
2
2
|
import { ScalarToggle as b } from "@scalar/components";
|
|
3
3
|
import { isHttpMethod as R } from "@scalar/helpers/http/is-http-method";
|
|
4
4
|
import { getResolvedRef as V } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
@@ -7,7 +7,7 @@ import C from "../../settings/components/Section.vue.js";
|
|
|
7
7
|
import { getActiveProxyUrl as E } from "../../../helpers/get-active-proxy-url.js";
|
|
8
8
|
import { getServers as M } from "../../../helpers/get-servers.js";
|
|
9
9
|
import P from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
10
|
-
const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */
|
|
10
|
+
const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ A({
|
|
11
11
|
__name: "Authentication",
|
|
12
12
|
props: {
|
|
13
13
|
documentSlug: {},
|
|
@@ -26,11 +26,11 @@ const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ B({
|
|
|
26
26
|
collectionType: {}
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
|
-
const r =
|
|
29
|
+
const r = n(() => e.collectionType === "operation" ? {
|
|
30
30
|
type: "operation",
|
|
31
31
|
path: e.path ?? "",
|
|
32
32
|
method: e.method ?? "get"
|
|
33
|
-
} : { type: "document" }),
|
|
33
|
+
} : { type: "document" }), i = n(() => e.collectionType === "operation" ? !e.path || !R(e.method) ? null : V(e.document?.paths?.[e.path]?.[e.method]) : null), a = B(!1);
|
|
34
34
|
N(() => {
|
|
35
35
|
a.value = q({
|
|
36
36
|
authStore: e.workspaceStore.auth,
|
|
@@ -38,7 +38,7 @@ const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ B({
|
|
|
38
38
|
...r.value
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
const S =
|
|
41
|
+
const S = n(() => e.collectionType === "operation" ? e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
42
42
|
type: "operation",
|
|
43
43
|
documentName: e.documentSlug,
|
|
44
44
|
path: e.path ?? "",
|
|
@@ -46,15 +46,15 @@ const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ B({
|
|
|
46
46
|
}) : e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
47
47
|
type: "document",
|
|
48
48
|
documentName: e.documentSlug
|
|
49
|
-
})), g =
|
|
49
|
+
})), g = n(() => e.collectionType === "operation" ? i.value?.security ?? [] : e.document?.security ?? []), p = n(
|
|
50
50
|
() => E(
|
|
51
51
|
e.workspaceStore.workspace["x-scalar-active-proxy"],
|
|
52
52
|
e.layout
|
|
53
53
|
) ?? ""
|
|
54
|
-
), m =
|
|
54
|
+
), m = n(() => M(i.value?.servers ?? e.document?.servers, {
|
|
55
55
|
documentUrl: e.document?.["x-scalar-original-source-url"]
|
|
56
|
-
})), k =
|
|
57
|
-
const l = e.document?.["x-scalar-selected-server"], T =
|
|
56
|
+
})), k = n(() => {
|
|
57
|
+
const l = e.document?.["x-scalar-selected-server"], T = i.value?.["x-scalar-selected-server"] ?? l;
|
|
58
58
|
return m.value.find(({ url: w }) => w === T) ?? m.value[0] ?? null;
|
|
59
59
|
}), x = (l) => {
|
|
60
60
|
if (r.value.type === "operation")
|
|
@@ -68,25 +68,25 @@ const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ B({
|
|
|
68
68
|
};
|
|
69
69
|
return (l, t) => (s(), O(C, null, U({
|
|
70
70
|
title: c(() => [
|
|
71
|
-
t[0] || (t[0] =
|
|
71
|
+
t[0] || (t[0] = u("Authentication", -1))
|
|
72
72
|
]),
|
|
73
73
|
description: c(() => [
|
|
74
74
|
e.collectionType === "operation" ? (s(), y(f, { key: 0 }, [
|
|
75
|
-
t[1] || (t[1] =
|
|
76
|
-
t[2] || (t[2] =
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
t[1] || (t[1] = o("span", { class: "block" }, " Override authentication for this operation with the toggle. ", -1)),
|
|
76
|
+
t[2] || (t[2] = o("span", { class: "mt-1 block" }, [
|
|
77
|
+
o("strong", null, "On"),
|
|
78
|
+
u(" — Authentication below applies only to this operation. ")
|
|
79
79
|
], -1)),
|
|
80
|
-
t[3] || (t[3] =
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
t[3] || (t[3] = o("span", { class: "mt-1 block" }, [
|
|
81
|
+
o("strong", null, "Off"),
|
|
82
|
+
u(" — This operation uses document-level authentication from the OpenAPI spec. ")
|
|
83
83
|
], -1))
|
|
84
84
|
], 64)) : (s(), y(f, { key: 1 }, [
|
|
85
|
-
|
|
85
|
+
u(" Configure authentication for this document. Selected authentication applies to all operations unless overridden at the operation level. ")
|
|
86
86
|
], 64))
|
|
87
87
|
]),
|
|
88
88
|
default: c(() => [
|
|
89
|
-
|
|
89
|
+
o("div", {
|
|
90
90
|
class: d(
|
|
91
91
|
e.collectionType === "operation" && !a.value && "cursor-not-allowed"
|
|
92
92
|
)
|
|
@@ -96,6 +96,7 @@ const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ B({
|
|
|
96
96
|
"scalar-collection-auth border-none!",
|
|
97
97
|
e.collectionType === "operation" && !a.value && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
98
98
|
]),
|
|
99
|
+
createAnySecurityScheme: !0,
|
|
99
100
|
environment: e.environment,
|
|
100
101
|
eventBus: e.eventBus,
|
|
101
102
|
isStatic: "",
|
|
@@ -114,7 +115,7 @@ const $ = { class: "flex h-8 items-center" }, K = /* @__PURE__ */ B({
|
|
|
114
115
|
e.collectionType === "operation" ? {
|
|
115
116
|
name: "actions",
|
|
116
117
|
fn: c(() => [
|
|
117
|
-
|
|
118
|
+
o("div", $, [
|
|
118
119
|
v(h(b), {
|
|
119
120
|
class: "w-4",
|
|
120
121
|
modelValue: a.value,
|
|
@@ -81,7 +81,7 @@ const P = {
|
|
|
81
81
|
)
|
|
82
82
|
)), x = t(
|
|
83
83
|
() => b(a(e.options)?.hiddenClients)
|
|
84
|
-
), g = "2.31.
|
|
84
|
+
), g = "2.31.1";
|
|
85
85
|
return (n, o) => e.path && e.method && e.exampleName && r.value ? (m(), C(c(V), {
|
|
86
86
|
key: 0,
|
|
87
87
|
activeEnvironment: e.workspaceStore.workspace["x-scalar-active-environment"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag-handle-factory.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/drag-handle-factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drag-handle-factory.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/drag-handle-factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAc,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAIpE,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,4CAA4C,CAAA;AAGnD,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,KAAK,CAAA;AA+SpD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,kCAG/B;IACD,KAAK,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC9C,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAC3C;mCAKuC,YAAY,gBAAgB,WAAW,KAAG,OAAO;iCA2DnD,YAAY,gBAAgB,WAAW,KAAG,OAAO;CAwEtF,CAAA"}
|