@eventcatalog/core 5.9.1 → 5.11.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 (41) 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/catalog-runtime.cjs +1 -1
  6. package/dist/{chunk-YBM7MCOY.js → chunk-54GBEFRV.js} +1 -1
  7. package/dist/{chunk-A3256YCN.js → chunk-C4KPS65M.js} +1 -1
  8. package/dist/{chunk-JDSFD7IC.js → chunk-EJU3H6C4.js} +1 -1
  9. package/dist/{chunk-3PWCUWQC.js → chunk-EJXOHDUL.js} +1 -1
  10. package/dist/{chunk-KGFAIGOT.js → chunk-Y32K66EM.js} +1 -1
  11. package/dist/constants.cjs +1 -1
  12. package/dist/constants.js +1 -1
  13. package/dist/docs/development/01-getting-started/develop-and-build.md +19 -0
  14. package/dist/docs/development/guides/resources/entities/05-entity-maps.md +5 -0
  15. package/dist/docs/development/guides/resources/entities/06-global-entity-map.md +101 -0
  16. package/dist/docs/development/guides/resources/entities/{06-reference.md → 07-reference.md} +2 -1
  17. package/dist/eventcatalog.cjs +4 -4
  18. package/dist/eventcatalog.js +10 -10
  19. package/dist/generate.cjs +1 -1
  20. package/dist/generate.js +3 -3
  21. package/dist/utils/cli-logger.cjs +1 -1
  22. package/dist/utils/cli-logger.js +2 -2
  23. package/eventcatalog/src/components/MDX/EntityMap/CatalogEntityMap.tsx +301 -0
  24. package/eventcatalog/src/features/mcp/apps/generated/canvas.html +61 -61
  25. package/eventcatalog/src/features/mcp/apps/generated/viewer.html +72 -72
  26. package/eventcatalog/src/features/studio/components/ConnectAgentDialog.tsx +1 -1
  27. package/eventcatalog/src/features/studio/hooks/use-canvas-webmcp.ts +2 -2
  28. package/eventcatalog/src/features/studio/pages/webmcp-relay.ts +1 -1
  29. package/eventcatalog/src/features/studio/webmcp-relay/README.md +1 -1
  30. package/eventcatalog/src/features/studio/webmcp-relay/embed.js +1 -2
  31. package/eventcatalog/src/features/studio/webmcp-relay/widget.html +2 -1
  32. package/eventcatalog/src/features/studio/webmcp-relay/widget.js +2 -1
  33. package/eventcatalog/src/pages/visualiser/entity-map/index.astro +47 -0
  34. package/eventcatalog/src/pages/visualiser/graph/index.astro +2 -2
  35. package/eventcatalog/src/stores/sidebar-store/state.ts +10 -1
  36. package/eventcatalog/src/utils/node-graphs/catalog-entity-map-view.ts +82 -0
  37. package/eventcatalog/src/utils/node-graphs/catalog-entity-map.ts +113 -0
  38. package/eventcatalog/src/utils/node-graphs/domain-entity-map.ts +17 -61
  39. package/eventcatalog/src/utils/node-graphs/entity-layout.ts +53 -0
  40. package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +2 -2
  41. package/package.json +14 -14
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.9.1";
39
+ var version = "5.11.0";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-YBM7MCOY.js";
3
+ } from "../chunk-54GBEFRV.js";
4
4
  import "../chunk-CPW6G62V.js";
5
- import "../chunk-KGFAIGOT.js";
5
+ import "../chunk-Y32K66EM.js";
6
6
  export {
7
7
  raiseEvent
8
8
  };
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
169
169
  var import_os = __toESM(require("os"), 1);
170
170
 
171
171
  // package.json
172
- var version = "5.9.1";
172
+ var version = "5.11.0";
173
173
 
174
174
  // src/constants.ts
175
175
  var VERSION = version;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-3PWCUWQC.js";
3
+ } from "../chunk-EJXOHDUL.js";
4
4
  import "../chunk-AD7CL772.js";
