@eventcatalog/core 4.10.2 → 4.10.3
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-SB2TMVVX.js → chunk-CHJFPDIO.js} +1 -1
- package/dist/{chunk-MGK66RUH.js → chunk-EHN2WS7S.js} +1 -1
- package/dist/{chunk-E5JJSOMA.js → chunk-EMG2UMRO.js} +1 -1
- package/dist/{chunk-C73V4K3S.js → chunk-IXQNMM6D.js} +1 -1
- package/dist/{chunk-NOD5BM45.js → chunk-J5IBDCGW.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/ArchitectureGraph/ArchitectureGraph.astro +5 -5
- package/eventcatalog/src/components/MDX/ArchitectureGraph/ArchitectureGraphPortal.tsx +8 -7
- package/eventcatalog/src/components/MDX/ArchitectureGraph/AstroArchitectureGraph.tsx +8 -5
- package/eventcatalog/src/components/MDX/components.tsx +1 -12
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +1 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +1 -2
- package/eventcatalog/src/pages/index.astro +1 -2
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/_index.data.ts +10 -16
- package/package.json +1 -1
|
@@ -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.10.
|
|
143
|
+
var version = "4.10.3";
|
|
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-CHJFPDIO.js";
|
|
4
|
+
import "../chunk-EMG2UMRO.js";
|
|
5
5
|
import "../chunk-K2XIENVT.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IXQNMM6D.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.10.
|
|
147
|
+
var version = "4.10.3";
|
|
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-CHJFPDIO.js";
|
|
8
|
+
import "./chunk-EMG2UMRO.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-EHN2WS7S.js";
|
|
35
35
|
import {
|
|
36
36
|
logger
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-J5IBDCGW.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-IXQNMM6D.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.10.
|
|
111
|
+
var version = "4.10.3";
|
|
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-EHN2WS7S.js";
|
|
4
|
+
import "./chunk-J5IBDCGW.js";
|
|
5
|
+
import "./chunk-IXQNMM6D.js";
|
|
6
6
|
import "./chunk-6QENHZZP.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -15,9 +15,9 @@ interface Props {
|
|
|
15
15
|
showLegend?: boolean;
|
|
16
16
|
/** Off by default — embedded graphs pin a lens rather than offer the picker */
|
|
17
17
|
showLensPicker?: boolean;
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
|
|
18
|
+
// Position of this embed among the page's <ArchitectureGraph/> tags — pairs
|
|
19
|
+
// the island with its placeholder div by document order.
|
|
20
|
+
occurrenceIndex?: number;
|
|
21
21
|
href?: {
|
|
22
22
|
label: string;
|
|
23
23
|
url: string;
|
|
@@ -32,7 +32,7 @@ const {
|
|
|
32
32
|
showSearch = true,
|
|
33
33
|
showLegend = true,
|
|
34
34
|
showLensPicker = false,
|
|
35
|
-
|
|
35
|
+
occurrenceIndex = 0,
|
|
36
36
|
href,
|
|
37
37
|
} = Astro.props;
|
|
38
38
|
|
|
@@ -47,7 +47,7 @@ const focusKey =
|
|
|
47
47
|
|
|
48
48
|
<AstroArchitectureGraph
|
|
49
49
|
client:only="react"
|
|
50
|
-
|
|
50
|
+
occurrenceIndex={occurrenceIndex}
|
|
51
51
|
nodes={wire.nodes}
|
|
52
52
|
links={wire.links}
|
|
53
53
|
linkLabels={wire.linkLabels}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// Placeholders are matched to their islands positionally (nth placeholder in
|
|
2
|
+
// document order ↔ nth <ArchitectureGraph/> tag in the host page's body scan).
|
|
3
|
+
// The pairing must not rely on a render-time counter in the element id — Astro
|
|
4
|
+
// can invoke MDX component functions more than once per tag (renderer probing),
|
|
5
|
+
// which drifts such a counter out of sync with the body scan.
|
|
6
|
+
export const ARCHITECTURE_GRAPH_PORTAL_SELECTOR = '[data-architecture-graph-portal]';
|
|
6
7
|
|
|
7
8
|
// Empty placeholder rendered by the MDX component map. The real graph is
|
|
8
9
|
// rendered by ArchitectureGraph.astro (which builds the data server-side) and
|
|
9
|
-
// portals itself into this div
|
|
10
|
+
// portals itself into this div — same pattern as NodeGraphPortal.
|
|
10
11
|
const ArchitectureGraphPortal = (props: any) => {
|
|
11
12
|
return (
|
|
12
13
|
<div
|
|
13
14
|
className="not-prose h-[30em] my-6 mb-12 w-full relative border! border-[rgb(var(--ec-page-border))]! rounded-md overflow-hidden"
|
|
14
|
-
|
|
15
|
+
data-architecture-graph-portal={props.id ?? 'catalog'}
|
|
15
16
|
style={{
|
|
16
17
|
maxHeight: props.maxHeight ? `${props.maxHeight}em` : `30em`,
|
|
17
18
|
}}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import CatalogForceGraph from '@components/CatalogGraph/CatalogForceGraph';
|
|
4
|
+
import { ARCHITECTURE_GRAPH_PORTAL_SELECTOR } from '@components/MDX/ArchitectureGraph/ArchitectureGraphPortal';
|
|
4
5
|
import type { CatalogGraphWireLink, CatalogGraphWireNode } from '@utils/node-graphs/catalog-force-graph';
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
|
-
/**
|
|
8
|
-
|
|
8
|
+
/** Position of this island among the page's <ArchitectureGraph/> embeds — it
|
|
9
|
+
* mounts into the placeholder div at the same position in document order */
|
|
10
|
+
occurrenceIndex?: number;
|
|
9
11
|
nodes: CatalogGraphWireNode[];
|
|
10
12
|
links: CatalogGraphWireLink[];
|
|
11
13
|
linkLabels: string[];
|
|
@@ -24,12 +26,13 @@ interface Props {
|
|
|
24
26
|
// The island mounts outside the MDX content, finds the placeholder div the MDX
|
|
25
27
|
// component map emitted, and portals the graph into it — same pattern as the
|
|
26
28
|
// visualiser's NodeGraph.
|
|
27
|
-
const AstroArchitectureGraph = ({
|
|
29
|
+
const AstroArchitectureGraph = ({ occurrenceIndex = 0, href, hrefLabel, ...graphProps }: Props) => {
|
|
28
30
|
const [container, setContainer] = useState<HTMLElement | null>(null);
|
|
29
31
|
|
|
30
32
|
useEffect(() => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
const portals = document.querySelectorAll<HTMLElement>(ARCHITECTURE_GRAPH_PORTAL_SELECTOR);
|
|
34
|
+
setContainer(portals[occurrenceIndex] ?? null);
|
|
35
|
+
}, [occurrenceIndex]);
|
|
33
36
|
|
|
34
37
|
if (!container) return null;
|
|
35
38
|
|
|
@@ -51,10 +51,6 @@ const getEntityMapCollection = (props: any, mdxProp: any) => {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
const components = (props: any) => {
|
|
54
|
-
// Occurrence counter so multiple <ArchitectureGraph/> tags on one page each get
|
|
55
|
-
// their own portal — MDX renders in document order, matching the body scan order
|
|
56
|
-
// the host pages use to render the islands.
|
|
57
|
-
let architectureGraphOccurrence = 0;
|
|
58
54
|
return {
|
|
59
55
|
Attachments: (mdxProp: any) => jsx(Attachments, { ...props, ...mdxProp }),
|
|
60
56
|
CustomProperties: (mdxProp: any) => jsx(CustomProperties, { ...props, ...mdxProp }),
|
|
@@ -74,14 +70,7 @@ const components = (props: any) => {
|
|
|
74
70
|
ADRTable: (mdxProp: any) => jsx(ADRTable, { ...props, ...mdxProp }),
|
|
75
71
|
EntityPropertiesTable: (mdxProp: any) => jsx(EntityPropertiesTable, { ...props, ...mdxProp }),
|
|
76
72
|
NodeGraph: (mdxProp: any) => jsx(NodeGraphPortal, { ...props.data, ...mdxProp, props, mdxProp }),
|
|
77
|
-
ArchitectureGraph: (mdxProp: any) =>
|
|
78
|
-
jsx(ArchitectureGraphPortal, {
|
|
79
|
-
...props.data,
|
|
80
|
-
...mdxProp,
|
|
81
|
-
occurrenceIndex: architectureGraphOccurrence++,
|
|
82
|
-
props,
|
|
83
|
-
mdxProp,
|
|
84
|
-
}),
|
|
73
|
+
ArchitectureGraph: (mdxProp: any) => jsx(ArchitectureGraphPortal, { ...props.data, ...mdxProp, props, mdxProp }),
|
|
85
74
|
ComponentDiagram: (mdxProp: any) => jsx(NodeGraphPortal, { ...props.data, ...mdxProp, props, mdxProp }),
|
|
86
75
|
ContextDiagram: (mdxProp: any) => jsx(ContextDiagramPortal, { ...props.data, ...mdxProp, props, mdxProp }),
|
|
87
76
|
SystemContextMap: (mdxProp: any) => jsx(SystemContextMapPortal, { ...mdxProp }),
|
|
@@ -15,7 +15,6 @@ import { getAdjacentPages, getNavigationItems } from '@enterprise/custom-documen
|
|
|
15
15
|
import CustomDocsNav from '@enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro';
|
|
16
16
|
import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
|
|
17
17
|
import ArchitectureGraph from '@components/MDX/ArchitectureGraph/ArchitectureGraph.astro';
|
|
18
|
-
import { architectureGraphPortalId } from '@components/MDX/ArchitectureGraph/ArchitectureGraphPortal';
|
|
19
18
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
20
19
|
|
|
21
20
|
import {
|
|
@@ -202,7 +201,7 @@ const editUrl =
|
|
|
202
201
|
showSearch={graph.search}
|
|
203
202
|
showLegend={graph.legend}
|
|
204
203
|
showLensPicker={graph.lensPicker}
|
|
205
|
-
|
|
204
|
+
occurrenceIndex={occurrenceIndex}
|
|
206
205
|
href={
|
|
207
206
|
isArchitectureGraphEnabled()
|
|
208
207
|
? {
|
|
@@ -11,7 +11,6 @@ import Footer from '@layouts/Footer.astro';
|
|
|
11
11
|
import components from '@components/MDX/components';
|
|
12
12
|
import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
|
|
13
13
|
import ArchitectureGraph from '@components/MDX/ArchitectureGraph/ArchitectureGraph.astro';
|
|
14
|
-
import { architectureGraphPortalId } from '@components/MDX/ArchitectureGraph/ArchitectureGraphPortal';
|
|
15
14
|
import SchemaViewer from '@components/MDX/SchemaViewer/SchemaViewerRoot.astro';
|
|
16
15
|
import Admonition from '@components/MDX/Admonition';
|
|
17
16
|
import VersionList from '@components/Lists/VersionList.astro';
|
|
@@ -681,7 +680,7 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
681
680
|
showSearch={graph.search}
|
|
682
681
|
showLegend={graph.legend}
|
|
683
682
|
showLensPicker={graph.lensPicker}
|
|
684
|
-
|
|
683
|
+
occurrenceIndex={occurrenceIndex}
|
|
685
684
|
href={
|
|
686
685
|
isArchitectureGraphEnabled()
|
|
687
686
|
? {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
3
|
import { getMDXComponentsByName, parseMdxBooleanProp } from '@utils/markdown';
|
|
4
|
-
import { architectureGraphPortalId } from '@components/MDX/ArchitectureGraph/ArchitectureGraphPortal';
|
|
5
4
|
import { resourceToCollectionMap } from '@utils/collections/util';
|
|
6
5
|
import { buildUrl } from '@utils/url-builder';
|
|
7
6
|
import { isCustomLandingPageEnabled, isVisualiserEnabled, isArchitectureGraphEnabled } from '@utils/feature';
|
|
@@ -125,7 +124,7 @@ if (config.landingPage) {
|
|
|
125
124
|
showSearch={parseMdxBooleanProp(graph.search, true)}
|
|
126
125
|
showLegend={parseMdxBooleanProp(graph.legend, true)}
|
|
127
126
|
showLensPicker={parseMdxBooleanProp(graph.lensPicker, false)}
|
|
128
|
-
|
|
127
|
+
occurrenceIndex={occurrenceIndex}
|
|
129
128
|
href={
|
|
130
129
|
isArchitectureGraphEnabled()
|
|
131
130
|
? {
|
package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/_index.data.ts
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
2
2
|
import { isAuthEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
3
3
|
import { getDomains } from '@utils/collections/domains';
|
|
4
|
-
import { getSystems } from '@utils/collections/systems';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* A domain gets a System Diagram when it has systems and at least one of those
|
|
8
7
|
* systems takes part in a context graph — i.e. it declares relationships or actors. A
|
|
9
8
|
* domain whose systems have neither has nothing to show, so we don't generate a page.
|
|
9
|
+
* `getDomains` hydrates `data.systems` into full system entries, so read each
|
|
10
|
+
* system's data directly — this must stay in sync with the sidebar's
|
|
11
|
+
* `hasSystemContext` guard so we never link to a page that wasn't generated.
|
|
10
12
|
*/
|
|
11
|
-
const domainHasSystemContext = (
|
|
12
|
-
domain
|
|
13
|
-
systemMap: Map<string, { data: { relationships?: unknown[]; actors?: unknown[] } }>
|
|
14
|
-
) => {
|
|
15
|
-
const systemRefs = (domain.data.systems || []) as { id: string }[];
|
|
16
|
-
if (systemRefs.length === 0) return false;
|
|
13
|
+
const domainHasSystemContext = (domain: Awaited<ReturnType<typeof getDomains>>[number]) => {
|
|
14
|
+
const systems = (domain.data.systems || []) as any[];
|
|
17
15
|
|
|
18
|
-
return
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const relationships = (system.data.relationships || []) as unknown[];
|
|
22
|
-
const actors = (system.data.actors || []) as unknown[];
|
|
23
|
-
return relationships.length > 0 || actors.length > 0;
|
|
16
|
+
return systems.some((system) => {
|
|
17
|
+
const data = system?.data ?? system;
|
|
18
|
+
return ((data?.relationships as unknown[]) || []).length > 0 || ((data?.actors as unknown[]) || []).length > 0;
|
|
24
19
|
});
|
|
25
20
|
};
|
|
26
21
|
|
|
@@ -30,11 +25,10 @@ export class Page extends HybridPage {
|
|
|
30
25
|
return [];
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
const
|
|
34
|
-
const systemMap = new Map(systems.map((system) => [system.data.id, system]));
|
|
28
|
+
const domains = await getDomains({ getAllVersions: false });
|
|
35
29
|
|
|
36
30
|
return domains
|
|
37
|
-
.filter((domain) => domainHasSystemContext(domain
|
|
31
|
+
.filter((domain) => domainHasSystemContext(domain))
|
|
38
32
|
.map((domain) => ({
|
|
39
33
|
params: {
|
|
40
34
|
id: domain.data.id,
|