@eventcatalog/core 3.0.0-beta.3 → 3.0.0-beta.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-AA77FVIB.js → chunk-2S2HZBCP.js} +1 -1
- package/dist/{chunk-AVU3AN7Z.js → chunk-5FCHDFSH.js} +1 -1
- package/dist/{chunk-NCPOSHDA.js → chunk-IFM7AOTV.js} +1 -1
- package/dist/{chunk-QCG2IR3D.js → chunk-THZ5TTFQ.js} +1 -1
- package/dist/{chunk-LQRZDAAR.js → chunk-ZH2CKLGX.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/components/Search/SearchModal.tsx +16 -7
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +4 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +7 -6
- package/eventcatalog/src/components/SideNav/NestedSideBar/sidebar-builder.ts +57 -11
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-THZ5TTFQ.js";
|
|
4
|
+
import "../chunk-IFM7AOTV.js";
|
|
5
|
+
import "../chunk-ZH2CKLGX.js";
|
|
6
6
|
import "../chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
109
109
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
110
110
|
|
|
111
111
|
// package.json
|
|
112
|
-
var version = "3.0.0-beta.
|
|
112
|
+
var version = "3.0.0-beta.5";
|
|
113
113
|
|
|
114
114
|
// src/constants.ts
|
|
115
115
|
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-THZ5TTFQ.js";
|
|
10
|
+
import "./chunk-IFM7AOTV.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrations
|
|
13
13
|
} from "./chunk-BH3JMNAV.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
} from "./chunk-5VBIXL6C.js";
|
|
24
24
|
import {
|
|
25
25
|
generate
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2S2HZBCP.js";
|
|
27
27
|
import {
|
|
28
28
|
logger
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5FCHDFSH.js";
|
|
30
30
|
import {
|
|
31
31
|
VERSION
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZH2CKLGX.js";
|
|
33
33
|
import "./chunk-UPONRQSN.js";
|
|
34
34
|
|
|
35
35
|
// src/eventcatalog.ts
|
package/dist/generate.cjs
CHANGED
|
@@ -73,7 +73,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
73
73
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
74
74
|
|
|
75
75
|
// package.json
|
|
76
|
-
var version = "3.0.0-beta.
|
|
76
|
+
var version = "3.0.0-beta.5";
|
|
77
77
|
|
|
78
78
|
// src/constants.ts
|
|
79
79
|
var VERSION = version;
|
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-2S2HZBCP.js";
|
|
4
|
+
import "./chunk-5FCHDFSH.js";
|
|
5
|
+
import "./chunk-ZH2CKLGX.js";
|
|
6
6
|
import "./chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
ArrowUturnLeftIcon,
|
|
21
21
|
StarIcon,
|
|
22
22
|
Square2StackIcon,
|
|
23
|
+
ArrowsRightLeftIcon,
|
|
23
24
|
} from '@heroicons/react/24/outline';
|
|
24
25
|
import { StarIcon as StarIconSolid, CircleStackIcon } from '@heroicons/react/24/solid';
|
|
25
26
|
import { useStore } from '@nanostores/react';
|
|
@@ -33,7 +34,7 @@ const typeIcons: any = {
|
|
|
33
34
|
Command: ChatBubbleLeftIcon,
|
|
34
35
|
Query: QueryIcon,
|
|
35
36
|
Entity: CubeIcon,
|
|
36
|
-
Channel:
|
|
37
|
+
Channel: ArrowsRightLeftIcon,
|
|
37
38
|
Team: UserGroupIcon,
|
|
38
39
|
User: UserIcon,
|
|
39
40
|
Language: BookOpenIcon,
|
|
@@ -68,8 +69,6 @@ function classNames(...classes: (string | boolean | undefined)[]) {
|
|
|
68
69
|
|
|
69
70
|
// Helper to construct URL from key if href is missing
|
|
70
71
|
const getUrlForItem = (node: any, key: string) => {
|
|
71
|
-
if (node.href) return node.href;
|
|
72
|
-
|
|
73
72
|
const parts = key.split(':');
|
|
74
73
|
if (parts.length < 2) return null; // Need at least type:id
|
|
75
74
|
|
|
@@ -83,8 +82,16 @@ const getUrlForItem = (node: any, key: string) => {
|
|
|
83
82
|
// Only show items that have a version to avoid duplicates
|
|
84
83
|
if (!version) return null;
|
|
85
84
|
|
|
85
|
+
// If node has href, use it, otherwise construct from key
|
|
86
|
+
if (node.href) return node.href;
|
|
87
|
+
|
|
86
88
|
// Pluralize type for URL if needed
|
|
87
|
-
|
|
89
|
+
let pluralType = type;
|
|
90
|
+
if (['event', 'command', 'domain', 'service', 'flow', 'container', 'channel'].includes(type)) {
|
|
91
|
+
pluralType = type + 's';
|
|
92
|
+
} else if (type === 'query') {
|
|
93
|
+
pluralType = 'queries';
|
|
94
|
+
}
|
|
88
95
|
|
|
89
96
|
return `/docs/${pluralType}/${id}/${version}`;
|
|
90
97
|
};
|
|
@@ -171,6 +178,7 @@ export default function SearchModal() {
|
|
|
171
178
|
Team: 0,
|
|
172
179
|
Container: 0,
|
|
173
180
|
Design: 0,
|
|
181
|
+
Channel: 0,
|
|
174
182
|
};
|
|
175
183
|
|
|
176
184
|
itemsToCount.forEach((item) => {
|
|
@@ -195,6 +203,7 @@ export default function SearchModal() {
|
|
|
195
203
|
if (counts.Service > 0) dynamicFilters.push({ id: 'Service', name: `Services (${counts.Service})` });
|
|
196
204
|
if (counts.Message > 0) dynamicFilters.push({ id: 'Message', name: `Messages (${counts.Message})` });
|
|
197
205
|
if (counts.Container > 0) dynamicFilters.push({ id: 'Container', name: `Containers (${counts.Container})` });
|
|
206
|
+
if (counts.Channel > 0) dynamicFilters.push({ id: 'Channel', name: `Channels (${counts.Channel})` });
|
|
198
207
|
if (counts.Design > 0) dynamicFilters.push({ id: 'Design', name: `Designs (${counts.Design})` });
|
|
199
208
|
if (counts.Team > 0) dynamicFilters.push({ id: 'Team', name: `Teams & Users (${counts.Team})` });
|
|
200
209
|
|
|
@@ -224,7 +233,7 @@ export default function SearchModal() {
|
|
|
224
233
|
const filteredItems = useMemo(() => {
|
|
225
234
|
if (query === '') {
|
|
226
235
|
// Show favorites when search is empty
|
|
227
|
-
if (favorites.length > 0) {
|
|
236
|
+
if (favorites.length > 0 && activeFilter === 'all') {
|
|
228
237
|
return favorites
|
|
229
238
|
.slice(0, 5)
|
|
230
239
|
.map((fav) => {
|
|
@@ -375,14 +384,14 @@ export default function SearchModal() {
|
|
|
375
384
|
<p className={classNames('text-sm font-medium', active ? 'text-gray-900' : 'text-gray-700')}>
|
|
376
385
|
{item.name}
|
|
377
386
|
</p>
|
|
378
|
-
<div className="flex items-
|
|
387
|
+
<div className="flex items-center gap-2">
|
|
379
388
|
<p
|
|
380
389
|
className={classNames('text-sm flex-shrink-0', active ? 'text-gray-700' : 'text-gray-500')}
|
|
381
390
|
>
|
|
382
391
|
{item.type}
|
|
383
392
|
</p>
|
|
384
393
|
{item.rawNode.summary && (
|
|
385
|
-
<p className={classNames('text-
|
|
394
|
+
<p className={classNames('text-sm truncate', active ? 'text-gray-600' : 'text-gray-400')}>
|
|
386
395
|
• {item.rawNode.summary}
|
|
387
396
|
</p>
|
|
388
397
|
)}
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
Database,
|
|
15
15
|
Waypoints,
|
|
16
16
|
SquareMousePointer,
|
|
17
|
+
ListOrdered,
|
|
18
|
+
ArrowLeftRight,
|
|
17
19
|
} from 'lucide-react';
|
|
18
20
|
import type { NavNode } from './sidebar-builder';
|
|
19
21
|
|
|
@@ -28,6 +30,7 @@ const getBadgeClasses = (badge: string): string => {
|
|
|
28
30
|
query: 'bg-purple-100 text-purple-700',
|
|
29
31
|
message: 'bg-indigo-100 text-indigo-700',
|
|
30
32
|
design: 'bg-teal-100 text-teal-700',
|
|
33
|
+
channel: 'bg-indigo-100 text-indigo-700',
|
|
31
34
|
};
|
|
32
35
|
return badgeColors[badge.toLowerCase()] || 'bg-gray-100 text-gray-600';
|
|
33
36
|
};
|
|
@@ -77,6 +80,7 @@ export default function SearchBar({ nodes, onSelectResult, onSearchChange }: Pro
|
|
|
77
80
|
};
|
|
78
81
|
|
|
79
82
|
const filterTypes = [
|
|
83
|
+
{ key: 'channel', label: 'Channels', badge: 'Channel', icon: ArrowLeftRight },
|
|
80
84
|
{ key: 'command', label: 'Commands', badge: 'Command', icon: MessageSquare },
|
|
81
85
|
{ key: 'container', label: 'Data Stores', badge: 'Container', icon: Database },
|
|
82
86
|
{ key: 'design', label: 'Designs', badge: 'Design', icon: SquareMousePointer },
|
|
@@ -25,6 +25,7 @@ const getBadgeClasses = (badge: string): string => {
|
|
|
25
25
|
query: 'bg-purple-100 text-purple-700',
|
|
26
26
|
message: 'bg-indigo-100 text-indigo-700',
|
|
27
27
|
design: 'bg-teal-100 text-teal-700',
|
|
28
|
+
channel: 'bg-indigo-100 text-indigo-700',
|
|
28
29
|
};
|
|
29
30
|
return badgeColors[badge.toLowerCase()] || 'bg-gray-100 text-gray-600';
|
|
30
31
|
};
|
|
@@ -786,17 +787,17 @@ export default function NestedSideBar() {
|
|
|
786
787
|
</div>
|
|
787
788
|
<div className="flex items-center gap-1 flex-shrink-0">
|
|
788
789
|
{canFavorite && (
|
|
789
|
-
<
|
|
790
|
+
<div
|
|
790
791
|
onClick={handleStarClick}
|
|
791
792
|
className={cn(
|
|
792
|
-
'flex items-center justify-center w-5 h-5 rounded transition-colors',
|
|
793
|
+
'flex items-center justify-center w-5 h-5 rounded transition-colors cursor-pointer',
|
|
793
794
|
isFav
|
|
794
795
|
? 'text-amber-400 hover:text-amber-500'
|
|
795
796
|
: 'text-gray-300 opacity-0 group-hover:opacity-100 hover:text-amber-400'
|
|
796
797
|
)}
|
|
797
798
|
>
|
|
798
799
|
<Star className={cn('w-3.5 h-3.5', isFav && 'fill-current')} />
|
|
799
|
-
</
|
|
800
|
+
</div>
|
|
800
801
|
)}
|
|
801
802
|
{itemHasChildren && (
|
|
802
803
|
<span className="flex items-center justify-center w-5 h-5 text-gray-400 group-hover:text-black group-hover:translate-x-0.5 transition-transform">
|
|
@@ -1038,15 +1039,15 @@ export default function NestedSideBar() {
|
|
|
1038
1039
|
{fav.badge}
|
|
1039
1040
|
</span>
|
|
1040
1041
|
)}
|
|
1041
|
-
<
|
|
1042
|
+
<div
|
|
1042
1043
|
onClick={(e) => {
|
|
1043
1044
|
e.stopPropagation();
|
|
1044
1045
|
if (node) toggleFavorite(fav.nodeKey, node);
|
|
1045
1046
|
}}
|
|
1046
|
-
className="flex items-center justify-center w-5 h-5 text-amber-400 hover:text-amber-500 rounded transition-colors"
|
|
1047
|
+
className="flex items-center justify-center w-5 h-5 text-amber-400 hover:text-amber-500 rounded transition-colors cursor-pointer"
|
|
1047
1048
|
>
|
|
1048
1049
|
<Star className="w-3.5 h-3.5 fill-current" />
|
|
1049
|
-
</
|
|
1050
|
+
</div>
|
|
1050
1051
|
{node?.pages && node.pages.length > 0 && (
|
|
1051
1052
|
<span className="flex items-center justify-center w-5 h-5 text-gray-400 group-hover:text-black">
|
|
1052
1053
|
<ChevronRight className="w-4 h-4" />
|
|
@@ -15,6 +15,7 @@ import { buildContainerNode } from './builders/container';
|
|
|
15
15
|
import { buildFlowNode } from './builders/flow';
|
|
16
16
|
import config from '@config';
|
|
17
17
|
import { getDesigns } from '@utils/collections/designs';
|
|
18
|
+
import { getChannels } from '@utils/collections/channels';
|
|
18
19
|
|
|
19
20
|
export type { NavigationData, NavNode, ChildRef };
|
|
20
21
|
|
|
@@ -29,16 +30,18 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
29
30
|
return memoryCache;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
const [domains, services, { events, commands, queries }, containers, flows, users, teams, designs] =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
const [domains, services, { events, commands, queries }, containers, flows, users, teams, designs, channels] =
|
|
34
|
+
await Promise.all([
|
|
35
|
+
getDomains({ getAllVersions: false, includeServicesInSubdomains: false }),
|
|
36
|
+
getServices({ getAllVersions: false }),
|
|
37
|
+
getMessages({ getAllVersions: false }),
|
|
38
|
+
getContainers({ getAllVersions: false }),
|
|
39
|
+
getFlows({ getAllVersions: false }),
|
|
40
|
+
getUsers(),
|
|
41
|
+
getTeams(),
|
|
42
|
+
getDesigns(),
|
|
43
|
+
getChannels({ getAllVersions: false }),
|
|
44
|
+
]);
|
|
42
45
|
|
|
43
46
|
// Calculate derived lists to avoid extra fetches
|
|
44
47
|
const allSubDomainIds = new Set(domains.flatMap((d) => (d.data.domains || []).map((sd: any) => sd.data.id)));
|
|
@@ -178,6 +181,30 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
178
181
|
{} as Record<string, NavNode>
|
|
179
182
|
);
|
|
180
183
|
|
|
184
|
+
const channelNodes = channels.reduce(
|
|
185
|
+
(acc, channel) => {
|
|
186
|
+
acc[`channel:${channel.data.id}:${channel.data.version}`] = {
|
|
187
|
+
type: 'item',
|
|
188
|
+
title: channel.data.name,
|
|
189
|
+
badge: 'Channel',
|
|
190
|
+
summary: channel.data.summary,
|
|
191
|
+
href: buildUrl(`/docs/${channel.collection}/${channel.data.id}/${channel.data.version}`),
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
if (channel.data.latestVersion === channel.data.version) {
|
|
195
|
+
acc[`channel:${channel.data.id}`] = {
|
|
196
|
+
type: 'item',
|
|
197
|
+
title: channel.data.name,
|
|
198
|
+
badge: 'Channel',
|
|
199
|
+
summary: channel.data.summary,
|
|
200
|
+
href: buildUrl(`/docs/${channel.collection}/${channel.data.id}/${channel.data.version}`),
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return acc;
|
|
204
|
+
},
|
|
205
|
+
{} as Record<string, NavNode>
|
|
206
|
+
);
|
|
207
|
+
|
|
181
208
|
const teamNodes = teams.reduce(
|
|
182
209
|
(acc, team) => {
|
|
183
210
|
acc[`team:${team.data.id}`] = {
|
|
@@ -273,6 +300,13 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
273
300
|
pages: users.map((user) => `user:${user.data.id}`),
|
|
274
301
|
});
|
|
275
302
|
|
|
303
|
+
const channelList = createLeaf(channels, {
|
|
304
|
+
type: 'item',
|
|
305
|
+
title: 'Channels',
|
|
306
|
+
icon: 'ArrowRightLeft',
|
|
307
|
+
pages: channels.map((channel) => `channel:${channel.data.id}:${channel.data.version}`),
|
|
308
|
+
});
|
|
309
|
+
|
|
276
310
|
const messagesChildren = ['list:events', 'list:commands', 'list:queries'].filter(
|
|
277
311
|
(key, index) => [eventsList, commandsList, queriesList][index] !== undefined
|
|
278
312
|
);
|
|
@@ -303,12 +337,22 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
303
337
|
'list:domains',
|
|
304
338
|
'list:services',
|
|
305
339
|
'list:messages',
|
|
340
|
+
'list:channels',
|
|
306
341
|
'list:flows',
|
|
307
342
|
'list:containers',
|
|
308
343
|
'list:designs',
|
|
309
344
|
'list:people',
|
|
310
345
|
];
|
|
311
|
-
const allChildrenNodes = [
|
|
346
|
+
const allChildrenNodes = [
|
|
347
|
+
domainsList,
|
|
348
|
+
servicesList,
|
|
349
|
+
messagesList,
|
|
350
|
+
channelList,
|
|
351
|
+
flowsList,
|
|
352
|
+
containersList,
|
|
353
|
+
designsList,
|
|
354
|
+
peopleList,
|
|
355
|
+
];
|
|
312
356
|
|
|
313
357
|
const validAllChildren = allChildrenKeys.filter((_, idx) => allChildrenNodes[idx] !== undefined);
|
|
314
358
|
|
|
@@ -334,6 +378,7 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
334
378
|
...(designsList ? { 'list:designs': designsList } : {}),
|
|
335
379
|
...(teamsList ? { 'list:teams': teamsList } : {}),
|
|
336
380
|
...(usersList ? { 'list:users': usersList } : {}),
|
|
381
|
+
...(channelList ? { 'list:channels': channelList as NavNode } : {}),
|
|
337
382
|
...(peopleList ? { 'list:people': peopleList as NavNode } : {}),
|
|
338
383
|
...(allList ? { 'list:all': allList as NavNode } : {}),
|
|
339
384
|
};
|
|
@@ -343,6 +388,7 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
343
388
|
...domainNodes,
|
|
344
389
|
...serviceNodes,
|
|
345
390
|
...messageNodes,
|
|
391
|
+
...channelNodes,
|
|
346
392
|
...containerNodes,
|
|
347
393
|
...flowNodes,
|
|
348
394
|
...userNodes,
|
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.0.0-beta.
|
|
9
|
+
"version": "3.0.0-beta.5",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"react": "^18.3.1",
|
|
92
92
|
"react-dom": "^18.3.1",
|
|
93
93
|
"react-markdown": "^10.1.0",
|
|
94
|
-
"react-syntax-highlighter": "^
|
|
94
|
+
"react-syntax-highlighter": "^16.1.0",
|
|
95
95
|
"rehype-autolink-headings": "^7.1.0",
|
|
96
96
|
"rehype-expressive-code": "^0.41.3",
|
|
97
97
|
"rehype-slug": "^6.0.0",
|