@eventcatalog/core 2.42.1 → 2.42.2

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.1";
40
+ var version = "2.42.2";
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-V4HWGD4W.js";
4
- import "../chunk-TRONGJTE.js";
3
+ } from "../chunk-7UGAOGXQ.js";
4
+ import "../chunk-JSNXGDYW.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.1";
109
+ var version = "2.42.2";
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-BMQTJBZQ.js";
4
- import "../chunk-V4HWGD4W.js";
5
- import "../chunk-TRONGJTE.js";
3
+ } from "../chunk-CJI2BJQN.js";
4
+ import "../chunk-7UGAOGXQ.js";
5
+ import "../chunk-JSNXGDYW.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-TRONGJTE.js";
3
+ } from "./chunk-JSNXGDYW.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-V4HWGD4W.js";
3
+ } from "./chunk-7UGAOGXQ.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.42.1";
2
+ var version = "2.42.2";
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.1";
28
+ var version = "2.42.2";
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-TRONGJTE.js";
3
+ } from "./chunk-JSNXGDYW.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.1";
160
+ var version = "2.42.2";
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-BMQTJBZQ.js";
10
- import "./chunk-V4HWGD4W.js";
9
+ } from "./chunk-CJI2BJQN.js";
10
+ import "./chunk-7UGAOGXQ.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-TRONGJTE.js";
17
+ } from "./chunk-JSNXGDYW.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
Binary file
Binary file
Binary file
@@ -14,6 +14,8 @@ import { getNodesAndEdges as getNodesAndEdgesForFlows } from '@utils/node-graphs
14
14
  import { buildUrl } from '@utils/url-builder';
15
15
  import { getVersionFromCollection } from '@utils/collections/versions';
16
16
  import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
17
+ import config from '@config';
18
+
17
19
  interface Props {
18
20
  id: string;
19
21
  collection: string;
@@ -51,6 +53,7 @@ if (collection in getNodesAndEdgesFunctions) {
51
53
  id,
52
54
  version,
53
55
  mode,
56
+ channelRenderMode: config.visualiser?.channels?.renderMode === 'single' ? 'single' : 'flat',
54
57
  });
55
58
 
56
59
  nodes = fetchedNodes;
@@ -25,10 +25,18 @@ interface Props {
25
25
  version: string;
26
26
  defaultFlow?: DagreGraph;
27
27
  mode?: 'simple' | 'full';
28
+ channelRenderMode?: 'flat' | 'single';
28
29
  collection?: CollectionEntry<CollectionMessageTypes>[];
29
30
  }
30
31
 
