@eventcatalog/core 3.9.0 → 3.10.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 = "3.9.0";
40
+ var version = "3.10.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-HJOMVPCL.js";
4
- import "../chunk-UYBPI4UO.js";
3
+ } from "../chunk-UWWPTTHP.js";
4
+ import "../chunk-JWOYBQ7B.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/analytics/count-resources.js
21
+ var count_resources_exports = {};
22
+ __export(count_resources_exports, {
23
+ countResources: () => countResources,
24
+ serializeCounts: () => serializeCounts
25
+ });
26
+ module.exports = __toCommonJS(count_resources_exports);
27
+ var import_glob = require("glob");
28
+ var RESOURCE_PATTERNS = {
29
+ events: ["**/events/*/index.@(md|mdx)"],
30
+ commands: ["**/commands/*/index.@(md|mdx)"],
31
+ queries: ["**/queries/*/index.@(md|mdx)"],
32
+ services: ["**/services/*/index.@(md|mdx)"],
33
+ domains: ["domains/*/index.@(md|mdx)", "domains/*/subdomains/*/index.@(md|mdx)"],
34
+ flows: ["**/flows/*/index.@(md|mdx)"],
35
+ channels: ["**/channels/**/index.@(md|mdx)"],
36
+ entities: ["**/entities/*/index.@(md|mdx)"],
37
+ containers: ["**/containers/**/index.@(md|mdx)"],
38
+ "data-products": ["**/data-products/*/index.@(md|mdx)"],
39
+ teams: ["teams/*.@(md|mdx)"],
40
+ users: ["users/*.@(md|mdx)"],
41
+ designs: ["**/*.ecstudio"],
42
+ diagrams: ["**/diagrams/**/index.@(md|mdx)"],
43
+ ubiquitousLanguages: ["domains/*/ubiquitous-language.@(md|mdx)", "domains/*/subdomains/*/ubiquitous-language.@(md|mdx)"]
44
+ };
45
+ async function countResources(projectDir) {
46
+ const counts = {};
47
+ for (const [type, patterns] of Object.entries(RESOURCE_PATTERNS)) {
48
+ let total = 0;
49
+ for (const pattern of patterns) {
50
+ const files = await (0, import_glob.glob)(pattern, {
51
+ cwd: projectDir,
52
+ ignore: ["**/versioned/**", "**/dist/**", "**/node_modules/**"]
53
+ });
54
+ total += files.length;
55
+ }
56
+ counts[type] = total;
57
+ }
58
+ return counts;
59
+ }
60
+ function serializeCounts(counts) {
61
+ return Object.entries(counts).map(([k, v]) => `${k}:${v}`).join(",");
62
+ }
63
+ // Annotate the CommonJS export names for ESM import in node:
64
+ 0 && (module.exports = {
65
+ countResources,
66
+ serializeCounts
67
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Count resources in the catalog directory using glob patterns
3
+ * @param {string} projectDir - Path to the catalog directory
4
+ * @returns {Promise<Record<string, number>>} - Object with resource type counts
5
+ */
6
+ declare function countResources(projectDir: string): Promise<Record<string, number>>;
7
+ /**
8
+ * Serialize resource counts to a string for telemetry
9
+ * @param {Record<string, number>} counts - Object with resource type counts
10
+ * @returns {string} - Serialized string like "events:26,commands:11,..."
11
+ */
12
+ declare function serializeCounts(counts: Record<string, number>): string;
13
+
14
+ export { countResources, serializeCounts };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Count resources in the catalog directory using glob patterns
3
+ * @param {string} projectDir - Path to the catalog directory
4
+ * @returns {Promise<Record<string, number>>} - Object with resource type counts
5
+ */
6
+ declare function countResources(projectDir: string): Promise<Record<string, number>>;
7
+ /**
8
+ * Serialize resource counts to a string for telemetry
9
+ * @param {Record<string, number>} counts - Object with resource type counts
10
+ * @returns {string} - Serialized string like "events:26,commands:11,..."
11
+ */
12
+ declare function serializeCounts(counts: Record<string, number>): string;
13
+
14
+ export { countResources, serializeCounts };
@@ -0,0 +1,8 @@
1
+ import {
2
+ countResources,
3
+ serializeCounts
4
+ } from "../chunk-4UVFXLPI.js";
5
+ export {
6
+ countResources,
7
+ serializeCounts
8
+ };
@@ -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 = "3.9.0";
109
+ var version = "3.10.0";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -135,6 +135,44 @@ async function raiseEvent(eventData) {
135
135
  }
136
136
  }
137
137
 
138
+ // src/analytics/count-resources.js
139
+ var import_glob = require("glob");
140
+ var RESOURCE_PATTERNS = {
141
+ events: ["**/events/*/index.@(md|mdx)"],
142
+ commands: ["**/commands/*/index.@(md|mdx)"],
143
+ queries: ["**/queries/*/index.@(md|mdx)"],
144
+ services: ["**/services/*/index.@(md|mdx)"],
145
+ domains: ["domains/*/index.@(md|mdx)", "domains/*/subdomains/*/index.@(md|mdx)"],
146
+ flows: ["**/flows/*/index.@(md|mdx)"],
147
+ channels: ["**/channels/**/index.@(md|mdx)"],
148
+ entities: ["**/entities/*/index.@(md|mdx)"],
149
+ containers: ["**/containers/**/index.@(md|mdx)"],
150
+ "data-products": ["**/data-products/*/index.@(md|mdx)"],
151
+ teams: ["teams/*.@(md|mdx)"],
152
+ users: ["users/*.@(md|mdx)"],
153
+ designs: ["**/*.ecstudio"],
154
+ diagrams: ["**/diagrams/**/index.@(md|mdx)"],
155
+ ubiquitousLanguages: ["domains/*/ubiquitous-language.@(md|mdx)", "domains/*/subdomains/*/ubiquitous-language.@(md|mdx)"]
156
+ };
157
+ async function countResources(projectDir) {
158
+ const counts = {};
159
+ for (const [type, patterns] of Object.entries(RESOURCE_PATTERNS)) {
160
+ let total = 0;
161
+ for (const pattern of patterns) {
162
+ const files = await (0, import_glob.glob)(pattern, {
163
+ cwd: projectDir,
164
+ ignore: ["**/versioned/**", "**/dist/**", "**/node_modules/**"]
165
+ });
166
+ total += files.length;
167
+ }
168
+ counts[type] = total;
169
+ }
170
+ return counts;
171
+ }
172
+ function serializeCounts(counts) {
173
+ return Object.entries(counts).map(([k, v]) => `${k}:${v}`).join(",");
174
+ }
175
+
138
176
  // src/analytics/log-build.js
139
177
  var getFeatures = async (configFile) => {
140
178
  return {
@@ -161,12 +199,14 @@ var main = async (projectDir, { isEventCatalogStarterEnabled, isEventCatalogScal
161
199
  generatorNames.push("@eventcatalog/backstage-plugin-eventcatalog");
162
200
  }
163
201
  const features = await getFeatures(configFile);
202
+ const resourceCounts = await countResources(projectDir);
164
203
  await raiseEvent({
165
204
  command: "build",
166
205
  org: organizationName,
167
206
  cId,
168
207
  generators: generatorNames.toString(),
169
- features: Object.keys(features).map((feature) => `${feature}:${features[feature]}`).join(",")
208
+ features: Object.keys(features).map((feature) => `${feature}:${features[feature]}`).join(","),
209
+ resources: serializeCounts(resourceCounts)
170
210
  });
171
211
  } catch (error) {
172
212
  }
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-FM44RPBS.js";
4
- import "../chunk-HJOMVPCL.js";
5
- import "../chunk-UYBPI4UO.js";
3
+ } from "../chunk-PYGKP3YM.js";
4
+ import "../chunk-UWWPTTHP.js";
5
+ import "../chunk-4UVFXLPI.js";
6
+ import "../chunk-JWOYBQ7B.js";
6
7
  import "../chunk-UPONRQSN.js";
7
8
  export {
8
9
  log_build_default as default
@@ -0,0 +1,42 @@
1
+ // src/analytics/count-resources.js
2
+ import { glob } from "glob";
3
+ var RESOURCE_PATTERNS = {
4
+ events: ["**/events/*/index.@(md|mdx)"],
5
+ commands: ["**/commands/*/index.@(md|mdx)"],
6
+ queries: ["**/queries/*/index.@(md|mdx)"],
7
+ services: ["**/services/*/index.@(md|mdx)"],
8
+ domains: ["domains/*/index.@(md|mdx)", "domains/*/subdomains/*/index.@(md|mdx)"],
9
+ flows: ["**/flows/*/index.@(md|mdx)"],
10
+ channels: ["**/channels/**/index.@(md|mdx)"],
11
+ entities: ["**/entities/*/index.@(md|mdx)"],
12
+ containers: ["**/containers/**/index.@(md|mdx)"],
13
+ "data-products": ["**/data-products/*/index.@(md|mdx)"],
14
+ teams: ["teams/*.@(md|mdx)"],
15
+ users: ["users/*.@(md|mdx)"],
16
+ designs: ["**/*.ecstudio"],
17
+ diagrams: ["**/diagrams/**/index.@(md|mdx)"],
18
+ ubiquitousLanguages: ["domains/*/ubiquitous-language.@(md|mdx)", "domains/*/subdomains/*/ubiquitous-language.@(md|mdx)"]
19
+ };
20
+ async function countResources(projectDir) {
21
+ const counts = {};
22
+ for (const [type, patterns] of Object.entries(RESOURCE_PATTERNS)) {
23
+ let total = 0;
24
+ for (const pattern of patterns) {
25
+ const files = await glob(pattern, {
26
+ cwd: projectDir,
27
+ ignore: ["**/versioned/**", "**/dist/**", "**/node_modules/**"]
28
+ });
29
+ total += files.length;
30
+ }
31
+ counts[type] = total;
32
+ }
33
+ return counts;
34
+ }
35
+ function serializeCounts(counts) {
36
+ return Object.entries(counts).map(([k, v]) => `${k}:${v}`).join(",");
37
+ }
38
+
39
+ export {
40
+ countResources,
41
+ serializeCounts
42
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-OQYLI4YJ.js";
3
+ } from "./chunk-QCOWYJ2Z.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.9.0";
2
+ var version = "3.10.0";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,10 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-HJOMVPCL.js";
3
+ } from "./chunk-UWWPTTHP.js";
4
+ import {
5
+ countResources,
6
+ serializeCounts
7
+ } from "./chunk-4UVFXLPI.js";
4
8
  import {
5
9
  getEventCatalogConfigFile,
6
10
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -32,12 +36,14 @@ var main = async (projectDir, { isEventCatalogStarterEnabled, isEventCatalogScal
32
36
  generatorNames.push("@eventcatalog/backstage-plugin-eventcatalog");
33
37
  }
34
38
  const features = await getFeatures(configFile);
39
+ const resourceCounts = await countResources(projectDir);
35
40
  await raiseEvent({
36
41
  command: "build",
37
42
  org: organizationName,
38
43
  cId,
39
44
  generators: generatorNames.toString(),
40
- features: Object.keys(features).map((feature) => `${feature}:${features[feature]}`).join(",")
45
+ features: Object.keys(features).map((feature) => `${feature}:${features[feature]}`).join(","),
46
+ resources: serializeCounts(resourceCounts)
41
47
  });
42
48
  } catch (error) {
43
49
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-UYBPI4UO.js";
3
+ } from "./chunk-JWOYBQ7B.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-UYBPI4UO.js";
3
+ } from "./chunk-JWOYBQ7B.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "3.9.0";
28
+ var version = "3.10.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-UYBPI4UO.js";
3
+ } from "./chunk-JWOYBQ7B.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
109
109
  var import_picocolors = __toESM(require("picocolors"), 1);
110
110
 
111
111
  // package.json
112
- var version = "3.9.0";
112
+ var version = "3.10.0";
113
113
 
114
114
  // src/constants.ts
115
115
  var VERSION = version;
@@ -224,6 +224,44 @@ async function raiseEvent(eventData) {
224
224
  }
225
225
  }
