@eventcatalog/core 3.39.2 → 3.39.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 (48) 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-K2IR7X4Z.js → chunk-NSR4DZXS.js} +1 -1
  6. package/dist/{chunk-2VUYMTYY.js → chunk-O2CZERUN.js} +1 -1
  7. package/dist/{chunk-EC633RFS.js → chunk-ONQOIF2X.js} +1 -1
  8. package/dist/{chunk-Z3G6IPPF.js → chunk-PVOVC2UV.js} +1 -1
  9. package/dist/{chunk-4NHSANWO.js → chunk-WLUQZCIH.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/api/02-config.md +25 -0
  13. package/dist/docs/api/03-domain-api.md +32 -2
  14. package/dist/docs/api/04-service-api.md +32 -2
  15. package/dist/docs/api/05-command-api.md +32 -2
  16. package/dist/docs/api/06-event-api.md +32 -2
  17. package/dist/docs/api/06-query-api.md +32 -2
  18. package/dist/docs/api/08-channel-api.md +32 -2
  19. package/dist/docs/api/09-flow-api.md +32 -2
  20. package/dist/docs/api/10-entity-api.md +32 -2
  21. package/dist/docs/api/12-data-product-api.md +14 -2
  22. package/dist/docs/development/guides/diagrams/05-comparing-diagrams.md +1 -1
  23. package/dist/docs/development/license-keys/_category_.json +12 -0
  24. package/dist/docs/development/license-keys/integrations.md +41 -0
  25. package/dist/docs/development/license-keys/license-validation.md +34 -0
  26. package/dist/docs/development/license-keys/overview.md +52 -0
  27. package/dist/docs/development/license-keys/plans.md +50 -0
  28. package/dist/eventcatalog.cjs +1 -1
  29. package/dist/eventcatalog.js +5 -5
  30. package/dist/generate.cjs +1 -1
  31. package/dist/generate.js +3 -3
  32. package/dist/utils/cli-logger.cjs +1 -1
  33. package/dist/utils/cli-logger.js +2 -2
  34. package/eventcatalog/src/components/Grids/DomainGrid.tsx +2 -1
  35. package/eventcatalog/src/components/Tables/Discover/columns.tsx +2 -0
  36. package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +2 -0
  37. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +4 -4
  38. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +4 -4
  39. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +16 -10
  40. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +6 -5
  41. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +22 -51
  42. package/eventcatalog/src/pages/docs/[type]/[id]/_index.data.ts +67 -0
  43. package/eventcatalog/src/pages/docs/[type]/[id]/index.astro +4 -41
  44. package/eventcatalog/src/styles/theme.css +92 -0
  45. package/eventcatalog/src/utils/badge-styles.ts +206 -0
  46. package/eventcatalog/src/utils/page-loaders/page-data-loader.ts +16 -13
  47. package/package.json +3 -3
  48. package/dist/docs/development/deployment/licenses.md +0 -50
@@ -1,49 +1,12 @@
1
1
  ---
2
2
  import Seo from '@components/Seo.astro';
3
3
  import { buildUrl } from '@utils/url-builder';
4
- import { getEvents } from '@utils/collections/events';
5
- import { getEntities } from '@utils/collections/entities';
6
- import { getCommands } from '@utils/collections/commands';
7
- import { getServices } from '@utils/collections/services';
8
- import { getDomains } from '@utils/collections/domains';
9
- import type { CollectionEntry } from 'astro:content';
10
- import type { CollectionTypes } from '@types';
11
- import { getChannels } from '@utils/collections/channels';
4
+ import { Page } from './_index.data';
12
5
 
13
- export async function getStaticPaths() {
14
- const [events, commands, services, domains, channels, entities] = await Promise.all([
15
- getEvents(),
16
- getCommands(),
17
- getServices(),
18
- getDomains(),
19
- getChannels(),
20
- getEntities(),
21
- ]);
6
+ export const prerender = Page.prerender;
7
+ export const getStaticPaths = Page.getStaticPaths;
22
8
 
23
- const buildPages = (collection: CollectionEntry<CollectionTypes>[]) => {
24
- return collection.map((item) => ({
25
- params: {
26
- type: item.collection,
27
- id: item.data.id,
28
- },
29
- props: {
30
- type: item.collection,
31
- ...item,
32
- },
33
- }));
34
- };
35
-
36
- return [
37
- ...buildPages(domains),
38
- ...buildPages(events),
39
- ...buildPages(services),
40
- ...buildPages(commands),
41
- ...buildPages(channels),
42
- ...buildPages(entities),
43
- ];
44
- }
45
-
46
- const props = Astro.props;
9
+ const props = await Page.getData(Astro);
47
10
 
48
11
  const pageTitle = `${props.collection} | ${props.data.name}`.replace(/^\w/, (c) => c.toUpperCase());
49
12
 
@@ -114,6 +114,52 @@
114
114
  --ec-badge-data-product-text: 30 64 175; /* blue-800 */
115
115
  --ec-badge-default-bg: 243 244 246; /* gray-100 */
116
116
  --ec-badge-default-text: 75 85 99; /* gray-600 */
117
+
118
+ /* User-defined badge colors - light mode */
119
+ --ec-badge-color-slate-background: 248 250 252;
120
+ --ec-badge-color-slate-text: 71 85 105;
121
+ --ec-badge-color-gray-background: 249 250 251;
122
+ --ec-badge-color-gray-text: 75 85 99;
123
+ --ec-badge-color-zinc-background: 250 250 250;
124
+ --ec-badge-color-zinc-text: 82 82 91;
125
+ --ec-badge-color-neutral-background: 250 250 250;
126
+ --ec-badge-color-neutral-text: 82 82 82;
127
+ --ec-badge-color-stone-background: 250 250 249;
128
+ --ec-badge-color-stone-text: 87 83 78;
129
+ --ec-badge-color-red-background: 254 242 242;
130
+ --ec-badge-color-red-text: 185 28 28;
131
+ --ec-badge-color-orange-background: 255 247 237;
132
+ --ec-badge-color-orange-text: 194 65 12;
133
+ --ec-badge-color-amber-background: 255 251 235;
134
+ --ec-badge-color-amber-text: 180 83 9;
135
+ --ec-badge-color-yellow-background: 254 252 232;
136
+ --ec-badge-color-yellow-text: 161 98 7;
137
+ --ec-badge-color-lime-background: 247 254 231;
138
+ --ec-badge-color-lime-text: 77 124 15;
139
+ --ec-badge-color-green-background: 240 253 244;
140
+ --ec-badge-color-green-text: 21 128 61;
141
+ --ec-badge-color-emerald-background: 236 253 245;
142
+ --ec-badge-color-emerald-text: 4 120 87;
143
+ --ec-badge-color-teal-background: 240 253 250;
144
+ --ec-badge-color-teal-text: 15 118 110;
145
+ --ec-badge-color-cyan-background: 236 254 255;
146
+ --ec-badge-color-cyan-text: 14 116 144;
147
+ --ec-badge-color-sky-background: 240 249 255;
148
+ --ec-badge-color-sky-text: 3 105 161;
149
+ --ec-badge-color-blue-background: 239 246 255;
150
+ --ec-badge-color-blue-text: 29 78 216;
151
+ --ec-badge-color-indigo-background: 238 242 255;
152
+ --ec-badge-color-indigo-text: 67 56 202;
153
+ --ec-badge-color-violet-background: 245 243 255;
154
+ --ec-badge-color-violet-text: 109 40 217;
155
+ --ec-badge-color-purple-background: 250 245 255;
156
+ --ec-badge-color-purple-text: 126 34 206;
157
+ --ec-badge-color-fuchsia-background: 253 244 255;
158
+ --ec-badge-color-fuchsia-text: 162 28 175;
159
+ --ec-badge-color-pink-background: 253 242 248;
160
+ --ec-badge-color-pink-text: 190 24 93;
161
+ --ec-badge-color-rose-background: 255 241 242;
162
+ --ec-badge-color-rose-text: 190 18 60;
117
163
  }
