@eventcatalog/core 4.12.3 → 5.0.0-beta.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 (267) hide show
  1. package/LICENSE +226 -95
  2. package/NOTICE +30 -0
  3. package/README.md +3 -2
  4. package/dist/analytics/analytics.cjs +1 -1
  5. package/dist/analytics/analytics.js +2 -2
  6. package/dist/analytics/log-build.cjs +43 -16
  7. package/dist/analytics/log-build.d.cts +6 -5
  8. package/dist/analytics/log-build.d.ts +6 -5
  9. package/dist/analytics/log-build.js +4 -3
  10. package/dist/{chunk-U4YJSTGV.js → chunk-AYNZXUB5.js} +2 -10
  11. package/dist/{chunk-TV3YAWKQ.js → chunk-CR6AK5LR.js} +1 -1
  12. package/dist/{chunk-M577VUOX.js → chunk-LR7AGRHN.js} +13 -16
  13. package/dist/chunk-TQLRG35T.js +203 -0
  14. package/dist/{chunk-HPC6KUDQ.js → chunk-TWN43V4T.js} +1 -1
  15. package/dist/{chunk-ZYTCBNB3.js → chunk-WAIADKQE.js} +1 -1
  16. package/dist/{chunk-5BPN6QEC.js → chunk-ZHKEARLJ.js} +1 -1
  17. package/dist/constants.cjs +1 -1
  18. package/dist/constants.js +1 -1
  19. package/dist/eventcatalog.cjs +407 -291
  20. package/dist/eventcatalog.config.d.cts +2 -3
  21. package/dist/eventcatalog.config.d.ts +2 -3
  22. package/dist/eventcatalog.js +35 -98
  23. package/dist/federation/content-cache.d.cts +0 -5
  24. package/dist/federation/content-cache.d.ts +0 -5
  25. package/dist/federation/diagnostics.d.cts +0 -5
  26. package/dist/federation/diagnostics.d.ts +0 -5
  27. package/dist/federation/federate.cjs +0 -9
  28. package/dist/federation/federate.d.cts +0 -5
  29. package/dist/federation/federate.d.ts +0 -5
  30. package/dist/federation/federate.js +4 -5
  31. package/dist/federation/filesystem-source-provider.d.cts +0 -5
  32. package/dist/federation/filesystem-source-provider.d.ts +0 -5
  33. package/dist/federation/github-source-provider.d.cts +0 -5
  34. package/dist/federation/github-source-provider.d.ts +0 -5
  35. package/dist/federation/output-transaction.d.cts +0 -4
  36. package/dist/federation/output-transaction.d.ts +0 -4
  37. package/dist/federation/public-assets.d.cts +0 -5
  38. package/dist/federation/public-assets.d.ts +0 -5
  39. package/dist/federation/source-provider.d.cts +0 -5
  40. package/dist/federation/source-provider.d.ts +0 -5
  41. package/dist/federation/types.d.cts +0 -5
  42. package/dist/federation/types.d.ts +0 -5
  43. package/dist/generate.cjs +1 -1
  44. package/dist/generate.js +3 -3
  45. package/dist/license-C1y-56bb.d.cts +23 -0
  46. package/dist/license-C1y-56bb.d.ts +23 -0
  47. package/dist/runtime-dependencies/@eventcatalog__visualiser__layout.mjs +3 -0
  48. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps.mjs +3 -0
  49. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__react.mjs +3 -0
  50. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__server.mjs +3 -0
  51. package/dist/runtime-dependencies/@modelcontextprotocol__sdk__types.js.mjs +3 -0
  52. package/dist/runtime-dependencies/manifest.json +12 -1
  53. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__graphql.mjs +3 -0
  54. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__json.mjs +3 -0
  55. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__markup.mjs +3 -0
  56. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__protobuf.mjs +3 -0
  57. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__yaml.mjs +3 -0
  58. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-dark.mjs +3 -0
  59. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-light.mjs +3 -0
  60. package/dist/utils/cli-logger.cjs +1 -1
  61. package/dist/utils/cli-logger.js +2 -2
  62. package/dist/utils/license-status.cjs +240 -0
  63. package/dist/utils/license-status.d.cts +28 -0
  64. package/dist/utils/license-status.d.ts +28 -0
  65. package/dist/utils/license-status.js +12 -0
  66. package/eventcatalog/astro.config.mjs +1 -1
  67. package/eventcatalog/integrations/eventcatalog-runtime.mjs +1 -1
  68. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +29 -19
  69. package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +74 -0
  70. package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +24 -28
  71. package/eventcatalog/src/components/FieldsExplorer/FieldNodeGraph.tsx +16 -11
  72. package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +4 -218
  73. package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +27 -36
  74. package/eventcatalog/src/components/Header.astro +43 -58
  75. package/eventcatalog/src/components/Lists/PillListFlat.styles.css +17 -17
  76. package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +1 -1
  77. package/eventcatalog/src/components/MDX/Flow/Flow.astro +4 -0
  78. package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +14 -0
  79. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +49 -18
  80. package/eventcatalog/src/components/MDX/RemoteFile.astro +2 -24
  81. package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +59 -93
  82. package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +1 -32
  83. package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +20 -67
  84. package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -11
  85. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +11 -60
  86. package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +1 -3
  87. package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +0 -3
  88. package/eventcatalog/src/components/SchemaExplorer/VersionHistoryModal.tsx +2 -9
  89. package/eventcatalog/src/components/SchemaExplorer/parse-schema.ts +46 -0
  90. package/eventcatalog/src/components/SchemaExplorer/utils.ts +11 -0
  91. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +2 -9
  92. package/eventcatalog/src/components/Settings/LicenseSettings.tsx +288 -0
  93. package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +3 -19
  94. package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +85 -30
  95. package/eventcatalog/src/components/Settings/SettingsShared.tsx +7 -75
  96. package/eventcatalog/src/components/SideNav/CustomDocsNav.astro +2 -2
  97. package/eventcatalog/src/components/TrialBadge.astro +82 -0
  98. package/eventcatalog/src/content.config.ts +9 -96
  99. package/eventcatalog/src/{enterprise → features}/ai/chat-api.ts +22 -34
  100. package/eventcatalog/src/{enterprise → features}/analytics/adapters/ga4.ts +0 -5
  101. package/eventcatalog/src/{enterprise → features}/analytics/adapters/gtm.ts +0 -5
  102. package/eventcatalog/src/{enterprise → features}/analytics/adapters/posthog.ts +0 -5
  103. package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsHead.astro +2 -4
  104. package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsTracker.astro +2 -4
  105. package/eventcatalog/src/{enterprise → features}/analytics/tracker.ts +0 -5
  106. package/eventcatalog/src/{enterprise → features}/api/catalog.ts +0 -5
  107. package/eventcatalog/src/{enterprise → features}/auth/[...auth].ts +0 -5
  108. package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware-auth.ts +0 -5
  109. package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware.ts +0 -5
  110. package/eventcatalog/src/{enterprise → features}/collections/custom-pages.ts +0 -5
  111. package/eventcatalog/src/{enterprise → features}/collections/index.ts +0 -5
  112. package/eventcatalog/src/{enterprise → features}/collections/resource-docs.ts +0 -5
  113. package/eventcatalog/src/{enterprise → features}/custom-documentation/collection.ts +0 -5
  114. package/eventcatalog/src/features/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +9 -0
  115. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +0 -5
  116. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +1 -6
  117. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +0 -5
  118. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/index.tsx +1 -6
  119. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/types.ts +0 -5
  120. package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/index.astro → features/custom-documentation/components/CustomDocumentationPage.astro} +5 -5
  121. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/badge-styles.ts +0 -5
  122. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/custom-docs.ts +1 -6
  123. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/docs-search.ts +0 -5
  124. package/eventcatalog/src/{enterprise → features}/custom-pages/routes.ts +0 -5
  125. package/eventcatalog/src/{enterprise → features}/directory/user-team-directory.ts +0 -5
  126. package/eventcatalog/src/{enterprise → features}/fields/field-extractor.ts +0 -5
  127. package/eventcatalog/src/{enterprise → features}/fields/field-indexer.ts +0 -5
  128. package/eventcatalog/src/{enterprise → features}/fields/fields-db.ts +0 -5
  129. package/eventcatalog/src/{enterprise → features}/fields/pages/api/fields.ts +1 -6
  130. package/eventcatalog/src/{enterprise → features}/fields/pages/fields.astro +1 -2
  131. package/eventcatalog/src/{enterprise → features}/integrations/eventcatalog-features.ts +17 -75
  132. package/eventcatalog/src/features/mcp/apps/architecture-diagram/links.ts +59 -0
  133. package/eventcatalog/src/features/mcp/apps/architecture-diagram/node-chat.tsx +299 -0
  134. package/eventcatalog/src/features/mcp/apps/architecture-diagram/shared.ts +14 -0
  135. package/eventcatalog/src/features/mcp/apps/architecture-diagram/view.tsx +454 -0
  136. package/eventcatalog/src/features/mcp/apps/generated/viewer.html +432 -0
  137. package/eventcatalog/src/features/mcp/apps/mermaid-stub.ts +10 -0
  138. package/eventcatalog/src/features/mcp/apps/schema-viewer/schema-code.tsx +65 -0
  139. package/eventcatalog/src/features/mcp/apps/schema-viewer/shared.ts +23 -0
  140. package/eventcatalog/src/features/mcp/apps/schema-viewer/view.tsx +170 -0
  141. package/eventcatalog/src/features/mcp/apps/shared/app-view.tsx +98 -0
  142. package/eventcatalog/src/features/mcp/apps/shared/resource-types.ts +15 -0
  143. package/eventcatalog/src/features/mcp/apps/viewer/shared.ts +24 -0
  144. package/eventcatalog/src/features/mcp/apps/viewer/styles.css +25 -0
  145. package/eventcatalog/src/features/mcp/apps/viewer/view.tsx +59 -0
  146. package/eventcatalog/src/features/mcp/mcp-app-icons.ts +63 -0
  147. package/eventcatalog/src/features/mcp/mcp-apps.ts +160 -0
  148. package/eventcatalog/src/{enterprise → features}/mcp/mcp-auth.ts +0 -5
  149. package/eventcatalog/src/{enterprise → features}/mcp/mcp-scope.ts +7 -7
  150. package/eventcatalog/src/{enterprise → features}/mcp/mcp-scoped-tools.ts +47 -40
  151. package/eventcatalog/src/{enterprise → features}/mcp/mcp-server.ts +347 -34
  152. package/eventcatalog/src/{enterprise → features}/mcp/oauth-protected-resource.ts +0 -5
  153. package/eventcatalog/src/features/mcp/schema-viewer.ts +24 -0
  154. package/eventcatalog/src/{enterprise → features}/tools/catalog-tools.ts +133 -102
  155. package/eventcatalog/src/features/tools/index.ts +5 -0
  156. package/eventcatalog/src/{enterprise → features}/visualizer-layout/reset.ts +0 -5
  157. package/eventcatalog/src/{enterprise → features}/visualizer-layout/save.ts +0 -5
  158. package/eventcatalog/src/layouts/BaseLayout.astro +2 -2
  159. package/eventcatalog/src/layouts/Footer.astro +31 -39
  160. package/eventcatalog/src/layouts/SettingsLayout.astro +6 -6
  161. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +7 -37
  162. package/eventcatalog/src/{enterprise → pages}/api/schemas/[collection]/[id]/[version]/index.ts +0 -22
  163. package/eventcatalog/src/{enterprise → pages}/api/schemas/services/[id]/[version]/[specification]/index.ts +0 -19
  164. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/_index.data.ts +2 -6
  165. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +1 -5
  166. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/_index.data.ts +2 -6
  167. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +1 -5
  168. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].md.ts +2 -6
  169. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].mdx.ts +2 -6
  170. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +9 -5
  171. package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +12 -0
  172. package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/root-index.astro → pages/docs/custom/index.astro} +1 -23
  173. package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +4 -9
  174. package/eventcatalog/src/pages/docs/llm/llms.txt.ts +4 -4
  175. package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +0 -11
  176. package/eventcatalog/src/pages/docs/services/[id]/[docType]/[docId]/index.astro +2 -2
  177. package/eventcatalog/src/pages/index.astro +2 -2
  178. package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +0 -3
  179. package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -4
  180. package/eventcatalog/src/pages/settings/assistant.astro +2 -4
  181. package/eventcatalog/src/pages/settings/license.astro +18 -0
  182. package/eventcatalog/src/pages/settings/llm-access.astro +1 -4
  183. package/eventcatalog/src/pages/settings/mcp.astro +33 -4
  184. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +1 -2
  185. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/data/index.astro +2 -45
  186. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +1 -1
  187. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version].mermaid.ts +7 -109
  188. package/eventcatalog/src/pages/visualiser/_mermaid-route.ts +78 -0
  189. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/_index.data.ts +44 -0
  190. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +1 -1
  191. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/index.astro +56 -0
  192. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/index.astro +3 -40
  193. package/eventcatalog/src/pages/visualiser/domains/[id]/[version].mermaid.ts +20 -0
  194. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/_index.data.ts +29 -0
  195. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +3 -38
  196. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/index.astro +56 -0
  197. package/eventcatalog/src/pages/visualiser/systems/[id]/[version].mermaid.ts +20 -0
  198. package/eventcatalog/src/stores/sidebar-store/builders/agent.ts +1 -1
  199. package/eventcatalog/src/stores/sidebar-store/builders/container.ts +1 -1
  200. package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +1 -1
  201. package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +7 -32
  202. package/eventcatalog/src/stores/sidebar-store/builders/entity.ts +1 -1
  203. package/eventcatalog/src/stores/sidebar-store/builders/message.ts +1 -1
  204. package/eventcatalog/src/stores/sidebar-store/builders/service.ts +2 -8
  205. package/eventcatalog/src/stores/sidebar-store/builders/system.ts +2 -12
  206. package/eventcatalog/src/stores/sidebar-store/custom-sidebar.ts +0 -10
  207. package/eventcatalog/src/stores/sidebar-store/state.ts +4 -6
  208. package/eventcatalog/src/styles/theme.css +22 -18
  209. package/eventcatalog/src/styles/themes/forest.css +8 -8
  210. package/eventcatalog/src/styles/themes/ocean.css +8 -8
  211. package/eventcatalog/src/styles/themes/sapphire.css +8 -8
  212. package/eventcatalog/src/styles/themes/sunset.css +8 -8
  213. package/eventcatalog/src/utils/clipboard.ts +4 -4
  214. package/eventcatalog/src/utils/collections/flow-step-schema.ts +117 -0
  215. package/eventcatalog/src/utils/collections/pointer-schema.ts +7 -0
  216. package/eventcatalog/src/utils/collections/resource-docs.ts +677 -14
  217. package/eventcatalog/src/utils/collections/schema-loader.ts +0 -5
  218. package/eventcatalog/src/utils/feature.ts +14 -23
  219. package/eventcatalog/src/utils/license.ts +114 -0
  220. package/eventcatalog/src/utils/node-graphs/architecture-diagram-types.ts +32 -0
  221. package/eventcatalog/src/utils/node-graphs/architecture-diagram.ts +84 -0
  222. package/eventcatalog/src/utils/node-graphs/channel-node-graph.ts +4 -25
  223. package/eventcatalog/src/utils/node-graphs/container-node-graph.ts +12 -39
  224. package/eventcatalog/src/utils/node-graphs/data-products-node-graph.ts +11 -27
  225. package/eventcatalog/src/utils/node-graphs/domain-levels-node-graph.ts +679 -0
  226. package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +3 -20
  227. package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +51 -4
  228. package/eventcatalog/src/utils/node-graphs/field-node-graph.ts +8 -23
  229. package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +119 -0
  230. package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +133 -47
  231. package/eventcatalog/src/utils/node-graphs/layout-node-graph.ts +28 -0
  232. package/eventcatalog/src/utils/node-graphs/layout-persistence.ts +3 -3
  233. package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +16 -34
  234. package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +11 -25
  235. package/eventcatalog/src/utils/node-graphs/system-context-node-graph.ts +18 -54
  236. package/eventcatalog/src/utils/node-graphs/system-levels-node-graph.ts +59 -0
  237. package/eventcatalog/src/utils/node-graphs/systems-node-graph.ts +20 -80
  238. package/eventcatalog/src/utils/node-graphs/utils/utils.ts +1 -78
  239. package/eventcatalog/src/utils/trial.ts +36 -0
  240. package/eventcatalog/tsconfig.json +1 -1
  241. package/package.json +11 -11
  242. package/dist/chunk-FV56YFM4.js +0 -7
  243. package/dist/federation/entitlement.cjs +0 -31
  244. package/dist/federation/entitlement.d.cts +0 -12
  245. package/dist/federation/entitlement.d.ts +0 -12
  246. package/dist/federation/entitlement.js +0 -6
  247. package/dist/runtime-dependencies/dagre.mjs +0 -3
  248. package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +0 -265
  249. package/eventcatalog/src/enterprise/LICENSE +0 -57
  250. package/eventcatalog/src/enterprise/README.md +0 -5
  251. package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +0 -691
  252. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +0 -9
  253. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/[...path]/index.astro +0 -18
  254. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/feature.astro +0 -171
  255. package/eventcatalog/src/enterprise/feature.ts +0 -75
  256. package/eventcatalog/src/enterprise/tools/index.ts +0 -10
  257. package/eventcatalog/src/hooks/eventcatalog-visualizer.ts +0 -126
  258. package/eventcatalog/src/pages/settings/billing.astro +0 -17
  259. package/eventcatalog/src/pages/visualiser/domain-integrations/index.astro +0 -26
  260. package/eventcatalog/src/types/mcp-modules.d.ts +0 -67
  261. package/eventcatalog/src/utils/node-graphs/domains-canvas.ts +0 -261
  262. package/eventcatalog/src/utils/node-graphs/export-node-graph.ts +0 -91
  263. /package/eventcatalog/src/{enterprise → features}/auth/error.astro +0 -0
  264. /package/eventcatalog/src/{enterprise → features}/auth/login.astro +0 -0
  265. /package/eventcatalog/src/{enterprise → features}/auth/unauthorized.astro +0 -0
  266. /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path]/_index.data.ts +0 -0
  267. /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path].mdx.ts +0 -0
