@eventcatalog/core 4.2.6 → 4.3.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.
Files changed (30) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-OBA7TFHM.js → chunk-32ZHIOUO.js} +3 -3
  6. package/dist/{chunk-XTSY2LTR.js → chunk-GZOFTODZ.js} +1 -1
  7. package/dist/{chunk-DEGSBGEF.js → chunk-RQCRNCF6.js} +1 -1
  8. package/dist/{chunk-OZNVNRI7.js → chunk-TE4QQSPT.js} +1 -1
  9. package/dist/{chunk-NZUMNTJK.js → chunk-ZLUUUTWP.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +12 -1
  13. package/dist/eventcatalog.cjs +1 -1
  14. package/dist/eventcatalog.config.d.cts +5 -0
  15. package/dist/eventcatalog.config.d.ts +5 -0
  16. package/dist/eventcatalog.js +9 -9
  17. package/dist/generate.cjs +1 -1
  18. package/dist/generate.js +3 -3
  19. package/dist/utils/cli-logger.cjs +1 -1
  20. package/dist/utils/cli-logger.js +2 -2
  21. package/eventcatalog/src/components/CopyAsMarkdown.tsx +73 -5
  22. package/eventcatalog/src/components/McpConnectDialog.tsx +98 -0
  23. package/eventcatalog/src/components/McpIcon.tsx +14 -0
  24. package/eventcatalog/src/enterprise/feature.ts +1 -1
  25. package/eventcatalog/src/enterprise/mcp/mcp-scope.ts +159 -0
  26. package/eventcatalog/src/enterprise/mcp/mcp-scoped-tools.ts +197 -0
  27. package/eventcatalog/src/enterprise/mcp/mcp-server.ts +287 -176
  28. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +13 -0
  29. package/eventcatalog/src/types/mcp-modules.d.ts +1 -0
  30. package/package.json +1 -1
@@ -64,6 +64,7 @@ import {
64
64
  isMarkdownDownloadEnabled,
65
65
  isVisualiserEnabled,
66
66
  isRSSEnabled,
67
+ isEventCatalogMCPEnabled,
67
68
  } from '@utils/feature';
68
69
  import { getMDXComponentsByName, parseMdxBooleanProp } from '@utils/markdown';
69
70
 
@@ -89,6 +90,15 @@ const pageTitle = `${props.collection} | ${props.data.name}`.replace(/^\w/, (c)
89
90
  const contentBadges = props.data.badges || [];
90
91
  const editUrl =
91
92
  props.data.editUrl || (config.editUrl && props?.filePath ? buildEditUrlForResource(config.editUrl, props?.filePath) : '');
93
+ const isLatestVersion = props.data.latestVersion === props.data.version;
94
+ const mcpResourceType = props.collection === 'domains' ? 'domain' : props.collection === 'systems' ? 'system' : undefined;
95
+ const mcpServerUrl =
96
+ mcpResourceType && isEventCatalogMCPEnabled()
97
+ ? buildUrl(
98
+ `/docs/mcp/${mcpResourceType}s/${encodeURIComponent(props.data.id)}${isLatestVersion ? '' : `/${encodeURIComponent(props.data.version)}`}`,
99
+ true
100
+ )
101
+ : undefined;
92
102
 
93
103
  const headerIconSrc = isIconPath(props.data.styles?.icon) ? resolveIconUrl(props.data.styles!.icon!) : null;
94
104
 
@@ -458,6 +468,9 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
458
468
  rssFeedEnabled={isRSSEnabled()}
459
469
  editUrl={editUrl}
460
470
  preferChatAsDefault={isEventCatalogChatEnabled()}
471
+ mcpServerUrl={mcpServerUrl}
472
+ resourceName={props.data.name}
473
+ mcpResourceType={mcpResourceType}
461
474
  />
462
475
  </div>
463
476
  {
@@ -7,6 +7,7 @@ declare module 'hono' {
7
7
  export interface Context {
8
8
  req: {
9
9
  raw: Request;
10
+ param: (name: string) => string;
10
11
  };
11
12
  json: (data: unknown, status?: number) => Response;
12
13
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "4.2.6",
10
+ "version": "4.3.0",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },