@scalar/api-client 2.1.36 → 2.1.38
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 +33 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +8 -7
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +43 -42
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +38 -40
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +42 -29
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -0
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +32 -28
- package/dist/layouts/App/create-api-client-app.d.ts +70 -6
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +140 -12
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +70 -6
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +76 -9
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +92 -80
- package/dist/store/collections.d.ts +1 -0
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +1 -0
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/environment.d.ts +1 -0
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +6 -7
- package/dist/store/request-example.d.ts +1 -0
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +55 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +2 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +9 -9
- package/dist/store/servers.d.ts +1 -0
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +138 -10
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +1 -0
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +1 -0
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +98 -83
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +16 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.js +40 -0
- package/dist/views/Environment/EnvironmentColorModal.vue2.js +4 -0
- package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentColors.vue.js +84 -29
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +20 -0
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -0
- package/dist/views/Environment/EnvironmentModal.vue.js +52 -0
- package/dist/views/Environment/EnvironmentModal.vue2.js +4 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +51 -50
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +12 -12
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +8 -8
|
@@ -1,91 +1,92 @@
|
|
|
1
|
-
import { defineComponent as I, ref as
|
|
2
|
-
import { ScalarDropdown as
|
|
3
|
-
import { onClickOutside as
|
|
1
|
+
import { defineComponent as I, ref as d, computed as N, onMounted as P, openBlock as s, createBlock as w, unref as p, normalizeStyle as h, withCtx as y, createElementBlock as f, Fragment as R, renderList as j, normalizeClass as q, createElementVNode as v, createTextVNode as b, toDisplayString as k, createVNode as z } from "vue";
|
|
2
|
+
import { ScalarDropdown as F, ScalarButton as K, ScalarIcon as T } from "@scalar/components";
|
|
3
|
+
import { onClickOutside as $ } from "@vueuse/core";
|
|
4
4
|
import L from "fuse.js";
|
|
5
|
-
import { parseEnvVariables as
|
|
5
|
+
import { parseEnvVariables as g } from "../../libs/environment-parser.js";
|
|
6
6
|
const M = { key: 0 }, Q = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */ I({
|
|
7
7
|
__name: "EnvironmentVariableDropdown",
|
|
8
8
|
props: {
|
|
9
9
|
query: {},
|
|
10
|
+
activeEnvironment: {},
|
|
10
11
|
activeEnvVariables: {},
|
|
11
12
|
router: {},
|
|
12
13
|
dropdownPosition: {}
|
|
13
14
|
},
|
|
14
15
|
emits: ["select"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
16
|
+
setup(x, { expose: E, emit: V }) {
|
|
17
|
+
const a = x, _ = V, c = d(!0), u = d(null), r = d(0), C = () => {
|
|
17
18
|
const e = A.value.params.workspace;
|
|
18
|
-
S(`/workspace/${e}/environment/default`),
|
|
19
|
-
}, { push: S, currentRoute: A } =
|
|
19
|
+
S(`/workspace/${e}/environment/default`), c.value = !1;
|
|
20
|
+
}, { push: S, currentRoute: A } = a.router, B = new L(g(a.activeEnvVariables.value), {
|
|
20
21
|
keys: ["key", "value"]
|
|
21
|
-
}),
|
|
22
|
-
const e =
|
|
22
|
+
}), l = N(() => {
|
|
23
|
+
const e = a.query;
|
|
23
24
|
if (!e)
|
|
24
|
-
return
|
|
25
|
+
return g(a.activeEnvVariables.value).slice(-4).filter(({ key: t, value: n }) => t !== "" || n !== "");
|
|
25
26
|
const o = B.search(e);
|
|
26
|
-
return o.length > 0 ? o.map((t) => t.item) : [];
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
}, O = () =>
|
|
30
|
-
|
|
31
|
-
return `bg-${e.value}`;
|
|
32
|
-
});
|
|
33
|
-
return V({
|
|
27
|
+
return o.length > 0 ? o.map((t) => t.item).filter(({ key: t, value: n }) => t !== "" || n !== "") : [];
|
|
28
|
+
}), m = (e) => {
|
|
29
|
+
_("select", e);
|
|
30
|
+
}, O = (e) => e.value ? e.value.color : "#8E8E8E";
|
|
31
|
+
return E({
|
|
34
32
|
handleArrowKey: (e) => {
|
|
35
|
-
const o = e === "up" ? -1 : 1, t =
|
|
36
|
-
t !== 0 && (
|
|
33
|
+
const o = e === "up" ? -1 : 1, t = l.value.length;
|
|
34
|
+
t !== 0 && (r.value = (r.value + o + t) % t);
|
|
37
35
|
},
|
|
38
36
|
handleSelect: () => {
|
|
39
|
-
if (
|
|
40
|
-
const e =
|
|
41
|
-
e &&
|
|
37
|
+
if (r.value >= 0) {
|
|
38
|
+
const e = l.value[r.value];
|
|
39
|
+
e && m(e.key);
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
}), P(() => {
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
|
|
43
|
+
r.value = 0;
|
|
44
|
+
}), $(
|
|
45
|
+
u,
|
|
48
46
|
() => {
|
|
49
|
-
|
|
47
|
+
c.value = !1;
|
|
50
48
|
},
|
|
51
|
-
{ ignore: [
|
|
49
|
+
{ ignore: [u] }
|
|
52
50
|
), (e, o) => {
|
|
53
|
-
var t,
|
|
54
|
-
return s(), w(
|
|
51
|
+
var t, n;
|
|
52
|
+
return s(), w(p(F), {
|
|
55
53
|
ref_key: "dropdownRef",
|
|
56
|
-
ref:
|
|
54
|
+
ref: u,
|
|
57
55
|
class: "mt-2 min-w-60 rounded border bg-b-1 p-1 w-fit",
|
|
58
56
|
static: "",
|
|
59
|
-
staticOpen:
|
|
60
|
-
style:
|
|
57
|
+
staticOpen: c.value,
|
|
58
|
+
style: h({
|
|
61
59
|
left: ((t = e.dropdownPosition) == null ? void 0 : t.left) + "px",
|
|
62
|
-
top: ((
|
|
60
|
+
top: ((n = e.dropdownPosition) == null ? void 0 : n.top) + "px"
|
|
63
61
|
}),
|
|
64
62
|
teleport: ".scalar-client"
|
|
65
63
|
}, {
|
|
66
|
-
items:
|
|
67
|
-
|
|
68
|
-
(s(!0),
|
|
69
|
-
key:
|
|
70
|
-
class:
|
|
71
|
-
onClick: (W) =>
|
|
64
|
+
items: y(() => [
|
|
65
|
+
l.value.length ? (s(), f("ul", M, [
|
|
66
|
+
(s(!0), f(R, null, j(l.value, (i, D) => (s(), f("li", {
|
|
67
|
+
key: i.key,
|
|
68
|
+
class: q(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": D === r.value }]),
|
|
69
|
+
onClick: (W) => m(i.key)
|
|
72
70
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class:
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
v("div", G, [
|
|
72
|
+
v("span", {
|
|
73
|
+
class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
|
|
74
|
+
style: h({
|
|
75
|
+
backgroundColor: O(e.activeEnvironment)
|
|
76
|
+
})
|
|
77
|
+
}, null, 4),
|
|
78
|
+
b(" " + k(i.key), 1)
|
|
78
79
|
]),
|
|
79
|
-
|
|
80
|
+
v("span", H, k(i.value), 1)
|
|
80
81
|
], 10, Q))), 128))
|
|
81
|
-
])) : (s(), w(
|
|
82
|
+
])) : (s(), w(p(K), {
|
|
82
83
|
key: 1,
|
|
83
84
|
class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
|
|
84
85
|
variant: "secondary",
|
|
85
86
|
onClick: C
|
|
86
87
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
|
|
88
|
+
default: y(() => [
|
|
89
|
+
z(p(T), {
|
|
89
90
|
class: "w-2.5",
|
|
90
91
|
icon: "Add"
|
|
91
92
|
}),
|
|
@@ -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
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-266d3491"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -33,7 +33,7 @@ const se = { class: "flex gap-1" }, oe = {
|
|
|
33
33
|
securitySchemeMutators: V
|
|
34
34
|
} = le(), R = w(null), h = L(), y = w(void 0), _ = `combobox-${J()}`, T = v(() => {
|
|
35
35
|
var e;
|
|
36
|
-
return (((e = a.value) == null ? void 0 : e.securitySchemes) ?? []).map((
|
|
36
|
+
return (((e = a.value) == null ? void 0 : e.securitySchemes) ?? []).map((s) => p[s]).filter((s) => s);
|
|
37
37
|
}), B = v(
|
|
38
38
|
() => {
|
|
39
39
|
const t = T.value.map(
|
|
@@ -65,20 +65,20 @@ const se = { class: "flex gap-1" }, oe = {
|
|
|
65
65
|
function N(t) {
|
|
66
66
|
var C, U;
|
|
67
67
|
if (!((C = a.value) != null && C.uid) || !((U = d.value) != null && U.uid)) return;
|
|
68
|
-
const e = t.find((
|
|
68
|
+
const e = t.find((l) => l.payload), s = t.filter((l) => !l.payload).map(({ id: l }) => l);
|
|
69
69
|
if (e != null && e.payload) {
|
|
70
|
-
const
|
|
70
|
+
const l = V.add(
|
|
71
71
|
e.payload,
|
|
72
72
|
a.value.uid
|
|
73
73
|
);
|
|
74
|
-
l.push(
|
|
74
|
+
l && s.push(l.uid);
|
|
75
75
|
}
|
|
76
|
-
const g =
|
|
76
|
+
const g = s.filter((l) => !a.value.auth[l]);
|
|
77
77
|
x.edit(
|
|
78
78
|
a.value.uid,
|
|
79
79
|
"auth",
|
|
80
|
-
g.reduce((
|
|
81
|
-
), b(
|
|
80
|
+
g.reduce((l, k) => (l[k] = X(p[k]), l), a.value.auth)
|
|
81
|
+
), b(s);
|
|
82
82
|
}
|
|
83
83
|
const q = (t) => b(
|
|
84
84
|
S.selectedSecuritySchemeUids.filter((e) => e !== t)
|
|
@@ -129,16 +129,16 @@ const se = { class: "flex gap-1" }, oe = {
|
|
|
129
129
|
n.value.length ? (u(), m("div", oe, [
|
|
130
130
|
e[1] || (e[1] = r("div", { class: "fade-left" }, null, -1)),
|
|
131
131
|
r("div", ie, [
|
|
132
|
-
(u(!0), m(W, null, z(n.value, (
|
|
133
|
-
key:
|
|
132
|
+
(u(!0), m(W, null, z(n.value, (s) => (u(), m("span", {
|
|
133
|
+
key: s.id,
|
|
134
134
|
class: "cm-pill flex items-center mx-0 h-fit pr-1 !bg-b-2 text-c-1"
|
|
135
135
|
}, [
|
|
136
|
-
E(A(
|
|
136
|
+
E(A(s.label) + " ", 1),
|
|
137
137
|
i(o(D), {
|
|
138
138
|
class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
|
|
139
139
|
icon: "Close",
|
|
140
140
|
size: "xs",
|
|
141
|
-
onClick: j((g) => q(
|
|
141
|
+
onClick: j((g) => q(s.id), ["stop"])
|
|
142
142
|
}, null, 8, ["onClick"])
|
|
143
143
|
]))), 128))
|
|
144
144
|
]),
|
|
@@ -168,7 +168,7 @@ const se = { class: "flex gap-1" }, oe = {
|
|
|
168
168
|
i(K, {
|
|
169
169
|
scheme: y.value,
|
|
170
170
|
state: o(h),
|
|
171
|
-
onClose: e[0] || (e[0] = (
|
|
171
|
+
onClose: e[0] || (e[0] = (s) => o(h).hide())
|
|
172
172
|
}, null, 8, ["scheme", "state"]),
|
|
173
173
|
r("div", { id: _ })
|
|
174
174
|
])
|
|
@@ -14,7 +14,7 @@ const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { cl
|
|
|
14
14
|
s.commandPalette.emit({ commandName: "Create Request" });
|
|
15
15
|
}, c = (n) => {
|
|
16
16
|
n != null && n.createNew && x.name === "request" && m();
|
|
17
|
-
}, y = "2.1.
|
|
17
|
+
}, y = "2.1.38";
|
|
18
18
|
return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
|
|
19
19
|
t("div", V, [
|
|
20
20
|
o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.38",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -153,17 +153,17 @@
|
|
|
153
153
|
"whatwg-mimetype": "^4.0.0",
|
|
154
154
|
"yaml": "^2.4.5",
|
|
155
155
|
"zod": "^3.23.8",
|
|
156
|
-
"@scalar/components": "0.12.
|
|
156
|
+
"@scalar/components": "0.12.63",
|
|
157
157
|
"@scalar/draggable": "0.1.6",
|
|
158
|
-
"@scalar/
|
|
159
|
-
"@scalar/
|
|
160
|
-
"@scalar/object-utils": "1.1.10",
|
|
158
|
+
"@scalar/oas-utils": "0.2.65",
|
|
159
|
+
"@scalar/object-utils": "1.1.11",
|
|
161
160
|
"@scalar/openapi-parser": "0.8.8",
|
|
162
|
-
"@scalar/themes": "0.9.44",
|
|
163
|
-
"@scalar/types": "0.0.17",
|
|
164
|
-
"@scalar/use-codemirror": "0.11.29",
|
|
165
161
|
"@scalar/openapi-types": "0.1.4",
|
|
162
|
+
"@scalar/themes": "0.9.45",
|
|
163
|
+
"@scalar/icons": "0.1.1",
|
|
166
164
|
"@scalar/use-toasts": "0.7.7",
|
|
165
|
+
"@scalar/types": "0.0.18",
|
|
166
|
+
"@scalar/use-codemirror": "0.11.30",
|
|
167
167
|
"@scalar/use-tooltip": "1.0.3"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|