@eventcatalog/core 5.0.0-beta.23 → 5.0.0-beta.24

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.
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.0.0-beta.23";
39
+ var version = "5.0.0-beta.24";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-UEVX7NA7.js";
3
+ } from "../chunk-5VNK636S.js";
4
4
  import "../chunk-CPW6G62V.js";
5
- import "../chunk-PL47QVH5.js";
5
+ import "../chunk-UHHN3RAI.js";
6
6
  export {
7
7
  raiseEvent
8
8
  };
@@ -176,7 +176,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
176
176
  var import_os = __toESM(require("os"), 1);
177
177
 
178
178
  // package.json
179
- var version = "5.0.0-beta.23";
179
+ var version = "5.0.0-beta.24";
180
180
 
181
181
  // src/constants.ts
182
182
  var VERSION = version;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-BCPFKOYS.js";
3
+ } from "../chunk-43UIBYS7.js";
4
4
  import "../chunk-AWOO63ME.js";
5
5
  import "../chunk-ZAZHAVKB.js";
6
- import "../chunk-UEVX7NA7.js";
6
+ import "../chunk-5VNK636S.js";
7
7
  import "../chunk-CPW6G62V.js";
8
- import "../chunk-PL47QVH5.js";
8
+ import "../chunk-UHHN3RAI.js";
9
9
  import "../chunk-RFIXKATC.js";
10
10
  export {
11
11
  log_build_default as default
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-ZAZHAVKB.js";
9
9
  import {
10
10
  raiseEvent
11
- } from "./chunk-UEVX7NA7.js";
11
+ } from "./chunk-5VNK636S.js";
12
12
  import {
13
13
  TELEMETRY_REQUEST_TIMEOUT_MS,
14
14
  isTelemetryDisabled
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-CPW6G62V.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-PL47QVH5.js";
7
+ } from "./chunk-UHHN3RAI.js";
8
8
 
9
9
  // src/analytics/analytics.js
10
10
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-XM7GHRDU.js";
3
+ } from "./chunk-TJRU6IQR.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-PL47QVH5.js";
3
+ } from "./chunk-UHHN3RAI.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "5.0.0-beta.23";
2
+ var version = "5.0.0-beta.24";
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 = "5.0.0-beta.23";
28
+ var version = "5.0.0-beta.24";
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-PL47QVH5.js";
3
+ } from "./chunk-UHHN3RAI.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -181,7 +181,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
181
181
  var import_picocolors = __toESM(require("picocolors"), 1);
182
182
 
183
183
  // package.json
184
- var version = "5.0.0-beta.23";
184
+ var version = "5.0.0-beta.24";
185
185
 
186
186
  // src/constants.ts
187
187
  var VERSION = version;
@@ -1,18 +1,18 @@
1
- import {
2
- runMigrations
3
- } from "./chunk-XUAF2H54.js";
4
- import "./chunk-CA4U2JP7.js";
5
1
  import {
6
2
  stopChildWithParent
7
3
  } from "./chunk-S5GWAUG5.js";
8
4
  import {
9
5
  log_build_default
10
- } from "./chunk-BCPFKOYS.js";
6
+ } from "./chunk-43UIBYS7.js";
11
7
  import {
12
8
  getLicenseStatus,
13
9
  printLicenseStatus
14
10
  } from "./chunk-AWOO63ME.js";
15
11
  import "./chunk-ZAZHAVKB.js";
12
+ import {
13
+ runMigrations
14
+ } from "./chunk-XUAF2H54.js";
15
+ import "./chunk-CA4U2JP7.js";
16
16
  import {
17
17
  FederationConflictError,
18
18
  FederationDiagnosticError,
@@ -21,13 +21,13 @@ import {
21
21
  import "./chunk-WRNH5C3U.js";
22
22
  import "./chunk-5EPNFDT5.js";
23
23
  import "./chunk-A2RZR3U4.js";
24
+ import "./chunk-SDZQJTJW.js";
25
+ import "./chunk-352FGP6W.js";
24
26
  import "./chunk-R7Z5ALYI.js";
25
27
  import {
26
28
  getFederationDiagnosticCounts,
27
29
  getVisibleFederationDiagnostics
28
30
  } from "./chunk-JJPB6EOZ.js";
29
- import "./chunk-SDZQJTJW.js";
30
- import "./chunk-352FGP6W.js";
31
31
  import {
32
32
  getProjectOutDir,
33
33
  isAuthEnabled,
@@ -36,10 +36,10 @@ import {
36
36
  } from "./chunk-MDWB5HLO.js";
37
37
  import {
38
38
  generate
39
- } from "./chunk-WTC4GUXU.js";
39
+ } from "./chunk-RISES2GZ.js";
40
40
  import {
41
41
  logger
42
- } from "./chunk-XM7GHRDU.js";
42
+ } from "./chunk-TJRU6IQR.js";
43
43
  import {
44
44
  resolve_catalog_dependencies_default
45
45
  } from "./chunk-36RYTYT5.js";
@@ -53,7 +53,7 @@ import {
53
53
  import {
54
54
  watch
55
55
  } from "./chunk-U63GDPPY.js";
56
- import "./chunk-UEVX7NA7.js";
56
+ import "./chunk-5VNK636S.js";
57
57
  import "./chunk-CPW6G62V.js";
58
58
  import {
59
59
  getAstroConfigPath
@@ -70,7 +70,7 @@ import {
70
70
  } from "./chunk-LFQJXLHG.js";
71
71
  import {
72
72
  VERSION
73
- } from "./chunk-PL47QVH5.js";
73
+ } from "./chunk-UHHN3RAI.js";
74
74
  import {
75
75
  getEventCatalogConfigFile,
76
76
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -6,10 +6,10 @@ import {
6
6
  import "../chunk-WRNH5C3U.js";
7
7
  import "../chunk-5EPNFDT5.js";
8
8
  import "../chunk-A2RZR3U4.js";
9
- import "../chunk-R7Z5ALYI.js";
10
- import "../chunk-JJPB6EOZ.js";
11
9
  import "../chunk-SDZQJTJW.js";
12
10
  import "../chunk-352FGP6W.js";
11
+ import "../chunk-R7Z5ALYI.js";
12
+ import "../chunk-JJPB6EOZ.js";
13
13
  import "../chunk-RFIXKATC.js";
14
14
  export {
15
15
  FederationConflictError,
package/dist/generate.cjs CHANGED
@@ -112,7 +112,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
112
112
  var import_picocolors = __toESM(require("picocolors"), 1);
113
113
 
114
114
  // package.json
115
- var version = "5.0.0-beta.23";
115
+ var version = "5.0.0-beta.24";
116
116
 
117
117
  // src/constants.ts
118
118
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-WTC4GUXU.js";
4
- import "./chunk-XM7GHRDU.js";
5
- import "./chunk-PL47QVH5.js";
3
+ } from "./chunk-RISES2GZ.js";
4
+ import "./chunk-TJRU6IQR.js";
5
+ import "./chunk-UHHN3RAI.js";
6
6
  import "./chunk-RFIXKATC.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 = "5.0.0-beta.23";
39
+ var version = "5.0.0-beta.24";
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-XM7GHRDU.js";
4
- import "../chunk-PL47QVH5.js";
3
+ } from "../chunk-TJRU6IQR.js";
4
+ import "../chunk-UHHN3RAI.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -1,16 +1,19 @@
1
1
  import type { CollectionTypes } from '@types';
2
2
  import type { CollectionEntry } from 'astro:content';
3
- import path from 'node:path';
4
3
  import { compareVersions, toComparableVersion, versionSatisfiesRange } from './version-compare';
5
4
 
6
5
  // --- FILE PATH HELPERS ---
7
6
 
7
+ // Without node:path: node graph builders that import this module also run in the browser (the Fields Explorer)
8
+ const pathSegments = (filePath: string) => filePath.split(/[\\/]/).filter(Boolean);
9
+ const getBasename = (filePath: string) => pathSegments(filePath).at(-1) ?? '';
10
+
8
11
  /**
9
12
  * Extract the folder name from an Astro collection entry's filePath.
10
13
  * Replaces the expensive SDK getResourceFolderName which globs + reads every file.
11
14
  */
12
15
  export const getFolderNameFromFilePath = (filePath: string): string => {
13
- return path.basename(path.dirname(filePath));
16
+ return pathSegments(filePath).at(-2) ?? '';
14
17
  };
15
18
 
16
19
  // --- SPECIFICATION HELPERS ---
@@ -73,8 +76,9 @@ export const processSpecifications = (
73
76
  return specs.map((spec) => ({
74
77
  ...spec,
75
78
  name: spec.name || getDefaultSpecificationName(spec.type),
76
- filename: path.basename(spec.path),
77
- filenameWithoutExtension: path.basename(spec.path, path.extname(spec.path)),
79
+ filename: getBasename(spec.path),
80
+ // Keeps a leading dot, as path.extname does (`.env` has no extension)
81
+ filenameWithoutExtension: getBasename(spec.path).replace(/(?<=.)\.[^.]*$/, ''),
78
82
  }));
79
83
  };
80
84
 
@@ -1,6 +1,6 @@
1
1
  import type { Node, Edge } from '@xyflow/react';
2
2
  import { createEdge, createNode, buildContextMenuForMessage, buildContextMenuForService } from './utils/utils';
3
- import { layoutNodeGraph } from '@utils/node-graphs/layout-node-graph';
3
+ import { layoutWithElk } from '@eventcatalog/visualiser/layout';
4
4
 
5
5
  export interface FieldOccurrence {
6
6
  messageId: string;
@@ -173,5 +173,7 @@ export const getNodesAndEdges = async ({
173
173
 
174
174
  if (!layout) return { nodes, edges };
175
175
 
176
- return layoutNodeGraph({ nodes, edges });
176
+ // Lays out with ELK directly rather than layoutNodeGraph: this runs in the browser (the Fields Explorer),
177
+ // and layoutNodeGraph's cache reads the catalog's config, which would put the config in the browser's bundle
178
+ return (await layoutWithElk({ nodes, edges })) as unknown as { nodes: Node[]; edges: Edge[] };
177
179
  };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "BUSL-1.1",
9
9
  "type": "module",
10
- "version": "5.0.0-beta.23",
10
+ "version": "5.0.0-beta.24",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -141,9 +141,9 @@
141
141
  "y-protocols": "^1.0.7",
142
142
  "yjs": "^13.6.33",
143
143
  "zod": "^4.3.6",
144
- "@eventcatalog/sdk": "2.30.0-beta.1",
144
+ "@eventcatalog/linter": "1.2.0-beta.4",
145
145
  "@eventcatalog/visualiser": "^5.0.0-beta.6",
146
- "@eventcatalog/linter": "1.2.0-beta.4"
146
+ "@eventcatalog/sdk": "2.30.0-beta.1"
147
147
  },
148
148
  "devDependencies": {
149
149
  "@astrojs/check": "^0.9.10",