5
- import "../chunk-YBM7MCOY.js";
5
+ import "../chunk-54GBEFRV.js";
6
6
  import "../chunk-YRZK7HKX.js";
7
7
  import "../chunk-CA6WCQ2T.js";
8
8
  import "../chunk-CPW6G62V.js";
9
- import "../chunk-KGFAIGOT.js";
9
+ import "../chunk-Y32K66EM.js";
10
10
  import "../chunk-4G7FSRPN.js";
11
11
  export {
12
12
  log_build_default as default
@@ -36,7 +36,7 @@ __export(catalog_runtime_exports, {
36
36
  });
37
37
  module.exports = __toCommonJS(catalog_runtime_exports);
38
38
 
39
- // ../../node_modules/.pnpm/tsup@8.5.0_jiti@2.7.0_postcss@8.5.31_tsx@4.23.15_typescript@5.9.3_yaml@2.9.1/node_modules/tsup/assets/cjs_shims.js
39
+ // ../../node_modules/.pnpm/tsup@8.5.0_jiti@2.7.0_postcss@8.5.32_tsx@4.23.15_typescript@5.9.3_yaml@2.9.1/node_modules/tsup/assets/cjs_shims.js
40
40
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
41
41
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
42
42
 
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-CPW6G62V.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-KGFAIGOT.js";
7
+ } from "./chunk-Y32K66EM.js";
8
8
 
9
9
  // src/analytics/analytics.js
10
10
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-JDSFD7IC.js";
3
+ } from "./chunk-EJU3H6C4.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-KGFAIGOT.js";
3
+ } from "./chunk-Y32K66EM.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-AD7CL772.js";
4
4
  import {
5
5
  raiseEvent
6
- } from "./chunk-YBM7MCOY.js";
6
+ } from "./chunk-54GBEFRV.js";
7
7
  import {
8
8
  countResources,
9
9
  hashCatalogContent,
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "5.9.1";
2
+ var version = "5.11.0";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "5.9.1";
28
+ var version = "5.11.0";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-KGFAIGOT.js";
3
+ } from "./chunk-Y32K66EM.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -58,6 +58,25 @@ Note that this previews your code as it existed when the build command was last
58
58
 
59
59
  Use (Ctrl + C) to quit the preview and run another terminal command, such as restarting the dev server to go back to working in development mode which does update as you edit to show a live preview of your code changes.
60
60
 
61
+ ### Find out where build time goes
62
+
63
+ <AddedIn version="5.11.0" />
64
+
65
+ If your catalog takes longer to build than you expect, add `--timings` to the build command. When the build finishes, EventCatalog prints a summary of where the time went:
66
+
67
+ ```bash
68
+ npx eventcatalog build --timings
69
+ ```
70
+
71
+ The summary breaks the build down into:
72
+
73
+ - **Build phases**: how long bundling and generating pages took.
74
+ - **Markdown plugins**: the time spent processing your Markdown and MDX files, such as syntax highlighting code blocks.
75
+ - **Slowest files to bundle** and **slowest pages**: the individual files and pages that took the longest.
76
+ - **Integrations**: the time spent in steps that run during the build, such as link validation.
77
+
78
+ Use it to decide what to look at first, or to compare build times before and after a change to your catalog.
79
+
61
80
 
62
81
  ## EventCatalog static vs server output
63
82
 
@@ -44,7 +44,12 @@ You can also embed an entity map on a page using the `<EntityMap />` component.
44
44
 
45
45
  Use embedded entity maps when you want the model to appear directly in domain, service, or custom documentation.
46
46
 
47
+ ## See every entity at once
48
+
49
+ Entity maps show the entities of one domain or service. To see every entity in your catalog, and how entities relate across domains, open the [Global Entity Map](/docs/development/guides/resources/entities/global-entity-map).
50
+
47
51
  ## Next steps
48
52
 
49
53
  - [Model entity relationships](/docs/development/guides/resources/entities/model-entity-relationships)
54
+ - [Global entity map](/docs/development/guides/resources/entities/global-entity-map)
50
55
  - [EntityMap component reference](/docs/development/components/components/entitymap)