118
164
 
119
165
  /* Dark theme */
@@ -222,6 +268,52 @@
222
268
  --ec-badge-data-product-text: 147 197 253; /* blue-300 */
223
269
  --ec-badge-default-bg: 63 63 70 / 0.3; /* zinc-700/30 */
224
270
  --ec-badge-default-text: 212 212 216; /* zinc-300 */
271
+
272
+ /* User-defined badge colors - dark mode */
273
+ --ec-badge-color-slate-background: 51 65 85 / 0.28;
274
+ --ec-badge-color-slate-text: 203 213 225;
275
+ --ec-badge-color-gray-background: 55 65 81 / 0.28;
276
+ --ec-badge-color-gray-text: 209 213 219;
277
+ --ec-badge-color-zinc-background: 63 63 70 / 0.28;
278
+ --ec-badge-color-zinc-text: 212 212 216;
279
+ --ec-badge-color-neutral-background: 64 64 64 / 0.28;
280
+ --ec-badge-color-neutral-text: 212 212 212;
281
+ --ec-badge-color-stone-background: 68 64 60 / 0.28;
282
+ --ec-badge-color-stone-text: 214 211 209;
283
+ --ec-badge-color-red-background: 127 29 29 / 0.28;
284
+ --ec-badge-color-red-text: 252 165 165;
285
+ --ec-badge-color-orange-background: 124 45 18 / 0.28;
286
+ --ec-badge-color-orange-text: 253 186 116;
287
+ --ec-badge-color-amber-background: 120 53 15 / 0.28;
288
+ --ec-badge-color-amber-text: 252 211 77;
289
+ --ec-badge-color-yellow-background: 113 63 18 / 0.28;
290
+ --ec-badge-color-yellow-text: 253 224 71;
291
+ --ec-badge-color-lime-background: 54 83 20 / 0.28;
292
+ --ec-badge-color-lime-text: 190 242 100;
293
+ --ec-badge-color-green-background: 20 83 45 / 0.28;
294
+ --ec-badge-color-green-text: 134 239 172;
295
+ --ec-badge-color-emerald-background: 6 78 59 / 0.28;
296
+ --ec-badge-color-emerald-text: 110 231 183;
297
+ --ec-badge-color-teal-background: 17 94 89 / 0.28;
298
+ --ec-badge-color-teal-text: 94 234 212;
299
+ --ec-badge-color-cyan-background: 21 94 117 / 0.28;
300
+ --ec-badge-color-cyan-text: 103 232 249;
301
+ --ec-badge-color-sky-background: 12 74 110 / 0.28;
302
+ --ec-badge-color-sky-text: 125 211 252;
303
+ --ec-badge-color-blue-background: 30 64 175 / 0.28;
304
+ --ec-badge-color-blue-text: 147 197 253;
305
+ --ec-badge-color-indigo-background: 49 46 129 / 0.28;
306
+ --ec-badge-color-indigo-text: 165 180 252;
307
+ --ec-badge-color-violet-background: 76 29 149 / 0.28;
308
+ --ec-badge-color-violet-text: 196 181 253;
309
+ --ec-badge-color-purple-background: 88 28 135 / 0.28;
310
+ --ec-badge-color-purple-text: 216 180 254;
311
+ --ec-badge-color-fuchsia-background: 112 26 117 / 0.28;
312
+ --ec-badge-color-fuchsia-text: 240 171 252;
313
+ --ec-badge-color-pink-background: 131 24 67 / 0.28;
314
+ --ec-badge-color-pink-text: 249 168 212;
315
+ --ec-badge-color-rose-background: 136 19 55 / 0.28;
316
+ --ec-badge-color-rose-text: 253 164 175;
225
317
  }
