@scalar/api-client 2.3.33 → 2.4.1
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 +77 -0
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +74 -89
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +19 -18
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +3 -3
- package/dist/components/TopNav/TopNavItem.vue2.js +46 -54
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/hooks/useClientConfig.d.ts +72 -6
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +45 -40
- package/dist/layouts/App/create-api-client-app.d.ts +72 -52
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +144 -104
- 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 +49 -44
- package/dist/layouts/Web/create-api-client-web.d.ts +72 -52
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +72 -52
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +53 -49
- package/dist/libs/electron.d.ts +5 -0
- package/dist/libs/electron.d.ts.map +1 -0
- package/dist/libs/electron.js +4 -0
- package/dist/libs/find-request.d.ts +2 -0
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/index.js +17 -15
- package/dist/libs/send-request/create-fetch-query-params.d.ts +10 -3
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.js +28 -6
- package/dist/libs/send-request/create-request-operation.d.ts +3 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +91 -87
- package/dist/libs/send-request/create-request-operation.test.d.ts +2 -0
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/index.d.ts +1 -0
- package/dist/libs/send-request/index.d.ts.map +1 -1
- package/dist/libs/send-request/index.js +6 -4
- package/dist/plugins/hooks/usePluginManager.d.ts +8 -0
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -0
- package/dist/plugins/hooks/usePluginManager.js +10 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +7 -0
- package/dist/plugins/plugin-manager.d.ts +28 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +24 -0
- package/dist/store/active-entities.d.ts +2 -0
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +26 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +24 -24
- package/dist/store/store.d.ts +72 -52
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +47 -45
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +61 -70
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +92 -77
- 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 +71 -75
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +34 -35
- package/dist/views/Request/RequestSection/types/post-response.d.ts +7 -0
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +1 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItem.vue2.js +132 -134
- 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 +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +82 -70
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -114
- package/package.json +25 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [4440949]
|
|
8
|
+
- @scalar/components@0.14.1
|
|
9
|
+
- @scalar/oas-utils@0.3.1
|
|
10
|
+
- @scalar/object-utils@1.2.1
|
|
11
|
+
- @scalar/openapi-types@0.3.1
|
|
12
|
+
- @scalar/types@0.2.1
|
|
13
|
+
- @scalar/use-codemirror@0.12.1
|
|
14
|
+
- @scalar/import@0.4.1
|
|
15
|
+
- @scalar/postman-to-openapi@0.3.1
|
|
16
|
+
- @scalar/openapi-parser@0.11.0
|
|
17
|
+
- @scalar/snippetz@0.3.0
|
|
18
|
+
- @scalar/themes@0.12.1
|
|
19
|
+
- @scalar/use-hooks@0.2.1
|
|
20
|
+
- @scalar/icons@0.4.1
|
|
21
|
+
|
|
22
|
+
## 2.4.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- 483ca93: chore: require Node 20 (or above)
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 26476ed: feat: send cross-origin cookies in scalar app
|
|
31
|
+
- 30bab1d: support unexploded serialization of array query params
|
|
32
|
+
- 5613e40: feat(components): scalar tooltip overhaul
|
|
33
|
+
- fe696ab: fix: adds server variable form border for api reference
|
|
34
|
+
- 20cf550: fix: array query params showing on code snippet
|
|
35
|
+
- Updated dependencies [bd602d3]
|
|
36
|
+
- Updated dependencies [b77f67a]
|
|
37
|
+
- Updated dependencies [30bab1d]
|
|
38
|
+
- Updated dependencies [5613e40]
|
|
39
|
+
- Updated dependencies [483ca93]
|
|
40
|
+
- Updated dependencies [1d1470c]
|
|
41
|
+
- Updated dependencies [0efcab4]
|
|
42
|
+
- Updated dependencies [20cf550]
|
|
43
|
+
- @scalar/openapi-parser@0.11.0
|
|
44
|
+
- @scalar/snippetz@0.3.0
|
|
45
|
+
- @scalar/oas-utils@0.3.0
|
|
46
|
+
- @scalar/components@0.14.0
|
|
47
|
+
- @scalar/themes@0.12.0
|
|
48
|
+
- @scalar/postman-to-openapi@0.3.0
|
|
49
|
+
- @scalar/use-codemirror@0.12.0
|
|
50
|
+
- @scalar/openapi-types@0.3.0
|
|
51
|
+
- @scalar/object-utils@1.2.0
|
|
52
|
+
- @scalar/use-tooltip@1.1.0
|
|
53
|
+
- @scalar/use-toasts@0.8.0
|
|
54
|
+
- @scalar/draggable@0.2.0
|
|
55
|
+
- @scalar/use-hooks@0.2.0
|
|
56
|
+
- @scalar/import@0.4.0
|
|
57
|
+
- @scalar/icons@0.4.0
|
|
58
|
+
- @scalar/types@0.2.0
|
|
59
|
+
|
|
60
|
+
## 2.3.34
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 6b4a3c3: chore: export decodeBuffer
|
|
65
|
+
- cd0722d: fix(api-client): add aria label to request table code inputs
|
|
66
|
+
- Updated dependencies [be8a6ec]
|
|
67
|
+
- Updated dependencies [1843cfe]
|
|
68
|
+
- @scalar/types@0.1.16
|
|
69
|
+
- @scalar/components@0.13.59
|
|
70
|
+
- @scalar/oas-utils@0.2.144
|
|
71
|
+
- @scalar/openapi-parser@0.10.17
|
|
72
|
+
- @scalar/snippetz@0.2.20
|
|
73
|
+
- @scalar/themes@0.11.3
|
|
74
|
+
- @scalar/use-codemirror@0.11.104
|
|
75
|
+
- @scalar/import@0.3.27
|
|
76
|
+
- @scalar/postman-to-openapi@0.2.17
|
|
77
|
+
- @scalar/use-hooks@0.1.50
|
|
78
|
+
- @scalar/icons@0.3.7
|
|
79
|
+
|
|
3
80
|
## 2.3.33
|
|
4
81
|
|
|
5
82
|
### Patch Changes
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.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 e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-60ccbed0"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -20,7 +20,7 @@ const me = { class: "whitespace-nowrap" }, ce = ["id"], be = {
|
|
|
20
20
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
21
21
|
}, ve = {
|
|
22
22
|
key: 6,
|
|
23
|
-
class: "centered-y group-has-[.cm-focused]:z-1
|
|
23
|
+
class: "centered-y group-has-[.cm-focused]:z-1 absolute right-0 flex h-full items-center p-1.5"
|
|
24
24
|
}, he = {
|
|
25
25
|
key: 7,
|
|
26
26
|
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pr-2 pt-px opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.error]:bg-transparent group-[.alert]:shadow-none group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AAwuBA,wBAOG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as G, ref as
|
|
2
|
-
import { useLoadingState as K, ScalarButton as
|
|
1
|
+
import { defineComponent as G, ref as O, computed as I, watch as V, createBlock as P, openBlock as i, unref as s, withCtx as v, createElementBlock as f, Fragment as g, createElementVNode as S, createCommentVNode as H, createVNode as C, createTextVNode as p, toDisplayString as T } from "vue";
|
|
2
|
+
import { useLoadingState as K, ScalarButton as _, ScalarCodeBlock as Q, ScalarIcon as X, ScalarTooltip as Z } from "@scalar/components";
|
|
3
3
|
import { useToasts as ee } from "@scalar/use-toasts";
|
|
4
4
|
import { useRouter as te } from "vue-router";
|
|
5
5
|
import { importCurlCommand as oe } from "../../libs/importers/curl.js";
|
|
@@ -7,119 +7,113 @@ import { useActiveEntities as ae } from "../../store/active-entities.js";
|
|
|
7
7
|
import le from "./CommandActionForm.vue.js";
|
|
8
8
|
import ne from "./CommandActionInput.vue.js";
|
|
9
9
|
import re from "./WatchModeToggle.vue.js";
|
|
10
|
-
import { isPostmanCollection as
|
|
10
|
+
import { isPostmanCollection as L, getPostmanDocumentDetails as ie, convertPostmanToOpenApi as F } from "../../libs/postman.js";
|
|
11
11
|
import { getOpenApiDocumentDetails as se } from "../../libs/getOpenApiDocumentDetails.js";
|
|
12
12
|
import { isUrl as U } from "../../libs/isUrl.js";
|
|
13
13
|
import { useFileDialog as ue } from "../../hooks/useFileDialog.js";
|
|
14
|
-
import { PathId as
|
|
14
|
+
import { PathId as W } from "../../routes.js";
|
|
15
15
|
import { useWorkspace as ce } from "../../store/store.js";
|
|
16
|
-
const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-row items-center justify-between gap-3" },
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "text-pretty"
|
|
19
|
-
}, ge = {
|
|
20
|
-
key: 1,
|
|
21
|
-
class: "text-pretty"
|
|
22
|
-
}, De = /* @__PURE__ */ G({
|
|
16
|
+
const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-row items-center justify-between gap-3" }, Ae = /* @__PURE__ */ G({
|
|
23
17
|
__name: "CommandPaletteImport",
|
|
24
18
|
emits: ["close", "back"],
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
() =>
|
|
19
|
+
setup(pe, { emit: N }) {
|
|
20
|
+
const k = N, $ = te(), { activeWorkspace: c, activeCollection: B } = ae(), { importSpecFile: w, importSpecFromUrl: M, events: j } = ce(), { toast: m } = ee(), d = K(), a = O(""), y = O(!0), r = I(() => L(a.value) ? ie(a.value) : se(a.value)), A = I(
|
|
21
|
+
() => r.value ? r.value.type : "json"
|
|
28
22
|
);
|
|
29
23
|
function x(t) {
|
|
30
24
|
var e;
|
|
31
25
|
t && $.push({
|
|
32
26
|
name: "collection",
|
|
33
27
|
params: {
|
|
34
|
-
[
|
|
35
|
-
[
|
|
28
|
+
[W.Workspace]: (e = c.value) == null ? void 0 : e.uid,
|
|
29
|
+
[W.Collection]: t.uid
|
|
36
30
|
}
|
|
37
31
|
});
|
|
38
32
|
}
|
|
39
|
-
const h =
|
|
33
|
+
const h = I(() => U(a.value)), E = I(() => !!r.value), { open: z } = ue({
|
|
40
34
|
onChange: async (t) => {
|
|
41
35
|
const e = t == null ? void 0 : t[0];
|
|
42
36
|
if (e) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
var u,
|
|
46
|
-
const o = (u =
|
|
37
|
+
const n = new FileReader();
|
|
38
|
+
n.onload = async (b) => {
|
|
39
|
+
var u, R, D;
|
|
40
|
+
const o = (u = b.target) == null ? void 0 : u.result;
|
|
47
41
|
try {
|
|
48
|
-
if (
|
|
49
|
-
const l = await
|
|
42
|
+
if (L(o)) {
|
|
43
|
+
const l = await w(
|
|
50
44
|
await F(o),
|
|
51
|
-
((
|
|
45
|
+
((R = c.value) == null ? void 0 : R.uid) ?? ""
|
|
52
46
|
);
|
|
53
47
|
x(l == null ? void 0 : l.collection);
|
|
54
48
|
} else {
|
|
55
|
-
const l = await
|
|
49
|
+
const l = await w(
|
|
56
50
|
o,
|
|
57
|
-
((
|
|
51
|
+
((D = c.value) == null ? void 0 : D.uid) ?? ""
|
|
58
52
|
);
|
|
59
53
|
x(l == null ? void 0 : l.collection);
|
|
60
54
|
}
|
|
61
|
-
|
|
55
|
+
m("Import successful", "info"), k("close");
|
|
62
56
|
} catch (l) {
|
|
63
57
|
console.error(l);
|
|
64
58
|
const q = (l == null ? void 0 : l.message) || "Unknown error";
|
|
65
|
-
|
|
59
|
+
m(`Import failed: ${q}`, "error");
|
|
66
60
|
}
|
|
67
|
-
},
|
|
61
|
+
}, n.readAsText(e);
|
|
68
62
|
}
|
|
69
63
|
},
|
|
70
64
|
multiple: !1,
|
|
71
65
|
accept: ".json,.yaml,.yml"
|
|
72
66
|
});
|
|
73
|
-
|
|
67
|
+
V(h, (t) => {
|
|
74
68
|
t || (y.value = !1);
|
|
75
|
-
}),
|
|
69
|
+
}), V(a, (t) => {
|
|
76
70
|
U(t) || (y.value = !1);
|
|
77
71
|
});
|
|
78
72
|
async function J() {
|
|
79
|
-
var t, e,
|
|
80
|
-
if (!(!a.value ||
|
|
81
|
-
|
|
73
|
+
var t, e, n, b;
|
|
74
|
+
if (!(!a.value || d.isLoading)) {
|
|
75
|
+
d.startLoading();
|
|
82
76
|
try {
|
|
83
77
|
if (h.value) {
|
|
84
|
-
const [o, u] = await
|
|
78
|
+
const [o, u] = await M(
|
|
85
79
|
a.value,
|
|
86
|
-
((t =
|
|
80
|
+
((t = c.value) == null ? void 0 : t.uid) ?? "",
|
|
87
81
|
{
|
|
88
|
-
proxyUrl: (e =
|
|
82
|
+
proxyUrl: (e = c.value) == null ? void 0 : e.proxyUrl,
|
|
89
83
|
watchMode: y.value
|
|
90
84
|
}
|
|
91
85
|
);
|
|
92
86
|
if (x(u == null ? void 0 : u.collection), o) {
|
|
93
|
-
|
|
87
|
+
m(
|
|
94
88
|
"There was a possible CORS error while importing your spec, please make sure this server is allowed in the CORS policy of your OpenAPI document.",
|
|
95
89
|
"error",
|
|
96
90
|
{ timeout: 5e3 }
|
|
97
|
-
),
|
|
91
|
+
), d.invalidate(2e3, !0);
|
|
98
92
|
return;
|
|
99
93
|
}
|
|
100
|
-
} else if (
|
|
101
|
-
if (
|
|
102
|
-
const o = await
|
|
94
|
+
} else if (E.value)
|
|
95
|
+
if (L(a.value)) {
|
|
96
|
+
const o = await w(
|
|
103
97
|
await F(a.value),
|
|
104
|
-
((
|
|
98
|
+
((n = c.value) == null ? void 0 : n.uid) ?? ""
|
|
105
99
|
);
|
|
106
|
-
x(o == null ? void 0 : o.collection),
|
|
100
|
+
x(o == null ? void 0 : o.collection), m("Successfully converted Postman collection", "info");
|
|
107
101
|
} else {
|
|
108
|
-
const o = await
|
|
102
|
+
const o = await w(
|
|
109
103
|
a.value,
|
|
110
|
-
((
|
|
104
|
+
((b = c.value) == null ? void 0 : b.uid) ?? ""
|
|
111
105
|
);
|
|
112
106
|
x(o == null ? void 0 : o.collection);
|
|
113
107
|
}
|
|
114
108
|
else {
|
|
115
|
-
|
|
109
|
+
m("Import failed: Invalid URL or OpenAPI document", "error"), d.invalidate(2e3, !0);
|
|
116
110
|
return;
|
|
117
111
|
}
|
|
118
|
-
|
|
112
|
+
d.clear(), k("close"), m("Import successful", "info");
|
|
119
113
|
} catch (o) {
|
|
120
114
|
console.error("[importCollection]", o);
|
|
121
115
|
const u = (o == null ? void 0 : o.message) || "Unknown error";
|
|
122
|
-
|
|
116
|
+
d.invalidate(2e3, !0), m(`Import failed: ${u}`, "error");
|
|
123
117
|
}
|
|
124
118
|
}
|
|
125
119
|
}
|
|
@@ -137,20 +131,20 @@ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-ro
|
|
|
137
131
|
}
|
|
138
132
|
a.value = t;
|
|
139
133
|
};
|
|
140
|
-
return (t, e) => (
|
|
134
|
+
return (t, e) => (i(), P(le, {
|
|
141
135
|
disabled: !a.value.trim(),
|
|
142
|
-
loading: s(
|
|
136
|
+
loading: s(d),
|
|
143
137
|
onSubmit: J
|
|
144
138
|
}, {
|
|
145
139
|
options: v(() => [
|
|
146
|
-
|
|
147
|
-
C(s(
|
|
140
|
+
S("div", de, [
|
|
141
|
+
C(s(_), {
|
|
148
142
|
class: "hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs",
|
|
149
143
|
variant: "outlined",
|
|
150
|
-
onClick: s(
|
|
144
|
+
onClick: s(z)
|
|
151
145
|
}, {
|
|
152
146
|
default: v(() => [
|
|
153
|
-
e[5] || (e[5] =
|
|
147
|
+
e[5] || (e[5] = p(" JSON, or YAML File ")),
|
|
154
148
|
C(s(X), {
|
|
155
149
|
class: "text-c-3",
|
|
156
150
|
icon: "Upload",
|
|
@@ -160,65 +154,56 @@ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-ro
|
|
|
160
154
|
_: 1
|
|
161
155
|
}, 8, ["onClick"]),
|
|
162
156
|
C(s(Z), {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
side: "bottom",
|
|
166
|
-
sideOffset: 5
|
|
157
|
+
content: h.value ? "Watch mode automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date." : "Watch mode is only available for URL imports. When enabled it automatically updates the API client when the OpenAPI URL content changes.",
|
|
158
|
+
placement: "bottom"
|
|
167
159
|
}, {
|
|
168
|
-
|
|
160
|
+
default: v(() => [
|
|
169
161
|
C(re, {
|
|
170
162
|
modelValue: y.value,
|
|
171
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
163
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => y.value = n),
|
|
172
164
|
disabled: !h.value
|
|
173
165
|
}, null, 8, ["modelValue", "disabled"])
|
|
174
166
|
]),
|
|
175
|
-
content: v(() => [
|
|
176
|
-
w("div", pe, [
|
|
177
|
-
w("div", ve, [
|
|
178
|
-
h.value ? (n(), c("span", fe, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (n(), c("span", ge, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
|
|
179
|
-
])
|
|
180
|
-
])
|
|
181
|
-
]),
|
|
182
167
|
_: 1
|
|
183
|
-
})
|
|
168
|
+
}, 8, ["content"])
|
|
184
169
|
])
|
|
185
170
|
]),
|
|
186
171
|
submit: v(() => [
|
|
187
|
-
e[6] || (e[6] =
|
|
188
|
-
h.value ? (
|
|
189
|
-
|
|
190
|
-
], 64)) :
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
], 64)) : (
|
|
194
|
-
|
|
172
|
+
e[6] || (e[6] = p(" Import ")),
|
|
173
|
+
h.value ? (i(), f(g, { key: 0 }, [
|
|
174
|
+
p(" from URL ")
|
|
175
|
+
], 64)) : r.value && A.value ? (i(), f(g, { key: 1 }, [
|
|
176
|
+
r.value.title ? (i(), f(g, { key: 0 }, [
|
|
177
|
+
p(' "' + T(r.value.title) + '" ', 1)
|
|
178
|
+
], 64)) : (i(), f(g, { key: 1 }, [
|
|
179
|
+
p(T(r.value.version), 1)
|
|
195
180
|
], 64))
|
|
196
|
-
], 64)) : (
|
|
197
|
-
|
|
181
|
+
], 64)) : (i(), f(g, { key: 2 }, [
|
|
182
|
+
p(" Collection ")
|
|
198
183
|
], 64))
|
|
199
184
|
]),
|
|
200
185
|
default: v(() => [
|
|
201
|
-
!
|
|
186
|
+
!r.value || s(U)(a.value) ? (i(), P(ne, {
|
|
202
187
|
key: 0,
|
|
203
188
|
modelValue: a.value,
|
|
204
189
|
placeholder: "OpenAPI/Swagger/Postman URL or cURL",
|
|
205
|
-
onOnDelete: e[0] || (e[0] = (
|
|
190
|
+
onOnDelete: e[0] || (e[0] = (n) => k("back", n)),
|
|
206
191
|
"onUpdate:modelValue": Y
|
|
207
|
-
}, null, 8, ["modelValue"])) : (
|
|
208
|
-
|
|
209
|
-
e[4] || (e[4] =
|
|
210
|
-
C(s(
|
|
192
|
+
}, null, 8, ["modelValue"])) : (i(), f(g, { key: 1 }, [
|
|
193
|
+
S("div", me, [
|
|
194
|
+
e[4] || (e[4] = S("div", { class: "text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs" }, " Preview ", -1)),
|
|
195
|
+
C(s(_), {
|
|
211
196
|
class: "hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs",
|
|
212
197
|
variant: "ghost",
|
|
213
|
-
onClick: e[1] || (e[1] = (
|
|
198
|
+
onClick: e[1] || (e[1] = (n) => a.value = "")
|
|
214
199
|
}, {
|
|
215
200
|
default: v(() => e[3] || (e[3] = [
|
|
216
|
-
|
|
201
|
+
p(" Clear ")
|
|
217
202
|
])),
|
|
218
203
|
_: 1
|
|
219
204
|
})
|
|
220
205
|
]),
|
|
221
|
-
|
|
206
|
+
r.value && !s(U)(a.value) ? (i(), P(s(Q), {
|
|
222
207
|
key: 0,
|
|
223
208
|
class: "bg-b-2 mt-1 max-h-[40dvh] rounded border px-2 py-1 text-sm",
|
|
224
209
|
content: a.value,
|
|
@@ -232,5 +217,5 @@ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-ro
|
|
|
232
217
|
}
|
|
233
218
|
});
|
|
234
219
|
export {
|
|
235
|
-
|
|
220
|
+
Ae as default
|
|
236
221
|
};
|
|
@@ -104,11 +104,13 @@ export declare const PaletteComponents: {
|
|
|
104
104
|
schema?: unknown;
|
|
105
105
|
content?: unknown;
|
|
106
106
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
107
|
+
explode?: boolean | undefined;
|
|
107
108
|
}[] | undefined;
|
|
108
109
|
requestBody?: any;
|
|
109
110
|
responses?: Record<string, any> | undefined;
|
|
110
111
|
'x-scalar-stability'?: unknown;
|
|
111
112
|
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
113
|
+
'x-post-response'?: string | undefined;
|
|
112
114
|
'x-codeSamples'?: unknown;
|
|
113
115
|
'x-code-samples'?: unknown;
|
|
114
116
|
'x-custom-examples'?: unknown;
|
|
@@ -157,11 +159,13 @@ export declare const PaletteComponents: {
|
|
|
157
159
|
schema?: unknown;
|
|
158
160
|
content?: unknown;
|
|
159
161
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
162
|
+
explode?: boolean | undefined;
|
|
160
163
|
}[] | undefined;
|
|
161
164
|
requestBody?: any;
|
|
162
165
|
responses?: Record<string, any> | undefined;
|
|
163
166
|
'x-scalar-stability'?: unknown;
|
|
164
167
|
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
168
|
+
'x-post-response'?: string | undefined;
|
|
165
169
|
'x-codeSamples'?: unknown;
|
|
166
170
|
'x-code-samples'?: unknown;
|
|
167
171
|
'x-custom-examples'?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA0eA;;;;GAIG;;AACH,wBAmjBI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;mBAnlB9B,CAvTqC;qBAuTrC,CAtTY;;;;;;;mBAsTZ,CAvTqC;qBAuTrC,CAtTY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA0eA;;;;GAIG;;AACH,wBAmjBI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;mBAnlB9B,CAvTqC;qBAuTrC,CAtTY;;;;;;;mBAsTZ,CAvTqC;qBAuTrC,CAtTY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAytBoF,CAAC;;;;;;;;;;;;;;;+BAUzE,CAAC;4BAClB,CAAC;2BACwB,CAAC;8BAA6B,CAAC;4BAAuC,CAAC;6BACnF,CAAC;+BAA8B,CAAC;qCAA+C,CAAC;;0BAC5E,CAAC;2BAA0B,CAAC;yBACnD,CAAC;2BAC2G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAhBd,CAAC;;;;;;;;;;;;;;;+BAUzE,CAAC;4BAClB,CAAC;2BACwB,CAAC;8BAA6B,CAAC;4BAAuC,CAAC;6BACnF,CAAC;+BAA8B,CAAC;qCAA+C,CAAC;;0BAC5E,CAAC;2BAA0B,CAAC;yBACnD,CAAC;2BAC2G,CAAC;;;;;;;;;;;;;;;;;;;CAyKpG,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
|
|
@@ -4,6 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
values?: ServerVariableValues;
|
|
5
5
|
/** The ID of the input controlled by the variables form */
|
|
6
6
|
controls?: string;
|
|
7
|
+
/** The layout of the server variables form */
|
|
8
|
+
layout?: 'client' | 'reference';
|
|
7
9
|
};
|
|
8
10
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
11
|
"update:variable": (name: string, value: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerVariablesForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesForm.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAIlC,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACvC,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;;;;;AA2IF,wBAOG"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as g, createElementBlock as p, createCommentVNode as y, openBlock as o, Fragment as h, renderList as k, normalizeClass as C, createElementVNode as V, createBlock as f, toDisplayString as B } from "vue";
|
|
2
|
+
import S from "./ServerVariablesSelect.vue.js";
|
|
3
|
+
import $ from "./ServerVariablesTextbox.vue.js";
|
|
4
|
+
const j = { class: "mr-1.5 flex items-center py-1.5 pl-3 after:content-[':'] group-has-[input]/label:mr-0" }, O = /* @__PURE__ */ g({
|
|
5
5
|
__name: "ServerVariablesForm",
|
|
6
6
|
props: {
|
|
7
7
|
variables: {},
|
|
8
8
|
values: {},
|
|
9
|
-
controls: {}
|
|
9
|
+
controls: {},
|
|
10
|
+
layout: { default: "client" }
|
|
10
11
|
},
|
|
11
12
|
emits: ["update:variable"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
13
|
+
setup(n, { emit: v }) {
|
|
14
|
+
const d = v;
|
|
14
15
|
function s(e, r) {
|
|
15
16
|
d("update:variable", e, r);
|
|
16
17
|
}
|
|
@@ -18,30 +19,30 @@ const $ = { class: "mr-1.5 flex items-center py-1.5 pl-3 after:content-[':'] gro
|
|
|
18
19
|
var r, l, a;
|
|
19
20
|
return (((r = n.values) == null ? void 0 : r[e]) ?? ((a = (l = n.variables) == null ? void 0 : l[e]) == null ? void 0 : a.default) ?? "").toString();
|
|
20
21
|
};
|
|
21
|
-
return (e, r) => e.variables && Object.keys(e.variables ?? {}).length ? (o(!0),
|
|
22
|
-
var a, u, c,
|
|
23
|
-
return o(),
|
|
22
|
+
return (e, r) => e.variables && Object.keys(e.variables ?? {}).length ? (o(!0), p(h, { key: 0 }, k(Object.keys(e.variables), (l) => {
|
|
23
|
+
var a, u, c, b, m;
|
|
24
|
+
return o(), p("label", {
|
|
24
25
|
key: l,
|
|
25
|
-
class: "group/label flex w-full"
|
|
26
|
+
class: C(["group/label flex w-full", e.layout === "reference" && "border-x border-b"])
|
|
26
27
|
}, [
|
|
27
|
-
V("span",
|
|
28
|
-
(c = (u = (a = e.variables) == null ? void 0 : a[l]) == null ? void 0 : u.enum) != null && c.length ? (o(),
|
|
28
|
+
V("span", j, B(l), 1),
|
|
29
|
+
(c = (u = (a = e.variables) == null ? void 0 : a[l]) == null ? void 0 : u.enum) != null && c.length ? (o(), f(S, {
|
|
29
30
|
key: 0,
|
|
30
31
|
controls: e.controls,
|
|
31
|
-
enum: ((
|
|
32
|
+
enum: ((m = (b = e.variables[l]) == null ? void 0 : b.enum) == null ? void 0 : m.map((t) => `${t}`)) ?? [],
|
|
32
33
|
label: l,
|
|
33
34
|
value: i(l),
|
|
34
35
|
onChange: (t) => s(l, t)
|
|
35
|
-
}, null, 8, ["controls", "enum", "label", "value", "onChange"])) : (o(),
|
|
36
|
+
}, null, 8, ["controls", "enum", "label", "value", "onChange"])) : (o(), f($, {
|
|
36
37
|
key: 1,
|
|
37
38
|
controls: e.controls,
|
|
38
39
|
value: i(l),
|
|
39
40
|
onChange: (t) => s(l, t)
|
|
40
41
|
}, null, 8, ["controls", "value", "onChange"]))
|
|
41
|
-
]);
|
|
42
|
-
}), 128)) :
|
|
42
|
+
], 2);
|
|
43
|
+
}), 128)) : y("", !0);
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
O as default
|
|
47
48
|
};
|
|
@@ -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":"AAoMA,OAAO,EAQL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAQ3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;;;;;;;;;;AAyUF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNavItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8dbdfe92"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|