@eventcatalog/core 2.12.0 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/bin/dist/eventcatalog.config.d.cts +3 -0
- package/bin/dist/eventcatalog.config.d.ts +3 -0
- package/bin/eventcatalog.config.ts +3 -0
- package/package.json +2 -2
- package/src/components/SideBars/DomainSideBar.astro +1 -1
- package/src/components/SideBars/MessageSideBar.astro +1 -1
- package/src/components/SideBars/ServiceSideBar.astro +1 -1
- package/src/pages/docs/[type]/[id]/[version]/asyncapi/index.astro +4 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/event-catalog/eventcatalog.git"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"version": "2.12.
|
|
9
|
+
"version": "2.12.1",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@astrojs/mdx": "^3.1.8",
|
|
42
42
|
"@astrojs/react": "^3.6.2",
|
|
43
43
|
"@astrojs/tailwind": "^5.1.2",
|
|
44
|
-
"@asyncapi/react-component": "^2.
|
|
44
|
+
"@asyncapi/react-component": "^2.4.3",
|
|
45
45
|
"@headlessui/react": "^2.0.3",
|
|
46
46
|
"@heroicons/react": "^2.1.3",
|
|
47
47
|
"@parcel/watcher": "^2.4.1",
|
|
@@ -66,7 +66,7 @@ const ownersList = owners.map((o) => ({
|
|
|
66
66
|
<span class="block">View in visualiser</span>
|
|
67
67
|
</a>
|
|
68
68
|
<a
|
|
69
|
-
href={buildUrl(`/docs/${domain.collection}/${domain.data.id}/${domain.data.
|
|
69
|
+
href={buildUrl(`/docs/${domain.collection}/${domain.data.id}/${domain.data.latestVersion}/changelog`)}
|
|
70
70
|
class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
71
71
|
>
|
|
72
72
|
<ScrollText strokeWidth={2} size={16} />
|
|
@@ -151,7 +151,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
|
|
|
151
151
|
</a>
|
|
152
152
|
|
|
153
153
|
<a
|
|
154
|
-
href={buildUrl(`/docs/${message.collection}/${message.data.id}/${message.data.
|
|
154
|
+
href={buildUrl(`/docs/${message.collection}/${message.data.id}/${message.data.latestVersion}/changelog`)}
|
|
155
155
|
class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
156
156
|
>
|
|
157
157
|
<ScrollText strokeWidth={2} size={16} />
|
|
@@ -107,7 +107,7 @@ const schemaURL = join(publicPath, schemaFilePath || '');
|
|
|
107
107
|
<span class="block">View in visualiser</span>
|
|
108
108
|
</a>
|
|
109
109
|
<a
|
|
110
|
-
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.
|
|
110
|
+
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.latestVersion}/changelog`)}
|
|
111
111
|
class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
112
112
|
>
|
|
113
113
|
<ScrollText strokeWidth={2} size={16} />
|
|
@@ -7,14 +7,13 @@ import { Parser } from '@asyncapi/parser';
|
|
|
7
7
|
|
|
8
8
|
import type { CollectionTypes, PageTypes } from '@types';
|
|
9
9
|
|
|
10
|
-
import PlainPage from '@layouts/PlainPage.astro';
|
|
11
|
-
|
|
12
10
|
import '@asyncapi/react-component/styles/default.min.css';
|
|
13
11
|
import js from '@asyncapi/react-component/browser/standalone/without-parser.js?url';
|
|
14
12
|
import { AsyncApiComponentWP, type ConfigInterface } from '@asyncapi/react-component';
|
|
15
13
|
import { pageDataLoader } from '@utils/pages/pages';
|
|
16
14
|
import type { CollectionEntry } from 'astro:content';
|
|
17
15
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
16
|
+
import Config from '@eventcatalog';
|
|
18
17
|
|
|
19
18
|
export async function getStaticPaths() {
|
|
20
19
|
const itemTypes: PageTypes[] = ['events', 'commands', 'queries', 'services', 'domains'];
|
|
@@ -45,7 +44,9 @@ const pathToSpec = path.join(catalog.publicPath, fileName);
|
|
|
45
44
|
const pathOnDisk = path.join(process.cwd(), 'public', pathToSpec);
|
|
46
45
|
const fileContent = readFileSync(pathOnDisk, 'utf-8');
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
// AsyncAPI parser will parser schemas for users, they can turn this off.
|
|
48
|
+
const parseSchemas = Config?.asyncAPI?.renderParsedSchemas ?? true;
|
|
49
|
+
const parsed = await new Parser().parse(fileContent, { parseSchemas });
|
|
49
50
|
const stringified = parsed.document?.json();
|
|
50
51
|
const config: ConfigInterface = { show: { sidebar: true, errors: true } };
|
|
51
52
|
|