@eventcatalog/core 3.33.0 → 3.34.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.
- 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-YKTTWB2P.js → chunk-623CFR4T.js} +1 -1
- package/dist/{chunk-GBSBBBF5.js → chunk-BJWMR3ZH.js} +1 -1
- package/dist/{chunk-TDRDRXOZ.js → chunk-IO6EMN5C.js} +1 -1
- package/dist/{chunk-DN6F4AAQ.js → chunk-K5AM6PPU.js} +1 -1
- package/dist/{chunk-VRXBFCYB.js → chunk-PP7EDIPX.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 +8 -8
- 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/enterprise/custom-documentation/utils/custom-docs.ts +26 -8
- package/package.json +11 -11
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BJWMR3ZH.js";
|
|
4
|
+
import "../chunk-IO6EMN5C.js";
|
|
5
5
|
import "../chunk-4UVFXLPI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-623CFR4T.js";
|
|
7
7
|
import "../chunk-5T63CXKU.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
114
114
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
|
-
var version = "3.
|
|
117
|
+
var version = "3.34.0";
|
|
118
118
|
|
|
119
119
|
// src/constants.ts
|
|
120
120
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
log_build_default
|
|
3
|
-
} from "./chunk-GBSBBBF5.js";
|
|
4
1
|
import {
|
|
5
2
|
resolve_catalog_dependencies_default
|
|
6
3
|
} from "./chunk-WAJIJEI3.js";
|
|
7
4
|
import {
|
|
8
5
|
watch
|
|
9
6
|
} from "./chunk-K3ZVEX2Y.js";
|
|
7
|
+
import {
|
|
8
|
+
log_build_default
|
|
9
|
+
} from "./chunk-BJWMR3ZH.js";
|
|
10
|
+
import "./chunk-IO6EMN5C.js";
|
|
11
|
+
import "./chunk-4UVFXLPI.js";
|
|
10
12
|
import {
|
|
11
13
|
runMigrations
|
|
12
14
|
} from "./chunk-XUAF2H54.js";
|
|
13
15
|
import "./chunk-CA4U2JP7.js";
|
|
14
|
-
import "./chunk-TDRDRXOZ.js";
|
|
15
|
-
import "./chunk-4UVFXLPI.js";
|
|
16
16
|
import {
|
|
17
17
|
catalogToAstro
|
|
18
18
|
} from "./chunk-YDXB3BD2.js";
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
} from "./chunk-3KXCGYET.js";
|
|
23
23
|
import {
|
|
24
24
|
generate
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PP7EDIPX.js";
|
|
26
26
|
import {
|
|
27
27
|
logger
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-K5AM6PPU.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-623CFR4T.js";
|
|
32
32
|
import {
|
|
33
33
|
getEventCatalogConfigFile,
|
|
34
34
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
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-PP7EDIPX.js";
|
|
4
|
+
import "./chunk-K5AM6PPU.js";
|
|
5
|
+
import "./chunk-623CFR4T.js";
|
|
6
6
|
import "./chunk-5T63CXKU.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -6,9 +6,20 @@
|
|
|
6
6
|
import config from '@config';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import path from 'node:path';
|
|
9
|
-
import {
|
|
9
|
+
import { getCollection } from 'astro:content';
|
|
10
10
|
import matter from 'gray-matter';
|
|
11
11
|
|
|
12
|
+
// Use getCollection (which returns plain entries) instead of getEntry, which installs
|
|
13
|
+
// Astro's `slug` deprecation accessor on every entry it returns. The accessor fires a
|
|
14
|
+
// `console.error` on each access of `entry.data.slug`, even though our schema legitimately
|
|
15
|
+
// defines `slug` as an optional user field. See packages/core/eventcatalog/src/enterprise/collections/custom-pages.ts.
|
|
16
|
+
const getCustomPagesById = async () => {
|
|
17
|
+
const all = await getCollection('customPages');
|
|
18
|
+
const map = new Map<string, (typeof all)[number]>();
|
|
19
|
+
for (const e of all) map.set(e.id, e);
|
|
20
|
+
return map;
|
|
21
|
+
};
|
|
22
|
+
|
|
12
23
|
type Badge = {
|
|
13
24
|
text: string;
|
|
14
25
|
color: string;
|
|
@@ -55,12 +66,16 @@ const DOCS_DIR = 'docs';
|
|
|
55
66
|
* If an index.mdx or index.md file exists in the directory, it will be used as the
|
|
56
67
|
* folder's link target (making the folder clickable) and excluded from the items list.
|
|
57
68
|
*/
|
|
69
|
+
type CustomPagesMap = Awaited<ReturnType<typeof getCustomPagesById>>;
|
|
70
|
+
|
|
58
71
|
const processAutoGeneratedDirectory = async (
|
|
59
72
|
directory: string,
|
|
60
73
|
label: string,
|
|
61
74
|
badge?: Badge,
|
|
62
|
-
collapsed?: boolean
|
|
75
|
+
collapsed?: boolean,
|
|
76
|
+
customPages?: CustomPagesMap
|
|
63
77
|
): Promise<SidebarItem> => {
|
|
78
|
+
customPages ??= await getCustomPagesById();
|
|
64
79
|
// @ts-ignore
|
|
65
80
|
const items = fs.readdirSync(path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory));
|
|
66
81
|
|
|
@@ -78,7 +93,7 @@ const processAutoGeneratedDirectory = async (
|
|
|
78
93
|
// Normalize path separators for cross-platform compatibility
|
|
79
94
|
// Note: Astro's glob loader strips '/index' from the ID, so docs/foo/index.mdx becomes docs/foo
|
|
80
95
|
const astroId = data.slug || path.join(DOCS_DIR, directory).replace(/\\/g, '/');
|
|
81
|
-
const entry =
|
|
96
|
+
const entry = customPages.get(astroId.toLowerCase());
|
|
82
97
|
|
|
83
98
|
if (entry) {
|
|
84
99
|
// Use the index file's slug as the folder's link target
|
|
@@ -101,7 +116,8 @@ const processAutoGeneratedDirectory = async (
|
|
|
101
116
|
path.join(directory, item),
|
|
102
117
|
item, // Use directory name as label
|
|
103
118
|
undefined, // No badge for subdirectories
|
|
104
|
-
collapsed // Inherit collapsed state
|
|
119
|
+
collapsed, // Inherit collapsed state
|
|
120
|
+
customPages
|
|
105
121
|
);
|
|
106
122
|
// Only add the directory if it contains valid items (mdx/md files) or has a slug (index file)
|
|
107
123
|
if ((subdirResult.items && subdirResult.items.length > 0) || subdirResult.slug) {
|
|
@@ -115,7 +131,7 @@ const processAutoGeneratedDirectory = async (
|
|
|
115
131
|
// Normalize path separators to forward slashes for cross-platform compatibility (Windows uses backslashes)
|
|
116
132
|
const astroId =
|
|
117
133
|
data.slug || path.join(DOCS_DIR, directory, item).replace('.mdx', '').replace('.md', '').replace(/\\/g, '/');
|
|
118
|
-
const entry =
|
|
134
|
+
const entry = customPages.get(astroId.toLowerCase());
|
|
119
135
|
|
|
120
136
|
if (entry) {
|
|
121
137
|
allItems.push({
|
|
@@ -138,7 +154,8 @@ const processAutoGeneratedDirectory = async (
|
|
|
138
154
|
/**
|
|
139
155
|
* Recursively process sidebar items to handle auto-generated content at any nesting level
|
|
140
156
|
*/
|
|
141
|
-
const processSidebarItems = async (items: SideBarConfigurationItem[]): Promise<SidebarItem[]> => {
|
|
157
|
+
const processSidebarItems = async (items: SideBarConfigurationItem[], customPages?: CustomPagesMap): Promise<SidebarItem[]> => {
|
|
158
|
+
customPages ??= await getCustomPagesById();
|
|
142
159
|
const processedItems: SidebarItem[] = [];
|
|
143
160
|
|
|
144
161
|
for (const item of items) {
|
|
@@ -148,13 +165,14 @@ const processSidebarItems = async (items: SideBarConfigurationItem[]): Promise<S
|
|
|
148
165
|
item.autogenerated.directory,
|
|
149
166
|
item.label,
|
|
150
167
|
item.badge,
|
|
151
|
-
item.autogenerated.collapsed !== undefined ? item.autogenerated.collapsed : item.collapsed
|
|
168
|
+
item.autogenerated.collapsed !== undefined ? item.autogenerated.collapsed : item.collapsed,
|
|
169
|
+
customPages
|
|
152
170
|
);
|
|
153
171
|
processedItems.push(processedItem);
|
|
154
172
|
}
|
|
155
173
|
// If item has nested items, process them recursively
|
|
156
174
|
else if (item.items && item.items.length > 0) {
|
|
157
|
-
const processedNestedItems = await processSidebarItems(item.items);
|
|
175
|
+
const processedNestedItems = await processSidebarItems(item.items, customPages);
|
|
158
176
|
processedItems.push({
|
|
159
177
|
label: item.label,
|
|
160
178
|
slug: item.slug,
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "3.
|
|
10
|
+
"version": "3.34.0",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@ai-sdk/react": "^3.0.17",
|
|
25
|
-
"@astrojs/markdown-remark": "^7.
|
|
26
|
-
"@astrojs/mdx": "^5.0.
|
|
27
|
-
"@astrojs/node": "^10.0
|
|
28
|
-
"@astrojs/react": "^5.0.
|
|
25
|
+
"@astrojs/markdown-remark": "^7.1.1",
|
|
26
|
+
"@astrojs/mdx": "^5.0.4",
|
|
27
|
+
"@astrojs/node": "^10.1.0",
|
|
28
|
+
"@astrojs/react": "^5.0.4",
|
|
29
29
|
"@astrojs/rss": "^4.0.18",
|
|
30
30
|
"@asyncapi/avro-schema-parser": "3.0.24",
|
|
31
31
|
"@asyncapi/parser": "^3.6.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@tanstack/react-table": "^8.17.3",
|
|
52
52
|
"@xyflow/react": "^12.3.6",
|
|
53
53
|
"ai": "^6.0.17",
|
|
54
|
-
"astro": "^6.
|
|
54
|
+
"astro": "^6.3.1",
|
|
55
55
|
"astro-compress": "^2.4.0",
|
|
56
56
|
"astro-expressive-code": "^0.41.7",
|
|
57
57
|
"astro-seo": "^0.8.4",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"elkjs": "^0.10.0",
|
|
69
69
|
"glob": "^13.0.6",
|
|
70
70
|
"gray-matter": "^4.0.3",
|
|
71
|
-
"hono": "4.12.
|
|
71
|
+
"hono": "4.12.16",
|
|
72
72
|
"html-to-image": "^1.11.11",
|
|
73
73
|
"js-yaml": "^4.1.1",
|
|
74
74
|
"jsonpath-plus": "^10.4.0",
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
"update-notifier": "^7.3.1",
|
|
106
106
|
"uuid": "^10.0.0",
|
|
107
107
|
"zod": "^4.3.6",
|
|
108
|
-
"@eventcatalog/linter": "1.0.22",
|
|
109
108
|
"@eventcatalog/sdk": "2.21.0",
|
|
109
|
+
"@eventcatalog/linter": "1.0.22",
|
|
110
110
|
"@eventcatalog/visualiser": "^3.20.0"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@astrojs/check": "^0.9.
|
|
113
|
+
"@astrojs/check": "^0.9.9",
|
|
114
114
|
"@types/dagre": "^0.7.52",
|
|
115
115
|
"@types/diff": "^5.2.2",
|
|
116
116
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"@types/lodash.merge": "4.6.9",
|
|
120
120
|
"@types/node": "^20.14.2",
|
|
121
121
|
"@types/pako": "^2.0.3",
|
|
122
|
-
"@types/react": "^
|
|
123
|
-
"@types/react-dom": "^
|
|
122
|
+
"@types/react": "^19.2.13",
|
|
123
|
+
"@types/react-dom": "^19.2.3",
|
|
124
124
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
125
125
|
"@types/semver": "^7.5.8",
|
|
126
126
|
"@types/shelljs": "^0.8.15",
|