@scalar/api-reference 1.25.71 → 1.25.74
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 +75 -0
- package/dist/browser/standalone.js +12267 -12210
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +2 -2
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +56 -57
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +3 -3
- package/dist/components/ApiReferenceLayout.vue2.js +160 -143
- package/dist/components/Content/Authentication/Authentication.vue.d.ts +1 -1
- package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/Authentication.vue.js +2 -2
- package/dist/components/Content/Authentication/Authentication.vue2.js +20 -20
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/Content.vue.d.ts +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 +59 -53
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +32 -32
- 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 +42 -36
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +10 -11
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +12 -12
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +19 -19
- 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/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +34 -28
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +30 -29
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +9 -8
- package/dist/components/Section/SectionColumn.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionColumn.vue.js +4 -4
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/Section/SectionHeader.vue.d.ts +2 -2
- 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 +16 -14
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +3 -2
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +22 -0
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/embeds/OpenApiDocument/types.d.ts +1 -1
- package/dist/embeds/OpenApiDocument/types.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +6 -4
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +3 -3
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +5 -5
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +2 -2
- package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +3 -3
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +124 -120
- package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +7 -7
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +3 -4
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.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/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 +99 -89
- package/dist/helpers/getExampleCode.d.ts +2 -2
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +11 -11
- package/dist/helpers/parse.d.ts +2 -2
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +3 -3
- package/dist/hooks/useDeprecationWarnings.d.ts.map +1 -1
- package/dist/hooks/useDeprecationWarnings.js +12 -15
- package/dist/hooks/useReactiveSpec.d.ts +24 -2
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +4 -4
- package/dist/index.js +1 -1
- package/dist/legacy/components/SecurityScheme.vue.d.ts +1 -1
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecurityScheme.vue.js +2 -2
- package/dist/legacy/components/SecurityScheme.vue2.js +13 -13
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +2 -2
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +3 -3
- package/dist/legacy/helpers/getUrlFromServerState.d.ts +2 -1
- package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +1 -1
- package/dist/legacy/helpers/getUrlFromServerState.js +14 -14
- package/dist/legacy/stores/useOpenApiStore.d.ts +22 -0
- package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
|
@@ -1,107 +1,117 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as c, openBlock as m, createBlock as d, unref as r, withCtx as t, createVNode as e, createTextVNode as u, createCommentVNode as _, createElementVNode as a, normalizeClass as h, toDisplayString as S } from "vue";
|
|
2
|
+
import C from "../../../components/OperationPath.vue.js";
|
|
3
|
+
import { ScalarMarkdown as v, ScalarErrorBoundary as f } from "@scalar/components";
|
|
4
|
+
import k from "../components/OperationParameters.vue.js";
|
|
5
|
+
import y from "../components/OperationResponses.vue.js";
|
|
6
|
+
import B from "../../../components/Section/Section.vue.js";
|
|
7
7
|
import g from "../../../components/Section/SectionContent.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import s from "../../../components/Section/SectionColumn.vue.js";
|
|
10
|
-
import B from "../../../components/Badge/Badge.vue.js";
|
|
8
|
+
import E from "../../../components/Badge/Badge.vue.js";
|
|
11
9
|
import N from "../../../components/Section/SectionHeader.vue.js";
|
|
12
10
|
import V from "../../../components/Anchor/Anchor.vue.js";
|
|
13
|
-
import b from "
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
11
|
+
import b from "../../../components/Section/SectionColumns.vue.js";
|
|
12
|
+
import s from "../../../components/Section/SectionColumn.vue.js";
|
|
13
|
+
import w from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
14
|
+
import R from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
15
|
+
import q from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
16
|
+
const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__PURE__ */ c({
|
|
17
17
|
__name: "ModernLayout",
|
|
18
18
|
props: {
|
|
19
19
|
id: {},
|
|
20
20
|
operation: {}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
return (
|
|
24
|
-
id:
|
|
25
|
-
label:
|
|
22
|
+
setup(T) {
|
|
23
|
+
return (o, n) => (m(), d(r(B), {
|
|
24
|
+
id: o.id,
|
|
25
|
+
label: o.operation.name
|
|
26
26
|
}, {
|
|
27
|
-
default:
|
|
28
|
-
|
|
29
|
-
default:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
default: t(() => [
|
|
28
|
+
e(r(g), null, {
|
|
29
|
+
default: t(() => {
|
|
30
|
+
var i, p;
|
|
31
|
+
return [
|
|
32
|
+
(i = o.operation.information) != null && i.deprecated ? (m(), d(r(E), { key: 0 }, {
|
|
33
|
+
default: t(() => n[0] || (n[0] = [
|
|
34
|
+
u(" Deprecated ")
|
|
35
|
+
])),
|
|
36
|
+
_: 1
|
|
37
|
+
})) : _("", !0),
|
|
38
|
+
a("div", {
|
|
39
|
+
class: h((p = o.operation.information) != null && p.deprecated ? "deprecated" : "")
|
|
40
|
+
}, [
|
|
41
|
+
e(r(N), { level: 3 }, {
|
|
42
|
+
default: t(() => [
|
|
43
|
+
e(r(V), {
|
|
44
|
+
id: o.id ?? ""
|
|
45
|
+
}, {
|
|
46
|
+
default: t(() => [
|
|
47
|
+
u(S(o.operation.name), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["id"])
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
})
|
|
54
|
+
], 2),
|
|
55
|
+
e(r(b), null, {
|
|
56
|
+
default: t(() => [
|
|
57
|
+
e(r(s), null, {
|
|
58
|
+
default: t(() => [
|
|
59
|
+
a("div", D, [
|
|
60
|
+
e(r(v), {
|
|
61
|
+
value: o.operation.description,
|
|
62
|
+
withImages: ""
|
|
63
|
+
}, null, 8, ["value"]),
|
|
64
|
+
e(k, { operation: o.operation }, null, 8, ["operation"]),
|
|
65
|
+
e(y, { operation: o.operation }, null, 8, ["operation"])
|
|
66
|
+
])
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
}),
|
|
70
|
+
e(r(s), null, {
|
|
71
|
+
default: t(() => [
|
|
72
|
+
a("div", M, [
|
|
73
|
+
e(r(f), null, {
|
|
74
|
+
default: t(() => [
|
|
75
|
+
e(r(w), {
|
|
76
|
+
fallback: "",
|
|
77
|
+
operation: o.operation
|
|
49
78
|
}, {
|
|
50
|
-
|
|
51
|
-
|
|
79
|
+
header: t(() => {
|
|
80
|
+
var l;
|
|
81
|
+
return [
|
|
82
|
+
e(C, {
|
|
83
|
+
class: "example-path",
|
|
84
|
+
deprecated: (l = o.operation.information) == null ? void 0 : l.deprecated,
|
|
85
|
+
path: o.operation.path
|
|
86
|
+
}, null, 8, ["deprecated", "path"])
|
|
87
|
+
];
|
|
88
|
+
}),
|
|
89
|
+
footer: t(() => [
|
|
90
|
+
e(r(R), { operation: o.operation }, null, 8, ["operation"])
|
|
52
91
|
]),
|
|
53
92
|
_: 1
|
|
54
|
-
}, 8, ["
|
|
93
|
+
}, 8, ["operation"])
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
}),
|
|
97
|
+
e(r(f), null, {
|
|
98
|
+
default: t(() => [
|
|
99
|
+
e(r(q), {
|
|
100
|
+
operation: o.operation,
|
|
101
|
+
style: { "margin-top": "12px" }
|
|
102
|
+
}, null, 8, ["operation"])
|
|
55
103
|
]),
|
|
56
104
|
_: 1
|
|
57
105
|
})
|
|
58
|
-
], 2),
|
|
59
|
-
n("div", R, [
|
|
60
|
-
o(t(C), {
|
|
61
|
-
value: e.operation.description,
|
|
62
|
-
withImages: ""
|
|
63
|
-
}, null, 8, ["value"]),
|
|
64
|
-
o(S, { operation: e.operation }, null, 8, ["operation"]),
|
|
65
|
-
o(v, { operation: e.operation }, null, 8, ["operation"])
|
|
66
106
|
])
|
|
67
|
-
]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
fallback: "",
|
|
76
|
-
operation: e.operation
|
|
77
|
-
}, {
|
|
78
|
-
header: r(() => {
|
|
79
|
-
var a;
|
|
80
|
-
return [
|
|
81
|
-
o(_, {
|
|
82
|
-
class: "example-path",
|
|
83
|
-
deprecated: (a = e.operation.information) == null ? void 0 : a.deprecated,
|
|
84
|
-
path: e.operation.path
|
|
85
|
-
}, null, 8, ["deprecated", "path"])
|
|
86
|
-
];
|
|
87
|
-
}),
|
|
88
|
-
footer: r(() => [
|
|
89
|
-
o(t(w), { operation: e.operation }, null, 8, ["operation"])
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
}, 8, ["operation"]),
|
|
93
|
-
o(t(E), {
|
|
94
|
-
operation: e.operation,
|
|
95
|
-
style: { "margin-top": "12px" }
|
|
96
|
-
}, null, 8, ["operation"])
|
|
97
|
-
])
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
})
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
})
|
|
104
|
-
]),
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
})
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
113
|
+
];
|
|
114
|
+
}),
|
|
105
115
|
_: 1
|
|
106
116
|
})
|
|
107
117
|
]),
|
|
@@ -110,5 +120,5 @@ const R = { class: "operation-details" }, q = { class: "examples" }, Q = /* @__P
|
|
|
110
120
|
}
|
|
111
121
|
});
|
|
112
122
|
export {
|
|
113
|
-
|
|
123
|
+
W as default
|
|
114
124
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Request, type ClientId as SnippetzClientId, type TargetId as SnippetzTargetId } from '@scalar/snippetz';
|
|
2
2
|
import { type ClientId as HttpSnippetLiteClientId, type TargetId as HttpSnippetLiteTargetId } from 'httpsnippet-lite';
|
|
3
3
|
export type TargetId = HttpSnippetLiteTargetId | SnippetzTargetId;
|
|
4
|
-
export type ClientId = HttpSnippetLiteClientId | SnippetzClientId
|
|
4
|
+
export type ClientId<T extends SnippetzTargetId> = HttpSnippetLiteClientId | SnippetzClientId<T>;
|
|
5
5
|
/**
|
|
6
6
|
* Returns a code example for given HAR request
|
|
7
7
|
*/
|
|
8
|
-
export declare function getExampleCode(request: Request, target: TargetId, client: ClientId): Promise<string>;
|
|
8
|
+
export declare function getExampleCode<T extends SnippetzTargetId>(request: Request, target: TargetId, client: ClientId<T>): Promise<string | undefined>;
|
|
9
9
|
//# sourceMappingURL=getExampleCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,gBAAgB,IAC3C,uBAAuB,GACvB,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEvB;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,SAAS,gBAAgB,EAC7D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,+BAyCpB"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { snippetz as
|
|
1
|
+
import { snippetz as o } from "@scalar/snippetz";
|
|
2
2
|
import { HTTPSnippet as s } from "httpsnippet-lite";
|
|
3
|
-
async function f(
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
return
|
|
7
|
-
|
|
3
|
+
async function f(t, e, p) {
|
|
4
|
+
const r = e;
|
|
5
|
+
if (o().hasPlugin(r, p))
|
|
6
|
+
return o().print(
|
|
7
|
+
r,
|
|
8
8
|
p,
|
|
9
|
-
|
|
9
|
+
t
|
|
10
10
|
);
|
|
11
|
-
if (
|
|
12
|
-
return
|
|
11
|
+
if (t.url.startsWith("__"))
|
|
12
|
+
return t.url;
|
|
13
13
|
try {
|
|
14
|
-
const n =
|
|
14
|
+
const n = e == null ? void 0 : e.replace(
|
|
15
15
|
"js",
|
|
16
16
|
"javascript"
|
|
17
|
-
), c = p, i = await new s(
|
|
17
|
+
), c = p, i = await new s(t).convert(
|
|
18
18
|
n,
|
|
19
19
|
c
|
|
20
20
|
);
|
package/dist/helpers/parse.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Spec } from '@scalar/types/legacy';
|
|
2
|
-
export declare const parse: (specification: any, {
|
|
3
|
-
|
|
2
|
+
export declare const parse: (specification: any, { proxyUrl, }?: {
|
|
3
|
+
proxyUrl?: string;
|
|
4
4
|
}) => Promise<Spec>;
|
|
5
5
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,eAAO,MAAM,KAAK,kBACD,GAAG,
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,eAAO,MAAM,KAAK,kBACD,GAAG,kBAGf;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,KACA,OAAO,CAAC,IAAI,CA0Dd,CAAA"}
|
package/dist/helpers/parse.js
CHANGED
|
@@ -4,8 +4,8 @@ import { fetchUrls as q } from "@scalar/openapi-parser/plugins/fetch-urls";
|
|
|
4
4
|
import { createEmptySpecification as m } from "./createEmptySpecification.js";
|
|
5
5
|
import { normalizeRequestMethod as E } from "../legacy/helpers/normalizeRequestMethod.js";
|
|
6
6
|
import { validRequestMethods as A } from "../legacy/fixtures/httpRequestMethods.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const D = (p, {
|
|
8
|
+
proxyUrl: e
|
|
9
9
|
} = {}) => new Promise(async (a, h) => {
|
|
10
10
|
var s;
|
|
11
11
|
try {
|
|
@@ -113,5 +113,5 @@ const z = (p, {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
export {
|
|
116
|
-
|
|
116
|
+
D as parse
|
|
117
117
|
};
|
|
@@ -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,QAgC3E"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { watch as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
|
|
1
|
+
import { watch as t } from "vue";
|
|
2
|
+
const o = "https://api.scalar.com/request-proxy", r = "https://proxy.scalar.com";
|
|
3
|
+
function p(e) {
|
|
4
|
+
t(
|
|
5
5
|
() => e,
|
|
6
6
|
() => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
e.proxy && console.warn(
|
|
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}).`
|
|
10
11
|
), console.warn(
|
|
11
|
-
`[DEPRECATED] We are overwriting the value and use the new proxy URL (${
|
|
12
|
-
), e.proxy =
|
|
13
|
-
`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${
|
|
14
|
-
)) : (r = e.proxy) != null && r.length && e.proxy !== o && e.proxy !== a && (console.warn(
|
|
15
|
-
`[DEPRECATED] Warning: configuration.proxy points to a custom proxy (${e == null ? void 0 : e.proxy}).`
|
|
16
|
-
), console.warn(
|
|
17
|
-
"[DEPRECATED] Action Required: You need to use our new proxy (written in Go). Read more: https://github.com/scalar/scalar/tree/main/examples/proxy-server"
|
|
12
|
+
`[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`
|
|
13
|
+
), delete e.proxy, e.proxyUrl = r, console.warn(
|
|
14
|
+
`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${r}). Read more: https://github.com/scalar/scalar`
|
|
18
15
|
));
|
|
19
16
|
},
|
|
20
17
|
{
|
|
@@ -23,5 +20,5 @@ function n(e) {
|
|
|
23
20
|
);
|
|
24
21
|
}
|
|
25
22
|
export {
|
|
26
|
-
|
|
23
|
+
p as useDeprecationWarnings
|
|
27
24
|
};
|
|
@@ -3,9 +3,9 @@ import { type MaybeRefOrGetter } from 'vue';
|
|
|
3
3
|
/**
|
|
4
4
|
* Keep the raw spec content in a ref and update it when the configuration changes.
|
|
5
5
|
*/
|
|
6
|
-
export declare function useReactiveSpec({ specConfig,
|
|
6
|
+
export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
7
7
|
specConfig?: MaybeRefOrGetter<SpecConfiguration>;
|
|
8
|
-
|
|
8
|
+
proxyUrl?: MaybeRefOrGetter<string>;
|
|
9
9
|
}): {
|
|
10
10
|
rawSpec: import("vue").Ref<string, string>;
|
|
11
11
|
parsedSpec: {
|
|
@@ -57,6 +57,17 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
|
|
|
57
57
|
summary?: string | undefined;
|
|
58
58
|
tags?: string[] | undefined;
|
|
59
59
|
deprecated?: boolean | undefined;
|
|
60
|
+
servers?: ({
|
|
61
|
+
url?: string | undefined;
|
|
62
|
+
description?: string | undefined;
|
|
63
|
+
variables?: {
|
|
64
|
+
[variable: string]: import("@scalar/openapi-types").OpenAPIV3.ServerVariableObject;
|
|
65
|
+
} | undefined;
|
|
66
|
+
} | {
|
|
67
|
+
url?: string | undefined;
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
variables?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
70
|
+
})[] | undefined;
|
|
60
71
|
'x-custom-examples'?: {
|
|
61
72
|
lang: string;
|
|
62
73
|
label: string;
|
|
@@ -73,6 +84,17 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
|
|
|
73
84
|
source: string;
|
|
74
85
|
}[] | undefined;
|
|
75
86
|
} | undefined;
|
|
87
|
+
servers?: ({
|
|
88
|
+
url?: string | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
variables?: {
|
|
91
|
+
[variable: string]: import("@scalar/openapi-types").OpenAPIV3.ServerVariableObject;
|
|
92
|
+
} | undefined;
|
|
93
|
+
} | {
|
|
94
|
+
url?: string | undefined;
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
variables?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
97
|
+
})[] | undefined;
|
|
76
98
|
pathParameters?: {
|
|
77
99
|
name: string;
|
|
78
100
|
in?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAyD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAyD1E;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA"}
|
|
@@ -18,14 +18,14 @@ const y = async ({ url: e, content: r }, n) => {
|
|
|
18
18
|
if (typeof t == "object")
|
|
19
19
|
return h(t);
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function C({
|
|
22
22
|
specConfig: e,
|
|
23
|
-
|
|
23
|
+
proxyUrl: r
|
|
24
24
|
}) {
|
|
25
25
|
const n = u(""), t = v(l()), s = u(null);
|
|
26
26
|
function c(o) {
|
|
27
27
|
return o ? g(o, {
|
|
28
|
-
|
|
28
|
+
proxyUrl: r ? a(r) : void 0
|
|
29
29
|
}).then((i) => {
|
|
30
30
|
s.value = null, Object.assign(t, {
|
|
31
31
|
servers: [],
|
|
@@ -54,5 +54,5 @@ function U({
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
C as useReactiveSpec
|
|
58
58
|
};
|