@eventcatalog/core 2.33.12 → 2.34.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.
Files changed (36) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-5THCKFYU.js → chunk-GUCQ43OT.js} +1 -1
  6. package/dist/{chunk-GXZYW6VG.js → chunk-VU6QMU5H.js} +1 -1
  7. package/dist/{chunk-K3CDZR6K.js → chunk-XOPHTY4E.js} +1 -1
  8. package/dist/constants.cjs +1 -1
  9. package/dist/constants.js +1 -1
  10. package/dist/eventcatalog.cjs +1 -1
  11. package/dist/eventcatalog.js +3 -3
  12. package/eventcatalog/src/components/Grids/DomainGrid.tsx +52 -0
  13. package/eventcatalog/src/components/Grids/ServiceGrid.tsx +198 -168
  14. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +40 -16
  15. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Channel.tsx +3 -1
  16. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Command.tsx +3 -1
  17. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Custom.tsx +1 -1
  18. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Event.tsx +13 -2
  19. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Query.tsx +3 -1
  20. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Service.tsx +3 -1
  21. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/User.tsx +1 -1
  22. package/eventcatalog/src/components/MDX/SchemaViewer/SchemaViewerRoot.astro +0 -3
  23. package/eventcatalog/src/components/SideBars/DomainSideBar.astro +47 -2
  24. package/eventcatalog/src/components/SideBars/ServiceSideBar.astro +22 -0
  25. package/eventcatalog/src/components/SideNav/ListViewSideBar/index.tsx +11 -1
  26. package/eventcatalog/src/components/SideNav/ListViewSideBar/types.ts +1 -0
  27. package/eventcatalog/src/components/SideNav/ListViewSideBar/utils.ts +1 -0
  28. package/eventcatalog/src/content.config.ts +1 -0
  29. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +0 -3
  30. package/eventcatalog/src/pages/architecture/architecture.astro +17 -6
  31. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +1 -5
  32. package/eventcatalog/src/pages/docs/teams/[id]/index.astro +100 -102
  33. package/eventcatalog/src/pages/docs/users/[id]/index.astro +4 -12
  34. package/eventcatalog/src/utils/collections/domains.ts +32 -2
  35. package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +31 -2
  36. package/package.json +1 -1
@@ -201,10 +201,15 @@ const NodeGraphBuilder = ({
201
201
  }, [resetNodesAndEdges, fitView]);
202
202
 