226
226
 
227
+ // src/analytics/count-resources.js
228
+ var import_glob = require("glob");
229
+ var RESOURCE_PATTERNS = {
230
+ events: ["**/events/*/index.@(md|mdx)"],
231
+ commands: ["**/commands/*/index.@(md|mdx)"],
232
+ queries: ["**/queries/*/index.@(md|mdx)"],
233
+ services: ["**/services/*/index.@(md|mdx)"],
234
+ domains: ["domains/*/index.@(md|mdx)", "domains/*/subdomains/*/index.@(md|mdx)"],
235
+ flows: ["**/flows/*/index.@(md|mdx)"],
236
+ channels: ["**/channels/**/index.@(md|mdx)"],
237
+ entities: ["**/entities/*/index.@(md|mdx)"],
238
+ containers: ["**/containers/**/index.@(md|mdx)"],
239
+ "data-products": ["**/data-products/*/index.@(md|mdx)"],
240
+ teams: ["teams/*.@(md|mdx)"],
241
+ users: ["users/*.@(md|mdx)"],
242
+ designs: ["**/*.ecstudio"],
243
+ diagrams: ["**/diagrams/**/index.@(md|mdx)"],
244
+ ubiquitousLanguages: ["domains/*/ubiquitous-language.@(md|mdx)", "domains/*/subdomains/*/ubiquitous-language.@(md|mdx)"]
245
+ };
246
+ async function countResources(projectDir) {
247
+ const counts = {};
248
+ for (const [type, patterns] of Object.entries(RESOURCE_PATTERNS)) {
249
+ let total = 0;
250
+ for (const pattern of patterns) {
251
+ const files = await (0, import_glob.glob)(pattern, {
252
+ cwd: projectDir,
253
+ ignore: ["**/versioned/**", "**/dist/**", "**/node_modules/**"]
254
+ });
255
+ total += files.length;
256
+ }
257
+ counts[type] = total;
258
+ }
259
+ return counts;
260
+ }
261
+ function serializeCounts(counts) {
262
+ return Object.entries(counts).map(([k, v]) => `${k}:${v}`).join(",");
263
+ }
264
+
227
265
  // src/analytics/log-build.js
