@scalar/api-client 2.0.44 → 2.0.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 +15 -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 +77 -69
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +5 -23
- package/dist/components/ContextBar.vue2.js +25 -2
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
- package/dist/components/Form/Form.vue.d.ts +12 -3
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +24 -24
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +25 -22
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +21 -21
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +19 -18
- package/dist/components/Sidebar/SidebarToggle.vue.js +1 -1
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +3 -3
- package/dist/components/SubpageHeader.vue2.js +7 -7
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/errors.d.ts +5 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +7 -0
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/libs/eventBusses/index.d.ts +1 -0
- package/dist/libs/eventBusses/index.d.ts.map +1 -1
- package/dist/libs/eventBusses/index.js +3 -1
- package/dist/libs/eventBusses/requestStatusBus.d.ts +5 -0
- package/dist/libs/eventBusses/requestStatusBus.d.ts.map +1 -0
- package/dist/libs/eventBusses/requestStatusBus.js +5 -0
- package/dist/libs/index.js +7 -5
- package/dist/libs/sendRequest.d.ts +2 -0
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +46 -37
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +34 -17
- package/dist/views/Cookies/Cookies.vue2.js +9 -9
- package/dist/views/Environment/Environment.vue2.js +24 -24
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +170 -166
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +115 -126
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +63 -42
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +69 -51
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +18 -18
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
- package/package.json +6 -6
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as c, resolveComponent as v, openBlock as o, createElementBlock as n, createVNode as t, normalizeClass as l, withModifiers as f, withCtx as g, createElementVNode as r, createCommentVNode as h, toDisplayString as k } from "vue";
|
|
2
|
+
import w from "./SidebarListElementActions.vue.js";
|
|
3
3
|
import { useRouter as _ } from "vue-router";
|
|
4
|
-
const
|
|
4
|
+
const C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "hover:bg-b-3 rounded p-1.5",
|
|
7
7
|
type: "button"
|
|
8
|
-
},
|
|
8
|
+
}, y = { class: "empty-variable-name" }, V = /* @__PURE__ */ c({
|
|
9
9
|
__name: "SidebarListElement",
|
|
10
10
|
props: {
|
|
11
11
|
variable: {},
|
|
12
12
|
warningMessage: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["delete"],
|
|
15
|
-
setup(D, { emit:
|
|
16
|
-
const
|
|
17
|
-
e.metaKey ? window.open(a, "_blank") :
|
|
15
|
+
setup(D, { emit: i }) {
|
|
16
|
+
const s = i, m = _(), p = (e, a) => {
|
|
17
|
+
e.metaKey ? window.open(a, "_blank") : m.push(a);
|
|
18
18
|
}, u = (e) => {
|
|
19
|
-
|
|
19
|
+
s("delete", e);
|
|
20
20
|
};
|
|
21
21
|
return (e, a) => {
|
|
22
|
-
const d =
|
|
23
|
-
return o(),
|
|
24
|
-
|
|
25
|
-
class:
|
|
22
|
+
const d = v("router-link");
|
|
23
|
+
return o(), n("li", null, [
|
|
24
|
+
t(d, {
|
|
25
|
+
class: l(["text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
|
|
26
26
|
exactActiveClass: "active-link",
|
|
27
27
|
to: `${e.variable.uid}`,
|
|
28
|
-
onClick: a[0] || (a[0] =
|
|
28
|
+
onClick: a[0] || (a[0] = f((b) => p(b, e.variable.uid), ["prevent"]))
|
|
29
29
|
}, {
|
|
30
|
-
default:
|
|
31
|
-
e.variable.color ? (o(),
|
|
32
|
-
|
|
33
|
-
class:
|
|
30
|
+
default: g(() => [
|
|
31
|
+
e.variable.color ? (o(), n("button", C, [
|
|
32
|
+
r("div", {
|
|
33
|
+
class: l(["h-2.5 w-2.5 rounded-xl", `bg-${e.variable.color}`])
|
|
34
34
|
}, null, 2)
|
|
35
|
-
])) :
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
])) : h("", !0),
|
|
36
|
+
r("span", y, k(e.variable.name), 1),
|
|
37
|
+
t(w, {
|
|
38
38
|
variable: { ...e.variable, isDefault: e.variable.isDefault ?? !1 },
|
|
39
39
|
warningMessage: e.warningMessage,
|
|
40
40
|
onDelete: u
|
|
@@ -47,5 +47,5 @@ const y = {
|
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
V as default
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAqFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;cAJS;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;AA6LH,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as k, ref as w, openBlock as l, createElementBlock as
|
|
1
|
+
import { defineComponent as k, ref as w, openBlock as l, createElementBlock as c, Fragment as g, createElementVNode as u, unref as a, createVNode as i, withModifiers as N, createCommentVNode as m, withCtx as x, createBlock as $ } from "vue";
|
|
2
2
|
import D from "./Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
-
import { useModal as M, ScalarIcon as
|
|
3
|
+
import { useModal as M, ScalarIcon as d, ScalarModal as A } from "@scalar/components";
|
|
4
4
|
import { useClipboard as S } from "../../hooks/useClipboard.js";
|
|
5
5
|
const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, z = /* @__PURE__ */ k({
|
|
6
6
|
__name: "SidebarListElementActions",
|
|
@@ -8,39 +8,39 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
|
8
8
|
variable: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["delete"],
|
|
11
|
-
setup(
|
|
12
|
-
const { variable:
|
|
13
|
-
function
|
|
14
|
-
t.value = { action: e, name:
|
|
11
|
+
setup(p, { emit: v }) {
|
|
12
|
+
const { variable: b } = p, f = v, t = w({ action: "None", name: "" }), n = M(), { copyToClipboard: h } = S();
|
|
13
|
+
function C(e) {
|
|
14
|
+
t.value = { action: e, name: b.name }, n.show();
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function r() {
|
|
17
17
|
n.hide(), t.value = { action: "None", name: "" };
|
|
18
18
|
}
|
|
19
19
|
function y(e) {
|
|
20
|
-
|
|
20
|
+
f("delete", e), r();
|
|
21
21
|
}
|
|
22
|
-
return (e, o) => (l(),
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
return (e, o) => (l(), c(g, null, [
|
|
23
|
+
u("div", B, [
|
|
24
|
+
u("button", {
|
|
25
25
|
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
|
|
26
26
|
type: "button",
|
|
27
|
-
onClick: o[0] || (o[0] = (
|
|
27
|
+
onClick: o[0] || (o[0] = (s) => a(h)(e.variable.name))
|
|
28
28
|
}, [
|
|
29
|
-
i(a(
|
|
29
|
+
i(a(d), {
|
|
30
30
|
class: "h-3 w-3",
|
|
31
31
|
icon: "Clipboard"
|
|
32
32
|
})
|
|
33
33
|
]),
|
|
34
|
-
e.variable.isDefault ?
|
|
34
|
+
e.variable.isDefault ? m("", !0) : (l(), c("button", {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1",
|
|
37
37
|
type: "button",
|
|
38
|
-
onClick: o[1] || (o[1] = N((
|
|
38
|
+
onClick: o[1] || (o[1] = N((s) => C(
|
|
39
39
|
"Delete"
|
|
40
40
|
/* Delete */
|
|
41
41
|
), ["prevent"]))
|
|
42
42
|
}, [
|
|
43
|
-
i(a(
|
|
43
|
+
i(a(d), {
|
|
44
44
|
class: "h-3.5 w-3.5",
|
|
45
45
|
icon: "Close"
|
|
46
46
|
})
|
|
@@ -56,8 +56,9 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
|
56
56
|
key: 0,
|
|
57
57
|
variableName: t.value.name,
|
|
58
58
|
warningMessage: "Are you sure you want to delete this cookie?",
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
onClose: r,
|
|
60
|
+
onDelete: o[2] || (o[2] = (s) => y(e.variable.uid))
|
|
61
|
+
}, null, 8, ["variableName"])) : m("", !0)
|
|
61
62
|
]),
|
|
62
63
|
_: 1
|
|
63
64
|
}, 8, ["state", "title"])
|
|
@@ -25,7 +25,7 @@ const a = {
|
|
|
25
25
|
emits: ["update:modelValue"],
|
|
26
26
|
setup(u) {
|
|
27
27
|
return (t, o) => (l(), n("button", {
|
|
28
|
-
class: "text-c-3 hover:bg-b-
|
|
28
|
+
class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
|
|
29
29
|
type: "button",
|
|
30
30
|
onClick: o[0] || (o[0] = (p) => t.$emit("update:modelValue", !t.modelValue))
|
|
31
31
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/SubpageHeader.vue"],"names":[],"mappings":"AA2CA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"SubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/SubpageHeader.vue"],"names":[],"mappings":"AA2CA,iBAAS,cAAc;qBAuFO,GAAG;EAehC;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./SubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const p = /* @__PURE__ */
|
|
3
|
+
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ o(a, [["__scopeId", "data-v-a15baa95"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as a, resolveComponent as d, openBlock as l, createElementBlock as
|
|
2
|
-
import { ScalarIcon as
|
|
1
|
+
import { defineComponent as a, resolveComponent as d, openBlock as l, createElementBlock as i, createElementVNode as r, createVNode as t, unref as o, withCtx as p, renderSlot as u, pushScopeId as m, popScopeId as f } from "vue";
|
|
2
|
+
import { ScalarIcon as _ } from "@scalar/components";
|
|
3
3
|
import { useRoute as h } from "vue-router";
|
|
4
|
-
const
|
|
4
|
+
const b = (e) => (m("data-v-a15baa95"), e = e(), f(), e), v = { class: "flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden" }, x = { class: "lg:min-h-header items-center w-full p-1 t-app__top-container flex items-center border-b-1/2" }, k = /* @__PURE__ */ b(() => /* @__PURE__ */ r("span", { class: "leading-none" }, "Back To Requests", -1)), I = /* @__PURE__ */ a({
|
|
5
5
|
__name: "SubpageHeader",
|
|
6
6
|
setup(e) {
|
|
7
7
|
const n = h();
|
|
8
8
|
return (s, g) => {
|
|
9
9
|
const c = d("router-link");
|
|
10
|
-
return l(),
|
|
10
|
+
return l(), i("div", v, [
|
|
11
11
|
r("div", x, [
|
|
12
12
|
t(c, {
|
|
13
13
|
class: "text-c-2 text-sm font-medium ml-1 flex items-center p-1.5 hover:bg-b-3 rounded cursor-pointer gap-0.5 active:text-c-1 no-underline dark:hover:bg-b-2",
|
|
14
14
|
to: `/workspace/${o(n).params.workspace}/request/default`
|
|
15
15
|
}, {
|
|
16
|
-
default:
|
|
17
|
-
t(o(
|
|
16
|
+
default: p(() => [
|
|
17
|
+
t(o(_), {
|
|
18
18
|
icon: "ChevronLeft",
|
|
19
19
|
size: "md",
|
|
20
20
|
thickness: "1.75"
|
|
21
21
|
}),
|
|
22
|
-
|
|
22
|
+
k
|
|
23
23
|
]),
|
|
24
24
|
_: 1
|
|
25
25
|
}, 8, ["to"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-76f92299"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -4,7 +4,7 @@ import { ScalarIcon as h } from "@scalar/components";
|
|
|
4
4
|
import { capitalize as V } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import j from "./TopNavItem.vue.js";
|
|
6
6
|
import { useWorkspace as q } from "../../store/workspace.js";
|
|
7
|
-
const L = (l) => (B("data-v-
|
|
7
|
+
const L = (l) => (B("data-v-76f92299"), l = l(), E(), l), $ = { class: "flex h-10 t-app__top-nav" }, D = /* @__PURE__ */ L(() => /* @__PURE__ */ i("div", { class: "t-app__top-nav-draggable" }, null, -1)), F = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, M = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "flex items-center gap-1 w-full justify-center"
|
|
10
10
|
}, K = /* @__PURE__ */ N({
|
|
@@ -67,7 +67,7 @@ const L = (l) => (B("data-v-868c07b1"), l = l(), E(), l), $ = { class: "flex h-1
|
|
|
67
67
|
onClose: (I) => k(o)
|
|
68
68
|
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose"]))), 128)),
|
|
69
69
|
i("button", {
|
|
70
|
-
class: "text-c-3 hover:bg-b-
|
|
70
|
+
class: "text-c-3 hover:bg-b-3 p-1.5 rounded-lg webkit-app-no-drag",
|
|
71
71
|
type: "button",
|
|
72
72
|
onClick: _
|
|
73
73
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AAqIA,OAAO,EAAE,KAAK,IAAI,EAA6B,MAAM,oBAAoB,CAAA;;aAK9D,MAAM;YACP,OAAO;WACR,MAAM;UACP,IAAI;;;;;aAHD,MAAM;YACP,OAAO;WACR,MAAM;UACP,IAAI;;;;;AAyJZ,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNavItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-96375fac"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAcA,iBAAS,cAAc;qBAuBM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as
|
|
1
|
+
import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
|
|
2
2
|
import n from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return o(),
|
|
6
|
-
|
|
3
|
+
const c = {}, l = { class: "flex min-h-0 flex-1 xl:overflow-hidden leading-3 z-0" };
|
|
4
|
+
function s(e, f) {
|
|
5
|
+
return o(), t("div", l, [
|
|
6
|
+
r(e.$slots, "default")
|
|
7
7
|
]);
|
|
8
8
|
}
|
|
9
|
-
const a = /* @__PURE__ */ n(
|
|
9
|
+
const a = /* @__PURE__ */ n(c, [["render", s]]);
|
|
10
10
|
export {
|
|
11
11
|
a as default
|
|
12
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
|
|
2
2
|
import d from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const l = {}, c = { class: "divide divide-y xl:divide-y-0 xl:divide-x flex xl:flex-row flex-col custom-scroll rounded" };
|
|
3
|
+
const l = {}, c = { class: "divide divide-y xl:divide-y-0 xl:divide-x-1/2 flex xl:flex-row flex-col custom-scroll rounded" };
|
|
4
4
|
function i(e, n) {
|
|
5
5
|
return o(), t("div", c, [
|
|
6
6
|
r(e.$slots, "default")
|
|
@@ -10,7 +10,7 @@ const a = ["aria-labelledby"], c = ["id"], u = /* @__PURE__ */ n({
|
|
|
10
10
|
}, [
|
|
11
11
|
i("div", {
|
|
12
12
|
id: o(e),
|
|
13
|
-
class: "xl:min-h-header py-2.5 flex items-center border-b px-4 xl:px-6 text-sm font-medium sticky top-0 bg-b-1 z-20 rounded-t xl:rounded-none"
|
|
13
|
+
class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-4 xl:px-6 text-sm font-medium sticky top-0 bg-b-1 z-20 rounded-t xl:rounded-none"
|
|
14
14
|
}, [
|
|
15
15
|
l(t.$slots, "title")
|
|
16
16
|
], 8, c),
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGlB,CAAA"}
|
package/dist/errors.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";AAqTA,wBAKG"}
|
|
@@ -2,7 +2,7 @@ import o from "./ApiClientModal.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6ed1e26d"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/eventBusses/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/eventBusses/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestStatusBus.d.ts","sourceRoot":"","sources":["../../../src/libs/eventBusses/requestStatusBus.ts"],"names":[],"mappings":"AAEA,gCAAgC;AAChC,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAO/C,eAAO,MAAM,gBAAgB,8DAAkD,CAAA"}
|
package/dist/libs/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { createApiClient as o } from "./create-client.js";
|
|
2
|
-
import { formatBytes as
|
|
2
|
+
import { formatBytes as s, formatMs as m } from "./formatters.js";
|
|
3
3
|
import { loadAllResources as a } from "./local-storage.js";
|
|
4
|
-
import { syncPathParamsFromURL as
|
|
4
|
+
import { syncPathParamsFromURL as u } from "./pathParams.js";
|
|
5
5
|
import { sendRequest as c } from "./sendRequest.js";
|
|
6
6
|
import { executeRequestBus as R } from "./eventBusses/executeRequestBus.js";
|
|
7
|
+
import { requestStatusBus as q } from "./eventBusses/requestStatusBus.js";
|
|
7
8
|
export {
|
|
8
9
|
o as createApiClient,
|
|
9
10
|
R as executeRequestBus,
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
s as formatBytes,
|
|
12
|
+
m as formatMs,
|
|
12
13
|
a as loadAllResources,
|
|
14
|
+
q as requestStatusBus,
|
|
13
15
|
c as sendRequest,
|
|
14
|
-
|
|
16
|
+
u as syncPathParamsFromURL
|
|
15
17
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Cookie } from '@scalar/oas-utils/entities/workspace/cookie';
|
|
2
2
|
import type { SecurityScheme } from '@scalar/oas-utils/entities/workspace/security';
|
|
3
3
|
import type { Request, RequestExample, ResponseInstance } from '@scalar/oas-utils/entities/workspace/spec';
|
|
4
|
+
import { type AxiosError } from 'axios';
|
|
4
5
|
/**
|
|
5
6
|
* Execute the request
|
|
6
7
|
* called from the send button as well as keyboard shortcuts
|
|
@@ -9,5 +10,6 @@ export declare const sendRequest: (request: Request, example: RequestExample, ra
|
|
|
9
10
|
sentTime?: number;
|
|
10
11
|
request?: RequestExample;
|
|
11
12
|
response?: ResponseInstance;
|
|
13
|
+
error?: AxiosError;
|
|
12
14
|
}>;
|
|
13
15
|
//# sourceMappingURL=sendRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/libs/sendRequest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/libs/sendRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAA;AACnF,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EAEd,gBAAgB,EACjB,MAAM,2CAA2C,CAAA;AAMlD,OAAc,EAAE,KAAK,UAAU,EAA2B,MAAM,OAAO,CAAA;AA8BvE;;;GAGG;AACH,eAAO,MAAM,WAAW,YACb,OAAO,WACP,cAAc,UACf,MAAM,oBACI,cAAc,EAAE,aACvB,MAAM,qBACE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACxC,OAAO,CAAC;IACT,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAkOA,CAAA"}
|
package/dist/libs/sendRequest.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ERRORS as E } from "../errors.js";
|
|
2
|
+
import { normalizeHeaders as $ } from "./normalizeHeaders.js";
|
|
3
|
+
import { isValidUrl as L, redirectToProxy as q, shouldUseProxy as B } from "@scalar/oas-utils/helpers";
|
|
3
4
|
import C from "axios";
|
|
4
5
|
import O from "js-cookie";
|
|
5
6
|
import U from "whatwg-mimetype";
|
|
6
7
|
import { textMediaTypes as F } from "../views/Request/consts/mediaTypes.js";
|
|
7
|
-
const
|
|
8
|
+
const f = (s = []) => s.reduce(
|
|
8
9
|
(o, n) => (n.key && (o[n.key] = n.value), o),
|
|
9
10
|
{}
|
|
10
|
-
),
|
|
11
|
+
), k = (s, o) => {
|
|
11
12
|
const n = new U(o);
|
|
12
13
|
if (F.includes(n.essence)) {
|
|
13
14
|
const d = new TextDecoder(n.parameters.get("charset")).decode(s);
|
|
14
15
|
return n.subtype === "json" ? JSON.parse(d) : d;
|
|
15
16
|
} else
|
|
16
17
|
return new Blob([s], { type: n.essence });
|
|
17
|
-
},
|
|
18
|
+
}, N = async (s, o, n, u, d, l) => {
|
|
18
19
|
let i = n;
|
|
19
20
|
o.parameters.path.forEach((e) => {
|
|
20
21
|
!e.key || !e.value || (i = i.replace(`{${e.key}}`, e.value));
|
|
21
22
|
});
|
|
22
|
-
const a =
|
|
23
|
+
const a = f(
|
|
23
24
|
o.parameters.headers.filter(({ enabled: e }) => e)
|
|
24
25
|
);
|
|
25
26
|
let c = null;
|
|
@@ -31,36 +32,43 @@ const l = (s = []) => s.reduce(
|
|
|
31
32
|
a["Content-Type"] = "multipart/form-data";
|
|
32
33
|
const e = new FormData();
|
|
33
34
|
o.body.formData.encoding === "form-data" && (o.body.formData.value.forEach(
|
|
34
|
-
(
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
(t) => {
|
|
36
|
+
const r = t.file ? t.file : t.value;
|
|
37
|
+
t.key && r && e.append(t.key, r);
|
|
37
38
|
}
|
|
38
39
|
), c = e);
|
|
39
40
|
}
|
|
40
|
-
const p = [], [
|
|
41
|
-
new URLSearchParams(
|
|
41
|
+
const p = [], [D, g] = i.split("?");
|
|
42
|
+
new URLSearchParams(g ?? "").forEach((e, t) => {
|
|
42
43
|
p.push({
|
|
43
|
-
key:
|
|
44
|
+
key: t,
|
|
44
45
|
value: e,
|
|
45
46
|
enabled: !0
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
|
-
const
|
|
49
|
-
...
|
|
49
|
+
const w = {
|
|
50
|
+
...f(
|
|
50
51
|
o.parameters.query.filter(({ enabled: e }) => e).filter(({ value: e }) => e !== "")
|
|
51
52
|
),
|
|
52
|
-
...
|
|
53
|
+
...f(p)
|
|
53
54
|
}, y = {
|
|
54
|
-
...
|
|
55
|
+
...f(
|
|
55
56
|
(o.parameters.cookies ?? []).filter(({ enabled: e }) => e)
|
|
56
57
|
)
|
|
57
58
|
};
|
|
58
|
-
if (
|
|
59
|
+
if (l) {
|
|
60
|
+
if (!n)
|
|
61
|
+
throw new Error(E.URL_EMPTY);
|
|
62
|
+
try {
|
|
63
|
+
new URL(n);
|
|
64
|
+
} catch {
|
|
65
|
+
throw new Error(E.INVALID_URL);
|
|
66
|
+
}
|
|
59
67
|
const e = new URL(n).host;
|
|
60
|
-
Object.keys(
|
|
61
|
-
const
|
|
62
|
-
if (!
|
|
63
|
-
(
|
|
68
|
+
Object.keys(l).forEach((t) => {
|
|
69
|
+
const r = l[t];
|
|
70
|
+
if (!r.domain) return;
|
|
71
|
+
(L(r.domain) ? new URL(r.domain).origin : r.domain) === e && (y[r.name] = r.domain);
|
|
64
72
|
});
|
|
65
73
|
}
|
|
66
74
|
u == null || u.forEach((e) => {
|
|
@@ -70,7 +78,7 @@ const l = (s = []) => s.reduce(
|
|
|
70
78
|
y[e.name] = e.value;
|
|
71
79
|
break;
|
|
72
80
|
case "query":
|
|
73
|
-
|
|
81
|
+
w[e.name] = e.value;
|
|
74
82
|
break;
|
|
75
83
|
case "header":
|
|
76
84
|
a[e.name] = e.value;
|
|
@@ -85,8 +93,8 @@ const l = (s = []) => s.reduce(
|
|
|
85
93
|
secure: !0
|
|
86
94
|
});
|
|
87
95
|
});
|
|
88
|
-
const
|
|
89
|
-
i = `${
|
|
96
|
+
const v = new URLSearchParams(w).toString();
|
|
97
|
+
i = `${D}${v ? "?" + v : ""}`;
|
|
90
98
|
const h = {
|
|
91
99
|
url: q(d, i),
|
|
92
100
|
method: s.method,
|
|
@@ -94,7 +102,7 @@ const l = (s = []) => s.reduce(
|
|
|
94
102
|
headers: a
|
|
95
103
|
};
|
|
96
104
|
c && (h.data = c);
|
|
97
|
-
const
|
|
105
|
+
const R = Date.now();
|
|
98
106
|
try {
|
|
99
107
|
const e = await C(h);
|
|
100
108
|
B(d, i) && [
|
|
@@ -103,33 +111,34 @@ const l = (s = []) => s.reduce(
|
|
|
103
111
|
"Access-Control-Allow-Methods",
|
|
104
112
|
"Access-Control-Expose-Headers"
|
|
105
113
|
].map((b) => b.toLowerCase()).forEach((b) => delete e.headers[b]);
|
|
106
|
-
const
|
|
114
|
+
const t = e.data, r = e.headers["Content-Type"] ?? e.headers["content-type"] ?? "text/plain;charset=UTF-8", T = k(t, `${r}`), A = $(e.headers);
|
|
107
115
|
return {
|
|
108
116
|
sentTime: Date.now(),
|
|
109
117
|
request: o,
|
|
110
118
|
response: {
|
|
111
119
|
...e,
|
|
112
|
-
headers:
|
|
113
|
-
data:
|
|
114
|
-
duration: Date.now() -
|
|
120
|
+
headers: A,
|
|
121
|
+
data: T,
|
|
122
|
+
duration: Date.now() - R
|
|
115
123
|
}
|
|
116
124
|
};
|
|
117
125
|
} catch (e) {
|
|
118
|
-
const t = e.response;
|
|
126
|
+
const t = e, r = t.response;
|
|
119
127
|
return console.error("ERROR", e), {
|
|
120
128
|
sentTime: Date.now(),
|
|
121
129
|
request: o,
|
|
122
|
-
response:
|
|
123
|
-
...
|
|
124
|
-
data:
|
|
125
|
-
|
|
130
|
+
response: r ? {
|
|
131
|
+
...r,
|
|
132
|
+
data: k(
|
|
133
|
+
r.data,
|
|
126
134
|
"text/plain;charset=UTF-8"
|
|
127
135
|
),
|
|
128
|
-
duration: Date.now() -
|
|
129
|
-
} : void 0
|
|
136
|
+
duration: Date.now() - R
|
|
137
|
+
} : void 0,
|
|
138
|
+
error: t
|
|
130
139
|
};
|
|
131
140
|
}
|
|
132
141
|
};
|
|
133
142
|
export {
|
|
134
|
-
|
|
143
|
+
N as sendRequest
|
|
135
144
|
};
|