@scalar/api-reference 1.28.33 → 1.28.34
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 +28 -0
- package/dist/browser/standalone.js +6779 -6794
- 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/Anchor/Anchor.vue2.js +24 -22
- package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +50 -50
- 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/ClientLibraries/ClientLibraries.vue2.js +5 -5
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +31 -32
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +21 -21
- package/dist/components/Content/Lazy/Loading.vue.js +22 -22
- 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 +17 -17
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +14 -14
- package/dist/components/Content/Schema/Schema.preview.d.ts +98 -15
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- 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 +2 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +99 -5
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +2 -165
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +27 -26
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +50 -40
- package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
- package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
- package/dist/components/Content/Tag/TagAccordion.vue2.js +10 -10
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +8 -8
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +8 -8
- package/dist/components/GettingStarted.vue.d.ts +2 -2
- 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 +4 -4
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +4 -4
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +3 -3
- package/dist/features/ApiClientModal/index.d.ts +1 -1
- package/dist/features/ApiClientModal/index.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +42 -42
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue2.js +17 -17
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +12 -12
- package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
- package/dist/features/Operation/Webhooks.vue.js +2 -2
- package/dist/features/Operation/Webhooks.vue2.js +13 -13
- 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 +18 -18
- 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 +38 -32
- package/dist/features/Operation/hooks/useResponses.d.ts +1 -0
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +13 -12
- 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 +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +1 -1
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +20 -21
- package/dist/helpers/{isMacOs.d.ts → is-mac-os.d.ts} +1 -1
- package/dist/helpers/is-mac-os.d.ts.map +1 -0
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +1 -1
- package/dist/helpers/{scrollToId.d.ts → scroll-to-id.d.ts} +1 -1
- package/dist/helpers/scroll-to-id.d.ts.map +1 -0
- package/dist/helpers/sleep.d.ts +0 -2
- package/dist/helpers/sleep.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +28 -28
- package/dist/hooks/useReactiveSpec.js +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +45 -49
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -28
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/legacy/fixtures/index.d.ts.map +1 -1
- package/dist/legacy/helpers/index.d.ts +1 -1
- package/dist/legacy/helpers/index.d.ts.map +1 -1
- package/dist/libs/download.d.ts +9 -0
- package/dist/libs/download.d.ts.map +1 -0
- package/dist/libs/download.js +19 -0
- package/dist/{helpers/getLowestHeadingLevel.d.ts → libs/markdown.d.ts} +5 -1
- package/dist/libs/markdown.d.ts.map +1 -0
- package/dist/libs/markdown.js +18 -0
- package/dist/libs/openapi.d.ts +56 -0
- package/dist/libs/openapi.d.ts.map +1 -0
- package/dist/libs/openapi.js +102 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -45
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -21
- package/dist/esm.js +0 -34
- package/dist/helpers/createEmptySpecification.d.ts +0 -8
- package/dist/helpers/createEmptySpecification.d.ts.map +0 -1
- package/dist/helpers/createEmptySpecification.js +0 -27
- package/dist/helpers/deepMerge.d.ts +0 -5
- package/dist/helpers/deepMerge.d.ts.map +0 -1
- package/dist/helpers/deepMerge.js +0 -8
- package/dist/helpers/generateParameters.d.ts +0 -6
- package/dist/helpers/generateParameters.d.ts.map +0 -1
- package/dist/helpers/get-request.d.ts +0 -59
- package/dist/helpers/get-request.d.ts.map +0 -1
- package/dist/helpers/getHeadingsFromMarkdown.d.ts +0 -6
- package/dist/helpers/getHeadingsFromMarkdown.d.ts.map +0 -1
- package/dist/helpers/getHeadingsFromMarkdown.js +0 -13
- package/dist/helpers/getLowestHeadingLevel.d.ts.map +0 -1
- package/dist/helpers/getLowestHeadingLevel.js +0 -7
- package/dist/helpers/getModels.d.ts +0 -7
- package/dist/helpers/getModels.d.ts.map +0 -1
- package/dist/helpers/getModels.js +0 -22
- package/dist/helpers/getVariableNames.d.ts +0 -5
- package/dist/helpers/getVariableNames.d.ts.map +0 -1
- package/dist/helpers/hasModels.d.ts +0 -3
- package/dist/helpers/hasModels.d.ts.map +0 -1
- package/dist/helpers/hasModels.js +0 -5
- package/dist/helpers/hasSecuritySchemes.d.ts +0 -3
- package/dist/helpers/hasSecuritySchemes.d.ts.map +0 -1
- package/dist/helpers/hasWebhooks.d.ts +0 -3
- package/dist/helpers/hasWebhooks.d.ts.map +0 -1
- package/dist/helpers/hasWebhooks.js +0 -4
- package/dist/helpers/index.d.ts +0 -17
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/isMacOs.d.ts.map +0 -1
- package/dist/helpers/mapFromObject.d.ts +0 -8
- package/dist/helpers/mapFromObject.d.ts.map +0 -1
- package/dist/helpers/mergeAllObjects.d.ts +0 -5
- package/dist/helpers/mergeAllObjects.d.ts.map +0 -1
- package/dist/helpers/scrollToId.d.ts.map +0 -1
- package/dist/helpers/specDownloads.d.ts +0 -7
- package/dist/helpers/specDownloads.d.ts.map +0 -1
- package/dist/helpers/specDownloads.js +0 -19
- package/dist/helpers/specHelpers.d.ts +0 -16
- package/dist/helpers/specHelpers.d.ts.map +0 -1
- package/dist/helpers/specHelpers.js +0 -36
- package/dist/helpers/waitFor.d.ts +0 -5
- package/dist/helpers/waitFor.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/legacy/helpers/encodeStringAsBase64.d.ts +0 -5
- package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +0 -1
- package/dist/legacy/index.d.ts +0 -5
- package/dist/legacy/index.d.ts.map +0 -1
- package/dist/legacy/types.d.ts +0 -94
- package/dist/legacy/types.d.ts.map +0 -1
- package/dist/libs/operation.d.ts +0 -15
- package/dist/libs/operation.d.ts.map +0 -1
- package/dist/libs/operation.js +0 -16
- package/dist/stores/index.d.ts +0 -2
- package/dist/stores/index.d.ts.map +0 -1
- /package/dist/helpers/{isMacOs.js → is-mac-os.js} +0 -0
- /package/dist/helpers/{scrollToId.js → scroll-to-id.js} +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { ThemeId } from '@scalar/themes';
|
|
2
1
|
import type { AnyApiReferenceConfiguration, ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
|
-
import type {
|
|
4
|
-
import type { HarRequest } from '@scalar/types/snippetz';
|
|
5
|
-
import type { Slot } from 'vue';
|
|
2
|
+
import type { Spec } from '@scalar/types/legacy';
|
|
6
3
|
export type { ApiReferenceConfiguration };
|
|
7
|
-
export type { ReferenceConfiguration };
|
|
8
4
|
export type ReferenceProps = {
|
|
9
5
|
configuration?: AnyApiReferenceConfiguration;
|
|
10
6
|
};
|
|
@@ -18,12 +14,6 @@ export type ReferenceLayoutProps = {
|
|
|
18
14
|
isDark: boolean;
|
|
19
15
|
};
|
|
20
16
|
export type GettingStartedExamples = 'Petstore' | 'CoinMarketCap';
|
|
21
|
-
export type Parameter = {
|
|
22
|
-
name: string;
|
|
23
|
-
required: boolean;
|
|
24
|
-
displayType: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
17
|
export type ContentProperties = {
|
|
28
18
|
[key: string]: {
|
|
29
19
|
type: string;
|
|
@@ -42,33 +32,6 @@ export type ContentSchema = {
|
|
|
42
32
|
properties: ContentProperties;
|
|
43
33
|
};
|
|
44
34
|
};
|
|
45
|
-
export type Content = {
|
|
46
|
-
[key in ContentType]: ContentSchema;
|
|
47
|
-
};
|
|
48
|
-
export type Contact = {
|
|
49
|
-
email: string;
|
|
50
|
-
};
|
|
51
|
-
export type License = {
|
|
52
|
-
name: string;
|
|
53
|
-
url: string;
|
|
54
|
-
};
|
|
55
|
-
export type Info = {
|
|
56
|
-
title: string;
|
|
57
|
-
description?: string;
|
|
58
|
-
termsOfService?: string;
|
|
59
|
-
contact?: Contact;
|
|
60
|
-
license?: License;
|
|
61
|
-
version?: string;
|
|
62
|
-
};
|
|
63
|
-
export type HarRequestWithPath = HarRequest & {
|
|
64
|
-
path: string;
|
|
65
|
-
};
|
|
66
|
-
export type ReferenceLayoutType = 'modern' | 'classic';
|
|
67
|
-
/** Slots required for standalone reference components */
|
|
68
|
-
export type ReferenceSlot = 'footer';
|
|
69
|
-
export type ReferenceSlots = {
|
|
70
|
-
[x in ReferenceSlot]: Slot<Record<string, never>>;
|
|
71
|
-
};
|
|
72
35
|
/** Slots required for reference base / layout component */
|
|
73
36
|
export type ReferenceLayoutSlot = 'header' | 'footer' | 'editor' | 'content-start' | 'content-end' | 'sidebar-start' | 'sidebar-end';
|
|
74
37
|
export type ReferenceLayoutSlots = {
|
|
@@ -81,11 +44,4 @@ export type ReferenceSlotProps = {
|
|
|
81
44
|
spec: Spec;
|
|
82
45
|
breadcrumb: string;
|
|
83
46
|
};
|
|
84
|
-
export type ReferenceLayoutEvents = {
|
|
85
|
-
(e: 'changeTheme', value: ThemeId): void;
|
|
86
|
-
(e: 'updateContent', value: string): void;
|
|
87
|
-
(e: 'loadSwaggerFile'): void;
|
|
88
|
-
(e: 'linkSwaggerFile'): void;
|
|
89
|
-
(e: 'toggleDarkMode'): void;
|
|
90
|
-
};
|
|
91
47
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACjD,UAAU,EAAE,IAAI,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,eAAe,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAC/B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,EAAE,iBAAiB,CAAA;KAC9B,CAAA;CACF,CAAA;AACD,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,GAAG,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalar/api-reference",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "Generate beautiful API references from OpenAPI documents",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Scalar (https://github.com/scalar)",
|
|
6
6
|
"homepage": "https://github.com/scalar/scalar",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.28.
|
|
23
|
+
"version": "1.28.34",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=18"
|
|
26
26
|
},
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
"!dist/webpack-stats.json",
|
|
38
38
|
"CHANGELOG.md"
|
|
39
39
|
],
|
|
40
|
-
"imports": {
|
|
41
|
-
"#legacy": "./src/legacy/index.ts"
|
|
42
|
-
},
|
|
43
40
|
"browser": "./dist/browser/standalone.js",
|
|
44
41
|
"esm.sh": {
|
|
45
42
|
"bundle": true
|
|
@@ -57,18 +54,18 @@
|
|
|
57
54
|
"nanoid": "^5.1.5",
|
|
58
55
|
"vue": "^3.5.12",
|
|
59
56
|
"zod": "3.24.1",
|
|
60
|
-
"@scalar/api-client": "2.3.
|
|
61
|
-
"@scalar/components": "0.13.58",
|
|
62
|
-
"@scalar/icons": "0.3.6",
|
|
57
|
+
"@scalar/api-client": "2.3.34",
|
|
63
58
|
"@scalar/code-highlight": "0.0.29",
|
|
64
|
-
"@scalar/
|
|
59
|
+
"@scalar/components": "0.13.59",
|
|
60
|
+
"@scalar/icons": "0.3.7",
|
|
61
|
+
"@scalar/oas-utils": "0.2.144",
|
|
65
62
|
"@scalar/openapi-parser": "0.10.17",
|
|
66
|
-
"@scalar/
|
|
67
|
-
"@scalar/themes": "0.11.2",
|
|
63
|
+
"@scalar/themes": "0.11.3",
|
|
68
64
|
"@scalar/snippetz": "0.2.20",
|
|
65
|
+
"@scalar/types": "0.1.16",
|
|
66
|
+
"@scalar/use-hooks": "0.1.50",
|
|
69
67
|
"@scalar/use-toasts": "0.7.10",
|
|
70
|
-
"@scalar/types": "0.
|
|
71
|
-
"@scalar/use-hooks": "0.1.49"
|
|
68
|
+
"@scalar/openapi-types": "0.2.3"
|
|
72
69
|
},
|
|
73
70
|
"devDependencies": {
|
|
74
71
|
"@types/react": "^19.0.1",
|
|
@@ -86,27 +83,25 @@
|
|
|
86
83
|
"vite-plugin-banner": "^0.7.1",
|
|
87
84
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
88
85
|
"vitest": "^1.6.0",
|
|
89
|
-
"@scalar/
|
|
86
|
+
"@scalar/react-renderer": "0.1.0",
|
|
90
87
|
"@scalar/galaxy": "0.3.2",
|
|
91
|
-
"@scalar/
|
|
88
|
+
"@scalar/build-tooling": "0.1.19"
|
|
92
89
|
},
|
|
93
90
|
"scripts": {
|
|
94
|
-
"analyze:default": "pnpm dlx vite-bundle-visualizer",
|
|
95
|
-
"analyze:standalone": "pnpm dlx vite-bundle-visualizer -c vite.standalone.config.ts",
|
|
96
91
|
"build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
|
|
97
92
|
"build:default": "vite build",
|
|
98
93
|
"build:standalone": "vite build -c vite.standalone.config.ts",
|
|
99
94
|
"dev": "vite",
|
|
100
95
|
"dev:standalone": "vite -c vite.standalone.config.ts",
|
|
101
|
-
"lint:check": "
|
|
102
|
-
"lint:fix": "
|
|
96
|
+
"lint:check": "scalar-lint-check",
|
|
97
|
+
"lint:fix": "scalar-lint-fix",
|
|
103
98
|
"playground:components": "vite ./playground/components -c ./playground/components/vite.config.ts",
|
|
104
99
|
"playground:esm": "vite ./playground/esm -c ./playground/esm/vite.config.ts",
|
|
105
100
|
"playground:ssr": "cd ./playground/ssr && pnpm dev",
|
|
106
101
|
"playground:vue": "vite ./playground/vue -c ./playground/vue/vite.config.ts",
|
|
107
102
|
"preview": "vite preview",
|
|
108
103
|
"test": "vitest",
|
|
109
|
-
"types:build": "
|
|
110
|
-
"types:check": "vue
|
|
104
|
+
"types:build": "scalar-types-build-vue",
|
|
105
|
+
"types:check": "scalar-types-check-vue"
|
|
111
106
|
}
|
|
112
107
|
}
|
package/dist/esm.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { objectMerge as f } from "@scalar/oas-utils/helpers";
|
|
2
|
-
import { createHead as p } from "@unhead/vue";
|
|
3
|
-
import { reactive as u, createApp as m } from "vue";
|
|
4
|
-
import l from "./components/ApiReference.vue.js";
|
|
5
|
-
function S(o, a, c = !0) {
|
|
6
|
-
console.warn(
|
|
7
|
-
"createScalarReferences is deprecated. Please import { createApiReference } from '@scalar/api-reference' instead."
|
|
8
|
-
);
|
|
9
|
-
const r = u(a), t = m(l, { configuration: r }), i = p();
|
|
10
|
-
t.use(i);
|
|
11
|
-
function n(e = o) {
|
|
12
|
-
if (!e) {
|
|
13
|
-
console.warn("Invalid HTML element provided. Cannot mount Scalar References");
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
t.mount(e);
|
|
17
|
-
}
|
|
18
|
-
return c && n(), {
|
|
19
|
-
/** Update the configuration for a mounted reference */
|
|
20
|
-
updateConfig(e, s = !0) {
|
|
21
|
-
s ? Object.assign(r, e) : f(r, e);
|
|
22
|
-
},
|
|
23
|
-
updateSpec(e) {
|
|
24
|
-
Array.isArray(r) ? console.error("Cannot update the content for multiple configurations.") : Object.assign(r, e);
|
|
25
|
-
},
|
|
26
|
-
/** Mount the references to a given element */
|
|
27
|
-
mount: n,
|
|
28
|
-
/** Unmount the app from an element */
|
|
29
|
-
unmount: () => t.unmount()
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
S as createScalarReferences
|
|
34
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { OpenAPI } from '@scalar/openapi-types';
|
|
2
|
-
import type { Spec } from '@scalar/types/legacy';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an empty specification object.
|
|
5
|
-
* The returning object has the same structure as a valid OpenAPI specification, but everything is empty.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): Spec;
|
|
8
|
-
//# sourceMappingURL=createEmptySpecification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,27 +0,0 @@
|
|
|
1
|
-
import { deepMerge as r } from "./deepMerge.js";
|
|
2
|
-
function i(e) {
|
|
3
|
-
return r(e ?? {}, {
|
|
4
|
-
info: {
|
|
5
|
-
title: "",
|
|
6
|
-
description: "",
|
|
7
|
-
termsOfService: "",
|
|
8
|
-
version: "",
|
|
9
|
-
license: {
|
|
10
|
-
name: "",
|
|
11
|
-
url: ""
|
|
12
|
-
},
|
|
13
|
-
contact: {
|
|
14
|
-
email: ""
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
externalDocs: {
|
|
18
|
-
description: "",
|
|
19
|
-
url: ""
|
|
20
|
-
},
|
|
21
|
-
servers: [],
|
|
22
|
-
tags: []
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
i as createEmptySpecification
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/helpers/deepMerge.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BaseParameter, Parameters } from '@scalar/types/legacy';
|
|
2
|
-
/**
|
|
3
|
-
* Generate parameters for the request from the parameters in the swagger file
|
|
4
|
-
*/
|
|
5
|
-
export declare function generateParameters(parameters: Parameters[]): BaseParameter[];
|
|
6
|
-
//# sourceMappingURL=generateParameters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateParameters.d.ts","sourceRoot":"","sources":["../../src/helpers/generateParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAErE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,mBAc1D"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '@scalar/api-client/store';
|
|
2
|
-
/** Grabs the request from a path + method */
|
|
3
|
-
export declare const getRequest: (requests: WorkspaceStore["requests"], path: string, method: string) => {
|
|
4
|
-
uid: string & import("zod").BRAND<"operation">;
|
|
5
|
-
path: string;
|
|
6
|
-
type: "request";
|
|
7
|
-
selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
|
|
8
|
-
selectedServerUid: (string & import("zod").BRAND<"server">) | null;
|
|
9
|
-
servers: (string & import("zod").BRAND<"server">)[];
|
|
10
|
-
examples: (string & import("zod").BRAND<"example">)[];
|
|
11
|
-
method: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace";
|
|
12
|
-
description?: string | undefined;
|
|
13
|
-
summary?: string | undefined;
|
|
14
|
-
externalDocs?: {
|
|
15
|
-
url: string;
|
|
16
|
-
description?: string | undefined;
|
|
17
|
-
} | undefined;
|
|
18
|
-
'x-internal'?: boolean | undefined;
|
|
19
|
-
'x-scalar-ignore'?: boolean | undefined;
|
|
20
|
-
security?: Record<string, string[]>[] | undefined;
|
|
21
|
-
tags?: string[] | undefined;
|
|
22
|
-
deprecated?: boolean | undefined;
|
|
23
|
-
operationId?: string | undefined;
|
|
24
|
-
parameters?: {
|
|
25
|
-
name: string;
|
|
26
|
-
required: boolean;
|
|
27
|
-
deprecated: boolean;
|
|
28
|
-
in: "cookie" | "path" | "query" | "header";
|
|
29
|
-
description?: string | undefined;
|
|
30
|
-
example?: unknown;
|
|
31
|
-
examples?: unknown[] | Record<string, {
|
|
32
|
-
value?: unknown;
|
|
33
|
-
summary?: string | undefined;
|
|
34
|
-
externalValue?: string | undefined;
|
|
35
|
-
}> | undefined;
|
|
36
|
-
schema?: unknown;
|
|
37
|
-
content?: unknown;
|
|
38
|
-
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
39
|
-
}[] | undefined;
|
|
40
|
-
requestBody?: any;
|
|
41
|
-
responses?: Record<string, any> | undefined;
|
|
42
|
-
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
43
|
-
'x-codeSamples'?: {
|
|
44
|
-
source: string;
|
|
45
|
-
label?: string | undefined;
|
|
46
|
-
lang?: string | undefined;
|
|
47
|
-
}[] | undefined;
|
|
48
|
-
'x-code-samples'?: {
|
|
49
|
-
source: string;
|
|
50
|
-
label?: string | undefined;
|
|
51
|
-
lang?: string | undefined;
|
|
52
|
-
}[] | undefined;
|
|
53
|
-
'x-custom-examples'?: {
|
|
54
|
-
source: string;
|
|
55
|
-
label?: string | undefined;
|
|
56
|
-
lang?: string | undefined;
|
|
57
|
-
}[] | undefined;
|
|
58
|
-
} | undefined;
|
|
59
|
-
//# sourceMappingURL=get-request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;yBAEy+T,KAAK;;;kDAA2H,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;mBAA8f,CAAC;eAAyC,CAAC;gBAA+B,CAAC;iBAAoD,CAAC;mBAAkC,CAAC;yBAAmD,CAAC;;cAAoE,CAAC;eAA8B,CAAC;aAA4B,CAAC;;;;kCAAyP,eAAe;;;aAAyG,CAAC;YAAsC,CAAC;;;;aAAyH,CAAC;YAAsC,CAAC;;;;aAA4H,CAAC;YAAsC,CAAC;;aADprY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getHeadingsFromMarkdown.d.ts","sourceRoot":"","sources":["../../src/helpers/getHeadingsFromMarkdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAWnD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAMhE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getHeadings as g } from "@scalar/code-highlight/markdown";
|
|
2
|
-
import n from "github-slugger";
|
|
3
|
-
const o = (t, e) => t.map((r) => ({
|
|
4
|
-
...r,
|
|
5
|
-
slug: e.slug(r.value)
|
|
6
|
-
}));
|
|
7
|
-
function i(t) {
|
|
8
|
-
const e = new n(), r = g(t);
|
|
9
|
-
return o(r, e);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
i as getHeadingsFromMarkdown
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLowestHeadingLevel.d.ts","sourceRoot":"","sources":["../../src/helpers/getLowestHeadingLevel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAAc,OAAO,EAAE,KAAG,aAQ3D,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { Spec } from '@scalar/types/legacy';
|
|
3
|
-
/**
|
|
4
|
-
* Returns all models from the specification, no matter if it’s Swagger 2.0 or OpenAPI 3.x.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getModels(spec?: Spec): OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3_1.SchemaObject> | Record<string, OpenAPIV3.SchemaObject>;
|
|
7
|
-
//# sourceMappingURL=getModels.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,22 +0,0 @@
|
|
|
1
|
-
function l(t) {
|
|
2
|
-
var o, i;
|
|
3
|
-
if (!t)
|
|
4
|
-
return {};
|
|
5
|
-
const n = (
|
|
6
|
-
// OpenAPI 3.x
|
|
7
|
-
Object.keys(((o = t == null ? void 0 : t.components) == null ? void 0 : o.schemas) ?? {}).length ? (i = t == null ? void 0 : t.components) == null ? void 0 : i.schemas : (
|
|
8
|
-
// Swagger 2.0
|
|
9
|
-
Object.keys((t == null ? void 0 : t.definitions) ?? {}).length ? t == null ? void 0 : t.definitions : (
|
|
10
|
-
// Fallback
|
|
11
|
-
{}
|
|
12
|
-
)
|
|
13
|
-
)
|
|
14
|
-
);
|
|
15
|
-
return Object.keys(n ?? {}).forEach((r) => {
|
|
16
|
-
var f;
|
|
17
|
-
((f = n[r]) == null ? void 0 : f["x-internal"]) === !0 && delete n[r];
|
|
18
|
-
}), n;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
l as getModels
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getVariableNames.d.ts","sourceRoot":"","sources":["../../src/helpers/getVariableNames.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,YAO9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasModels.d.ts","sourceRoot":"","sources":["../../src/helpers/hasModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD,eAAO,MAAM,SAAS,UAAW,IAAI,YAUpC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasSecuritySchemes.d.ts","sourceRoot":"","sources":["../../src/helpers/hasSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD,eAAO,MAAM,kBAAkB,UAAW,IAAI,YAO7C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasWebhooks.d.ts","sourceRoot":"","sources":["../../src/helpers/hasWebhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD,eAAO,MAAM,WAAW,UAAW,IAAI,YAUtC,CAAA"}
|
package/dist/helpers/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './createEmptySpecification.js';
|
|
2
|
-
export * from './deepMerge.js';
|
|
3
|
-
export * from './getHeadingsFromMarkdown.js';
|
|
4
|
-
export * from './getLowestHeadingLevel.js';
|
|
5
|
-
export * from './getModels.js';
|
|
6
|
-
export * from './getVariableNames';
|
|
7
|
-
export * from './hasModels.js';
|
|
8
|
-
export * from './hasSecuritySchemes';
|
|
9
|
-
export * from './hasWebhooks.js';
|
|
10
|
-
export * from './isMacOs.js';
|
|
11
|
-
export * from './mapFromObject';
|
|
12
|
-
export * from './mergeAllObjects';
|
|
13
|
-
export * from './parse.js';
|
|
14
|
-
export * from './scrollToId.js';
|
|
15
|
-
export * from './sleep.js';
|
|
16
|
-
export * from './specDownloads.js';
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isMacOs.d.ts","sourceRoot":"","sources":["../../src/helpers/isMacOs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,eAAoF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapFromObject.d.ts","sourceRoot":"","sources":["../../src/helpers/mapFromObject.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,WAChB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YACjB,MAAM,KACf;IACD,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAA;IACtB,KAAK,EAAE,GAAG,CAAA;CACX,EAOA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeAllObjects.d.ts","sourceRoot":"","sources":["../../src/helpers/mergeAllObjects.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,KAAG,GAO3D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollToId.d.ts","sourceRoot":"","sources":["../../src/helpers/scrollToId.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,OAAc,MAAM,UAAU,OAAO,kBAS3D,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const downloadSpecBus: import("@vueuse/core").UseEventBusReturn<{
|
|
2
|
-
id: string;
|
|
3
|
-
specTitle?: string;
|
|
4
|
-
}, any>;
|
|
5
|
-
/** Download the OAS file string */
|
|
6
|
-
export declare function downloadSpecFile(spec: string, specTitle?: string): void;
|
|
7
|
-
//# sourceMappingURL=specDownloads.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,19 +0,0 @@
|
|
|
1
|
-
import { isJsonString as d } from "@scalar/oas-utils/helpers";
|
|
2
|
-
import { useEventBus as m } from "@vueuse/core";
|
|
3
|
-
const p = Symbol("downloadSpec"), u = m(p);
|
|
4
|
-
function b(o, n) {
|
|
5
|
-
const t = d(o), s = t ? new Blob([o], { type: "application/json" }) : new Blob([o], { type: "application/x-yaml" }), c = URL.createObjectURL(s), l = t ? ".json" : ".yaml", a = "spec" + l, i = n ? n + l : a, e = document.createElement("a");
|
|
6
|
-
e.href = c, e.download = i, e.dispatchEvent(
|
|
7
|
-
new MouseEvent("click", {
|
|
8
|
-
bubbles: !0,
|
|
9
|
-
cancelable: !0,
|
|
10
|
-
view: window
|
|
11
|
-
})
|
|
12
|
-
), setTimeout(() => {
|
|
13
|
-
window.URL.revokeObjectURL(c), e.remove();
|
|
14
|
-
}, 100);
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
u as downloadSpecBus,
|
|
18
|
-
b as downloadSpecFile
|
|
19
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Operation } from '@scalar/types/legacy';
|
|
2
|
-
import type { ContentSchema } from '../types';
|
|
3
|
-
type PropertyObject = {
|
|
4
|
-
required?: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
[key: string]: {
|
|
7
|
-
type: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
declare function formatProperty(key: string, obj: PropertyObject): string;
|
|
13
|
-
declare function recursiveLogger(obj: ContentSchema): string[];
|
|
14
|
-
declare function extractRequestBody(operation: Operation): string[] | boolean;
|
|
15
|
-
export { formatProperty, recursiveLogger, extractRequestBody };
|
|
16
|
-
//# sourceMappingURL=specHelpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,36 +0,0 @@
|
|
|
1
|
-
function u(e, r) {
|
|
2
|
-
var s;
|
|
3
|
-
let t = e;
|
|
4
|
-
const i = (s = r.required) == null ? void 0 : s.includes(e);
|
|
5
|
-
return t += i ? " REQUIRED " : " optional ", r.properties[e] && (t += r.properties[e].type, r.properties[e].description && (t += " " + r.properties[e].description)), t;
|
|
6
|
-
}
|
|
7
|
-
function f(e) {
|
|
8
|
-
var i;
|
|
9
|
-
const r = ["Body"], t = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
|
|
10
|
-
return t && Object.keys(t).forEach((s) => {
|
|
11
|
-
if (!e.schema)
|
|
12
|
-
return;
|
|
13
|
-
r.push(u(s, e.schema));
|
|
14
|
-
const p = t[s];
|
|
15
|
-
p.type === "object" && !!p.properties && p.properties && Object.keys(p.properties).forEach((o) => {
|
|
16
|
-
var c, n;
|
|
17
|
-
r.push(`${o} ${(n = (c = p.properties) == null ? void 0 : c[o]) == null ? void 0 : n.type}`);
|
|
18
|
-
});
|
|
19
|
-
}), r;
|
|
20
|
-
}
|
|
21
|
-
function a(e) {
|
|
22
|
-
var r, t, i;
|
|
23
|
-
try {
|
|
24
|
-
const s = (i = (t = (r = e == null ? void 0 : e.information) == null ? void 0 : r.requestBody) == null ? void 0 : t.content) == null ? void 0 : i["application/json"];
|
|
25
|
-
if (!s)
|
|
26
|
-
throw new Error("Body not found");
|
|
27
|
-
return f(s);
|
|
28
|
-
} catch {
|
|
29
|
-
return !1;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
a as extractRequestBody,
|
|
34
|
-
u as formatProperty,
|
|
35
|
-
f as recursiveLogger
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|