@@ -0,0 +1,101 @@
1
+ ---
2
+ keywords:
3
+ - EventCatalog entities
4
+ - Global entity map
5
+ - Entity relationship diagram
6
+ - Data model
7
+ sidebar_position: 6
8
+ sidebar_label: Global entity map
9
+ title: Global entity map
10
+ description: See every entity in your catalog, and how they relate across domains, on one diagram.
11
+ ---
12
+
13
+ import AddedIn from '@site/src/components/MDX/AddedIn';
14
+
15
+ <AddedIn version="5.10.0" />
16
+
17
+ The Global Entity Map shows every entity in your catalog on one diagram, with the references between them. Where an [entity map](/docs/development/guides/resources/entities/entity-maps) shows the entities of one domain or service, the Global Entity Map shows the data model of the whole organization.
18
+
19
+ Use it to answer questions like:
20
+
21
+ - Which entities does each domain own?
22
+ - Which entities are referenced from other domains?
23
+ - Which entities are shared by more than one domain?
24
+ - Which entities don't belong to anything yet?
25
+
26
+ ![Global Entity Map showing every entity grouped into its domain](./img/global-entity-map.png)
27
+
28
+ ## Open the Global Entity Map
29
+
30
+ When your catalog has entities, a **Global Entity Map** link appears in the **Top level diagrams** section of the visualizer sidebar. You can also open it at:
31
+
32
+ ```txt
33
+ /visualiser/entity-map
34
+ ```
35
+
36
+ The map shows the latest version of every entity.
37
+
38
+ If you've [customized your sidebar](/docs/development/customization/documentation-sidebar#custom-groups-and-links), you can add a custom link to this URL.
39
+
40
+ ## How entities are placed in domains
41
+
42
+ [Entities can be added to domains, systems, and services](/docs/development/guides/resources/entities/add-entities-to-resources). The Global Entity Map works out which domain each entity belongs to from any of them:
43
+
44
+ | Entity listed by | Belongs to |
45
+ |------------------|------------|
46
+ | A domain | That domain. |
47
+ | A system | The system, and the domain the system is in. |
48
+ | A service | The service's system (if it's in one), and its domain. |
49
+ | More than one domain | **Shared across domains**, a group of its own. |
50
+ | Nothing | No domain. It's shown outside every group. |
51
+
52
+ A resource that pins an older version of an entity doesn't own the latest version. For example, if a domain lists `customer` at version `1.0.0` and the latest is `2.0.0`, that domain doesn't own the `customer` shown on the map.
53
+
54
+ An entity's team is its own owner, or else the owner of the domain, system, or service that lists it.
55
+
56
+ ## Group entities
57
+
58
+ The map opens with entities grouped by their domain. Use **Group by** at the top right of the diagram (or press <kbd>G</kbd>) to group them another way:
59
+
60
+ | Group by | What it shows |
61
+ |----------|---------------|
62
+ | **Domain** | A box for each domain, and one for entities shared across domains. |
63
+ | **System** | A box for each system. Only entities listed by a system, or by a service in one, are grouped. |
64
+ | **Team** | A box for each owning team. |
65
+ | **Domain, then system** | Systems nested in their domain. |
66
+ | **Nothing** | No groups. |
67
+
68
+ Groups can be shown as **Boxes** placed around their entities, or as **Lanes** stacked from top to bottom.
69
+
70
+ ![The Group by menu, with entities grouped by domain](./img/global-entity-map-group-by.png)
71
+
72
+ ## Filter what's shown
73
+
74
+ The panel on the left of the diagram lists each domain, with how many entities it has and how many references cross into other domains.
75
+
76
+ - Click a domain to show or hide its entities.
77
+ - Hover over a domain and click the button that appears beside it (**Only show**) to show just that domain. Click it again to show everything.
78
+ - Use **Show all** and **Hide all** to change every domain at once, and **Filter domains** to find a domain in a long list.
79
+ - Turn on **Only references across domains** to show only the entities that reference, or are referenced by, an entity in another domain. This is a quick way to see the dependencies between domains.
80
+
81
+ ![The Global Entity Map with two domains hidden and only references across domains shown](./img/global-entity-map-filters.png)
82
+
83
+ To give the diagram more room, collapse the panel with the button at its top right (or press <kbd>[</kbd>). The collapsed panel shows how many filters are on, so hidden domains aren't forgotten. The map remembers whether the panel is open in your browser.
84
+
85
+ ## Share a view
86
+
87
+ The domains you've hidden, the **Only references across domains** filter, and the grouping are all kept in the URL. Copy the URL to share exactly what you're looking at. For example:
88
+
89
+ ```txt
90
+ /visualiser/entity-map?hide=reviews,shopping&crossDomain=true&group=team
91
+ ```
92
+
93
+ ## Find an entity
94
+
95
+ Use **Search nodes** at the top of the diagram to find an entity. Picking one moves the diagram to it and selects it.
96
+
97
+ ## Next steps
98
+
99
+ - [Add entities to resources](/docs/development/guides/resources/entities/add-entities-to-resources)
100
+ - [Model entity relationships](/docs/development/guides/resources/entities/model-entity-relationships)
101
+ - [Entity maps](/docs/development/guides/resources/entities/entity-maps)
@@ -2,7 +2,7 @@
2
2
  keywords:
3
3
  - EventCatalog entities
4
4
  - Entity frontmatter
5
- sidebar_position: 6
5
+ sidebar_position: 7
6
6
  sidebar_label: Reference
7
7
  title: Entities reference
8
8
  description: Frontmatter fields, paths, and routes for entities in EventCatalog.
@@ -43,6 +43,7 @@ Nested entities use the same `versioned/{version}/index.mdx` pattern inside thei
43
43
  | `/visualiser/entities/{entity-id}/{version}` | Entity resource diagram. |
44
44
  | `/visualiser/domains/{domain-id}/{version}/entity-map` | Entity Diagram for entities assigned to a domain. |
45
45
  | `/visualiser/services/{service-id}/{version}/entity-map` | Entity Diagram for entities assigned to a service. |
46
+ | `/visualiser/entity-map` | [Global Entity Map](/docs/development/guides/resources/entities/global-entity-map): every entity in the catalog, grouped by domain. |
46
47
 
47
48
  ## Frontmatter example
48
49
 
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
 
25
- // ../../node_modules/.pnpm/tsup@8.5.0_jiti@2.7.0_postcss@8.5.31_tsx@4.23.15_typescript@5.9.3_yaml@2.9.1/node_modules/tsup/assets/cjs_shims.js
25
+ // ../../node_modules/.pnpm/tsup@8.5.0_jiti@2.7.0_postcss@8.5.32_tsx@4.23.15_typescript@5.9.3_yaml@2.9.1/node_modules/tsup/assets/cjs_shims.js
26
26
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
27
27
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
28
28
 
@@ -175,7 +175,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
175
175
  var import_picocolors = __toESM(require("picocolors"), 1);
176
176
 
177
177
  // package.json
178
- var version = "5.9.1";
178
+ var version = "5.11.0";
179
179
 
180
180
  // src/constants.ts
181
181
  var VERSION = version;
@@ -3431,7 +3431,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
3431
3431
  await watchUnsub?.();
3432
3432
  }