228
266
  var getFeatures = async (configFile) => {
229
267
  return {
@@ -250,12 +288,14 @@ var main = async (projectDir, { isEventCatalogStarterEnabled: isEventCatalogStar
250
288
  generatorNames.push("@eventcatalog/backstage-plugin-eventcatalog");
251
289
  }
252
290
  const features = await getFeatures(configFile);
291
+ const resourceCounts = await countResources(projectDir);
253
292
  await raiseEvent({
254
293
  command: "build",
255
294
  org: organizationName,
256
295
  cId,
257
296
  generators: generatorNames.toString(),
258
- features: Object.keys(features).map((feature) => `${feature}:${features[feature]}`).join(",")
297
+ features: Object.keys(features).map((feature) => `${feature}:${features[feature]}`).join(","),
298
+ resources: serializeCounts(resourceCounts)
259
299
  });
260
300
  } catch (error) {
261
301
  }
@@ -435,7 +475,7 @@ function retryEPERM(fn) {
435
475
  }
436
476
 
437
477
  // src/catalog-to-astro-content-directory.js
438
- var import_glob = require("glob");
478
+ var import_glob2 = require("glob");
439
479
  var path4 = __toESM(require("path"), 1);
440
480
  var import_fs = __toESM(require("fs"), 1);
441
481
  var import_url2 = require("url");
@@ -443,12 +483,12 @@ var import_node_os = __toESM(require("os"), 1);
443
483
  var __filename2 = (0, import_url2.fileURLToPath)(importMetaUrl);
444
484
  var rootPkg = path4.resolve(path4.dirname(__filename2), "../");
445
485
  var copyFiles = async (source, target) => {
446
- const files = await (0, import_glob.glob)(path4.join(source, "**"), {
486
+ const files = await (0, import_glob2.glob)(path4.join(source, "**"), {
447
487
  nodir: true,
448
488
  windowsPathsNoEscape: import_node_os.default.platform() == "win32",
449
489
  ignore: ["node_modules/**", "**/dist/**", "**/teams", "**/users", "**/*.mdx", "**/*.md", "**/package.json", "**/Dockerfile"]
450
490
  });
451
- const snippets = await (0, import_glob.glob)(path4.join(source, "snippets/**/*.mdx"), {
491
+ const snippets = await (0, import_glob2.glob)(path4.join(source, "snippets/**/*.mdx"), {
452
492
  nodir: true,
453
493
  windowsPathsNoEscape: import_node_os.default.platform() == "win32"
454
494
  });
@@ -539,13 +579,13 @@ var import_dotenv = __toESM(require("dotenv"), 1);
539
579
 
540
580
  // src/migrations/message-channels-to-service-channels.ts
541
581
  var import_node_fs5 = __toESM(require("fs"), 1);
542
- var import_glob2 = require("glob");
582
+ var import_glob3 = require("glob");
543
583
  var import_node_os2 = __toESM(require("os"), 1);
544
584
  var import_gray_matter3 = __toESM(require("gray-matter"), 1);
545
585
  var import_node_path6 = __toESM(require("path"), 1);
546
586
  var message_channels_to_service_channels_default = async (dir2) => {
547
587
  const PROJECT_DIR = import_node_path6.default.join(dir2 || process.env.PROJECT_DIR);
548
- const messages = await (0, import_glob2.glob)(
588
+ const messages = await (0, import_glob3.glob)(
549
589
  [
550
590
  "**/events/*/index.mdx",
551
591
  "**/events/*/index.md",
@@ -571,7 +611,7 @@ var message_channels_to_service_channels_default = async (dir2) => {
571
611
  ignore: ["node_modules/**", "**/dist/**", "**/teams", "**/users", "**/package.json", "**/Dockerfile"]
572
612
  }
573
613
  );
574
- const services = await (0, import_glob2.glob)(
614
+ const services = await (0, import_glob3.glob)(
575
615
  [
576
616
  "**/services/*/index.mdx",
577
617
  "**/services/*/index.md",
@@ -102,6 +102,7 @@ interface Config {
102
102
  domains?: ResourceDependency[];
103
103
  };
104
104
  mermaid?: {
105
+ maxTextSize?: number;
105
106
  iconPacks?: string[];
106
107
  };
107
108
  chat?: {
@@ -102,6 +102,7 @@ interface Config {
102
102
  domains?: ResourceDependency[];
103
103
  };
104
104
  mermaid?: {
105
+ maxTextSize?: number;
105
106
  iconPacks?: string[];
106
107
  };
107
108
  chat?: {
@@ -6,8 +6,9 @@ import {
6
6
  } from "./chunk-PLNJC7NZ.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-FM44RPBS.js";
10
- import "./chunk-HJOMVPCL.js";
9
+ } from "./chunk-PYGKP3YM.js";
10
+ import "./chunk-UWWPTTHP.js";
11
+ import "./chunk-4UVFXLPI.js";
11
12
  import {
12
13
  runMigrations
13
14
  } from "./chunk-BH3JMNAV.js";
@@ -21,13 +22,13 @@ import {
21
22
  } from "./chunk-5VBIXL6C.js";
22
23
  import {
23
24
  generate
24
- } from "./chunk-CZG5RQXY.js";
25
+ } from "./chunk-G42HAVR6.js";
25
26
  import {
26
27
  logger
27
- } from "./chunk-OQYLI4YJ.js";
28
+ } from "./chunk-QCOWYJ2Z.js";
28
29
  import {
29
30
  VERSION
30
- } from "./chunk-UYBPI4UO.js";
31
+ } from "./chunk-JWOYBQ7B.js";
31
32
  import "./chunk-UPONRQSN.js";
32
33
 
33
34
  // src/eventcatalog.ts
package/dist/generate.cjs CHANGED
@@ -73,7 +73,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
73
73
  var import_picocolors = __toESM(require("picocolors"), 1);
74
74
 
75
75
  // package.json
76
- var version = "3.9.0";
76
+ var version = "3.10.0";
77
77
 
78
78
  // src/constants.ts
79
79
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-CZG5RQXY.js";
4
- import "./chunk-OQYLI4YJ.js";
5
- import "./chunk-UYBPI4UO.js";
3
+ } from "./chunk-G42HAVR6.js";
4
+ import "./chunk-QCOWYJ2Z.js";
5
+ import "./chunk-JWOYBQ7B.js";
6
6
  import "./chunk-UPONRQSN.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "3.9.0";
39
+ var version = "3.10.0";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-OQYLI4YJ.js";
4
- import "../chunk-UYBPI4UO.js";
3
+ } from "../chunk-QCOWYJ2Z.js";
4
+ import "../chunk-JWOYBQ7B.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -7,9 +7,10 @@ import { copyToClipboard } from '@utils/clipboard';
7
7
  interface MermaidViewProps {
8
8
  nodes: Node[];
9
9
  edges: Edge[];
10
+ maxTextSize?: number;
10
11
  }
11
12
 
12
- const MermaidView = ({ nodes, edges }: MermaidViewProps) => {
13
+ const MermaidView = ({ nodes, edges, maxTextSize = 100000 }: MermaidViewProps) => {
13
14
  const [copySuccess, setCopySuccess] = useState(false);
14
15
  const [mermaidCode, setMermaidCode] = useState('');
15
16
  const [previewSvg, setPreviewSvg] = useState<string | null>(null);
@@ -42,6 +43,7 @@ const MermaidView = ({ nodes, edges }: MermaidViewProps) => {
42
43
  const currentTheme = isDarkMode ? 'dark' : 'default';
43
44
 
44
45
  mermaid.initialize({
46
+ maxTextSize: maxTextSize,
45
47
  startOnLoad: false,
46
48
  theme: currentTheme,
47
49
  flowchart: {
@@ -158,6 +158,7 @@ if (collection === 'services-containers') {
158
158
  includeKey={showLegend}
159
159
  zoomOnScroll={zoomOnScroll}
160
160
  isChatEnabled={isChatEnabled}
161
+ maxTextSize={config.mermaid?.maxTextSize}
161
162
  />
162
163
  </div>
163
164
 
@@ -18,23 +18,7 @@ import {
18
18
  type NodeTypes,
19
19
  } from '@xyflow/react';
20
20
  import '@xyflow/react/dist/style.css';
21
- import {
22
- ExternalLink,
23
- HistoryIcon,
24
- CheckIcon,
25
- ClipboardIcon,
26
- ChevronDownIcon,
27
- MoreVertical,
28
- Zap,
29
- EyeOff,
30
- Code,
31
- Share2,
32
- Search,
33
- Grid3x3,
34
- Maximize2,
35
- Map,
36
- Sparkles,
37
- } from 'lucide-react';
21
+ import { ExternalLink, HistoryIcon, CheckIcon, ClipboardIcon, MoreVertical } from 'lucide-react';
38
22
  import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
39
23
  import { toPng } from 'html-to-image';
40
24
  import { DocumentArrowDownIcon, PresentationChartLineIcon } from '@heroicons/react/24/outline';
@@ -93,6 +77,7 @@ interface Props {
93
77
  isStudioModalOpen?: boolean;
94
78
  setIsStudioModalOpen?: (isOpen: boolean) => void;
95
79
  isChatEnabled?: boolean;
80
+ maxTextSize?: number;
96
81
  }
97
82
 
98
83
  const getVisualiserUrlForCollection = (collectionItem: CollectionEntry<CollectionTypes>) => {
@@ -115,6 +100,7 @@ const NodeGraphBuilder = ({
115
100
  isStudioModalOpen,
116
101
  setIsStudioModalOpen = () => {},
117
102
  isChatEnabled = false,
103
+ maxTextSize,
118
104
  }: Props) => {
119
105
  const nodeTypes = useMemo(
120
106
  () =>
@@ -723,7 +709,7 @@ const NodeGraphBuilder = ({
723
709
  </div>
724
710
  {/* Mermaid View */}
725
711
  <div className="flex-1 overflow-hidden">
726
- <MermaidView nodes={nodes} edges={edges} />
712
+ <MermaidView nodes={nodes} edges={edges} maxTextSize={maxTextSize} />
727
713
  </div>
728
714
  </>
729
715
  ) : (
@@ -965,6 +951,7 @@ interface NodeGraphProps {
965
951
  zoomOnScroll?: boolean;
966
952
  designId?: string;
967
953
  isChatEnabled?: boolean;
954
+ maxTextSize?: number;
968
955
  }
969
956
 
970
957
  const NodeGraph = ({
@@ -986,6 +973,7 @@ const NodeGraph = ({
986
973
  zoomOnScroll = false,
987
974
  designId,
988
975
  isChatEnabled = false,
976
+ maxTextSize,
989
977
  }: NodeGraphProps) => {
990
978
  const [elem, setElem] = useState(null);
991
979
  const [showFooter, setShowFooter] = useState(true);
@@ -1032,6 +1020,7 @@ const NodeGraph = ({
1032
1020
  isStudioModalOpen={isStudioModalOpen}
1033
1021
  setIsStudioModalOpen={setIsStudioModalOpen}
1034
1022
  isChatEnabled={isChatEnabled}
1023
+ maxTextSize={maxTextSize}
1035
1024
  />
1036
1025
 
1037
1026
  {showFooter && (
@@ -570,6 +570,7 @@ const diagramId = props.data.id;
570
570
  const isDarkMode = document.documentElement.getAttribute('data-theme') === 'dark';
571
571
 
572
572
  mermaid.initialize({
573
+ maxTextSize: window.eventcatalog?.mermaid?.maxTextSize || 100000,
573
574
  startOnLoad: false,
574
575
  theme: isDarkMode ? 'dark' : 'default',
575
576
  fontFamily: 'system-ui, -apple-system, sans-serif',
@@ -600,6 +600,7 @@ export async function renderMermaidWithZoom(graphs: HTMLCollectionOf<Element>, m
600
600
  };
601
601
 
602
602
  mermaid.initialize({
603
+ maxTextSize: mermaidConfig?.maxTextSize || 100000,
603
604
  flowchart: {
604
605
  curve: 'linear',
605
606
  rankSpacing: 0,
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": "3.9.0",
9
+ "version": "3.10.0",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },