@scalar/api-client 2.0.38 → 2.0.40
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 +32 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +84 -80
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +18 -14
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +5 -40
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +48 -2
- 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 +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +24 -22
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +26 -25
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +5 -29
- package/dist/components/SubpageHeader.vue2.js +31 -2
- package/dist/layouts/App/create-api-client-app.d.ts +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +40 -40
- package/dist/libs/create-client.d.ts +20 -20
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +87 -70
- package/dist/store/workspace.d.ts +64 -64
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +129 -132
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +46 -36
- package/dist/views/Environment/Environment.vue2.js +26 -26
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +37 -34
- 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 +196 -142
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +5 -311
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +312 -2
- package/dist/views/Request/RequestSection/RequestSection.vue.js +19 -19
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +4 -4
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +108 -87
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +5 -162
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +166 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +3 -17
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +89 -5
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +2 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +18 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +34 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts +12 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +14 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +23 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +65 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +19 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +29 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +20 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +25 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +61 -63
- package/dist/views/Request/consts/index.d.ts +2 -0
- package/dist/views/Request/consts/index.d.ts.map +1 -1
- package/dist/views/Request/consts/index.js +6 -3
- package/dist/views/Request/consts/mediaTypes.d.ts +16 -0
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -0
- package/dist/views/Request/consts/mediaTypes.js +108 -0
- package/dist/views/Servers/Servers.vue2.js +17 -17
- package/package.json +8 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as u, openBlock as r, createElementBlock as d, createElementVNode as o, normalizeClass as l, withModifiers as n } from "vue";
|
|
2
|
+
const a = { class: "text-c-3 flex -my-1 justify-center rounded text-xxs p-0.5 gap-0.5" }, i = /* @__PURE__ */ u({
|
|
3
|
+
__name: "ResponseBodyToggle",
|
|
4
|
+
props: {
|
|
5
|
+
modelValue: { type: Boolean }
|
|
6
|
+
},
|
|
7
|
+
emits: ["update:modelValue"],
|
|
8
|
+
setup(p) {
|
|
9
|
+
return (e, t) => (r(), d("div", a, [
|
|
10
|
+
o("button", {
|
|
11
|
+
class: l(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": e.modelValue }]),
|
|
12
|
+
type: "button",
|
|
13
|
+
onClick: t[0] || (t[0] = n((s) => e.$emit("update:modelValue", !0), ["stop"]))
|
|
14
|
+
}, " Preview ", 2),
|
|
15
|
+
o("button", {
|
|
16
|
+
class: l(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": !e.modelValue }]),
|
|
17
|
+
type: "button",
|
|
18
|
+
onClick: t[1] || (t[1] = n((s) => e.$emit("update:modelValue", !1), ["stop"]))
|
|
19
|
+
}, " Raw ", 2)
|
|
20
|
+
]));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
i as default
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cASrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkNxC,wBAMG;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,91 +1,89 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ScalarIcon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const j = { class: "flex items-center flex-1" }, H = { class: "custom-scroll flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, G = /* @__PURE__ */ y({
|
|
1
|
+
import { defineComponent as _, computed as m, ref as h, openBlock as n, createBlock as r, withCtx as p, createVNode as u, unref as x, createElementVNode as d, createTextVNode as y, createCommentVNode as l, createElementBlock as C, Fragment as A } from "vue";
|
|
2
|
+
import S from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import B from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import $ from "./ResponseBody.vue.js";
|
|
5
|
+
import E from "./ResponseEmpty.vue.js";
|
|
6
|
+
import N from "./ResponseMetaInformation.vue.js";
|
|
7
|
+
import { ScalarIcon as V } from "@scalar/components";
|
|
8
|
+
import g from "./ResponseCookies.vue.js";
|
|
9
|
+
import H from "./ResponseHeaders.vue.js";
|
|
10
|
+
const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, T = /* @__PURE__ */ _({
|
|
12
11
|
__name: "ResponseSection",
|
|
13
12
|
props: {
|
|
14
13
|
response: {}
|
|
15
14
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
const e = (
|
|
20
|
-
return e ? Object.keys(e).map((
|
|
21
|
-
name:
|
|
22
|
-
value: e[
|
|
15
|
+
setup(f) {
|
|
16
|
+
const c = f, i = m(() => {
|
|
17
|
+
var t;
|
|
18
|
+
const e = (t = c.response) == null ? void 0 : t.headers;
|
|
19
|
+
return e ? Object.keys(e).map((o) => ({
|
|
20
|
+
name: o,
|
|
21
|
+
value: e[o],
|
|
23
22
|
required: !1
|
|
24
23
|
})).filter(
|
|
25
|
-
(
|
|
24
|
+
(o) => ![
|
|
26
25
|
"rest-api-client-content-length",
|
|
27
26
|
"X-API-Client-Content-Length"
|
|
28
|
-
].includes(
|
|
27
|
+
].includes(o.name)
|
|
29
28
|
) : [];
|
|
30
|
-
}), v =
|
|
31
|
-
var
|
|
32
|
-
const e = (
|
|
33
|
-
return e ? Object.keys(e).map((
|
|
34
|
-
name:
|
|
35
|
-
value: e[
|
|
29
|
+
}), v = m(() => {
|
|
30
|
+
var t, o;
|
|
31
|
+
const e = (o = (t = c.response) == null ? void 0 : t.headers) == null ? void 0 : o.cookies;
|
|
32
|
+
return e ? Object.keys(e).map((a) => ({
|
|
33
|
+
name: a,
|
|
34
|
+
value: e[a],
|
|
36
35
|
required: !1
|
|
37
36
|
})) : [];
|
|
38
|
-
}), k =
|
|
39
|
-
|
|
40
|
-
const e = (o = a.response) == null ? void 0 : o.data;
|
|
41
|
-
return e && J(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof h(e) == "object" ? JSON.stringify(e, null, 2) : e;
|
|
42
|
-
}), _ = ["All", "Body", "Headers", "Cookies"], s = x("All");
|
|
43
|
-
return (e, o) => (r(), n(g, null, {
|
|
37
|
+
}), k = ["All", "Body", "Headers", "Cookies"], s = h("All");
|
|
38
|
+
return (e, t) => (n(), r(B, null, {
|
|
44
39
|
title: p(() => [
|
|
45
|
-
u(
|
|
40
|
+
u(x(V), {
|
|
46
41
|
class: "text-c-3 mr-2 rotate-180",
|
|
47
42
|
icon: "ExternalLink",
|
|
48
43
|
size: "sm",
|
|
49
44
|
thickness: "2.5"
|
|
50
45
|
}),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
e.response ? (
|
|
46
|
+
d("div", R, [
|
|
47
|
+
y(" Response "),
|
|
48
|
+
e.response ? (n(), r(N, {
|
|
54
49
|
key: 0,
|
|
55
50
|
response: e.response
|
|
56
51
|
}, null, 8, ["response"])) : l("", !0)
|
|
57
52
|
])
|
|
58
53
|
]),
|
|
59
|
-
default: p(() =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
54
|
+
default: p(() => {
|
|
55
|
+
var o;
|
|
56
|
+
return [
|
|
57
|
+
d("div", b, [
|
|
58
|
+
e.response ? (n(), C(A, { key: 1 }, [
|
|
59
|
+
u(S, {
|
|
60
|
+
activeSection: s.value,
|
|
61
|
+
sections: k,
|
|
62
|
+
onSetActiveSection: t[0] || (t[0] = (a) => s.value = a)
|
|
63
|
+
}, null, 8, ["activeSection"]),
|
|
64
|
+
s.value === "All" || s.value === "Cookies" ? (n(), r(g, {
|
|
65
|
+
key: 0,
|
|
66
|
+
cookies: v.value
|
|
67
|
+
}, null, 8, ["cookies"])) : l("", !0),
|
|
68
|
+
s.value === "All" || s.value === "Headers" ? (n(), r(H, {
|
|
69
|
+
key: 1,
|
|
70
|
+
headers: i.value
|
|
71
|
+
}, null, 8, ["headers"])) : l("", !0),
|
|
72
|
+
s.value === "All" || s.value === "Body" ? (n(), r($, {
|
|
73
|
+
key: 2,
|
|
74
|
+
active: !0,
|
|
75
|
+
data: (o = c.response) == null ? void 0 : o.data,
|
|
76
|
+
headers: i.value,
|
|
77
|
+
title: "Body"
|
|
78
|
+
}, null, 8, ["data", "headers"])) : l("", !0)
|
|
79
|
+
], 64)) : (n(), r(E, { key: 0 }))
|
|
80
|
+
])
|
|
81
|
+
];
|
|
82
|
+
}),
|
|
85
83
|
_: 1
|
|
86
84
|
}));
|
|
87
85
|
}
|
|
88
86
|
});
|
|
89
87
|
export {
|
|
90
|
-
|
|
88
|
+
T as default
|
|
91
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,mBAAmB,cAAc,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mediaTypes as D, textMediaTypes as o } from "./mediaTypes.js";
|
|
2
|
+
import { ADD_AUTH_DICT as r, ADD_AUTH_OPTIONS as t } from "./new-auth-options.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
r as ADD_AUTH_DICT,
|
|
5
|
+
t as ADD_AUTH_OPTIONS,
|
|
6
|
+
D as mediaTypes,
|
|
7
|
+
o as textMediaTypes
|
|
5
8
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
|
+
export type MediaPreview = 'object' | 'image' | 'video' | 'audio';
|
|
3
|
+
export type MediaConfig = {
|
|
4
|
+
preview?: MediaPreview;
|
|
5
|
+
alpha?: boolean;
|
|
6
|
+
raw?: boolean;
|
|
7
|
+
language?: CodeMirrorLanguage;
|
|
8
|
+
extension: string;
|
|
9
|
+
};
|
|
10
|
+
/** Media Type (MIME Type) Definitions */
|
|
11
|
+
export declare const mediaTypes: {
|
|
12
|
+
[type: string]: MediaConfig | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** Media Types (MIME Types) that can be displayed as raw text */
|
|
15
|
+
export declare const textMediaTypes: string[];
|
|
16
|
+
//# sourceMappingURL=mediaTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CAuGjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
"application/epub+zip": { extension: ".epub" },
|
|
3
|
+
"application/gzip": { extension: ".gz" },
|
|
4
|
+
"application/java-archive": { extension: ".jar" },
|
|
5
|
+
"application/javascript": { extension: ".js", raw: !0 },
|
|
6
|
+
"application/json": { extension: ".json", raw: !0, language: "json" },
|
|
7
|
+
"application/ld+json": { extension: ".jsonld", raw: !0, language: "json" },
|
|
8
|
+
"application/msword": { extension: ".doc" },
|
|
9
|
+
"application/octet-stream": { extension: ".bin" },
|
|
10
|
+
"application/ogg": { extension: ".ogx" },
|
|
11
|
+
"application/pdf": { extension: ".pdf", preview: "object" },
|
|
12
|
+
"application/rtf": { extension: ".rtf", raw: !0 },
|
|
13
|
+
"application/vnd.amazon.ebook": { extension: ".azw" },
|
|
14
|
+
"application/vnd.apple.installer+xml": {
|
|
15
|
+
extension: ".mpkg",
|
|
16
|
+
raw: !0,
|
|
17
|
+
language: "xml"
|
|
18
|
+
},
|
|
19
|
+
"application/vnd.mozilla.xul+xml": {
|
|
20
|
+
extension: ".xul",
|
|
21
|
+
raw: !0,
|
|
22
|
+
language: "xml"
|
|
23
|
+
},
|
|
24
|
+
"application/vnd.ms-excel": { extension: ".xls" },
|
|
25
|
+
"application/vnd.ms-fontobject": { extension: ".eot" },
|
|
26
|
+
"application/vnd.ms-powerpoint": { extension: ".ppt" },
|
|
27
|
+
"application/vnd.oasis.opendocument.presentation": { extension: ".odp" },
|
|
28
|
+
"application/vnd.oasis.opendocument.spreadsheet": { extension: ".ods" },
|
|
29
|
+
"application/vnd.oasis.opendocument.text": { extension: ".odt" },
|
|
30
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": {
|
|
31
|
+
extension: ".pptx"
|
|
32
|
+
},
|
|
33
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
|
|
34
|
+
extension: ".xlsx"
|
|
35
|
+
},
|
|
36
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
|
37
|
+
extension: ".docx"
|
|
38
|
+
},
|
|
39
|
+
"application/vnd.rar": { extension: ".rar" },
|
|
40
|
+
"application/vnd.visio": { extension: ".vsd" },
|
|
41
|
+
"application/x-7z-compressed": { extension: ".7z" },
|
|
42
|
+
"application/x-abiword": { extension: ".abw" },
|
|
43
|
+
"application/x-bzip": { extension: ".bz" },
|
|
44
|
+
"application/x-bzip2": { extension: ".bz2" },
|
|
45
|
+
"application/x-cdf": { extension: ".cda" },
|
|
46
|
+
"application/x-csh": { extension: ".csh" },
|
|
47
|
+
"application/x-freearc": { extension: ".arc" },
|
|
48
|
+
"application/x-httpd-php": { extension: ".php", raw: !0 },
|
|
49
|
+
"application/x-sh": { extension: ".sh", raw: !0 },
|
|
50
|
+
"application/x-tar": { extension: ".tar" },
|
|
51
|
+
"application/xhtml+xml": { extension: ".xhtml", raw: !0, language: "html" },
|
|
52
|
+
"application/xml": { extension: ".xml", raw: !0, language: "xml" },
|
|
53
|
+
"application/yaml": { extension: ".yaml", raw: !0, language: "yaml" },
|
|
54
|
+
"application/zip": { extension: ".zip" },
|
|
55
|
+
"audio/aac": { extension: ".aac" },
|
|
56
|
+
"audio/midi": { extension: ".midi" },
|
|
57
|
+
"audio/mpeg": { extension: ".mp3", preview: "audio" },
|
|
58
|
+
"audio/ogg": { extension: ".oga" },
|
|
59
|
+
"audio/wav": { extension: ".wav" },
|
|
60
|
+
"audio/webm": { extension: ".weba" },
|
|
61
|
+
"font/otf": { extension: ".otf" },
|
|
62
|
+
"font/ttf": { extension: ".ttf" },
|
|
63
|
+
"font/woff": { extension: ".woff" },
|
|
64
|
+
"font/woff2": { extension: ".woff2" },
|
|
65
|
+
"image/apng": { extension: ".apng", preview: "image", alpha: !0 },
|
|
66
|
+
"image/avif": { extension: ".avif", preview: "image" },
|
|
67
|
+
"image/bmp": { extension: ".bmp", preview: "image" },
|
|
68
|
+
"image/gif": { extension: ".gif", preview: "image", alpha: !0 },
|
|
69
|
+
"image/jpeg": { extension: ".jpg", preview: "image" },
|
|
70
|
+
"image/png": { extension: ".png", preview: "image", alpha: !0 },
|
|
71
|
+
"image/svg+xml": {
|
|
72
|
+
extension: ".svg",
|
|
73
|
+
raw: !0,
|
|
74
|
+
language: "xml",
|
|
75
|
+
preview: "image",
|
|
76
|
+
alpha: !0
|
|
77
|
+
},
|
|
78
|
+
"image/tiff": { extension: ".tiff" },
|
|
79
|
+
"image/vnd.microsoft.icon": { extension: ".ico", preview: "image" },
|
|
80
|
+
"image/webp": { extension: ".webp", preview: "image", alpha: !0 },
|
|
81
|
+
"text/calendar": { extension: ".ics", raw: !0 },
|
|
82
|
+
"text/css": { extension: ".css", raw: !0, language: "css" },
|
|
83
|
+
"text/csv": { extension: ".csv", raw: !0 },
|
|
84
|
+
"text/html": {
|
|
85
|
+
extension: ".html",
|
|
86
|
+
raw: !0,
|
|
87
|
+
language: "html",
|
|
88
|
+
preview: "object"
|
|
89
|
+
},
|
|
90
|
+
"text/javascript": { extension: ".js", raw: !0 },
|
|
91
|
+
"text/plain": { extension: ".txt", raw: !0 },
|
|
92
|
+
"text/xml": { extension: ".xml", raw: !0, language: "xml" },
|
|
93
|
+
"text/yaml": { extension: ".yaml", raw: !0, language: "yaml" },
|
|
94
|
+
"video/3gpp": { extension: ".3gp" },
|
|
95
|
+
"audio/3gpp": { extension: ".3gp" },
|
|
96
|
+
"video/3gpp2": { extension: ".3g2" },
|
|
97
|
+
"audio/3gpp2": { extension: ".3g2" },
|
|
98
|
+
"video/mp2t": { extension: ".ts" },
|
|
99
|
+
"video/mp4": { extension: ".mp4", preview: "video" },
|
|
100
|
+
"video/mpeg": { extension: ".mpeg" },
|
|
101
|
+
"video/ogg": { extension: ".ogv" },
|
|
102
|
+
"video/webm": { extension: ".webm", preview: "video" },
|
|
103
|
+
"video/x-msvideo": { extension: ".avi" }
|
|
104
|
+
}, i = Object.entries(n).filter(([, e]) => e == null ? void 0 : e.raw).map(([e]) => e);
|
|
105
|
+
export {
|
|
106
|
+
n as mediaTypes,
|
|
107
|
+
i as textMediaTypes
|
|
108
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as d, openBlock as l, createBlock as s, withCtx as e, createVNode as r, unref as n, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
|
|
2
|
+
import b from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
|
+
import h from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
|
+
import k from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
5
5
|
import L from "../../components/SubpageHeader.vue.js";
|
|
6
6
|
import V from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import { useWorkspace as
|
|
9
|
-
import { createServer as
|
|
7
|
+
import w from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
8
|
+
import { useWorkspace as C } from "../../store/workspace.js";
|
|
9
|
+
import { createServer as $ } from "@scalar/oas-utils/entities/workspace/server";
|
|
10
10
|
import { useRouter as y } from "vue-router";
|
|
11
11
|
import B from "./ServerForm.vue.js";
|
|
12
12
|
import E from "../../components/Sidebar/Sidebar.vue.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
const N = { class: "flex-1" }, K = /* @__PURE__ */
|
|
14
|
+
const N = { class: "flex-1" }, K = /* @__PURE__ */ d({
|
|
15
15
|
__name: "Servers",
|
|
16
16
|
setup(g) {
|
|
17
|
-
const { activeCollection: t, servers: m, serverMutators: c } =
|
|
17
|
+
const { activeCollection: t, servers: m, serverMutators: c } = C(), { push: u } = y(), f = () => {
|
|
18
18
|
if (!t.value) return;
|
|
19
|
-
const o =
|
|
19
|
+
const o = $({ url: "http://localhost" });
|
|
20
20
|
c.add(o, t.value.uid), u(`/servers/${o.uid}`);
|
|
21
21
|
};
|
|
22
|
-
return (o,
|
|
22
|
+
return (o, H) => (l(), s(L, null, {
|
|
23
23
|
default: e(() => [
|
|
24
24
|
r(V, null, {
|
|
25
25
|
default: e(() => [
|
|
26
26
|
r(n(E), { title: "Servers" }, {
|
|
27
27
|
content: e(() => [
|
|
28
|
-
|
|
29
|
-
r(
|
|
28
|
+
p("div", N, [
|
|
29
|
+
r(h, null, {
|
|
30
30
|
default: e(() => {
|
|
31
31
|
var i;
|
|
32
32
|
return [
|
|
33
|
-
(l(!0),
|
|
33
|
+
(l(!0), _(v, null, S((i = n(t)) == null ? void 0 : i.spec.serverUids, (a) => (l(), s(k, {
|
|
34
34
|
key: a,
|
|
35
35
|
class: "text-xs",
|
|
36
36
|
variable: { name: n(m)[a].url, uid: a }
|
|
@@ -42,16 +42,16 @@ const N = { class: "flex-1" }, K = /* @__PURE__ */ _({
|
|
|
42
42
|
])
|
|
43
43
|
]),
|
|
44
44
|
button: e(() => [
|
|
45
|
-
r(
|
|
45
|
+
r(b, { click: f }, {
|
|
46
46
|
title: e(() => [
|
|
47
|
-
|
|
47
|
+
x("Add Server")
|
|
48
48
|
]),
|
|
49
49
|
_: 1
|
|
50
50
|
})
|
|
51
51
|
]),
|
|
52
52
|
_: 1
|
|
53
53
|
}),
|
|
54
|
-
r(
|
|
54
|
+
r(w, { class: "flex-1" }, {
|
|
55
55
|
default: e(() => [
|
|
56
56
|
r(B)
|
|
57
57
|
]),
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.40",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -125,19 +125,21 @@
|
|
|
125
125
|
"pretty-ms": "^8.0.0",
|
|
126
126
|
"vue": "^3.4.29",
|
|
127
127
|
"vue-router": "^4.3.0",
|
|
128
|
+
"whatwg-mimetype": "^4.0.0",
|
|
128
129
|
"zod": "^3.22.4",
|
|
129
|
-
"@scalar/components": "0.12.
|
|
130
|
-
"@scalar/
|
|
131
|
-
"@scalar/oas-utils": "0.2.20",
|
|
130
|
+
"@scalar/components": "0.12.26",
|
|
131
|
+
"@scalar/oas-utils": "0.2.22",
|
|
132
132
|
"@scalar/object-utils": "1.1.5",
|
|
133
|
-
"@scalar/themes": "0.9.
|
|
134
|
-
"@scalar/use-codemirror": "0.11.
|
|
133
|
+
"@scalar/themes": "0.9.19",
|
|
134
|
+
"@scalar/use-codemirror": "0.11.9",
|
|
135
|
+
"@scalar/draggable": "0.1.4",
|
|
135
136
|
"@scalar/use-toasts": "0.7.4",
|
|
136
137
|
"@scalar/use-tooltip": "1.0.2"
|
|
137
138
|
},
|
|
138
139
|
"devDependencies": {
|
|
139
140
|
"@types/content-type": "^1.1.8",
|
|
140
141
|
"@types/js-cookie": "^3.0.6",
|
|
142
|
+
"@types/whatwg-mimetype": "^3.0.2",
|
|
141
143
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
142
144
|
"autoprefixer": "^10.4.19",
|
|
143
145
|
"jsdom": "^22.1.0",
|