3433
3433
  });
3434
- program.command("build").description("Run build of EventCatalog").action(async (options, command) => {
3434
+ program.command("build").description("Run build of EventCatalog").option("--timings", "Print a summary of where the build spent its time").action(async (options, command) => {
3435
3435
  logger.welcome();
3436
3436
  logger.info("Building EventCatalog...", "build");
3437
3437
  const isServer = await isOutputServer();
@@ -3463,7 +3463,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
3463
3463
  checkForUpdate();
3464
3464
  await runCommandWithFilteredOutput({
3465
3465
  command: process.execPath,
3466
- args: [astroCli, "build", "--config", astroConfigPath(), ...command.args],
3466
+ args: [astroCli, "build", "--config", astroConfigPath(), ...options.timings ? ["--timings"] : [], ...command.args],
3467
3467
  cwd: dir,
3468
3468
  env: {
3469
3469
  PROJECT_DIR: dir,
@@ -1,18 +1,18 @@
1
+ import {
2
+ stopChildWithParent
3
+ } from "./chunk-S5GWAUG5.js";
1
4
  import {
2
5
  runMigrations
3
6
  } from "./chunk-XUAF2H54.js";
4
7
  import "./chunk-CA4U2JP7.js";
5
- import {
6
- stopChildWithParent
7
- } from "./chunk-S5GWAUG5.js";
8
8
  import {
9
9
  log_build_default
10
- } from "./chunk-3PWCUWQC.js";
10
+ } from "./chunk-EJXOHDUL.js";
11
11
  import {
12
12
  getLicenseStatus,
13
13
  printLicenseStatus
14
14
  } from "./chunk-AD7CL772.js";
15
- import "./chunk-YBM7MCOY.js";
15
+ import "./chunk-54GBEFRV.js";
16
16
  import "./chunk-YRZK7HKX.js";
17
17
  import "./chunk-CA6WCQ2T.js";
18
18
  import "./chunk-CPW6G62V.js";
@@ -39,10 +39,10 @@ import {
39
39
  } from "./chunk-NKNOXQ62.js";
40
40
  import {
41
41
  generate
42
- } from "./chunk-A3256YCN.js";
42
+ } from "./chunk-C4KPS65M.js";
43
43
  import {
44
44
  logger
45
- } from "./chunk-JDSFD7IC.js";
45
+ } from "./chunk-EJU3H6C4.js";
46
46
  import {
47
47
  resolve_catalog_dependencies_default
48
48
  } from "./chunk-PD7KTSYN.js";
@@ -79,7 +79,7 @@ import {
79
79
  } from "./chunk-LFQJXLHG.js";
80
80
  import {
81
81
  VERSION
82
- } from "./chunk-KGFAIGOT.js";
82
+ } from "./chunk-Y32K66EM.js";
83
83
  import {
84
84
  getEventCatalogConfigFile,
85
85
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -989,7 +989,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
989
989
  await watchUnsub?.();
990
990
  }
991
991
  });
992
- program.command("build").description("Run build of EventCatalog").action(async (options, command) => {
992
+ program.command("build").description("Run build of EventCatalog").option("--timings", "Print a summary of where the build spent its time").action(async (options, command) => {
993
993
  logger.welcome();
994
994
  logger.info("Building EventCatalog...", "build");
995
995
  const isServer = await isOutputServer();
@@ -1021,7 +1021,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
1021
1021
  checkForUpdate();
1022
1022
  await runCommandWithFilteredOutput({
1023
1023
  command: process.execPath,
1024
- args: [astroCli, "build", "--config", astroConfigPath(), ...command.args],
1024
+ args: [astroCli, "build", "--config", astroConfigPath(), ...options.timings ? ["--timings"] : [], ...command.args],
1025
1025
  cwd: dir,
1026
1026
  env: {
1027
1027
  PROJECT_DIR: dir,
package/dist/generate.cjs CHANGED
@@ -106,7 +106,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
106
106
  var import_picocolors = __toESM(require("picocolors"), 1);
107
107
 
108
108
  // package.json
109
- var version = "5.9.1";
109
+ var version = "5.11.0";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-A3256YCN.js";
4
- import "./chunk-JDSFD7IC.js";
5
- import "./chunk-KGFAIGOT.js";
3
+ } from "./chunk-C4KPS65M.js";
4
+ import "./chunk-EJU3H6C4.js";
5
+ import "./chunk-Y32K66EM.js";
6
6
  import "./chunk-4G7FSRPN.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.9.1";
39
+ var version = "5.11.0";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-JDSFD7IC.js";
4
- import "../chunk-KGFAIGOT.js";
3
+ } from "../chunk-EJU3H6C4.js";
4
+ import "../chunk-Y32K66EM.js";
5
5
  export {
6
6
  logger
7
7
  };