@eventcatalog/core 3.19.1 → 3.19.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-NXKN2YAU.js → chunk-43676EB5.js} +1 -1
- package/dist/{chunk-XKHNXR3Q.js → chunk-G7RVOVBS.js} +1 -1
- package/dist/{chunk-6OQXRJWI.js → chunk-GZLYTEKP.js} +1 -1
- package/dist/{chunk-26A45SNU.js → chunk-R6VVTGJG.js} +1 -1
- package/dist/{chunk-FK7TCLJJ.js → chunk-SIX2GI6M.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 +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +1 -18
- package/eventcatalog/src/stores/sidebar-store/builders/container.ts +14 -7
- package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +11 -4
- package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +15 -5
- package/eventcatalog/src/stores/sidebar-store/builders/flow.ts +12 -2
- package/eventcatalog/src/stores/sidebar-store/builders/message.ts +14 -7
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +23 -5
- package/eventcatalog/src/stores/sidebar-store/state.ts +56 -8
- package/eventcatalog/src/utils/collections/services.ts +49 -1
- package/package.json +6 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-R6VVTGJG.js";
|
|
4
|
+
import "../chunk-SIX2GI6M.js";
|
|
5
5
|
import "../chunk-4UVFXLPI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-43676EB5.js";
|
|
7
7
|
import "../chunk-5T63CXKU.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
114
114
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
|
-
var version = "3.19.
|
|
117
|
+
var version = "3.19.3";
|
|
118
118
|
|
|
119
119
|
// src/constants.ts
|
|
120
120
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-R6VVTGJG.js";
|
|
10
|
+
import "./chunk-SIX2GI6M.js";
|
|
11
11
|
import "./chunk-4UVFXLPI.js";
|
|
12
12
|
import {
|
|
13
13
|
runMigrations
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
} from "./chunk-3KXCGYET.js";
|
|
23
23
|
import {
|
|
24
24
|
generate
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-G7RVOVBS.js";
|
|
26
26
|
import {
|
|
27
27
|
logger
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GZLYTEKP.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-43676EB5.js";
|
|
32
32
|
import {
|
|
33
33
|
getEventCatalogConfigFile,
|
|
34
34
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-G7RVOVBS.js";
|
|
4
|
+
import "./chunk-GZLYTEKP.js";
|
|
5
|
+
import "./chunk-43676EB5.js";
|
|
6
6
|
import "./chunk-5T63CXKU.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -35,13 +35,7 @@ import { resourceToCollectionMap, collectionToResourceMap, getDeprecatedDetails
|
|
|
35
35
|
import { getSchemasFromResource } from '@utils/collections/schemas';
|
|
36
36
|
import { getIcon } from '@utils/badges';
|
|
37
37
|
import { buildUrl, buildEditUrlForResource } from '@utils/url-builder';
|
|
38
|
-
import {
|
|
39
|
-
isEventCatalogChatEnabled,
|
|
40
|
-
isMarkdownDownloadEnabled,
|
|
41
|
-
isVisualiserEnabled,
|
|
42
|
-
isChangelogEnabled,
|
|
43
|
-
isRSSEnabled,
|
|
44
|
-
} from '@utils/feature';
|
|
38
|
+
import { isEventCatalogChatEnabled, isMarkdownDownloadEnabled, isVisualiserEnabled, isRSSEnabled } from '@utils/feature';
|
|
45
39
|
import { getMDXComponentsByName } from '@utils/markdown';
|
|
46
40
|
|
|
47
41
|
import type { CollectionTypes } from '@types';
|
|
@@ -523,17 +517,6 @@ nodeGraphs.push({
|
|
|
523
517
|
/>
|
|
524
518
|
)
|
|
525
519
|
}
|
|
526
|
-
<!-- Change log link -->
|
|
527
|
-
{
|
|
528
|
-
isChangelogEnabled() && shouldRenderSideBarSection(props, 'changelog') && (
|
|
529
|
-
<a
|
|
530
|
-
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.latestVersion}/changelog`)}
|
|
531
|
-
class="text-xs text-[rgb(var(--ec-page-text-muted))] underline hover:text-[rgb(var(--ec-page-text))]"
|
|
532
|
-
>
|
|
533
|
-
<span class="block">Read changelog →</span>
|
|
534
|
-
</a>
|
|
535
|
-
)
|
|
536
|
-
}
|
|
537
520
|
</div>
|
|
538
521
|
</aside>
|
|
539
522
|
</div>
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
buildDiagramNavItems,
|
|
11
11
|
buildResourceDocsSection,
|
|
12
12
|
} from './shared';
|
|
13
|
-
import { isVisualiserEnabled } from '@utils/feature';
|
|
13
|
+
import { isVisualiserEnabled, isChangelogEnabled } from '@utils/feature';
|
|
14
14
|
|
|
15
15
|
export const buildContainerNode = (
|
|
16
16
|
container: CollectionEntry<'containers'>,
|
|
@@ -62,12 +62,19 @@ export const buildContainerNode = (
|
|
|
62
62
|
badge: 'Container',
|
|
63
63
|
summary: container.data.summary,
|
|
64
64
|
pages: [
|
|
65
|
-
buildQuickReferenceSection(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
buildQuickReferenceSection(
|
|
66
|
+
[
|
|
67
|
+
{
|
|
68
|
+
title: 'Overview',
|
|
69
|
+
href: buildUrl(`/docs/containers/${container.data.id}/${container.data.version}`),
|
|
70
|
+
},
|
|
71
|
+
isChangelogEnabled() &&
|
|
72
|
+
shouldRenderSideBarSection(container, 'changelog') && {
|
|
73
|
+
title: 'Changelog',
|
|
74
|
+
href: buildUrl(`/docs/containers/${container.data.id}/${container.data.version}/changelog`),
|
|
75
|
+
},
|
|
76
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
77
|
+
),
|
|
71
78
|
docsSection,
|
|
72
79
|
renderVisualiser && {
|
|
73
80
|
type: 'group',
|
|
@@ -2,7 +2,7 @@ import type { CollectionEntry } from 'astro:content';
|
|
|
2
2
|
import { buildUrl } from '@utils/url-builder';
|
|
3
3
|
import type { NavNode, ChildRef, ResourceGroupContext } from './shared';
|
|
4
4
|
import { buildQuickReferenceSection, buildOwnersSection, shouldRenderSideBarSection, buildResourceDocsSection } from './shared';
|
|
5
|
-
import { isVisualiserEnabled } from '@utils/feature';
|
|
5
|
+
import { isVisualiserEnabled, isChangelogEnabled } from '@utils/feature';
|
|
6
6
|
import { getItemsFromCollectionByIdAndSemverOrLatest, sortVersioned } from '@utils/collections/util';
|
|
7
7
|
import { getSchemaFormatFromURL } from '@utils/collections/schemas';
|
|
8
8
|
|
|
@@ -96,9 +96,16 @@ export const buildDataProductNode = (
|
|
|
96
96
|
badge: 'Data Product',
|
|
97
97
|
summary: dataProduct.data.summary,
|
|
98
98
|
pages: [
|
|
99
|
-
buildQuickReferenceSection(
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
buildQuickReferenceSection(
|
|
100
|
+
[
|
|
101
|
+
{ title: 'Overview', href: buildUrl(`/docs/data-products/${dataProduct.data.id}/${dataProduct.data.version}`) },
|
|
102
|
+
isChangelogEnabled() &&
|
|
103
|
+
shouldRenderSideBarSection(dataProduct, 'changelog') && {
|
|
104
|
+
title: 'Changelog',
|
|
105
|
+
href: buildUrl(`/docs/data-products/${dataProduct.data.id}/${dataProduct.data.version}/changelog`),
|
|
106
|
+
},
|
|
107
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
108
|
+
),
|
|
102
109
|
docsSection,
|
|
103
110
|
renderVisualiser && {
|
|
104
111
|
type: 'group',
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
buildDiagramNavItems,
|
|
12
12
|
buildResourceDocsSection,
|
|
13
13
|
} from './shared';
|
|
14
|
-
import { isVisualiserEnabled } from '@utils/feature';
|
|
14
|
+
import { isVisualiserEnabled, isChangelogEnabled } from '@utils/feature';
|
|
15
15
|
import { pluralizeMessageType } from '@utils/collections/messages';
|
|
16
16
|
import { getSpecificationsForDomain } from '@utils/collections/domains';
|
|
17
17
|
|
|
@@ -74,10 +74,20 @@ export const buildDomainNode = (domain: CollectionEntry<'domains'>, owners: any[
|
|
|
74
74
|
badge: 'Domain',
|
|
75
75
|
summary: domain.data.summary,
|
|
76
76
|
pages: [
|
|
77
|
-
buildQuickReferenceSection(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
buildQuickReferenceSection(
|
|
78
|
+
[
|
|
79
|
+
{ title: 'Overview', href: buildUrl(`/docs/domains/${domain.data.id}/${domain.data.version}`) },
|
|
80
|
+
renderUbiquitousLanguage && {
|
|
81
|
+
title: 'Ubiquitous Language',
|
|
82
|
+
href: buildUrl(`/docs/domains/${domain.data.id}/language`),
|
|
83
|
+
},
|
|
84
|
+
isChangelogEnabled() &&
|
|
85
|
+
shouldRenderSideBarSection(domain, 'changelog') && {
|
|
86
|
+
title: 'Changelog',
|
|
87
|
+
href: buildUrl(`/docs/domains/${domain.data.id}/${domain.data.version}/changelog`),
|
|
88
|
+
},
|
|
89
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
90
|
+
),
|
|
81
91
|
docsSection,
|
|
82
92
|
{
|
|
83
93
|
type: 'group',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CollectionEntry } from 'astro:content';
|
|
2
2
|
import { buildUrl } from '@utils/url-builder';
|
|
3
3
|
import type { NavNode, ChildRef, ResourceGroupContext } from './shared';
|
|
4
|
-
import { buildQuickReferenceSection, buildResourceDocsSection } from './shared';
|
|
4
|
+
import { buildQuickReferenceSection, buildResourceDocsSection, shouldRenderSideBarSection } from './shared';
|
|
5
|
+
import { isChangelogEnabled } from '@utils/feature';
|
|
5
6
|
|
|
6
7
|
export const buildFlowNode = (flow: CollectionEntry<'flows'>, context: ResourceGroupContext): NavNode => {
|
|
7
8
|
const docsSection = buildResourceDocsSection(
|
|
@@ -19,7 +20,16 @@ export const buildFlowNode = (flow: CollectionEntry<'flows'>, context: ResourceG
|
|
|
19
20
|
badge: 'Flow',
|
|
20
21
|
summary: flow.data.summary,
|
|
21
22
|
pages: [
|
|
22
|
-
buildQuickReferenceSection(
|
|
23
|
+
buildQuickReferenceSection(
|
|
24
|
+
[
|
|
25
|
+
{ title: 'Overview', href: buildUrl(`/docs/flows/${flow.data.id}/${flow.data.version}`) },
|
|
26
|
+
isChangelogEnabled() &&
|
|
27
|
+
shouldRenderSideBarSection(flow, 'changelog') && {
|
|
28
|
+
title: 'Changelog',
|
|
29
|
+
href: buildUrl(`/docs/flows/${flow.data.id}/${flow.data.version}/changelog`),
|
|
30
|
+
},
|
|
31
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
32
|
+
),
|
|
23
33
|
docsSection,
|
|
24
34
|
{
|
|
25
35
|
type: 'group',
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
buildDiagramNavItems,
|
|
12
12
|
buildResourceDocsSection,
|
|
13
13
|
} from './shared';
|
|
14
|
-
import { isVisualiserEnabled } from '@utils/feature';
|
|
14
|
+
import { isVisualiserEnabled, isChangelogEnabled } from '@utils/feature';
|
|
15
15
|
|
|
16
16
|
export const buildMessageNode = (
|
|
17
17
|
message: CollectionEntry<'events' | 'commands' | 'queries'>,
|
|
@@ -59,12 +59,19 @@ export const buildMessageNode = (
|
|
|
59
59
|
badge,
|
|
60
60
|
summary: message.data.summary,
|
|
61
61
|
pages: [
|
|
62
|
-
buildQuickReferenceSection(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
buildQuickReferenceSection(
|
|
63
|
+
[
|
|
64
|
+
{
|
|
65
|
+
title: 'Overview',
|
|
66
|
+
href: buildUrl(`/docs/${collection}/${message.data.id}/${message.data.version}`),
|
|
67
|
+
},
|
|
68
|
+
isChangelogEnabled() &&
|
|
69
|
+
shouldRenderSideBarSection(message, 'changelog') && {
|
|
70
|
+
title: 'Changelog',
|
|
71
|
+
href: buildUrl(`/docs/${collection}/${message.data.id}/${message.data.version}/changelog`),
|
|
72
|
+
},
|
|
73
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
74
|
+
),
|
|
68
75
|
docsSection,
|
|
69
76
|
renderVisualiser && {
|
|
70
77
|
type: 'group',
|
|
@@ -13,10 +13,15 @@ import {
|
|
|
13
13
|
buildDiagramNavItems,
|
|
14
14
|
buildResourceDocsSection,
|
|
15
15
|
} from './shared';
|
|
16
|
-
import { isVisualiserEnabled } from '@utils/feature';
|
|
16
|
+
import { isVisualiserEnabled, isChangelogEnabled } from '@utils/feature';
|
|
17
17
|
import { pluralizeMessageType } from '@utils/collections/messages';
|
|
18
18
|
|
|
19
|
-
export const buildServiceNode = (
|
|
19
|
+
export const buildServiceNode = (
|
|
20
|
+
service: CollectionEntry<'services'>,
|
|
21
|
+
owners: any[],
|
|
22
|
+
context: ResourceGroupContext,
|
|
23
|
+
serviceChannels: CollectionEntry<'channels'>[] = []
|
|
24
|
+
): NavNode => {
|
|
20
25
|
const sendsMessages = service.data.sends || [];
|
|
21
26
|
const receivesMessages = service.data.receives || [];
|
|
22
27
|
const serviceEntities = service.data.entities || [];
|
|
@@ -64,9 +69,16 @@ export const buildServiceNode = (service: CollectionEntry<'services'>, owners: a
|
|
|
64
69
|
badge: 'Service',
|
|
65
70
|
summary: service.data.summary,
|
|
66
71
|
pages: [
|
|
67
|
-
buildQuickReferenceSection(
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
buildQuickReferenceSection(
|
|
73
|
+
[
|
|
74
|
+
{ title: 'Overview', href: buildUrl(`/docs/services/${service.data.id}/${service.data.version}`) },
|
|
75
|
+
isChangelogEnabled() &&
|
|
76
|
+
shouldRenderSideBarSection(service, 'changelog') && {
|
|
77
|
+
title: 'Changelog',
|
|
78
|
+
href: buildUrl(`/docs/services/${service.data.id}/${service.data.version}/changelog`),
|
|
79
|
+
},
|
|
80
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
81
|
+
),
|
|
70
82
|
docsSection,
|
|
71
83
|
{
|
|
72
84
|
type: 'group',
|
|
@@ -165,6 +177,12 @@ export const buildServiceNode = (service: CollectionEntry<'services'>, owners: a
|
|
|
165
177
|
(receive) => `${pluralizeMessageType(receive as any)}:${(receive as any).data.id}:${(receive as any).data.version}`
|
|
166
178
|
),
|
|
167
179
|
},
|
|
180
|
+
serviceChannels.length > 0 && {
|
|
181
|
+
type: 'group',
|
|
182
|
+
title: 'Channels',
|
|
183
|
+
icon: 'ArrowRightLeft',
|
|
184
|
+
pages: serviceChannels.map((channel) => `channel:${(channel as any).data.id}:${(channel as any).data.version}`),
|
|
185
|
+
},
|
|
168
186
|
hasFlows && {
|
|
169
187
|
type: 'group',
|
|
170
188
|
title: 'Flows',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getCollection } from 'astro:content';
|
|
2
|
+
import type { CollectionEntry } from 'astro:content';
|
|
1
3
|
import { getContainers } from '@utils/collections/containers';
|
|
2
4
|
import { getDomains } from '@utils/collections/domains';
|
|
3
5
|
import { getServices } from '@utils/collections/services';
|
|
@@ -20,7 +22,9 @@ import { buildDataProductNode } from './builders/data-product';
|
|
|
20
22
|
import config from '@config';
|
|
21
23
|
import { getDesigns } from '@utils/collections/designs';
|
|
22
24
|
import { getChannels } from '@utils/collections/channels';
|
|
23
|
-
import {
|
|
25
|
+
import { createVersionedMap, findInMap } from '@utils/collections/util';
|
|
26
|
+
import { buildQuickReferenceSection, buildResourceDocsSection, shouldRenderSideBarSection } from './builders/shared';
|
|
27
|
+
import { isChangelogEnabled } from '@utils/feature';
|
|
24
28
|
|
|
25
29
|
export type { NavigationData, NavNode, ChildRef };
|
|
26
30
|
|
|
@@ -149,10 +153,47 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
149
153
|
{} as Record<string, NavNode | string>
|
|
150
154
|
);
|
|
151
155
|
|
|
156
|
+
// Compute channels for each service from raw sends[].to / receives[].from pointers
|
|
157
|
+
const rawServices = await getCollection('services');
|
|
158
|
+
const channelMap = createVersionedMap(channels);
|
|
159
|
+
const serviceChannelsMap = new Map<string, CollectionEntry<'channels'>[]>();
|
|
160
|
+
|
|
161
|
+
for (const service of services) {
|
|
162
|
+
const rawService = rawServices.find((s) => s.data.id === service.data.id && s.data.version === service.data.version);
|
|
163
|
+
if (!rawService) continue;
|
|
164
|
+
|
|
165
|
+
const pointers: Array<{ id: string; version?: string }> = [];
|
|
166
|
+
for (const send of rawService.data.sends ?? []) {
|
|
167
|
+
for (const ch of send.to ?? []) {
|
|
168
|
+
pointers.push({ id: ch.id, version: ch.version });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
for (const receive of rawService.data.receives ?? []) {
|
|
172
|
+
for (const ch of receive.from ?? []) {
|
|
173
|
+
pointers.push({ id: ch.id, version: ch.version });
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const seen = new Set<string>();
|
|
178
|
+
const resolved: CollectionEntry<'channels'>[] = [];
|
|
179
|
+
for (const pointer of pointers) {
|
|
180
|
+
const key = `${pointer.id}-${pointer.version ?? 'latest'}`;
|
|
181
|
+
if (seen.has(key)) continue;
|
|
182
|
+
seen.add(key);
|
|
183
|
+
const match = findInMap(channelMap, pointer.id, pointer.version);
|
|
184
|
+
if (match) resolved.push(match as CollectionEntry<'channels'>);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (resolved.length > 0) {
|
|
188
|
+
serviceChannelsMap.set(`${service.data.id}:${service.data.version}`, resolved);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
152
192
|
const serviceNodes = servicesWithOwners.reduce(
|
|
153
193
|
(acc, { service, owners }) => {
|
|
154
194
|
const versionedKey = `service:${service.data.id}:${service.data.version}`;
|
|
155
|
-
|
|
195
|
+
const serviceChannels = serviceChannelsMap.get(`${service.data.id}:${service.data.version}`) || [];
|
|
196
|
+
acc[versionedKey] = buildServiceNode(service, owners, context, serviceChannels);
|
|
156
197
|
if (service.data.latestVersion === service.data.version) {
|
|
157
198
|
// Store reference to versioned key instead of duplicating the full node
|
|
158
199
|
acc[`service:${service.data.id}`] = versionedKey;
|
|
@@ -261,12 +302,19 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
261
302
|
badge: 'Channel',
|
|
262
303
|
summary: channel.data.summary,
|
|
263
304
|
pages: [
|
|
264
|
-
buildQuickReferenceSection(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
305
|
+
buildQuickReferenceSection(
|
|
306
|
+
[
|
|
307
|
+
{
|
|
308
|
+
title: 'Overview',
|
|
309
|
+
href: buildUrl(`/docs/${channel.collection}/${channel.data.id}/${channel.data.version}`),
|
|
310
|
+
},
|
|
311
|
+
isChangelogEnabled() &&
|
|
312
|
+
shouldRenderSideBarSection(channel, 'changelog') && {
|
|
313
|
+
title: 'Changelog',
|
|
314
|
+
href: buildUrl(`/docs/${channel.collection}/${channel.data.id}/${channel.data.version}/changelog`),
|
|
315
|
+
},
|
|
316
|
+
].filter(Boolean) as { title: string; href: string }[]
|
|
317
|
+
),
|
|
270
318
|
docsSection,
|
|
271
319
|
].filter(Boolean) as ChildRef[],
|
|
272
320
|
};
|
|
@@ -3,7 +3,14 @@ import type { CollectionEntry } from 'astro:content';
|
|
|
3
3
|
import semver from 'semver';
|
|
4
4
|
import type { CollectionMessageTypes, CollectionTypes } from '@types';
|
|
5
5
|
import { getDomains, getDomainsForService } from './domains';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
createVersionedMap,
|
|
8
|
+
findInMap,
|
|
9
|
+
versionMatches,
|
|
10
|
+
processSpecifications,
|
|
11
|
+
getItemsFromCollectionByIdAndSemverOrLatest,
|
|
12
|
+
} from '@utils/collections/util';
|
|
13
|
+
import { getChannels } from './channels';
|
|
7
14
|
|
|
8
15
|
export type Service = CollectionEntry<'services'>;
|
|
9
16
|
|
|
@@ -182,6 +189,47 @@ export const getProducersAndConsumersForChannel = async (channel: CollectionEntr
|
|
|
182
189
|
consumers: consumers ?? [],
|
|
183
190
|
};
|
|
184
191
|
};
|
|
192
|
+
export const getChannelsForService = async (serviceId: string, version?: string): Promise<CollectionEntry<'channels'>[]> => {
|
|
193
|
+
const allServices = await getCollection('services');
|
|
194
|
+
const allChannels = await getChannels({ getAllVersions: true });
|
|
195
|
+
|
|
196
|
+
const matched = getItemsFromCollectionByIdAndSemverOrLatest(allServices, serviceId, version);
|
|
197
|
+
const service = matched[0];
|
|
198
|
+
if (!service) return [];
|
|
199
|
+
|
|
200
|
+
const sends = service.data.sends ?? [];
|
|
201
|
+
const receives = service.data.receives ?? [];
|
|
202
|
+
|
|
203
|
+
const channelPointers: Array<{ id: string; version?: string }> = [];
|
|
204
|
+
|
|
205
|
+
for (const send of sends) {
|
|
206
|
+
for (const channel of send.to ?? []) {
|
|
207
|
+
channelPointers.push({ id: channel.id, version: channel.version });
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
for (const receive of receives) {
|
|
212
|
+
for (const channel of receive.from ?? []) {
|
|
213
|
+
channelPointers.push({ id: channel.id, version: channel.version });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const channelMap = createVersionedMap(allChannels);
|
|
218
|
+
const seen = new Set<string>();
|
|
219
|
+
const channels: CollectionEntry<'channels'>[] = [];
|
|
220
|
+
|
|
221
|
+
for (const pointer of channelPointers) {
|
|
222
|
+
const key = `${pointer.id}-${pointer.version ?? 'latest'}`;
|
|
223
|
+
if (seen.has(key)) continue;
|
|
224
|
+
seen.add(key);
|
|
225
|
+
|
|
226
|
+
const match = findInMap(channelMap, pointer.id, pointer.version);
|
|
227
|
+
if (match) channels.push(match as CollectionEntry<'channels'>);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return channels;
|
|
231
|
+
};
|
|
232
|
+
|
|
185
233
|
export const getServicesNotInAnyDomain = async (): Promise<Service[]> => {
|
|
186
234
|
const services = await getServices({ getAllVersions: false });
|
|
187
235
|
|
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": "3.19.
|
|
9
|
+
"version": "3.19.3",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"@astrojs/node": "^9.5.4",
|
|
27
27
|
"@astrojs/react": "^4.4.2",
|
|
28
28
|
"@astrojs/rss": "^4.0.15",
|
|
29
|
-
"@tailwindcss/vite": "^4.1.5",
|
|
30
29
|
"@asyncapi/avro-schema-parser": "3.0.24",
|
|
31
30
|
"@asyncapi/parser": "3.6.0",
|
|
32
31
|
"@asyncapi/react-component": "3.0.2",
|
|
@@ -47,10 +46,11 @@
|
|
|
47
46
|
"@radix-ui/react-tooltip": "^1.1.8",
|
|
48
47
|
"@scalar/api-reference-react": "^0.4.37",
|
|
49
48
|
"@tailwindcss/typography": "^0.5.16",
|
|
49
|
+
"@tailwindcss/vite": "^4.1.5",
|
|
50
50
|
"@tanstack/react-table": "^8.17.3",
|
|
51
51
|
"@xyflow/react": "^12.3.6",
|
|
52
52
|
"ai": "^6.0.17",
|
|
53
|
-
"astro": "^5.
|
|
53
|
+
"astro": "^5.18.0",
|
|
54
54
|
"astro-compress": "^2.3.8",
|
|
55
55
|
"astro-expressive-code": "^0.41.3",
|
|
56
56
|
"astro-seo": "^0.8.4",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"update-notifier": "^7.3.1",
|
|
102
102
|
"uuid": "^10.0.0",
|
|
103
103
|
"zod": "^3.25.0",
|
|
104
|
-
"@eventcatalog/
|
|
105
|
-
"@eventcatalog/
|
|
106
|
-
"@eventcatalog/visualiser": "^3.15.
|
|
104
|
+
"@eventcatalog/sdk": "2.16.0",
|
|
105
|
+
"@eventcatalog/linter": "1.0.9",
|
|
106
|
+
"@eventcatalog/visualiser": "^3.15.3"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@astrojs/check": "^0.9.6",
|