@eventcatalog/core 2.24.2 → 2.25.0
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/catalog-to-astro-content-directory.cjs +0 -1
- package/dist/catalog-to-astro-content-directory.js +1 -1
- package/dist/{chunk-VOOF34RB.js → chunk-7674GE3M.js} +1 -1
- package/dist/{chunk-AMO6QDAS.js → chunk-H6PSWK2Z.js} +1 -1
- package/dist/{chunk-Q77NQ43U.js → chunk-JENKAK6L.js} +1 -1
- package/dist/{chunk-CXKIF3EI.js → chunk-VCR3LHZR.js} +0 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -2
- package/dist/eventcatalog.config.d.cts +1 -0
- package/dist/eventcatalog.config.d.ts +1 -0
- package/dist/eventcatalog.js +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +3 -2
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Channel.tsx +82 -54
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Command.tsx +44 -41
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Event.tsx +43 -41
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/MessageContextMenu.tsx +54 -0
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Query.tsx +45 -43
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Service.tsx +112 -42
- package/eventcatalog/src/components/SideNav/TreeView/getTreeView.ts +1 -1
- package/eventcatalog/src/enterprise/ai-assistant/components/ChatSidebar.tsx +1 -9
- package/eventcatalog/src/enterprise/ai-assistant/components/ChatWindow.tsx +240 -118
- package/eventcatalog/src/enterprise/ai-assistant/components/hooks/ChatProvider.tsx +13 -13
- package/eventcatalog/src/enterprise/ai-assistant/components/workers/document-importer.ts +4 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/index.astro +0 -1
- package/eventcatalog/src/pages/docs/_default-docs.mdx +24 -0
- package/eventcatalog/src/pages/docs/index.astro +13 -18
- package/package.json +3 -2
- package/default-files-for-collections/pages.md +0 -7
- package/eventcatalog/src/components/DocsNavigation.astro +0 -145
- package/eventcatalog/src/layouts/CustomDocsPageLayout.astro +0 -131
- package/eventcatalog/src/layouts/PlainPage.astro +0 -29
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Footer from '@layouts/Footer.astro';
|
|
3
|
-
import DefaultDocsLandingPage from '@layouts/CustomDocsPageLayout.astro';
|
|
4
3
|
import components from '@components/MDX/page-components';
|
|
5
4
|
import { getIndexPage } from '@utils/pages';
|
|
6
5
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
@@ -11,24 +10,20 @@ let CustomContent = null;
|
|
|
11
10
|
if (page) {
|
|
12
11
|
const { Content } = await page.render();
|
|
13
12
|
CustomContent = Content;
|
|
13
|
+
} else {
|
|
14
|
+
CustomContent = await import('./_default-docs.mdx').then((mod) => mod.default);
|
|
14
15
|
}
|
|
15
16
|
---
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<div class="
|
|
22
|
-
<
|
|
23
|
-
<div class="prose prose-md w-full !max-w-none">
|
|
24
|
-
<CustomContent components={components} />
|
|
25
|
-
</div>
|
|
26
|
-
<Footer />
|
|
27
|
-
</div>
|
|
18
|
+
<VerticalSideBarLayout title="EventCatalog">
|
|
19
|
+
<main class="flex sm:px-8 docs-layout h-full">
|
|
20
|
+
<div class="flex docs-layout w-full">
|
|
21
|
+
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8">
|
|
22
|
+
<div class="prose prose-md w-full !max-w-none">
|
|
23
|
+
<CustomContent components={components} />
|
|
28
24
|
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{!CustomContent && <DefaultDocsLandingPage title="EventCatalog" />}
|
|
25
|
+
<Footer />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</main>
|
|
29
|
+
</VerticalSideBarLayout>
|
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": "2.
|
|
9
|
+
"version": "2.25.0",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
30
30
|
"@asyncapi/parser": "^3.4.0",
|
|
31
31
|
"@asyncapi/react-component": "^2.4.3",
|
|
32
|
-
"@eventcatalog/generator-ai": "^0.1.
|
|
32
|
+
"@eventcatalog/generator-ai": "^0.1.5",
|
|
33
33
|
"@headlessui/react": "^2.0.3",
|
|
34
34
|
"@heroicons/react": "^2.1.3",
|
|
35
35
|
"@huggingface/transformers": "^3.3.3",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@langchain/community": "^0.3.32",
|
|
38
38
|
"@mlc-ai/web-llm": "^0.2.78",
|
|
39
39
|
"@parcel/watcher": "^2.4.1",
|
|
40
|
+
"@radix-ui/react-context-menu": "^2.2.6",
|
|
40
41
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
41
42
|
"@stoplight/json-schema-viewer": "^4.16.4",
|
|
42
43
|
"@tailwindcss/typography": "^0.5.13",
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { getCommands } from '@utils/commands';
|
|
3
|
-
import { getDomains } from '@utils/collections/domains';
|
|
4
|
-
import { getEvents } from '@utils/events';
|
|
5
|
-
import { getServices } from '@utils/collections/services';
|
|
6
|
-
import { getFlows } from '@utils/collections/flows';
|
|
7
|
-
import { getTeams } from '@utils/teams';
|
|
8
|
-
import { getUsers } from '@utils/users';
|
|
9
|
-
import config, { type CatalogConfig } from '@utils/eventcatalog-config/catalog';
|
|
10
|
-
import { buildUrl } from '@utils/url-builder';
|
|
11
|
-
import { getQueries } from '@utils/queries';
|
|
12
|
-
|
|
13
|
-
const events = await getEvents({ getAllVersions: false });
|
|
14
|
-
const commands = await getCommands({ getAllVersions: false });
|
|
15
|
-
const queries = await getQueries({ getAllVersions: false });
|
|
16
|
-
const services = await getServices({ getAllVersions: false });
|
|
17
|
-
const domains = await getDomains({ getAllVersions: false });
|
|
18
|
-
const flows = await getFlows({ getAllVersions: false });
|
|
19
|
-
const teams = await getTeams();
|
|
20
|
-
const users = await getUsers();
|
|
21
|
-
|
|
22
|
-
const messages = [...events, ...commands, ...queries];
|
|
23
|
-
|
|
24
|
-
// @ts-ignore for large catalogs https://github.com/event-catalog/eventcatalog/issues/552
|
|
25
|
-
const allData = [...domains, ...services, ...messages, ...flows, ...teams, ...users];
|
|
26
|
-
|
|
27
|
-
const eventCatalogConfig = config as CatalogConfig;
|
|
28
|
-
const {
|
|
29
|
-
services: servicesConfig,
|
|
30
|
-
domains: domainsConfig,
|
|
31
|
-
messages: messagesConfig,
|
|
32
|
-
flows: flowsConfig,
|
|
33
|
-
teams: teamsConfig,
|
|
34
|
-
users: usersConfig,
|
|
35
|
-
showPageHeadings = true,
|
|
36
|
-
} = eventCatalogConfig?.docs?.sidebar || {};
|
|
37
|
-
|
|
38
|
-
const getConfigValue = (obj: any, key: string, defaultValue: any) => {
|
|
39
|
-
return obj?.[key] ?? defaultValue;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const visibleCollections: { [key: string]: boolean } = {
|
|
43
|
-
events: getConfigValue(messagesConfig, 'visible', true),
|
|
44
|
-
commands: getConfigValue(messagesConfig, 'visible', true),
|
|
45
|
-
domains: getConfigValue(domainsConfig, 'visible', true),
|
|
46
|
-
flows: getConfigValue(flowsConfig, 'visible', true),
|
|
47
|
-
services: getConfigValue(servicesConfig, 'visible', true),
|
|
48
|
-
teams: getConfigValue(teamsConfig, 'visible', true),
|
|
49
|
-
users: getConfigValue(usersConfig, 'visible', true),
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const fetchHeadings = allData.map(async (item) => {
|
|
53
|
-
const renderHeadings = showPageHeadings;
|
|
54
|
-
const headings = renderHeadings ? await item.render() : { headings: [] };
|
|
55
|
-
return {
|
|
56
|
-
...item,
|
|
57
|
-
headings: headings.headings,
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const withHeadings = await Promise.all(fetchHeadings);
|
|
62
|
-
|
|
63
|
-
const sideNav = withHeadings.reduce((acc, item) => {
|
|
64
|
-
const title = item.collection === 'events' || item.collection === 'commands' ? 'Messages' : item.collection;
|
|
65
|
-
|
|
66
|
-
const group = acc[title] || [];
|
|
67
|
-
|
|
68
|
-
const navigationItem = {
|
|
69
|
-
label: item.data.name,
|
|
70
|
-
version: item.collection === 'teams' || item.collection === 'users' ? null : item.data.version,
|
|
71
|
-
items: item.collection === 'users' ? [] : item.headings,
|
|
72
|
-
visible: visibleCollections[item.collection],
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
href: item.data.version
|
|
75
|
-
? // @ts-ignore
|
|
76
|
-
buildUrl(`/docs/${item.collection}/${item.data.id}/${item.data.version}`)
|
|
77
|
-
: buildUrl(`/docs/${item.collection}/${item.data.id}`),
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
group.push(navigationItem);
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
...acc,
|
|
84
|
-
[title]: group,
|
|
85
|
-
};
|
|
86
|
-
}, {} as any);
|
|
87
|
-
|
|
88
|
-
const currentPath = Astro.url.pathname;
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
<div class="font-light w-full xl:pr-10 pb-20">
|
|
92
|
-
{
|
|
93
|
-
Object.keys(sideNav).map((key) => {
|
|
94
|
-
const collection = sideNav[key];
|
|
95
|
-
if (collection[0] && collection[0].visible === false) return null;
|
|
96
|
-
return (
|
|
97
|
-
<ul class=" w-full space-y-2 pb-8">
|
|
98
|
-
<li class="font-semibold capitalize ">{key}</li>
|
|
99
|
-
{collection.map((item: any) => {
|
|
100
|
-
return (
|
|
101
|
-
<li class="px-2 w-full text-md xl:text-lg border-l border-gray-200 space-y-2 scroll-m-20" id={item.href}>
|
|
102
|
-
<a
|
|
103
|
-
class={`flex justify-between items-center w-full px-2 rounded-md font-normal ${currentPath.includes(item.href) ? 'bg-primary/5 text-primary ' : 'font-thin'}`}
|
|
104
|
-
href={`${item.href}`}
|
|
105
|
-
>
|
|
106
|
-
<span class="block truncate !whitespace-normal">{item.label}</span>
|
|
107
|
-
{item.version && (
|
|
108
|
-
<span class="block text-sm bg-primary/10 p-0.5 px-1 text-gray-600 rounded-md font-light">
|
|
109
|
-
v{item.version}
|
|
110
|
-
</span>
|
|
111
|
-
)}
|
|
112
|
-
</a>
|
|
113
|
-
<ul class="hidden xl:block px-4 text-gray-500 text-md space-y-2 ">
|
|
114
|
-
{item.items.map((heading: any) => {
|
|
115
|
-
return (
|
|
116
|
-
<li class="text-xs">
|
|
117
|
-
<a href={`${item.href}#${heading.slug}`}>{heading.text}</a>
|
|
118
|
-
</li>
|
|
119
|
-
);
|
|
120
|
-
})}
|
|
121
|
-
</ul>
|
|
122
|
-
</li>
|
|
123
|
-
);
|
|
124
|
-
})}
|
|
125
|
-
</ul>
|
|
126
|
-
);
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<script>
|
|
132
|
-
// Scroll to the current page element
|
|
133
|
-
// document.addEventListener('DOMContentLoaded', () => {
|
|
134
|
-
// const currentPath = document.location.pathname;
|
|
135
|
-
// const currentElement = document.getElementById(currentPath);
|
|
136
|
-
// if (currentElement) {
|
|
137
|
-
// // scroll to the current element with padding
|
|
138
|
-
// currentElement.scrollIntoView({
|
|
139
|
-
// behavior: 'auto',
|
|
140
|
-
// block: 'start',
|
|
141
|
-
// inline: 'start',
|
|
142
|
-
// });
|
|
143
|
-
// }
|
|
144
|
-
// });
|
|
145
|
-
</script>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
title: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
import Footer from '@layouts/Footer.astro';
|
|
7
|
-
import Header from '@components/Header.astro';
|
|
8
|
-
import SideBar from '@components/DocsNavigation.astro';
|
|
9
|
-
import { buildUrl } from '@utils/url-builder';
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<!doctype html>
|
|
13
|
-
<html lang="en">
|
|
14
|
-
<head>
|
|
15
|
-
<meta charset="UTF-8" />
|
|
16
|
-
<meta name="description" content="Astro description" />
|
|
17
|
-
<meta name="viewport" content="width=device-width" />
|
|
18
|
-
<link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico', true)} />
|
|
19
|
-
<meta name="generator" content={Astro.generator} />
|
|
20
|
-
<title>EventCatalog</title>
|
|
21
|
-
</head>
|
|
22
|
-
<body>
|
|
23
|
-
<div class="px-10 max-w-[120em] mx-auto">
|
|
24
|
-
<Header />
|
|
25
|
-
|
|
26
|
-
<div class="md:pt-4">
|
|
27
|
-
<nav class="hidden sm:flex grow w-56 xl:w-[19em] fixed overflow-y-auto h-full py-2">
|
|
28
|
-
<div class="w-full">
|
|
29
|
-
<SideBar />
|
|
30
|
-
</div>
|
|
31
|
-
</nav>
|
|
32
|
-
|
|
33
|
-
<div class="pl-0 sm:pl-56 xl:pl-80 w-full pt-8 pb-40">
|
|
34
|
-
<div class="prose prose-sm">
|
|
35
|
-
<div class="bg-white">
|
|
36
|
-
<div class="mx-auto max-w-7xl">
|
|
37
|
-
<div class="mx-auto max-w-2xl lg:mx-0 lg:max-w-none">
|
|
38
|
-
<h1 class="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl mb-0">EventCatalog</h1>
|
|
39
|
-
<div class="grid max-w-xl grid-cols-1 md:gap-8 text-base leading-7 text-gray-700 lg:max-w-none lg:grid-cols-1">
|
|
40
|
-
<div>
|
|
41
|
-
<p>
|
|
42
|
-
Welcome to <a href="https://www.eventcatalog.dev/">EventCatalog</a>.
|
|
43
|
-
</p>
|
|
44
|
-
<p>
|
|
45
|
-
This open-source project is designed to help you and your teams bring discoverability and clarity to your
|
|
46
|
-
event-driven architectures (EDA).
|
|
47
|
-
</p>
|
|
48
|
-
<p>
|
|
49
|
-
To get started you can read the following guides:
|
|
50
|
-
<ul>
|
|
51
|
-
<li>
|
|
52
|
-
<a class="text-primary" href="https://eventcatalog.dev/docs/development/getting-started/introduction"
|
|
53
|
-
>Getting started with EventCatalog</a
|
|
54
|
-
>
|
|
55
|
-
</li>
|
|
56
|
-
<li>
|
|
57
|
-
<a class="text-primary" href="https://eventcatalog.dev/docs/development/guides/domains/adding-domains"
|
|
58
|
-
>Creating domains</a
|
|
59
|
-
>
|
|
60
|
-
</li>
|
|
61
|
-
<li>
|
|
62
|
-
<a
|
|
63
|
-
class="text-primary"
|
|
64
|
-
href="https://eventcatalog.dev/docs/development/guides/services/adding-services"
|
|
65
|
-
>Creating services</a
|
|
66
|
-
>
|
|
67
|
-
</li>
|
|
68
|
-
<li>
|
|
69
|
-
<a
|
|
70
|
-
class="text-primary"
|
|
71
|
-
href="https://eventcatalog.dev/docs/development/guides/messages/commands/introduction"
|
|
72
|
-
>Creating commands</a
|
|
73
|
-
>
|
|
74
|
-
</li>
|
|
75
|
-
<li>
|
|
76
|
-
<a
|
|
77
|
-
class="text-primary"
|
|
78
|
-
href="https://eventcatalog.dev/docs/development/guides/messages/events/introduction"
|
|
79
|
-
>Creating events</a
|
|
80
|
-
>
|
|
81
|
-
</li>
|
|
82
|
-
<li>
|
|
83
|
-
<a class="text-primary" href="https://eventcatalog.dev/docs/owners">Assigning owners to resources</a>
|
|
84
|
-
</li>
|
|
85
|
-
<li>
|
|
86
|
-
<a class="text-primary" href="https://eventcatalog.dev/docs/development/components/using-components"
|
|
87
|
-
>Using components in your pages (Schemas, OpenAPI, etc)</a
|
|
88
|
-
>
|
|
89
|
-
</li>
|
|
90
|
-
<li>
|
|
91
|
-
<a class="text-primary" href="https://eventcatalog.dev/docs/development/deployment"
|
|
92
|
-
>Deploying and hosting your EventCatalog</a
|
|
93
|
-
>
|
|
94
|
-
</li>
|
|
95
|
-
</ul>
|
|
96
|
-
</p>
|
|
97
|
-
<h3>Join the community</h3>
|
|
98
|
-
<p>
|
|
99
|
-
Got questions about EventCatalog? Feature requests or need support? <a
|
|
100
|
-
class="text-primary"
|
|
101
|
-
href="https://discord.gg/3rjaZMmrAm">Join our community on Discord.</a
|
|
102
|
-
>
|
|
103
|
-
</p>
|
|
104
|
-
<h3>Enterprise support</h3>
|
|
105
|
-
<p>
|
|
106
|
-
Using EventCatalog and needs enterprise support? Work with us, find out what we offer on our <a
|
|
107
|
-
class="text-primary"
|
|
108
|
-
href="https://eventcatalog.dev/enterprise">enterprise page</a
|
|
109
|
-
>.
|
|
110
|
-
</p>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<Footer />
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<!-- <slot /> -->
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</body>
|
|
125
|
-
</html>
|
|
126
|
-
|
|
127
|
-
<style>
|
|
128
|
-
.prose {
|
|
129
|
-
max-width: none;
|
|
130
|
-
}
|
|
131
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
title: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const { title, description } = Astro.props;
|
|
8
|
-
|
|
9
|
-
import Header from '@components/Header.astro';
|
|
10
|
-
import SEO from '@components/Seo.astro';
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<!doctype html>
|
|
14
|
-
<html lang="en">
|
|
15
|
-
<head>
|
|
16
|
-
<SEO title={`EventCatalog | ${title}`} description={description} ogTitle={title} />
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<div class="px-10 max-w-[120em] mx-auto">
|
|
20
|
-
<Header />
|
|
21
|
-
|
|
22
|
-
<div class="md:pt-4">
|
|
23
|
-
<div>
|
|
24
|
-
<slot />
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|