@eventcatalog/core 2.42.4 → 2.42.6

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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.42.4";
40
+ var version = "2.42.6";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-QKYZ35CN.js";
4
- import "../chunk-VBWDUTD4.js";
3
+ } from "../chunk-R2ESPFL6.js";
4
+ import "../chunk-ZDLD4Z6H.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.42.4";
109
+ var version = "2.42.6";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-CD54ILWK.js";
4
- import "../chunk-QKYZ35CN.js";
5
- import "../chunk-VBWDUTD4.js";
3
+ } from "../chunk-FRAHATZL.js";
4
+ import "../chunk-R2ESPFL6.js";
5
+ import "../chunk-ZDLD4Z6H.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-QKYZ35CN.js";
3
+ } from "./chunk-R2ESPFL6.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-VBWDUTD4.js";
3
+ } from "./chunk-ZDLD4Z6H.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.42.4";
2
+ var version = "2.42.6";
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 = "2.42.4";
28
+ var version = "2.42.6";
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-VBWDUTD4.js";
3
+ } from "./chunk-ZDLD4Z6H.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.42.4";
160
+ var version = "2.42.6";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -92,6 +92,9 @@ interface Config {
92
92
  api?: {
93
93
  fullCatalogAPIEnabled?: boolean;
94
94
  };
95
+ changelog?: {
96
+ enabled: boolean;
97
+ };
95
98
  visualiser?: {
96
99
  channels?: {
97
100
  renderMode?: 'flat' | 'single';
@@ -92,6 +92,9 @@ interface Config {
92
92
  api?: {
93
93
  fullCatalogAPIEnabled?: boolean;
94
94
  };
95
+ changelog?: {
96
+ enabled: boolean;
97
+ };
95
98
  visualiser?: {
96
99
  channels?: {
97
100
  renderMode?: 'flat' | 'single';
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-DCLTVJDP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-CD54ILWK.js";
10
- import "./chunk-QKYZ35CN.js";
9
+ } from "./chunk-FRAHATZL.js";
10
+ import "./chunk-R2ESPFL6.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
14
14
  } from "./chunk-SLEMYHTU.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-VBWDUTD4.js";
17
+ } from "./chunk-ZDLD4Z6H.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -29,16 +29,26 @@ const Message = memo(({ message, collection }: { message: any; collection: strin
29
29
  const MessagesContainer = memo(
30
30
  ({ messages, type, selectedTypes }: { messages: any[]; type: 'receives' | 'sends'; selectedTypes: string[] }) => {
31
31
  const bgColor = type === 'receives' ? 'blue' : 'green';
32
+ const MAX_MESSAGES_DISPLAYED = 4;
33
+
32
34
  const filteredMessages = messages?.filter(
33
35
  (message: any) => selectedTypes.length === 0 || selectedTypes.includes(message.collection)
34
36
  );
35
37
 
38
+ const messagesToShow = filteredMessages?.slice(0, MAX_MESSAGES_DISPLAYED);
39
+ const remainingMessagesCount = filteredMessages ? filteredMessages.length - MAX_MESSAGES_DISPLAYED : 0;
40
+
36
41
  return (
37
42
  <div className={`flex-1 h-full flex flex-col bg-${bgColor}-100 border border-${bgColor}-300 rounded-lg p-4`}>
38
43
  <div className="space-y-2 flex-1">
39
- {filteredMessages?.map((message: any) => (
44
+ {messagesToShow?.map((message: any) => (
40
45
  <Message key={message.data.name} message={message} collection={message.collection} />
41
46
  ))}
47
+ {remainingMessagesCount > 0 && (
48
+ <div className="text-center py-1">
49
+ <p className="text-gray-500 text-[10px]">+ {remainingMessagesCount} more</p>
50
+ </div>
51
+ )}
42
52
  {(!messages?.length ||
43
53
  (selectedTypes.length > 0 && !messages?.some((message: any) => selectedTypes.includes(message.collection)))) && (
44
54
  <div className="text-center py-4">
@@ -9,6 +9,7 @@ import { ScrollText } from 'lucide-react';
9
9
  import RepositoryList from '@components/Lists/RepositoryList.astro';
10
10
  import { getOwner } from '@utils/collections/owners';
11
11
  import { getProducersAndConsumersForChannel } from '@utils/collections/services';
12
+ import { isChangelogEnabled } from '@utils/feature';
12
13
  interface Props {
13
14
  channel: CollectionEntry<'channels'>;
14
15
  }
@@ -149,14 +150,18 @@ const consumersList = consumers.map((c) => ({
149
150
  )
150
151
  }
151
152
 
152
- <div class="space-y-2">
153
- <a
154
- href={buildUrl(`/docs/${channel.collection}/${channel.data.id}/${channel.data.latestVersion}/changelog`)}
155
- class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
156
- >
157
- <ScrollText strokeWidth={2} size={16} />
158
- <span class="block">Read changelog</span>
159
- </a>
160
- </div>
153
+ {
154
+ isChangelogEnabled() && (
155
+ <div class="space-y-2">
156
+ <a
157
+ href={buildUrl(`/docs/${channel.collection}/${channel.data.id}/${channel.data.latestVersion}/changelog`)}
158
+ class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
159
+ >
160
+ <ScrollText strokeWidth={2} size={16} />
161
+ <span class="block">Read changelog</span>
162
+ </a>
163
+ </div>
164
+ )
165
+ }
161
166
  </div>
162
167
  </aside>
@@ -9,6 +9,7 @@ import { getOwner } from '@utils/collections/owners';
9
9
  import { buildUrl } from '@utils/url-builder';
10
10
  import type { CollectionEntry } from 'astro:content';
11
11
  import { ScrollText, Workflow } from 'lucide-react';
12
+ import { isChangelogEnabled } from '@utils/feature';
12
13
 
13
14
  interface Props {
14
15
  domain: CollectionEntry<'domains'>;
@@ -203,13 +204,17 @@ const ownersList = filteredOwners.map((o) => ({
203
204
  <Workflow strokeWidth={2} size={16} />
204
205
  <span class="block">View in visualiser</span>
205
206
  </a>
206
- <a
207
- href={buildUrl(`/docs/${domain.collection}/${domain.data.id}/${domain.data.latestVersion}/changelog`)}
208
- class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
209
- >
210
- <ScrollText strokeWidth={2} size={16} />
211
- <span class="block">Read changelog</span>
212
- </a>
207
+ {
208
+ isChangelogEnabled() && (
209
+ <a
210
+ href={buildUrl(`/docs/${domain.collection}/${domain.data.id}/${domain.data.latestVersion}/changelog`)}
211
+ class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
212
+ >
213
+ <ScrollText strokeWidth={2} size={16} />
214
+ <span class="block">Read changelog</span>
215
+ </a>
216
+ )
217
+ }
213
218
  </div>
214
219
  </div>
215
220
  </aside>
@@ -6,6 +6,7 @@ import VersionList from '@components/Lists/VersionList.astro';
6
6
  import { buildUrl } from '@utils/url-builder';
7
7
  import { ScrollText } from 'lucide-react';
8
8
  import { getOwner } from '@utils/collections/owners';
9
+ import { isChangelogEnabled } from '@utils/feature';
9
10
 
10
11
  interface Props {
11
12
  entity: CollectionEntry<'entities'>;
@@ -81,14 +82,18 @@ const domainsList = domains.map((p) => ({
81
82
  client:load
82
83
  />
83
84
 
84
- <div class="space-y-2">
85
- <a
86
- href={buildUrl(`/docs/${entity.collection}/${entity.data.id}/${entity.data.latestVersion}/changelog`)}
87
- class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
88
- >
89
- <ScrollText strokeWidth={2} size={16} />
90
- <span class="block">Read changelog</span>
91
- </a>
92
- </div>
85
+ {
86
+ isChangelogEnabled() && (
87
+ <div class="space-y-2">
88
+ <a
89
+ href={buildUrl(`/docs/${entity.collection}/${entity.data.id}/${entity.data.latestVersion}/changelog`)}
90
+ class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
91
+ >
92
+ <ScrollText strokeWidth={2} size={16} />
93
+ <span class="block">Read changelog</span>
94
+ </a>
95
+ </div>
96
+ )
97
+ }
93
98
  </div>
94
99
  </aside>
@@ -6,6 +6,7 @@ import { getOwner } from '@utils/collections/owners';
6
6
  import type { CollectionEntry } from 'astro:content';
7
7
  import { ScrollText, Workflow, RssIcon } from 'lucide-react';
8
8
  import config from '@config';
9
+ import { isChangelogEnabled } from '@utils/feature';
9
10
  import CustomSideBarSectionList from '@components/Lists/CustomSideBarSectionList.astro';
10
11
  interface Props {
11
12
  flow: CollectionEntry<'flows'>;
@@ -70,13 +71,17 @@ const isRSSEnabled = config.rss?.enabled;
70
71
  <Workflow strokeWidth={2} size={16} />
71
72
  <span class="block">View in visualiser</span>
72
73
  </a>
73
- <a
74
- href={buildUrl(`/docs/${flow.collection}/${flow.data.id}/${flow.data.latestVersion}/changelog`)}
75
- class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
76
- >
77
- <ScrollText strokeWidth={2} size={16} />
78
- <span class="block">Read changelog</span>
79
- </a>
74
+ {
75
+ isChangelogEnabled() && (
76
+ <a
77
+ href={buildUrl(`/docs/${flow.collection}/${flow.data.id}/${flow.data.latestVersion}/changelog`)}
78
+ class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
79
+ >
80
+ <ScrollText strokeWidth={2} size={16} />
81
+ <span class="block">Read changelog</span>
82
+ </a>
83
+ )
84
+ }
80
85
  </div>
81
86
  </div>
82
87
  </aside>
@@ -12,7 +12,7 @@ import { getOwner } from '@utils/collections/owners';
12
12
  import CustomSideBarSectionList from '@components/Lists/CustomSideBarSectionList.astro';
13
13
  import config from '@config';
14
14
  import { getSchemaFormatFromURL } from '@utils/collections/schemas';
15
-
15
+ import { isChangelogEnabled } from '@utils/feature';
16
16
  interface Props {
17
17
  message: CollectionEntry<CollectionMessageTypes>;
18
18
  }
@@ -195,13 +195,17 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
195
195
  <span class="block">View in visualiser</span>
196
196
  </a>
197
197
 
198
- <a
199
- href={buildUrl(`/docs/${message.collection}/${message.data.id}/${message.data.latestVersion}/changelog`)}
200
- class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
201
- >
202
- <ScrollText strokeWidth={2} size={16} />
203
- <span class="block">Read changelog</span>
204
- </a>
198
+ {
199
+ isChangelogEnabled() && (
200
+ <a
201
+ href={buildUrl(`/docs/${message.collection}/${message.data.id}/${message.data.latestVersion}/changelog`)}
202
+ class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
203
+ >
204
+ <ScrollText strokeWidth={2} size={16} />
205
+ <span class="block">Read changelog</span>
206
+ </a>
207
+ )
208
+ }
205
209
  </div>
206
210
  </div>
207
211
  </aside>
@@ -12,6 +12,7 @@ import { ScrollText, Workflow, FileDownIcon, Code, Link, RssIcon } from 'lucide-
12
12
  import { join } from 'node:path';
13
13
  import config from '@config';
14
14
  import { getDomainsForService } from '@utils/collections/domains';
15
+ import { isChangelogEnabled } from '@utils/feature';
15
16
  interface Props {
16
17
  service: CollectionEntry<'services'>;
17
18
  }
@@ -185,13 +186,17 @@ const schemaURL = join(publicPath, schemaFilePath || '');
185
186
  <Workflow strokeWidth={2} size={16} />
186
187
  <span class="block">View in visualiser</span>
187
188
  </a>
188
- <a
189
- href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.latestVersion}/changelog`)}
190
- class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
191
- >
192
- <ScrollText strokeWidth={2} size={16} />
193
- <span class="block">Read changelog</span>
194
- </a>
189
+ {
190
+ isChangelogEnabled() && (
191
+ <a
192
+ href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.latestVersion}/changelog`)}
193
+ class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
194
+ >
195
+ <ScrollText strokeWidth={2} size={16} />
196
+ <span class="block">Read changelog</span>
197
+ </a>
198
+ )
199
+ }
195
200
  </div>
196
201
  </div>
197
202
  </aside>
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  import Footer from '@layouts/Footer.astro';
3
-
4
3
  import type { PageTypes } from '@types';
5
4
  import { getChangeLogs } from '@utils/collections/changelogs';
6
5
  import {
@@ -22,7 +21,13 @@ import { getDiffsForCurrentAndPreviousVersion } from '@utils/collections/file-di
22
21
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
23
22
  import { ClientRouter } from 'astro:transitions';
24
23
 
24
+ import { isChangelogEnabled } from '@utils/feature';
25
+
25
26
  export async function getStaticPaths() {
27
+ if (!isChangelogEnabled()) {
28
+ return [];
29
+ }
30
+
26
31
  const itemTypes: PageTypes[] = ['events', 'commands', 'queries', 'services', 'domains', 'flows'];
27
32
  const allItems = await Promise.all(itemTypes.map((type) => pageDataLoader[type]()));
28
33
 
@@ -42,6 +47,10 @@ export async function getStaticPaths() {
42
47
  );
43
48
  }
44
49
 
50
+ if (!isChangelogEnabled()) {
51
+ return Astro.redirect('/docs');
52
+ }
53
+
45
54
  const props = Astro.props;
46
55
  let collectionItem = props;
47
56
  const logs = await getChangeLogs(props);
@@ -30,6 +30,8 @@ export const showCustomBranding = () => {
30
30
  return isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
31
31
  };
32
32
 
33
+ export const isChangelogEnabled = () => config?.changelog?.enabled ?? true;
34
+
33
35
  export const isCustomDocsEnabled = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
34
36
  export const isEventCatalogChatEnabled = () => {
35
37
  const isFeatureEnabledFromPlan = isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.42.4",
9
+ "version": "2.42.6",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },