@eventcatalog/core 2.51.0 → 2.51.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/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-CXGJYRWV.js → chunk-GWDFHYDT.js} +1 -1
- package/dist/{chunk-2J3EYRYN.js → chunk-IAZKU3ZK.js} +1 -1
- package/dist/{chunk-PRFUGFES.js → chunk-JH4IFYVJ.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 +3 -3
- package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +2 -1
- package/eventcatalog/src/utils/node-graphs/domain-entity-map.ts +13 -5
- package/package.json +1 -1
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)
|
|
@@ -265,6 +265,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
265
265
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VitaliiBalash"><img src="https://avatars.githubusercontent.com/u/4520809?v=4?s=100" width="100px;" alt="Vitalii Balash"/><br /><sub><b>Vitalii Balash</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=VitaliiBalash" title="Code">💻</a></td>
|
|
266
266
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ababilone"><img src="https://avatars.githubusercontent.com/u/925013?v=4?s=100" width="100px;" alt="Arnaud Babilone"/><br /><sub><b>Arnaud Babilone</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=ababilone" title="Code">💻</a></td>
|
|
267
267
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alexanderhorner"><img src="https://avatars.githubusercontent.com/u/18349361?v=4?s=100" width="100px;" alt="Alexander Horner"/><br /><sub><b>Alexander Horner</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=alexanderhorner" title="Code">💻</a></td>
|
|
268
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/simonwfarrow"><img src="https://avatars.githubusercontent.com/u/3245908?v=4?s=100" width="100px;" alt="simonwfarrow"/><br /><sub><b>simonwfarrow</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=simonwfarrow" title="Code">💻</a></td>
|
|
268
269
|
</tr>
|
|
269
270
|
</tbody>
|
|
270
271
|
</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-JH4IFYVJ.js";
|
|
4
|
+
import "../chunk-IAZKU3ZK.js";
|
|
5
|
+
import "../chunk-GWDFHYDT.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.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
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-XE6PFSH5.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JH4IFYVJ.js";
|
|
10
|
+
import "./chunk-IAZKU3ZK.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-LDBRNJIL.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GWDFHYDT.js";
|
|
19
19
|
import {
|
|
20
20
|
isAuthEnabled,
|
|
21
21
|
isBackstagePluginEnabled,
|
|
@@ -5,7 +5,7 @@ import Admonition from '@components/MDX/Admonition';
|
|
|
5
5
|
import NodeGraph from '../NodeGraph/NodeGraph';
|
|
6
6
|
import { getVersionFromCollection } from '@utils/collections/versions';
|
|
7
7
|
|
|
8
|
-
const { id, version = 'latest', maxHeight, includeKey = true } = Astro.props;
|
|
8
|
+
const { id, version = 'latest', maxHeight, includeKey = true, entities } = Astro.props;
|
|
9
9
|
|
|
10
10
|
// Find the flow for the given id and version
|
|
11
11
|
const domains = await getDomains();
|
|
@@ -15,6 +15,7 @@ const domain = domainCollection[0];
|
|
|
15
15
|
const { nodes, edges } = await getNodesAndEdges({
|
|
16
16
|
id: id,
|
|
17
17
|
version: domain?.data?.version,
|
|
18
|
+
...(entities ? { entities } : {}), // Pass entities if provided
|
|
18
19
|
});
|
|
19
20
|
---
|
|
20
21
|
|
|
@@ -12,17 +12,25 @@ const elk = new ELK();
|
|
|
12
12
|
interface Props {
|
|
13
13
|
id: string;
|
|
14
14
|
version: string;
|
|
15
|
+
entities?: string[]; // Optional: array of entity IDs/names to include
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
export const getNodesAndEdges = async ({ id, version }: Props) => {
|
|
18
|
+
export const getNodesAndEdges = async ({ id, version, entities }: Props) => {
|
|
18
19
|
let nodes = [] as any,
|
|
19
20
|
edges = [] as any;
|
|
20
21
|
|
|
21
22
|
const allDomains = await getDomains();
|
|
22
|
-
const
|
|
23
|
+
const allEntities = await getEntities();
|
|
23
24
|
|
|
24
25
|
const domain = getVersionFromCollection(allDomains, id, version)[0] as Domain;
|
|
25
|
-
|
|
26
|
+
let domainEntities = (domain?.data?.entities ?? []) as any;
|
|
27
|
+
|
|
28
|
+
// If entities filter is provided, filter domainEntities to only those specified
|
|
29
|
+
if (entities && Array.isArray(entities) && entities.length > 0) {
|
|
30
|
+
domainEntities = domainEntities.filter(
|
|
31
|
+
(entity: Entity) => entities.includes(entity.data.id) || entities.includes(entity.data.name)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
26
34
|
|
|
27
35
|
const entitiesWithReferences = domainEntities.filter((entity: Entity) =>
|
|
28
36
|
entity.data.properties?.some((property: any) => property.references)
|
|
@@ -44,7 +52,7 @@ export const getNodesAndEdges = async ({ id, version }: Props) => {
|
|
|
44
52
|
.flat()
|
|
45
53
|
.filter((ref: any) => ref !== undefined);
|
|
46
54
|
|
|
47
|
-
const externalToDomain =
|
|
55
|
+
const externalToDomain = Array.from(new Set<string>(listOfReferencedEntities as string[])) // Remove duplicates
|
|
48
56
|
.filter((entityId: any) => !domainEntities.some((domainEntity: any) => domainEntity.id === entityId));
|
|
49
57
|
|
|
50
58
|
// Helper function to find which domain an entity belongs to
|
|
@@ -54,7 +62,7 @@ export const getNodesAndEdges = async ({ id, version }: Props) => {
|
|
|
54
62
|
|
|
55
63
|
const addedExternalEntities = [];
|
|
56
64
|
for (const entityId of externalToDomain) {
|
|
57
|
-
const externalEntity = getItemsFromCollectionByIdAndSemverOrLatest(
|
|
65
|
+
const externalEntity = getItemsFromCollectionByIdAndSemverOrLatest(allEntities, entityId as string, 'latest')[0] as Entity;
|
|
58
66
|
|
|
59
67
|
if (externalEntity) {
|
|
60
68
|
const nodeId = generateIdForNode(externalEntity);
|