@eventcatalog/core 2.41.1 → 2.42.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.41.1";
40
+ var version = "2.42.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-ZOHANGSK.js";
4
- import "../chunk-ZTIHRJ5F.js";
3
+ } from "../chunk-BYWZ6BFW.js";
4
+ import "../chunk-M5NGWRPO.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.41.1";
109
+ var version = "2.42.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-LJRN3X6I.js";
4
- import "../chunk-ZOHANGSK.js";
5
- import "../chunk-ZTIHRJ5F.js";
3
+ } from "../chunk-6XRQ4VOZ.js";
4
+ import "../chunk-BYWZ6BFW.js";
5
+ import "../chunk-M5NGWRPO.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-ZOHANGSK.js";
3
+ } from "./chunk-BYWZ6BFW.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-ZTIHRJ5F.js";
3
+ } from "./chunk-M5NGWRPO.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.41.1";
2
+ var version = "2.42.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 = "2.41.1";
28
+ var version = "2.42.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-ZTIHRJ5F.js";
3
+ } from "./chunk-M5NGWRPO.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.41.1";
160
+ var version = "2.42.0";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -91,6 +91,11 @@ interface Config {
91
91
  api?: {
92
92
  fullCatalogAPIEnabled?: boolean;
93
93
  };
94
+ visualiser?: {
95
+ channels?: {
96
+ renderMode?: 'flat' | 'single';
97
+ };
98
+ };
94
99
  }
95
100
 
96
101
  export type { Config, SideBarConfig };
@@ -91,6 +91,11 @@ interface Config {
91
91
  api?: {
92
92
  fullCatalogAPIEnabled?: boolean;
93
93
  };
94
+ visualiser?: {
95
+ channels?: {
96
+ renderMode?: 'flat' | 'single';
97
+ };
98
+ };
94
99
  }
95
100
 
96
101
  export type { Config, SideBarConfig };
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-DCLTVJDP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-LJRN3X6I.js";
10
- import "./chunk-ZOHANGSK.js";
9
+ } from "./chunk-6XRQ4VOZ.js";
10
+ import "./chunk-BYWZ6BFW.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-ZTIHRJ5F.js";
17
+ } from "./chunk-M5NGWRPO.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -18,7 +18,7 @@ const customDocs = await getCollection('customPages');
18
18
 
19
19
  export const GET: APIRoute = async ({ params, request }) => {
20
20
  const url = new URL(request.url);
21
- const baseUrl = `${url.origin}`;
21
+ const baseUrl = process.env.LLMS_TXT_BASE_URL || `${url.origin}`;
22
22
 
23
23
  const formatVersionedItem = (item: any, type: string) =>
24
24
  `- [${item.data.name} - ${item.data.id} - ${item.data.version}](${baseUrl}/docs/${type}/${item.data.id}/${item.data.version}.mdx) - ${item.data.summary}`;
@@ -1,5 +1,6 @@
1
1
  // Can't use the CollectionEntry type from astro:content because a client component is using this util
2
2
  // import { type CollectionEntry } from 'astro:content';
3
+ import catalog from '@utils/eventcatalog-config/catalog';
3
4
  import { MarkerType, Position, type Edge, type Node } from '@xyflow/react';
4
5
  import dagre from 'dagre';
5
6
  import { getItemsFromCollectionByIdAndSemverOrLatest } from '@utils/collections/util';
@@ -121,19 +122,20 @@ export const getChannelNodesAndEdges = ({
121
122
  .filter((channel) => channel !== undefined);
122
123
 
123
124
  channels.forEach((channel) => {
124
- const channelId = generateIdForNodes([source, channel, target]);
125
+ const singleChannel = catalog.visualiser?.channels?.renderMode === 'single'; // Only one node per channel, other wise one node per channel connection
126
+ const channelId = singleChannel ? generateIdForNodes([channel]) : generateIdForNodes([source, channel, target]);
125
127
 
126
128
  // Need to check if the channel node is already in the graph
127
- // if (!currentNodes.find((node) => node.id === channelId)) {
128
- nodes.push(
129
- createNode({
130
- id: channelId,
131
- data: { title: channel?.data.id, mode, channel, source, target },
132
- position: { x: 0, y: 0 },
133
- type: channel?.collection,
134
- })
135
- );
136
- // }
129
+ if (!currentNodes.find((node) => node.id === channelId)) {
130
+ nodes.push(
131
+ createNode({
132
+ id: channelId,
133
+ data: { title: channel?.data.id, mode, channel, source, target },
134
+ position: { x: 0, y: 0 },
135
+ type: channel?.collection,
136
+ })
137
+ );
138
+ }
137
139
 
138
140
  // if the source (left node) is a service, use the target as the edge message
139
141
  const edgeMessage = source.collection === 'services' ? target : source;
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.41.1",
9
+ "version": "2.42.0",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },