@scalar/api-client 2.2.11 → 2.2.15
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 +57 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +114 -111
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +74 -81
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +19 -18
- package/dist/components/SideNav/SideNav.vue.js +6 -6
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -2
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
- package/dist/libs/create-client.d.ts +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +64 -51
- package/dist/libs/send-request/send-request.d.ts.map +1 -1
- package/dist/libs/send-request/send-request.js +47 -45
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +49 -48
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +53 -51
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +15 -15
- package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA+NA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AAkZF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestExampleAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-59761a00"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as u, Fragment as s, renderList as k, createBlock as x, unref as p, normalizeClass as v, withCtx as a, createVNode as n, createTextVNode as f, toDisplayString as $, createCommentVNode as c, createElementVNode as _, capitalize as w } from "vue";
|
|
2
|
+
import j from "./OAuth2.vue.js";
|
|
3
|
+
import V from "./RequestAuthDataTableInput.vue.js";
|
|
4
4
|
import b from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"],
|
|
5
|
+
import q from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
6
|
+
import { useWorkspace as I } from "../../../../store/store.js";
|
|
7
|
+
const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], H = /* @__PURE__ */ K({
|
|
8
8
|
__name: "RequestExampleAuth",
|
|
9
9
|
props: {
|
|
10
10
|
selectedSecuritySchemeUids: {},
|
|
11
11
|
layout: { default: "client" }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const { securitySchemes: S, securitySchemeMutators: F } =
|
|
15
|
-
() =>
|
|
13
|
+
setup(C) {
|
|
14
|
+
const { securitySchemes: S, securitySchemeMutators: F } = I(), U = N(
|
|
15
|
+
() => C.selectedSecuritySchemeUids.map((e) => ({
|
|
16
16
|
scheme: S[e]
|
|
17
17
|
}))
|
|
18
18
|
), d = R(""), T = (e) => {
|
|
@@ -23,16 +23,16 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
23
23
|
return `${w(e.nameKey)}: ${d.value ? d.value : l.type}`;
|
|
24
24
|
}
|
|
25
25
|
return e.type === "http" ? `${w(e.nameKey)}: ${e.scheme}` : `${w(e.nameKey)}: ${e.type}`;
|
|
26
|
-
},
|
|
27
|
-
return (e, l) => (r(!0),
|
|
26
|
+
}, y = (e, l, t) => F.edit(e, l, t), m = (e = "") => C.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${e}` : "";
|
|
27
|
+
return (e, l) => (r(!0), u(s, null, k(U.value, ({ scheme: t }, B) => (r(), u(s, {
|
|
28
28
|
key: t.uid
|
|
29
29
|
}, [
|
|
30
|
-
|
|
30
|
+
U.value.length > 1 ? (r(), x(p(b), {
|
|
31
31
|
key: 0,
|
|
32
32
|
class: v({ "request-example-references-header": e.layout === "reference" })
|
|
33
33
|
}, {
|
|
34
34
|
default: a(() => [
|
|
35
|
-
|
|
35
|
+
n(p(q), {
|
|
36
36
|
class: v([
|
|
37
37
|
"text-c-3 pl-2 font-medium flex items-center",
|
|
38
38
|
m(
|
|
@@ -41,22 +41,22 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
41
41
|
])
|
|
42
42
|
}, {
|
|
43
43
|
default: a(() => [
|
|
44
|
-
f(
|
|
44
|
+
f($(T(t)), 1)
|
|
45
45
|
]),
|
|
46
46
|
_: 2
|
|
47
47
|
}, 1032, ["class"])
|
|
48
48
|
]),
|
|
49
49
|
_: 2
|
|
50
|
-
}, 1032, ["class"])) :
|
|
51
|
-
t.type === "http" ? (r(),
|
|
50
|
+
}, 1032, ["class"])) : c("", !0),
|
|
51
|
+
t.type === "http" ? (r(), u(s, { key: 1 }, [
|
|
52
52
|
t.scheme === "bearer" ? (r(), x(p(b), { key: 0 }, {
|
|
53
53
|
default: a(() => [
|
|
54
|
-
|
|
54
|
+
n(V, {
|
|
55
55
|
containerClass: m("bg-b-2 rounded border-1/2"),
|
|
56
56
|
modelValue: t.token,
|
|
57
57
|
placeholder: "Token",
|
|
58
58
|
type: "password",
|
|
59
|
-
"onUpdate:modelValue": (o) =>
|
|
59
|
+
"onUpdate:modelValue": (o) => y(t.uid, "token", o)
|
|
60
60
|
}, {
|
|
61
61
|
default: a(() => l[0] || (l[0] = [
|
|
62
62
|
f(" Bearer Token ")
|
|
@@ -65,10 +65,10 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
65
65
|
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
66
66
|
]),
|
|
67
67
|
_: 2
|
|
68
|
-
}, 1024)) : t.scheme === "basic" ? (r(),
|
|
69
|
-
|
|
68
|
+
}, 1024)) : t.scheme === "basic" ? (r(), u(s, { key: 1 }, [
|
|
69
|
+
n(p(b), null, {
|
|
70
70
|
default: a(() => [
|
|
71
|
-
|
|
71
|
+
n(V, {
|
|
72
72
|
class: "text-c-2",
|
|
73
73
|
containerClass: m(
|
|
74
74
|
"auth-blend-required bg-b-2 rounded-t border-t-1/2"
|
|
@@ -76,7 +76,7 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
76
76
|
modelValue: t.username,
|
|
77
77
|
placeholder: "janedoe",
|
|
78
78
|
required: "",
|
|
79
|
-
"onUpdate:modelValue": (o) =>
|
|
79
|
+
"onUpdate:modelValue": (o) => y(t.uid, "username", o)
|
|
80
80
|
}, {
|
|
81
81
|
default: a(() => l[1] || (l[1] = [
|
|
82
82
|
f(" Username ")
|
|
@@ -86,14 +86,14 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
86
86
|
]),
|
|
87
87
|
_: 2
|
|
88
88
|
}, 1024),
|
|
89
|
-
|
|
89
|
+
n(p(b), null, {
|
|
90
90
|
default: a(() => [
|
|
91
|
-
|
|
91
|
+
n(V, {
|
|
92
92
|
containerClass: m("bg-b-2 rounded-b border-b-1/2"),
|
|
93
93
|
modelValue: t.password,
|
|
94
94
|
placeholder: "********",
|
|
95
95
|
type: "password",
|
|
96
|
-
"onUpdate:modelValue": (o) =>
|
|
96
|
+
"onUpdate:modelValue": (o) => y(t.uid, "password", o)
|
|
97
97
|
}, {
|
|
98
98
|
default: a(() => l[2] || (l[2] = [
|
|
99
99
|
f(" Password ")
|
|
@@ -103,15 +103,15 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
103
103
|
]),
|
|
104
104
|
_: 2
|
|
105
105
|
}, 1024)
|
|
106
|
-
], 64)) :
|
|
107
|
-
], 64)) : t.type === "apiKey" ? (r(),
|
|
108
|
-
|
|
106
|
+
], 64)) : c("", !0)
|
|
107
|
+
], 64)) : t.type === "apiKey" ? (r(), u(s, { key: 2 }, [
|
|
108
|
+
n(p(b), null, {
|
|
109
109
|
default: a(() => [
|
|
110
|
-
|
|
110
|
+
n(V, {
|
|
111
111
|
containerClass: m("bg-b-2 rounded-t border-t-1/2"),
|
|
112
112
|
modelValue: t.name,
|
|
113
113
|
placeholder: "api-key",
|
|
114
|
-
"onUpdate:modelValue": (o) =>
|
|
114
|
+
"onUpdate:modelValue": (o) => y(t.uid, "name", o)
|
|
115
115
|
}, {
|
|
116
116
|
default: a(() => l[3] || (l[3] = [
|
|
117
117
|
f(" Name ")
|
|
@@ -121,13 +121,13 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
121
121
|
]),
|
|
122
122
|
_: 2
|
|
123
123
|
}, 1024),
|
|
124
|
-
|
|
124
|
+
n(p(b), null, {
|
|
125
125
|
default: a(() => [
|
|
126
|
-
|
|
126
|
+
n(V, {
|
|
127
127
|
containerClass: m("bg-b-2 rounded-b border-b-1/2"),
|
|
128
128
|
modelValue: t.value,
|
|
129
129
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
130
|
-
"onUpdate:modelValue": (o) =>
|
|
130
|
+
"onUpdate:modelValue": (o) => y(t.uid, "value", o)
|
|
131
131
|
}, {
|
|
132
132
|
default: a(() => l[4] || (l[4] = [
|
|
133
133
|
f(" Value ")
|
|
@@ -137,42 +137,43 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
137
137
|
]),
|
|
138
138
|
_: 2
|
|
139
139
|
}, 1024)
|
|
140
|
-
], 64)) : t.type === "oauth2" ? (r(),
|
|
141
|
-
|
|
140
|
+
], 64)) : t.type === "oauth2" ? (r(), u(s, { key: 3 }, [
|
|
141
|
+
n(p(b), null, {
|
|
142
142
|
default: a(() => [
|
|
143
|
-
|
|
143
|
+
Object.keys(t.flows).length > 1 ? (r(), u("div", {
|
|
144
|
+
key: 0,
|
|
144
145
|
class: v(["min-h-8 min-w-8 flex text-sm border-t-1/2 last:border-r-0 p-0 m-0 relative row", {
|
|
145
146
|
"border-1/2 border-b-0 rounded-t bg-b-2": e.layout === "reference"
|
|
146
147
|
}])
|
|
147
148
|
}, [
|
|
148
|
-
l[5] || (l[5] =
|
|
149
|
-
|
|
150
|
-
(r(!0),
|
|
149
|
+
l[5] || (l[5] = _("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
|
|
150
|
+
_("div", E, [
|
|
151
|
+
(r(!0), u(s, null, k(t.flows, (o, i, g) => (r(), u("button", {
|
|
151
152
|
key: i,
|
|
152
153
|
class: v(["h-6 scalar-button scalar-row cursor-pointer items-center justify-center rounded font-medium text-xs scalar-button-outlined border border-solid border-border text-c-1 hover:bg-b-2 p-0 px-2", {
|
|
153
|
-
"bg-b-3": e.layout === "client" && (d.value === i ||
|
|
154
|
-
"bg-b-1": e.layout === "reference" && (d.value === i ||
|
|
154
|
+
"bg-b-3": e.layout === "client" && (d.value === i || g === 0 && !d.value),
|
|
155
|
+
"bg-b-1": e.layout === "reference" && (d.value === i || g === 0 && !d.value)
|
|
155
156
|
}]),
|
|
156
157
|
type: "button",
|
|
157
158
|
onClick: (P) => d.value = i
|
|
158
|
-
},
|
|
159
|
+
}, $(i), 11, M))), 128))
|
|
159
160
|
])
|
|
160
|
-
], 2)
|
|
161
|
+
], 2)) : c("", !0)
|
|
161
162
|
]),
|
|
162
163
|
_: 2
|
|
163
164
|
}, 1024),
|
|
164
|
-
(r(!0),
|
|
165
|
-
d.value === i ||
|
|
165
|
+
(r(!0), u(s, null, k(t.flows, (o, i, g) => (r(), u(s, { key: i }, [
|
|
166
|
+
d.value === i || g === 0 && !d.value ? (r(), x(j, {
|
|
166
167
|
key: 0,
|
|
167
168
|
flow: o,
|
|
168
169
|
layout: e.layout,
|
|
169
170
|
scheme: t
|
|
170
|
-
}, null, 8, ["flow", "layout", "scheme"])) :
|
|
171
|
+
}, null, 8, ["flow", "layout", "scheme"])) : c("", !0)
|
|
171
172
|
], 64))), 128))
|
|
172
|
-
], 64)) :
|
|
173
|
+
], 64)) : c("", !0)
|
|
173
174
|
], 64))), 128));
|
|
174
175
|
}
|
|
175
176
|
});
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
+
H as default
|
|
178
179
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AAyMF,wBAOG"}
|
|
@@ -1,96 +1,98 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import
|
|
5
|
-
import { REGEX as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
10
|
-
}, O = /* @__PURE__ */ _({
|
|
1
|
+
import { defineComponent as P, computed as _, watch as y, openBlock as g, createBlock as R, withCtx as $, createTextVNode as b, toDisplayString as q, createCommentVNode as w } from "vue";
|
|
2
|
+
import V from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { useActiveEntities as M } from "../../../store/active-entities.js";
|
|
4
|
+
import U from "./RequestTable.vue.js";
|
|
5
|
+
import { REGEX as N } from "@scalar/oas-utils/helpers";
|
|
6
|
+
import { useWorkspace as T } from "../../../store/store.js";
|
|
7
|
+
const S = /* @__PURE__ */ P({
|
|
11
8
|
__name: "RequestPathParams",
|
|
12
9
|
props: {
|
|
13
10
|
title: {},
|
|
14
11
|
paramKey: {}
|
|
15
12
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const o =
|
|
13
|
+
setup(E) {
|
|
14
|
+
const o = E, { activeRequest: s, activeExample: n, activeServer: d } = M(), { requestMutators: f, requestExampleMutators: v } = T(), p = _(() => {
|
|
18
15
|
const e = n.value;
|
|
19
|
-
return e ? e.parameters[o.paramKey].map((
|
|
16
|
+
return e ? e.parameters[o.paramKey].map((t) => {
|
|
20
17
|
var r;
|
|
21
18
|
return {
|
|
22
|
-
...
|
|
23
|
-
enum:
|
|
19
|
+
...t,
|
|
20
|
+
enum: t.enum || ((r = e.serverVariables) == null ? void 0 : r[t.key])
|
|
24
21
|
};
|
|
25
22
|
}) : [];
|
|
26
|
-
}),
|
|
27
|
-
var
|
|
23
|
+
}), K = (e, t, r) => {
|
|
24
|
+
var l, a;
|
|
28
25
|
if (!s.value || !n.value) return;
|
|
29
|
-
const i = n.value.parameters[o.paramKey],
|
|
30
|
-
if (
|
|
31
|
-
if ((
|
|
26
|
+
const i = n.value.parameters[o.paramKey], u = (l = i[e]) == null ? void 0 : l.key;
|
|
27
|
+
if (t === "key") {
|
|
28
|
+
if ((a = i[e]) != null && a.required)
|
|
32
29
|
return;
|
|
33
30
|
if (r) {
|
|
34
|
-
const c = encodeURIComponent(
|
|
35
|
-
|
|
31
|
+
const c = encodeURIComponent(u), m = encodeURIComponent(r), x = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), C = s.value.path.replace(
|
|
32
|
+
x,
|
|
36
33
|
`:${m}`
|
|
37
34
|
);
|
|
38
|
-
|
|
35
|
+
f.edit(s.value.uid, "path", C);
|
|
39
36
|
} else {
|
|
40
37
|
i.splice(e, 1);
|
|
41
|
-
const c = new RegExp(`/:${encodeURIComponent(
|
|
42
|
-
|
|
38
|
+
const c = new RegExp(`/:${encodeURIComponent(u)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
|
|
39
|
+
f.edit(s.value.uid, "path", m);
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
|
-
|
|
42
|
+
v.edit(
|
|
46
43
|
n.value.uid,
|
|
47
|
-
`parameters.${o.paramKey}.${e}.${
|
|
44
|
+
`parameters.${o.paramKey}.${e}.${t}`,
|
|
48
45
|
r
|
|
49
46
|
);
|
|
50
|
-
},
|
|
51
|
-
var
|
|
47
|
+
}, k = (e) => {
|
|
48
|
+
var l;
|
|
52
49
|
if (!n.value) return;
|
|
53
|
-
const
|
|
54
|
-
(
|
|
50
|
+
const t = ((l = e.match(N.PATH)) == null ? void 0 : l.map((a) => a.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], i = new Map(r.map((a) => [a.key, a])), u = t.map(
|
|
51
|
+
(a) => i.get(a) || { key: a, value: "", enabled: !0 }
|
|
55
52
|
);
|
|
56
|
-
r.forEach((
|
|
57
|
-
!
|
|
58
|
-
}), r.splice(0, r.length, ...
|
|
53
|
+
r.forEach((a) => {
|
|
54
|
+
!t.includes(a.key) && (a.value || a.required) && u.push(a);
|
|
55
|
+
}), r.splice(0, r.length, ...u), t.length === 0 && r.splice(0, r.length), v.edit(
|
|
59
56
|
n.value.uid,
|
|
60
57
|
`parameters.${o.paramKey}`,
|
|
61
58
|
r
|
|
62
59
|
);
|
|
60
|
+
}, h = (e) => {
|
|
61
|
+
e && k(e);
|
|
63
62
|
};
|
|
64
|
-
return
|
|
63
|
+
return y(
|
|
64
|
+
() => s.value,
|
|
65
|
+
(e) => {
|
|
66
|
+
var t;
|
|
67
|
+
e && h((t = d.value) == null ? void 0 : t.url);
|
|
68
|
+
}
|
|
69
|
+
), y(
|
|
65
70
|
() => {
|
|
66
71
|
var e;
|
|
67
|
-
return (e =
|
|
72
|
+
return (e = d.value) == null ? void 0 : e.url;
|
|
68
73
|
},
|
|
69
|
-
(e) => {
|
|
70
|
-
e &&
|
|
74
|
+
(e, t) => {
|
|
75
|
+
e !== t && h(e);
|
|
71
76
|
}
|
|
72
|
-
), (e,
|
|
73
|
-
itemCount:
|
|
77
|
+
), (e, t) => (g(), R(V, {
|
|
78
|
+
itemCount: p.value.length
|
|
74
79
|
}, {
|
|
75
|
-
title:
|
|
76
|
-
|
|
80
|
+
title: $(() => [
|
|
81
|
+
b(q(e.title), 1)
|
|
77
82
|
]),
|
|
78
|
-
default:
|
|
79
|
-
|
|
83
|
+
default: $(() => [
|
|
84
|
+
p.value.length ? (g(), R(U, {
|
|
80
85
|
key: 0,
|
|
81
86
|
class: "flex-1",
|
|
82
87
|
isEnabledHidden: "",
|
|
83
|
-
items:
|
|
84
|
-
onUpdateRow:
|
|
85
|
-
}, null, 8, ["items"])) : (
|
|
86
|
-
x(" You can use variables in your path: "),
|
|
87
|
-
P("code", { class: "bg-b-2 ml-1 px-1 rounded" }, "/endpoint/{my_path_variable}", -1)
|
|
88
|
-
])))
|
|
88
|
+
items: p.value,
|
|
89
|
+
onUpdateRow: K
|
|
90
|
+
}, null, 8, ["items"])) : w("", !0)
|
|
89
91
|
]),
|
|
90
92
|
_: 1
|
|
91
93
|
}, 8, ["itemCount"]));
|
|
92
94
|
}
|
|
93
95
|
});
|
|
94
96
|
export {
|
|
95
|
-
|
|
97
|
+
S as default
|
|
96
98
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-317bb675"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -3,24 +3,24 @@ import H from "../../../components/ContextBar.vue.js";
|
|
|
3
3
|
import N from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import { useActiveEntities as E } from "../../../store/active-entities.js";
|
|
5
5
|
import K from "./RequestBody.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import f from "./RequestParams.vue.js";
|
|
7
7
|
import U from "./RequestPathParams.vue.js";
|
|
8
|
-
import { canMethodHaveBody as
|
|
8
|
+
import { canMethodHaveBody as h } from "@scalar/oas-utils/helpers";
|
|
9
9
|
import Q from "./RequestAuth/RequestAuth.vue.js";
|
|
10
10
|
import { useWorkspace as $ } from "../../../store/store.js";
|
|
11
11
|
const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, M = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
|
|
14
14
|
for: "requestname"
|
|
15
|
-
},
|
|
15
|
+
}, z = ["value"], I = {
|
|
16
16
|
key: 2,
|
|
17
17
|
class: "flex items-center text-c-1 h-8"
|
|
18
|
-
},
|
|
18
|
+
}, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-3 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
|
|
19
19
|
__name: "RequestSection",
|
|
20
20
|
props: {
|
|
21
21
|
selectedSecuritySchemeUids: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
23
|
+
setup(O) {
|
|
24
24
|
const { activeRequest: l, activeExample: y } = E(), { isReadOnly: p, requestMutators: g } = $(), k = S(() => {
|
|
25
25
|
var a, u;
|
|
26
26
|
const t = /* @__PURE__ */ new Set([
|
|
@@ -32,7 +32,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
32
32
|
"Headers",
|
|
33
33
|
"Body"
|
|
34
34
|
]);
|
|
35
|
-
return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"),
|
|
35
|
+
return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), h(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
|
|
36
36
|
}), _ = S(
|
|
37
37
|
() => {
|
|
38
38
|
var t, a;
|
|
@@ -40,7 +40,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
40
40
|
}
|
|
41
41
|
), e = b("All");
|
|
42
42
|
V(l, (t) => {
|
|
43
|
-
e.value === "Body" && t && !
|
|
43
|
+
e.value === "Body" && t && !h(t.method) && (e.value = "All");
|
|
44
44
|
});
|
|
45
45
|
const q = (t) => {
|
|
46
46
|
if (!l.value) return;
|
|
@@ -57,14 +57,14 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
57
57
|
return [
|
|
58
58
|
A("div", D, [
|
|
59
59
|
o(p) ? C("", !0) : (d(), v("label", M)),
|
|
60
|
-
o(p) ? (d(), v("span",
|
|
60
|
+
o(p) ? (d(), v("span", I, R((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
|
|
61
61
|
key: 1,
|
|
62
62
|
id: "requestname",
|
|
63
63
|
class: "text-c-1 rounded pointer-events-auto relative w-full pl-2 -ml-0.5 md:-ml-1 xl:-ml-2 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline z-10",
|
|
64
64
|
placeholder: "Request Name",
|
|
65
65
|
value: (n = o(l)) == null ? void 0 : n.summary,
|
|
66
66
|
onInput: q
|
|
67
|
-
}, null, 40,
|
|
67
|
+
}, null, 40, z))
|
|
68
68
|
]),
|
|
69
69
|
s(H, {
|
|
70
70
|
activeSection: e.value,
|
|
@@ -76,7 +76,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
76
76
|
default: x(() => {
|
|
77
77
|
var n, c, m;
|
|
78
78
|
return [
|
|
79
|
-
A("div",
|
|
79
|
+
A("div", L, [
|
|
80
80
|
i(s(Q, {
|
|
81
81
|
selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
|
|
82
82
|
title: "Authentication"
|
|
@@ -88,26 +88,26 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
88
88
|
]),
|
|
89
89
|
i(s(U, {
|
|
90
90
|
paramKey: "path",
|
|
91
|
-
title: "
|
|
91
|
+
title: "Variables"
|
|
92
92
|
}, null, 512), [
|
|
93
93
|
[
|
|
94
94
|
r,
|
|
95
95
|
(e.value === "All" || e.value === "Variables") && ((m = (c = (n = o(y)) == null ? void 0 : n.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
|
|
96
96
|
]
|
|
97
97
|
]),
|
|
98
|
-
i(s(
|
|
98
|
+
i(s(f, {
|
|
99
99
|
paramKey: "cookies",
|
|
100
100
|
title: "Cookies"
|
|
101
101
|
}, null, 512), [
|
|
102
102
|
[r, e.value === "All" || e.value === "Cookies"]
|
|
103
103
|
]),
|
|
104
|
-
i(s(
|
|
104
|
+
i(s(f, {
|
|
105
105
|
paramKey: "headers",
|
|
106
106
|
title: "Headers"
|
|
107
107
|
}, null, 512), [
|
|
108
108
|
[r, e.value === "All" || e.value === "Headers"]
|
|
109
109
|
]),
|
|
110
|
-
i(s(
|
|
110
|
+
i(s(f, {
|
|
111
111
|
paramKey: "query",
|
|
112
112
|
title: "Query Parameters"
|
|
113
113
|
}, null, 512), [
|
|
@@ -116,7 +116,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
116
116
|
i(s(K, { title: "Body" }, null, 512), [
|
|
117
117
|
[
|
|
118
118
|
r,
|
|
119
|
-
o(l) && (e.value === "All" || e.value === "Body") && o(
|
|
119
|
+
o(l) && (e.value === "All" || e.value === "Body") && o(h)(o(l).method)
|
|
120
120
|
]
|
|
121
121
|
])
|
|
122
122
|
])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const p = /* @__PURE__ */ e
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-48474404"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -9,7 +9,7 @@ import B from "./components/WorkspaceDropdown.vue.js";
|
|
|
9
9
|
import h from "../../components/OpenApiClientButton.vue.js";
|
|
10
10
|
import { useWorkspace as z } from "../../store/store.js";
|
|
11
11
|
import { useLayout as A } from "../../hooks/useLayout.js";
|
|
12
|
-
const E = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
|
|
12
|
+
const E = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
|
|
13
13
|
__name: "RequestSubpageHeader",
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: { type: Boolean },
|
|
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
|
|
|
17
17
|
a.commandPalette.emit({ commandName: "Create Request" });
|
|
18
18
|
}, y = (i) => {
|
|
19
19
|
i != null && i.createNew && v.name === "request" && f();
|
|
20
|
-
}, h = "2.2.
|
|
20
|
+
}, h = "2.2.15";
|
|
21
21
|
return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
|
|
22
22
|
o("div", {
|
|
23
23
|
class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"bugs": "https://github.com/scalar/scalar/issues/new/choose",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/scalar/scalar.git",
|
|
10
|
+
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/api-client"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.15",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -169,20 +169,20 @@
|
|
|
169
169
|
"whatwg-mimetype": "^4.0.0",
|
|
170
170
|
"yaml": "^2.4.5",
|
|
171
171
|
"zod": "^3.23.8",
|
|
172
|
-
"@scalar/components": "0.13.
|
|
172
|
+
"@scalar/components": "0.13.7",
|
|
173
173
|
"@scalar/draggable": "0.1.7",
|
|
174
|
+
"@scalar/import": "0.2.9",
|
|
174
175
|
"@scalar/icons": "0.1.2",
|
|
175
|
-
"@scalar/
|
|
176
|
+
"@scalar/oas-utils": "0.2.90",
|
|
177
|
+
"@scalar/openapi-parser": "0.10.1",
|
|
178
|
+
"@scalar/postman-to-openapi": "0.1.13",
|
|
176
179
|
"@scalar/object-utils": "1.1.12",
|
|
177
|
-
"@scalar/
|
|
180
|
+
"@scalar/themes": "0.9.57",
|
|
178
181
|
"@scalar/openapi-types": "0.1.5",
|
|
179
|
-
"@scalar/
|
|
180
|
-
"@scalar/
|
|
181
|
-
"@scalar/types": "0.0.23",
|
|
182
|
-
"@scalar/postman-to-openapi": "0.1.10",
|
|
183
|
-
"@scalar/use-hooks": "0.1.7",
|
|
184
|
-
"@scalar/use-codemirror": "0.11.48",
|
|
182
|
+
"@scalar/use-codemirror": "0.11.51",
|
|
183
|
+
"@scalar/use-hooks": "0.1.10",
|
|
185
184
|
"@scalar/use-toasts": "0.7.7",
|
|
185
|
+
"@scalar/types": "0.0.25",
|
|
186
186
|
"@scalar/use-tooltip": "1.0.4"
|
|
187
187
|
},
|
|
188
188
|
"devDependencies": {
|