@scalar/api-client 2.2.44 → 2.2.45
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 +26 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +37 -37
- package/dist/components/EmptyState.vue.d.ts +3 -0
- package/dist/components/EmptyState.vue.d.ts.map +1 -0
- package/dist/components/EmptyState.vue.js +7 -0
- package/dist/components/EmptyState.vue2.js +31 -0
- package/dist/components/Form/Form.vue.js +1 -1
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +12 -7
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
- package/dist/libs/create-client.d.ts +2 -2
- package/dist/libs/index.js +31 -33
- package/dist/libs/send-request/build-request-security.d.ts +17 -0
- package/dist/libs/send-request/build-request-security.d.ts.map +1 -0
- package/dist/libs/send-request/build-request-security.js +31 -0
- package/dist/libs/send-request/create-fetch-body.d.ts +18 -0
- package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.js +26 -0
- package/dist/libs/send-request/create-fetch-headers.d.ts +4 -0
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-headers.js +11 -0
- package/dist/libs/send-request/create-fetch-query-params.d.ts +4 -0
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-query-params.js +10 -0
- package/dist/libs/send-request/create-request-operation.d.ts +29 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -0
- package/dist/libs/send-request/create-request-operation.js +107 -0
- package/dist/libs/send-request/decode-buffer.d.ts +3 -0
- package/dist/libs/send-request/decode-buffer.d.ts.map +1 -0
- package/dist/libs/send-request/decode-buffer.js +9 -0
- package/dist/libs/send-request/index.d.ts +2 -1
- package/dist/libs/send-request/index.d.ts.map +1 -1
- package/dist/libs/send-request/index.js +4 -6
- package/dist/store/request-example.d.ts +2 -2
- package/dist/store/store.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieModal.vue.js +2 -2
- package/dist/views/Cookies/CookieModal.vue2.js +11 -11
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +37 -36
- package/dist/views/Request/Request.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +89 -87
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +47 -45
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +8 -7
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +97 -104
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +39 -57
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +74 -71
- package/package.json +10 -10
- package/dist/libs/send-request/send-request.d.ts +0 -51
- package/dist/libs/send-request/send-request.d.ts.map +0 -1
- package/dist/libs/send-request/send-request.js +0 -177
|
@@ -1,105 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, onMounted as v, onBeforeUnmount as h, openBlock as a, createElementBlock as n, createElementVNode as o, normalizeClass as y, unref as t, createTextVNode as i, toDisplayString as C, createCommentVNode as c, createVNode as l } from "vue";
|
|
2
|
+
import R from "../../../assets/computer.ascii.js";
|
|
3
|
+
import w from "../../../components/EmptyState.vue.js";
|
|
4
|
+
import N from "../../../components/ScalarAsciiArt.vue.js";
|
|
5
5
|
import p from "../../../components/ScalarHotkey.vue.js";
|
|
6
|
-
import { useActiveEntities as
|
|
6
|
+
import { useActiveEntities as _ } from "../../../store/active-entities.js";
|
|
7
7
|
import { useRoute as q } from "vue-router";
|
|
8
8
|
import { useWorkspace as S } from "../../../store/store.js";
|
|
9
9
|
import { useLayout as V } from "../../../hooks/useLayout.js";
|
|
10
|
-
const B = { class: "border-t relative col-1 flex-center gap-6 p-2 capitalize" },
|
|
10
|
+
const B = { class: "border-t relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "scalar-version-number"
|
|
13
|
-
}, A = { class: "
|
|
13
|
+
}, A = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, M = /* @__PURE__ */ g({
|
|
14
14
|
__name: "ResponseEmpty",
|
|
15
|
-
setup(
|
|
16
|
-
const { activeWorkspaceRequests: u } =
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
return
|
|
15
|
+
setup(P) {
|
|
16
|
+
const { activeWorkspaceRequests: u } = _(), { events: s } = S(), k = q(), { layout: r } = V(), d = () => {
|
|
17
|
+
s.commandPalette.emit({ commandName: "Create Request" });
|
|
18
|
+
}, f = (m) => {
|
|
19
|
+
m != null && m.createNew && k.name === "request" && d();
|
|
20
|
+
}, x = "2.2.45";
|
|
21
|
+
return v(() => s.hotKeys.on(f)), h(() => s.hotKeys.off(f)), (m, e) => (a(), n("div", B, [
|
|
22
22
|
o("div", {
|
|
23
|
-
class:
|
|
23
|
+
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
24
24
|
"hidden opacity-0": t(u).length <= 1 && t(r) !== "modal"
|
|
25
25
|
}])
|
|
26
26
|
}, [
|
|
27
|
-
t(r) !== "modal" ? (
|
|
28
|
-
|
|
27
|
+
t(r) !== "modal" ? (a(), n("div", E, [
|
|
28
|
+
i(" Scalar App V" + C(t(x)) + " Beta ", 1),
|
|
29
29
|
e[2] || (e[2] = o("div", { class: "mt-2" }, [
|
|
30
30
|
o("a", {
|
|
31
31
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
32
32
|
target: "_blank"
|
|
33
33
|
}, " Roadmap ")
|
|
34
34
|
], -1))
|
|
35
|
-
])) :
|
|
35
|
+
])) : c("", !0),
|
|
36
36
|
e[3] || (e[3] = o("a", {
|
|
37
37
|
class: "gitbook-show scalar-version-number",
|
|
38
38
|
href: "https://www.scalar.com",
|
|
39
39
|
target: "_blank"
|
|
40
40
|
}, " Powered By Scalar.com ", -1)),
|
|
41
|
-
|
|
42
|
-
art: t(
|
|
41
|
+
l(N, {
|
|
42
|
+
art: t(R),
|
|
43
43
|
class: "text-c-3"
|
|
44
44
|
}, null, 8, ["art"])
|
|
45
45
|
], 2),
|
|
46
|
-
t(r) !== "modal" ? (
|
|
46
|
+
t(r) !== "modal" ? (a(), n("div", {
|
|
47
47
|
key: 0,
|
|
48
|
-
class:
|
|
48
|
+
class: y(["h-[calc(100%_-_50px)] items-center justify-center hidden pb-5", {
|
|
49
49
|
"!flex opacity-100": t(u).length == 1
|
|
50
50
|
}])
|
|
51
51
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
hotkey: ""
|
|
57
|
-
}),
|
|
58
|
-
s(d, {
|
|
59
|
-
art: t(x),
|
|
60
|
-
class: "!leading-[6px] text-c-3"
|
|
61
|
-
}, null, 8, ["art"])
|
|
62
|
-
]),
|
|
63
|
-
o("div", P, [
|
|
64
|
-
e[4] || (e[4] = o("div", { class: "keycap-hotkey !right-[60px]" }, "K", -1)),
|
|
65
|
-
s(d, {
|
|
66
|
-
art: t(x),
|
|
67
|
-
class: "!leading-[6px] keycap-n"
|
|
68
|
-
}, null, 8, ["art"])
|
|
69
|
-
])
|
|
70
|
-
])
|
|
71
|
-
], 2)) : m("", !0),
|
|
72
|
-
o("div", $, [
|
|
73
|
-
t(r) !== "modal" ? (l(), n("button", {
|
|
52
|
+
l(w)
|
|
53
|
+
], 2)) : c("", !0),
|
|
54
|
+
o("div", A, [
|
|
55
|
+
t(r) !== "modal" ? (a(), n("button", {
|
|
74
56
|
key: 0,
|
|
75
57
|
class: "flex items-center gap-1.5",
|
|
76
58
|
type: "button",
|
|
77
|
-
onClick: e[0] || (e[0] = (b) => t(
|
|
59
|
+
onClick: e[0] || (e[0] = (b) => t(s).commandPalette.emit())
|
|
78
60
|
}, [
|
|
79
|
-
e[
|
|
80
|
-
|
|
81
|
-
])) :
|
|
82
|
-
t(r) === "desktop" ? (
|
|
61
|
+
e[4] || (e[4] = i(" Get Started ")),
|
|
62
|
+
l(p, { hotkey: "k" })
|
|
63
|
+
])) : c("", !0),
|
|
64
|
+
t(r) === "desktop" ? (a(), n("button", {
|
|
83
65
|
key: 1,
|
|
84
66
|
class: "flex items-center gap-1.5",
|
|
85
67
|
type: "button",
|
|
86
|
-
onClick:
|
|
68
|
+
onClick: d
|
|
87
69
|
}, [
|
|
88
|
-
e[
|
|
89
|
-
|
|
90
|
-
])) :
|
|
70
|
+
e[5] || (e[5] = i(" New Request ")),
|
|
71
|
+
l(p, { hotkey: "N" })
|
|
72
|
+
])) : c("", !0),
|
|
91
73
|
o("button", {
|
|
92
74
|
class: "flex items-center gap-1.5",
|
|
93
75
|
type: "button",
|
|
94
|
-
onClick: e[1] || (e[1] = (b) => t(
|
|
76
|
+
onClick: e[1] || (e[1] = (b) => t(s).executeRequest.emit())
|
|
95
77
|
}, [
|
|
96
|
-
e[
|
|
97
|
-
|
|
78
|
+
e[6] || (e[6] = i(" Send Request ")),
|
|
79
|
+
l(p, { hotkey: "↵" })
|
|
98
80
|
])
|
|
99
81
|
])
|
|
100
82
|
]));
|
|
101
83
|
}
|
|
102
84
|
});
|
|
103
85
|
export {
|
|
104
|
-
|
|
86
|
+
M as default
|
|
105
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AA2kBA,wBAMG"}
|
|
@@ -1,85 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as F, computed as d, openBlock as l, createBlock as u, withCtx as i, createVNode as a, unref as s, createElementVNode as n, createElementBlock as v, Fragment as y, renderList as w, normalizeClass as S, toDisplayString as O, withModifiers as R, withDirectives as M, createCommentVNode as q, vShow as K, createTextVNode as T } from "vue";
|
|
2
|
+
import U from "../../components/EmptyState.vue.js";
|
|
3
|
+
import W from "../../components/Sidebar/SidebarButton.vue.js";
|
|
4
|
+
import G from "../../components/Sidebar/SidebarList.vue.js";
|
|
5
|
+
import H from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
6
|
+
import J from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
7
|
+
import Q from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
8
|
+
import { useActiveEntities as X } from "../../store/active-entities.js";
|
|
8
9
|
import { ScalarIcon as b, ScalarButton as C } from "@scalar/components";
|
|
9
|
-
import { LibraryIcon as
|
|
10
|
-
import { useRouter as
|
|
11
|
-
import
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
import
|
|
14
|
-
import { useSidebar as
|
|
15
|
-
const
|
|
10
|
+
import { LibraryIcon as Y } from "@scalar/icons";
|
|
11
|
+
import { useRouter as Z, useRoute as ee } from "vue-router";
|
|
12
|
+
import te from "./ServerForm.vue.js";
|
|
13
|
+
import { useWorkspace as re } from "../../store/store.js";
|
|
14
|
+
import oe from "../../components/Sidebar/Sidebar.vue.js";
|
|
15
|
+
import { useSidebar as se } from "../../hooks/useSidebar.js";
|
|
16
|
+
const ae = { class: "flex-1" }, le = ["onClick"], ie = { class: "flex h-5 items-center justify-center max-w-[14px] pr-px" }, ne = { class: "break-all line-clamp-1 font-medium text-left w-full" }, Ce = /* @__PURE__ */ F({
|
|
16
17
|
__name: "Servers",
|
|
17
|
-
setup(
|
|
18
|
-
const { activeWorkspaceCollections:
|
|
19
|
-
function
|
|
18
|
+
setup(ce) {
|
|
19
|
+
const { activeWorkspaceCollections: I, activeWorkspace: m, activeCollection: p } = X(), { servers: h, events: $, serverMutators: D } = re(), { push: z } = Z(), x = ee(), { collapsedSidebarFolders: k, toggleSidebarFolder: A } = se(), _ = d(() => x.params.collectionId), L = d(() => x.params.servers), N = (r) => k[r];
|
|
20
|
+
function f(r) {
|
|
20
21
|
$.commandPalette.emit({
|
|
21
22
|
commandName: "Add Server",
|
|
22
23
|
metaData: { parentUid: r }
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
|
-
const V =
|
|
26
|
+
const V = d(() => I.value.filter(
|
|
26
27
|
(r) => {
|
|
27
28
|
var t;
|
|
28
29
|
return ((t = r.info) == null ? void 0 : t.title) !== "Drafts";
|
|
29
30
|
}
|
|
30
31
|
)), j = (r, t, e) => {
|
|
31
32
|
var o;
|
|
32
|
-
const
|
|
33
|
-
r.metaKey ? window.open(
|
|
33
|
+
const c = `/workspace/${(o = m == null ? void 0 : m.value) == null ? void 0 : o.uid}/servers/${e}/${t}`;
|
|
34
|
+
r.metaKey ? window.open(c, "_blank") : z({ path: c });
|
|
34
35
|
};
|
|
35
|
-
function
|
|
36
|
+
function E(r) {
|
|
36
37
|
var t;
|
|
37
|
-
(t =
|
|
38
|
+
(t = p == null ? void 0 : p.value) != null && t.uid && D.delete(r, _.value);
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
const B = d(() => Object.keys(h).length > 0);
|
|
41
|
+
return (r, t) => (l(), u(J, null, {
|
|
42
|
+
default: i(() => [
|
|
43
|
+
a(s(oe), { title: "Servers" }, {
|
|
44
|
+
content: i(() => [
|
|
45
|
+
n("div", ae, [
|
|
46
|
+
a(G, null, {
|
|
47
|
+
default: i(() => [
|
|
48
|
+
(l(!0), v(y, null, w(V.value, (e) => {
|
|
49
|
+
var c;
|
|
50
|
+
return l(), v("li", {
|
|
49
51
|
key: e.uid,
|
|
50
52
|
class: "flex flex-col gap-1/2"
|
|
51
53
|
}, [
|
|
52
|
-
|
|
54
|
+
n("button", {
|
|
53
55
|
class: "flex font-medium gap-1.5 group items-center p-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
54
56
|
type: "button",
|
|
55
|
-
onClick: (o) =>
|
|
57
|
+
onClick: (o) => s(A)(e.uid)
|
|
56
58
|
}, [
|
|
57
|
-
|
|
58
|
-
s(
|
|
59
|
+
n("span", ie, [
|
|
60
|
+
a(s(Y), {
|
|
59
61
|
class: "min-w-3.5 text-sidebar-c-2 size-3.5 stroke-2 group-hover:hidden",
|
|
60
62
|
src: e["x-scalar-icon"] || "interface-content-folder"
|
|
61
63
|
}, null, 8, ["src"]),
|
|
62
|
-
|
|
63
|
-
class:
|
|
64
|
-
"rotate-90":
|
|
64
|
+
n("div", {
|
|
65
|
+
class: S({
|
|
66
|
+
"rotate-90": s(k)[e.uid]
|
|
65
67
|
})
|
|
66
68
|
}, [
|
|
67
|
-
s(
|
|
69
|
+
a(s(b), {
|
|
68
70
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
69
71
|
icon: "ChevronRight",
|
|
70
72
|
size: "md"
|
|
71
73
|
})
|
|
72
74
|
], 2)
|
|
73
75
|
]),
|
|
74
|
-
|
|
75
|
-
s(
|
|
76
|
+
n("span", ne, O(((c = e.info) == null ? void 0 : c.title) ?? ""), 1),
|
|
77
|
+
a(s(C), {
|
|
76
78
|
class: "hidden group-hover:block px-0.5 py-0 hover:bg-b-3 hover:text-c-1 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 aspect-square h-fit",
|
|
77
79
|
size: "sm",
|
|
78
80
|
variant: "ghost",
|
|
79
|
-
onClick: R((o) =>
|
|
81
|
+
onClick: R((o) => f(e.uid), ["stop", "prevent"])
|
|
80
82
|
}, {
|
|
81
|
-
default:
|
|
82
|
-
s(
|
|
83
|
+
default: i(() => [
|
|
84
|
+
a(s(b), {
|
|
83
85
|
icon: "Add",
|
|
84
86
|
size: "md",
|
|
85
87
|
thickness: "2"
|
|
@@ -87,46 +89,46 @@ const oe = { class: "flex-1" }, se = ["onClick"], le = { class: "flex h-5 items-
|
|
|
87
89
|
]),
|
|
88
90
|
_: 2
|
|
89
91
|
}, 1032, ["onClick"])
|
|
90
|
-
], 8,
|
|
91
|
-
M(
|
|
92
|
-
class:
|
|
92
|
+
], 8, le),
|
|
93
|
+
M(n("div", {
|
|
94
|
+
class: S({
|
|
93
95
|
"before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-3 before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] flex flex-col gap-1/2 mb-[.5px] last:mb-0 relative": Object.keys(e.servers || {}).length > 0
|
|
94
96
|
})
|
|
95
97
|
}, [
|
|
96
|
-
(
|
|
97
|
-
var
|
|
98
|
-
return
|
|
98
|
+
(l(!0), v(y, null, w(e.servers, (o) => {
|
|
99
|
+
var g;
|
|
100
|
+
return l(), u(H, {
|
|
99
101
|
key: o,
|
|
100
102
|
class: "[&>a]:pl-[1.625rem]",
|
|
101
103
|
collectionId: e.uid,
|
|
102
104
|
isDeletable: !0,
|
|
103
105
|
type: "servers",
|
|
104
106
|
variable: {
|
|
105
|
-
name: ((
|
|
107
|
+
name: ((g = s(h)[o]) == null ? void 0 : g.url) ?? "",
|
|
106
108
|
uid: o
|
|
107
109
|
},
|
|
108
|
-
onClick: (
|
|
109
|
-
onDelete:
|
|
110
|
+
onClick: (P) => j(P, o, e.uid),
|
|
111
|
+
onDelete: E
|
|
110
112
|
}, null, 8, ["collectionId", "variable", "onClick"]);
|
|
111
113
|
}), 128)),
|
|
112
|
-
Object.keys(e.servers || {}).length === 0 ? (
|
|
114
|
+
Object.keys(e.servers || {}).length === 0 ? (l(), u(s(C), {
|
|
113
115
|
key: 0,
|
|
114
116
|
class: "mb-[.5px] flex gap-1.5 h-8 text-c-1 pl-6 py-0 justify-start text-xs w-full hover:bg-b-2",
|
|
115
117
|
variant: "ghost",
|
|
116
|
-
onClick: (o) =>
|
|
118
|
+
onClick: (o) => f(e.uid)
|
|
117
119
|
}, {
|
|
118
|
-
default:
|
|
119
|
-
s(
|
|
120
|
+
default: i(() => [
|
|
121
|
+
a(s(b), {
|
|
120
122
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
121
123
|
icon: "Add",
|
|
122
124
|
thickness: "3"
|
|
123
125
|
}),
|
|
124
|
-
t[0] || (t[0] =
|
|
126
|
+
t[0] || (t[0] = n("span", null, "Add Server", -1))
|
|
125
127
|
]),
|
|
126
128
|
_: 2
|
|
127
|
-
}, 1032, ["onClick"])) :
|
|
129
|
+
}, 1032, ["onClick"])) : q("", !0)
|
|
128
130
|
], 2), [
|
|
129
|
-
[
|
|
131
|
+
[K, N(e.uid)]
|
|
130
132
|
])
|
|
131
133
|
]);
|
|
132
134
|
}), 128))
|
|
@@ -135,22 +137,23 @@ const oe = { class: "flex-1" }, se = ["onClick"], le = { class: "flex h-5 items-
|
|
|
135
137
|
})
|
|
136
138
|
])
|
|
137
139
|
]),
|
|
138
|
-
button:
|
|
139
|
-
|
|
140
|
-
title:
|
|
141
|
-
|
|
140
|
+
button: i(() => [
|
|
141
|
+
a(W, { click: f }, {
|
|
142
|
+
title: i(() => t[1] || (t[1] = [
|
|
143
|
+
T("Add Server")
|
|
142
144
|
])),
|
|
143
145
|
_: 1
|
|
144
146
|
})
|
|
145
147
|
]),
|
|
146
148
|
_: 1
|
|
147
149
|
}),
|
|
148
|
-
|
|
149
|
-
default:
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
a(Q, { class: "flex-1" }, {
|
|
151
|
+
default: i(() => [
|
|
152
|
+
B.value ? (l(), u(te, {
|
|
153
|
+
key: 0,
|
|
154
|
+
collectionId: _.value,
|
|
152
155
|
serverUid: L.value
|
|
153
|
-
}, null, 8, ["collectionId", "serverUid"])
|
|
156
|
+
}, null, 8, ["collectionId", "serverUid"])) : (l(), u(U, { key: 1 }))
|
|
154
157
|
]),
|
|
155
158
|
_: 1
|
|
156
159
|
})
|
|
@@ -160,5 +163,5 @@ const oe = { class: "flex-1" }, se = ["onClick"], le = { class: "flex h-5 items-
|
|
|
160
163
|
}
|
|
161
164
|
});
|
|
162
165
|
export {
|
|
163
|
-
|
|
166
|
+
Ce as default
|
|
164
167
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.45",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -188,20 +188,20 @@
|
|
|
188
188
|
"whatwg-mimetype": "^4.0.0",
|
|
189
189
|
"yaml": "^2.4.5",
|
|
190
190
|
"zod": "^3.23.8",
|
|
191
|
+
"@scalar/components": "0.13.21",
|
|
191
192
|
"@scalar/draggable": "0.1.8",
|
|
192
193
|
"@scalar/icons": "0.1.2",
|
|
193
|
-
"@scalar/
|
|
194
|
-
"@scalar/
|
|
195
|
-
"@scalar/oas-utils": "0.2.102",
|
|
194
|
+
"@scalar/import": "0.2.23",
|
|
195
|
+
"@scalar/oas-utils": "0.2.103",
|
|
196
196
|
"@scalar/object-utils": "1.1.12",
|
|
197
|
+
"@scalar/openapi-parser": "0.10.5",
|
|
198
|
+
"@scalar/postman-to-openapi": "0.1.26",
|
|
197
199
|
"@scalar/openapi-types": "0.1.7",
|
|
198
|
-
"@scalar/themes": "0.9.
|
|
199
|
-
"@scalar/
|
|
200
|
-
"@scalar/
|
|
201
|
-
"@scalar/
|
|
202
|
-
"@scalar/use-codemirror": "0.11.65",
|
|
200
|
+
"@scalar/themes": "0.9.65",
|
|
201
|
+
"@scalar/types": "0.0.31",
|
|
202
|
+
"@scalar/use-codemirror": "0.11.66",
|
|
203
|
+
"@scalar/use-hooks": "0.1.19",
|
|
203
204
|
"@scalar/use-toasts": "0.7.8",
|
|
204
|
-
"@scalar/use-hooks": "0.1.18",
|
|
205
205
|
"@scalar/use-tooltip": "1.0.5"
|
|
206
206
|
},
|
|
207
207
|
"devDependencies": {
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type ErrorResponse } from '../../libs/errors.js';
|
|
2
|
-
import type { EventBus } from '../../libs/event-bus.js';
|
|
3
|
-
import type { Cookie } from '@scalar/oas-utils/entities/cookie';
|
|
4
|
-
import type { Operation, RequestExample, RequestMethod, ResponseInstance, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
|
|
5
|
-
export type RequestStatus = 'start' | 'stop' | 'abort';
|
|
6
|
-
/** Decode the buffer according to its content-type */
|
|
7
|
-
export declare function decodeBuffer(buffer: ArrayBuffer, contentType: string): string | Blob;
|
|
8
|
-
/** Populate the headers from enabled parameters */
|
|
9
|
-
export declare function createFetchHeaders(example: Pick<RequestExample, 'parameters'>, env: object): Record<string, string>;
|
|
10
|
-
/** Populate the query parameters from the example */
|
|
11
|
-
export declare function createFetchQueryParams(example: Pick<RequestExample, 'parameters'>, env: object): URLSearchParams;
|
|
12
|
-
/**
|
|
13
|
-
* Create the fetch request body from an example
|
|
14
|
-
*
|
|
15
|
-
* TODO: Should we be setting the content type headers here?
|
|
16
|
-
* If so we must allow the user to override the content type header
|
|
17
|
-
*/
|
|
18
|
-
export declare function createFetchBody(method: RequestMethod, example: RequestExample, env: object): {
|
|
19
|
-
body: URLSearchParams | FormData;
|
|
20
|
-
contentType: string;
|
|
21
|
-
} | {
|
|
22
|
-
body: string;
|
|
23
|
-
contentType: "html" | "text" | "json" | "yaml" | "xml" | "javascript" | "edn" | undefined;
|
|
24
|
-
} | {
|
|
25
|
-
body: Blob | undefined;
|
|
26
|
-
contentType: string | undefined;
|
|
27
|
-
};
|
|
28
|
-
/** Response from sendRequest hoisted so we can use it as the return type for createRequestOperation */
|
|
29
|
-
type SendRequestResponse = Promise<ErrorResponse<{
|
|
30
|
-
response: ResponseInstance;
|
|
31
|
-
request: RequestExample;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
}>>;
|
|
34
|
-
/** Execute the request */
|
|
35
|
-
export declare const createRequestOperation: ({ environment, example, globalCookies, proxyUrl, request, securitySchemes, selectedSecuritySchemeUids, server, status, }: {
|
|
36
|
-
environment: object | undefined;
|
|
37
|
-
example: RequestExample;
|
|
38
|
-
globalCookies: Cookie[];
|
|
39
|
-
proxyUrl?: string;
|
|
40
|
-
request: Operation;
|
|
41
|
-
securitySchemes: Record<string, SecurityScheme>;
|
|
42
|
-
selectedSecuritySchemeUids?: Operation["selectedSecuritySchemeUids"];
|
|
43
|
-
server?: Server;
|
|
44
|
-
status?: EventBus<RequestStatus>;
|
|
45
|
-
}) => ErrorResponse<{
|
|
46
|
-
controller: AbortController;
|
|
47
|
-
sendRequest: () => SendRequestResponse;
|
|
48
|
-
request: Request;
|
|
49
|
-
}>;
|
|
50
|
-
export {};
|
|
51
|
-
//# sourceMappingURL=send-request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-request.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/send-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,aAAa,EAAkB,MAAM,eAAe,CAAA;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAQhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAUxC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAGtD,sDAAsD;AACtD,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAapE;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EAC3C,GAAG,EAAE,MAAM,0BAgBZ;AAED,sDAAsD;AACtD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EAC3C,GAAG,EAAE,MAAM,mBAcZ;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,MAAM;;;;;;;;;EAgDZ;AAED,uGAAuG;AACvG,KAAK,mBAAmB,GAAG,OAAO,CAChC,aAAa,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAC,CACH,CAAA;AAkBD,0BAA0B;AAC1B,eAAO,MAAM,sBAAsB,6HAUhC;IACD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,SAAS,CAAA;IAClB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC/C,0BAA0B,CAAC,EAAE,SAAS,CAAC,4BAA4B,CAAC,CAAA;IACpE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAA;CACjC,KAAG,aAAa,CAAC;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,WAAW,EAAE,MAAM,mBAAmB,CAAA;IACtC,OAAO,EAAE,OAAO,CAAA;CACjB,CAgPA,CAAA"}
|