226
318
 
227
319
  /* Dark mode prose overrides for documentation content */
@@ -0,0 +1,206 @@
1
+ type BadgeColorKind = 'background' | 'text';
2
+
3
+ type Badge = {
4
+ backgroundColor?: string;
5
+ textColor?: string;
6
+ };
7
+
8
+ const NAMED_BADGE_COLOR_KEYS = new Set([
9
+ 'slate',
10
+ 'gray',
11
+ 'zinc',
12
+ 'neutral',
13
+ 'stone',
14
+ 'red',
15
+ 'orange',
16
+ 'amber',
17
+ 'yellow',
18
+ 'lime',
19
+ 'green',
20
+ 'emerald',
21
+ 'teal',
22
+ 'cyan',
23
+ 'sky',
24
+ 'blue',
25
+ 'indigo',
26
+ 'violet',
27
+ 'purple',
28
+ 'fuchsia',
29
+ 'pink',
30
+ 'rose',
31
+ ]);
32
+
33
+ const CSS_COLOR_VALUE_PATTERN =
34
+ /^(#[0-9a-f]{3,8}|(?:rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|color)\(.+\)|var\(--[a-z0-9-_]+\)|transparent|currentColor)$/i;
35
+
36
+ // Common CSS named colors that callers may use directly (e.g. textColor: "white").
37
+ // Palette tokens above take precedence — names like "red" or "blue" resolve to the
38
+ // theme-aware token rather than the raw CSS keyword.
39
+ const CSS_NAMED_COLORS = new Set([
40
+ 'aliceblue',
41
+ 'antiquewhite',
42
+ 'aqua',
43
+ 'aquamarine',
44
+ 'azure',
45
+ 'beige',
46
+ 'bisque',
47
+ 'black',
48
+ 'blanchedalmond',
49
+ 'blueviolet',
50
+ 'brown',
51
+ 'burlywood',
52
+ 'cadetblue',
53
+ 'chartreuse',
54
+ 'chocolate',
55
+ 'coral',
56
+ 'cornflowerblue',
57
+ 'cornsilk',
58
+ 'crimson',
59
+ 'darkblue',
60
+ 'darkcyan',
61
+ 'darkgoldenrod',
62
+ 'darkgray',
63
+ 'darkgreen',
64
+ 'darkgrey',
65
+ 'darkkhaki',
66
+ 'darkmagenta',
67
+ 'darkolivegreen',
68
+ 'darkorange',
69
+ 'darkorchid',
70
+ 'darkred',
71
+ 'darksalmon',
72
+ 'darkseagreen',
73
+ 'darkslateblue',
74
+ 'darkslategray',
75
+ 'darkslategrey',
76
+ 'darkturquoise',
77
+ 'darkviolet',
78
+ 'deeppink',
79
+ 'deepskyblue',
80
+ 'dimgray',
81
+ 'dimgrey',
82
+ 'dodgerblue',
83
+ 'firebrick',
84
+ 'floralwhite',
85
+ 'forestgreen',
86
+ 'gainsboro',
87
+ 'ghostwhite',
88
+ 'gold',
89
+ 'goldenrod',
90
+ 'greenyellow',
91
+ 'grey',
92
+ 'honeydew',
93
+ 'hotpink',
94
+ 'indianred',
95
+ 'ivory',
96
+ 'khaki',
97
+ 'lavender',
98
+ 'lavenderblush',
99
+ 'lawngreen',
100
+ 'lemonchiffon',
101
+ 'lightblue',
102
+ 'lightcoral',
103
+ 'lightcyan',
104
+ 'lightgoldenrodyellow',
105
+ 'lightgray',
106
+ 'lightgreen',
107
+ 'lightgrey',
108
+ 'lightpink',
109
+ 'lightsalmon',
110
+ 'lightseagreen',
111
+ 'lightskyblue',
112
+ 'lightslategray',
113
+ 'lightslategrey',
114
+ 'lightsteelblue',
115
+ 'lightyellow',
116
+ 'limegreen',
117
+ 'linen',
118
+ 'magenta',
119
+ 'maroon',
120
+ 'mediumaquamarine',
121
+ 'mediumblue',
122
+ 'mediumorchid',
123
+ 'mediumpurple',
124
+ 'mediumseagreen',
125
+ 'mediumslateblue',
126
+ 'mediumspringgreen',
127
+ 'mediumturquoise',
128
+ 'mediumvioletred',
129
+ 'midnightblue',
130
+ 'mintcream',
131
+ 'mistyrose',
132
+ 'moccasin',
133
+ 'navajowhite',
134
+ 'navy',
135
+ 'oldlace',
136
+ 'olive',
137
+ 'olivedrab',
138
+ 'orangered',
139
+ 'orchid',
140
+ 'palegoldenrod',
141
+ 'palegreen',
142
+ 'paleturquoise',
143
+ 'palevioletred',
144
+ 'papayawhip',
145
+ 'peachpuff',
146
+ 'peru',
147
+ 'plum',
148
+ 'powderblue',
149
+ 'rebeccapurple',
150
+ 'rosybrown',
151
+ 'royalblue',
152
+ 'saddlebrown',
153
+ 'salmon',
154
+ 'sandybrown',
155
+ 'seagreen',
156
+ 'seashell',
157
+ 'sienna',
158
+ 'silver',
159
+ 'skyblue',
160
+ 'slateblue',
161
+ 'slategray',
162
+ 'slategrey',
163
+ 'snow',
164
+ 'springgreen',
165
+ 'steelblue',
166
+ 'tan',
167
+ 'thistle',
168
+ 'tomato',
169
+ 'turquoise',
170
+ 'wheat',
171
+ 'white',
172
+ 'whitesmoke',
173
+ 'yellowgreen',
174
+ ]);
175
+
176
+ const resolveBadgeColor = (color: string | undefined, kind: BadgeColorKind) => {
177
+ if (!color) return undefined;
178
+
179
+ const value = color.trim();
180
+ const namedColorKey = value.toLowerCase();
181
+
182
+ if (NAMED_BADGE_COLOR_KEYS.has(namedColorKey)) return `rgb(var(--ec-badge-color-${namedColorKey}-${kind}))`;
183
+ if (CSS_COLOR_VALUE_PATTERN.test(value)) return value;
184
+ if (CSS_NAMED_COLORS.has(namedColorKey)) return namedColorKey;
185
+
186
+ return undefined;
187
+ };
188
+
189
+ export const getBadgeStyle = (badge: Badge) => {
190
+ const backgroundColor = resolveBadgeColor(badge.backgroundColor, 'background');
191
+ const color = resolveBadgeColor(badge.textColor, 'text');
192
+
193
+ return [backgroundColor ? `background-color: ${backgroundColor};` : '', color ? `color: ${color};` : '']
194
+ .filter(Boolean)
195
+ .join(' ');
196
+ };
197
+
198
+ export const getBadgeReactStyle = (badge: Badge) => {
199
+ const backgroundColor = resolveBadgeColor(badge.backgroundColor, 'background');
200
+ const color = resolveBadgeColor(badge.textColor, 'text');
201
+
202
+ return {
203
+ ...(backgroundColor ? { backgroundColor } : {}),
204
+ ...(color ? { color } : {}),
205
+ };
206
+ };
@@ -11,16 +11,19 @@ import { getDiagrams } from '@utils/collections/diagrams';
11
11
  import type { CollectionEntry } from 'astro:content';
12
12
  import { getDataProducts } from '@utils/collections/data-products';
13
13
 
14
- export const pageDataLoader: Record<PageTypes, () => Promise<CollectionEntry<CollectionTypes>[]>> = {
15
- events: getEvents,
16
- commands: getCommands,
17
- queries: getQueries,
18
- services: getServices,
19
- domains: getDomains,
20
- channels: getChannels,
21
- flows: getFlows,
22
- entities: getEntities,
23
- containers: getContainers,
24
- diagrams: getDiagrams,
25
- 'data-products': getDataProducts,
26
- };
14
+ type PageDataLoaderOptions = { getAllVersions?: boolean };
15
+
16
+ export const pageDataLoader: Record<PageTypes, (options?: PageDataLoaderOptions) => Promise<CollectionEntry<CollectionTypes>[]>> =
17
+ {
18
+ events: getEvents,
19
+ commands: getCommands,
20
+ queries: getQueries,
21
+ services: getServices,
22
+ domains: getDomains,
23
+ channels: getChannels,
24
+ flows: getFlows,
25
+ entities: getEntities,
26
+ containers: getContainers,
27
+ diagrams: getDiagrams,
28
+ 'data-products': getDataProducts,
29
+ };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "3.39.2",
10
+ "version": "3.39.4",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -106,9 +106,9 @@
106
106
  "update-notifier": "^7.3.1",
107
107
  "uuid": "^10.0.0",
108
108
  "zod": "^4.3.6",
109
- "@eventcatalog/linter": "1.0.23",
110
109
  "@eventcatalog/sdk": "2.21.1",
111
- "@eventcatalog/visualiser": "^3.21.0"
110
+ "@eventcatalog/visualiser": "^3.21.0",
111
+ "@eventcatalog/linter": "1.0.23"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@astrojs/check": "^0.9.9",
@@ -1,50 +0,0 @@
1
- ---
2
- sidebar_position: 5
3
- keywords:
4
- - licenses
5
- sidebar_label: License Validation
6
- title: EventCatalog Licenses
7
- description: This document describes how EventCatalog licenses work online and offline.
8
- ---
9
-
10
- EventCatalog is an open source project with a [community edition and a commercial edition](/pricing) and also supports a range of integrations (plugins) which have their own licenses.
11
-
12
- If you are using the commercial edition of EventCatalog, then you don't need to worry about licenses and can skip this page.
13
-
14
- If you are using EventCatalog Starter, EventCatalog Scale, EventCatalog Enterprise or any of the integrations (plugins) you will need to set up a license key.
15
-
16
- :::tip Want to try commercial features?
17
- All licenses have a 14 day free trial. You can get a free trial license key by going to [EventCatalog Cloud](https://eventcatalog.cloud).
18
-
19
- If you wish to continue using the commercial features after the trial period, you will need to purchase a license.
20
-
21
- You can email us at `hello@eventcatalog.dev` to enquire about a license.
22
- :::
23
-
24
-
25
- ### How to set up a license keys
26
-
27
- 1. Go to [EventCatalog Cloud](https://eventcatalog.cloud) and sign up for a free trial.
28
- 1. Once you are logged in, you can select any license you want to use or integration.
29
- 1. Selecting the plan or integration will give you a license key.
30
- 1. Store the license key in your `.env` file or as an environment variable.
31
-
32
- ### How EventCatalog validates licenses keys
33
-
34
- ##### Online License Validation (recommended)
35
-
36
- By default, EventCatalog will validate your license key online.
37
-
38
- Your keys are read from your `.env` file and verified against our API.
39
-
40
- ##### Offline License Validation
41
-
42
- If you are behind a firewall or can't access the EventCatalog API, then your license keys can be validated offline.
43
-
44
- To get offline validation working you will need to:
45
-
46
- 1. Get in contact with us at `hello@eventcatalog.dev` to get a license key `(license.jwt)`.
47
- 1. Once you have you license key `(license.jwt)` you put this into the root of your catalog directory.
48
- 1. EventCatalog will then validate your license key offline.
49
-
50
- Your key will expire after a year of purchase, and you will need to get a new license key.