@eventcatalog/core 2.37.2 → 2.37.3
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/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-ARZJXJW7.js → chunk-JCZFOKW3.js} +1 -1
- package/dist/{chunk-BXWTM2JX.js → chunk-KC74WARE.js} +1 -1
- package/dist/{chunk-7J7J25A5.js → chunk-RXERG5SL.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +35 -11
- package/eventcatalog/src/utils/collections/util.ts +12 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-JCZFOKW3.js";
|
|
4
|
+
import "../chunk-RXERG5SL.js";
|
|
5
|
+
import "../chunk-KC74WARE.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-DCLTVJDP.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JCZFOKW3.js";
|
|
10
|
+
import "./chunk-RXERG5SL.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
14
14
|
} from "./chunk-SLEMYHTU.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KC74WARE.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled,
|
|
20
20
|
isEventCatalogScaleEnabled,
|
|
@@ -8,6 +8,8 @@ import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
|
|
|
8
8
|
import SchemaViewer from '@components/MDX/SchemaViewer/SchemaViewerRoot.astro';
|
|
9
9
|
import Admonition from '@components/MDX/Admonition';
|
|
10
10
|
|
|
11
|
+
import { resourceToCollectionMap, collectionToResourceMap } from '@utils/collections/util';
|
|
12
|
+
|
|
11
13
|
// SideBars
|
|
12
14
|
import ServiceSideBar from '@components/SideBars/ServiceSideBar.astro';
|
|
13
15
|
import MessageSideBar from '@components/SideBars/MessageSideBar.astro';
|
|
@@ -41,6 +43,8 @@ import { buildUrl } from '@utils/url-builder';
|
|
|
41
43
|
import { getSchemasFromResource } from '@utils/collections/schemas';
|
|
42
44
|
import { isEventCatalogChatEnabled, isMarkdownDownloadEnabled } from '@utils/feature';
|
|
43
45
|
|
|
46
|
+
import { getMDXComponentsByName } from '@utils/markdown';
|
|
47
|
+
|
|
44
48
|
import config from '@config';
|
|
45
49
|
|
|
46
50
|
export async function getStaticPaths() {
|
|
@@ -65,6 +69,7 @@ export async function getStaticPaths() {
|
|
|
65
69
|
const props = Astro.props;
|
|
66
70
|
|
|
67
71
|
const { Content } = await render(props);
|
|
72
|
+
|
|
68
73
|
// const { Content } = await props.render();
|
|
69
74
|
|
|
70
75
|
// Capitalize the first letter of a string
|
|
@@ -189,6 +194,15 @@ const generatePromptForResource = (props: any) => {
|
|
|
189
194
|
Please tell me more about the ${props.collection.slice(0, props.collection.length - 1)} - ${props.data.name} v${props.data.version} in this catalog.
|
|
190
195
|
`;
|
|
191
196
|
};
|
|
197
|
+
|
|
198
|
+
// Handle node graphs in the markdown
|
|
199
|
+
let nodeGraphs = getMDXComponentsByName(props.body || '', 'NodeGraph') || [];
|
|
200
|
+
|
|
201
|
+
nodeGraphs.push({
|
|
202
|
+
id: props.data.id,
|
|
203
|
+
version: props.data.version,
|
|
204
|
+
type: collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap],
|
|
205
|
+
});
|
|
192
206
|
---
|
|
193
207
|
|
|
194
208
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
@@ -319,17 +333,27 @@ const generatePromptForResource = (props: any) => {
|
|
|
319
333
|
<!-- @ts-ignore -->
|
|
320
334
|
<!-- <SchemaViewer id={props.data.id} catalog={props.catalog} filePath={props.filePath} /> -->
|
|
321
335
|
<SchemaViewer id={props.data.id} filePath={props.filePath} />
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
336
|
+
|
|
337
|
+
{
|
|
338
|
+
nodeGraphs.length > 0 &&
|
|
339
|
+
nodeGraphs.map((nodeGraph: any) => {
|
|
340
|
+
const collection = resourceToCollectionMap[nodeGraph.type as keyof typeof resourceToCollectionMap];
|
|
341
|
+
return (
|
|
342
|
+
<NodeGraph
|
|
343
|
+
id={nodeGraph.id}
|
|
344
|
+
version={nodeGraph.version}
|
|
345
|
+
collection={collection}
|
|
346
|
+
title={nodeGraph.title}
|
|
347
|
+
mode="simple"
|
|
348
|
+
linksToVisualiser={true}
|
|
349
|
+
href={{
|
|
350
|
+
label: 'Open in Visualiser',
|
|
351
|
+
url: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
|
|
352
|
+
}}
|
|
353
|
+
/>
|
|
354
|
+
);
|
|
355
|
+
})
|
|
356
|
+
}
|
|
333
357
|
</div>
|
|
334
358
|
<Footer />
|
|
335
359
|
</div>
|
|
@@ -110,6 +110,18 @@ export const resourceToCollectionMap = {
|
|
|
110
110
|
team: 'teams',
|
|
111
111
|
} as const;
|
|
112
112
|
|
|
113
|
+
export const collectionToResourceMap = {
|
|
114
|
+
services: 'service',
|
|
115
|
+
events: 'event',
|
|
116
|
+
commands: 'command',
|
|
117
|
+
queries: 'query',
|
|
118
|
+
domains: 'domain',
|
|
119
|
+
flows: 'flow',
|
|
120
|
+
channels: 'channel',
|
|
121
|
+
users: 'user',
|
|
122
|
+
teams: 'team',
|
|
123
|
+
} as const;
|
|
124
|
+
|
|
113
125
|
export const getDeprecatedDetails = (item: CollectionEntry<CollectionTypes>) => {
|
|
114
126
|
let options = {
|
|
115
127
|
isMarkedAsDeprecated: false,
|