@eventcatalog/core 3.19.0 → 3.19.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/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-RPN42UQI.js → chunk-6IYYCXKO.js} +3 -3
- package/dist/{chunk-A4JKYK6M.js → chunk-GQZQOHQ6.js} +1 -1
- package/dist/{chunk-7JIM3GZL.js → chunk-WUBGLZHM.js} +1 -1
- package/dist/{chunk-DME6DR6Z.js → chunk-ZHTPK6EP.js} +1 -1
- package/dist/{chunk-NDGH67WK.js → chunk-ZKN3CMF6.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/pages/diagrams/[id]/[version]/embed.astro +1 -0
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +12 -1
- package/eventcatalog/src/stores/sidebar-store/state.ts +41 -1
- package/eventcatalog/src/styles/tailwind.css +2 -2
- package/eventcatalog/src/utils/collections/services.ts +49 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-6IYYCXKO.js";
|
|
4
|
+
import "../chunk-GQZQOHQ6.js";
|
|
4
5
|
import "../chunk-4UVFXLPI.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-DME6DR6Z.js";
|
|
6
|
+
import "../chunk-ZHTPK6EP.js";
|
|
7
7
|
import "../chunk-5T63CXKU.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
raiseEvent
|
|
3
|
+
} from "./chunk-GQZQOHQ6.js";
|
|
1
4
|
import {
|
|
2
5
|
countResources,
|
|
3
6
|
serializeCounts
|
|
4
7
|
} from "./chunk-4UVFXLPI.js";
|
|
5
|
-
import {
|
|
6
|
-
raiseEvent
|
|
7
|
-
} from "./chunk-A4JKYK6M.js";
|
|
8
8
|
import {
|
|
9
9
|
getEventCatalogConfigFile,
|
|
10
10
|
verifyRequiredFieldsAreInCatalogConfigFile
|
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.19.
|
|
117
|
+
var version = "3.19.2";
|
|
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-RPN42UQI.js";
|
|
4
|
-
import "./chunk-4UVFXLPI.js";
|
|
5
1
|
import {
|
|
6
2
|
resolve_catalog_dependencies_default
|
|
7
3
|
} from "./chunk-WAJIJEI3.js";
|
|
8
4
|
import {
|
|
9
5
|
watch
|
|
10
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
|
+
import {
|
|
8
|
+
log_build_default
|
|
9
|
+
} from "./chunk-6IYYCXKO.js";
|
|
10
|
+
import "./chunk-GQZQOHQ6.js";
|
|
11
|
+
import "./chunk-4UVFXLPI.js";
|
|
11
12
|
import {
|
|
12
13
|
runMigrations
|
|
13
14
|
} from "./chunk-BH3JMNAV.js";
|
|
14
15
|
import "./chunk-622JYJWG.js";
|
|
15
|
-
import "./chunk-A4JKYK6M.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-WUBGLZHM.js";
|
|
26
26
|
import {
|
|
27
27
|
logger
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ZKN3CMF6.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZHTPK6EP.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-WUBGLZHM.js";
|
|
4
|
+
import "./chunk-ZKN3CMF6.js";
|
|
5
|
+
import "./chunk-ZHTPK6EP.js";
|
|
6
6
|
import "./chunk-5T63CXKU.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -16,7 +16,12 @@ import {
|
|
|
16
16
|
import { isVisualiserEnabled } from '@utils/feature';
|
|
17
17
|
import { pluralizeMessageType } from '@utils/collections/messages';
|
|
18
18
|
|
|
19
|
-
export const buildServiceNode = (
|
|
19
|
+
export const buildServiceNode = (
|
|
20
|
+
service: CollectionEntry<'services'>,
|
|
21
|
+
owners: any[],
|
|
22
|
+
context: ResourceGroupContext,
|
|
23
|
+
serviceChannels: CollectionEntry<'channels'>[] = []
|
|
24
|
+
): NavNode => {
|
|
20
25
|
const sendsMessages = service.data.sends || [];
|
|
21
26
|
const receivesMessages = service.data.receives || [];
|
|
22
27
|
const serviceEntities = service.data.entities || [];
|
|
@@ -165,6 +170,12 @@ export const buildServiceNode = (service: CollectionEntry<'services'>, owners: a
|
|
|
165
170
|
(receive) => `${pluralizeMessageType(receive as any)}:${(receive as any).data.id}:${(receive as any).data.version}`
|
|
166
171
|
),
|
|
167
172
|
},
|
|
173
|
+
serviceChannels.length > 0 && {
|
|
174
|
+
type: 'group',
|
|
175
|
+
title: 'Channels',
|
|
176
|
+
icon: 'ArrowRightLeft',
|
|
177
|
+
pages: serviceChannels.map((channel) => `channel:${(channel as any).data.id}:${(channel as any).data.version}`),
|
|
178
|
+
},
|
|
168
179
|
hasFlows && {
|
|
169
180
|
type: 'group',
|
|
170
181
|
title: 'Flows',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getCollection } from 'astro:content';
|
|
2
|
+
import type { CollectionEntry } from 'astro:content';
|
|
1
3
|
import { getContainers } from '@utils/collections/containers';
|
|
2
4
|
import { getDomains } from '@utils/collections/domains';
|
|
3
5
|
import { getServices } from '@utils/collections/services';
|
|
@@ -20,6 +22,7 @@ import { buildDataProductNode } from './builders/data-product';
|
|
|
20
22
|
import config from '@config';
|
|
21
23
|
import { getDesigns } from '@utils/collections/designs';
|
|
22
24
|
import { getChannels } from '@utils/collections/channels';
|
|
25
|
+
import { createVersionedMap, findInMap } from '@utils/collections/util';
|
|
23
26
|
import { buildQuickReferenceSection, buildResourceDocsSection } from './builders/shared';
|
|
24
27
|
|
|
25
28
|
export type { NavigationData, NavNode, ChildRef };
|
|
@@ -149,10 +152,47 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
149
152
|
{} as Record<string, NavNode | string>
|
|
150
153
|
);
|
|
151
154
|
|
|
155
|
+
// Compute channels for each service from raw sends[].to / receives[].from pointers
|
|
156
|
+
const rawServices = await getCollection('services');
|
|
157
|
+
const channelMap = createVersionedMap(channels);
|
|
158
|
+
const serviceChannelsMap = new Map<string, CollectionEntry<'channels'>[]>();
|
|
159
|
+
|
|
160
|
+
for (const service of services) {
|
|
161
|
+
const rawService = rawServices.find((s) => s.data.id === service.data.id && s.data.version === service.data.version);
|
|
162
|
+
if (!rawService) continue;
|
|
163
|
+
|
|
164
|
+
const pointers: Array<{ id: string; version?: string }> = [];
|
|
165
|
+
for (const send of rawService.data.sends ?? []) {
|
|
166
|
+
for (const ch of send.to ?? []) {
|
|
167
|
+
pointers.push({ id: ch.id, version: ch.version });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
for (const receive of rawService.data.receives ?? []) {
|
|
171
|
+
for (const ch of receive.from ?? []) {
|
|
172
|
+
pointers.push({ id: ch.id, version: ch.version });
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const seen = new Set<string>();
|
|
177
|
+
const resolved: CollectionEntry<'channels'>[] = [];
|
|
178
|
+
for (const pointer of pointers) {
|
|
179
|
+
const key = `${pointer.id}-${pointer.version ?? 'latest'}`;
|
|
180
|
+
if (seen.has(key)) continue;
|
|
181
|
+
seen.add(key);
|
|
182
|
+
const match = findInMap(channelMap, pointer.id, pointer.version);
|
|
183
|
+
if (match) resolved.push(match as CollectionEntry<'channels'>);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (resolved.length > 0) {
|
|
187
|
+
serviceChannelsMap.set(`${service.data.id}:${service.data.version}`, resolved);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
152
191
|
const serviceNodes = servicesWithOwners.reduce(
|
|
153
192
|
(acc, { service, owners }) => {
|
|
154
193
|
const versionedKey = `service:${service.data.id}:${service.data.version}`;
|
|
155
|
-
|
|
194
|
+
const serviceChannels = serviceChannelsMap.get(`${service.data.id}:${service.data.version}`) || [];
|
|
195
|
+
acc[versionedKey] = buildServiceNode(service, owners, context, serviceChannels);
|
|
156
196
|
if (service.data.latestVersion === service.data.version) {
|
|
157
197
|
// Store reference to versioned key instead of duplicating the full node
|
|
158
198
|
acc[`service:${service.data.id}`] = versionedKey;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
* at runtime (e.g. `bg-${color}-50`). Tailwind v4 can't detect these from source
|
|
50
50
|
* scanning, so we explicitly declare them here.
|
|
51
51
|
*
|
|
52
|
-
* Colors used: orange, blue, green, emerald, amber, violet, pink, purple, gray
|
|
52
|
+
* Colors used: orange, blue, green, emerald, amber, violet, pink, purple, gray, yellow, teal
|
|
53
53
|
* Used in: SchemaListItem, Grids/components, SchemaExplorer, MessageGrid
|
|
54
54
|
*/
|
|
55
55
|
@source inline("bg-{orange,blue,green,emerald,amber,violet,pink,purple,gray}-{50,100}");
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
/* Border color variants for MessageGrid cards */
|
|
63
63
|
@source inline("border-{orange,blue,green,emerald,amber,violet,pink,purple,gray}-{200,300}");
|
|
64
64
|
@source inline("{dark:,}border-{orange,blue,green,emerald,amber,violet,pink,purple,gray}-500/{30,50}");
|
|
65
|
-
@source inline("{hover:,dark:hover:,}border-{orange,blue,green,emerald,amber,violet,pink,purple,gray}-{300,500/50}");
|
|
65
|
+
@source inline("{hover:,dark:hover:,}border-{orange,blue,green,emerald,amber,violet,pink,purple,gray,yellow,teal}-{300,400,500,500/50}");
|
|
66
66
|
|
|
67
67
|
/* Explicit safelist classes used in various components */
|
|
68
68
|
@source inline("bg-{blue,orange}-600");
|
|
@@ -3,7 +3,14 @@ import type { CollectionEntry } from 'astro:content';
|
|
|
3
3
|
import semver from 'semver';
|
|
4
4
|
import type { CollectionMessageTypes, CollectionTypes } from '@types';
|
|
5
5
|
import { getDomains, getDomainsForService } from './domains';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
createVersionedMap,
|
|
8
|
+
findInMap,
|
|
9
|
+
versionMatches,
|
|
10
|
+
processSpecifications,
|
|
11
|
+
getItemsFromCollectionByIdAndSemverOrLatest,
|
|
12
|
+
} from '@utils/collections/util';
|
|
13
|
+
import { getChannels } from './channels';
|
|
7
14
|
|
|
8
15
|
export type Service = CollectionEntry<'services'>;
|
|
9
16
|
|
|
@@ -182,6 +189,47 @@ export const getProducersAndConsumersForChannel = async (channel: CollectionEntr
|
|
|
182
189
|
consumers: consumers ?? [],
|
|
183
190
|
};
|
|
184
191
|
};
|
|
192
|
+
export const getChannelsForService = async (serviceId: string, version?: string): Promise<CollectionEntry<'channels'>[]> => {
|
|
193
|
+
const allServices = await getCollection('services');
|
|
194
|
+
const allChannels = await getChannels({ getAllVersions: true });
|
|
195
|
+
|
|
196
|
+
const matched = getItemsFromCollectionByIdAndSemverOrLatest(allServices, serviceId, version);
|
|
197
|
+
const service = matched[0];
|
|
198
|
+
if (!service) return [];
|
|
199
|
+
|
|
200
|
+
const sends = service.data.sends ?? [];
|
|
201
|
+
const receives = service.data.receives ?? [];
|
|
202
|
+
|
|
203
|
+
const channelPointers: Array<{ id: string; version?: string }> = [];
|
|
204
|
+
|
|
205
|
+
for (const send of sends) {
|
|
206
|
+
for (const channel of send.to ?? []) {
|
|
207
|
+
channelPointers.push({ id: channel.id, version: channel.version });
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
for (const receive of receives) {
|
|
212
|
+
for (const channel of receive.from ?? []) {
|
|
213
|
+
channelPointers.push({ id: channel.id, version: channel.version });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const channelMap = createVersionedMap(allChannels);
|
|
218
|
+
const seen = new Set<string>();
|
|
219
|
+
const channels: CollectionEntry<'channels'>[] = [];
|
|
220
|
+
|
|
221
|
+
for (const pointer of channelPointers) {
|
|
222
|
+
const key = `${pointer.id}-${pointer.version ?? 'latest'}`;
|
|
223
|
+
if (seen.has(key)) continue;
|
|
224
|
+
seen.add(key);
|
|
225
|
+
|
|
226
|
+
const match = findInMap(channelMap, pointer.id, pointer.version);
|
|
227
|
+
if (match) channels.push(match as CollectionEntry<'channels'>);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return channels;
|
|
231
|
+
};
|
|
232
|
+
|
|
185
233
|
export const getServicesNotInAnyDomain = async (): Promise<Service[]> => {
|
|
186
234
|
const services = await getServices({ getAllVersions: false });
|
|
187
235
|
|
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": "3.19.
|
|
9
|
+
"version": "3.19.2",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"uuid": "^10.0.0",
|
|
103
103
|
"zod": "^3.25.0",
|
|
104
104
|
"@eventcatalog/linter": "1.0.8",
|
|
105
|
-
"@eventcatalog/
|
|
106
|
-
"@eventcatalog/
|
|
105
|
+
"@eventcatalog/sdk": "2.15.1",
|
|
106
|
+
"@eventcatalog/visualiser": "^3.15.3"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@astrojs/check": "^0.9.6",
|