@eventcatalog/core 4.0.0-beta.0 → 4.0.0-beta.2
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/bin/eventcatalog.config.d.ts +1 -1
- 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-HN45LKSL.js → chunk-24K6JJV5.js} +1 -1
- package/dist/{chunk-7PMNFOIL.js → chunk-7NOXTLJP.js} +1 -1
- package/dist/{chunk-D3MI3OFO.js → chunk-FLLYUYF2.js} +1 -1
- package/dist/{chunk-NAOHQDLC.js → chunk-IK6AW6IC.js} +1 -1
- package/dist/{chunk-JMADW4J7.js → chunk-JRCXVY3E.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +40 -7
- package/dist/eventcatalog.config.d.ts +40 -7
- 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/ChatPanel/ChatPanel.tsx +16 -2
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +6 -57
- package/eventcatalog/src/content.config.ts +2 -0
- package/eventcatalog/src/enterprise/ai/chat-api.ts +4 -2
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +26 -7
- package/eventcatalog/src/enterprise/feature.ts +0 -4
- package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +0 -9
- package/eventcatalog/src/enterprise/tools/catalog-tools.ts +6 -1
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +343 -282
- package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +6 -81
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +0 -8
- package/eventcatalog/src/stores/sidebar-store/state.ts +4 -4
- package/eventcatalog/src/utils/feature.ts +0 -2
- package/package.json +4 -4
- package/eventcatalog/src/enterprise/print/_message.data.ts +0 -63
- package/eventcatalog/src/enterprise/print/components/PrintHeader.astro +0 -183
- package/eventcatalog/src/enterprise/print/components/PrintLayout.astro +0 -271
- package/eventcatalog/src/enterprise/print/components/PrintParticipantsTable.astro +0 -64
- package/eventcatalog/src/enterprise/print/components/PrintSchemaPropertiesTable.astro +0 -65
- package/eventcatalog/src/enterprise/print/components/PrintSchemaViewer.tsx +0 -55
- package/eventcatalog/src/enterprise/print/components/PrintSection.astro +0 -17
- package/eventcatalog/src/enterprise/print/message.astro +0 -353
- package/eventcatalog/src/enterprise/print/utils.ts +0 -58
- package/eventcatalog/src/utils/sidebar-visibility.ts +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { Config
|
|
1
|
+
export type { Config } from '../dist/eventcatalog.config.js';
|
|
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
140
140
|
var import_os = __toESM(require("os"), 1);
|
|
141
141
|
|
|
142
142
|
// package.json
|
|
143
|
-
var version = "4.0.0-beta.
|
|
143
|
+
var version = "4.0.0-beta.2";
|
|
144
144
|
|
|
145
145
|
// src/constants.ts
|
|
146
146
|
var VERSION = version;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-7NOXTLJP.js";
|
|
4
|
+
import "../chunk-24K6JJV5.js";
|
|
5
5
|
import "../chunk-DAOXTQVS.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-FLLYUYF2.js";
|
|
7
7
|
import "../chunk-6QENHZZP.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
|
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
144
144
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
145
145
|
|
|
146
146
|
// package.json
|
|
147
|
-
var version = "4.0.0-beta.
|
|
147
|
+
var version = "4.0.0-beta.2";
|
|
148
148
|
|
|
149
149
|
// src/constants.ts
|
|
150
150
|
var VERSION = version;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
type SideBarConfig = {
|
|
2
|
-
id: string;
|
|
3
|
-
visible: boolean;
|
|
4
|
-
};
|
|
5
1
|
type ResourceDependency = {
|
|
6
2
|
id: string;
|
|
7
3
|
version?: string;
|
|
@@ -46,6 +42,39 @@ type PagesConfiguration = {
|
|
|
46
42
|
pages?: string[];
|
|
47
43
|
};
|
|
48
44
|
type NavigationPage = string | PagesConfiguration;
|
|
45
|
+
type VerticalNavigationItemConfig = {
|
|
46
|
+
/**
|
|
47
|
+
* Built-in item ids include: home, docs, catalog, schemas, schema-insights,
|
|
48
|
+
* teams, users, settings, studio. Route ids such as /schemas/explorer are
|
|
49
|
+
* also supported for built-ins.
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
label?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Any icon exported by lucide-react, for example House, FileCode, BookOpen.
|
|
55
|
+
*/
|
|
56
|
+
icon?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Required for custom items. Built-in items provide their own href.
|
|
59
|
+
*/
|
|
60
|
+
href?: string;
|
|
61
|
+
visible?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* One or more paths that should mark this item active. Defaults to exact href matching
|
|
64
|
+
* for custom items; built-in items provide their own active matching.
|
|
65
|
+
*/
|
|
66
|
+
match?: string | string[];
|
|
67
|
+
};
|
|
68
|
+
type VerticalNavigationGroupConfig = {
|
|
69
|
+
id: string;
|
|
70
|
+
label?: string;
|
|
71
|
+
visible?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Defaults to top. Use bottom for settings-style groups anchored below the main nav.
|
|
74
|
+
*/
|
|
75
|
+
position?: 'top' | 'bottom';
|
|
76
|
+
items?: VerticalNavigationItemConfig[];
|
|
77
|
+
};
|
|
49
78
|
type GeneratorConfig = string | Record<string, unknown> | [string, Record<string, unknown>];
|
|
50
79
|
type DirectoryEntry = {
|
|
51
80
|
id: string;
|
|
@@ -231,9 +260,13 @@ interface Config {
|
|
|
231
260
|
};
|
|
232
261
|
mdxOptimize?: boolean;
|
|
233
262
|
compress?: boolean;
|
|
234
|
-
sidebar?: SideBarConfig[];
|
|
235
263
|
navigation?: {
|
|
236
|
-
pages
|
|
264
|
+
pages?: NavigationPage[];
|
|
265
|
+
/**
|
|
266
|
+
* Replaces the default vertical application navigation rail when provided.
|
|
267
|
+
* If omitted, EventCatalog renders the default navigation.
|
|
268
|
+
*/
|
|
269
|
+
groups?: VerticalNavigationGroupConfig[];
|
|
237
270
|
};
|
|
238
271
|
docs?: {
|
|
239
272
|
sidebar: {
|
|
@@ -328,4 +361,4 @@ interface Config {
|
|
|
328
361
|
generators?: GeneratorConfig[];
|
|
329
362
|
}
|
|
330
363
|
|
|
331
|
-
export type { Config
|
|
364
|
+
export type { Config };
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
type SideBarConfig = {
|
|
2
|
-
id: string;
|
|
3
|
-
visible: boolean;
|
|
4
|
-
};
|
|
5
1
|
type ResourceDependency = {
|
|
6
2
|
id: string;
|
|
7
3
|
version?: string;
|
|
@@ -46,6 +42,39 @@ type PagesConfiguration = {
|
|
|
46
42
|
pages?: string[];
|
|
47
43
|
};
|
|
48
44
|
type NavigationPage = string | PagesConfiguration;
|
|
45
|
+
type VerticalNavigationItemConfig = {
|
|
46
|
+
/**
|
|
47
|
+
* Built-in item ids include: home, docs, catalog, schemas, schema-insights,
|
|
48
|
+
* teams, users, settings, studio. Route ids such as /schemas/explorer are
|
|
49
|
+
* also supported for built-ins.
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
label?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Any icon exported by lucide-react, for example House, FileCode, BookOpen.
|
|
55
|
+
*/
|
|
56
|
+
icon?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Required for custom items. Built-in items provide their own href.
|
|
59
|
+
*/
|
|
60
|
+
href?: string;
|
|
61
|
+
visible?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* One or more paths that should mark this item active. Defaults to exact href matching
|
|
64
|
+
* for custom items; built-in items provide their own active matching.
|
|
65
|
+
*/
|
|
66
|
+
match?: string | string[];
|
|
67
|
+
};
|
|
68
|
+
type VerticalNavigationGroupConfig = {
|
|
69
|
+
id: string;
|
|
70
|
+
label?: string;
|
|
71
|
+
visible?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Defaults to top. Use bottom for settings-style groups anchored below the main nav.
|
|
74
|
+
*/
|
|
75
|
+
position?: 'top' | 'bottom';
|
|
76
|
+
items?: VerticalNavigationItemConfig[];
|
|
77
|
+
};
|
|
49
78
|
type GeneratorConfig = string | Record<string, unknown> | [string, Record<string, unknown>];
|
|
50
79
|
type DirectoryEntry = {
|
|
51
80
|
id: string;
|
|
@@ -231,9 +260,13 @@ interface Config {
|
|
|
231
260
|
};
|
|
232
261
|
mdxOptimize?: boolean;
|
|
233
262
|
compress?: boolean;
|
|
234
|
-
sidebar?: SideBarConfig[];
|
|
235
263
|
navigation?: {
|
|
236
|
-
pages
|
|
264
|
+
pages?: NavigationPage[];
|
|
265
|
+
/**
|
|
266
|
+
* Replaces the default vertical application navigation rail when provided.
|
|
267
|
+
* If omitted, EventCatalog renders the default navigation.
|
|
268
|
+
*/
|
|
269
|
+
groups?: VerticalNavigationGroupConfig[];
|
|
237
270
|
};
|
|
238
271
|
docs?: {
|
|
239
272
|
sidebar: {
|
|
@@ -328,4 +361,4 @@ interface Config {
|
|
|
328
361
|
generators?: GeneratorConfig[];
|
|
329
362
|
}
|
|
330
363
|
|
|
331
|
-
export type { Config
|
|
364
|
+
export type { Config };
|
package/dist/eventcatalog.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7NOXTLJP.js";
|
|
4
4
|
import {
|
|
5
5
|
runMigrations
|
|
6
6
|
} from "./chunk-XUAF2H54.js";
|
|
7
7
|
import "./chunk-CA4U2JP7.js";
|
|
8
8
|
import {
|
|
9
9
|
generate
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IK6AW6IC.js";
|
|
11
11
|
import {
|
|
12
12
|
logger
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JRCXVY3E.js";
|
|
14
14
|
import {
|
|
15
15
|
resolve_catalog_dependencies_default
|
|
16
16
|
} from "./chunk-LHR4G2UO.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
watch
|
|
22
22
|
} from "./chunk-O3Y2G6CY.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-24K6JJV5.js";
|
|
24
24
|
import "./chunk-DAOXTQVS.js";
|
|
25
25
|
import {
|
|
26
26
|
catalogToAstro
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import "./chunk-VC6VUJIX.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FLLYUYF2.js";
|
|
32
32
|
import {
|
|
33
33
|
linkCoreNodeModules,
|
|
34
34
|
resolveInstalledCoreNodeModules
|
package/dist/generate.cjs
CHANGED
|
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
108
108
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
109
109
|
|
|
110
110
|
// package.json
|
|
111
|
-
var version = "4.0.0-beta.
|
|
111
|
+
var version = "4.0.0-beta.2";
|
|
112
112
|
|
|
113
113
|
// src/constants.ts
|
|
114
114
|
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-IK6AW6IC.js";
|
|
4
|
+
import "./chunk-JRCXVY3E.js";
|
|
5
|
+
import "./chunk-FLLYUYF2.js";
|
|
6
6
|
import "./chunk-6QENHZZP.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -171,6 +171,19 @@ const suggestedQuestionsConfig: QuestionConfig[] = [
|
|
|
171
171
|
{ label: 'Who owns this domain?', prompt: 'Who owns this domain and how do I contact them?' },
|
|
172
172
|
],
|
|
173
173
|
},
|
|
174
|
+
// Systems page
|
|
175
|
+
{
|
|
176
|
+
pattern: /^\/(docs|visualiser|architecture)\/systems\/.+/,
|
|
177
|
+
questions: [
|
|
178
|
+
{ label: 'What services are in this system?', prompt: 'What services belong to this system?' },
|
|
179
|
+
{ label: 'What flows are in this system?', prompt: 'What flows belong to this system?' },
|
|
180
|
+
{
|
|
181
|
+
label: 'What does this system connect to?',
|
|
182
|
+
prompt: 'What systems, services, actors, or resources does this system connect to?',
|
|
183
|
+
},
|
|
184
|
+
{ label: 'Who owns this system?', prompt: 'Who owns this system and how do I contact them?' },
|
|
185
|
+
],
|
|
186
|
+
},
|
|
174
187
|
// Business Flows / Workflows (must be before general visualiser pattern)
|
|
175
188
|
{
|
|
176
189
|
pattern: /^\/(docs|visualiser)\/flows\/.+/,
|
|
@@ -551,7 +564,7 @@ const ChatPanel = ({ isOpen, onClose }: ChatPanelProps) => {
|
|
|
551
564
|
// Memoize page context to avoid recalculating on every render
|
|
552
565
|
const pageContext = useMemo(() => {
|
|
553
566
|
const match = pathname.match(
|
|
554
|
-
/^\/(docs|visualiser|architecture)\/(events|services|commands|queries|flows|domains|channels|entities|containers|data-products)\/([^/]+)(?:\/([^/]+))?/
|
|
567
|
+
/^\/(docs|visualiser|architecture)\/(events|services|commands|queries|flows|domains|systems|channels|entities|containers|data-products)\/([^/]+)(?:\/([^/]+))?/
|
|
555
568
|
);
|
|
556
569
|
if (match) {
|
|
557
570
|
const [, , collection, id, version] = match;
|
|
@@ -562,6 +575,7 @@ const ChatPanel = ({ isOpen, onClose }: ChatPanelProps) => {
|
|
|
562
575
|
queries: 'Query',
|
|
563
576
|
flows: 'Flow',
|
|
564
577
|
domains: 'Domain',
|
|
578
|
+
systems: 'System',
|
|
565
579
|
channels: 'Channel',
|
|
566
580
|
entities: 'Entity',
|
|
567
581
|
containers: 'Container',
|
|
@@ -763,7 +777,7 @@ const ChatPanel = ({ isOpen, onClose }: ChatPanelProps) => {
|
|
|
763
777
|
}}
|
|
764
778
|
>
|
|
765
779
|
{/* Header */}
|
|
766
|
-
<div className="flex-none shrink-0
|
|
780
|
+
<div className="flex-none shrink-0 border-b border-[rgb(var(--ec-page-border))]">
|
|
767
781
|
<div className="flex items-center justify-between px-4 py-3">
|
|
768
782
|
<div className="flex items-center space-x-2">
|
|
769
783
|
<BookOpen size={16} className="text-[rgb(var(--ec-accent))]" />
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
2
|
-
import {
|
|
3
|
-
Copy,
|
|
4
|
-
FileText,
|
|
5
|
-
MessageCircleQuestion,
|
|
6
|
-
ChevronDownIcon,
|
|
7
|
-
ExternalLink,
|
|
8
|
-
PenSquareIcon,
|
|
9
|
-
RssIcon,
|
|
10
|
-
PrinterIcon,
|
|
11
|
-
} from 'lucide-react';
|
|
2
|
+
import { Copy, FileText, Sparkles, ChevronDownIcon, ExternalLink, PenSquareIcon, RssIcon } from 'lucide-react';
|
|
12
3
|
import React, { useState, isValidElement } from 'react';
|
|
13
4
|
import type { Schema } from '@utils/collections/schemas';
|
|
14
5
|
import { buildUrl, toMarkdownUrl } from '@utils/url-builder';
|
|
@@ -64,7 +55,6 @@ export function CopyPageMenu({
|
|
|
64
55
|
rssFeedEnabled = false,
|
|
65
56
|
preferChatAsDefault = false,
|
|
66
57
|
chatButtonText = 'Ask',
|
|
67
|
-
printUrl,
|
|
68
58
|
variant = 'menu',
|
|
69
59
|
}: {
|
|
70
60
|
schemas: Schema[];
|
|
@@ -75,7 +65,6 @@ export function CopyPageMenu({
|
|
|
75
65
|
rssFeedEnabled: boolean;
|
|
76
66
|
preferChatAsDefault?: boolean;
|
|
77
67
|
chatButtonText?: string;
|
|
78
|
-
printUrl?: string;
|
|
79
68
|
variant?: 'menu' | 'toolbar';
|
|
80
69
|
}) {
|
|
81
70
|
// Define available actions
|
|
@@ -86,7 +75,6 @@ export function CopyPageMenu({
|
|
|
86
75
|
viewMarkdown: markdownDownloadEnabled,
|
|
87
76
|
chat: chatEnabled,
|
|
88
77
|
rssFeed: rssFeedEnabled,
|
|
89
|
-
exportPDF: !!printUrl,
|
|
90
78
|
};
|
|
91
79
|
|
|
92
80
|
// Check if any actions are available
|
|
@@ -108,7 +96,7 @@ export function CopyPageMenu({
|
|
|
108
96
|
return {
|
|
109
97
|
type: 'chat',
|
|
110
98
|
text: chatButtonText,
|
|
111
|
-
icon:
|
|
99
|
+
icon: Sparkles,
|
|
112
100
|
};
|
|
113
101
|
}
|
|
114
102
|
if (availableActions.copyMarkdown) {
|
|
@@ -143,7 +131,7 @@ export function CopyPageMenu({
|
|
|
143
131
|
return {
|
|
144
132
|
type: 'chat',
|
|
145
133
|
text: chatButtonText,
|
|
146
|
-
icon:
|
|
134
|
+
icon: Sparkles,
|
|
147
135
|
};
|
|
148
136
|
}
|
|
149
137
|
if (availableActions.rssFeed) {
|
|
@@ -153,13 +141,6 @@ export function CopyPageMenu({
|
|
|
153
141
|
icon: RssIcon,
|
|
154
142
|
};
|
|
155
143
|
}
|
|
156
|
-
if (availableActions.exportPDF) {
|
|
157
|
-
return {
|
|
158
|
-
type: 'exportPDF',
|
|
159
|
-
text: 'Export to PDF',
|
|
160
|
-
icon: PrinterIcon,
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
144
|
return null;
|
|
164
145
|
};
|
|
165
146
|
|
|
@@ -233,9 +214,6 @@ export function CopyPageMenu({
|
|
|
233
214
|
// Dispatch custom event to open chat panel instead of navigating
|
|
234
215
|
window.dispatchEvent(new CustomEvent('eventcatalog:open-chat'));
|
|
235
216
|
break;
|
|
236
|
-
case 'exportPDF':
|
|
237
|
-
window.open(printUrl, '_blank');
|
|
238
|
-
break;
|
|
239
217
|
}
|
|
240
218
|
};
|
|
241
219
|
|
|
@@ -253,14 +231,12 @@ export function CopyPageMenu({
|
|
|
253
231
|
availableActions.viewMarkdown ||
|
|
254
232
|
availableActions.copySchemas ||
|
|
255
233
|
availableActions.rssFeed ||
|
|
256
|
-
availableActions.exportPDF ||
|
|
257
234
|
availableActions.editPage;
|
|
258
235
|
|
|
259
236
|
if (variant === 'toolbar') {
|
|
260
237
|
if (!hasToolbarActions) return null;
|
|
261
238
|
|
|
262
|
-
const moreActionsAvailable =
|
|
263
|
-
availableActions.copySchemas || availableActions.rssFeed || availableActions.exportPDF || availableActions.editPage;
|
|
239
|
+
const moreActionsAvailable = availableActions.copySchemas || availableActions.rssFeed || availableActions.editPage;
|
|
264
240
|
|
|
265
241
|
return (
|
|
266
242
|
<div className="not-prose flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-[rgb(var(--ec-page-text-muted))]">
|
|
@@ -270,7 +246,7 @@ export function CopyPageMenu({
|
|
|
270
246
|
onClick={() => window.dispatchEvent(new CustomEvent('eventcatalog:open-chat'))}
|
|
271
247
|
className={actionButtonClass}
|
|
272
248
|
>
|
|
273
|
-
<
|
|
249
|
+
<Sparkles className={actionIconClass} />
|
|
274
250
|
Ask a question
|
|
275
251
|
</button>
|
|
276
252
|
)}
|
|
@@ -356,20 +332,6 @@ export function CopyPageMenu({
|
|
|
356
332
|
</DropdownMenu.Item>
|
|
357
333
|
)}
|
|
358
334
|
|
|
359
|
-
{availableActions.exportPDF && (
|
|
360
|
-
<DropdownMenu.Item
|
|
361
|
-
className="cursor-pointer rounded-2xl outline-hidden transition-colors duration-150 hover:bg-[rgb(var(--ec-dropdown-hover))] data-[highlighted]:bg-[rgb(var(--ec-dropdown-hover))]"
|
|
362
|
-
onSelect={() => window.open(printUrl, '_blank')}
|
|
363
|
-
>
|
|
364
|
-
<MenuItemContent
|
|
365
|
-
icon={PrinterIcon}
|
|
366
|
-
title="Export to PDF"
|
|
367
|
-
description="Open print-friendly version"
|
|
368
|
-
external={true}
|
|
369
|
-
/>
|
|
370
|
-
</DropdownMenu.Item>
|
|
371
|
-
)}
|
|
372
|
-
|
|
373
335
|
{availableActions.editPage && (
|
|
374
336
|
<DropdownMenu.Item
|
|
375
337
|
className="cursor-pointer rounded-2xl outline-hidden transition-colors duration-150 hover:bg-[rgb(var(--ec-dropdown-hover))] data-[highlighted]:bg-[rgb(var(--ec-dropdown-hover))]"
|
|
@@ -427,11 +389,7 @@ export function CopyPageMenu({
|
|
|
427
389
|
className="cursor-pointer rounded-2xl outline-hidden transition-colors duration-150 hover:bg-[rgb(var(--ec-dropdown-hover))] data-[highlighted]:bg-[rgb(var(--ec-dropdown-hover))]"
|
|
428
390
|
onSelect={() => window.dispatchEvent(new CustomEvent('eventcatalog:open-chat'))}
|
|
429
391
|
>
|
|
430
|
-
<MenuItemContent
|
|
431
|
-
icon={MessageCircleQuestion}
|
|
432
|
-
title="EventCatalog Assistant"
|
|
433
|
-
description="Ask questions about this page"
|
|
434
|
-
/>
|
|
392
|
+
<MenuItemContent icon={Sparkles} title="EventCatalog Assistant" description="Ask questions about this page" />
|
|
435
393
|
</DropdownMenu.Item>
|
|
436
394
|
<DropdownMenu.Separator className="mx-3 my-3 h-px bg-[rgb(var(--ec-dropdown-border)/0.8)]" />
|
|
437
395
|
</>
|
|
@@ -502,15 +460,6 @@ export function CopyPageMenu({
|
|
|
502
460
|
</DropdownMenu.Item>
|
|
503
461
|
)}
|
|
504
462
|
|
|
505
|
-
{availableActions.exportPDF && (
|
|
506
|
-
<DropdownMenu.Item
|
|
507
|
-
className="cursor-pointer rounded-2xl outline-hidden transition-colors duration-150 hover:bg-[rgb(var(--ec-dropdown-hover))] data-[highlighted]:bg-[rgb(var(--ec-dropdown-hover))]"
|
|
508
|
-
onSelect={() => window.open(printUrl, '_blank')}
|
|
509
|
-
>
|
|
510
|
-
<MenuItemContent icon={PrinterIcon} title="Export to PDF" description="Open print-friendly version" external={true} />
|
|
511
|
-
</DropdownMenu.Item>
|
|
512
|
-
)}
|
|
513
|
-
|
|
514
463
|
{availableActions.editPage && (
|
|
515
464
|
<>
|
|
516
465
|
<DropdownMenu.Separator className="mx-3 my-3 h-px bg-[rgb(var(--ec-dropdown-border)/0.8)]" />
|
|
@@ -491,6 +491,8 @@ const services = defineCollection({
|
|
|
491
491
|
'domains/*/subdomains/*/services/*/versioned/*/index.(md|mdx)',
|
|
492
492
|
|
|
493
493
|
// Capture services inside systems
|
|
494
|
+
'systems/*/services/*/index.(md|mdx)',
|
|
495
|
+
'systems/*/services/*/versioned/*/index.(md|mdx)',
|
|
494
496
|
'domains/*/systems/*/services/*/index.(md|mdx)',
|
|
495
497
|
'domains/*/systems/*/services/*/versioned/*/index.(md|mdx)',
|
|
496
498
|
|
|
@@ -61,7 +61,7 @@ try {
|
|
|
61
61
|
const builtInToolsMetadata = [
|
|
62
62
|
{
|
|
63
63
|
name: 'getResources',
|
|
64
|
-
description: 'Get events, services, commands, queries, flows, domains, channels, entities from EventCatalog',
|
|
64
|
+
description: 'Get events, services, commands, queries, flows, domains, systems, channels, entities from EventCatalog',
|
|
65
65
|
},
|
|
66
66
|
{ name: 'getResource', description: 'Get a specific resource by its id and version' },
|
|
67
67
|
{ name: 'getProducersAndConsumersFromSchema', description: 'Get the producers and consumers for a schema' },
|
|
@@ -101,6 +101,8 @@ There are many different resource types in EventCatalog, including:
|
|
|
101
101
|
- example docs url: /docs/services/MyService/1.0.0
|
|
102
102
|
- Domains (collection name 'domains') (business capabilities or functional areas)
|
|
103
103
|
- example docs url: /docs/domains/MyDomain/1.0.0
|
|
104
|
+
- Systems (collection name 'systems') (business capabilities or functional areas)
|
|
105
|
+
- example docs url: /docs/systems/MySystem/1.0.0
|
|
104
106
|
- Flows (collection name 'flows') (state machines)
|
|
105
107
|
- example docs url: /docs/flows/MyFlow/1.0.0
|
|
106
108
|
- Channels (collection name 'channels') (communication channels)
|
|
@@ -340,7 +342,7 @@ export const POST = async ({ request }: APIContext<{ question: string; messages:
|
|
|
340
342
|
resourceVersion: z.string().describe('The version of the resource to get the architecture diagram for'),
|
|
341
343
|
resourceCollection: visualiserCollectionSchema
|
|
342
344
|
.describe(
|
|
343
|
-
'The collection of the resource (events, commands, queries, services, domains, flows, containers, data-products)'
|
|
345
|
+
'The collection of the resource (events, commands, queries, services, domains, systems, flows, containers, data-products)'
|
|
344
346
|
)
|
|
345
347
|
.default('services'),
|
|
346
348
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
|
-
import { render } from 'astro:content';
|
|
3
|
+
import { getEntry, render } from 'astro:content';
|
|
4
4
|
import config from '@config';
|
|
5
5
|
import { AlignLeftIcon, UserIcon, UsersIcon } from 'lucide-react';
|
|
6
6
|
|
|
@@ -28,6 +28,26 @@ const nodeGraphs =
|
|
|
28
28
|
return nodeGraph.id && nodeGraph.version && nodeGraph.type;
|
|
29
29
|
}) || [];
|
|
30
30
|
|
|
31
|
+
const resolvedNodeGraphs = await Promise.all(
|
|
32
|
+
nodeGraphs.map(async (nodeGraph: any) => {
|
|
33
|
+
const collection = resourceToCollectionMap[nodeGraph.type as keyof typeof resourceToCollectionMap];
|
|
34
|
+
const domain = collection === 'domains' ? await getEntry('domains', `${nodeGraph.id}-${nodeGraph.version}`) : undefined;
|
|
35
|
+
const hasSystems = ((domain?.data as any)?.systems || []).length > 0;
|
|
36
|
+
const graphCollection = hasSystems ? 'domains-systems-context' : collection;
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
...nodeGraph,
|
|
40
|
+
collection,
|
|
41
|
+
graphCollection,
|
|
42
|
+
title: nodeGraph.title ?? (hasSystems ? 'System Context Map' : undefined),
|
|
43
|
+
hrefLabel: hasSystems ? 'Open System Context Map' : 'Open in Visualiser',
|
|
44
|
+
visualiserUrl: hasSystems
|
|
45
|
+
? buildUrl(`/visualiser/domains/${nodeGraph.id}/${nodeGraph.version}/systems-context`)
|
|
46
|
+
: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
|
|
47
|
+
};
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
|
|
31
51
|
const { prev, next } = await getAdjacentPages(currentSlug);
|
|
32
52
|
|
|
33
53
|
const ownersRaw = doc?.owners || [];
|
|
@@ -129,14 +149,13 @@ const editUrl =
|
|
|
129
149
|
</div>
|
|
130
150
|
|
|
131
151
|
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const collection = resourceToCollectionMap[nodeGraph.type as keyof typeof resourceToCollectionMap];
|
|
152
|
+
resolvedNodeGraphs.length > 0 &&
|
|
153
|
+
resolvedNodeGraphs.map((nodeGraph: any) => {
|
|
135
154
|
return (
|
|
136
155
|
<NodeGraph
|
|
137
156
|
id={nodeGraph.id}
|
|
138
157
|
version={nodeGraph.version}
|
|
139
|
-
collection={
|
|
158
|
+
collection={nodeGraph.graphCollection}
|
|
140
159
|
title={nodeGraph.title}
|
|
141
160
|
mode={nodeGraph.mode || 'simple'}
|
|
142
161
|
linksToVisualiser={true}
|
|
@@ -145,8 +164,8 @@ const editUrl =
|
|
|
145
164
|
href={
|
|
146
165
|
isVisualiserEnabled()
|
|
147
166
|
? {
|
|
148
|
-
label:
|
|
149
|
-
url:
|
|
167
|
+
label: nodeGraph.hrefLabel,
|
|
168
|
+
url: nodeGraph.visualiserUrl,
|
|
150
169
|
}
|
|
151
170
|
: undefined
|
|
152
171
|
}
|
|
@@ -64,12 +64,8 @@ export const isCustomStylesEnabled = () => {
|
|
|
64
64
|
return isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
export const isDiagramComparisonEnabled = () => isEventCatalogScaleEnabled();
|
|
68
|
-
|
|
69
67
|
export const isEventCatalogMCPEnabled = () => isEventCatalogScaleEnabled() && isSSR();
|
|
70
68
|
|
|
71
69
|
export const isEventCatalogMCPAuthEnabled = () => isEventCatalogMCPEnabled() && (config?.mcp?.auth?.enabled ?? false);
|
|
72
70
|
|
|
73
71
|
export const isIntegrationsEnabled = () => isEventCatalogScaleEnabled();
|
|
74
|
-
|
|
75
|
-
export const isExportPDFEnabled = () => true;
|