@eventcatalog/core 2.39.1 → 2.40.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.
@@ -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.39.1";
40
+ var version = "2.40.0";
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-NM2UM3ZE.js";
4
- import "../chunk-UXUHWEGF.js";
3
+ } from "../chunk-4HQYTFYJ.js";
4
+ import "../chunk-VFV2YSLH.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.39.1";
109
+ var version = "2.40.0";
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-L4LXL56Q.js";
4
- import "../chunk-NM2UM3ZE.js";
5
- import "../chunk-UXUHWEGF.js";
3
+ } from "../chunk-WJK67MSP.js";
4
+ import "../chunk-4HQYTFYJ.js";
5
+ import "../chunk-VFV2YSLH.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
  VERSION
3
- } from "./chunk-UXUHWEGF.js";
3
+ } from "./chunk-VFV2YSLH.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.39.1";
2
+ var version = "2.40.0";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-NM2UM3ZE.js";
3
+ } from "./chunk-4HQYTFYJ.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.39.1";
28
+ var version = "2.40.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-UXUHWEGF.js";
3
+ } from "./chunk-VFV2YSLH.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.39.1";
160
+ var version = "2.40.0";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-DCLTVJDP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-L4LXL56Q.js";
10
- import "./chunk-NM2UM3ZE.js";
9
+ } from "./chunk-WJK67MSP.js";
10
+ import "./chunk-4HQYTFYJ.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-UXUHWEGF.js";
17
+ } from "./chunk-VFV2YSLH.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -57,6 +57,11 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
57
57
  href: buildUrl(`/${route}/${entity.collection}/${entity.data.id}/${entity.data.version}`),
58
58
  }));
59
59
 
60
+ // don't render items if we are in the visualiser and the item has visualiser set to false
61
+ if (currentPath.includes('visualiser') && item.data.visualiser === false) {
62
+ return acc;
63
+ }
64
+
60
65
  const navigationItem = {
61
66
  label: item.data.name,
62
67
  version: item.data.version,
@@ -78,6 +83,7 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
78
83
  entities: entitiesWithHref,
79
84
  specifications: isCollectionService ? getSpecificationsForService(item) : null,
80
85
  sidebar: item.data?.sidebar,
86
+ renderInVisualiser: item.data?.visualiser ?? true,
81
87
  };
82
88
 
83
89
  group.push(navigationItem);
@@ -135,6 +135,7 @@ const baseSchema = z.object({
135
135
  z.boolean().optional(),
136
136
  ])
137
137
  .optional(),
138
+ visualiser: z.boolean().optional(),
138
139
  // Used by eventcatalog
139
140
  versions: z.array(z.string()).optional(),
140
141
  latestVersion: z.string().optional(),
@@ -292,6 +293,12 @@ const services = defineCollection({
292
293
  pattern: [
293
294
  'domains/*/services/*/index.(md|mdx)',
294
295
  'domains/*/services/*/versioned/*/index.(md|mdx)',
296
+
297
+ // Capture subdomain folders
298
+ 'domains/*/subdomains/*/services/*/index.(md|mdx)',
299
+ 'domains/*/subdomains/*/services/*/versioned/*/index.(md|mdx)',
300
+
301
+ // Capture services in the root
295
302
  'services/*/index.(md|mdx)', // ✅ Capture only services markdown files
296
303
  'services/*/versioned/*/index.(md|mdx)', // ✅ Capture versioned files inside services
297
304
  ],
@@ -332,6 +339,10 @@ const domains = defineCollection({
332
339
  // ✅ Strictly include only index.md at the expected levels
333
340
  'domains/*/index.(md|mdx)',
334
341
  'domains/*/versioned/*/index.(md|mdx)',
342
+
343
+ // Capture subdomain folders
344
+ 'domains/*/subdomains/*/index.(md|mdx)',
345
+ 'domains/*/subdomains/*/versioned/*/index.(md|mdx)',
335
346
  ],
336
347
  base: projectDirBase,
337
348
  generateId: ({ data, ...rest }) => {
@@ -70,8 +70,13 @@ const getDefaultUrl = (route: string, defaultValue: string) => {
70
70
 
71
71
  for (const { data, key } of collections) {
72
72
  if (data.length > 0 && isCollectionVisibleInCatalog(key)) {
73
- const item = data[0];
74
- return buildUrl(`/${route}/${key}/${item.data.id}/${item.data.latestVersion}`);
73
+ // find the first item that has visualiser set to true
74
+ const item = data.find((item) => item.data.visualiser !== false);
75
+ if (item) {
76
+ return buildUrl(`/${route}/${key}/${item.data.id}/${item.data.latestVersion}`);
77
+ } else {
78
+ continue;
79
+ }
75
80
  }
76
81
  }
77
82
 
@@ -19,17 +19,19 @@ export async function getStaticPaths() {
19
19
  const allItems = await Promise.all(itemTypes.map((type) => loaders[type]()));
20
20
 
21
21
  return allItems.flatMap((items, index) =>
22
- items.map((item) => ({
23
- params: {
24
- type: itemTypes[index],
25
- id: item.data.id,
26
- version: item.data.version,
27
- },
28
- props: {
29
- type: itemTypes[index],
30
- ...item,
31
- },
32
- }))
22
+ items
23
+ .filter((item) => item.data.visualiser !== false)
24
+ .map((item) => ({
25
+ params: {
26
+ type: itemTypes[index],
27
+ id: item.data.id,
28
+ version: item.data.version,
29
+ },
30
+ props: {
31
+ type: itemTypes[index],
32
+ ...item,
33
+ },
34
+ }))
33
35
  );
34
36
  }
35
37
 
@@ -11,6 +11,9 @@ import type { CollectionTypes } from '@types';
11
11
  export async function getStaticPaths() {
12
12
  const [events, commands, services, domains] = await Promise.all([getEvents(), getCommands(), getServices(), getDomains()]);
13
13
 
14
+ const resources = [...domains, ...events, ...services, ...commands];
15
+ const resourcesWithVisualiserEnabled = resources.filter((resource) => resource.data.visualiser !== false);
16
+
14
17
  const buildPages = (collection: CollectionEntry<CollectionTypes>[]) => {
15
18
  return collection.map((item) => ({
16
19
  params: {
@@ -24,7 +27,7 @@ export async function getStaticPaths() {
24
27
  }));
25
28
  };
26
29
 
27
- return [...buildPages(domains), ...buildPages(events), ...buildPages(services), ...buildPages(commands)];
30
+ return [...buildPages(resourcesWithVisualiserEnabled)];
28
31
  }
29
32
 
30
33
  const props = Astro.props;
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.39.1",
9
+ "version": "2.40.0",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },