@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.
@@ -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.33.0";
40
+ var version = "3.34.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-TDRDRXOZ.js";
4
- import "../chunk-YKTTWB2P.js";
3
+ } from "../chunk-IO6EMN5C.js";
4
+ import "../chunk-623CFR4T.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -111,7 +111,7 @@ var import_axios = __toESM(require("axios"), 1);
111
111
  var import_os = __toESM(require("os"), 1);
112
112
 
113
113
  // package.json
114
- var version = "3.33.0";
114
+ var version = "3.34.0";
115
115
 
116
116
  // src/constants.ts
117
117
  var VERSION = version;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-GBSBBBF5.js";
4
- import "../chunk-TDRDRXOZ.js";
3
+ } from "../chunk-BJWMR3ZH.js";
4
+ import "../chunk-IO6EMN5C.js";
5
5
  import "../chunk-4UVFXLPI.js";
6
- import "../chunk-YKTTWB2P.js";
6
+ import "../chunk-623CFR4T.js";
7
7
  import "../chunk-5T63CXKU.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.33.0";
2
+ var version = "3.34.0";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-TDRDRXOZ.js";
3
+ } from "./chunk-IO6EMN5C.js";
4
4
  import {
5
5
  countResources,
6
6
  serializeCounts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-YKTTWB2P.js";
3
+ } from "./chunk-623CFR4T.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-YKTTWB2P.js";
3
+ } from "./chunk-623CFR4T.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
  logger
3
- } from "./chunk-DN6F4AAQ.js";
3
+ } from "./chunk-K5AM6PPU.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "3.33.0";
28
+ var version = "3.34.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-YKTTWB2P.js";
3
+ } from "./chunk-623CFR4T.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -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.33.0";
117
+ var version = "3.34.0";
118
118
 
119
119
  // src/constants.ts
120
120
  var VERSION = version;
@@ -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-VRXBFCYB.js";
25
+ } from "./chunk-PP7EDIPX.js";
26
26
  import {
27
27
  logger
28
- } from "./chunk-DN6F4AAQ.js";
28
+ } from "./chunk-K5AM6PPU.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-YKTTWB2P.js";
31
+ } from "./chunk-623CFR4T.js";
32
32
  import {
33
33
  getEventCatalogConfigFile,
34
34
  verifyRequiredFieldsAreInCatalogConfigFile
package/dist/generate.cjs CHANGED
@@ -78,7 +78,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
78
78
  var import_picocolors = __toESM(require("picocolors"), 1);
79
79
 
80
80
  // package.json
81
- var version = "3.33.0";
81
+ var version = "3.34.0";
82
82
 
83
83
  // src/constants.ts
84
84
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-VRXBFCYB.js";
4
- import "./chunk-DN6F4AAQ.js";
5
- import "./chunk-YKTTWB2P.js";
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
@@ -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.33.0";
39
+ var version = "3.34.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-DN6F4AAQ.js";
4
- import "../chunk-YKTTWB2P.js";
3
+ } from "../chunk-K5AM6PPU.js";
4
+ import "../chunk-623CFR4T.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -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 { getEntry } from 'astro:content';
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 = await getEntry('customPages', astroId.toLowerCase());
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 = await getEntry('customPages', astroId.toLowerCase());
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.33.0",
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.0.1",
26
- "@astrojs/mdx": "^5.0.2",
27
- "@astrojs/node": "^10.0.5",
28
- "@astrojs/react": "^5.0.1",
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.0.8",
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.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.8",
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": "^18.3.3",
123
- "@types/react-dom": "^18.3.0",
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",