@eventcatalog/core 2.65.0-beta.0 → 2.65.0-beta.2
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/README.md +2 -1
- 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-GGFP7ZBX.js → chunk-BY4A6ISY.js} +1 -1
- package/dist/{chunk-2ZXSFW7J.js → chunk-HH3PA5HC.js} +1 -1
- package/dist/{chunk-6MJGAOPK.js → chunk-TXHHRRSK.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +7 -1
- package/dist/eventcatalog.js +9 -3
- package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +39 -23
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<h4>Features: Documentation for Event Driven Architectures, Integration with any broker, Generator from your OpenAPI and AsyncAPI documents, Docs and Code, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
|
|
35
35
|
|
|
36
36
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
37
|
-
[](#contributors-)
|
|
38
38
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
39
39
|
|
|
40
40
|
[Read the Docs](https://www.eventcatalog.dev/docs/development/getting-started/introduction) | [View Demo](https://demo.eventcatalog.dev)
|
|
@@ -272,6 +272,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
272
272
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/reisingerf"><img src="https://avatars.githubusercontent.com/u/31906163?v=4?s=100" width="100px;" alt="reisingerf"/><br /><sub><b>reisingerf</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=reisingerf" title="Documentation">📖</a></td>
|
|
273
273
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jbarette-rossel"><img src="https://avatars.githubusercontent.com/u/162966566?v=4?s=100" width="100px;" alt="Jonathan Barette"/><br /><sub><b>Jonathan Barette</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=jbarette-rossel" title="Code">💻</a></td>
|
|
274
274
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mumundum"><img src="https://avatars.githubusercontent.com/u/196062898?v=4?s=100" width="100px;" alt="mumundum"/><br /><sub><b>mumundum</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=mumundum" title="Code">💻</a></td>
|
|
275
|
+
<td align="center" valign="top" width="14.28%"><a href="https://www.argonus.tech"><img src="https://avatars.githubusercontent.com/u/9743549?v=4?s=100" width="100px;" alt="Piotr Rybarczyk"/><br /><sub><b>Piotr Rybarczyk</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/issues?q=author%3AArgonus" title="Bug reports">🐛</a></td>
|
|
275
276
|
</tr>
|
|
276
277
|
</tbody>
|
|
277
278
|
</table>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BY4A6ISY.js";
|
|
4
|
+
import "../chunk-HH3PA5HC.js";
|
|
5
|
+
import "../chunk-TXHHRRSK.js";
|
|
6
6
|
import "../chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
157
157
|
var import_os = __toESM(require("os"), 1);
|
|
158
158
|
|
|
159
159
|
// package.json
|
|
160
|
-
var version = "2.65.0-beta.
|
|
160
|
+
var version = "2.65.0-beta.2";
|
|
161
161
|
|
|
162
162
|
// src/constants.ts
|
|
163
163
|
var VERSION = version;
|
|
@@ -674,6 +674,12 @@ var copyServerFiles = async () => {
|
|
|
674
674
|
import_fs2.default.rmSync((0, import_node_path7.join)(core, "src/pages/api/server"), { recursive: true });
|
|
675
675
|
}
|
|
676
676
|
if (!isServerOutput) {
|
|
677
|
+
if (import_fs2.default.existsSync((0, import_node_path7.join)(core, "src/pages/api/chat.ts"))) {
|
|
678
|
+
import_fs2.default.rmSync((0, import_node_path7.join)(core, "src/pages/api/chat.ts"));
|
|
679
|
+
}
|
|
680
|
+
if (import_fs2.default.existsSync((0, import_node_path7.join)(core, "src/pages/api/[...auth].ts"))) {
|
|
681
|
+
import_fs2.default.rmSync((0, import_node_path7.join)(core, "src/pages/api/[...auth].ts"));
|
|
682
|
+
}
|
|
677
683
|
return;
|
|
678
684
|
}
|
|
679
685
|
import_fs2.default.cpSync((0, import_node_path7.join)(eventCatalogDir, "src/enterprise/eventcatalog-chat/pages/api"), (0, import_node_path7.join)(core, "src/pages/api"), {
|
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-BY4A6ISY.js";
|
|
10
|
+
import "./chunk-HH3PA5HC.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrations
|
|
13
13
|
} from "./chunk-BH3JMNAV.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import "./chunk-55D645EH.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TXHHRRSK.js";
|
|
23
23
|
import {
|
|
24
24
|
getProjectOutDir,
|
|
25
25
|
isAuthEnabled,
|
|
@@ -80,6 +80,12 @@ var copyServerFiles = async () => {
|
|
|
80
80
|
fs.rmSync(join(core, "src/pages/api/server"), { recursive: true });
|
|
81
81
|
}
|
|
82
82
|
if (!isServerOutput) {
|
|
83
|
+
if (fs.existsSync(join(core, "src/pages/api/chat.ts"))) {
|
|
84
|
+
fs.rmSync(join(core, "src/pages/api/chat.ts"));
|
|
85
|
+
}
|
|
86
|
+
if (fs.existsSync(join(core, "src/pages/api/[...auth].ts"))) {
|
|
87
|
+
fs.rmSync(join(core, "src/pages/api/[...auth].ts"));
|
|
88
|
+
}
|
|
83
89
|
return;
|
|
84
90
|
}
|
|
85
91
|
fs.cpSync(join(eventCatalogDir, "src/enterprise/eventcatalog-chat/pages/api"), join(core, "src/pages/api"), {
|
|
@@ -24,8 +24,8 @@ function formatAvroType(type: any): string {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if (Array.isArray(type)) {
|
|
27
|
-
// Union type - show all options
|
|
28
|
-
return type.join(' | ');
|
|
27
|
+
// Union type - show all options, properly formatting each member
|
|
28
|
+
return type.map((t) => formatAvroType(t)).join(' | ');
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
if (typeof type === 'object') {
|
|
@@ -52,9 +52,16 @@ function formatAvroType(type: any): string {
|
|
|
52
52
|
|
|
53
53
|
// Check if a type has nested fields
|
|
54
54
|
function hasNestedFields(type: any): boolean {
|
|
55
|
+
// Check if it's a direct record type
|
|
55
56
|
if (typeof type === 'object' && !Array.isArray(type)) {
|
|
56
57
|
return type.type === 'record' && type.fields && type.fields.length > 0;
|
|
57
58
|
}
|
|
59
|
+
|
|
60
|
+
// Check if it's a union type that contains a record
|
|
61
|
+
if (Array.isArray(type)) {
|
|
62
|
+
return type.some((t) => typeof t === 'object' && !Array.isArray(t) && t.type === 'record' && t.fields && t.fields.length > 0);
|
|
63
|
+
}
|
|
64
|
+
|
|
58
65
|
return false;
|
|
59
66
|
}
|
|
60
67
|
|
|
@@ -84,6 +91,14 @@ function isFieldRequired(field: any): boolean {
|
|
|
84
91
|
return true;
|
|
85
92
|
}
|
|
86
93
|
|
|
94
|
+
// Helper function to get the record type from a union if it exists
|
|
95
|
+
function getRecordFromUnion(type: any): any {
|
|
96
|
+
if (Array.isArray(type)) {
|
|
97
|
+
return type.find((t) => typeof t === 'object' && !Array.isArray(t) && t.type === 'record');
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
87
102
|
// AvroField component - displays a single field with nested support
|
|
88
103
|
const AvroField = ({ field, level, expand, showRequired }: AvroFieldProps) => {
|
|
89
104
|
const [isExpanded, setIsExpanded] = useState(expand);
|
|
@@ -91,34 +106,35 @@ const AvroField = ({ field, level, expand, showRequired }: AvroFieldProps) => {
|
|
|
91
106
|
const indentClass = `pl-${level * 4}`;
|
|
92
107
|
const isRequired = showRequired ? isFieldRequired(field) : undefined;
|
|
93
108
|
|
|
109
|
+
// Get the record type, either directly or from within a union
|
|
110
|
+
const recordType = typeof field.type === 'object' && field.type.type === 'record' ? field.type : getRecordFromUnion(field.type);
|
|
111
|
+
|
|
94
112
|
useEffect(() => {
|
|
95
113
|
setIsExpanded(expand);
|
|
96
114
|
}, [expand]);
|
|
97
115
|
|
|
98
116
|
return (
|
|
99
117
|
<div className={`avro-field-container mb-2 border-l border-gray-200 ${indentClass}`}>
|
|
100
|
-
<div className="flex
|
|
118
|
+
<div className="flex space-x-2">
|
|
101
119
|
{/* Collapse/Expand button */}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
<div className="flex-shrink-0 w-4 pt-0.5">
|
|
121
|
+
{hasNested ? (
|
|
122
|
+
<button
|
|
123
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
124
|
+
className="avro-field-toggle text-gray-500 hover:text-gray-700 w-4 text-center"
|
|
125
|
+
aria-expanded={isExpanded}
|
|
126
|
+
>
|
|
127
|
+
<span className="font-mono text-xs">{isExpanded ? '▼' : '▶'}</span>
|
|
128
|
+
</button>
|
|
129
|
+
) : null}
|
|
130
|
+
</div>
|
|
113
131
|
|
|
114
132
|
{/* Field details */}
|
|
115
|
-
<div className="flex-grow">
|
|
116
|
-
<div className="flex
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
{showRequired && isRequired && <span className="text-red-600 text-xs ml-3 flex-shrink-0">required</span>}
|
|
133
|
+
<div className="flex-grow min-w-0">
|
|
134
|
+
<div className="flex flex-wrap items-baseline gap-x-1.5 gap-y-1">
|
|
135
|
+
<span className="avro-field-name font-semibold text-gray-800 text-sm">{field.name}</span>
|
|
136
|
+
<span className="text-purple-600 font-mono text-xs">{formatAvroType(field.type)}</span>
|
|
137
|
+
{showRequired && isRequired && <span className="text-red-600 text-xs ml-auto flex-shrink-0">required</span>}
|
|
122
138
|
</div>
|
|
123
139
|
|
|
124
140
|
{field.doc && <p className="text-gray-600 text-xs mt-1">{field.doc}</p>}
|
|
@@ -136,9 +152,9 @@ const AvroField = ({ field, level, expand, showRequired }: AvroFieldProps) => {
|
|
|
136
152
|
)}
|
|
137
153
|
|
|
138
154
|
{/* Nested fields for record types */}
|
|
139
|
-
{hasNested && (
|
|
155
|
+
{hasNested && recordType && (
|
|
140
156
|
<div className={`avro-nested-content mt-2 ${!isExpanded ? 'hidden' : ''}`}>
|
|
141
|
-
{
|
|
157
|
+
{recordType.fields.map((nestedField: any) => (
|
|
142
158
|
<AvroField
|
|
143
159
|
key={nestedField.name}
|
|
144
160
|
field={nestedField}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/event-catalog/eventcatalog.git"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"version": "2.65.0-beta.
|
|
9
|
+
"version": "2.65.0-beta.2",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@ai-sdk/google": "^2.0.17",
|
|
26
26
|
"@ai-sdk/openai": "^2.0.42",
|
|
27
27
|
"@ai-sdk/react": "^2.0.60",
|
|
28
|
-
"@astrojs/markdown-remark": "^6.3.
|
|
29
|
-
"@astrojs/mdx": "^4.3.
|
|
30
|
-
"@astrojs/node": "^9.5.
|
|
31
|
-
"@astrojs/react": "^4.4.
|
|
32
|
-
"@astrojs/rss": "^4.0.
|
|
28
|
+
"@astrojs/markdown-remark": "^6.3.9",
|
|
29
|
+
"@astrojs/mdx": "^4.3.12",
|
|
30
|
+
"@astrojs/node": "^9.5.1",
|
|
31
|
+
"@astrojs/react": "^4.4.2",
|
|
32
|
+
"@astrojs/rss": "^4.0.14",
|
|
33
33
|
"@astrojs/tailwind": "^6.0.2",
|
|
34
34
|
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
35
35
|
"@asyncapi/parser": "^3.4.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@tanstack/react-table": "^8.17.3",
|
|
57
57
|
"@xyflow/react": "^12.3.6",
|
|
58
58
|
"ai": "^5.0.60",
|
|
59
|
-
"astro": "^5.
|
|
59
|
+
"astro": "^5.16.0",
|
|
60
60
|
"astro-compress": "^2.3.8",
|
|
61
61
|
"astro-expressive-code": "^0.41.3",
|
|
62
62
|
"astro-seo": "^0.8.4",
|