@eventcatalog/core 4.10.3 → 4.10.5
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/count-resources.cjs +32 -0
- package/dist/analytics/count-resources.d.cts +9 -1
- package/dist/analytics/count-resources.d.ts +9 -1
- package/dist/analytics/count-resources.js +3 -1
- package/dist/analytics/log-build.cjs +30 -3
- package/dist/analytics/log-build.d.cts +2 -1
- package/dist/analytics/log-build.d.ts +2 -1
- package/dist/analytics/log-build.js +4 -4
- package/dist/{chunk-J5IBDCGW.js → chunk-7PXZNQPR.js} +1 -1
- package/dist/{chunk-EMG2UMRO.js → chunk-GLEQKW6W.js} +1 -1
- package/dist/{chunk-EHN2WS7S.js → chunk-JE6ZSCPU.js} +1 -1
- package/dist/{chunk-CHJFPDIO.js → chunk-NWWGCVSE.js} +12 -4
- package/dist/{chunk-IXQNMM6D.js → chunk-RX2XDKHZ.js} +1 -1
- package/dist/{chunk-K2XIENVT.js → chunk-ZAZHAVKB.js} +21 -0
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +277 -243
- package/dist/eventcatalog.js +14 -7
- 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/auth.config.ts +5 -0
- package/eventcatalog/src/pages/diagrams/[id]/[version]/embed.astro +23 -1
- package/eventcatalog/src/utils/mermaid-zoom.ts +38 -6
- package/package.json +4 -4
package/dist/eventcatalog.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
import "./chunk-CA4U2JP7.js";
|
|
5
5
|
import {
|
|
6
6
|
log_build_default
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-NWWGCVSE.js";
|
|
8
|
+
import "./chunk-GLEQKW6W.js";
|
|
9
|
+
import "./chunk-ZAZHAVKB.js";
|
|
10
10
|
import {
|
|
11
11
|
FederationConflictError,
|
|
12
12
|
FederationDiagnosticError,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
} from "./chunk-B7HCX5HM.js";
|
|
32
32
|
import {
|
|
33
33
|
generate
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JE6ZSCPU.js";
|
|
35
35
|
import {
|
|
36
36
|
logger
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7PXZNQPR.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-RX2XDKHZ.js";
|
|
58
58
|
import {
|
|
59
59
|
linkCoreNodeModules,
|
|
60
60
|
resolveInstalledCoreNodeModules
|
|
@@ -906,6 +906,12 @@ program.command("dev").description("Run development server of EventCatalog").opt
|
|
|
906
906
|
);
|
|
907
907
|
const isEventCatalogStarter = await isEventCatalogStarterEnabled();
|
|
908
908
|
const isEventCatalogScale = await isEventCatalogScaleEnabled();
|
|
909
|
+
void log_build_default(dir, {
|
|
910
|
+
isEventCatalogStarterEnabled: isEventCatalogStarter,
|
|
911
|
+
isEventCatalogScaleEnabled: isEventCatalogScale,
|
|
912
|
+
isBackstagePluginEnabled: canEmbedPages || isEventCatalogScale,
|
|
913
|
+
command: "dev"
|
|
914
|
+
});
|
|
909
915
|
if (isServer) {
|
|
910
916
|
try {
|
|
911
917
|
logger.info("Building fields index...", "fields");
|
|
@@ -981,7 +987,8 @@ program.command("build").description("Run build of EventCatalog").action(async (
|
|
|
981
987
|
await log_build_default(dir, {
|
|
982
988
|
isEventCatalogStarterEnabled: isEventCatalogStarter,
|
|
983
989
|
isEventCatalogScaleEnabled: isEventCatalogScale,
|
|
984
|
-
isBackstagePluginEnabled: canEmbedPages || isEventCatalogScale
|
|
990
|
+
isBackstagePluginEnabled: canEmbedPages || isEventCatalogScale,
|
|
991
|
+
command: "build"
|
|
985
992
|
});
|
|
986
993
|
await resolve_catalog_dependencies_default(dir, core);
|
|
987
994
|
await runMigrations(dir);
|
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.5";
|
|
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-JE6ZSCPU.js";
|
|
4
|
+
import "./chunk-7PXZNQPR.js";
|
|
5
|
+
import "./chunk-RX2XDKHZ.js";
|
|
6
6
|
import "./chunk-6QENHZZP.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -22,8 +22,13 @@ const getAuthProviders = async () => {
|
|
|
22
22
|
// GitHub provider
|
|
23
23
|
if (authConfig.providers?.github) {
|
|
24
24
|
const githubConfig = authConfig.providers.github;
|
|
25
|
+
// GitHub sends an RFC 9207 `iss` parameter on OAuth callbacks. Pin the issuer so
|
|
26
|
+
// validation works even when the resolved @auth/core copy predates the upstream
|
|
27
|
+
// default (auth-astro's peer range can hoist an older @auth/core in user projects).
|
|
28
|
+
const githubBaseUrl = githubConfig?.enterprise?.baseUrl ?? 'https://github.com';
|
|
25
29
|
providers.push(
|
|
26
30
|
GitHub({
|
|
31
|
+
issuer: `${githubBaseUrl}/login/oauth`,
|
|
27
32
|
...githubConfig,
|
|
28
33
|
})
|
|
29
34
|
);
|
|
@@ -567,9 +567,31 @@ const diagramId = props.data.id;
|
|
|
567
567
|
const graphs = document.getElementsByClassName('mermaid');
|
|
568
568
|
if (graphs.length === 0) return;
|
|
569
569
|
|
|
570
|
-
const { default: mermaid } = await import('https://cdn.jsdelivr.net/npm/mermaid@
|
|
570
|
+
const { default: mermaid } = await import('https://cdn.jsdelivr.net/npm/mermaid@11.16.1/dist/mermaid.esm.min.mjs');
|
|
571
571
|
const isDarkMode = document.documentElement.getAttribute('data-theme') === 'dark';
|
|
572
572
|
|
|
573
|
+
const iconPacks = window.eventcatalog?.mermaid?.iconPacks || [];
|
|
574
|
+
if (iconPacks.length > 0) {
|
|
575
|
+
mermaid.registerIconPacks(
|
|
576
|
+
iconPacks.map((name) => ({
|
|
577
|
+
name,
|
|
578
|
+
loader: () =>
|
|
579
|
+
fetch(`https://cdn.jsdelivr.net/npm/@iconify-json/${name}@1/icons.json`)
|
|
580
|
+
.then((res) => {
|
|
581
|
+
if (!res.ok) {
|
|
582
|
+
console.error(`[EventCatalog] Failed to load icon pack "${name}" from CDN (HTTP ${res.status})`);
|
|
583
|
+
return null;
|
|
584
|
+
}
|
|
585
|
+
return res.json();
|
|
586
|
+
})
|
|
587
|
+
.catch((err) => {
|
|
588
|
+
console.error(`[EventCatalog] Error loading icon pack "${name}":`, err);
|
|
589
|
+
return null;
|
|
590
|
+
}),
|
|
591
|
+
}))
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
|
|
573
595
|
mermaid.initialize({
|
|
574
596
|
maxTextSize: window.eventcatalog?.mermaid?.maxTextSize || 100000,
|
|
575
597
|
startOnLoad: false,
|
|
@@ -14,6 +14,9 @@ const zoomInstances = new Map<string, any>();
|
|
|
14
14
|
const resizeObservers = new Map<string, ResizeObserver>();
|
|
15
15
|
const fullscreenHandlers = new Map<string, () => void>();
|
|
16
16
|
|
|
17
|
+
// Track registered icon pack names to avoid re-registering on subsequent renders
|
|
18
|
+
const registeredIconPacks = new Set<string>();
|
|
19
|
+
|
|
17
20
|
// Abort flag for cancelling in-progress renders during cleanup
|
|
18
21
|
let renderingAborted = false;
|
|
19
22
|
|
|
@@ -550,6 +553,35 @@ export async function initMermaidZoom(
|
|
|
550
553
|
}
|
|
551
554
|
}
|
|
552
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Builds the mermaid `registerIconPacks` descriptor array for a list of Iconify pack names.
|
|
558
|
+
*
|
|
559
|
+
* - `logos` is resolved from the bundled `@iconify-json/logos` package (no network request).
|
|
560
|
+
* - Every other name is fetched lazily from jsDelivr so only the packs that are actually used
|
|
561
|
+
* in a diagram trigger a network request.
|
|
562
|
+
*/
|
|
563
|
+
export function buildIconPackDescriptors(iconPacks: string[]): Array<{ name: string; loader: () => Promise<any> }> {
|
|
564
|
+
return iconPacks.map((name) => ({
|
|
565
|
+
name,
|
|
566
|
+
loader:
|
|
567
|
+
name === 'logos'
|
|
568
|
+
? () => import('@iconify-json/logos').then((m) => m.icons)
|
|
569
|
+
: () =>
|
|
570
|
+
fetch(`https://cdn.jsdelivr.net/npm/@iconify-json/${name}@1/icons.json`)
|
|
571
|
+
.then((res) => {
|
|
572
|
+
if (!res.ok) {
|
|
573
|
+
console.error(`[EventCatalog] Failed to load icon pack "${name}" from CDN (HTTP ${res.status})`);
|
|
574
|
+
return null;
|
|
575
|
+
}
|
|
576
|
+
return res.json();
|
|
577
|
+
})
|
|
578
|
+
.catch((err) => {
|
|
579
|
+
console.error(`[EventCatalog] Error loading icon pack "${name}":`, err);
|
|
580
|
+
return null;
|
|
581
|
+
}),
|
|
582
|
+
}));
|
|
583
|
+
}
|
|
584
|
+
|
|
553
585
|
/**
|
|
554
586
|
* High-level function to render Mermaid diagrams with zoom
|
|
555
587
|
*/
|
|
@@ -563,15 +595,15 @@ export async function renderMermaidWithZoom(graphs: HTMLCollectionOf<Element>, m
|
|
|
563
595
|
|
|
564
596
|
// Apply any custom mermaid configuration
|
|
565
597
|
if (mermaidConfig) {
|
|
566
|
-
const { icons } = await import('@iconify-json/logos');
|
|
567
598
|
const { iconPacks = [], enableSupportForElkLayout = false } = mermaidConfig;
|
|
568
599
|
|
|
569
600
|
if (iconPacks.length > 0) {
|
|
570
|
-
const
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
601
|
+
const newPacks: string[] = (iconPacks as string[]).filter((name: string) => !registeredIconPacks.has(name));
|
|
602
|
+
|
|
603
|
+
if (newPacks.length > 0) {
|
|
604
|
+
mermaid.registerIconPacks(buildIconPackDescriptors(newPacks));
|
|
605
|
+
newPacks.forEach((name: string) => registeredIconPacks.add(name));
|
|
606
|
+
}
|
|
575
607
|
}
|
|
576
608
|
|
|
577
609
|
if (enableSupportForElkLayout) {
|
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.
|
|
10
|
+
"version": "4.10.5",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@tanstack/react-table": "^8.17.3",
|
|
62
62
|
"@xyflow/react": "^12.3.6",
|
|
63
63
|
"ai": "^6.0.17",
|
|
64
|
-
"astro": "
|
|
64
|
+
"astro": "7.2.8",
|
|
65
65
|
"astro-expressive-code": "^0.44.0",
|
|
66
66
|
"astro-seo": "^0.8.4",
|
|
67
67
|
"auth-astro": "^4.2.0",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"uuid": "^11.1.1",
|
|
121
121
|
"zod": "^4.3.6",
|
|
122
122
|
"@eventcatalog/linter": "1.1.17",
|
|
123
|
-
"@eventcatalog/
|
|
124
|
-
"@eventcatalog/
|
|
123
|
+
"@eventcatalog/visualiser": "^4.1.3",
|
|
124
|
+
"@eventcatalog/sdk": "2.28.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@astrojs/check": "^0.9.10",
|