@eventcatalog/core 4.10.3 → 4.10.4

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.
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.10.3";
39
+ var version = "4.10.4";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-EMG2UMRO.js";
4
- import "../chunk-IXQNMM6D.js";
3
+ } from "../chunk-6S2ZIVEV.js";
4
+ import "../chunk-322TAIDG.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -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.3";
143
+ var version = "4.10.4";
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-CHJFPDIO.js";
4
- import "../chunk-EMG2UMRO.js";
3
+ } from "../chunk-2SLBVVUZ.js";
4
+ import "../chunk-6S2ZIVEV.js";
5
5
  import "../chunk-K2XIENVT.js";
6
- import "../chunk-IXQNMM6D.js";
6
+ import "../chunk-322TAIDG.js";
7
7
  import "../chunk-6QENHZZP.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-EMG2UMRO.js";
3
+ } from "./chunk-6S2ZIVEV.js";
4
4
  import {
5
5
  countResources,
6
6
  serializeCounts
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.10.3";
2
+ var version = "4.10.4";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-IXQNMM6D.js";
3
+ } from "./chunk-322TAIDG.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-J5IBDCGW.js";
3
+ } from "./chunk-T5XTOY52.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-IXQNMM6D.js";
3
+ } from "./chunk-322TAIDG.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "4.10.3";
28
+ var version = "4.10.4";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-IXQNMM6D.js";
3
+ } from "./chunk-322TAIDG.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -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.3";
147
+ var version = "4.10.4";
148
148
 
149
149
  // src/constants.ts
150
150
  var VERSION = version;
@@ -4,8 +4,8 @@ import {
4
4
  import "./chunk-CA4U2JP7.js";
5
5
  import {
6
6
  log_build_default
7
- } from "./chunk-CHJFPDIO.js";
8
- import "./chunk-EMG2UMRO.js";
7
+ } from "./chunk-2SLBVVUZ.js";
8
+ import "./chunk-6S2ZIVEV.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-EHN2WS7S.js";
34
+ } from "./chunk-S3J4N5ZP.js";
35
35
  import {
36
36
  logger
37
- } from "./chunk-J5IBDCGW.js";
37
+ } from "./chunk-T5XTOY52.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-IXQNMM6D.js";
57
+ } from "./chunk-322TAIDG.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.3";
111
+ var version = "4.10.4";
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-EHN2WS7S.js";
4
- import "./chunk-J5IBDCGW.js";
5
- import "./chunk-IXQNMM6D.js";
3
+ } from "./chunk-S3J4N5ZP.js";
4
+ import "./chunk-T5XTOY52.js";
5
+ import "./chunk-322TAIDG.js";
6
6
  import "./chunk-6QENHZZP.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.10.3";
39
+ var version = "4.10.4";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-J5IBDCGW.js";
4
- import "../chunk-IXQNMM6D.js";
3
+ } from "../chunk-T5XTOY52.js";
4
+ import "../chunk-322TAIDG.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -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@10/dist/mermaid.esm.min.mjs');
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 iconPacksToRegister = iconPacks.map((name: string) => ({
571
- name,
572
- icons,
573
- }));
574
- mermaid.registerIconPacks(iconPacksToRegister);
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.3",
10
+ "version": "4.10.4",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -119,9 +119,9 @@
119
119
  "update-notifier": "^7.3.1",
120
120
  "uuid": "^11.1.1",
121
121
  "zod": "^4.3.6",
122
- "@eventcatalog/linter": "1.1.17",
123
122
  "@eventcatalog/sdk": "2.28.1",
124
- "@eventcatalog/visualiser": "^4.1.3"
123
+ "@eventcatalog/visualiser": "^4.1.3",
124
+ "@eventcatalog/linter": "1.1.17"
125
125
  },
126
126
  "devDependencies": {
127
127
  "@astrojs/check": "^0.9.10",