@eventcatalog/core 5.7.2 → 5.7.5
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-OR4VBY3F.js → chunk-3I4MO4G6.js} +1 -1
- package/dist/{chunk-B3FUBDJN.js → chunk-NNR5RP47.js} +1 -1
- package/dist/{chunk-EPI5BHEU.js → chunk-Q6ZCTZM3.js} +1 -1
- package/dist/{chunk-TYZENGGJ.js → chunk-SAB3WVWU.js} +1 -1
- package/dist/{chunk-NNTWQNQ5.js → chunk-SR6NZ4QL.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/01-what-is-eventcatalog-assistant.md +8 -0
- package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/02-configuration.md +24 -0
- package/dist/docs/development/guides/domains/06-visualize-domains/01-domain-diagram.md +2 -1
- package/dist/docs/development/studio/01-introduction.md +2 -1
- package/dist/docs/development/studio/04-collaborate-on-a-canvas.md +10 -2
- package/dist/docs/development/studio/05-connect-your-agent.md +4 -0
- package/dist/docs/development/studio/07-reference.md +40 -7
- package/dist/docs/development/studio/draw-with-ai.md +96 -0
- 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/components/MDX/Steps/Step.astro +4 -2
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +2 -103
- package/eventcatalog/src/components/SchemaExplorer/diff-dark-styles.ts +104 -0
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +68 -68
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/_ChangelogPage.astro +297 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/_index.data.spec.ts +101 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/_index.data.ts +76 -47
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +4 -168
- package/eventcatalog/src/pages/docs/services/[id]/[version]/changelog/index.astro +14 -0
- package/eventcatalog/src/pages/docs/services/[id]/changelog/index.astro +3 -3
- package/eventcatalog/src/utils/node-graphs/channel-node-graph.ts +2 -2
- package/eventcatalog/src/utils/node-graphs/domain-levels-node-graph.ts +248 -71
- package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +0 -87
- package/package.json +3 -3
|
@@ -1,176 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
3
|
-
import { getChangeLogs } from '@utils/collections/changelogs';
|
|
4
|
-
import { getChangelogResourceBadge } from '@utils/changelog-resource-badge';
|
|
5
|
-
import { render, getEntry } from 'astro:content';
|
|
6
|
-
import mdxComponents from '@components/MDX/components';
|
|
7
|
-
import 'diff2html/bundles/css/diff2html.min.css';
|
|
8
|
-
|
|
9
|
-
import { buildUrl } from '@utils/url-builder';
|
|
10
|
-
import { getPreviousVersion } from '@utils/collections/util';
|
|
11
|
-
import { getDiffsForCurrentAndPreviousVersion } from '@utils/file-diffs';
|
|
12
|
-
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
13
|
-
import Badge from '@components/Badge.astro';
|
|
14
|
-
import { ClientRouter } from 'astro:transitions';
|
|
15
|
-
|
|
2
|
+
import ChangelogPage from './_ChangelogPage.astro';
|
|
16
3
|
import { Page } from './_index.data';
|
|
17
4
|
|
|
18
5
|
export const prerender = Page.prerender;
|
|
19
6
|
export const getStaticPaths = Page.getStaticPaths;
|
|
20
7
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (!props) return Astro.rewrite('/404');
|
|
24
|
-
|
|
25
|
-
let collectionItem = props;
|
|
26
|
-
const logs = await getChangeLogs(props);
|
|
27
|
-
|
|
28
|
-
const { data } = props;
|
|
29
|
-
const latestVersion = data.latestVersion;
|
|
30
|
-
|
|
31
|
-
const renderedLogs = logs.map(async (log) => {
|
|
32
|
-
const logEntry = await getEntry('changelogs', log.id);
|
|
33
|
-
const { Content } = await render(logEntry as any);
|
|
34
|
-
return {
|
|
35
|
-
Content,
|
|
36
|
-
...log,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const logsToRender = await Promise.all(renderedLogs);
|
|
41
|
-
|
|
42
|
-
const logListPromise = logsToRender.map(async (log, index) => {
|
|
43
|
-
const currentLogVersion = log.data.version;
|
|
44
|
-
const previousLogVersion = log.data.version ? getPreviousVersion(log.data.version, data.versions || []) : '';
|
|
45
|
-
return {
|
|
46
|
-
id: log.id,
|
|
47
|
-
url: buildUrl(`/docs/${props.collection}/${props.data.id}`),
|
|
48
|
-
isLatest: log.data.version === latestVersion,
|
|
49
|
-
version: log.data.version,
|
|
50
|
-
createdAt: log.data.createdAt,
|
|
51
|
-
badges: log.data.badges || [],
|
|
52
|
-
Content: log.Content,
|
|
53
|
-
diffs:
|
|
54
|
-
currentLogVersion && previousLogVersion
|
|
55
|
-
? await getDiffsForCurrentAndPreviousVersion(
|
|
56
|
-
currentLogVersion,
|
|
57
|
-
previousLogVersion,
|
|
58
|
-
collectionItem.data.id,
|
|
59
|
-
props.allCollectionItems
|
|
60
|
-
)
|
|
61
|
-
: [],
|
|
62
|
-
};
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const logList = await Promise.all(logListPromise);
|
|
66
|
-
|
|
67
|
-
const badges = [getChangelogResourceBadge(props.collection)].filter((badge) => badge != null);
|
|
8
|
+
const changelogOwner = await Page.getData(Astro);
|
|
9
|
+
if (!changelogOwner) return Astro.rewrite('/404');
|
|
68
10
|
---
|
|
69
11
|
|
|
70
|
-
<
|
|
71
|
-
<main class="w-full md:pt-4 px-8 overflow-y-auto h-full max-w-[95%]">
|
|
72
|
-
<nav aria-label="Breadcrumb" class="flex">
|
|
73
|
-
<ol role="list" class="flex items-center space-x-2">
|
|
74
|
-
<li>
|
|
75
|
-
<div>
|
|
76
|
-
<a
|
|
77
|
-
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`)}
|
|
78
|
-
class="text-sm font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))]"
|
|
79
|
-
>
|
|
80
|
-
{props.data.name}
|
|
81
|
-
</a>
|
|
82
|
-
</div>
|
|
83
|
-
</li>
|
|
84
|
-
<li>
|
|
85
|
-
<div class="flex items-center">
|
|
86
|
-
<svg
|
|
87
|
-
fill="currentColor"
|
|
88
|
-
viewBox="0 0 20 20"
|
|
89
|
-
aria-hidden="true"
|
|
90
|
-
class="h-5 w-5 flex-shrink-0 text-[rgb(var(--ec-page-border))]"
|
|
91
|
-
>
|
|
92
|
-
<path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z"></path>
|
|
93
|
-
</svg>
|
|
94
|
-
<a
|
|
95
|
-
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`)}
|
|
96
|
-
class="text-sm font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))]"
|
|
97
|
-
>
|
|
98
|
-
Changelog
|
|
99
|
-
</a>
|
|
100
|
-
</div>
|
|
101
|
-
</li>
|
|
102
|
-
</ol>
|
|
103
|
-
</nav>
|
|
104
|
-
<div class="border-b border-[rgb(var(--ec-page-border))] flex justify-between items-start py-4 w-full">
|
|
105
|
-
<div>
|
|
106
|
-
<h2 class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">{props.data.name} (Changelog)</h2>
|
|
107
|
-
<h2 class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</h2>
|
|
108
|
-
{
|
|
109
|
-
badges.length > 0 && (
|
|
110
|
-
<div class="flex flex-wrap py-2 pt-4">
|
|
111
|
-
{badges.map((badge) => (
|
|
112
|
-
<Badge badge={badge} className="mr-2 px-2 py-1 rounded-md" />
|
|
113
|
-
))}
|
|
114
|
-
</div>
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
{
|
|
120
|
-
logList.length === 0 && (
|
|
121
|
-
<div class="py-4 text-[rgb(var(--ec-page-text-muted))] prose prose-md">
|
|
122
|
-
<p>No changelogs found.</p>
|
|
123
|
-
</div>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
<div class="flow-root py-8 w-full">
|
|
127
|
-
<ul role="list" class="-mb-8">
|
|
128
|
-
{
|
|
129
|
-
logList.map((log, index) => (
|
|
130
|
-
<li>
|
|
131
|
-
<div class="relative pb-8">
|
|
132
|
-
{index !== logList.length - 1 ? (
|
|
133
|
-
<span aria-hidden="true" class="absolute left-6 top-4 -ml-px h-full w-0.5 bg-[rgb(var(--ec-page-border))]" />
|
|
134
|
-
) : null}
|
|
135
|
-
<div class="relative flex space-x-3">
|
|
136
|
-
<div>
|
|
137
|
-
<a
|
|
138
|
-
href={buildUrl(`${log.url}/${log.version}`)}
|
|
139
|
-
class="bg-primary hover:bg-primary/80 text-white flex h-8 w-14 items-center justify-center rounded-full ring-8 ring-[rgb(var(--ec-page-bg))]"
|
|
140
|
-
>
|
|
141
|
-
{log.version}
|
|
142
|
-
</a>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="pl-[70px] py-2 -mt-10">
|
|
146
|
-
{log.createdAt && (
|
|
147
|
-
<div class="pb-2">
|
|
148
|
-
<h3 class="text-2xl text-[rgb(var(--ec-page-text))] font-bold">
|
|
149
|
-
<span>
|
|
150
|
-
{log.createdAt.toISOString().split('T')[0]} {`${log.isLatest ? '(latest)' : ''}`}
|
|
151
|
-
</span>
|
|
152
|
-
</h3>
|
|
153
|
-
</div>
|
|
154
|
-
)}
|
|
155
|
-
{log.badges && (
|
|
156
|
-
<div class="flex flex-wrap">
|
|
157
|
-
{log.badges.filter(Boolean).map((badge: any) => (
|
|
158
|
-
<Badge badge={badge} className="mr-2 px-2 py-1 rounded-md" />
|
|
159
|
-
))}
|
|
160
|
-
</div>
|
|
161
|
-
)}
|
|
162
|
-
<div class="prose prose-md max-w-none! py-2">
|
|
163
|
-
<log.Content components={mdxComponents(props)} />
|
|
164
|
-
</div>
|
|
165
|
-
{log.diffs && log.diffs.map((diff) => <div class="bg-white rounded-lg p-2 my-2" set:html={diff} />)}
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</li>
|
|
169
|
-
))
|
|
170
|
-
}
|
|
171
|
-
</ul>
|
|
172
|
-
</div>
|
|
173
|
-
<Footer />
|
|
174
|
-
</main>
|
|
175
|
-
<ClientRouter />
|
|
176
|
-
</VerticalSideBarLayout>
|
|
12
|
+
<ChangelogPage changelogOwner={changelogOwner} />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Services need their own Changelog route: /docs/services/[id]/[docType]/[docId] outranks
|
|
3
|
+
// the generic /docs/[type]/[id]/[version]/changelog route and would catch these URLs.
|
|
4
|
+
import ChangelogPage from '../../../../[type]/[id]/[version]/changelog/_ChangelogPage.astro';
|
|
5
|
+
import { ServicePage } from '../../../../[type]/[id]/[version]/changelog/_index.data';
|
|
6
|
+
|
|
7
|
+
export const prerender = ServicePage.prerender;
|
|
8
|
+
export const getStaticPaths = ServicePage.getStaticPaths;
|
|
9
|
+
|
|
10
|
+
const changelogOwner = await ServicePage.getData(Astro);
|
|
11
|
+
if (!changelogOwner) return Astro.rewrite('/404');
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<ChangelogPage changelogOwner={changelogOwner} />
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import LatestVersionRedirect from '@components/LatestVersionRedirect.astro';
|
|
3
3
|
import { isChangelogEnabled, isSSR } from '@utils/feature';
|
|
4
4
|
import { buildUrl } from '@utils/url-builder';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { getLatestServiceChangelogPaths } from '../../../[type]/[id]/[version]/changelog/_index.data';
|
|
6
|
+
import { getLatestServiceVersion } from '../../_latest-version-route';
|
|
7
7
|
|
|
8
8
|
export const prerender = !isSSR();
|
|
9
|
-
export const getStaticPaths =
|
|
9
|
+
export const getStaticPaths = getLatestServiceChangelogPaths;
|
|
10
10
|
|
|
11
11
|
const { id } = Astro.params;
|
|
12
12
|
const version = Astro.props.redirectVersion ?? (id ? await getLatestServiceVersion(id) : undefined);
|
|
@@ -85,13 +85,13 @@ export const getNodesAndEdgesForChannelChain = ({
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
// Connect the last channel to the target
|
|
88
|
+
// Connect the last channel to the target, which accepts a command or query (it handles them) and consumes an event
|
|
89
89
|
edges.push(
|
|
90
90
|
createEdge({
|
|
91
91
|
id: generatedIdForEdge(channelChain[channelChain.length - 1], target),
|
|
92
92
|
source: generateIdForNode(channelChain[channelChain.length - 1]),
|
|
93
93
|
target: generateIdForNode(target),
|
|
94
|
-
label: 'consumes',
|
|
94
|
+
label: ['commands', 'queries'].includes(source.collection) ? 'accepts' : 'consumes',
|
|
95
95
|
data: { customColor: getColorFromString(source.data.id) },
|
|
96
96
|
})
|
|
97
97
|
);
|