@eventcatalog/core 2.24.3 → 2.25.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.
- 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-3MDI2MXJ.js → chunk-DZIMF2ES.js} +1 -1
- package/dist/{chunk-OZZMZUB3.js → chunk-O33THQNO.js} +1 -1
- package/dist/{chunk-7K4ERS3X.js → chunk-OZLFIB46.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.js +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/Edges/FlowEdge.tsx +96 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +10 -7
- 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/MDX/Tiles/Tile.astro +7 -1
- package/eventcatalog/src/components/SideNav/TreeView/getTreeView.ts +1 -1
- package/eventcatalog/src/pages/chat/index.astro +4 -1
- 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/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +3 -3
- package/package.json +6 -5
- 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,7 @@
|
|
|
1
1
|
import { BoltIcon } from '@heroicons/react/16/solid';
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
3
|
import { Handle } from '@xyflow/react';
|
|
4
|
+
import MessageContextMenu from './MessageContextMenu';
|
|
4
5
|
|
|
5
6
|
interface Data {
|
|
6
7
|
title: string;
|
|
@@ -19,53 +20,54 @@ function classNames(...classes: any) {
|
|
|
19
20
|
|
|
20
21
|
export default function EventNode({ data, sourcePosition, targetPosition }: any) {
|
|
21
22
|
const { mode, message } = data as Data;
|
|
22
|
-
|
|
23
23
|
const { name, version, summary, owners = [], producers = [], consumers = [] } = message.data;
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<
|
|
27
|
-
<div
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
41
|
-
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
42
|
-
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
43
|
-
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
44
|
-
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
45
|
-
<div className="flex justify-between">
|
|
46
|
-
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
47
|
-
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Event</span>}
|
|
48
|
-
</div>
|
|
26
|
+
<MessageContextMenu message={message} messageType="events">
|
|
27
|
+
<div className={classNames('w-full rounded-md border flex justify-start bg-white text-black border-orange-400')}>
|
|
28
|
+
<div
|
|
29
|
+
className={classNames(
|
|
30
|
+
'bg-gradient-to-b from-orange-500 to-orange-700 relative flex items-center w-5 justify-center rounded-l-sm text-orange-100-500',
|
|
31
|
+
`border-r-[1px] border-orange-500`
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
<BoltIcon className="w-4 h-4 opacity-90 text-white absolute top-1 " />
|
|
35
|
+
{mode === 'full' && (
|
|
36
|
+
<span className="rotate -rotate-90 w-1/2 text-center absolute bottom-1 text-[9px] text-white font-bold uppercase tracking-[3px] ">
|
|
37
|
+
Event
|
|
38
|
+
</span>
|
|
39
|
+
)}
|
|
49
40
|
</div>
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</
|
|
55
|
-
<div className="
|
|
56
|
-
<span className="text-
|
|
57
|
-
|
|
58
|
-
</span>
|
|
59
|
-
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
60
|
-
Consumers: {consumers.length}
|
|
61
|
-
</span>
|
|
62
|
-
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
63
|
-
Owners: {owners.length}
|
|
64
|
-
</span>
|
|
41
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
42
|
+
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
43
|
+
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
44
|
+
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
45
|
+
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
46
|
+
<div className="flex justify-between">
|
|
47
|
+
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
48
|
+
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Event</span>}
|
|
65
49
|
</div>
|
|
66
50
|
</div>
|
|
67
|
-
|
|
51
|
+
{mode === 'full' && (
|
|
52
|
+
<div className="divide-y divide-gray-200 ">
|
|
53
|
+
<div className="leading-3 py-1">
|
|
54
|
+
<span className="text-[8px] font-light">{summary}</span>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="grid grid-cols-2 gap-x-4 py-1">
|
|
57
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
58
|
+
Producers: {producers.length}
|
|
59
|
+
</span>
|
|
60
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
61
|
+
Consumers: {consumers.length}
|
|
62
|
+
</span>
|
|
63
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
64
|
+
Owners: {owners.length}
|
|
65
|
+
</span>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
68
70
|
</div>
|
|
69
|
-
</
|
|
71
|
+
</MessageContextMenu>
|
|
70
72
|
);
|
|
71
73
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as ContextMenu from '@radix-ui/react-context-menu';
|
|
2
|
+
import { buildUrl } from '@utils/url-builder';
|
|
3
|
+
import type { CollectionEntry } from 'astro:content';
|
|
4
|
+
import type { CollectionMessageTypes } from '@types';
|
|
5
|
+
interface Data {
|
|
6
|
+
message: CollectionEntry<CollectionMessageTypes>;
|
|
7
|
+
messageType: CollectionMessageTypes;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function MessageContextMenu(data: Data) {
|
|
12
|
+
const { message, messageType, children } = data;
|
|
13
|
+
const { id, version, name, schemaPath } = message.data;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<ContextMenu.Root>
|
|
17
|
+
<ContextMenu.Trigger>{children}</ContextMenu.Trigger>
|
|
18
|
+
<ContextMenu.Portal>
|
|
19
|
+
<ContextMenu.Content className="min-w-[220px] bg-white rounded-md p-1 shadow-md border border-gray-200">
|
|
20
|
+
<ContextMenu.Item
|
|
21
|
+
asChild
|
|
22
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
23
|
+
>
|
|
24
|
+
<a href={buildUrl(`/docs/${messageType}/${id}/${version}`)}>Read documentation</a>
|
|
25
|
+
</ContextMenu.Item>
|
|
26
|
+
<ContextMenu.Separator className="h-[1px] bg-gray-200 m-1" />
|
|
27
|
+
{schemaPath && (
|
|
28
|
+
<ContextMenu.Item asChild>
|
|
29
|
+
<a
|
|
30
|
+
href={buildUrl(`/generated/${messageType}/${id}/schema.json`)}
|
|
31
|
+
download={`${name}(${version})-${schemaPath}`}
|
|
32
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
33
|
+
target="_blank"
|
|
34
|
+
rel="noopener noreferrer"
|
|
35
|
+
>
|
|
36
|
+
Download schema
|
|
37
|
+
</a>
|
|
38
|
+
</ContextMenu.Item>
|
|
39
|
+
)}
|
|
40
|
+
<ContextMenu.Item asChild>
|
|
41
|
+
<a
|
|
42
|
+
href={buildUrl(`/docs/${messageType}/${id}/${version}/changelog`)}
|
|
43
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
44
|
+
target="_blank"
|
|
45
|
+
rel="noopener noreferrer"
|
|
46
|
+
>
|
|
47
|
+
Read changelog
|
|
48
|
+
</a>
|
|
49
|
+
</ContextMenu.Item>
|
|
50
|
+
</ContextMenu.Content>
|
|
51
|
+
</ContextMenu.Portal>
|
|
52
|
+
</ContextMenu.Root>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MagnifyingGlassIcon } from '@heroicons/react/16/solid';
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
3
|
import { Handle } from '@xyflow/react';
|
|
4
|
-
|
|
4
|
+
import MessageContextMenu from './MessageContextMenu';
|
|
5
5
|
interface Data {
|
|
6
6
|
title: string;
|
|
7
7
|
label: string;
|
|
@@ -22,53 +22,55 @@ export default function QueryNode({ data, sourcePosition, targetPosition }: any)
|
|
|
22
22
|
|
|
23
23
|
const { name, version, summary, owners = [], producers = [], consumers = [] } = message.data;
|
|
24
24
|
|
|
25
|
-
const renderTarget = true;
|
|
26
|
-
const renderSource = true;
|
|
25
|
+
const renderTarget = true;
|
|
26
|
+
const renderSource = true;
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<
|
|
30
|
-
<div
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
44
|
-
{renderTarget && <Handle type="target" position={targetPosition} />}
|
|
45
|
-
{renderSource && <Handle type="source" position={sourcePosition} />}
|
|
46
|
-
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
47
|
-
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
48
|
-
<div className="flex justify-between">
|
|
49
|
-
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
50
|
-
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Query</span>}
|
|
51
|
-
</div>
|
|
29
|
+
<MessageContextMenu message={message} messageType="queries">
|
|
30
|
+
<div className={classNames('w-full rounded-md border flex justify-start bg-white text-black border-green-400')}>
|
|
31
|
+
<div
|
|
32
|
+
className={classNames(
|
|
33
|
+
'bg-gradient-to-b from-green-500 to-green-700 relative flex items-center w-5 justify-center rounded-l-sm text-green-100-500',
|
|
34
|
+
`border-r-[1px] border-green-500`
|
|
35
|
+
)}
|
|
36
|
+
>
|
|
37
|
+
<MagnifyingGlassIcon className="w-4 h-4 opacity-90 text-white absolute top-1 " />
|
|
38
|
+
{mode === 'full' && (
|
|
39
|
+
<span className="rotate -rotate-90 w-1/2 text-center absolute bottom-1 text-[9px] text-white font-bold uppercase tracking-[3px] ">
|
|
40
|
+
Query
|
|
41
|
+
</span>
|
|
42
|
+
)}
|
|
52
43
|
</div>
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</
|
|
58
|
-
<div className="
|
|
59
|
-
<span className="text-
|
|
60
|
-
|
|
61
|
-
</span>
|
|
62
|
-
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
63
|
-
Consumers: {consumers.length}
|
|
64
|
-
</span>
|
|
65
|
-
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
66
|
-
Owners: {owners.length}
|
|
67
|
-
</span>
|
|
44
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
45
|
+
{renderTarget && <Handle type="target" position={targetPosition} />}
|
|
46
|
+
{renderSource && <Handle type="source" position={sourcePosition} />}
|
|
47
|
+
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
48
|
+
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
49
|
+
<div className="flex justify-between">
|
|
50
|
+
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
51
|
+
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Query</span>}
|
|
68
52
|
</div>
|
|
69
53
|
</div>
|
|
70
|
-
|
|
54
|
+
{mode === 'full' && (
|
|
55
|
+
<div className="divide-y divide-gray-200 ">
|
|
56
|
+
<div className="leading-3 py-1">
|
|
57
|
+
<span className="text-[8px] font-light">{summary}</span>
|
|
58
|
+
</div>
|
|
59
|
+
<div className="grid grid-cols-2 gap-x-4 py-1">
|
|
60
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
61
|
+
Producers: {producers.length}
|
|
62
|
+
</span>
|
|
63
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
64
|
+
Consumers: {consumers.length}
|
|
65
|
+
</span>
|
|
66
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
67
|
+
Owners: {owners.length}
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
71
73
|
</div>
|
|
72
|
-
</
|
|
74
|
+
</MessageContextMenu>
|
|
73
75
|
);
|
|
74
76
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ServerIcon } from '@heroicons/react/16/solid';
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
3
|
import { Handle } from '@xyflow/react';
|
|
4
|
+
import * as ContextMenu from '@radix-ui/react-context-menu';
|
|
5
|
+
import { buildUrl } from '@utils/url-builder';
|
|
4
6
|
|
|
5
7
|
interface Data {
|
|
6
8
|
label: string;
|
|
@@ -19,53 +21,121 @@ function classNames(...classes: any) {
|
|
|
19
21
|
export default function ServiceNode({ data, sourcePosition, targetPosition }: any) {
|
|
20
22
|
const { label, bgColor = 'bg-blue-500', mode, service } = data as Data;
|
|
21
23
|
|
|
22
|
-
const { version, owners = [], sends = [], receives = [], name } = service.data;
|
|
24
|
+
const { id, version, owners = [], sends = [], receives = [], name, specifications, repository } = service.data;
|
|
25
|
+
const asyncApiPath = specifications?.asyncapiPath;
|
|
26
|
+
const openApiPath = specifications?.openapiPath;
|
|
27
|
+
const repositoryUrl = repository?.url;
|
|
23
28
|
|
|
24
29
|
return (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
className={classNames(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
41
|
-
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
42
|
-
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
43
|
-
<span className="text-xs font-bold block pt-0.5 pb-0.5">{name}</span>
|
|
44
|
-
<div className="flex justify-between">
|
|
45
|
-
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
46
|
-
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Service</span>}
|
|
30
|
+
<ContextMenu.Root>
|
|
31
|
+
<ContextMenu.Trigger>
|
|
32
|
+
<div className={classNames('w-full rounded-md border flex justify-start bg-white text-black border-pink-500')}>
|
|
33
|
+
<div
|
|
34
|
+
className={classNames(
|
|
35
|
+
'bg-gradient-to-b from-pink-500 to-pink-700 relative flex items-center w-5 justify-center rounded-l-sm text-red-100-500',
|
|
36
|
+
`border-r-[1px] border-pink-500`
|
|
37
|
+
)}
|
|
38
|
+
>
|
|
39
|
+
<ServerIcon className="w-4 h-4 opacity-90 text-white absolute top-1 " />
|
|
40
|
+
{mode === 'full' && (
|
|
41
|
+
<span className="rotate -rotate-90 w-1/2 text-center absolute bottom-1 text-[9px] text-white font-bold uppercase tracking-[3px] ">
|
|
42
|
+
Service
|
|
43
|
+
</span>
|
|
44
|
+
)}
|
|
47
45
|
</div>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<div className=
|
|
52
|
-
<span className="text-
|
|
46
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
47
|
+
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
48
|
+
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
49
|
+
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
50
|
+
<span className="text-xs font-bold block pt-0.5 pb-0.5">{name}</span>
|
|
51
|
+
<div className="flex justify-between">
|
|
52
|
+
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
53
|
+
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Service</span>}
|
|
54
|
+
</div>
|
|
53
55
|
</div>
|
|
56
|
+
{mode === 'full' && (
|
|
57
|
+
<div className="divide-y divide-gray-200 ">
|
|
58
|
+
<div className="leading-3 py-1">
|
|
59
|
+
<span className="text-[8px] font-light">{service.data.summary}</span>
|
|
60
|
+
</div>
|
|
54
61
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
<div className="grid grid-cols-2 gap-x-4 py-1">
|
|
63
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
64
|
+
Receives messages: {receives.length}
|
|
65
|
+
</span>
|
|
66
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
67
|
+
Publishes messages: {sends.length}
|
|
68
|
+
</span>
|
|
69
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
70
|
+
Owners: {owners.length}
|
|
71
|
+
</span>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
66
75
|
</div>
|
|
67
|
-
|
|
68
|
-
</
|
|
69
|
-
|
|
76
|
+
</div>
|
|
77
|
+
</ContextMenu.Trigger>
|
|
78
|
+
<ContextMenu.Portal>
|
|
79
|
+
<ContextMenu.Content className="min-w-[220px] bg-white rounded-md p-1 shadow-md border border-gray-200">
|
|
80
|
+
<ContextMenu.Item
|
|
81
|
+
asChild
|
|
82
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
83
|
+
>
|
|
84
|
+
<a href={buildUrl(`/docs/services/${id}/${version}`)}>Read documentation</a>
|
|
85
|
+
</ContextMenu.Item>
|
|
86
|
+
<ContextMenu.Separator className="h-[1px] bg-gray-200 m-1" />
|
|
87
|
+
{asyncApiPath && (
|
|
88
|
+
<ContextMenu.Item asChild>
|
|
89
|
+
<a
|
|
90
|
+
href={buildUrl(`/docs/services/${id}/${version}/asyncapi`)}
|
|
91
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
92
|
+
target="_blank"
|
|
93
|
+
rel="noopener noreferrer"
|
|
94
|
+
>
|
|
95
|
+
View AsyncAPI specification
|
|
96
|
+
</a>
|
|
97
|
+
</ContextMenu.Item>
|
|
98
|
+
)}
|
|
99
|
+
{openApiPath && (
|
|
100
|
+
<ContextMenu.Item asChild>
|
|
101
|
+
<a
|
|
102
|
+
href={buildUrl(`/docs/services/${id}/${version}/spec`)}
|
|
103
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
104
|
+
target="_blank"
|
|
105
|
+
rel="noopener noreferrer"
|
|
106
|
+
>
|
|
107
|
+
View OpenAPI specification
|
|
108
|
+
</a>
|
|
109
|
+
</ContextMenu.Item>
|
|
110
|
+
)}
|
|
111
|
+
{asyncApiPath && openApiPath && <ContextMenu.Separator className="h-[1px] bg-gray-200 m-1" />}
|
|
112
|
+
{repositoryUrl && (
|
|
113
|
+
<>
|
|
114
|
+
<ContextMenu.Item asChild>
|
|
115
|
+
<a
|
|
116
|
+
href={repositoryUrl}
|
|
117
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
118
|
+
target="_blank"
|
|
119
|
+
rel="noopener noreferrer"
|
|
120
|
+
>
|
|
121
|
+
View code repository
|
|
122
|
+
</a>
|
|
123
|
+
</ContextMenu.Item>
|
|
124
|
+
<ContextMenu.Separator className="h-[1px] bg-gray-200 m-1" />
|
|
125
|
+
</>
|
|
126
|
+
)}
|
|
127
|
+
<ContextMenu.Item asChild>
|
|
128
|
+
<a
|
|
129
|
+
href={buildUrl(`/docs/services/${id}/${version}/changelog`)}
|
|
130
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
131
|
+
target="_blank"
|
|
132
|
+
rel="noopener noreferrer"
|
|
133
|
+
>
|
|
134
|
+
Read changelog
|
|
135
|
+
</a>
|
|
136
|
+
</ContextMenu.Item>
|
|
137
|
+
</ContextMenu.Content>
|
|
138
|
+
</ContextMenu.Portal>
|
|
139
|
+
</ContextMenu.Root>
|
|
70
140
|
);
|
|
71
141
|
}
|
|
@@ -14,10 +14,16 @@ interface Props {
|
|
|
14
14
|
const { href, icon, title, description, openWindow } = Astro.props;
|
|
15
15
|
|
|
16
16
|
const IconComponent: ComponentType<{ className?: string }> | undefined = Icons[icon];
|
|
17
|
+
|
|
18
|
+
function startsWithProtocol(str: string) {
|
|
19
|
+
// Regular expression to match common protocols (http, https, ftp, ws, etc.)
|
|
20
|
+
const regex = /^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//;
|
|
21
|
+
return regex.test(str);
|
|
22
|
+
}
|
|
17
23
|
---
|
|
18
24
|
|
|
19
25
|
<a
|
|
20
|
-
href={buildUrl(href)}
|
|
26
|
+
href={startsWithProtocol(href) ? href : buildUrl(href)}
|
|
21
27
|
target={openWindow ? '_blank' : '_self'}
|
|
22
28
|
class="block bg-white border border-gray-200 rounded-lg p-6 transition-all duration-300 ease-in-out hover:shadow-md hover:border-primary focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-primary focus:ring-white"
|
|
23
29
|
>
|
|
@@ -138,7 +138,7 @@ function groupChildrenByType(parentNode: TreeNode) {
|
|
|
138
138
|
const treeViewCache = new Map<string, TreeNode>();
|
|
139
139
|
|
|
140
140
|
export function getTreeView({ projectDir, currentPath }: { projectDir: string; currentPath: string }): TreeNode {
|
|
141
|
-
const basePathname = currentPath.split('/')
|
|
141
|
+
const basePathname = currentPath.split('/').find((p) => p === 'docs' || p === 'visualiser') || 'docs';
|
|
142
142
|
|
|
143
143
|
const cacheKey = `${projectDir}:${basePathname}`;
|
|
144
144
|
if (treeViewCache.has(cacheKey)) return treeViewCache.get(cacheKey)!;
|
|
@@ -107,7 +107,10 @@ const generatorConfig = `
|
|
|
107
107
|
<div class="bg-gray-700 rounded-lg p-4 md:p-6 mb-4">
|
|
108
108
|
<h3 class="text-lg text-white font-semibold mb-3">Quick Setup</h3>
|
|
109
109
|
<Code code={`npm install @eventcatalog/generator-ai`} lang="bash" frame="none" />
|
|
110
|
-
<a
|
|
110
|
+
<a
|
|
111
|
+
href="https://www.eventcatalog.dev/feature/ai-assistant"
|
|
112
|
+
class="inline-flex items-center text-sm text-white mt-4"
|
|
113
|
+
>
|
|
111
114
|
Learn more about setup →
|
|
112
115
|
</a>
|
|
113
116
|
</div>
|
|
@@ -4,7 +4,6 @@ import * as path from 'path';
|
|
|
4
4
|
import fs from 'node:fs';
|
|
5
5
|
|
|
6
6
|
import type { CollectionTypes, PageTypes } from '@types';
|
|
7
|
-
import PlainPage from '@layouts/PlainPage.astro';
|
|
8
7
|
import { DocumentMinusIcon } from '@heroicons/react/24/outline';
|
|
9
8
|
import { buildUrl } from '@utils/url-builder';
|
|
10
9
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# **EventCatalog**
|
|
2
|
+
|
|
3
|
+
Welcome to [EventCatalog](https://www.eventcatalog.dev/).
|
|
4
|
+
|
|
5
|
+
This open-source project is designed to help you and your teams bring discoverability and clarity to your event-driven architectures (EDA).
|
|
6
|
+
|
|
7
|
+
To get started you can read the following guides:
|
|
8
|
+
|
|
9
|
+
- [Getting started with EventCatalog](https://eventcatalog.dev/docs/development/getting-started/introduction)
|
|
10
|
+
- [Creating domains](https://eventcatalog.dev/docs/development/guides/domains/adding-domains)
|
|
11
|
+
- [Creating services](https://eventcatalog.dev/docs/development/guides/services/adding-services)
|
|
12
|
+
- [Creating commands](https://eventcatalog.dev/docs/development/guides/messages/commands/introduction)
|
|
13
|
+
- [Creating events](https://eventcatalog.dev/docs/development/guides/messages/events/introduction)
|
|
14
|
+
- [Assigning owners to resources](https://eventcatalog.dev/docs/owners)
|
|
15
|
+
- [Using components in your pages (Schemas, OpenAPI, etc)](https://eventcatalog.dev/docs/development/components/using-components)
|
|
16
|
+
- [Deploying and hosting your EventCatalog](https://eventcatalog.dev/docs/development/deployment)
|
|
17
|
+
|
|
18
|
+
### **Join the community**
|
|
19
|
+
|
|
20
|
+
Got questions about EventCatalog? Feature requests or need support? [Join our community on Discord.](https://discord.gg/3rjaZMmrAm)
|
|
21
|
+
|
|
22
|
+
### **Enterprise support**
|
|
23
|
+
|
|
24
|
+
Using EventCatalog and needs enterprise support? Work with us, find out what we offer on our [enterprise page](https://eventcatalog.dev/enterprise).
|
|
@@ -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>
|
|
@@ -118,18 +118,18 @@ export const getNodesAndEdges = async ({ id, defaultFlow, version, mode = 'simpl
|
|
|
118
118
|
id: `step-${step.id}-step-${path.id}`,
|
|
119
119
|
source: `step-${step.id}`,
|
|
120
120
|
target: `step-${path.id}`,
|
|
121
|
-
type: '
|
|
121
|
+
type: 'flow-edge',
|
|
122
122
|
label: path.label,
|
|
123
123
|
animated: true,
|
|
124
124
|
markerEnd: {
|
|
125
125
|
type: MarkerType.ArrowClosed,
|
|
126
126
|
width: 20,
|
|
127
127
|
height: 20,
|
|
128
|
-
color: '#
|
|
128
|
+
color: '#666',
|
|
129
129
|
},
|
|
130
130
|
style: {
|
|
131
131
|
strokeWidth: 2,
|
|
132
|
-
stroke: '#
|
|
132
|
+
stroke: '#ccc',
|
|
133
133
|
},
|
|
134
134
|
});
|
|
135
135
|
});
|
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.1",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"default-files-for-collections/"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@astrojs/markdown-remark": "^6.
|
|
25
|
-
"@astrojs/mdx": "^4.0
|
|
26
|
-
"@astrojs/react": "^4.2.
|
|
24
|
+
"@astrojs/markdown-remark": "^6.2.0",
|
|
25
|
+
"@astrojs/mdx": "^4.1.0",
|
|
26
|
+
"@astrojs/react": "^4.2.1",
|
|
27
27
|
"@astrojs/rss": "^4.0.11",
|
|
28
28
|
"@astrojs/tailwind": "^6.0.0",
|
|
29
29
|
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
@@ -37,12 +37,13 @@
|
|
|
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",
|
|
43
44
|
"@tanstack/react-table": "^8.17.3",
|
|
44
45
|
"@xyflow/react": "^12.3.6",
|
|
45
|
-
"astro": "^5.
|
|
46
|
+
"astro": "^5.4.1",
|
|
46
47
|
"astro-expressive-code": "^0.40.1",
|
|
47
48
|
"astro-pagefind": "^1.6.0",
|
|
48
49
|
"astro-seo": "^0.8.4",
|