31
- const getNodesAndEdges = async ({ id, version, defaultFlow, mode = 'simple', collection = [] }: Props) => {
32
+ const getNodesAndEdges = async ({
33
+ id,
34
+ version,
35
+ defaultFlow,
36
+ mode = 'simple',
37
+ channelRenderMode = 'flat',
38
+ collection = [],
39
+ }: Props) => {
32
40
  const flow = defaultFlow || createDagreGraph({ ranksep: 300, nodesep: 50 });
33
41
  const nodes = [] as any,
34
42
  edges = [] as any;
@@ -73,6 +81,7 @@ const getNodesAndEdges = async ({ id, version, defaultFlow, mode = 'simple', col
73
81
  channelToTargetLabel: getEdgeLabelForServiceAsTarget(message),
74
82
  mode,
75
83
  currentNodes: nodes,
84
+ channelRenderMode,
76
85
  });
77
86
  nodes.push(...channelNodes);
78
87
  edges.push(...channelEdges);
@@ -126,6 +135,7 @@ const getNodesAndEdges = async ({ id, version, defaultFlow, mode = 'simple', col
126
135
  channelToTargetLabel: getEdgeLabelForMessageAsSource(message),
127
136
  mode,
128
137
  currentNodes: nodes,
138
+ channelRenderMode,
129
139
  });
130
140
 
131
141
  nodes.push(...channelNodes);
@@ -175,17 +185,35 @@ const getNodesAndEdges = async ({ id, version, defaultFlow, mode = 'simple', col
175
185
  };
176
186
  };
177
187
 
178
- export const getNodesAndEdgesForQueries = async ({ id, version, defaultFlow, mode = 'simple' }: Props) => {
188
+ export const getNodesAndEdgesForQueries = async ({
189
+ id,
190
+ version,
191
+ defaultFlow,
192
+ mode = 'simple',
193
+ channelRenderMode = 'flat',
194
+ }: Props) => {
179
195
  const queries = await getQueries();
180
- return getNodesAndEdges({ id, version, defaultFlow, mode, collection: queries });
196
+ return getNodesAndEdges({ id, version, defaultFlow, mode, channelRenderMode, collection: queries });
181
197
  };
182
198
 
183
- export const getNodesAndEdgesForCommands = async ({ id, version, defaultFlow, mode = 'simple' }: Props) => {
199
+ export const getNodesAndEdgesForCommands = async ({
200
+ id,
201
+ version,
202
+ defaultFlow,
203
+ mode = 'simple',
204
+ channelRenderMode = 'flat',
205
+ }: Props) => {
184
206
  const commands = await getCommands();
185
- return getNodesAndEdges({ id, version, defaultFlow, mode, collection: commands });
207
+ return getNodesAndEdges({ id, version, defaultFlow, mode, channelRenderMode, collection: commands });
186
208
  };
187
209
 
188
- export const getNodesAndEdgesForEvents = async ({ id, version, defaultFlow, mode = 'simple' }: Props) => {
210
+ export const getNodesAndEdgesForEvents = async ({
211
+ id,
212
+ version,
213
+ defaultFlow,
214
+ mode = 'simple',
215
+ channelRenderMode = 'flat',
216
+ }: Props) => {
189
217
  const events = await getEvents();
190
- return getNodesAndEdges({ id, version, defaultFlow, mode, collection: events });
218
+ return getNodesAndEdges({ id, version, defaultFlow, mode, channelRenderMode, collection: events });
191
219
  };
@@ -1,6 +1,5 @@
1
1
  // Can't use the CollectionEntry type from astro:content because a client component is using this util
2
- // import { type CollectionEntry } from 'astro:content';
3
- import catalog from '@utils/eventcatalog-config/catalog';
2
+
4
3
  import { MarkerType, Position, type Edge, type Node } from '@xyflow/react';
5
4
  import dagre from 'dagre';
6
5
  import { getItemsFromCollectionByIdAndSemverOrLatest } from '@utils/collections/util';
@@ -103,6 +102,7 @@ export const getChannelNodesAndEdges = ({
103
102
  sourceToChannelLabel = 'sends to channel',
104
103
  mode = 'full',
105
104
  currentNodes = [],
105
+ channelRenderMode = 'flat',
106
106
  }: {
107
107
  channels: CollectionItem[];
108
108
  channelsToRender: { id: string; version: string }[];
@@ -112,6 +112,7 @@ export const getChannelNodesAndEdges = ({
112
112
  sourceToChannelLabel?: string;
113
113
  mode?: 'simple' | 'full';
114
114
  currentNodes?: Node[];
115
+ channelRenderMode?: 'flat' | 'single';
115
116
  }) => {
116
117
  const nodes: Node[] = [];
117
118
  const edges: Edge[] = [];
@@ -122,7 +123,7 @@ export const getChannelNodesAndEdges = ({
122
123
  .filter((channel) => channel !== undefined);
123
124
 
124
125
  channels.forEach((channel) => {
125
- const singleChannel = catalog.visualiser?.channels?.renderMode === 'single'; // Only one node per channel, other wise one node per channel connection
126
+ const singleChannel = channelRenderMode === 'single'; // Only one node per channel, other wise one node per channel connection
126
127
  const channelId = singleChannel ? generateIdForNodes([channel]) : generateIdForNodes([source, channel, target]);
127
128
 
128
129
  // Need to check if the channel node is already in the graph
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.1",
9
+ "version": "2.42.2",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },