@eventcatalog/core 5.0.0-beta.23 → 5.0.0-beta.25
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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-UEVX7NA7.js → chunk-JHFZ7DQA.js} +1 -1
- package/dist/{chunk-BCPFKOYS.js → chunk-LH4Y23DH.js} +1 -1
- package/dist/{chunk-PL47QVH5.js → chunk-NJT4DIOO.js} +1 -1
- package/dist/{chunk-WTC4GUXU.js → chunk-T2MHDVFI.js} +1 -1
- package/dist/{chunk-XM7GHRDU.js → chunk-VH3RYFT7.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +6 -3
- package/dist/eventcatalog.js +10 -7
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/utils/collections/util.ts +8 -4
- package/eventcatalog/src/utils/node-graphs/field-node-graph.ts +4 -2
- package/package.json +3 -3
|
@@ -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.
|
|
179
|
+
var version = "5.0.0-beta.25";
|
|
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-
|
|
3
|
+
} from "../chunk-LH4Y23DH.js";
|
|
4
4
|
import "../chunk-AWOO63ME.js";
|
|
5
5
|
import "../chunk-ZAZHAVKB.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-JHFZ7DQA.js";
|
|
7
7
|
import "../chunk-CPW6G62V.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-NJT4DIOO.js";
|
|
9
9
|
import "../chunk-RFIXKATC.js";
|
|
10
10
|
export {
|
|
11
11
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -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.
|
|
184
|
+
var version = "5.0.0-beta.25";
|
|
185
185
|
|
|
186
186
|
// src/constants.ts
|
|
187
187
|
var VERSION = version;
|
|
@@ -2975,6 +2975,7 @@ Run npm i @eventcatalog/core to update`;
|
|
|
2975
2975
|
// src/eventcatalog.ts
|
|
2976
2976
|
var currentDir = import_node_path21.default.dirname((0, import_node_url2.fileURLToPath)(importMetaUrl));
|
|
2977
2977
|
var astroCli = import_node_path21.default.join(import_node_path21.default.dirname((0, import_node_module2.createRequire)(importMetaUrl).resolve("astro/package.json")), "bin/astro.mjs");
|
|
2978
|
+
var ASTRO_IN_FOREGROUND = { ASTRO_DEV_BACKGROUND: "1", ASTRO_PREVIEW_BACKGROUND: "1" };
|
|
2978
2979
|
var program = new import_commander.Command().version(VERSION);
|
|
2979
2980
|
var dir = import_node_path21.default.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
2980
2981
|
var eventCatalogDir = import_node_path21.default.resolve((0, import_node_path20.join)(currentDir, "../eventcatalog/"));
|
|
@@ -3297,7 +3298,8 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
3297
3298
|
CATALOG_DIR: core,
|
|
3298
3299
|
EVENTCATALOG_DEV_MODE: "true",
|
|
3299
3300
|
IGNORE_BUILD_ARTIFACTS: "true",
|
|
3300
|
-
NODE_NO_WARNINGS: "1"
|
|
3301
|
+
NODE_NO_WARNINGS: "1",
|
|
3302
|
+
...ASTRO_IN_FOREGROUND
|
|
3301
3303
|
},
|
|
3302
3304
|
shouldFilterLine: createAstroDevLineFilter(),
|
|
3303
3305
|
transformLine: replaceAstroReadyVersionLine
|
|
@@ -3369,7 +3371,8 @@ var previewCatalog = async ({ command }) => {
|
|
|
3369
3371
|
cwd: dir,
|
|
3370
3372
|
env: {
|
|
3371
3373
|
PROJECT_DIR: dir,
|
|
3372
|
-
CATALOG_DIR: core
|
|
3374
|
+
CATALOG_DIR: core,
|
|
3375
|
+
...ASTRO_IN_FOREGROUND
|
|
3373
3376
|
},
|
|
3374
3377
|
shouldFilterLine: createAstroLineFilter()
|
|
3375
3378
|
});
|
package/dist/eventcatalog.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-S5GWAUG5.js";
|
|
8
8
|
import {
|
|
9
9
|
log_build_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LH4Y23DH.js";
|
|
11
11
|
import {
|
|
12
12
|
getLicenseStatus,
|
|
13
13
|
printLicenseStatus
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
} from "./chunk-MDWB5HLO.js";
|
|
37
37
|
import {
|
|
38
38
|
generate
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-T2MHDVFI.js";
|
|
40
40
|
import {
|
|
41
41
|
logger
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-VH3RYFT7.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-
|
|
56
|
+
import "./chunk-JHFZ7DQA.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-
|
|
73
|
+
} from "./chunk-NJT4DIOO.js";
|
|
74
74
|
import {
|
|
75
75
|
getEventCatalogConfigFile,
|
|
76
76
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -641,6 +641,7 @@ async function buildFieldsIndex(catalogDir, outputDir) {
|
|
|
641
641
|
// src/eventcatalog.ts
|
|
642
642
|
var currentDir = path2.dirname(fileURLToPath(import.meta.url));
|
|
643
643
|
var astroCli = path2.join(path2.dirname(createRequire(import.meta.url).resolve("astro/package.json")), "bin/astro.mjs");
|
|
644
|
+
var ASTRO_IN_FOREGROUND = { ASTRO_DEV_BACKGROUND: "1", ASTRO_PREVIEW_BACKGROUND: "1" };
|
|
644
645
|
var program = new Command().version(VERSION);
|
|
645
646
|
var dir = path2.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
646
647
|
var eventCatalogDir = path2.resolve(join(currentDir, "../eventcatalog/"));
|
|
@@ -963,7 +964,8 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
963
964
|
CATALOG_DIR: core,
|
|
964
965
|
EVENTCATALOG_DEV_MODE: "true",
|
|
965
966
|
IGNORE_BUILD_ARTIFACTS: "true",
|
|
966
|
-
NODE_NO_WARNINGS: "1"
|
|
967
|
+
NODE_NO_WARNINGS: "1",
|
|
968
|
+
...ASTRO_IN_FOREGROUND
|
|
967
969
|
},
|
|
968
970
|
shouldFilterLine: createAstroDevLineFilter(),
|
|
969
971
|
transformLine: replaceAstroReadyVersionLine
|
|
@@ -1035,7 +1037,8 @@ var previewCatalog = async ({ command }) => {
|
|
|
1035
1037
|
cwd: dir,
|
|
1036
1038
|
env: {
|
|
1037
1039
|
PROJECT_DIR: dir,
|
|
1038
|
-
CATALOG_DIR: core
|
|
1040
|
+
CATALOG_DIR: core,
|
|
1041
|
+
...ASTRO_IN_FOREGROUND
|
|
1039
1042
|
},
|
|
1040
1043
|
shouldFilterLine: createAstroLineFilter()
|
|
1041
1044
|
});
|
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.
|
|
115
|
+
var version = "5.0.0-beta.25";
|
|
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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-T2MHDVFI.js";
|
|
4
|
+
import "./chunk-VH3RYFT7.js";
|
|
5
|
+
import "./chunk-NJT4DIOO.js";
|
|
6
6
|
import "./chunk-RFIXKATC.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -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
|
|
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:
|
|
77
|
-
|
|
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 {
|
|
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
|
-
|
|
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.
|
|
10
|
+
"version": "5.0.0-beta.25",
|
|
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/linter": "1.2.0-beta.4",
|
|
144
145
|
"@eventcatalog/sdk": "2.30.0-beta.1",
|
|
145
|
-
"@eventcatalog/visualiser": "^5.0.0-beta.6"
|
|
146
|
-
"@eventcatalog/linter": "1.2.0-beta.4"
|
|
146
|
+
"@eventcatalog/visualiser": "^5.0.0-beta.6"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
|
149
149
|
"@astrojs/check": "^0.9.10",
|