@@ -1,22 +1,13 @@
1
1
  import { getCollection } from 'astro:content';
2
- import {
3
- createDagreGraph,
4
- calculatedNodes,
5
- DEFAULT_NODE_WIDTH,
6
- DEFAULT_NODE_HEIGHT,
7
- layoutDagreGraph,
8
- } from '@utils/node-graphs/utils/utils';
2
+ import { layoutNodeGraph } from '@utils/node-graphs/layout-node-graph';
9
3
  import { getNodesAndEdges as getServicesNodeAndEdges } from './services-node-graph';
10
4
  import { getNodesAndEdges as getContainerNodeAndEdges } from './container-node-graph';
11
5
  import merge from 'lodash.merge';
12
6
  import { createVersionedMap, findInMap } from '@utils/collections/util';
13
7
 
14
- type DagreGraph = any;
15
-
16
8
  interface NodesAndEdgesProps {
17
9
  id: string;
18
10
  version: string;
19
- defaultFlow?: DagreGraph;
20
11
  mode?: 'simple' | 'full';
21
12
  group?: boolean;
22
13
  // When true, wraps the whole system graph in a single parent boundary node
@@ -29,14 +20,12 @@ interface NodesAndEdgesProps {
29
20
  export const getNodesAndEdges = async ({
30
21
  id,
31
22
  version,
32
- defaultFlow,
33
23
  mode = 'simple',
34
24
  group = false,
35
25
  wrapInSystemGroup = false,
36
26
  channelRenderMode = 'flat',
37
27
  layout = true,
38
28
  }: NodesAndEdgesProps) => {
39
- const flow = defaultFlow || createDagreGraph({ ranksep: 360, nodesep: 50, edgesep: 50 });
40
29
  let nodes = new Map(),
41
30
  edges = new Map();
42
31
 
@@ -80,7 +69,6 @@ export const getNodesAndEdges = async ({
80
69
  const { nodes: serviceNodes, edges: serviceEdges } = await getServicesNodeAndEdges({
81
70
  id: service.id,
82
71
  version: service.version,
83
- defaultFlow: flow,
84
72
  mode,
85
73
  renderAllEdges: true,
86
74
  channelRenderMode,
@@ -105,7 +93,6 @@ export const getNodesAndEdges = async ({
105
93
  const { nodes: containerNodes, edges: containerEdges } = await getContainerNodeAndEdges({
106
94
  id: container.id,
107
95
  version: container.version,
108
- defaultFlow: flow,
109
96
  mode,
110
97
  channelRenderMode,
111
98
  layout: false,
@@ -118,6 +105,12 @@ export const getNodesAndEdges = async ({
118
105
  containerEdges.forEach((e) => edges.set(e.id, e));
119
106
  }
120
107
 
108
+ // The graphs merged above each mark their own service / data store as the one
109
+ // being viewed, but here the system is (see the system group below)
110
+ nodes.forEach((n) => {
111
+ if (n.data?.isFocused) nodes.set(n.id, { ...n, data: { ...n.data, isFocused: false } });
112
+ });
113
+
121
114
  // Add group node to the graph (used when a system is rendered inside another view)
122
115
  if (group) {
123
116
  nodes.forEach((n) => {
@@ -125,89 +118,36 @@ export const getNodesAndEdges = async ({
125
118
  });
126
119
  }
127
120
 
128
- if (layout) {
129
- layoutDagreGraph(flow);
130
- }
131
-
132
- let laidOutNodes = calculatedNodes(flow, Array.from(nodes.values()));
133
-
134
121
  // Wrap everything inside a single parent "system group" boundary node, so all
135
- // the services / data stores / messages visibly belong to one system. We only
136
- // do this when this graph owns its own layout (`layout` true) — when it's
137
- // being merged into a larger graph (e.g. a domain view) the host owns grouping.
138
- if (wrapInSystemGroup && layout && laidOutNodes.length > 0) {
139
- laidOutNodes = wrapNodesInSystemGroup(laidOutNodes, flow, system);
140
- }
141
-
142
- return {
143
- nodes: laidOutNodes,
122
+ // the services / data stores / messages visibly belong to one system
123
+ const graph = {
124
+ nodes: wrapInSystemGroup && nodes.size > 0 ? wrapNodesInSystemGroup([...nodes.values()], system) : [...nodes.values()],
144
125
  edges: [...edges.values()],
145
126
  };
146
- };
147
127
 
148
- // Padding around the children inside the group box, and headroom for the header banner.
149
- const GROUP_PADDING_X = 100;
150
- const GROUP_PADDING_Y = 100;
151
- const GROUP_HEADER_HEIGHT = 64;
128
+ return layout ? layoutNodeGraph(graph) : graph;
129
+ };
152
130
 
153
131
  /**
154
- * Wraps a set of already-laid-out nodes in one parent `system-group` node.
155
- *
156
- * The rest of the app uses dagre's node position directly as the ReactFlow
157
- * position, so we stay in that same coordinate space. Child nodes under a
158
- * `parentId` are positioned relative to the parent, so we:
159
- * 1. compute the bounding box of all nodes (using dagre position + size),
160
- * 2. create a parent group node at the box origin (minus padding/header),
161
- * 3. re-home every node as a child, offset by the group origin.
132
+ * Wraps a system's nodes in one parent `system-group` node (sized to fit them
133
+ * when the graph is laid out), so they visibly belong to the system.
162
134
  */
163
- const wrapNodesInSystemGroup = (laidOutNodes: any[], flow: DagreGraph, system: any) => {
164
- let minX = Infinity;
165
- let minY = Infinity;
166
- let maxX = -Infinity;
167
- let maxY = -Infinity;
168
-
169
- for (const node of laidOutNodes) {
170
- const dims = flow.node(node.id) || {};
171
- const width = dims.width ?? DEFAULT_NODE_WIDTH;
172
- const height = dims.height ?? DEFAULT_NODE_HEIGHT;
173
-
174
- minX = Math.min(minX, node.position.x);
175
- minY = Math.min(minY, node.position.y);
176
- maxX = Math.max(maxX, node.position.x + width);
177
- maxY = Math.max(maxY, node.position.y + height);
178
- }
179
-
180
- // Origin of the group box (room for padding + the header banner at the top).
181
- const groupX = minX - GROUP_PADDING_X;
182
- const groupY = minY - GROUP_PADDING_Y - GROUP_HEADER_HEIGHT;
183
- const groupWidth = maxX - minX + GROUP_PADDING_X * 2;
184
- const groupHeight = maxY - minY + GROUP_PADDING_Y * 2 + GROUP_HEADER_HEIGHT;
185
-
135
+ const wrapNodesInSystemGroup = (systemNodes: any[], system: any) => {
186
136
  const groupId = `system-group-${system.data.id}-${system.data.version}`;
187
137
 
188
138
  const groupNode = {
189
139
  id: groupId,
190
140
  type: 'system-group',
191
- position: { x: groupX, y: groupY },
141
+ position: { x: 0, y: 0 },
192
142
  draggable: false,
193
143
  selectable: false,
194
- style: { width: groupWidth, height: groupHeight },
195
144
  data: {
196
145
  system: { name: system.data.name, version: system.data.version },
146
+ // The system is the resource being viewed on its own diagram
147
+ isFocused: true,
197
148
  },
198
149
  };
199
150
 
200
- // Re-home each node as a child, with its position relative to the group origin.
201
- const childNodes = laidOutNodes.map((node) => ({
202
- ...node,
203
- parentId: groupId,
204
- extent: 'parent',
205
- position: {
206
- x: node.position.x - groupX,
207
- y: node.position.y - groupY,
208
- },
209
- }));
210
-
211
- // Parent must come before its children in the array for ReactFlow.
212
- return [groupNode, ...childNodes];
151
+ // Parent must come before its children in the array for React Flow
152
+ return [groupNode, ...systemNodes.map((node) => ({ ...node, parentId: groupId, extent: 'parent' }))];
213
153
  };
@@ -1,7 +1,6 @@
1
1
  // Can't use the CollectionEntry type from astro:content because a client component is using this util
2
2
 
3
3
  import { MarkerType, Position, type Edge, type Node } from '@xyflow/react';
4
- import dagre from 'dagre';
5
4
  import { getItemsFromCollectionByIdAndSemverOrLatest, versionMatches as versionMatchesUtil } from '@utils/collections/util';
6
5
  import { buildUrl } from '@utils/url-builder';
7
6
 
@@ -91,52 +90,6 @@ export const getEdgeLabelForMessageAsSource = (data: MessageCollectionItem, thro
91
90
  }
92
91
  };
93
92
 
94
- export const calculatedNodes = (flow: dagre.graphlib.Graph, nodes: Node[]) => {
95
- return nodes.map((node: any) => {
96
- const { x, y } = flow.node(node.id);
97
- return { ...node, position: { x, y } };
98
- });
99
- };
100
-
101
- export const DEFAULT_NODE_WIDTH = 150;
102
- export const DEFAULT_NODE_HEIGHT = 120;
103
-
104
- // Creates a new dagre graph
105
- export const createDagreGraph = ({ ranksep = 180, nodesep = 50, ...rest }: any) => {
106
- const graph = new dagre.graphlib.Graph({ compound: true });
107
- graph.setGraph({ rankdir: 'LR', ranksep, nodesep, ...rest });
108
- graph.setDefaultEdgeLabel(() => ({}));
109
- return graph;
110
- };
111
-
112
- /**
113
- * network-simplex produces the nicest layered layout but is O(V·E) and hangs on
114
- * large architecture maps. tight-tree keeps the same LR layering with far less
115
- * work. Callers can still force a ranker via createDagreGraph({ ranker }).
116
- */
117
- export const LARGE_GRAPH_NODE_THRESHOLD = 80;
118
- export const LARGE_GRAPH_EDGE_THRESHOLD = 200;
119
- export const LARGE_GRAPH_RANKER = 'tight-tree';
120
-
121
- export const selectDagreRanker = (nodeCount: number, edgeCount: number, explicitRanker?: string) => {
122
- if (explicitRanker) return explicitRanker;
123
- if (nodeCount >= LARGE_GRAPH_NODE_THRESHOLD || edgeCount >= LARGE_GRAPH_EDGE_THRESHOLD) {
124
- return LARGE_GRAPH_RANKER;
125
- }
126
- return undefined;
127
- };
128
-
129
- export const layoutDagreGraph = (flow: dagre.graphlib.Graph) => {
130
- const label = (flow.graph() || {}) as { ranker?: string };
131
- const nodeCount = flow.nodeCount();
132
- const edgeCount = flow.edgeCount();
133
- const ranker = selectDagreRanker(nodeCount, edgeCount, label.ranker);
134
- if (ranker && label.ranker !== ranker) {
135
- flow.setGraph({ ...label, ranker });
136
- }
137
- dagre.layout(flow);
138
- };
139
-
140
93
  export const createEdge = (edgeOptions: Edge) => {
141
94
  return {
142
95
  label: 'subscribed by',
@@ -167,8 +120,6 @@ export const createNode = (values: Node): Node => {
167
120
  };
168
121
  };
169
122
 
170
- type DagreGraph = any;
171
-
172
123
  type ContextMenuItem = {
173
124
  label: string;
174
125
  href: string;
@@ -370,7 +321,7 @@ export const buildContextMenuForSystem = ({ id, version }: { id: string; version
370
321
  return [
371
322
  { label: 'Read documentation', href: buildUrl(`/docs/systems/${id}/${version}`) },
372
323
  { label: 'Focus node', href: buildUrl(`/visualiser/systems/${id}/${version}`) },
373
- { label: 'View context', href: buildUrl(`/visualiser/systems/${id}/${version}/context`) },
324
+ { label: 'View context', href: buildUrl(`/visualiser/systems/${id}/${version}?level=1`) },
374
325
  ];
375
326
  };
376
327
 
@@ -438,31 +389,3 @@ export const partitionMessagesByGroup = (
438
389
 
439
390
  return { grouped, ungrouped };
440
391
  };
441
-
442
- export const getNodesAndEdgesFromDagre = ({
443
- nodes,
444
- edges,
445
- defaultFlow,
446
- }: {
447
- nodes: Node[];
448
- edges: Edge[];
449
- defaultFlow?: DagreGraph;
450
- }) => {
451
- const flow = defaultFlow || createDagreGraph({ ranksep: 300, nodesep: 50 });
452
-
453
- nodes.forEach((node: any) => {
454
- flow.setNode(node.id, { width: DEFAULT_NODE_WIDTH, height: DEFAULT_NODE_HEIGHT });
455
- });
456
-
457
- edges.forEach((edge: any) => {
458
- flow.setEdge(edge.source, edge.target);
459
- });
460
-
461
- // Render the diagram in memory getting the X and Y
462
- layoutDagreGraph(flow);
463
-
464
- return {
465
- nodes: calculatedNodes(flow, nodes),
466
- edges,
467
- };
468
- };
@@ -0,0 +1,36 @@
1
+ export const TRIAL_LENGTH_DAYS = 90;
2
+
3
+ export const LICENSE_FAQ_URL = 'https://www.eventcatalog.dev/license-faq';
4
+
5
+ // Where a commercial license is renewed
6
+ export const LICENSE_RENEW_URL = 'https://eventcatalog.cloud';
7
+
8
+ const DAY_IN_MS = 24 * 60 * 60 * 1000;
9
+
10
+ export type TrialStatus = {
11
+ daysLeft: number;
12
+ ended: boolean;
13
+ endsAt: Date;
14
+ };
15
+
16
+ /**
17
+ * The trial started at `tsd` (unix ms, written to eventcatalog.config.js when the catalog was
18
+ * created) and lasts TRIAL_LENGTH_DAYS. Undefined when there is no valid start date.
19
+ */
20
+ export const getTrialStatus = (tsd: unknown, now = Date.now()): TrialStatus | undefined => {
21
+ if (typeof tsd !== 'number' || !Number.isFinite(tsd) || tsd <= 0) return;
22
+ const endsAt = tsd + TRIAL_LENGTH_DAYS * DAY_IN_MS;
23
+ const daysLeft = Math.max(0, Math.ceil((endsAt - now) / DAY_IN_MS));
24
+ return { daysLeft, ended: daysLeft === 0, endsAt: new Date(endsAt) };
25
+ };
26
+
27
+ // A licensed catalog only shows its license in the dev header when it's about to expire
28
+ export const LICENSE_REMINDER_DAYS = 30;
29
+
30
+ /**
31
+ * Days left on the license, once fewer than LICENSE_REMINDER_DAYS remain. Undefined before then.
32
+ */
33
+ export const getLicenseDaysLeft = (licensedUntil: Date, now = Date.now()): number | undefined => {
34
+ const daysLeft = Math.max(0, Math.ceil((licensedUntil.getTime() - now) / DAY_IN_MS));
35
+ return daysLeft < LICENSE_REMINDER_DAYS ? daysLeft : undefined;
36
+ };
@@ -14,7 +14,7 @@
14
14
  "@types": ["src/types/index.ts"],
15
15
  "@utils/*": ["src/utils/*"],
16
16
  "@layouts/*": ["src/layouts/*"],
17
- "@enterprise/*": ["src/enterprise/*"],
17
+ "@features/*": ["src/features/*"],
18
18
  "auth:config": ["./auth.config.ts"],
19
19
  "@stores/*": ["src/stores/*"]
20
20
  },
package/package.json CHANGED
@@ -5,9 +5,9 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
- "license": "SEE LICENSE IN LICENSE",
8
+ "license": "BUSL-1.1",
9
9
  "type": "module",
10
- "version": "4.12.3",
10
+ "version": "5.0.0-beta.0",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -42,7 +42,8 @@
42
42
  "!eventcatalog/src/snippets/",
43
43
  "!eventcatalog/src/generated-ai/",
44
44
  "bin/",
45
- "dist/"
45
+ "dist/",
46
+ "NOTICE"
46
47
  ],
47
48
  "dependencies": {
48
49
  "@ai-sdk/react": "^4.0.109",
@@ -55,13 +56,14 @@
55
56
  "@asyncapi/parser": "^3.6.0",
56
57
  "@asyncapi/react-component": "3.1.0",
57
58
  "@auth/core": "^0.41.3",
58
- "@eventcatalog/license": "^0.0.8",
59
+ "@eventcatalog/license": "^0.0.9",
59
60
  "@fontsource/inter": "^5.2.5",
60
61
  "@headlessui/react": "^2.0.3",
61
62
  "@heroicons/react": "^2.1.3",
62
63
  "@iconify-json/logos": "^1.2.4",
63
64
  "@mermaid-js/layout-elk": "^0.2.0",
64
- "@modelcontextprotocol/sdk": "^1.26.0",
65
+ "@modelcontextprotocol/ext-apps": "^1.7.5",
66
+ "@modelcontextprotocol/sdk": "^1.30.0",
65
67
  "@nanostores/react": "^1.0.0",
66
68
  "@parcel/watcher": "^2.4.1",
67
69
  "@radix-ui/react-context-menu": "^2.2.6",
@@ -85,7 +87,6 @@
85
87
  "d3-force": "3.0.0",
86
88
  "d3-selection": "3.0.0",
87
89
  "d3-zoom": "3.0.0",
88
- "dagre": "^0.8.5",
89
90
  "diff": "^8.0.3",
90
91
  "diff2html": "^3.4.56",
91
92
  "dotenv": "^16.5.0",
@@ -133,9 +134,9 @@
133
134
  "update-notifier": "^7.3.1",
134
135
  "uuid": "^11.1.1",
135
136
  "zod": "^4.3.6",
136
- "@eventcatalog/linter": "1.1.21",
137
- "@eventcatalog/sdk": "2.29.2",
138
- "@eventcatalog/visualiser": "^4.1.5"
137
+ "@eventcatalog/linter": "1.2.0-beta.0",
138
+ "@eventcatalog/visualiser": "^5.0.0-beta.0",
139
+ "@eventcatalog/sdk": "2.30.0-beta.0"
139
140
  },
140
141
  "devDependencies": {
141
142
  "@astrojs/check": "^0.9.10",
@@ -143,7 +144,6 @@
143
144
  "@types/d3-force": "^3.0.10",
144
145
  "@types/d3-selection": "^3.0.11",
145
146
  "@types/d3-zoom": "^3.0.8",
146
- "@types/dagre": "^0.7.52",
147
147
  "@types/diff": "^5.2.2",
148
148
  "@types/js-yaml": "^4.0.9",
149
149
  "@types/jsonwebtoken": "^9.0.10",
@@ -169,7 +169,7 @@
169
169
  },
170
170
  "scripts": {
171
171
  "dev": "astro dev",
172
- "build:bin": "tsup && node scripts/build-runtime-dependencies.mjs && node scripts/copy-docs-to-dist.mjs",
172
+ "build:bin": "tsup && node scripts/build-runtime-dependencies.mjs && node scripts/copy-docs-to-dist.mjs && node scripts/build-mcp-apps.mjs",
173
173
  "test": "cross-env DISABLE_EVENTCATALOG_CACHE=true vitest",
174
174
  "test:ci": "node scripts/ci/test.js",
175
175
  "start": "astro dev",
@@ -1,7 +0,0 @@
1
- // src/federation/entitlement.ts
2
- import { isEventCatalogEnterpriseEnabled } from "@eventcatalog/license";
3
- var isFederationEnabled = () => isEventCatalogEnterpriseEnabled();
4
-
5
- export {
6
- isFederationEnabled
7
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/federation/entitlement.ts
21
- var entitlement_exports = {};
22
- __export(entitlement_exports, {
23
- isFederationEnabled: () => isFederationEnabled
24
- });
25
- module.exports = __toCommonJS(entitlement_exports);
26
- var import_license = require("@eventcatalog/license");
27
- var isFederationEnabled = () => (0, import_license.isEventCatalogEnterpriseEnabled)();
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- isFederationEnabled
31
- });
@@ -1,12 +0,0 @@
1
- /**
2
- * Licensed under the EventCatalog Commercial License.
3
- * See /packages/core/src/federation/LICENSE
4
- */
5
- /**
6
- * Federation is enabled through the Enterprise offline entitlement. Keep
7
- * callers plan-agnostic so licensing details remain isolated from the
8
- * federation workflow.
9
- */
10
- declare const isFederationEnabled: () => Promise<boolean>;
11
-
12
- export { isFederationEnabled };
@@ -1,12 +0,0 @@
1
- /**
2
- * Licensed under the EventCatalog Commercial License.
3
- * See /packages/core/src/federation/LICENSE
4
- */
5
- /**
6
- * Federation is enabled through the Enterprise offline entitlement. Keep
7
- * callers plan-agnostic so licensing details remain isolated from the
8
- * federation workflow.
9
- */
10
- declare const isFederationEnabled: () => Promise<boolean>;
11
-
12
- export { isFederationEnabled };
@@ -1,6 +0,0 @@
1
- import {
2
- isFederationEnabled
3
- } from "../chunk-FV56YFM4.js";
4
- export {
5
- isFederationEnabled
6
- };
@@ -1,3 +0,0 @@
1
- export * from "dagre";
2
- import * as dependency from "dagre";
3
- export default dependency.default;