@scalar/api-reference 1.25.122 → 1.25.124
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 +72 -0
- package/dist/blocks/constants.d.ts.map +1 -1
- package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
- package/dist/browser/standalone.js +21533 -21032
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts +0 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +2 -2
- package/dist/components/Anchor/Anchor.vue2.js +27 -23
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +135 -128
- package/dist/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/components/Card/Card.vue.js +7 -7
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +1 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +33 -33
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +2 -2
- package/dist/components/Content/Introduction/Description.vue2.js +7 -7
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +44 -39
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +65 -59
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +66 -52
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +37 -31
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.d.ts +1 -0
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +79 -52
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +2 -2
- package/dist/components/Content/Tag/Tag.vue2.js +29 -26
- package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
- package/dist/components/Content/Tag/TagAccordion.vue2.js +22 -19
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +2 -2
- package/dist/components/GettingStarted.vue2.js +25 -25
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +6 -6
- package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainer.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts +1 -6
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue2.js +12 -16
- package/dist/components/Section/SectionHeaderTag.vue.d.ts +21 -0
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -0
- package/dist/components/Section/SectionHeaderTag.vue.js +7 -0
- package/dist/components/Section/SectionHeaderTag.vue2.js +18 -0
- package/dist/components/Section/index.d.ts +1 -0
- package/dist/components/Section/index.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +14 -14
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/esm.d.ts.map +1 -1
- package/dist/esm.js +1 -3
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +414 -510
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +20 -21
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +47 -47
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +5 -5
- package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
- package/dist/features/Operation/Webhooks.vue.js +3 -3
- package/dist/features/Operation/Webhooks.vue2.js +74 -60
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +2 -2
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +8 -8
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +16 -16
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +26 -47
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +11 -11
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +80 -69
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +1 -1
- package/dist/features/Search/SearchButton.vue2.js +30 -18
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +1 -1
- package/dist/features/Search/SearchModal.vue2.js +104 -95
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +11 -17
- package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
- package/dist/features/TestRequestButton/TestRequestButton.vue2.js +6 -6
- package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/getModels.d.ts.map +1 -1
- package/dist/helpers/isMacOs.d.ts.map +1 -1
- package/dist/helpers/operation.d.ts.map +1 -1
- package/dist/helpers/parse.js +62 -62
- package/dist/helpers/specDownloads.d.ts.map +1 -1
- package/dist/helpers/specHelpers.d.ts.map +1 -1
- package/dist/helpers/waitFor.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useDeprecationWarnings.d.ts.map +1 -1
- package/dist/hooks/useDeprecationWarnings.js +1 -5
- package/dist/hooks/useNavState.d.ts +1 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +3 -10
- package/dist/hooks/useReactiveSpec.d.ts +8 -8
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +12 -13
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +38 -48
- package/dist/index.js +1 -1
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -1
- package/dist/legacy/helpers/normalizeRequestMethod.js +2 -6
- package/dist/legacy/types.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.d.ts +11 -0
- package/dist/standalone/lib/html-api.d.ts.map +1 -0
- package/dist/standalone/lib/html-rendering.d.ts +51 -0
- package/dist/standalone/lib/html-rendering.d.ts.map +1 -0
- package/dist/standalone/lib/html-rendering.js +54 -0
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +0 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -15
|
@@ -20,11 +20,9 @@ function te({
|
|
|
20
20
|
function F() {
|
|
21
21
|
s.value = "", d.value = 0, r.value = [];
|
|
22
22
|
}
|
|
23
|
-
const H = V(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})) : r.value.slice(0, 25)
|
|
27
|
-
);
|
|
23
|
+
const H = V(() => s.value.length === 0 ? o.value.slice(0, 25).map((u) => ({
|
|
24
|
+
item: u
|
|
25
|
+
})) : r.value.slice(0, 25));
|
|
28
26
|
return R(
|
|
29
27
|
a.value,
|
|
30
28
|
async () => {
|
|
@@ -33,9 +31,7 @@ function te({
|
|
|
33
31
|
i.setCollection([]);
|
|
34
32
|
return;
|
|
35
33
|
}
|
|
36
|
-
const l = [], u = G(
|
|
37
|
-
((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? ""
|
|
38
|
-
);
|
|
34
|
+
const l = [], u = G(((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? "");
|
|
39
35
|
u.length && (u.forEach((e) => {
|
|
40
36
|
l.push({
|
|
41
37
|
type: "heading",
|
|
@@ -55,7 +51,7 @@ function te({
|
|
|
55
51
|
body: ""
|
|
56
52
|
};
|
|
57
53
|
o.value.push(S), e.operations && e.operations.forEach((t) => {
|
|
58
|
-
const { parameterMap:
|
|
54
|
+
const { parameterMap: c } = B(t), x = A(t) || c.value;
|
|
59
55
|
let f = null;
|
|
60
56
|
typeof x != "boolean" && (f = x);
|
|
61
57
|
const O = {
|
|
@@ -72,17 +68,15 @@ function te({
|
|
|
72
68
|
f && (O.body = f), o.value.push(O);
|
|
73
69
|
});
|
|
74
70
|
});
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
Object.keys(
|
|
78
|
-
c
|
|
79
|
-
).forEach((t) => {
|
|
80
|
-
var n;
|
|
71
|
+
const n = (E = a.value) == null ? void 0 : E.webhooks, m = [];
|
|
72
|
+
n && Object.keys(n).forEach((e) => {
|
|
73
|
+
Object.keys(n[e]).forEach((t) => {
|
|
74
|
+
var c;
|
|
81
75
|
m.push({
|
|
82
76
|
type: "webhook",
|
|
83
|
-
title:
|
|
77
|
+
title: "Webhook",
|
|
84
78
|
href: `#${j({ name: e, method: t })}`,
|
|
85
|
-
description: e
|
|
79
|
+
description: `${(c = n[e][t]) == null ? void 0 : c.name}`,
|
|
86
80
|
httpVerb: t,
|
|
87
81
|
tag: e,
|
|
88
82
|
body: ""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAS/E,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,CAAA;CAC3D,CAAC;;AAsGF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e1499c8d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, computed as c, openBlock as i, createElementBlock as s, withModifiers as f, createVNode as a, unref as h, createElementVNode as k, withCtx as C, createTextVNode as u, toDisplayString as p, Fragment as y } from "vue";
|
|
2
|
-
import B from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import { ScalarIcon as B } from "@scalar/components";
|
|
3
|
+
import b from "../../components/ScreenReader.vue.js";
|
|
4
|
+
import { useConfig as q } from "../../hooks/useConfig.js";
|
|
5
5
|
import { useApiClient as R } from "../ApiClientModal/useApiClient.js";
|
|
6
6
|
const T = ["method"], g = /* @__PURE__ */ d({
|
|
7
7
|
__name: "TestRequestButton",
|
|
@@ -9,7 +9,7 @@ const T = ["method"], g = /* @__PURE__ */ d({
|
|
|
9
9
|
operation: {}
|
|
10
10
|
},
|
|
11
11
|
setup(n) {
|
|
12
|
-
const { client: t } = R(), o =
|
|
12
|
+
const { client: t } = R(), o = q(), l = c(() => (o == null ? void 0 : o.hideTestRequestButton) !== !0), m = () => {
|
|
13
13
|
var e;
|
|
14
14
|
n.operation && ((e = t == null ? void 0 : t.value) != null && e.open) && t.value.open({
|
|
15
15
|
requestUid: n.operation.uid
|
|
@@ -22,12 +22,12 @@ const T = ["method"], g = /* @__PURE__ */ d({
|
|
|
22
22
|
type: "button",
|
|
23
23
|
onClick: f(m, ["stop"])
|
|
24
24
|
}, [
|
|
25
|
-
a(h(
|
|
25
|
+
a(h(B), {
|
|
26
26
|
icon: "Play",
|
|
27
27
|
size: "sm"
|
|
28
28
|
}),
|
|
29
29
|
r[0] || (r[0] = k("span", null, "Test Request", -1)),
|
|
30
|
-
a(
|
|
30
|
+
a(b, null, {
|
|
31
31
|
default: C(() => [
|
|
32
32
|
u("(" + p(e.operation.method) + " " + p(e.operation.path) + ")", 1)
|
|
33
33
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEmptySpecification.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmptySpecification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD;;;GAGG;AACH,wBAAgB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"createEmptySpecification.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmptySpecification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAqBjF,IAAI,CACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;;;yBAEw/T,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAwC,CAAC;mBAAkC,CAAC;;;;;aAD96W,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getModels.d.ts","sourceRoot":"","sources":["../../src/helpers/getModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"getModels.d.ts","sourceRoot":"","sources":["../../src/helpers/getModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,mHAyBpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMacOs.d.ts","sourceRoot":"","sources":["../../src/helpers/isMacOs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"isMacOs.d.ts","sourceRoot":"","sources":["../../src/helpers/isMacOs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,eAAoF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/helpers/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/helpers/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAQnE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAGxF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAMvE"}
|
package/dist/helpers/parse.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
import { redirectToProxy as R, shouldIgnoreEntity as u } from "@scalar/oas-utils/helpers";
|
|
2
2
|
import { load as M, dereference as q } from "@scalar/openapi-parser";
|
|
3
|
-
import { fetchUrls as
|
|
3
|
+
import { fetchUrls as D } from "@scalar/openapi-parser/plugins/fetch-urls";
|
|
4
4
|
import { createEmptySpecification as O } from "./createEmptySpecification.js";
|
|
5
|
-
import { normalizeRequestMethod as
|
|
6
|
-
import { validRequestMethods as
|
|
7
|
-
const
|
|
8
|
-
proxyUrl:
|
|
9
|
-
} = {}) => new Promise(async (
|
|
5
|
+
import { normalizeRequestMethod as j } from "../legacy/helpers/normalizeRequestMethod.js";
|
|
6
|
+
import { validRequestMethods as C } from "../legacy/fixtures/httpRequestMethods.js";
|
|
7
|
+
const G = (m, {
|
|
8
|
+
proxyUrl: e
|
|
9
|
+
} = {}) => new Promise(async (n, b) => {
|
|
10
10
|
var h;
|
|
11
11
|
try {
|
|
12
12
|
if (!m)
|
|
13
|
-
return
|
|
13
|
+
return n(I(O()));
|
|
14
14
|
const f = performance.now(), { filesystem: s } = await M(m, {
|
|
15
15
|
plugins: [
|
|
16
|
-
|
|
17
|
-
fetch: (
|
|
16
|
+
D({
|
|
17
|
+
fetch: (o) => fetch(e ? R(e, o) : o)
|
|
18
18
|
})
|
|
19
19
|
]
|
|
20
|
-
}), { schema: a, errors: r } = await q(s),
|
|
21
|
-
return console.log(`dereference: ${Math.round(
|
|
20
|
+
}), { schema: a, errors: r } = await q(s), t = performance.now();
|
|
21
|
+
return console.log(`dereference: ${Math.round(t - f)} ms`), r != null && r.length && console.warn(
|
|
22
22
|
`Please open an issue on https://github.com/scalar/scalar
|
|
23
23
|
`,
|
|
24
24
|
`Scalar OpenAPI Parser Warning:
|
|
25
25
|
`,
|
|
26
26
|
r
|
|
27
|
-
), a === void 0 ? (
|
|
27
|
+
), a === void 0 ? (b(((h = r == null ? void 0 : r[0]) == null ? void 0 : h.message) ?? "Failed to parse the OpenAPI file."), n(I(O()))) : n(I(a));
|
|
28
28
|
} catch (f) {
|
|
29
|
-
console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(f),
|
|
29
|
+
console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(f), b(f);
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return n(I(O()));
|
|
32
32
|
}), I = (m) => {
|
|
33
33
|
var h, f;
|
|
34
|
-
let
|
|
35
|
-
m && typeof m == "object" ?
|
|
36
|
-
const
|
|
37
|
-
return Object.keys(
|
|
34
|
+
let e = {};
|
|
35
|
+
m && typeof m == "object" ? e = structuredClone(m) : e = O(), e.tags || (e.tags = []), e.paths || (e.paths = {}), e.components || (e.components = {}), e.webhooks || (e.webhooks = {}), e.servers || (e.servers = []), e.security || (e.security = []), e.externalDocs || (e.externalDocs = {});
|
|
36
|
+
const n = {};
|
|
37
|
+
return Object.keys(e.webhooks ?? {}).forEach((s) => {
|
|
38
38
|
var a;
|
|
39
|
-
Object.keys(((a =
|
|
40
|
-
var
|
|
41
|
-
const
|
|
42
|
-
if (!(!
|
|
43
|
-
if (Array.isArray(
|
|
44
|
-
const i = (l =
|
|
39
|
+
Object.keys(((a = e.webhooks) == null ? void 0 : a[s]) ?? {}).forEach((r) => {
|
|
40
|
+
var o, l, g, y;
|
|
41
|
+
const t = (o = e.webhooks) == null ? void 0 : o[s][r];
|
|
42
|
+
if (!(!t || u(t))) {
|
|
43
|
+
if (Array.isArray(t.tags)) {
|
|
44
|
+
const i = (l = t.tags) == null ? void 0 : l.map(
|
|
45
45
|
(c) => {
|
|
46
46
|
var w;
|
|
47
|
-
return (w =
|
|
47
|
+
return (w = e.tags) == null ? void 0 : w.find((p) => p.name === c);
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
if (
|
|
50
|
+
if (t.tags = i == null ? void 0 : i.filter((c) => !u(c)), i != null && i.some((c) => u(c)))
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
n[s] === void 0 && (n[s] = {}), n[s][r] = {
|
|
54
54
|
// Transformed data
|
|
55
|
-
httpVerb:
|
|
55
|
+
httpVerb: j(r),
|
|
56
56
|
path: s,
|
|
57
|
-
operationId: (
|
|
58
|
-
name: (
|
|
59
|
-
description: (
|
|
60
|
-
pathParameters: (y = (g =
|
|
57
|
+
operationId: (t == null ? void 0 : t.operationId) || s,
|
|
58
|
+
name: (t == null ? void 0 : t.summary) || s || "",
|
|
59
|
+
description: (t == null ? void 0 : t.description) || "",
|
|
60
|
+
pathParameters: (y = (g = e.paths) == null ? void 0 : g[s]) == null ? void 0 : y.parameters,
|
|
61
61
|
// Original webhook
|
|
62
62
|
information: {
|
|
63
|
-
...
|
|
63
|
+
...t
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
}), Object.keys(((h =
|
|
69
|
-
var a, r,
|
|
70
|
-
u((r = (a =
|
|
71
|
-
}), Object.keys(
|
|
72
|
-
Object.keys(
|
|
73
|
-
(r) =>
|
|
68
|
+
}), Object.keys(((h = e.components) == null ? void 0 : h.schemas) ?? {}).forEach((s) => {
|
|
69
|
+
var a, r, t, o;
|
|
70
|
+
u((r = (a = e.components) == null ? void 0 : a.schemas) == null ? void 0 : r[s]) && ((o = (t = e.components) == null ? void 0 : t.schemas) == null || delete o[s]);
|
|
71
|
+
}), Object.keys(e.paths).forEach((s) => {
|
|
72
|
+
Object.keys(e.paths[s]).filter(
|
|
73
|
+
(r) => C.includes(r.toUpperCase())
|
|
74
74
|
).forEach((r) => {
|
|
75
75
|
var l, g, y, i, c, w;
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
76
|
+
const t = e.paths[s][r];
|
|
77
|
+
if (t === void 0 || u(t))
|
|
78
78
|
return;
|
|
79
|
-
const
|
|
80
|
-
httpVerb:
|
|
79
|
+
const o = {
|
|
80
|
+
httpVerb: j(r),
|
|
81
81
|
path: s,
|
|
82
|
-
operationId:
|
|
83
|
-
name:
|
|
84
|
-
description:
|
|
82
|
+
operationId: t.operationId || s,
|
|
83
|
+
name: t.summary || s || "",
|
|
84
|
+
description: t.description || "",
|
|
85
85
|
information: {
|
|
86
|
-
...
|
|
86
|
+
...t
|
|
87
87
|
},
|
|
88
|
-
pathParameters: (g = (l =
|
|
88
|
+
pathParameters: (g = (l = e.paths) == null ? void 0 : l[s]) == null ? void 0 : g.parameters
|
|
89
89
|
};
|
|
90
|
-
if (!
|
|
91
|
-
(y =
|
|
90
|
+
if (!t.tags || t.tags.length === 0) {
|
|
91
|
+
(y = e.tags) != null && y.find((d) => d.name === "default") || (i = e.tags) == null || i.push({
|
|
92
92
|
name: "default",
|
|
93
93
|
description: "",
|
|
94
94
|
operations: []
|
|
95
95
|
});
|
|
96
|
-
const p = (c =
|
|
96
|
+
const p = (c = e.tags) == null ? void 0 : c.findIndex(
|
|
97
97
|
(d) => d.name === "default"
|
|
98
98
|
);
|
|
99
|
-
p >= 0 && ((w =
|
|
99
|
+
p >= 0 && ((w = e.tags[p]) == null || w.operations.push(o));
|
|
100
100
|
} else
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
const d = (
|
|
104
|
-
d === -1 && ((
|
|
101
|
+
t.tags.forEach((p) => {
|
|
102
|
+
var E, P, k;
|
|
103
|
+
const d = (E = e.tags) == null ? void 0 : E.findIndex((A) => A.name === p);
|
|
104
|
+
d === -1 && ((P = e.tags) == null || P.push({
|
|
105
105
|
name: p,
|
|
106
106
|
description: ""
|
|
107
107
|
}));
|
|
108
|
-
const
|
|
109
|
-
typeof ((
|
|
108
|
+
const x = d !== -1 ? d : e.tags.length - 1;
|
|
109
|
+
typeof ((k = e.tags[x]) == null ? void 0 : k.operations) > "u" && (e.tags[x].operations = []), e.tags[x].operations.push(o);
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
-
}),
|
|
113
|
-
...
|
|
114
|
-
webhooks:
|
|
112
|
+
}), e.tags = (f = e.tags) == null ? void 0 : f.filter((s) => !u(s)), {
|
|
113
|
+
...e,
|
|
114
|
+
webhooks: n
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
export {
|
|
118
|
-
|
|
118
|
+
G as parse
|
|
119
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specDownloads.d.ts","sourceRoot":"","sources":["../../src/helpers/specDownloads.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"specDownloads.d.ts","sourceRoot":"","sources":["../../src/helpers/specDownloads.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;QADqB,MAAM;gBAAc,MAAM;OACR,CAAA;AAEnE,mCAAmC;AACnC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,QAiChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/specHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAchE;AAED,iBAAS,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CAuBrD;AAED,iBAAS,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,EAAE,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"specHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/specHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAchE;AAED,iBAAS,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CAuBrD;AAED,iBAAS,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,EAAE,GAAG,OAAO,CAYpE;AAED,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitFor.d.ts","sourceRoot":"","sources":["../../src/helpers/waitFor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"waitFor.d.ts","sourceRoot":"","sources":["../../src/helpers/waitFor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,YAAmB,MAAM,OAAO,0CAAkC,OAAO,CAAC,IAAI,CAgBjG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,EAAe,YAAY,CAAC,sBAAsB,CAAC,CAAA;AAEpF,0DAA0D;AAC1D,eAAO,MAAM,SAAS,8BAGrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,QA4B3E"}
|
|
@@ -6,11 +6,7 @@ function p(e) {
|
|
|
6
6
|
() => {
|
|
7
7
|
e.proxy && console.warn(
|
|
8
8
|
"[DEPRECATED] You’re using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package."
|
|
9
|
-
), (e.proxyUrl || e.proxy) === o && (console.warn(
|
|
10
|
-
`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${o}).`
|
|
11
|
-
), console.warn(
|
|
12
|
-
`[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`
|
|
13
|
-
), delete e.proxy, e.proxyUrl = r, console.warn(
|
|
9
|
+
), (e.proxyUrl || e.proxy) === o && (console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${o}).`), console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`), delete e.proxy, e.proxyUrl = r, console.warn(
|
|
14
10
|
`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${r}). Read more: https://github.com/scalar/scalar`
|
|
15
11
|
));
|
|
16
12
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Heading, Tag, TransformedOperation } from '@scalar/types/legacy';
|
|
2
|
-
import type { PathRouting } from '../types';
|
|
1
|
+
import type { Heading, PathRouting, Tag, TransformedOperation } from '@scalar/types/legacy';
|
|
3
2
|
/**
|
|
4
3
|
* Hook which provides reactive hash state from the URL
|
|
5
4
|
* Also hash is only readable by the client so keep that in mind for SSR
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AA2E3F;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAsDpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BAhF0B,MAAM;IAkFnC;;;;;OAKG;oCA9FgC,MAAM;IAgGzC;;;OAGG;uCArHmC,MAAM;IAuH5C,0DAA0D;;6BAjC5B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;yBA5BrC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;4BATb,OAAO;gCAyBH,oBAAoB,aAAa,GAAG;iCAlGrC,MAAM;;oBA2FjB,GAAG;;;;CAiE3B,CAAA"}
|
|
@@ -14,22 +14,15 @@ const s = l(""), u = l(m.hash ?? ""), o = l(), w = l(!1), h = (e) => {
|
|
|
14
14
|
}, v = () => {
|
|
15
15
|
u.value = o.value ? h(window.location.pathname) : (
|
|
16
16
|
// Must remove the prefix from the hash as the internal hash value should be pure
|
|
17
|
-
decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(
|
|
18
|
-
s.value.length
|
|
19
|
-
)
|
|
17
|
+
decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(s.value.length)
|
|
20
18
|
);
|
|
21
19
|
}, $ = (e, r = window.location.href) => {
|
|
22
20
|
const n = new URL(r);
|
|
23
|
-
o.value ? n.pathname = f(
|
|
24
|
-
o.value.basePath,
|
|
25
|
-
e
|
|
26
|
-
) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
|
|
21
|
+
o.value ? n.pathname = f(o.value.basePath, e) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
|
|
27
22
|
}, S = (e, r = window.location.href, n = window.location.search) => {
|
|
28
23
|
const a = new URL(r);
|
|
29
24
|
return a.hash = s.value + e, a.search = n, a.toString();
|
|
30
|
-
}, U = (e = u.value) => `${s.value}${e}`, b = () => decodeURIComponent(
|
|
31
|
-
window.location.hash.replace(/^#/, "").slice(s.value.length)
|
|
32
|
-
), x = () => {
|
|
25
|
+
}, U = (e = u.value) => `${s.value}${e}`, b = () => decodeURIComponent(window.location.hash.replace(/^#/, "").slice(s.value.length)), x = () => {
|
|
33
26
|
const e = p(), r = (t) => typeof (e == null ? void 0 : e.generateHeadingSlug) == "function" ? `${e.generateHeadingSlug(t)}` : t.slug ? `description/${t.slug}` : "", n = (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateModelSlug) == "function" ? `model/${e.generateModelSlug(t)}` : `model/${c(t.name)}` : "models", a = (t) => typeof (e == null ? void 0 : e.generateTagSlug) == "function" ? `tag/${e.generateTagSlug(t)}` : `tag/${c(t.name)}`;
|
|
34
27
|
return {
|
|
35
28
|
hash: u,
|
|
@@ -38,11 +38,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
38
38
|
default?: any;
|
|
39
39
|
format?: string | undefined;
|
|
40
40
|
description?: string | undefined;
|
|
41
|
-
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
41
|
+
properties?: Record<string, import("@scalar/types/legacy").Schema> | undefined;
|
|
42
42
|
} | undefined;
|
|
43
43
|
example?: any;
|
|
44
44
|
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
45
|
-
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
45
|
+
content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
|
|
46
46
|
headers?: {
|
|
47
47
|
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
48
48
|
} | undefined;
|
|
@@ -52,7 +52,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
52
52
|
requestBody?: {
|
|
53
53
|
description?: string | undefined;
|
|
54
54
|
required?: boolean | undefined;
|
|
55
|
-
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
55
|
+
content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
|
|
56
56
|
} | undefined;
|
|
57
57
|
summary?: string | undefined;
|
|
58
58
|
tags?: string[] | undefined;
|
|
@@ -67,7 +67,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
67
67
|
label: string;
|
|
68
68
|
source: string;
|
|
69
69
|
}[] | undefined;
|
|
70
|
-
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
70
|
+
'x-scalar-stability'?: import("@scalar/types/legacy").XScalarStability | undefined;
|
|
71
71
|
'x-codeSamples'?: {
|
|
72
72
|
lang: string;
|
|
73
73
|
label: string;
|
|
@@ -101,11 +101,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
101
101
|
default?: any;
|
|
102
102
|
format?: string | undefined;
|
|
103
103
|
description?: string | undefined;
|
|
104
|
-
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
104
|
+
properties?: Record<string, import("@scalar/types/legacy").Schema> | undefined;
|
|
105
105
|
} | undefined;
|
|
106
106
|
example?: any;
|
|
107
107
|
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
108
|
-
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
108
|
+
content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
|
|
109
109
|
headers?: {
|
|
110
110
|
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
111
111
|
} | undefined;
|
|
@@ -216,8 +216,8 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
216
216
|
callbacks?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
|
|
217
217
|
pathItems?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.PathItemObject> | undefined;
|
|
218
218
|
} | undefined;
|
|
219
|
-
webhooks?: import("@scalar/types").Webhooks | undefined;
|
|
220
|
-
definitions?: import("@scalar/types").Definitions | undefined;
|
|
219
|
+
webhooks?: import("@scalar/types/legacy").Webhooks | undefined;
|
|
220
|
+
definitions?: import("@scalar/types/legacy").Definitions | undefined;
|
|
221
221
|
swagger?: import("@scalar/openapi-types").OpenAPIV2.Document["swagger"];
|
|
222
222
|
openapi?: import("@scalar/openapi-types").OpenAPIV3.Document["openapi"] | import("@scalar/openapi-types").OpenAPIV3_1.Document["openapi"];
|
|
223
223
|
'x-tagGroups'?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAoD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { isValidUrl as d, fetchSpecFromUrl as f, prettyPrintJson as h } from "@scalar/oas-utils/helpers";
|
|
2
|
-
import { ref as u, reactive as
|
|
3
|
-
import { parse as
|
|
2
|
+
import { ref as u, reactive as g, watch as m, toValue as s } from "vue";
|
|
3
|
+
import { parse as v } from "../helpers/parse.js";
|
|
4
4
|
import { createEmptySpecification as l } from "../helpers/createEmptySpecification.js";
|
|
5
5
|
const y = async ({ url: e, content: r }, n) => {
|
|
6
6
|
if (e) {
|
|
7
|
-
const
|
|
7
|
+
const a = performance.now();
|
|
8
8
|
try {
|
|
9
9
|
const c = d(e) ? await f(e, n) : await f(e), o = performance.now();
|
|
10
|
-
return console.log(`fetch: ${Math.round(o -
|
|
10
|
+
return console.log(`fetch: ${Math.round(o - a)} ms (${e})`), console.log("size:", Math.round(c.length / 1024), "kB"), c;
|
|
11
11
|
} catch (c) {
|
|
12
12
|
console.error("Failed to fetch spec from URL:", c);
|
|
13
13
|
}
|
|
@@ -22,25 +22,24 @@ function C({
|
|
|
22
22
|
specConfig: e,
|
|
23
23
|
proxyUrl: r
|
|
24
24
|
}) {
|
|
25
|
-
const n = u(""), t =
|
|
25
|
+
const n = u(""), t = g(l()), a = u(null);
|
|
26
26
|
function c(o) {
|
|
27
|
-
return o ?
|
|
28
|
-
proxyUrl: r ?
|
|
27
|
+
return o ? v(o, {
|
|
28
|
+
proxyUrl: r ? s(r) : void 0
|
|
29
29
|
}).then((i) => {
|
|
30
|
-
|
|
31
|
-
servers: [],
|
|
30
|
+
a.value = null, Object.assign(t, {
|
|
32
31
|
...i
|
|
33
32
|
});
|
|
34
33
|
}).catch((i) => {
|
|
35
|
-
|
|
34
|
+
a.value = i.toString();
|
|
36
35
|
}) : Object.assign(t, l());
|
|
37
36
|
}
|
|
38
37
|
return m(
|
|
39
|
-
() =>
|
|
38
|
+
() => s(e),
|
|
40
39
|
async (o) => {
|
|
41
40
|
var i;
|
|
42
41
|
if (o) {
|
|
43
|
-
const p = (i = await y(o,
|
|
42
|
+
const p = (i = await y(o, s(r))) == null ? void 0 : i.trim();
|
|
44
43
|
typeof p == "string" && (n.value = p);
|
|
45
44
|
}
|
|
46
45
|
},
|
|
@@ -50,7 +49,7 @@ function C({
|
|
|
50
49
|
}), {
|
|
51
50
|
rawSpec: n,
|
|
52
51
|
parsedSpec: t,
|
|
53
|
-
specErrors:
|
|
52
|
+
specErrors: a
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
55
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAsND,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,SAepD,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCApBrB,MAAM;EA2EpD"}
|