@scalar/api-client 2.1.35 → 2.1.37
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 +21 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +105 -119
- 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 +14 -14
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +15 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +39 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue2.js +4 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +39 -33
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -20
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +2 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +159 -100
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +5 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +2 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +35 -31
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +7 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +46 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue2.js +4 -0
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts +8 -0
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +7 -7
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +2 -2
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +29 -12
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +34 -42
- package/dist/components/OpenApiClientButton.vue.d.ts +13 -0
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -0
- package/dist/components/OpenApiClientButton.vue.js +7 -0
- package/dist/components/OpenApiClientButton.vue2.js +36 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/layouts/App/create-api-client-app.d.ts +58 -41
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +116 -82
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +42 -38
- package/dist/layouts/Web/create-api-client-web.d.ts +58 -41
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +58 -41
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/collections.d.ts +34 -24
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +6 -4
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/store.d.ts +116 -82
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +7 -7
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +29 -29
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +76 -76
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +47 -47
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +67 -42
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +24 -24
- package/dist/views/Request/types/sidebar-item.d.ts +1 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as L, ref as P, watch as K, onMounted as F, onBeforeUnmount as j, openBlock as u, createElementBlock as w, Fragment as y, createBlock as p, unref as n, withKeys as G, withCtx as r, createVNode as o, createElementVNode as k, createCommentVNode as M, createTextVNode as N, toDisplayString as H } from "vue";
|
|
2
2
|
import J from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
3
|
import O from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
|
|
4
4
|
import Q from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
5
5
|
import { PathId as b } from "../../router.js";
|
|
6
|
-
import { useModal as z, ScalarDropdown as X, ScalarDropdownItem as
|
|
6
|
+
import { useModal as z, ScalarDropdown as X, ScalarDropdownItem as g, ScalarIcon as v, ScalarModal as S } from "@scalar/components";
|
|
7
7
|
import { useRouter as Y } from "vue-router";
|
|
8
8
|
import { useWorkspace as Z } from "../../store/store.js";
|
|
9
|
-
const ae = /* @__PURE__ */
|
|
9
|
+
const ae = /* @__PURE__ */ L({
|
|
10
10
|
__name: "RequestSidebarItemMenu",
|
|
11
11
|
props: {
|
|
12
12
|
menuItem: {}
|
|
13
13
|
},
|
|
14
|
-
emits: ["closeMenu", "
|
|
15
|
-
setup(
|
|
16
|
-
const a =
|
|
14
|
+
emits: ["closeMenu", "toggleWatchMode"],
|
|
15
|
+
setup(q, { emit: x }) {
|
|
16
|
+
const a = q, $ = x, { replace: E } = Y(), { activeWorkspace: h, activeRouterParams: C, events: B } = Z(), d = z(), I = z(), T = () => {
|
|
17
17
|
var e;
|
|
18
|
-
return
|
|
18
|
+
return B.commandPalette.emit({
|
|
19
19
|
commandName: "Add Example",
|
|
20
20
|
metaData: {
|
|
21
21
|
itemUid: (e = a.menuItem.item) == null ? void 0 : e.entity.uid
|
|
@@ -24,55 +24,55 @@ const ae = /* @__PURE__ */ A({
|
|
|
24
24
|
}, R = (e, t) => {
|
|
25
25
|
var m;
|
|
26
26
|
(m = a.menuItem.item) == null || m.edit(e, t), d.hide();
|
|
27
|
-
},
|
|
27
|
+
}, U = () => {
|
|
28
28
|
var e, t, m;
|
|
29
|
-
(e = a.menuItem.item) == null || e.delete(),
|
|
30
|
-
}, f =
|
|
31
|
-
|
|
29
|
+
(e = a.menuItem.item) == null || e.delete(), C.value[b.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && E(`/workspace/${h.value.uid}/request/default`), C.value[b.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && E(`/workspace/${h.value}/request/default`), I.hide();
|
|
30
|
+
}, f = P(null);
|
|
31
|
+
K([() => a.menuItem.open, f], async ([e]) => {
|
|
32
32
|
var t, m;
|
|
33
33
|
e && ((m = (t = f.value) == null ? void 0 : t.$parent) != null && m.$el) && f.value.$parent.$el.focus();
|
|
34
34
|
});
|
|
35
|
-
const D = () => a.menuItem.open &&
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
35
|
+
const D = () => a.menuItem.open && $("closeMenu");
|
|
36
|
+
F(() => window.addEventListener("click", D)), j(() => window.removeEventListener("click", D));
|
|
37
|
+
const V = () => {
|
|
38
|
+
$("toggleWatchMode", a.menuItem.item);
|
|
39
39
|
};
|
|
40
40
|
return (e, t) => {
|
|
41
41
|
var m, W;
|
|
42
|
-
return
|
|
43
|
-
e.menuItem.targetRef && e.menuItem.open ? (
|
|
42
|
+
return u(), w(y, null, [
|
|
43
|
+
e.menuItem.targetRef && e.menuItem.open ? (u(), p(n(X), {
|
|
44
44
|
key: 0,
|
|
45
45
|
static: "",
|
|
46
46
|
targetRef: e.menuItem.targetRef,
|
|
47
47
|
teleport: "",
|
|
48
48
|
onKeydown: t[2] || (t[2] = G((l) => e.$emit("closeMenu"), ["escape"]))
|
|
49
49
|
}, {
|
|
50
|
-
items:
|
|
50
|
+
items: r(() => {
|
|
51
51
|
var l, s;
|
|
52
52
|
return [
|
|
53
|
-
((l = e.menuItem.item) == null ? void 0 : l.entity.type) === "request" ? (
|
|
53
|
+
((l = e.menuItem.item) == null ? void 0 : l.entity.type) === "request" ? (u(), p(n(g), {
|
|
54
54
|
key: 0,
|
|
55
55
|
class: "flex gap-2",
|
|
56
|
-
onClick:
|
|
56
|
+
onClick: T
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
58
|
+
default: r(() => [
|
|
59
59
|
o(n(v), {
|
|
60
60
|
class: "inline-flex",
|
|
61
61
|
icon: "Example",
|
|
62
62
|
size: "md",
|
|
63
63
|
thickness: "1.5"
|
|
64
64
|
}),
|
|
65
|
-
t[6] || (t[6] =
|
|
65
|
+
t[6] || (t[6] = k("span", null, "Add Example", -1))
|
|
66
66
|
]),
|
|
67
67
|
_: 1
|
|
68
|
-
})) :
|
|
69
|
-
o(n(
|
|
68
|
+
})) : M("", !0),
|
|
69
|
+
o(n(g), {
|
|
70
70
|
ref_key: "menuRef",
|
|
71
71
|
ref: f,
|
|
72
72
|
class: "flex gap-2",
|
|
73
73
|
onClick: t[0] || (t[0] = (i) => n(d).show())
|
|
74
74
|
}, {
|
|
75
|
-
default:
|
|
75
|
+
default: r(() => {
|
|
76
76
|
var i;
|
|
77
77
|
return [
|
|
78
78
|
o(n(v), {
|
|
@@ -81,10 +81,10 @@ const ae = /* @__PURE__ */ A({
|
|
|
81
81
|
size: "md",
|
|
82
82
|
thickness: "1.5"
|
|
83
83
|
}),
|
|
84
|
-
|
|
85
|
-
((i = e.menuItem.item) == null ? void 0 : i.entity.type) === "collection" ? (
|
|
84
|
+
k("span", null, [
|
|
85
|
+
((i = e.menuItem.item) == null ? void 0 : i.entity.type) === "collection" ? (u(), w(y, { key: 0 }, [
|
|
86
86
|
N(" Edit ")
|
|
87
|
-
], 64)) : (
|
|
87
|
+
], 64)) : (u(), w(y, { key: 1 }, [
|
|
88
88
|
N(" Rename ")
|
|
89
89
|
], 64))
|
|
90
90
|
])
|
|
@@ -92,82 +92,82 @@ const ae = /* @__PURE__ */ A({
|
|
|
92
92
|
}),
|
|
93
93
|
_: 1
|
|
94
94
|
}, 512),
|
|
95
|
-
(s = e.menuItem.item) != null && s.documentUrl ? (
|
|
95
|
+
(s = e.menuItem.item) != null && s.documentUrl ? (u(), p(n(g), {
|
|
96
96
|
key: 1,
|
|
97
97
|
ref_key: "menuRef",
|
|
98
98
|
ref: f,
|
|
99
99
|
class: "flex gap-2",
|
|
100
|
-
onClick:
|
|
100
|
+
onClick: V
|
|
101
101
|
}, {
|
|
102
|
-
default:
|
|
102
|
+
default: r(() => {
|
|
103
103
|
var i, c;
|
|
104
104
|
return [
|
|
105
105
|
o(n(v), {
|
|
106
106
|
class: "inline-flex",
|
|
107
|
-
icon: (i = e.menuItem.item) != null && i.
|
|
107
|
+
icon: (i = e.menuItem.item) != null && i.watchMode ? "Unwatch" : "Watch",
|
|
108
108
|
size: "md",
|
|
109
109
|
thickness: "1.5"
|
|
110
110
|
}, null, 8, ["icon"]),
|
|
111
|
-
|
|
111
|
+
k("span", null, H((c = e.menuItem.item) != null && c.watchMode ? "Disable Watch Mode" : "Enable Watch Mode"), 1)
|
|
112
112
|
];
|
|
113
113
|
}),
|
|
114
114
|
_: 1
|
|
115
|
-
}, 512)) :
|
|
116
|
-
o(n(
|
|
115
|
+
}, 512)) : M("", !0),
|
|
116
|
+
o(n(g), {
|
|
117
117
|
class: "flex gap-2",
|
|
118
118
|
onClick: t[1] || (t[1] = (i) => n(I).show())
|
|
119
119
|
}, {
|
|
120
|
-
default:
|
|
120
|
+
default: r(() => [
|
|
121
121
|
o(n(v), {
|
|
122
122
|
class: "inline-flex",
|
|
123
123
|
icon: "Delete",
|
|
124
124
|
size: "md",
|
|
125
125
|
thickness: "1.5"
|
|
126
126
|
}),
|
|
127
|
-
t[7] || (t[7] =
|
|
127
|
+
t[7] || (t[7] = k("span", null, "Delete", -1))
|
|
128
128
|
]),
|
|
129
129
|
_: 1
|
|
130
130
|
})
|
|
131
131
|
];
|
|
132
132
|
}),
|
|
133
133
|
_: 1
|
|
134
|
-
}, 8, ["targetRef"])) :
|
|
135
|
-
o(n(
|
|
134
|
+
}, 8, ["targetRef"])) : M("", !0),
|
|
135
|
+
o(n(S), {
|
|
136
136
|
size: "xxs",
|
|
137
137
|
state: n(I),
|
|
138
138
|
title: `Delete ${(m = e.menuItem.item) == null ? void 0 : m.resourceTitle}`
|
|
139
139
|
}, {
|
|
140
|
-
default:
|
|
140
|
+
default: r(() => {
|
|
141
141
|
var l, s;
|
|
142
142
|
return [
|
|
143
143
|
o(J, {
|
|
144
144
|
variableName: ((l = e.menuItem.item) == null ? void 0 : l.title) ?? "",
|
|
145
145
|
warningMessage: (s = e.menuItem.item) == null ? void 0 : s.warning,
|
|
146
146
|
onClose: t[3] || (t[3] = (i) => n(I).hide()),
|
|
147
|
-
onDelete:
|
|
147
|
+
onDelete: U
|
|
148
148
|
}, null, 8, ["variableName", "warningMessage"])
|
|
149
149
|
];
|
|
150
150
|
}),
|
|
151
151
|
_: 1
|
|
152
152
|
}, 8, ["state", "title"]),
|
|
153
|
-
o(n(
|
|
153
|
+
o(n(S), {
|
|
154
154
|
size: "xxs",
|
|
155
155
|
state: n(d),
|
|
156
156
|
title: `Edit ${(W = e.menuItem.item) == null ? void 0 : W.resourceTitle}`
|
|
157
157
|
}, {
|
|
158
|
-
default:
|
|
158
|
+
default: r(() => {
|
|
159
159
|
var l, s, i, c;
|
|
160
160
|
return [
|
|
161
|
-
((l = e.menuItem.item) == null ? void 0 : l.resourceTitle) === "Collection" ? (
|
|
161
|
+
((l = e.menuItem.item) == null ? void 0 : l.resourceTitle) === "Collection" ? (u(), p(O, {
|
|
162
162
|
key: 0,
|
|
163
163
|
icon: ((s = e.menuItem.item) == null ? void 0 : s.icon) || "interface-content-folder",
|
|
164
164
|
name: (i = e.menuItem.item) == null ? void 0 : i.title,
|
|
165
|
-
onClose: t[4] || (t[4] = (
|
|
165
|
+
onClose: t[4] || (t[4] = (A) => n(d).hide()),
|
|
166
166
|
onEdit: R
|
|
167
|
-
}, null, 8, ["icon", "name"])) : (
|
|
167
|
+
}, null, 8, ["icon", "name"])) : (u(), p(Q, {
|
|
168
168
|
key: 1,
|
|
169
169
|
name: ((c = e.menuItem.item) == null ? void 0 : c.title) ?? "",
|
|
170
|
-
onClose: t[5] || (t[5] = (
|
|
170
|
+
onClose: t[5] || (t[5] = (A) => n(d).hide()),
|
|
171
171
|
onEdit: R
|
|
172
172
|
}, null, 8, ["name"]))
|
|
173
173
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAsGc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;AAwQrB,wBAWG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-98729408"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,52 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { ScalarIcon as
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as b, openBlock as l, createElementBlock as s, createElementVNode as d, createVNode as i, createBlock as a, unref as t, createCommentVNode as n } from "vue";
|
|
2
|
+
import c from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
|
+
import k from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
4
|
+
import y from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
5
|
+
import { ScalarIcon as g } from "@scalar/components";
|
|
6
|
+
import h from "./components/WorkspaceDropdown.vue.js";
|
|
7
|
+
import C from "../../components/OpenApiClientButton.vue.js";
|
|
8
|
+
import { useWorkspace as v } from "../../store/store.js";
|
|
9
|
+
const w = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, V = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, x = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, z = /* @__PURE__ */ b({
|
|
8
10
|
__name: "RequestSubpageHeader",
|
|
9
11
|
props: {
|
|
10
12
|
modelValue: { type: Boolean },
|
|
11
13
|
isReadonly: { type: Boolean }
|
|
12
14
|
},
|
|
13
15
|
emits: ["update:modelValue", "hideModal", "importCurl"],
|
|
14
|
-
setup(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
16
|
+
setup($) {
|
|
17
|
+
const { activeCollection: m } = v();
|
|
18
|
+
return (e, o) => {
|
|
19
|
+
var p, u, f;
|
|
20
|
+
return l(), s("div", w, [
|
|
21
|
+
d("div", V, [
|
|
22
|
+
i(y, {
|
|
23
|
+
class: "gitbook-hidden",
|
|
24
|
+
modelValue: e.modelValue,
|
|
25
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => e.$emit("update:modelValue", r))
|
|
26
|
+
}, null, 8, ["modelValue"]),
|
|
27
|
+
e.isReadonly ? n("", !0) : (l(), a(t(h), { key: 0 })),
|
|
28
|
+
o[4] || (o[4] = d("a", {
|
|
29
|
+
class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
|
|
30
|
+
href: "https://scalar.com/",
|
|
31
|
+
target: "_blank"
|
|
32
|
+
}, " Powered by Scalar.com ", -1))
|
|
33
|
+
]),
|
|
34
|
+
i(c, {
|
|
35
|
+
onImportCurl: o[1] || (o[1] = (r) => e.$emit("importCurl", r))
|
|
36
|
+
}),
|
|
37
|
+
d("div", x, [
|
|
38
|
+
e.isReadonly ? n("", !0) : (l(), a(k, { key: 0 })),
|
|
39
|
+
e.isReadonly && ((p = t(m)) != null && p.documentUrl) ? (l(), a(t(C), {
|
|
40
|
+
key: 1,
|
|
41
|
+
buttonSource: "modal",
|
|
42
|
+
class: "gitbook-hidden !w-fit lg:-mr-1",
|
|
43
|
+
integration: (u = t(m)) == null ? void 0 : u.integration,
|
|
44
|
+
url: (f = t(m)) == null ? void 0 : f.documentUrl
|
|
45
|
+
}, null, 8, ["integration", "url"])) : n("", !0),
|
|
46
|
+
e.isReadonly ? (l(), s("button", {
|
|
47
|
+
key: 2,
|
|
48
|
+
class: "app-exit-button p-2 rounded-full fixed right-2 top-2 gitbook-hidden",
|
|
49
|
+
type: "button",
|
|
50
|
+
onClick: o[2] || (o[2] = (r) => e.$emit("hideModal"))
|
|
51
|
+
}, [
|
|
52
|
+
i(t(g), {
|
|
53
|
+
icon: "Close",
|
|
54
|
+
size: "lg",
|
|
55
|
+
thickness: "2"
|
|
56
|
+
})
|
|
57
|
+
])) : n("", !0),
|
|
58
|
+
e.isReadonly ? (l(), s("button", {
|
|
59
|
+
key: 3,
|
|
60
|
+
class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5 gitbook-show",
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: o[3] || (o[3] = (r) => e.$emit("hideModal"))
|
|
63
|
+
}, [
|
|
64
|
+
i(t(g), {
|
|
65
|
+
icon: "Close",
|
|
66
|
+
size: "md",
|
|
67
|
+
thickness: "1.75"
|
|
68
|
+
})
|
|
69
|
+
])) : n("", !0)
|
|
70
|
+
])
|
|
71
|
+
]);
|
|
72
|
+
};
|
|
48
73
|
}
|
|
49
74
|
});
|
|
50
75
|
export {
|
|
51
|
-
|
|
76
|
+
z as default
|
|
52
77
|
};
|
|
@@ -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.37";
|
|
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, [
|
|
@@ -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":"AA4JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAmPxC,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f15e1ace"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -50,7 +50,7 @@ const N = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-
|
|
|
50
50
|
return (e, o) => (n(), r(g, null, {
|
|
51
51
|
title: d(() => [
|
|
52
52
|
p("div", {
|
|
53
|
-
class: B(["flex items-center flex-1", {
|
|
53
|
+
class: B(["flex items-center flex-1 h-8", {
|
|
54
54
|
"animate-response-heading": e.response
|
|
55
55
|
}])
|
|
56
56
|
}, [
|
|
@@ -159,7 +159,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
159
159
|
]),
|
|
160
160
|
default: n(() => [
|
|
161
161
|
s(e(S), {
|
|
162
|
-
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-
|
|
162
|
+
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
163
163
|
fullWidth: "",
|
|
164
164
|
variant: "ghost"
|
|
165
165
|
}, {
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { specDictionary as u } from "../../../store/import-spec.js";
|
|
2
|
-
import { combineRenameDiffs as
|
|
3
|
-
import { fetchSpecFromUrl as
|
|
2
|
+
import { combineRenameDiffs as A, mutateCollectionDiff as R, mutateSecuritySchemeDiff as S, mutateServerDiff as d, mutateTagDiff as g, mutateRequestDiff as D } from "../libs/live-sync.js";
|
|
3
|
+
import { fetchSpecFromUrl as E, createHash as T } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import { parseSchema as l } from "@scalar/oas-utils/transforms";
|
|
5
|
-
import { useToasts as
|
|
6
|
-
import { useTimeoutPoll as
|
|
7
|
-
import
|
|
8
|
-
import { watch as
|
|
5
|
+
import { useToasts as M } from "@scalar/use-toasts";
|
|
6
|
+
import { useTimeoutPoll as I } from "@vueuse/core";
|
|
7
|
+
import U from "microdiff";
|
|
8
|
+
import { watch as C } from "vue";
|
|
9
9
|
import { useWorkspace as L } from "../../../store/store.js";
|
|
10
10
|
const N = 5 * 1e3, b = 60 * 1e3, V = () => {
|
|
11
|
-
const { toast:
|
|
11
|
+
const { toast: f } = M(), c = L(), { activeCollection: t, activeWorkspace: v, collectionMutators: i } = c, o = (e) => f(
|
|
12
12
|
`[useOpenApiWatcher] Changes to the ${e} were not applied`,
|
|
13
13
|
"error"
|
|
14
|
-
),
|
|
15
|
-
e.path[0] === "info" || e.path[0] === "security" ?
|
|
16
|
-
}, { pause:
|
|
14
|
+
), O = (e) => {
|
|
15
|
+
e.path[0] === "info" || e.path[0] === "security" ? R(e, c) || o("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? S(e, c) || o("securitySchemes") : e.path[0] === "servers" ? d(e, c) || o("servers") : e.path[0] === "tags" ? g(e, c) || o("tags") : e.path[0] === "paths" && (D(e, c) || o("requests"));
|
|
16
|
+
}, { pause: h, resume: p } = I(async () => {
|
|
17
17
|
var m;
|
|
18
18
|
const e = (m = t.value) == null ? void 0 : m.documentUrl;
|
|
19
19
|
if (!e) return;
|
|
20
20
|
const s = u[e];
|
|
21
21
|
try {
|
|
22
|
-
const r = await
|
|
22
|
+
const r = await E(
|
|
23
23
|
e,
|
|
24
|
-
|
|
24
|
+
v.value.proxyUrl,
|
|
25
25
|
!1
|
|
26
26
|
), n = T(r);
|
|
27
27
|
if (i.edit(
|
|
28
28
|
t.value.uid,
|
|
29
|
-
"
|
|
29
|
+
"watchModeStatus",
|
|
30
30
|
"WATCHING"
|
|
31
31
|
), s != null && s.hash)
|
|
32
32
|
if (s.hash && s.hash !== n) {
|
|
33
|
-
const { schema: a } = await l(r),
|
|
33
|
+
const { schema: a } = await l(r), W = U(s.schema, a), w = A(W);
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
w.forEach(O), u[e] = {
|
|
36
36
|
hash: n,
|
|
37
37
|
schema: a
|
|
38
38
|
};
|
|
39
|
-
} catch (
|
|
40
|
-
console.error("[useOpenApiWatcher] Error:",
|
|
39
|
+
} catch (y) {
|
|
40
|
+
console.error("[useOpenApiWatcher] Error:", y);
|
|
41
41
|
}
|
|
42
42
|
} else console.log("[useOpenApiWatcher] No changes detected yet…");
|
|
43
43
|
else {
|
|
@@ -48,11 +48,11 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
} catch (r) {
|
|
51
|
-
console.error("[useOpenApiWatcher] Error:", r), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"),
|
|
51
|
+
console.error("[useOpenApiWatcher] Error:", r), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"), h(), i.edit(
|
|
52
52
|
t.value.uid,
|
|
53
|
-
"
|
|
53
|
+
"watchModeStatus",
|
|
54
54
|
"ERROR"
|
|
55
|
-
),
|
|
55
|
+
), f(
|
|
56
56
|
"[useOpenApiWatcher] Unable to fetch the spec file, paused the watcher for 60 seconds",
|
|
57
57
|
"error"
|
|
58
58
|
), setTimeout(() => {
|
|
@@ -60,7 +60,7 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
|
|
|
60
60
|
}, b);
|
|
61
61
|
}
|
|
62
62
|
}, N);
|
|
63
|
-
|
|
63
|
+
C(
|
|
64
64
|
[
|
|
65
65
|
() => {
|
|
66
66
|
var e;
|
|
@@ -68,13 +68,13 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
|
|
|
68
68
|
},
|
|
69
69
|
() => {
|
|
70
70
|
var e;
|
|
71
|
-
return (e = t.value) == null ? void 0 : e.
|
|
71
|
+
return (e = t.value) == null ? void 0 : e.watchMode;
|
|
72
72
|
}
|
|
73
73
|
],
|
|
74
74
|
([e, s]) => {
|
|
75
|
-
e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), p()) : t.value && (
|
|
75
|
+
e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), p()) : t.value && (h(), i.edit(
|
|
76
76
|
t.value.uid,
|
|
77
|
-
"
|
|
77
|
+
"watchModeStatus",
|
|
78
78
|
"IDLE"
|
|
79
79
|
));
|
|
80
80
|
},
|
|
@@ -11,7 +11,7 @@ export type SidebarItem = {
|
|
|
11
11
|
edit: (name: string, icon?: string) => void;
|
|
12
12
|
delete: () => void;
|
|
13
13
|
documentUrl?: string;
|
|
14
|
-
|
|
14
|
+
watchMode?: boolean;
|
|
15
15
|
};
|
|
16
16
|
export type SidebarMenuItem = {
|
|
17
17
|
/** The resource which we are opening the menu for */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,
|
|
1
|
+
{"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.37",
|
|
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.62",
|
|
157
157
|
"@scalar/draggable": "0.1.6",
|
|
158
158
|
"@scalar/icons": "0.1.1",
|
|
159
|
-
"@scalar/oas-utils": "0.2.
|
|
159
|
+
"@scalar/oas-utils": "0.2.64",
|
|
160
160
|
"@scalar/object-utils": "1.1.10",
|
|
161
|
-
"@scalar/openapi-types": "0.1.4",
|
|
162
161
|
"@scalar/openapi-parser": "0.8.8",
|
|
163
|
-
"@scalar/
|
|
164
|
-
"@scalar/
|
|
165
|
-
"@scalar/use-codemirror": "0.11.
|
|
162
|
+
"@scalar/openapi-types": "0.1.4",
|
|
163
|
+
"@scalar/themes": "0.9.44",
|
|
164
|
+
"@scalar/use-codemirror": "0.11.29",
|
|
166
165
|
"@scalar/use-toasts": "0.7.7",
|
|
166
|
+
"@scalar/types": "0.0.17",
|
|
167
167
|
"@scalar/use-tooltip": "1.0.3"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|