@eventcatalog/core 4.2.2 → 4.2.4

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 (68) 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-Z2CMR4HM.js → chunk-5MIGBCON.js} +1 -1
  6. package/dist/{chunk-ZGQNCIRW.js → chunk-BXEGST4Z.js} +1 -1
  7. package/dist/{chunk-HIQ22EHS.js → chunk-GCEFDCZB.js} +1 -1
  8. package/dist/{chunk-A5LDEHRI.js → chunk-J2MVHSKA.js} +1 -1
  9. package/dist/{chunk-JV33GNVZ.js → chunk-WVIOZDVK.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/development/00-why-eventcatalog.md +8 -8
  13. package/dist/docs/development/01-fundamentals.md +15 -12
  14. package/dist/docs/development/bring-your-own-documentation/diagrams/07-reference.md +4 -0
  15. package/dist/docs/development/components/components/07-custom-properties.md +85 -0
  16. package/dist/docs/development/components/components/{07-design.md → 08-design.md} +1 -1
  17. package/dist/docs/development/components/components/{08-entitymap.md → 09-entitymap.md} +2 -2
  18. package/dist/docs/development/components/components/{09-flow.md → 10-flow.md} +1 -1
  19. package/dist/docs/development/components/components/{10-link.md → 11-link.md} +1 -1
  20. package/dist/docs/development/components/components/{11-mermaid-file-loader.md → 12-mermaid-file-loader.md} +1 -1
  21. package/dist/docs/development/components/components/{12-message-table.md → 13-message-table.md} +1 -1
  22. package/dist/docs/development/components/components/{13-nodegraph.md → 14-nodegraph.md} +1 -2
  23. package/dist/docs/development/components/components/{14-openapi.md → 15-openapi.md} +1 -1
  24. package/dist/docs/development/components/components/{15-prompt.md → 16-prompt.md} +1 -1
  25. package/dist/docs/development/components/components/{16-remote-schema.md → 17-remote-schema.md} +1 -1
  26. package/dist/docs/development/components/components/{17-resource-group-table.md → 18-resource-group-table.md} +1 -1
  27. package/dist/docs/development/components/components/{18-resource-link.md → 19-resource-link.md} +1 -1
  28. package/dist/docs/development/components/components/{19-schema.md → 20-schema.md} +1 -1
  29. package/dist/docs/development/components/components/{20-schema-viewer.md → 21-schema-viewer.md} +1 -1
  30. package/dist/docs/development/components/components/{21-steps.md → 22-steps.md} +1 -1
  31. package/dist/docs/development/components/components/{22-tabs.md → 23-tabs.md} +1 -1
  32. package/dist/docs/development/components/components/{23-tiles.md → 24-tiles.md} +1 -1
  33. package/dist/docs/development/components/components/{24-visibility.md → 25-visibility.md} +1 -1
  34. package/dist/docs/development/customization/02-themes.md +1 -1
  35. package/dist/docs/development/customization/06-customize-tables.md +1 -1
  36. package/dist/docs/development/customization/07-resource-icons.md +1 -1
  37. package/dist/docs/development/customization/08-custom-properties.md +176 -0
  38. package/dist/docs/development/customization/customize-visualizer/_category_.json +1 -1
  39. package/dist/docs/development/deployment/build-ssr-mode.md +9 -1
  40. package/dist/docs/development/guides/domains/09-reference.md +4 -0
  41. package/dist/docs/development/guides/resources/adrs/06-reference.md +4 -0
  42. package/dist/docs/development/guides/resources/agents/11-reference.md +4 -0
  43. package/dist/docs/development/guides/resources/data/04-reference.md +4 -0
  44. package/dist/docs/development/guides/resources/data-products/07-reference.md +4 -0
  45. package/dist/docs/development/guides/resources/entities/06-reference.md +4 -0
  46. package/dist/docs/development/guides/resources/flows/06-reference.md +4 -0
  47. package/dist/docs/development/guides/resources/messages/04-connect-messages/02-shared-messages-across-boundaries.md +1 -0
  48. package/dist/docs/development/guides/resources/messages/04-connect-messages/04-map-commands-to-events.md +95 -0
  49. package/dist/docs/development/guides/resources/messages/04-message-channels/05-reference.md +4 -0
  50. package/dist/docs/development/guides/resources/messages/10-reference.md +4 -0
  51. package/dist/docs/development/guides/resources/services/08-reference.md +12 -0
  52. package/dist/docs/development/guides/systems/06-reference.md +4 -0
  53. package/dist/eventcatalog.cjs +1 -1
  54. package/dist/eventcatalog.js +5 -5
  55. package/dist/generate.cjs +1 -1
  56. package/dist/generate.js +3 -3
  57. package/dist/utils/cli-logger.cjs +1 -1
  58. package/dist/utils/cli-logger.js +2 -2
  59. package/eventcatalog/src/components/MDX/CustomProperties/CustomProperties.astro +39 -0
  60. package/eventcatalog/src/components/MDX/CustomProperties/CustomProperty.astro +37 -0
  61. package/eventcatalog/src/components/MDX/CustomProperties/CustomPropertyRow.astro +37 -0
  62. package/eventcatalog/src/components/MDX/CustomProperties/CustomPropertyValue.astro +51 -0
  63. package/eventcatalog/src/components/MDX/CustomProperties/custom-properties.spec.ts +38 -0
  64. package/eventcatalog/src/components/MDX/CustomProperties/custom-properties.ts +39 -0
  65. package/eventcatalog/src/components/MDX/components.tsx +4 -0
  66. package/eventcatalog/src/content.config.ts +402 -373
  67. package/eventcatalog/src/utils/collections/extension-properties.ts +25 -0
  68. package/package.json +12 -12
@@ -0,0 +1,176 @@
1
+ ---
2
+ sidebar_position: 6
3
+ keywords:
4
+ - EventCatalog custom properties
5
+ - resource metadata
6
+ - custom frontmatter
7
+ sidebar_label: Resource custom properties
8
+ title: Custom properties on resources
9
+ description: Add organization-specific metadata to EventCatalog resources and render it in Markdown or custom components.
10
+ ---
11
+
12
+ import AddedIn from '@site/src/components/MDX/AddedIn';
13
+
14
+ <AddedIn version="4.2.3" />
15
+
16
+ Custom properties let you add organization-specific metadata to a resource without changing EventCatalog's built-in resource model.
17
+
18
+ Custom property names must:
19
+
20
+ - be defined at the top level of the resource frontmatter
21
+ - start with `x-`
22
+ - contain at least one character after `x-`
23
+
24
+ Their values can be strings, numbers, booleans, arrays, or nested objects.
25
+
26
+ ```markdown title="/services/PaymentAPI/index.mdx"
27
+ ---
28
+ id: PaymentAPI
29
+ name: Payment API
30
+ version: 1.0.0
31
+ summary: Authorizes and records payments.
32
+ x-operational-tier: 1
33
+ x-scrum-masters:
34
+ - David
35
+ - Andrew
36
+ x-on-call:
37
+ schedule: payments-primary
38
+ escalation-channel: '#payments-incidents'
39
+ ---
40
+ ```
41
+
42
+ You can add custom properties to domains, systems, services, agents, events, commands, queries, channels, flows, containers, entities, data products, diagrams, and ADRs.
43
+
44
+ ## Why use custom properties?
45
+
46
+ EventCatalog provides first-class fields for common concepts such as owners, messages, relationships, schemas, and repositories. Custom properties are useful when your organization needs metadata that is specific to its own platform or processes.
47
+
48
+ For example, you can use them to record:
49
+
50
+ - operational tiers, recovery objectives, or on-call schedules
51
+ - data classification, retention, or compliance requirements
52
+ - internal cost centres or business capabilities
53
+ - maturity scores or governance review dates
54
+ - metadata consumed by generators, plugins, or custom components
55
+
56
+ Custom properties are also useful when you want to introduce an internal convention gradually without requiring EventCatalog to understand or interpret the value.
57
+
58
+ :::tip
59
+ Use EventCatalog's built-in fields when they already describe the concept. Use custom properties for metadata that is specific to your organization.
60
+ :::
61
+
62
+ ## Render all custom properties
63
+
64
+ Add the `CustomProperties` component to the Markdown content of a resource to render every `x-*` property.
65
+
66
+ `CustomProperties` and `CustomProperty` are built-in components, so you do not need to import them.
67
+
68
+ ```jsx title="/services/PaymentAPI/index.mdx"
69
+ <CustomProperties />
70
+ ```
71
+
72
+ By default, the component uses **Custom properties** as its heading. Use the `title` prop to change it.
73
+
74
+ ```jsx
75
+ <CustomProperties title="Operational metadata" />
76
+ ```
77
+
78
+ Property names are converted into readable labels. For example, `x-operational-tier` is displayed as **Operational Tier**. The original `x-*` name is available from the information icon beside the label.
79
+
80
+ Arrays are rendered as lists and nested objects are rendered as grouped values.
81
+
82
+ ![Custom properties rendered on an architecture decision record](/img/docs/components/custom-properties.png)
83
+
84
+ These component and JavaScript expression examples require an `.mdx` resource file. Plain `.md` files do not evaluate MDX components or expressions.
85
+
86
+ ## Render one custom property
87
+
88
+ Use `CustomProperty` when you only want to show one value.
89
+
90
+ ```jsx title="/services/PaymentAPI/index.mdx"
91
+ <CustomProperty name="x-operational-tier" />
92
+ ```
93
+
94
+ You can override the generated label.
95
+
96
+ ```jsx
97
+ <CustomProperty name="x-scrum-masters" label="Scrum masters" />
98
+ ```
99
+
100
+ If the named property is not present on the resource, the component renders nothing.
101
+
102
+ ## Reference custom properties in Markdown
103
+
104
+ Resource frontmatter is available through the `frontmatter` variable. Because custom property names contain hyphens, use JavaScript bracket notation.
105
+
106
+ ```jsx title="/services/PaymentAPI/index.mdx"
107
+ ## Operations
108
+
109
+ Operational tier: {frontmatter['x-operational-tier']}
110
+ ```
111
+
112
+ Dot notation does not work:
113
+
114
+ ```jsx
115
+ {/* This is interpreted as subtraction and causes a runtime error. */}
116
+ {frontmatter.x-operational-tier}
117
+ ```
118
+
119
+ Render an array by mapping over its value.
120
+
121
+ ```jsx
122
+ <ul>
123
+ {frontmatter['x-scrum-masters']?.map((name) => (
124
+ <li>{name}</li>
125
+ ))}
126
+ </ul>
127
+ ```
128
+
129
+ Nested object values can be referenced in the same way.
130
+
131
+ ```jsx
132
+ On-call schedule: {frontmatter['x-on-call'].schedule}
133
+ ```
134
+
135
+ ## Pass custom properties to your own components
136
+
137
+ Custom components do not receive resource frontmatter automatically. Pass the values they need as props.
138
+
139
+ ```jsx title="/services/PaymentAPI/index.mdx"
140
+ import OperationalMetadata from '@catalog/components/operational-metadata.astro';
141
+
142
+ <OperationalMetadata
143
+ tier={frontmatter['x-operational-tier']}
144
+ scrumMasters={frontmatter['x-scrum-masters']}
145
+ />
146
+ ```
147
+
148
+ Read those props in your Astro component.
149
+
150
+ ```jsx title="/components/operational-metadata.astro"
151
+ ---
152
+ interface Props {
153
+ tier: number;
154
+ scrumMasters?: string[];
155
+ }
156
+
157
+ const { tier, scrumMasters = [] } = Astro.props;
158
+ ---
159
+
160
+ <section class="not-prose">
161
+ <p>Operational tier: {tier}</p>
162
+ <ul>
163
+ {scrumMasters.map((name) => <li>{name}</li>)}
164
+ </ul>
165
+ </section>
166
+ ```
167
+
168
+ Read [Pass data into components](/docs/development/components/custom-components/pass-data-into-components) to learn more about using resource frontmatter with your own components.
169
+
170
+ ## Naming and security guidance
171
+
172
+ - Use stable, descriptive names such as `x-operational-tier` or `x-data-classification`.
173
+ - Consider an organization namespace, such as `x-acme-cost-centre`, when properties may be shared across tools.
174
+ - Keep the meaning and expected value type consistent across resources.
175
+ - Do not store secrets, credentials, or private tokens in custom properties. Resource frontmatter is catalog content and may be included in generated output.
176
+ - Custom properties are stored and rendered, but EventCatalog does not automatically use them for relationships, diagrams, search behavior, or validation beyond the `x-*` naming requirement.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "label": "Customize Visualizer",
3
- "position": 8,
3
+ "position": 10,
4
4
  "collapsible": true,
5
5
  "collapsed": true,
6
6
  "link": {
@@ -47,4 +47,12 @@ This will output one directory
47
47
 
48
48
  You will need to deploy your EventCatalog to a server that can run Node.js.
49
49
 
50
- The easiest way to do this is to use [a docker container](/docs/development/deployment/hosting-options#hosting-static-website-with-docker).
50
+ The easiest way to do this is to use [a docker container](/docs/development/deployment/hosting-options#hosting-static-website-with-docker).
51
+
52
+ ## Loading indicator
53
+
54
+ <AddedIn version="4.2.4" />
55
+
56
+ Server-side rendering means a page's render time depends on your server, so navigations can occasionally take longer than a static build.
57
+
58
+ EventCatalog shows a thin progress bar at the top of the page during navigations that take longer than 200ms, so the catalog never looks unresponsive. It works automatically and needs no configuration.
@@ -515,3 +515,7 @@ The attachments can be a URL string or an object with additional properties.
515
515
  | `description` | `string` | No | The description of the attachment. |
516
516
  | `type` | `string` | No | The type of the attachment, used to group attachments in the UI. |
517
517
  | `icon` | `string` | No | The icon of the attachment. You can pick from the [lucide icons](https://lucide.dev/icons/) library. |
518
+
519
+ ## Custom properties
520
+
521
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -245,3 +245,7 @@ appliesTo:
245
245
  ```
246
246
 
247
247
  Supported resource types include `agent`, `service`, `system`, `event`, `command`, `query`, `flow`, `channel`, `domain`, `user`, `team`, `container`, `entity`, `diagram`, and `data-product`.
248
+
249
+ ## Custom properties
250
+
251
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -236,3 +236,7 @@ tools:
236
236
  description: Retrieves order status and recent order events.
237
237
  ---
238
238
  ```
239
+
240
+ ## Custom properties
241
+
242
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -209,3 +209,7 @@ badges:
209
209
  textColor: green
210
210
  ---
211
211
  ```
212
+
213
+ ## Custom properties
214
+
215
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -199,3 +199,7 @@ outputs:
199
199
  type: avro
200
200
  ---
201
201
  ```
202
+
203
+ ## Custom properties
204
+
205
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -271,3 +271,7 @@ Use `<EntityPropertiesTable />` in the entity Markdown body to render the entity
271
271
  ```
272
272
 
273
273
  This is useful when you want the documentation page to show the same properties defined in frontmatter.
274
+
275
+ ## Custom properties
276
+
277
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -224,3 +224,7 @@ steps:
224
224
  next_step: submit-order
225
225
  ---
226
226
  ```
227
+
228
+ ## Custom properties
229
+
230
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -4,6 +4,7 @@ keywords:
4
4
  sidebar_label: Patterns for shared messages
5
5
  title: Patterns for shared messages
6
6
  description: Understand the patterns for shared messages in EventCatalog.
7
+ sidebar_position: 3
7
8
  ---
8
9
 
9
10
  import ProjectTree from '@site/src/components/MDX/ProjectTree';
@@ -0,0 +1,95 @@
1
+ ---
2
+ keywords:
3
+ - EventCatalog command events
4
+ - command outcomes
5
+ - map commands to events
6
+ sidebar_label: Map commands to events
7
+ title: Map commands to events
8
+ description: Document which events a command can trigger, including the events produced in different scenarios.
9
+ sidebar_position: 2
10
+ ---
11
+
12
+ import AddedIn from '@site/src/components/MDX/AddedIn';
13
+
14
+ <AddedIn version="4.2.0" />
15
+
16
+ Commands often produce one of several events. For example, a `CreateOrder` command may produce `OrderCreated` when it succeeds or `OrderRejected` when it fails.
17
+
18
+ EventCatalog lets you document these relationships so teams can see which events to expect from a command and which commands can produce a specific event.
19
+
20
+ ![Cancel Order command mapped to the Order Cancelled event through the Order Service](./imgs/cancel-order-command-to-event.png)
21
+
22
+ ## Connect a command to events
23
+
24
+ Commands are `received` from particular resources in EventCatalog (e.g services). When you receive a command, you can also specify what events are triggered downstream, you do this by using the `triggers` property.
25
+
26
+ In the example below, the `OrderService` receives the `CreateOrder` (command) and we also specify that htis command is linked to and triggers the `OrderCreated` and `OrderRejected` event.
27
+
28
+
29
+ ```md title="/services/OrderService/index.mdx"
30
+ ---
31
+ id: OrderService
32
+ version: 1.0.0
33
+ name: Order service
34
+ receives:
35
+ # receives the CreateOrder Command
36
+ - id: CreateOrder
37
+ version: 1.0.0
38
+ # Tell EventCatalog that the CreateOrderCommand
39
+ # in this context will trigger the OrderCreated and Rejeected events.
40
+ triggers:
41
+ - id: OrderCreated
42
+ version: 1.0.0
43
+ - id: OrderRejected
44
+ version: 1.0.0
45
+ ---
46
+ ```
47
+
48
+ The command and every event it triggers must already exist in your catalog before EventCatalog can resolve the relationship.
49
+
50
+ ## Describe different scenarios
51
+
52
+ Add an optional `condition` to explain the scenario in which an event is produced. Conditions are useful for success and failure outcomes, business-rule branches, or different paths that produce the same event.
53
+
54
+ ```md title="/services/OrderService/index.mdx"
55
+ ---
56
+ id: OrderService
57
+ version: 1.0.0
58
+ name: Order service
59
+ receives:
60
+ - id: CreateOrder
61
+ version: 1.0.0
62
+ triggers:
63
+ - id: OrderCreated
64
+ version: 1.0.0
65
+ # specify the scenario when this event would be triggered
66
+ condition: When payment is authorized and stock is available
67
+ ---
68
+ ```
69
+
70
+ This lets you document common command-handling scenarios such as:
71
+
72
+ - A command producing a success event or a failure event.
73
+ - A command producing different events based on a business rule.
74
+ - Multiple paths producing the same event for different reasons.
75
+ - Different services producing different events from the same command.
76
+
77
+ | Property | Type | Required | Description |
78
+ | -------- | ---- | -------- | ----------- |
79
+ | `id` | `string` | Yes | Id of the event produced by the command. |
80
+ | `version` | `string` | No | Version or semver range of the event. Defaults to `latest`. |
81
+ | `condition` | `string` | No | Scenario in which the command produces the event. |
82
+
83
+ The `version` on the received command also defaults to `latest` when omitted.
84
+
85
+ ## Explore command and event relationships
86
+
87
+ The command page lists its events under **Triggers**. Each event page lists the commands that can produce it under **Triggered by**. Message maps also show the command, the resource handling it, and the resulting events.
88
+
89
+ The example below shows the `Cancel Order` command mapped to the `Order Cancelled` event through the `Order Service`, including the scenario in which the event is produced.
90
+
91
+ ![Cancel Order command mapped to the Order Cancelled event through the Order Service](./imgs/cancel-order-command-to-event.png)
92
+
93
+ Select **Map commands to events** under **Architecture** to compare these relationships. EventCatalog draws each command-to-event path through the receiving service or domain and groups repeated paths into selectable scenarios.
94
+
95
+ The **Map commands to events** link is only generated for messages that participate in at least one resolved relationship.
@@ -175,3 +175,7 @@ Supported values are `at-most-once`, `at-least-once`, and `exactly-once`.
175
175
  deliveryGuarantee: at-least-once
176
176
  ---
177
177
  ```
178
+
179
+ ## Custom properties
180
+
181
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -437,3 +437,7 @@ schemas:
437
437
  format: jsonschema
438
438
  ---
439
439
  ```
440
+
441
+ ## Custom properties
442
+
443
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -8,6 +8,8 @@ title: Services reference
8
8
  description: Frontmatter fields, paths, and routes for services in EventCatalog.
9
9
  ---
10
10
 
11
+ import AddedIn from '@site/src/components/MDX/AddedIn';
12
+
11
13
  This page lists the fields, paths, and routes supported by services.
12
14
 
13
15
  ## Paths
@@ -132,6 +134,12 @@ receives:
132
134
  ---
133
135
  ```
134
136
 
137
+ #### Map commands to events
138
+
139
+ <AddedIn version="4.2.0" />
140
+
141
+ Each received command can declare the events it triggers. See [Map commands to events](/docs/development/guides/resources/messages/connect-messages/map-commands-to-events) for the supported fields, scenarios, and generated views.
142
+
135
143
  ### `entities` {#entities}
136
144
 
137
145
  - Type: `array`
@@ -293,3 +301,7 @@ flows:
293
301
  ```
294
302
 
295
303
  If `version` is omitted, EventCatalog uses the latest version.
304
+
305
+ ## Custom properties
306
+
307
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -327,3 +327,7 @@ actors:
327
327
  | `name` | `string` | Display name shown in diagrams. Optional. |
328
328
  | `label` | `string` | Text shown on the actor relationship edge. Optional. |
329
329
  | `direction` | `inbound` or `outbound` | `inbound` means actor to system. `outbound` means system to actor. Defaults to `inbound`. |
330
+
331
+ ## Custom properties
332
+
333
+ You can add organization-specific metadata to this resource using frontmatter fields prefixed with `x-`. Learn how to define, render, and reference them in [Custom properties on resources](/docs/development/customization/custom-properties).
@@ -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.2.2";
147
+ var version = "4.2.4";
148
148
 
149
149
  // src/constants.ts
150
150
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log_build_default
3
- } from "./chunk-HIQ22EHS.js";
3
+ } from "./chunk-GCEFDCZB.js";
4
4
  import "./chunk-K2XIENVT.js";
5
5
  import {
6
6
  runMigrations
@@ -14,10 +14,10 @@ import {
14
14
  } from "./chunk-B7HCX5HM.js";
15
15
  import {
16
16
  generate
17
- } from "./chunk-JV33GNVZ.js";
17
+ } from "./chunk-WVIOZDVK.js";
18
18
  import {
19
19
  logger
20
- } from "./chunk-Z2CMR4HM.js";
20
+ } from "./chunk-5MIGBCON.js";
21
21
  import {
22
22
  resolve_catalog_dependencies_default
23
23
  } from "./chunk-LHR4G2UO.js";
@@ -27,7 +27,7 @@ import {
27
27
  import {
28
28
  watch
29
29
  } from "./chunk-CAJUIMDJ.js";
30
- import "./chunk-ZGQNCIRW.js";
30
+ import "./chunk-BXEGST4Z.js";
31
31
  import {
32
32
  createAstroDevLineFilter,
33
33
  createAstroLineFilter
@@ -38,7 +38,7 @@ import {
38
38
  import "./chunk-W5JQON7Z.js";
39
39
  import {
40
40
  VERSION
41
- } from "./chunk-A5LDEHRI.js";
41
+ } from "./chunk-J2MVHSKA.js";
42
42
  import {
43
43
  linkCoreNodeModules,
44
44
  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.2.2";
111
+ var version = "4.2.4";
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-JV33GNVZ.js";
4
- import "./chunk-Z2CMR4HM.js";
5
- import "./chunk-A5LDEHRI.js";
3
+ } from "./chunk-WVIOZDVK.js";
4
+ import "./chunk-5MIGBCON.js";
5
+ import "./chunk-J2MVHSKA.js";
6
6
  import "./chunk-6QENHZZP.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 = "4.2.2";
39
+ var version = "4.2.4";
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-Z2CMR4HM.js";
4
- import "../chunk-A5LDEHRI.js";
3
+ } from "../chunk-5MIGBCON.js";
4
+ import "../chunk-J2MVHSKA.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -0,0 +1,39 @@
1
+ ---
2
+ import CustomPropertyRow from './CustomPropertyRow.astro';
3
+ import { getCustomProperties } from './custom-properties';
4
+
5
+ interface Props {
6
+ title?: string;
7
+ data?: Record<string, unknown>;
8
+ }
9
+
10
+ const { title = 'Custom properties', data } = Astro.props;
11
+ const properties = getCustomProperties(data);
12
+ ---
13
+
14
+ {
15
+ properties.length > 0 && (
16
+ <section class="not-prose my-8">
17
+ {title && <h3 class="mb-4 text-xl font-semibold text-[rgb(var(--ec-page-text))]">{title}</h3>}
18
+ <div class="overflow-x-auto">
19
+ <table class="w-full border-collapse text-left text-sm text-[rgb(var(--ec-page-text-muted))]">
20
+ <thead>
21
+ <tr class="border-b border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text))]">
22
+ <th scope="col" class="py-3 pr-6 font-semibold">
23
+ Property
24
+ </th>
25
+ <th scope="col" class="py-3 font-semibold">
26
+ Value
27
+ </th>
28
+ </tr>
29
+ </thead>
30
+ <tbody class="divide-y divide-[rgb(var(--ec-page-border))]">
31
+ {properties.map((property) => (
32
+ <CustomPropertyRow property={property} />
33
+ ))}
34
+ </tbody>
35
+ </table>
36
+ </div>
37
+ </section>
38
+ )
39
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ import CustomPropertyRow from './CustomPropertyRow.astro';
3
+ import { getCustomProperty } from './custom-properties';
4
+
5
+ interface Props {
6
+ name: string;
7
+ label?: string;
8
+ data?: Record<string, unknown>;
9
+ }
10
+
11
+ const { name, label, data } = Astro.props;
12
+ const property = getCustomProperty(data, name);
13
+
14
+ if (property && label) property.label = label;
15
+ ---
16
+
17
+ {
18
+ property && (
19
+ <div class="not-prose my-6 overflow-x-auto">
20
+ <table class="w-full border-collapse text-left text-sm text-[rgb(var(--ec-page-text-muted))]">
21
+ <thead>
22
+ <tr class="border-b border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text))]">
23
+ <th scope="col" class="py-3 pr-6 font-semibold">
24
+ Property
25
+ </th>
26
+ <th scope="col" class="py-3 font-semibold">
27
+ Value
28
+ </th>
29
+ </tr>
30
+ </thead>
31
+ <tbody class="divide-y divide-[rgb(var(--ec-page-border))]">
32
+ <CustomPropertyRow property={property} />
33
+ </tbody>
34
+ </table>
35
+ </div>
36
+ )
37
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ import CustomPropertyValue from './CustomPropertyValue.astro';
3
+ import type { CustomProperty } from './custom-properties';
4
+ import { InformationCircleIcon } from '@heroicons/react/24/outline';
5
+
6
+ interface Props {
7
+ property: CustomProperty;
8
+ }
9
+
10
+ const { property } = Astro.props;
11
+ ---
12
+
13
+ <tr class="hover:bg-[rgb(var(--ec-content-hover))]">
14
+ <td class="w-1/3 min-w-48 py-4 pr-6 align-top font-medium text-[rgb(var(--ec-page-text))]">
15
+ <span class="inline-flex items-center gap-1.5">
16
+ {property.label}
17
+ <span class="group relative inline-flex">
18
+ <button
19
+ type="button"
20
+ class="inline-flex cursor-help text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))] focus:outline-hidden focus:ring-2 focus:ring-[rgb(var(--ec-accent))] focus:ring-offset-2"
21
+ aria-label={`Frontmatter property: ${property.name}`}
22
+ >
23
+ <InformationCircleIcon className="h-4 w-4" aria-hidden="true" />
24
+ </button>
25
+ <span
26
+ role="tooltip"
27
+ class="pointer-events-none absolute left-full top-1/2 z-20 ml-2 -translate-y-1/2 whitespace-nowrap rounded-md bg-[rgb(var(--ec-page-text))] px-2.5 py-1.5 text-xs font-medium text-[rgb(var(--ec-page-bg))] opacity-0 shadow-lg transition-opacity group-hover:opacity-100 group-focus-within:opacity-100"
28
+ >
29
+ {property.name}
30
+ </span>
31
+ </span>
32
+ </span>
33
+ </td>
34
+ <td class="min-w-0 py-4 align-top text-sm">
35
+ <CustomPropertyValue value={property.value} />
36
+ </td>
37
+ </tr>