203
203
  const handleLegendClick = useCallback(
204
- (collectionType: string) => {
205
- const updatedNodes = nodes.map((node) => {
206
- if (node.type === collectionType) {
204
+ (collectionType: string, groupId?: string) => {
205
+ const updatedNodes = nodes.map((node: Node<any>) => {
206
+ // Check if the groupId is set first
207
+ if (groupId && node.data.group && node.data.group?.id === groupId) {
207
208
  return { ...node, style: { ...node.style, opacity: 1 } };
209
+ } else {
210
+ if (node.type === collectionType) {
211
+ return { ...node, style: { ...node.style, opacity: 1 } };
212
+ }
208
213
  }
209
214
  return { ...node, style: { ...node.style, opacity: 0.1 } };
210
215
  });
@@ -231,7 +236,7 @@ const NodeGraphBuilder = ({
231
236
  [nodes, edges, setNodes, setEdges, fitView]
232
237
  );
233
238
 
234
- const getNodesByCollectionWithColors = useCallback((nodes: Node[]) => {
239
+ const getNodesByCollectionWithColors = useCallback((nodes: Node<any>[]) => {
235
240
  const colorClasses = {
236
241
  events: 'bg-orange-600',
237
242
  services: 'bg-pink-600',
@@ -243,17 +248,36 @@ const NodeGraphBuilder = ({
243
248
  step: 'bg-gray-700',
244
249
  };
245
250
 
246
- return nodes.reduce((acc: { [key: string]: { count: number; colorClass: string } }, node) => {
247
- const collection = node.type;
248
- if (collection) {
249
- if (acc[collection]) {
250
- acc[collection].count += 1;
251
- } else {
252
- acc[collection] = { count: 1, colorClass: colorClasses[collection as keyof typeof colorClasses] || 'bg-black' };
251
+ let legendForDomains: { [key: string]: { count: number; colorClass: string; groupId: string } } = {};
252
+
253
+ // Find any groups
254
+ const domainGroups = [
255
+ ...new Set(
256
+ nodes.filter((node) => node.data.group && node.data.group?.type === 'Domain').map((node) => node.data.group?.id)
257
+ ),
258
+ ];
259
+
260
+ domainGroups.forEach((groupId) => {
261
+ const group = nodes.filter((node) => node.data.group && node.data.group?.id === groupId);
262
+ legendForDomains[`${groupId} (Domain)`] = { count: group.length, colorClass: 'bg-yellow-600', groupId };
263
+ });
264
+
265
+ const legendForNodes = nodes.reduce(
266
+ (acc: { [key: string]: { count: number; colorClass: string; groupId?: string } }, node) => {
267
+ const collection = node.type;
268
+ if (collection) {
269
+ if (acc[collection]) {
270
+ acc[collection].count += 1;
271
+ } else {
272
+ acc[collection] = { count: 1, colorClass: colorClasses[collection as keyof typeof colorClasses] || 'bg-black' };
273
+ }
253
274
  }
254
- }
255
- return acc;
256
- }, {});
275
+ return acc;
276
+ },
277
+ {}
278
+ );
279
+
280
+ return { ...legendForDomains, ...legendForNodes };
257
281
  }, []);
258
282
 
259
283
  const legend = getNodesByCollectionWithColors(nodes);
@@ -351,11 +375,11 @@ const NodeGraphBuilder = ({
351
375
  <Panel position="bottom-right">
352
376
  <div className=" bg-white font-light px-4 text-[12px] shadow-md py-1 rounded-md">
353
377
  <ul className="m-0 p-0 ">
354
- {Object.entries(legend).map(([key, { count, colorClass }]) => (
378
+ {Object.entries(legend).map(([key, { count, colorClass, groupId }]) => (
355
379
  <li
356
380
  key={key}
357
381
  className="flex space-x-2 items-center text-[10px] cursor-pointer hover:text-purple-600 hover:underline"
358
- onClick={() => handleLegendClick(key)}
382
+ onClick={() => handleLegendClick(key, groupId)}
359
383
  >
360
384
  <span className={`w-2 h-2 block ${colorClass}`} />
361
385
  <span className="block capitalize">
@@ -106,7 +106,9 @@ export default function ChannelNode({ data, sourcePosition, targetPosition }: an
106
106
  </div>
107
107
  <div className="flex justify-between">
108
108
  <span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
109
- {mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Channel</span>}
109
+ {mode === 'simple' && (
110
+ <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">{nodeLabel}</span>
111
+ )}
110
112
  </div>
111
113
  </div>
112
114
  {mode === 'full' && (
@@ -54,7 +54,9 @@ export default function CommandNode({ data, sourcePosition, targetPosition }: an
54
54
  <span className="text-xs font-bold block pb-0.5">{name}</span>
55
55
  <div className="flex justify-between">
56
56
  <span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
57
- {mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Command</span>}
57
+ {mode === 'simple' && (
58
+ <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">{nodeLabel}</span>
59
+ )}
58
60
  </div>
59
61
  </div>
60
62
  {mode === 'full' && (
@@ -101,7 +101,7 @@ export default function UserNode({ data, sourcePosition, targetPosition }: any)
101
101
 
102
102
  {(!summary || mode !== 'full') && (
103
103
  <div className="h-full ">
104
- <span className="text-sm font-bold block pb-0.5 block w-full">{title}</span>
104
+ <span className="text-sm font-bold block pb-0.5 w-full">{title}</span>
105
105
  </div>
106
106
  )}
107
107
 
@@ -12,6 +12,10 @@ interface Data {
12
12
  message: CollectionEntry<'events'>;
13
13
  showTarget?: boolean;
14
14
  showSource?: boolean;
15
+ group?: {
16
+ type: string;
17
+ value: string;
18
+ };
15
19
  }
16
20
 
17
21
  function classNames(...classes: any) {
@@ -19,7 +23,7 @@ function classNames(...classes: any) {
19
23
  }
20
24
 
21
25
  export default function EventNode({ data, sourcePosition, targetPosition }: any) {
22
- const { mode, message } = data as Data;
26
+ const { mode, message, group } = data as Data;
23
27
  const { name, version, summary, owners = [], producers = [], consumers = [], styles } = message.data;
24
28
  const { node: { color = 'orange', label } = {}, icon = 'BoltIcon' } = styles || {};
25
29
 
@@ -52,7 +56,9 @@ export default function EventNode({ data, sourcePosition, targetPosition }: any)
52
56
  <span className="text-xs font-bold block pb-0.5">{name}</span>
53
57
  <div className="flex justify-between">
54
58
  <span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
55
- {mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Event</span>}
59
+ {mode === 'simple' && (
60
+ <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">{nodeLabel}</span>
61
+ )}
56
62
  </div>
57
63
  </div>
58
64
  {mode === 'full' && (
@@ -70,6 +76,11 @@ export default function EventNode({ data, sourcePosition, targetPosition }: any)
70
76
  <span className="text-xs" style={{ fontSize: '0.2em' }}>
71
77
  Owners: {owners.length}
72
78
  </span>
79
+ {group && (
80
+ <span className="text-xs" style={{ fontSize: '0.2em' }}>
81
+ {group.type}: {group.value}
82
+ </span>
83
+ )}
73
84
  </div>
74
85
  </div>
75
86
  )}
@@ -53,7 +53,9 @@ export default function QueryNode({ data, sourcePosition, targetPosition }: any)
53
53
  <span className="text-xs font-bold block pb-0.5">{name}</span>
54
54
  <div className="flex justify-between">
55
55
  <span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
56
- {mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Query</span>}
56
+ {mode === 'simple' && (
57
+ <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">{nodeLabel}</span>
58
+ )}
57
59
  </div>
58
60
  </div>
59
61
  {mode === 'full' && (
@@ -59,7 +59,9 @@ export default function ServiceNode({ data, sourcePosition, targetPosition }: an
59
59
  <span className="text-xs font-bold block pt-0.5 pb-0.5">{name}</span>
60
60
  <div className="flex justify-between">
61
61
  <span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
62
- {mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Service</span>}
62
+ {mode === 'simple' && (
63
+ <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">{nodeLabel}</span>
64
+ )}
63
65
  </div>
64
66
  </div>
65
67
  {mode === 'full' && (
@@ -47,7 +47,7 @@ export default function UserNode({ data, sourcePosition, targetPosition }: any)
47
47
 
48
48
  {(!summary || mode !== 'full') && (
49
49
  <div className="h-full ">
50
- <span className="text-sm font-bold block pb-0.5 block w-full">{name}</span>
50
+ <span className="text-sm font-bold block pb-0.5 w-full">{name}</span>
51
51
  {mode === 'simple' && (
52
52
  <div className="w-full text-right">
53
53
  <span className=" w-full text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Event</span>
@@ -83,14 +83,11 @@ try {
83
83
  function moveSchemaViewerToPortal(schema) {
84
84
  const portalId = `${schema.id}-${schema.file}-SchemaViewer-portal`;
85
85
  const schemaViewerContainer = document.getElementById(portalId);
86
- console.log('schemaViewerContainer', schemaViewerContainer);
87
86
  if (schemaViewerContainer) {
88
87
  schemaViewerContainer.appendChild(document.getElementById(`${schema.id}-${schema.file}-SchemaViewer-client`));
89
88
  }
90
89
  }
91
90
 
92
- console.log('schemas', schemas);
93
-
94
91
  // on DOM ready, move the SchemaViewerClient to the portal
95
92
  document.addEventListener('astro:page-load', () => {
96
93
  schemas.forEach(moveSchemaViewerToPortal);
@@ -3,7 +3,7 @@ import OwnersList from '@components/Lists/OwnersList';
3
3
  import PillListFlat from '@components/Lists/PillListFlat';
4
4
  import RepositoryList from '@components/Lists/RepositoryList.astro';
5
5
  import VersionList from '@components/Lists/VersionList.astro';
6
- import { getUbiquitousLanguage, getMessagesForDomain } from '@utils/collections/domains';
6
+ import { getUbiquitousLanguage, getMessagesForDomain, getParentDomains } from '@utils/collections/domains';
7
7
  import CustomSideBarSectionList from '@components/Lists/CustomSideBarSectionList.astro';
8
8
  import { getOwner } from '@utils/collections/owners';
9
9
  import { buildUrl } from '@utils/url-builder';
@@ -18,6 +18,9 @@ const { domain } = Astro.props;
18
18
 
19
19
  // @ts-ignore
20
20
  const services = (domain.data.services as CollectionEntry<'services'>[]) || [];
21
+ // @ts-ignore
22
+ const subDomains = (domain.data.domains as CollectionEntry<'domains'>[]) || [];
23
+
21
24
  const ubiquitousLanguage = await getUbiquitousLanguage(domain);
22
25
  const hasUbiquitousLanguage = ubiquitousLanguage.length > 0;
23
26
  const ubiquitousLanguageDictionary = hasUbiquitousLanguage ? ubiquitousLanguage[0].data.dictionary : [];
@@ -30,6 +33,8 @@ const messagesForDomain = await getMessagesForDomain(domain);
30
33
 
31
34
  const resourceGroups = domain.data?.resourceGroups || [];
32
35
 
36
+ const parentDomains = await getParentDomains(domain);
37
+
33
38
  const serviceList = services.map((p) => ({
34
39
  label: p.data.name,
35
40
  badge: p.collection,
@@ -38,6 +43,22 @@ const serviceList = services.map((p) => ({
38
43
  href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
39
44
  }));
40
45
 
46
+ const subDomainList = subDomains.map((p) => ({
47
+ label: p.data.name,
48
+ badge: p.collection,
49
+ tag: `v${p.data.version}`,
50
+ collection: p.collection,
51
+ href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
52
+ }));
53
+
54
+ const parentDomainList = parentDomains.map((p) => ({
55
+ label: p.data.name,
56
+ badge: p.collection,
57
+ tag: `v${p.data.version}`,
58
+ collection: p.collection,
59
+ href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
60
+ }));
61
+
41
62
  const sendsList = messagesForDomain.sends
42
63
  .sort((a, b) => a.collection.localeCompare(b.collection))
43
64
  .map((p) => ({
@@ -76,6 +97,31 @@ const ownersList = filteredOwners.map((o) => ({
76
97
 
77
98
  <aside class="sticky top-28 left-0 space-y-8 h-full overflow-y-auto py-4">
78
99
  <div>
100
+ {
101
+ parentDomains.length > 0 && (
102
+ <PillListFlat
103
+ title={`Parent domains (${parentDomains.length})`}
104
+ pills={parentDomainList}
105
+ emptyMessage={`This domain does not have any parent domains.`}
106
+ color="pink"
107
+ icon="ServerIcon"
108
+ client:load
109
+ />
110
+ )
111
+ }
112
+
113
+ {
114
+ subDomains.length > 0 && (
115
+ <PillListFlat
116
+ title={`Subdomains (${subDomains.length})`}
117
+ pills={subDomainList}
118
+ emptyMessage={`This domain does not contain any subdomains.`}
119
+ color="pink"
120
+ icon="ServerIcon"
121
+ client:load
122
+ />
123
+ )
124
+ }
79
125
  {
80
126
  resourceGroups
81
127
  .filter((section) => section.items.length > 0 && section.sidebar)
@@ -86,7 +132,6 @@ const ownersList = filteredOwners.map((o) => ({
86
132
  pills={serviceList}
87
133
  emptyMessage={`This domain does not contain any services.`}
88
134
  color="pink"
89
- icon="ServerIcon"
90
135
  client:load
91
136
  />
92
137
  <PillListFlat
@@ -11,6 +11,7 @@ import type { CollectionEntry } from 'astro:content';
11
11
  import { ScrollText, Workflow, FileDownIcon, Code, Link, RssIcon } from 'lucide-react';
12
12
  import { join } from 'node:path';
13
13
  import config from '@config';
14
+ import { getDomainsForService } from '@utils/collections/domains';
14
15
  interface Props {
15
16
  service: CollectionEntry<'services'>;
16
17
  }
@@ -28,6 +29,8 @@ const filteredOwners = owners.filter((o) => o !== undefined);
28
29
 
29
30
  const resourceGroups = service.data?.resourceGroups || [];
30
31
 
32
+ const domainsServiceBelongsTo = await getDomainsForService(service);
33
+
31
34
  const sendsList = sends
32
35
  .sort((a, b) => a.collection.localeCompare(b.collection))
33
36
  .map((p) => ({
@@ -58,6 +61,14 @@ const ownersList = filteredOwners.map((o) => ({
58
61
  href: buildUrl(`/docs/${o.collection}/${o.data.id}`),
59
62
  }));
60
63
 
64
+ const domainList = domainsServiceBelongsTo.map((d) => ({
65
+ label: d.data.name,
66
+ badge: d.collection,
67
+ tag: `v${d.data.version}`,
68
+ collection: d.collection,
69
+ href: buildUrl(`/docs/${d.collection}/${d.data.id}/${d.data.version}`),
70
+ }));
71
+
61
72
  const isRSSEnabled = config.rss?.enabled;
62
73
 
63
74
  // @ts-ignore
@@ -73,6 +84,17 @@ const schemaURL = join(publicPath, schemaFilePath || '');
73
84
  .filter((section) => section.items.length > 0 && section.sidebar)
74
85
  .map((section) => <CustomSideBarSectionList section={section} />)
75
86
  }
87
+ {
88
+ domainList.length > 0 && (
89
+ <PillListFlat
90
+ title={`Domains (${domainList.length})`}
91
+ pills={domainList}
92
+ emptyMessage={`This service does not belong to any domains.`}
93
+ color="orange"
94
+ client:load
95
+ />
96
+ )
97
+ }
76
98
  <PillListFlat
77
99
  title={`Receives Messages (${receivesList.length})`}
78
100
  pills={receivesList}
@@ -249,6 +249,16 @@ const ListViewSideBar: React.FC<ListViewSideBarProps> = ({ resources, currentPat
249
249
  setSearchTerm(e.target.value);
250
250
  }, []);
251
251
 
252
+ const isDomainSubDomain = useMemo(() => {
253
+ return (domain: any) => {
254
+ const domains = data.domains || [];
255
+ return domains.some((d: any) => {
256
+ const subdomains = d.domains || [];
257
+ return subdomains.some((subdomain: any) => subdomain.data.id === domain.id);
258
+ });
259
+ };
260
+ }, [data.domains]);
261
+
252
262
  if (!isInitialized) return null;
253
263
 
254
264
  const hasNoResults =
@@ -301,7 +311,7 @@ const ListViewSideBar: React.FC<ListViewSideBarProps> = ({ resources, currentPat
301
311
  >
302
312
  <span className="truncate">{item.label}</span>
303
313
  <span className="text-yellow-600 ml-2 text-[10px] font-medium bg-yellow-50 px-2 py-0.5 rounded">
304
- DOMAIN
314
+ {isDomainSubDomain(item) ? 'SUBDOMAIN' : 'DOMAIN'}
305
315
  </span>
306
316
  </button>
307
317
  </div>
@@ -30,6 +30,7 @@ interface DomainItem {
30
30
  id: string;
31
31
  name: string;
32
32
  services: any[];
33
+ domains: any[];
33
34
  }
34
35
 
35
36
  interface FlowItem {
@@ -65,6 +65,7 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
65
65
  id: item.data.id,
66
66
  name: item.data.name,
67
67
  services: item.collection === 'domains' ? item.data.services : null,
68
+ domains: item.collection === 'domains' ? item.data.domains : null,
68
69
  sends: sendsWithHref,
69
70
  receives: receivesWithHref,
70
71
  specifications: item.collection === 'services' ? item.data.specifications : null,
@@ -323,6 +323,7 @@ const domains = defineCollection({
323
323
  schema: z
324
324
  .object({
325
325
  services: z.array(pointer).optional(),
326
+ domains: z.array(pointer).optional(),
326
327
  })
327
328
  .merge(baseSchema),
328
329
  });
@@ -130,9 +130,6 @@ const CustomDocsNav: React.FC<CustomDocsNavProps> = ({ sidebarItems }) => {
130
130
 
131
131
  const hasNoResults = debouncedSearchTerm && filteredSidebarItems.length === 0;
132
132
 
133
- console.log('filteredSidebarItems', filteredSidebarItems);
134
- console.log('currentPath', currentPath);
135
-
136
133
  return (
137
134
  <nav ref={navRef} className="h-full text-gray-800 pt-4 overflow-y-auto">
138
135
  <div className="mb-2 px-3 bg-white z-10">
@@ -24,13 +24,14 @@ interface Service extends CollectionEntry<'services'> {
24
24
  const { type, embeded = false } = Astro.props as { type: ValidType; embeded: boolean };
25
25
 
26
26
  // Get data based on type
27
- let items: ExtendedDomain[] | Service[] | CollectionEntry<'commands'>[] | CollectionEntry<CollectionMessageTypes>[] = [];
27
+ let items: Service[] | CollectionEntry<'commands'>[] | CollectionEntry<CollectionMessageTypes>[] = [];
28
+ let domains: ExtendedDomain[] = [];
28
29
 
29
- if (type === 'domains') {
30
+ const getDomainsForArchitecturePages = async () => {
30
31
  const domains = await getDomains({ getAllVersions: false });
31
32
 
32
33
  // Get messages for each domain
33
- items = await Promise.all(
34
+ return Promise.all(
34
35
  domains.map(async (domain) => {
35
36
  const messages = await getMessagesForDomain(domain);
36
37
  // @ts-ignore we have to remove markdown information, as it's all send to the astro components. This reduced the page size.
@@ -43,7 +44,13 @@ if (type === 'domains') {
43
44
  } as ExtendedDomain;
44
45
  })
45
46
  );
46
- } else if (type === 'services') {
47
+ };
48
+
49
+ if (type === 'domains' || type === 'services') {
50
+ domains = await getDomainsForArchitecturePages();
51
+ }
52
+
53
+ if (type === 'services') {
47
54
  const services = await getServices({ getAllVersions: false });
48
55
  let filteredServices = services.map((s) => {
49
56
  // @ts-ignore we have to remove markdown information, as it's all send to the astro components. This reduced the page size.
@@ -71,8 +78,12 @@ if (type === 'domains') {
71
78
  <div class="bg-white min-h-screen">
72
79
  <div class="max-w-[90em] mx-auto">
73
80
  <div class="px-6 py-6" transition:animate={fade({ duration: '0.4s' })}>
74
- {type === 'domains' && <DomainGrid domains={items as ExtendedDomain[]} embeded={embeded} client:load />}
75
- {type === 'services' && <ServiceGrid services={items as unknown as Service[]} embeded={embeded} client:load />}
81
+ {type === 'domains' && <DomainGrid domains={domains} embeded={embeded} client:load />}
82
+ {
83
+ type === 'services' && (
84
+ <ServiceGrid domains={domains} services={items as unknown as Service[]} embeded={embeded} client:load />
85
+ )
86
+ }
76
87
  {
77
88
  type === 'messages' && (
78
89
  <MessageGrid messages={items as CollectionEntry<CollectionMessageTypes>[]} embeded={embeded} client:load />
@@ -46,8 +46,6 @@ const props = Astro.props;
46
46
  let collectionItem = props;
47
47
  const logs = await getChangeLogs(props);
48
48
 
49
- // console.log('logs', logs)
50
-
51
49
  const { data } = props;
52
50
  const latestVersion = data.latestVersion;
53
51
 
@@ -62,11 +60,9 @@ const renderedLogs = logs.map(async (log) => {
62
60
 
63
61
  const logsToRender = await Promise.all(renderedLogs);
64
62
 
65
- // console.log('LOGS TO RENDER', logsToRender);
66
-
67
63
  const logListPromise = logsToRender.map(async (log, index) => {
68
64
  const currentLogVersion = log.data.version;
69
- const previousLogVersion = log.data.version ? getPreviousVersion(log.data.version, data.versions) : '';
65
+ const previousLogVersion = log.data.version ? getPreviousVersion(log.data.version, data.versions || []) : '';
70
66
  return {
71
67
  id: log.id,
72
68
  url: buildUrl(`/docs/${props.collection}/${props.data.id}`),