@eventcatalog/core 5.0.0-beta.22 → 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.
- 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-KYQBCP3A.js → chunk-43UIBYS7.js} +1 -1
- package/dist/{chunk-I7QC5DRU.js → chunk-5VNK636S.js} +1 -1
- package/dist/{chunk-US5TWRHO.js → chunk-RISES2GZ.js} +1 -1
- package/dist/{chunk-UKD35J77.js → chunk-TJRU6IQR.js} +1 -1
- package/dist/{chunk-3R4YXM3W.js → chunk-UHHN3RAI.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +5 -5
- 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/content.config.ts +19 -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 +2 -2
|
@@ -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.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-
|
|
3
|
+
} from "../chunk-43UIBYS7.js";
|
|
4
4
|
import "../chunk-AWOO63ME.js";
|
|
5
5
|
import "../chunk-ZAZHAVKB.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-5VNK636S.js";
|
|
7
7
|
import "../chunk-CPW6G62V.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-UHHN3RAI.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.24";
|
|
185
185
|
|
|
186
186
|
// src/constants.ts
|
|
187
187
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-S5GWAUG5.js";
|
|
4
4
|
import {
|
|
5
5
|
log_build_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-43UIBYS7.js";
|
|
7
7
|
import {
|
|
8
8
|
getLicenseStatus,
|
|
9
9
|
printLicenseStatus
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
} from "./chunk-MDWB5HLO.js";
|
|
37
37
|
import {
|
|
38
38
|
generate
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-RISES2GZ.js";
|
|
40
40
|
import {
|
|
41
41
|
logger
|
|
42
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
73
|
+
} from "./chunk-UHHN3RAI.js";
|
|
74
74
|
import {
|
|
75
75
|
getEventCatalogConfigFile,
|
|
76
76
|
verifyRequiredFieldsAreInCatalogConfigFile
|
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.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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
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
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -502,7 +502,24 @@ const agents = defineCollection({
|
|
|
502
502
|
),
|
|
503
503
|
});
|
|
504
504
|
|
|
505
|
-
|
|
505
|
+
// ADRs need a status and a date, and say so when they're missing or invalid. Astro's own message for
|
|
506
|
+
// a missing or unreadable date was "Expected type date, received object", with the field name garbled.
|
|
507
|
+
const adrStatus = z.enum(ADR_STATUS_VALUES, {
|
|
508
|
+
error: (issue) =>
|
|
509
|
+
issue.input === undefined ? `Required: one of ${ADR_STATUS_VALUES.map((value) => `"${value}"`).join(', ')}` : undefined,
|
|
510
|
+
});
|
|
511
|
+
const adrDate = z.preprocess(
|
|
512
|
+
// Converted to a date only when it's set: a missing date coerced first became an invalid date
|
|
513
|
+
(value) => (value == null ? value : new Date(value as string | number | Date)),
|
|
514
|
+
z.date({
|
|
515
|
+
error: (issue) =>
|
|
516
|
+
issue.input === undefined
|
|
517
|
+
? 'Required: a date, e.g. 2026-06-01'
|
|
518
|
+
: issue.input instanceof Date
|
|
519
|
+
? 'Invalid date: use a date, e.g. 2026-06-01'
|
|
520
|
+
: undefined,
|
|
521
|
+
})
|
|
522
|
+
);
|
|
506
523
|
|
|
507
524
|
const adrPointer = z.object({
|
|
508
525
|
id: z.string(),
|
|
@@ -539,7 +556,7 @@ const adrs = defineCollection({
|
|
|
539
556
|
z
|
|
540
557
|
.object({
|
|
541
558
|
status: adrStatus,
|
|
542
|
-
date:
|
|
559
|
+
date: adrDate,
|
|
543
560
|
decisionMakers: z.array(ownerReference).optional(),
|
|
544
561
|
appliesTo: z.array(adrResourcePointer).optional(),
|
|
545
562
|
supersedes: z.array(adrPointer).optional(),
|
|
@@ -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.24",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -141,7 +141,7 @@
|
|
|
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.
|
|
144
|
+
"@eventcatalog/linter": "1.2.0-beta.4",
|
|
145
145
|
"@eventcatalog/visualiser": "^5.0.0-beta.6",
|
|
146
146
|
"@eventcatalog/sdk": "2.30.0-beta.1"
|
|
147
147
|
},
|