@eventcatalog/core 5.6.0 → 5.7.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 +5 -5
- package/dist/{chunk-7TTNTHHN.js → chunk-22KZ4TJF.js} +10 -10
- package/dist/{chunk-T3U27UXC.js → chunk-4CV7VC4K.js} +1 -1
- package/dist/{chunk-XBRKEQ66.js → chunk-BE5PTWNC.js} +1 -1
- package/dist/{chunk-DEO4QEGO.js → chunk-FMWQ2YYN.js} +1 -1
- package/dist/{chunk-ETS4G6RR.js → chunk-MOPKQMQP.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 +16 -16
- package/dist/federation/federate.js +3 -3
- 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/ChatPanel/ChatPanel.tsx +20 -7
- package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +21 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +2 -1
- package/eventcatalog/src/features/mcp/apps/generated/canvas.html +73 -73
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +73 -73
- package/eventcatalog/src/features/studio/components/NodeDetails.tsx +4 -0
- package/eventcatalog/src/features/studio/components/StudioDesigner.tsx +74 -8
- package/eventcatalog/src/features/studio/hooks/use-studio-flow.ts +9 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +4 -0
- package/eventcatalog/src/utils/node-graphs/compact-visualiser-graph.ts +14 -0
- package/eventcatalog/src/utils/node-graphs/node-resource.ts +26 -0
- package/package.json +7 -7
- package/dist/{chunk-NCEZDQSW.js → chunk-QJ7KKN2D.js} +7 -7
|
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
169
169
|
var import_os = __toESM(require("os"), 1);
|
|
170
170
|
|
|
171
171
|
// package.json
|
|
172
|
-
var version = "5.
|
|
172
|
+
var version = "5.7.0";
|
|
173
173
|
|
|
174
174
|
// src/constants.ts
|
|
175
175
|
var VERSION = version;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-CA6WCQ2T.js";
|
|
3
|
+
} from "../chunk-22KZ4TJF.js";
|
|
5
4
|
import "../chunk-AD7CL772.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-CPW6G62V.js";
|
|
5
|
+
import "../chunk-4CV7VC4K.js";
|
|
8
6
|
import "../chunk-YRZK7HKX.js";
|
|
9
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-CA6WCQ2T.js";
|
|
8
|
+
import "../chunk-CPW6G62V.js";
|
|
9
|
+
import "../chunk-MOPKQMQP.js";
|
|
10
10
|
import "../chunk-4G7FSRPN.js";
|
|
11
11
|
export {
|
|
12
12
|
log_build_default as default
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getStorageType,
|
|
3
|
-
getStudioMode,
|
|
4
|
-
serializeStudioUsage
|
|
5
|
-
} from "./chunk-CA6WCQ2T.js";
|
|
6
1
|
import {
|
|
7
2
|
getLicenseAnalytics
|
|
8
3
|
} from "./chunk-AD7CL772.js";
|
|
9
4
|
import {
|
|
10
5
|
raiseEvent
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
TELEMETRY_REQUEST_TIMEOUT_MS,
|
|
14
|
-
isTelemetryDisabled
|
|
15
|
-
} from "./chunk-CPW6G62V.js";
|
|
6
|
+
} from "./chunk-4CV7VC4K.js";
|
|
16
7
|
import {
|
|
17
8
|
countResources,
|
|
18
9
|
hashCatalogContent,
|
|
19
10
|
serializeCounts
|
|
20
11
|
} from "./chunk-YRZK7HKX.js";
|
|
12
|
+
import {
|
|
13
|
+
getStorageType,
|
|
14
|
+
getStudioMode,
|
|
15
|
+
serializeStudioUsage
|
|
16
|
+
} from "./chunk-CA6WCQ2T.js";
|
|
17
|
+
import {
|
|
18
|
+
TELEMETRY_REQUEST_TIMEOUT_MS,
|
|
19
|
+
isTelemetryDisabled
|
|
20
|
+
} from "./chunk-CPW6G62V.js";
|
|
21
21
|
import {
|
|
22
22
|
getEventCatalogConfigFile,
|
|
23
23
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -174,7 +174,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
174
174
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
175
175
|
|
|
176
176
|
// package.json
|
|
177
|
-
var version = "5.
|
|
177
|
+
var version = "5.7.0";
|
|
178
178
|
|
|
179
179
|
// src/constants.ts
|
|
180
180
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-CA6WCQ2T.js";
|
|
2
|
+
stopChildWithParent
|
|
3
|
+
} from "./chunk-S5GWAUG5.js";
|
|
5
4
|
import {
|
|
6
5
|
runMigrations
|
|
7
6
|
} from "./chunk-XUAF2H54.js";
|
|
8
7
|
import "./chunk-CA4U2JP7.js";
|
|
9
8
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
log_build_default
|
|
10
|
+
} from "./chunk-22KZ4TJF.js";
|
|
12
11
|
import {
|
|
13
12
|
getLicenseStatus,
|
|
14
13
|
printLicenseStatus
|
|
15
14
|
} from "./chunk-AD7CL772.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-CPW6G62V.js";
|
|
15
|
+
import "./chunk-4CV7VC4K.js";
|
|
18
16
|
import "./chunk-YRZK7HKX.js";
|
|
17
|
+
import "./chunk-CA6WCQ2T.js";
|
|
18
|
+
import "./chunk-CPW6G62V.js";
|
|
19
19
|
import {
|
|
20
20
|
FederationConflictError,
|
|
21
21
|
FederationDiagnosticError,
|
|
22
22
|
federateCatalog
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-R7Z5ALYI.js";
|
|
25
|
-
import {
|
|
26
|
-
getFederationDiagnosticCounts,
|
|
27
|
-
getVisibleFederationDiagnostics
|
|
28
|
-
} from "./chunk-JJPB6EOZ.js";
|
|
23
|
+
} from "./chunk-QJ7KKN2D.js";
|
|
29
24
|
import "./chunk-WRNH5C3U.js";
|
|
30
25
|
import "./chunk-5EPNFDT5.js";
|
|
31
26
|
import "./chunk-A2RZR3U4.js";
|
|
32
27
|
import "./chunk-SDZQJTJW.js";
|
|
33
28
|
import "./chunk-352FGP6W.js";
|
|
29
|
+
import "./chunk-R7Z5ALYI.js";
|
|
30
|
+
import {
|
|
31
|
+
getFederationDiagnosticCounts,
|
|
32
|
+
getVisibleFederationDiagnostics
|
|
33
|
+
} from "./chunk-JJPB6EOZ.js";
|
|
34
34
|
import {
|
|
35
35
|
getProjectOutDir,
|
|
36
36
|
isAuthEnabled,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
} from "./chunk-NKNOXQ62.js";
|
|
40
40
|
import {
|
|
41
41
|
generate
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FMWQ2YYN.js";
|
|
43
43
|
import {
|
|
44
44
|
logger
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BE5PTWNC.js";
|
|
46
46
|
import {
|
|
47
47
|
resolve_catalog_dependencies_default
|
|
48
48
|
} from "./chunk-PD7KTSYN.js";
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
} from "./chunk-LFQJXLHG.js";
|
|
80
80
|
import {
|
|
81
81
|
VERSION
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-MOPKQMQP.js";
|
|
83
83
|
import {
|
|
84
84
|
getEventCatalogConfigFile,
|
|
85
85
|
verifyRequiredFieldsAreInCatalogConfigFile
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
FederationConflictError,
|
|
3
3
|
FederationDiagnosticError,
|
|
4
4
|
federateCatalog
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-R7Z5ALYI.js";
|
|
7
|
-
import "../chunk-JJPB6EOZ.js";
|
|
5
|
+
} from "../chunk-QJ7KKN2D.js";
|
|
8
6
|
import "../chunk-WRNH5C3U.js";
|
|
9
7
|
import "../chunk-5EPNFDT5.js";
|
|
10
8
|
import "../chunk-A2RZR3U4.js";
|
|
11
9
|
import "../chunk-SDZQJTJW.js";
|
|
12
10
|
import "../chunk-352FGP6W.js";
|
|
11
|
+
import "../chunk-R7Z5ALYI.js";
|
|
12
|
+
import "../chunk-JJPB6EOZ.js";
|
|
13
13
|
import "../chunk-4G7FSRPN.js";
|
|
14
14
|
export {
|
|
15
15
|
FederationConflictError,
|
package/dist/generate.cjs
CHANGED
|
@@ -105,7 +105,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
105
105
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
106
106
|
|
|
107
107
|
// package.json
|
|
108
|
-
var version = "5.
|
|
108
|
+
var version = "5.7.0";
|
|
109
109
|
|
|
110
110
|
// src/constants.ts
|
|
111
111
|
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-FMWQ2YYN.js";
|
|
4
|
+
import "./chunk-BE5PTWNC.js";
|
|
5
|
+
import "./chunk-MOPKQMQP.js";
|
|
6
6
|
import "./chunk-4G7FSRPN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -619,9 +619,14 @@ const ChatPanel = ({ isOpen, onClose, configured = false }: ChatPanelProps) => {
|
|
|
619
619
|
}
|
|
620
620
|
}, [configured, isOpen, tools.length, chatApiUrl]);
|
|
621
621
|
|
|
622
|
-
//
|
|
622
|
+
// Follow the current URL (pathname + search): the panel lives in the persisted header, so it stays mounted while
|
|
623
|
+
// ClientRouter swaps pages underneath it. Reading the URL again after each swap keeps the suggested questions and
|
|
624
|
+
// the "Based on" context on the page the person is actually looking at, not the one they opened the panel from.
|
|
623
625
|
useEffect(() => {
|
|
624
|
-
setPathname(window.location.pathname + window.location.search);
|
|
626
|
+
const updatePathname = () => setPathname(window.location.pathname + window.location.search);
|
|
627
|
+
updatePathname();
|
|
628
|
+
document.addEventListener('astro:after-swap', updatePathname);
|
|
629
|
+
return () => document.removeEventListener('astro:after-swap', updatePathname);
|
|
625
630
|
}, [isOpen]);
|
|
626
631
|
|
|
627
632
|
// Memoize suggested questions to avoid recalculating on every render
|
|
@@ -755,15 +760,19 @@ const ChatPanel = ({ isOpen, onClose, configured = false }: ChatPanelProps) => {
|
|
|
755
760
|
|
|
756
761
|
// Add/remove padding to main application and header when sidebar panel is open
|
|
757
762
|
useEffect(() => {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
|
|
763
|
+
// Looked up each time: the panel stays open across ClientRouter navigations (the header persists), but each one
|
|
764
|
+
// swaps in a new page that needs pushing over too
|
|
765
|
+
const getElements = () => ({
|
|
766
|
+
elements: [document.getElementById('eventcatalog-application'), document.getElementById('eventcatalog-header')].filter(
|
|
767
|
+
Boolean
|
|
768
|
+
) as HTMLElement[],
|
|
769
|
+
docsSidebarEl: document.getElementById('eventcatalog-docs-sidebar'),
|
|
770
|
+
});
|
|
763
771
|
|
|
764
772
|
const desktop = window.matchMedia('(min-width: 1024px)');
|
|
765
773
|
const updateLayout = () => {
|
|
766
774
|
const pushContent = desktop.matches && isOpen && !isFullscreen;
|
|
775
|
+
const { elements, docsSidebarEl } = getElements();
|
|
767
776
|
elements.forEach((el) => {
|
|
768
777
|
if (!el.style.transition) {
|
|
769
778
|
el.style.transition = 'padding-right 420ms cubic-bezier(0.16, 1, 0.3, 1)';
|
|
@@ -774,10 +783,14 @@ const ChatPanel = ({ isOpen, onClose, configured = false }: ChatPanelProps) => {
|
|
|
774
783
|
};
|
|
775
784
|
updateLayout();
|
|
776
785
|
desktop.addEventListener('change', updateLayout);
|
|
786
|
+
// The new page is in place but not yet shown, so it opens already pushed over
|
|
787
|
+
document.addEventListener('astro:after-swap', updateLayout);
|
|
777
788
|
|
|
778
789
|
// Cleanup on unmount
|
|
779
790
|
return () => {
|
|
780
791
|
desktop.removeEventListener('change', updateLayout);
|
|
792
|
+
document.removeEventListener('astro:after-swap', updateLayout);
|
|
793
|
+
const { elements, docsSidebarEl } = getElements();
|
|
781
794
|
elements.forEach((el) => {
|
|
782
795
|
el.style.paddingRight = '0';
|
|
783
796
|
});
|
|
@@ -17,6 +17,7 @@ import { createPortal } from 'react-dom';
|
|
|
17
17
|
import type { Node, Edge } from '@xyflow/react';
|
|
18
18
|
import type { FlowGroupBy, OpenInStudioRequest } from '@eventcatalog/visualiser';
|
|
19
19
|
import { buildUrl } from '@utils/url-builder';
|
|
20
|
+
import { getNodeDiagramPath } from '@utils/node-graphs/node-resource';
|
|
20
21
|
import { createCanvasThroughApi } from '@features/studio/api/client';
|
|
21
22
|
import { getStoredName } from '@features/studio/identity';
|
|
22
23
|
|
|
@@ -84,9 +85,27 @@ interface AstroNodeGraphProps {
|
|
|
84
85
|
swimlanes?: FlowGroupBy;
|
|
85
86
|
// The Studio API's address, when Studio is on: the menu can then start a canvas from the diagram
|
|
86
87
|
studioApiUrl?: string;
|
|
88
|
+
// Clicking a node opens its diagram (when the catalog has the visualiser's pages)
|
|
89
|
+
opensDiagrams?: boolean;
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
const
|
|
92
|
+
const withoutTrailingSlash = (path: string) => path.replace(/\/+$/, '');
|
|
93
|
+
|
|
94
|
+
/** The diagram page a node opens, unless it's the page this is (e.g. the service on its own diagram) */
|
|
95
|
+
const getNodeDiagramUrl = (node: Node) => {
|
|
96
|
+
const path = getNodeDiagramPath(node);
|
|
97
|
+
if (!path) return undefined;
|
|
98
|
+
const url = buildUrl(path);
|
|
99
|
+
return withoutTrailingSlash(url) === withoutTrailingSlash(window.location.pathname) ? undefined : url;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const AstroNodeGraph = ({
|
|
103
|
+
isDevMode = false,
|
|
104
|
+
resourceKey,
|
|
105
|
+
studioApiUrl,
|
|
106
|
+
opensDiagrams = false,
|
|
107
|
+
...otherProps
|
|
108
|
+
}: AstroNodeGraphProps) => {
|
|
90
109
|
// Astro-specific navigation handler
|
|
91
110
|
const handleNavigate = useCallback((url: string) => {
|
|
92
111
|
// Use window.location for navigation since we can't import astro:transitions/client in a React component
|
|
@@ -167,6 +186,7 @@ const AstroNodeGraph = ({ isDevMode = false, resourceKey, studioApiUrl, ...other
|
|
|
167
186
|
isDevMode={isDevMode}
|
|
168
187
|
onNavigate={handleNavigate}
|
|
169
188
|
onBuildUrl={handleBuildUrl}
|
|
189
|
+
getNodeDiagramUrl={opensDiagrams ? getNodeDiagramUrl : undefined}
|
|
170
190
|
onSaveLayout={handleSaveLayout}
|
|
171
191
|
onResetLayout={handleResetLayout}
|
|
172
192
|
onOpenInStudio={studioApiUrl ? setToOpen : undefined}
|
|
@@ -31,7 +31,7 @@ import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
|
31
31
|
import { getNodesAndEdges as getNodesAndEdgesForContainer } from '@utils/node-graphs/container-node-graph';
|
|
32
32
|
import { getNodesAndEdges as getNodesAndEdgesForChannel } from '@utils/node-graphs/channel-node-graph';
|
|
33
33
|
import config from '@config';
|
|
34
|
-
import { isEventCatalogChatVisible, isDevMode, isCanvasEnabled } from '@utils/feature';
|
|
34
|
+
import { isEventCatalogChatVisible, isDevMode, isCanvasEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
35
35
|
import { CANVASES_API_PATH } from '@features/studio/api/canvases-api';
|
|
36
36
|
import { loadSavedLayout, applyLayoutToNodes, buildResourceKey } from '@utils/node-graphs/layout-persistence';
|
|
37
37
|
import { compactVisualiserGraph } from '@utils/node-graphs/compact-visualiser-graph';
|
|
@@ -268,6 +268,7 @@ if (overview && levelsOverview) {
|
|
|
268
268
|
swimlanes={lanes}
|
|
269
269
|
studioApiUrl={studioApiUrl}
|
|
270
270
|
syncRenderModeWithUrl={syncRenderModeWithUrl}
|
|
271
|
+
opensDiagrams={isVisualiserEnabled()}
|
|
271
272
|
/>
|
|
272
273
|
</div>
|
|
273
274
|
|