@eventcatalog/core 4.8.4 → 4.9.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-FQEK3FUI.js → chunk-3CGSSMTK.js} +1 -1
- package/dist/{chunk-QB4W7ZUL.js → chunk-HKVOSQTD.js} +1 -1
- package/dist/{chunk-AATZMWL3.js → chunk-LVGQ23LR.js} +1 -1
- package/dist/{chunk-Y57SL3H3.js → chunk-MPHX5C7M.js} +1 -1
- package/dist/{chunk-EGWBSVND.js → chunk-XQHS36GO.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/components/MDX/SchemaViewer/schema-viewer-utils.spec.ts +3 -3
- package/eventcatalog/src/components/MDX/SchemaViewer/schema-viewer-utils.ts +2 -2
- package/eventcatalog/src/components/SchemaExplorer/useDarkMode.ts +13 -4
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +1 -1
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +2 -2
- package/eventcatalog/src/content.config.ts +1 -1
- package/eventcatalog/src/enterprise/api/schemas/[collection]/[id]/[version]/index.ts +3 -3
- package/eventcatalog/src/enterprise/tools/catalog-tools.ts +1 -1
- package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +3 -3
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/_index.data.ts +6 -4
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +1 -1
- package/eventcatalog/src/pages/schemas/explorer/_index.data.ts +2 -2
- package/eventcatalog/src/stores/sidebar-store/builders/message.ts +1 -1
- package/eventcatalog/src/stores/theme-store.ts +6 -3
- package/eventcatalog/src/utils/collections/schema-loader.ts +10 -8
- package/package.json +5 -4
|
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
140
140
|
var import_os = __toESM(require("os"), 1);
|
|
141
141
|
|
|
142
142
|
// package.json
|
|
143
|
-
var version = "4.
|
|
143
|
+
var version = "4.9.0";
|
|
144
144
|
|
|
145
145
|
// src/constants.ts
|
|
146
146
|
var VERSION = version;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-MPHX5C7M.js";
|
|
4
|
+
import "../chunk-HKVOSQTD.js";
|
|
5
5
|
import "../chunk-K2XIENVT.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-3CGSSMTK.js";
|
|
7
7
|
import "../chunk-6QENHZZP.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
|
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
144
144
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
145
145
|
|
|
146
146
|
// package.json
|
|
147
|
-
var version = "4.
|
|
147
|
+
var version = "4.9.0";
|
|
148
148
|
|
|
149
149
|
// src/constants.ts
|
|
150
150
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
import "./chunk-CA4U2JP7.js";
|
|
5
5
|
import {
|
|
6
6
|
log_build_default
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-MPHX5C7M.js";
|
|
8
|
+
import "./chunk-HKVOSQTD.js";
|
|
9
9
|
import "./chunk-K2XIENVT.js";
|
|
10
10
|
import {
|
|
11
11
|
FederationConflictError,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
} from "./chunk-B7HCX5HM.js";
|
|
32
32
|
import {
|
|
33
33
|
generate
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XQHS36GO.js";
|
|
35
35
|
import {
|
|
36
36
|
logger
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LVGQ23LR.js";
|
|
38
38
|
import {
|
|
39
39
|
resolve_catalog_dependencies_default
|
|
40
40
|
} from "./chunk-LHR4G2UO.js";
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import "./chunk-W5JQON7Z.js";
|
|
55
55
|
import {
|
|
56
56
|
VERSION
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-3CGSSMTK.js";
|
|
58
58
|
import {
|
|
59
59
|
linkCoreNodeModules,
|
|
60
60
|
resolveInstalledCoreNodeModules
|
package/dist/generate.cjs
CHANGED
|
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
108
108
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
109
109
|
|
|
110
110
|
// package.json
|
|
111
|
-
var version = "4.
|
|
111
|
+
var version = "4.9.0";
|
|
112
112
|
|
|
113
113
|
// src/constants.ts
|
|
114
114
|
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-XQHS36GO.js";
|
|
4
|
+
import "./chunk-LVGQ23LR.js";
|
|
5
|
+
import "./chunk-3CGSSMTK.js";
|
|
6
6
|
import "./chunk-6QENHZZP.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -9,7 +9,7 @@ const currentMessageSchema = {
|
|
|
9
9
|
content: '{"type":"object","title":"OrderPlaced"}',
|
|
10
10
|
default: true,
|
|
11
11
|
message: {
|
|
12
|
-
|
|
12
|
+
collectionName: 'events',
|
|
13
13
|
id: 'OrderPlaced',
|
|
14
14
|
version: '1.0.0',
|
|
15
15
|
},
|
|
@@ -42,7 +42,7 @@ describe('resolveSchemaViewer', () => {
|
|
|
42
42
|
content: 'syntax = "proto3";\nmessage FraudCheckCompleted {\n string transaction_id = 1;\n}',
|
|
43
43
|
default: true,
|
|
44
44
|
message: {
|
|
45
|
-
|
|
45
|
+
collectionName: 'events',
|
|
46
46
|
id: 'FraudCheckCompleted',
|
|
47
47
|
version: '1.0.0',
|
|
48
48
|
},
|
|
@@ -75,7 +75,7 @@ describe('resolveSchemaViewer', () => {
|
|
|
75
75
|
content: '{"this": "is not protobuf"}',
|
|
76
76
|
default: true,
|
|
77
77
|
message: {
|
|
78
|
-
|
|
78
|
+
collectionName: 'events',
|
|
79
79
|
id: 'FraudCheckCompleted',
|
|
80
80
|
version: '1.0.0',
|
|
81
81
|
},
|
|
@@ -29,7 +29,7 @@ type CollectionSchema = {
|
|
|
29
29
|
branch?: string;
|
|
30
30
|
};
|
|
31
31
|
message?: {
|
|
32
|
-
|
|
32
|
+
collectionName: string;
|
|
33
33
|
id: string;
|
|
34
34
|
version: string;
|
|
35
35
|
};
|
|
@@ -79,7 +79,7 @@ const getCollectionSchemaForViewer = ({
|
|
|
79
79
|
const resourceSchemas = collectionSchemas.filter((schema) => {
|
|
80
80
|
const message = schema.data.message;
|
|
81
81
|
if (!message) return false;
|
|
82
|
-
return message.
|
|
82
|
+
return message.collectionName === collection && message.id === id && message.version === version;
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
return resourceSchemas.find((schema) => schema.data.default) || resourceSchemas[0];
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { themeStore } from '@stores/theme-store';
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
import { DEFAULT_THEME, themeStore } from '@stores/theme-store';
|
|
3
|
+
|
|
4
|
+
const subscribe = (onChange: () => void) => themeStore.listen(onChange);
|
|
5
|
+
const getSnapshot = () => themeStore.get() === 'dark';
|
|
6
|
+
|
|
7
|
+
// On the client the store is initialised from localStorage before React hydrates, so it can
|
|
8
|
+
// already differ from the value the server rendered with. React 18 keeps the server's inline
|
|
9
|
+
// `style` attributes when they mismatch during hydration, which left dark-theme syntax colours
|
|
10
|
+
// (and text-shadow) on light-mode pages until the component remounted. Hydrate with the server
|
|
11
|
+
// value instead; React re-renders with the real client value straight after.
|
|
12
|
+
const getServerSnapshot = () => DEFAULT_THEME === 'dark';
|
|
3
13
|
|
|
4
14
|
export function useDarkMode(): boolean {
|
|
5
|
-
|
|
6
|
-
return theme === 'dark';
|
|
15
|
+
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
7
16
|
}
|
|
@@ -82,7 +82,7 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
82
82
|
filterFn: filterByName,
|
|
83
83
|
}),
|
|
84
84
|
|
|
85
|
-
columnHelper.accessor(
|
|
85
|
+
columnHelper.accessor((row) => row.data.source, {
|
|
86
86
|
id: 'source',
|
|
87
87
|
header: () => <span>{tableConfiguration.columns?.source?.label || 'Source'}</span>,
|
|
88
88
|
cell: (info) => <DirectorySourceCell source={info.getValue() as { provider: string; url?: string } | undefined} />,
|
|
@@ -85,7 +85,7 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
85
85
|
filterFn: filterByName,
|
|
86
86
|
}),
|
|
87
87
|
|
|
88
|
-
columnHelper.accessor(
|
|
88
|
+
columnHelper.accessor((row) => row.data.source, {
|
|
89
89
|
id: 'source',
|
|
90
90
|
header: () => <span>{tableConfiguration.columns?.source?.label || 'Source'}</span>,
|
|
91
91
|
cell: (info) => <DirectorySourceCell source={info.getValue() as { provider: string; url?: string } | undefined} />,
|
|
@@ -95,7 +95,7 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
95
95
|
},
|
|
96
96
|
}),
|
|
97
97
|
|
|
98
|
-
columnHelper.accessor(
|
|
98
|
+
columnHelper.accessor((row) => row.data.role, {
|
|
99
99
|
id: 'role',
|
|
100
100
|
header: () => <span>{tableConfiguration.columns?.role?.label || 'Role'}</span>,
|
|
101
101
|
cell: (info) => {
|
|
@@ -1179,7 +1179,7 @@ const schemas = defineCollection({
|
|
|
1179
1179
|
default: z.boolean().optional(),
|
|
1180
1180
|
latest: z.boolean().optional(),
|
|
1181
1181
|
message: z.object({
|
|
1182
|
-
|
|
1182
|
+
collectionName: z.enum(['events', 'commands', 'queries']),
|
|
1183
1183
|
id: z.string(),
|
|
1184
1184
|
name: z.string().optional(),
|
|
1185
1185
|
version: z.string(),
|
|
@@ -11,7 +11,7 @@ import { sortVersioned } from '@utils/collections/util';
|
|
|
11
11
|
const findSchema = async (collection: string | undefined, id: string, version: string | undefined) => {
|
|
12
12
|
const schemas = await getCollection('schemas');
|
|
13
13
|
const matchingSchemas = schemas.filter(
|
|
14
|
-
(schema) => schema.data.message.
|
|
14
|
+
(schema) => schema.data.message.collectionName === collection && schema.data.message.id === id
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
if (version === 'latest') {
|
|
@@ -30,7 +30,7 @@ export async function getStaticPaths() {
|
|
|
30
30
|
// Generate paths for specific versions
|
|
31
31
|
const versionedPaths = schemas.map((schema) => ({
|
|
32
32
|
params: {
|
|
33
|
-
collection: schema.data.message.
|
|
33
|
+
collection: schema.data.message.collectionName,
|
|
34
34
|
id: schema.data.message.id,
|
|
35
35
|
version: schema.data.message.version,
|
|
36
36
|
},
|
|
@@ -45,7 +45,7 @@ export async function getStaticPaths() {
|
|
|
45
45
|
.filter((schema) => schema.data.latest)
|
|
46
46
|
.map((latestSchema) => ({
|
|
47
47
|
params: {
|
|
48
|
-
collection: latestSchema.data.message.
|
|
48
|
+
collection: latestSchema.data.message.collectionName,
|
|
49
49
|
id: latestSchema.data.message.id,
|
|
50
50
|
version: 'latest',
|
|
51
51
|
},
|
|
@@ -310,7 +310,7 @@ export async function getSchemaForResource(params: { resourceId: string; resourc
|
|
|
310
310
|
const schemaEntries = await getCollection('schemas');
|
|
311
311
|
const schemas = schemaEntries.filter(
|
|
312
312
|
(schema) =>
|
|
313
|
-
schema.data.message.
|
|
313
|
+
schema.data.message.collectionName === params.resourceCollection &&
|
|
314
314
|
schema.data.message.id === params.resourceId &&
|
|
315
315
|
schema.data.message.version === params.resourceVersion
|
|
316
316
|
);
|
|
@@ -36,9 +36,9 @@ const getMessagesWithSchemas = (collection: MessageCollection) => {
|
|
|
36
36
|
const seenMessages = new Set<string>();
|
|
37
37
|
|
|
38
38
|
return schemas
|
|
39
|
-
.filter((schema) => schema.data.message.
|
|
39
|
+
.filter((schema) => schema.data.message.collectionName === collection)
|
|
40
40
|
.map((schema) => {
|
|
41
|
-
const key = `${schema.data.message.
|
|
41
|
+
const key = `${schema.data.message.collectionName}:${schema.data.message.id}:${schema.data.message.version}`;
|
|
42
42
|
if (seenMessages.has(key)) return null;
|
|
43
43
|
seenMessages.add(key);
|
|
44
44
|
|
|
@@ -63,7 +63,7 @@ export const GET: APIRoute = async ({ params, request }) => {
|
|
|
63
63
|
|
|
64
64
|
const formatVersionedItem = (item: (typeof schemas)[number]) => {
|
|
65
65
|
const message = item.data.message;
|
|
66
|
-
return `- [${message.name || message.id} - ${message.id} - ${message.version}](${baseUrl}/api/schemas/${message.
|
|
66
|
+
return `- [${message.name || message.id} - ${message.id} - ${message.version}](${baseUrl}/api/schemas/${message.collectionName}/${message.id}/${message.version})} ${message.summary ? `- ${message.summary.trim()}` : ''}`;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
const formatServiceWithSchema = (item: ServiceWithSchema) => {
|
|
@@ -32,7 +32,7 @@ export class Page extends HybridPage {
|
|
|
32
32
|
|
|
33
33
|
const seenMessageSchemas = new Set<string>();
|
|
34
34
|
const messageSchemas = schemas.filter((schema) => {
|
|
35
|
-
const key = `${schema.data.message.
|
|
35
|
+
const key = `${schema.data.message.collectionName}:${schema.data.message.id}:${schema.data.message.version}`;
|
|
36
36
|
if (seenMessageSchemas.has(key)) return false;
|
|
37
37
|
seenMessageSchemas.add(key);
|
|
38
38
|
return true;
|
|
@@ -41,17 +41,19 @@ export class Page extends HybridPage {
|
|
|
41
41
|
// Generate paths for messages with schemas
|
|
42
42
|
const messagePaths = messageSchemas
|
|
43
43
|
.map((schema) => {
|
|
44
|
-
const item = itemsByKey.get(
|
|
44
|
+
const item = itemsByKey.get(
|
|
45
|
+
`${schema.data.message.collectionName}:${schema.data.message.id}:${schema.data.message.version}`
|
|
46
|
+
);
|
|
45
47
|
if (!item) return null;
|
|
46
48
|
|
|
47
49
|
return {
|
|
48
50
|
params: {
|
|
49
|
-
type: schema.data.message.
|
|
51
|
+
type: schema.data.message.collectionName,
|
|
50
52
|
id: schema.data.message.id,
|
|
51
53
|
version: schema.data.message.version,
|
|
52
54
|
},
|
|
53
55
|
props: {
|
|
54
|
-
type: schema.data.message.
|
|
56
|
+
type: schema.data.message.collectionName,
|
|
55
57
|
...item,
|
|
56
58
|
// Not everything needs the body of the page itself.
|
|
57
59
|
body: undefined,
|
|
@@ -80,7 +80,7 @@ if (isDataProduct && contractPath) {
|
|
|
80
80
|
const [allItems, schemaEntries] = await Promise.all([pageDataLoader[type](), getCollection('schemas')]);
|
|
81
81
|
const versions = allItems.filter((item) => item.data.id === data.id);
|
|
82
82
|
const schemasForMessage = schemaEntries.filter(
|
|
83
|
-
(schema) => schema.data.message.
|
|
83
|
+
(schema) => schema.data.message.collectionName === type && schema.data.message.id === data.id
|
|
84
84
|
);
|
|
85
85
|
|
|
86
86
|
const getSchemaForVersion = (version: string) => {
|
|
@@ -48,7 +48,7 @@ async function fetchAllSchemas() {
|
|
|
48
48
|
const messagesWithSchemas = await Promise.all(
|
|
49
49
|
schemaEntries.map(async (schema) => {
|
|
50
50
|
const message = messagesBySchemaReference.get(
|
|
51
|
-
`${schema.data.message.
|
|
51
|
+
`${schema.data.message.collectionName}:${schema.data.message.id}:${schema.data.message.version}`
|
|
52
52
|
);
|
|
53
53
|
const schemaPath = schema.data.file || schema.data.source.path || '';
|
|
54
54
|
const schemaExtension = path.extname(schemaPath).slice(1) || schema.data.format;
|
|
@@ -95,7 +95,7 @@ async function fetchAllSchemas() {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
return {
|
|
98
|
-
collection: schema.data.message.
|
|
98
|
+
collection: schema.data.message.collectionName,
|
|
99
99
|
data: {
|
|
100
100
|
id: schema.data.message.id,
|
|
101
101
|
name: schema.data.message.name || schema.data.name || schema.data.message.id,
|
|
@@ -29,7 +29,7 @@ const getSchemasForMessage = (
|
|
|
29
29
|
) => {
|
|
30
30
|
return schemas.filter(
|
|
31
31
|
(schema) =>
|
|
32
|
-
schema.data.message.
|
|
32
|
+
schema.data.message.collectionName === message.collection &&
|
|
33
33
|
schema.data.message.id === message.data.id &&
|
|
34
34
|
schema.data.message.version === message.data.version
|
|
35
35
|
);
|
|
@@ -4,11 +4,14 @@ const THEME_KEY = 'eventcatalog-theme';
|
|
|
4
4
|
|
|
5
5
|
export type Theme = 'light' | 'dark';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// Default theme when the user has not explicitly chosen one. This is also the value the
|
|
8
|
+
// store holds during server rendering, so SSR-safe hooks must hydrate against it.
|
|
9
|
+
export const DEFAULT_THEME: Theme = 'dark';
|
|
10
|
+
|
|
11
|
+
export const themeStore = atom<Theme>(DEFAULT_THEME);
|
|
8
12
|
|
|
9
|
-
// Default theme when the user has not explicitly chosen one.
|
|
10
13
|
const getDefaultTheme = (): Theme => {
|
|
11
|
-
return
|
|
14
|
+
return DEFAULT_THEME;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
// Apply theme to document via data-theme attribute
|
|
@@ -76,7 +76,7 @@ export type MessageSchemaResource = {
|
|
|
76
76
|
default?: boolean;
|
|
77
77
|
latest?: boolean;
|
|
78
78
|
message: {
|
|
79
|
-
|
|
79
|
+
collectionName: MessageCollection;
|
|
80
80
|
id: string;
|
|
81
81
|
name?: string;
|
|
82
82
|
version: string;
|
|
@@ -131,8 +131,10 @@ const getSchemaFormat = (schemaPath: string) => {
|
|
|
131
131
|
return extension || 'unknown';
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
const buildGeneratedSchemaId = (
|
|
135
|
-
|
|
134
|
+
const buildGeneratedSchemaId = (
|
|
135
|
+
message: { collectionName: MessageCollection; id: string; version: string },
|
|
136
|
+
schemaPath: string
|
|
137
|
+
) => `schema:${message.collectionName}:${message.id}:${message.version}:${schemaPath}`;
|
|
136
138
|
|
|
137
139
|
const getSchemaCollectionId = ({
|
|
138
140
|
message,
|
|
@@ -140,7 +142,7 @@ const getSchemaCollectionId = ({
|
|
|
140
142
|
schemaRef,
|
|
141
143
|
schemaFile,
|
|
142
144
|
}: {
|
|
143
|
-
message: {
|
|
145
|
+
message: { collectionName: MessageCollection; id: string; version: string };
|
|
144
146
|
reference: SchemaReference;
|
|
145
147
|
schemaRef?: string;
|
|
146
148
|
schemaFile?: string;
|
|
@@ -249,7 +251,7 @@ const buildSchemaSourceErrorMessage = ({
|
|
|
249
251
|
source: SchemaSource;
|
|
250
252
|
error: unknown;
|
|
251
253
|
}) => {
|
|
252
|
-
const messageType = getMessageTypeLabel(schema.message.
|
|
254
|
+
const messageType = getMessageTypeLabel(schema.message.collectionName);
|
|
253
255
|
|
|
254
256
|
return [
|
|
255
257
|
'',
|
|
@@ -268,7 +270,7 @@ const buildSchemaSourceErrorMessage = ({
|
|
|
268
270
|
const addLatestMetadata = (schemas: MessageSchemaResource[]) => {
|
|
269
271
|
const schemasByMessage = schemas.reduce(
|
|
270
272
|
(acc, schema) => {
|
|
271
|
-
const key = `${schema.message.
|
|
273
|
+
const key = `${schema.message.collectionName}:${schema.message.id}`;
|
|
272
274
|
acc[key] = [...(acc[key] ?? []), schema];
|
|
273
275
|
return acc;
|
|
274
276
|
},
|
|
@@ -284,7 +286,7 @@ const addLatestMetadata = (schemas: MessageSchemaResource[]) => {
|
|
|
284
286
|
);
|
|
285
287
|
|
|
286
288
|
return schemas.map((schema) => {
|
|
287
|
-
const key = `${schema.message.
|
|
289
|
+
const key = `${schema.message.collectionName}:${schema.message.id}`;
|
|
288
290
|
return {
|
|
289
291
|
...schema,
|
|
290
292
|
latest: schema.message.version === latestVersionsByMessage[key],
|
|
@@ -304,7 +306,7 @@ export const getMessageSchemasFromFrontmatter = ({
|
|
|
304
306
|
if (!data.id || !data.version) return [];
|
|
305
307
|
|
|
306
308
|
const message = {
|
|
307
|
-
collection,
|
|
309
|
+
collectionName: collection,
|
|
308
310
|
id: data.id,
|
|
309
311
|
name: data.name,
|
|
310
312
|
version: data.version,
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "4.
|
|
10
|
+
"version": "4.9.0",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -119,9 +119,9 @@
|
|
|
119
119
|
"update-notifier": "^7.3.1",
|
|
120
120
|
"uuid": "^11.1.1",
|
|
121
121
|
"zod": "^4.3.6",
|
|
122
|
-
"@eventcatalog/
|
|
123
|
-
"@eventcatalog/
|
|
124
|
-
"@eventcatalog/
|
|
122
|
+
"@eventcatalog/visualiser": "^4.1.3",
|
|
123
|
+
"@eventcatalog/linter": "1.1.17",
|
|
124
|
+
"@eventcatalog/sdk": "2.28.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@astrojs/check": "^0.9.10",
|
|
@@ -144,6 +144,7 @@
|
|
|
144
144
|
"@types/shelljs": "^0.8.15",
|
|
145
145
|
"@types/update-notifier": "^6.0.8",
|
|
146
146
|
"@types/uuid": "^10.0.0",
|
|
147
|
+
"jsdom": "27.0.0",
|
|
147
148
|
"prettier": "^3.3.3",
|
|
148
149
|
"prettier-plugin-astro": "^0.14.1",
|
|
149
150
|
"tsup": "^8.1.0",
|