@eventcatalog/core 2.39.1 → 2.39.2
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-UXUHWEGF.js → chunk-MYIRODAL.js} +1 -1
- package/dist/{chunk-NM2UM3ZE.js → chunk-UMDTA3ST.js} +1 -1
- package/dist/{chunk-L4LXL56Q.js → chunk-ZCL3ECGU.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/components/SideNav/ListViewSideBar/utils.ts +6 -0
- package/eventcatalog/src/content.config.ts +1 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +7 -2
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +13 -11
- package/eventcatalog/src/pages/visualiser/[type]/[id]/index.astro +4 -1
- 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-ZCL3ECGU.js";
|
|
4
|
+
import "../chunk-UMDTA3ST.js";
|
|
5
|
+
import "../chunk-MYIRODAL.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-ZCL3ECGU.js";
|
|
10
|
+
import "./chunk-UMDTA3ST.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-MYIRODAL.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled,
|
|
20
20
|
isEventCatalogScaleEnabled,
|
|
@@ -57,6 +57,11 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
|
|
|
57
57
|
href: buildUrl(`/${route}/${entity.collection}/${entity.data.id}/${entity.data.version}`),
|
|
58
58
|
}));
|
|
59
59
|
|
|
60
|
+
// don't render items if we are in the visualiser and the item has visualiser set to false
|
|
61
|
+
if (currentPath.includes('visualiser') && item.data.visualiser === false) {
|
|
62
|
+
return acc;
|
|
63
|
+
}
|
|
64
|
+
|
|
60
65
|
const navigationItem = {
|
|
61
66
|
label: item.data.name,
|
|
62
67
|
version: item.data.version,
|
|
@@ -78,6 +83,7 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
|
|
|
78
83
|
entities: entitiesWithHref,
|
|
79
84
|
specifications: isCollectionService ? getSpecificationsForService(item) : null,
|
|
80
85
|
sidebar: item.data?.sidebar,
|
|
86
|
+
renderInVisualiser: item.data?.visualiser ?? true,
|
|
81
87
|
};
|
|
82
88
|
|
|
83
89
|
group.push(navigationItem);
|
|
@@ -70,8 +70,13 @@ const getDefaultUrl = (route: string, defaultValue: string) => {
|
|
|
70
70
|
|
|
71
71
|
for (const { data, key } of collections) {
|
|
72
72
|
if (data.length > 0 && isCollectionVisibleInCatalog(key)) {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
// find the first item that has visualiser set to true
|
|
74
|
+
const item = data.find((item) => item.data.visualiser !== false);
|
|
75
|
+
if (item) {
|
|
76
|
+
return buildUrl(`/${route}/${key}/${item.data.id}/${item.data.latestVersion}`);
|
|
77
|
+
} else {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
|
|
@@ -19,17 +19,19 @@ export async function getStaticPaths() {
|
|
|
19
19
|
const allItems = await Promise.all(itemTypes.map((type) => loaders[type]()));
|
|
20
20
|
|
|
21
21
|
return allItems.flatMap((items, index) =>
|
|
22
|
-
items
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
items
|
|
23
|
+
.filter((item) => item.data.visualiser !== false)
|
|
24
|
+
.map((item) => ({
|
|
25
|
+
params: {
|
|
26
|
+
type: itemTypes[index],
|
|
27
|
+
id: item.data.id,
|
|
28
|
+
version: item.data.version,
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
type: itemTypes[index],
|
|
32
|
+
...item,
|
|
33
|
+
},
|
|
34
|
+
}))
|
|
33
35
|
);
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -11,6 +11,9 @@ import type { CollectionTypes } from '@types';
|
|
|
11
11
|
export async function getStaticPaths() {
|
|
12
12
|
const [events, commands, services, domains] = await Promise.all([getEvents(), getCommands(), getServices(), getDomains()]);
|
|
13
13
|
|
|
14
|
+
const resources = [...domains, ...events, ...services, ...commands];
|
|
15
|
+
const resourcesWithVisualiserEnabled = resources.filter((resource) => resource.data.visualiser !== false);
|
|
16
|
+
|
|
14
17
|
const buildPages = (collection: CollectionEntry<CollectionTypes>[]) => {
|
|
15
18
|
return collection.map((item) => ({
|
|
16
19
|
params: {
|
|
@@ -24,7 +27,7 @@ export async function getStaticPaths() {
|
|
|
24
27
|
}));
|
|
25
28
|
};
|
|
26
29
|
|
|
27
|
-
return [...buildPages(
|
|
30
|
+
return [...buildPages(resourcesWithVisualiserEnabled)];
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
const props = Astro.props;
|