@eventcatalog/core 3.12.0 → 3.12.1
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-LXOS3MXQ.js → chunk-CFS3H2TO.js} +1 -1
- package/dist/{chunk-VUBZ6A7B.js → chunk-GCMDVAHX.js} +1 -1
- package/dist/{chunk-G7GG3HEB.js → chunk-J3WNJQ6H.js} +1 -1
- package/dist/{chunk-K44BXVHU.js → chunk-PPMGCQGC.js} +1 -1
- package/dist/{chunk-WVKLG26T.js → chunk-Y74D3CJA.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/enterprise/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +52 -20
- package/eventcatalog/src/enterprise/custom-documentation/utils/custom-docs.ts +32 -3
- package/eventcatalog/src/enterprise/mcp/mcp-server.ts +3 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GCMDVAHX.js";
|
|
4
|
+
import "../chunk-PPMGCQGC.js";
|
|
5
5
|
import "../chunk-4UVFXLPI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-J3WNJQ6H.js";
|
|
7
7
|
import "../chunk-UPONRQSN.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
|
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
109
109
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
110
110
|
|
|
111
111
|
// package.json
|
|
112
|
-
var version = "3.12.
|
|
112
|
+
var version = "3.12.1";
|
|
113
113
|
|
|
114
114
|
// src/constants.ts
|
|
115
115
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-GCMDVAHX.js";
|
|
10
|
+
import "./chunk-PPMGCQGC.js";
|
|
11
11
|
import "./chunk-4UVFXLPI.js";
|
|
12
12
|
import {
|
|
13
13
|
runMigrations
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
} from "./chunk-5VBIXL6C.js";
|
|
23
23
|
import {
|
|
24
24
|
generate
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CFS3H2TO.js";
|
|
26
26
|
import {
|
|
27
27
|
logger
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Y74D3CJA.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-J3WNJQ6H.js";
|
|
32
32
|
import "./chunk-UPONRQSN.js";
|
|
33
33
|
|
|
34
34
|
// src/eventcatalog.ts
|
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-CFS3H2TO.js";
|
|
4
|
+
import "./chunk-Y74D3CJA.js";
|
|
5
|
+
import "./chunk-J3WNJQ6H.js";
|
|
6
6
|
import "./chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -24,6 +24,11 @@ const NestedItem: React.FC<NestedItemProps> = ({
|
|
|
24
24
|
const itemId = `${parentId}-${itemIndex}`;
|
|
25
25
|
|
|
26
26
|
if (hasNestedItems && item.items) {
|
|
27
|
+
// Check if folder has an index file (slug) making it clickable
|
|
28
|
+
const folderHasLink = !!item.slug;
|
|
29
|
+
const folderPath = folderHasLink ? buildUrl(`/docs/custom/${item.slug}`) : undefined;
|
|
30
|
+
const isFolderActive = folderPath && (currentPath === folderPath || currentPath.endsWith(`/${item.slug}`));
|
|
31
|
+
|
|
27
32
|
return (
|
|
28
33
|
<div className="py-1">
|
|
29
34
|
<div className="flex items-center">
|
|
@@ -49,26 +54,53 @@ const NestedItem: React.FC<NestedItemProps> = ({
|
|
|
49
54
|
</svg>
|
|
50
55
|
</div>
|
|
51
56
|
</button>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
{folderHasLink ? (
|
|
58
|
+
// Folder has an index file - render as clickable link
|
|
59
|
+
<a
|
|
60
|
+
href={folderPath}
|
|
61
|
+
className={`flex items-center px-2 py-1 text-xs font-medium rounded-md min-w-0 flex-1 ${
|
|
62
|
+
isFolderActive
|
|
63
|
+
? 'bg-[rgb(var(--ec-accent-subtle))] text-[rgb(var(--ec-page-text))] font-semibold'
|
|
64
|
+
: 'text-[rgb(var(--ec-page-text-muted))] hover:bg-[rgb(var(--ec-content-hover))]'
|
|
65
|
+
}`}
|
|
66
|
+
data-active={isFolderActive}
|
|
67
|
+
>
|
|
68
|
+
<span className="truncate">{item.label}</span>
|
|
69
|
+
{item.badge && item?.badge?.text && (
|
|
70
|
+
<span
|
|
71
|
+
className={
|
|
72
|
+
item.badge.color
|
|
73
|
+
? `text-${item.badge.color}-600 dark:text-${item.badge.color}-400 ml-2 text-[10px] font-medium bg-${item.badge.color}-50 dark:bg-${item.badge.color}-500/20 px-2 py-0.5 rounded uppercase`
|
|
74
|
+
: `text-[rgb(var(--ec-accent))] ml-2 text-[10px] font-medium bg-[rgb(var(--ec-accent-subtle))] px-2 py-0.5 rounded uppercase`
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
{item.badge.text}
|
|
78
|
+
</span>
|
|
79
|
+
)}
|
|
80
|
+
</a>
|
|
81
|
+
) : (
|
|
82
|
+
// Folder without index file - render as toggle button
|
|
83
|
+
<button
|
|
84
|
+
className="flex items-center px-2 py-1 text-xs font-medium text-[rgb(var(--ec-page-text-muted))] rounded-md hover:bg-[rgb(var(--ec-content-hover))] min-w-0 flex-1"
|
|
85
|
+
onClick={(e) => {
|
|
86
|
+
e.stopPropagation();
|
|
87
|
+
toggleGroupCollapse(`nested-${itemId}`);
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
<span className="truncate">{item.label}</span>
|
|
91
|
+
{item.badge && item?.badge?.text && (
|
|
92
|
+
<span
|
|
93
|
+
className={
|
|
94
|
+
item.badge.color
|
|
95
|
+
? `text-${item.badge.color}-600 dark:text-${item.badge.color}-400 ml-2 text-[10px] font-medium bg-${item.badge.color}-50 dark:bg-${item.badge.color}-500/20 px-2 py-0.5 rounded uppercase`
|
|
96
|
+
: `text-[rgb(var(--ec-accent))] ml-2 text-[10px] font-medium bg-[rgb(var(--ec-accent-subtle))] px-2 py-0.5 rounded uppercase`
|
|
97
|
+
}
|
|
98
|
+
>
|
|
99
|
+
{item.badge.text}
|
|
100
|
+
</span>
|
|
101
|
+
)}
|
|
102
|
+
</button>
|
|
103
|
+
)}
|
|
72
104
|
</div>
|
|
73
105
|
|
|
74
106
|
<div
|
|
@@ -47,6 +47,8 @@ const DOCS_DIR = 'docs';
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Processes auto-generated directory and returns navigation items
|
|
50
|
+
* If an index.mdx or index.md file exists in the directory, it will be used as the
|
|
51
|
+
* folder's link target (making the folder clickable) and excluded from the items list.
|
|
50
52
|
*/
|
|
51
53
|
const processAutoGeneratedDirectory = async (
|
|
52
54
|
directory: string,
|
|
@@ -58,8 +60,33 @@ const processAutoGeneratedDirectory = async (
|
|
|
58
60
|
const items = fs.readdirSync(path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory));
|
|
59
61
|
|
|
60
62
|
const allItems: SidebarItem[] = [];
|
|
63
|
+
let folderSlug: string | undefined;
|
|
64
|
+
|
|
65
|
+
// Check for index file first (index.mdx or index.md)
|
|
66
|
+
const indexFile = items.find((item: string) => item === 'index.mdx' || item === 'index.md');
|
|
67
|
+
|
|
68
|
+
if (indexFile) {
|
|
69
|
+
const indexPath = path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory, indexFile);
|
|
70
|
+
const content = fs.readFileSync(indexPath, 'utf8');
|
|
71
|
+
const { data } = matter(content);
|
|
72
|
+
|
|
73
|
+
// Normalize path separators for cross-platform compatibility
|
|
74
|
+
// Note: Astro's glob loader strips '/index' from the ID, so docs/foo/index.mdx becomes docs/foo
|
|
75
|
+
const astroId = data.slug || path.join(DOCS_DIR, directory).replace(/\\/g, '/');
|
|
76
|
+
const entry = await getEntry('customPages', astroId.toLowerCase());
|
|
77
|
+
|
|
78
|
+
if (entry) {
|
|
79
|
+
// Use the index file's slug as the folder's link target
|
|
80
|
+
folderSlug = entry.data.slug || entry.id.replace(DOCS_DIR, '');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
61
83
|
|
|
62
84
|
for (const item of items) {
|
|
85
|
+
// Skip index files - they're used for the folder link, not as child items
|
|
86
|
+
if (item === 'index.mdx' || item === 'index.md') {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
|
|
63
90
|
const fullPath = path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory, item);
|
|
64
91
|
const isDirectory = fs.statSync(fullPath).isDirectory();
|
|
65
92
|
|
|
@@ -71,8 +98,8 @@ const processAutoGeneratedDirectory = async (
|
|
|
71
98
|
undefined, // No badge for subdirectories
|
|
72
99
|
collapsed // Inherit collapsed state
|
|
73
100
|
);
|
|
74
|
-
// Only add the directory if it contains valid items (mdx/md files)
|
|
75
|
-
if (subdirResult.items && subdirResult.items.length > 0) {
|
|
101
|
+
// Only add the directory if it contains valid items (mdx/md files) or has a slug (index file)
|
|
102
|
+
if ((subdirResult.items && subdirResult.items.length > 0) || subdirResult.slug) {
|
|
76
103
|
allItems.push(subdirResult);
|
|
77
104
|
}
|
|
78
105
|
} else {
|
|
@@ -81,7 +108,8 @@ const processAutoGeneratedDirectory = async (
|
|
|
81
108
|
const { data } = matter(content);
|
|
82
109
|
|
|
83
110
|
// Normalize path separators to forward slashes for cross-platform compatibility (Windows uses backslashes)
|
|
84
|
-
const astroId =
|
|
111
|
+
const astroId =
|
|
112
|
+
data.slug || path.join(DOCS_DIR, directory, item).replace('.mdx', '').replace('.md', '').replace(/\\/g, '/');
|
|
85
113
|
const entry = await getEntry('customPages', astroId.toLowerCase());
|
|
86
114
|
|
|
87
115
|
if (entry) {
|
|
@@ -97,6 +125,7 @@ const processAutoGeneratedDirectory = async (
|
|
|
97
125
|
label,
|
|
98
126
|
badge,
|
|
99
127
|
collapsed,
|
|
128
|
+
...(folderSlug && { slug: folderSlug }),
|
|
100
129
|
items: allItems,
|
|
101
130
|
};
|
|
102
131
|
};
|
|
@@ -283,7 +283,8 @@ function createMcpServer() {
|
|
|
283
283
|
if (!toolConfig || typeof toolConfig !== 'object') continue;
|
|
284
284
|
|
|
285
285
|
// Extract tool properties (Vercel AI SDK format)
|
|
286
|
-
|
|
286
|
+
// The AI SDK tool() helper uses "inputSchema" for Zod schemas
|
|
287
|
+
const { description, parameters, inputSchema, execute } = toolConfig;
|
|
287
288
|
|
|
288
289
|
if (!description || !execute) {
|
|
289
290
|
console.warn(`[MCP] Skipping invalid extended tool: ${toolName}`);
|
|
@@ -294,7 +295,7 @@ function createMcpServer() {
|
|
|
294
295
|
toolName,
|
|
295
296
|
{
|
|
296
297
|
description: description || `Custom tool: ${toolName}`,
|
|
297
|
-
inputSchema: parameters || z.object({}),
|
|
298
|
+
inputSchema: inputSchema || parameters || z.object({}),
|
|
298
299
|
},
|
|
299
300
|
async (params: any) => {
|
|
300
301
|
try {
|