@eventcatalog/core 2.18.0 → 2.18.2

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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.18.0";
40
+ var version = "2.18.2";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-PXBZMWYY.js";
4
- import "../chunk-XDIRGQ5U.js";
3
+ } from "../chunk-JG77VIA4.js";
4
+ import "../chunk-RF2R7CRK.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.18.0";
109
+ var version = "2.18.2";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-BOJXPVWN.js";
4
- import "../chunk-PXBZMWYY.js";
5
- import "../chunk-XDIRGQ5U.js";
3
+ } from "../chunk-PSMNZFCI.js";
4
+ import "../chunk-JG77VIA4.js";
5
+ import "../chunk-RF2R7CRK.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-XDIRGQ5U.js";
3
+ } from "./chunk-RF2R7CRK.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-PXBZMWYY.js";
3
+ } from "./chunk-JG77VIA4.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.18.0";
2
+ var version = "2.18.2";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.18.0";
28
+ var version = "2.18.2";
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-XDIRGQ5U.js";
3
+ } from "./chunk-RF2R7CRK.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
161
161
  var import_os = __toESM(require("os"), 1);
162
162
 
163
163
  // package.json
164
- var version = "2.18.0";
164
+ var version = "2.18.2";
165
165
 
166
166
  // src/constants.ts
167
167
  var VERSION = version;
@@ -40,6 +40,9 @@ interface Config {
40
40
  services?: ResourceDependency[];
41
41
  domains?: ResourceDependency[];
42
42
  };
43
+ mermaid?: {
44
+ iconPacks?: string[];
45
+ };
43
46
  }
44
47
 
45
48
  export type { Config };
@@ -40,6 +40,9 @@ interface Config {
40
40
  services?: ResourceDependency[];
41
41
  domains?: ResourceDependency[];
42
42
  };
43
+ mermaid?: {
44
+ iconPacks?: string[];
45
+ };
43
46
  }
44
47
 
45
48
  export type { Config };
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-SHCMAL37.js";
4
4
  import {
5
5
  log_build_default
6
- } from "./chunk-BOJXPVWN.js";
7
- import "./chunk-PXBZMWYY.js";
6
+ } from "./chunk-PSMNZFCI.js";
7
+ import "./chunk-JG77VIA4.js";
8
8
  import {
9
9
  catalogToAstro
10
10
  } from "./chunk-WF34R5UT.js";
11
11
  import {
12
12
  VERSION
13
- } from "./chunk-XDIRGQ5U.js";
13
+ } from "./chunk-RF2R7CRK.js";
14
14
  import {
15
15
  generate
16
16
  } from "./chunk-YEQVKHST.js";
@@ -17,6 +17,7 @@
17
17
  "@asyncapi/react-component": "^2.4.3",
18
18
  "@headlessui/react": "^2.0.3",
19
19
  "@heroicons/react": "^2.1.3",
20
+ "@iconify-json/logos": "^1.2.4",
20
21
  "@stoplight/json-schema-viewer": "^4.7.0",
21
22
  "@stoplight/mosaic": "^1.53.2",
22
23
  "@tailwindcss/typography": "^0.5.13",
@@ -1359,6 +1360,14 @@
1359
1360
  "react": ">= 16 || ^19.0.0-rc"
1360
1361
  }
1361
1362
  },
1363
+ "node_modules/@iconify-json/logos": {
1364
+ "version": "1.2.4",
1365
+ "resolved": "https://registry.npmjs.org/@iconify-json/logos/-/logos-1.2.4.tgz",
1366
+ "integrity": "sha512-XC4If5D/hbaZvUkTV8iaZuGlQCyG6CNOlaAaJaGa13V5QMYwYjgtKk3vPP8wz3wtTVNVEVk3LRx1fOJz+YnSMw==",
1367
+ "dependencies": {
1368
+ "@iconify/types": "*"
1369
+ }
1370
+ },
1362
1371
  "node_modules/@iconify/types": {
1363
1372
  "version": "2.0.0",
1364
1373
  "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
@@ -26,6 +26,7 @@
26
26
  "@asyncapi/react-component": "^2.4.3",
27
27
  "@headlessui/react": "^2.0.3",
28
28
  "@heroicons/react": "^2.1.3",
29
+ "@iconify-json/logos": "^1.2.4",
29
30
  "@stoplight/json-schema-viewer": "^4.7.0",
30
31
  "@stoplight/mosaic": "^1.53.2",
31
32
  "@tailwindcss/typography": "^0.5.13",
@@ -21,6 +21,8 @@ import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
21
21
  import { ViewTransitions } from 'astro:transitions';
22
22
  import { ArrowsRightLeftIcon } from '@heroicons/react/20/solid';
23
23
 
24
+ import config from '@config';
25
+
24
26
  type PageTypesWithFlows = PageTypes | 'flows';
25
27
 
26
28
  export async function getStaticPaths() {
@@ -229,21 +231,29 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
229
231
  <style is:global>
230
232
  .docs-layout .prose {
231
233
  max-width: none;
232
- /* max-height: 80vh; */
233
234
  overflow: auto;
234
235
  }
235
236
 
236
237
  .mermaid svg {
237
238
  margin: 1em auto 2em;
238
239
  }
240
+
241
+ /* Fix for architecture diagrams */
242
+ .mermaid[data-content*='architecture'] svg {
243
+ max-width: 350px !important;
244
+ margin: 0;
245
+ /* width: 100px !important; */
246
+ }
239
247
  </style>
240
248
 
241
- <script define:vars={{ props }}>
249
+ <script define:vars={{ props, config }}>
242
250
  // Fix to pass information to componets that are client side only
243
251
  // and require catalog information
244
252
  window.eventcatalog = {};
245
253
  // @ts-ignore
246
254
  window.eventcatalog[`${props.collection}-${props.data.id}`] = props.catalog;
255
+
256
+ window.eventcatalog.mermaid = config.mermaid;
247
257
  </script>
248
258
 
249
259
  <script>
@@ -260,6 +270,23 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
260
270
  */
261
271
  async function renderDiagrams(graphs: any) {
262
272
  const { default: mermaid } = await import('mermaid');
273
+
274
+ if (window.eventcatalog.mermaid) {
275
+ const { icons } = await import('@iconify-json/logos');
276
+ const { iconPacks = [] } = window.eventcatalog.mermaid ?? {};
277
+
278
+ if (iconPacks.length > 0) {
279
+ const iconPacksToRegister = iconPacks.map((name: string) => {
280
+ return {
281
+ name,
282
+ icons,
283
+ };
284
+ });
285
+
286
+ mermaid.registerIconPacks(iconPacksToRegister);
287
+ }
288
+ }
289
+
263
290
  mermaid.initialize({
264
291
  // fontSize: 2,
265
292
  flowchart: {
@@ -271,6 +298,9 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
271
298
  fontFamily: 'var(--sans-font)',
272
299
  // @ts-ignore This works, but TS expects a enum for some reason
273
300
  theme: 'light',
301
+ architecture: {
302
+ useMaxWidth: true,
303
+ },
274
304
  });
275
305
 
276
306
  for (const graph of graphs) {
@@ -20,10 +20,10 @@ let cachedDomains: Record<string, Domain[]> = {
20
20
  export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise<Domain[]> => {
21
21
  const cacheKey = getAllVersions ? 'allVersions' : 'currentVersions';
22
22
 
23
- // Check if we have cached domains for this specific getAllVersions value
24
- if (cachedDomains[cacheKey].length > 0) {
25
- return cachedDomains[cacheKey];
26
- }
23
+ // // Check if we have cached domains for this specific getAllVersions value
24
+ // if (cachedDomains[cacheKey].length > 0) {
25
+ // return cachedDomains[cacheKey];
26
+ // }
27
27
 
28
28
  // Get all the domains that are not versioned
29
29
  const domains = await getCollection('domains', (domain) => {
@@ -69,10 +69,10 @@ export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise
69
69
  };
70
70
 
71
71
  export const getUbiquitousLanguage = async (domain: Domain): Promise<UbiquitousLanguage[]> => {
72
- const { collection, data, slug } = domain;
72
+ const { collection, data } = domain;
73
73
 
74
74
  const ubiquitousLanguages = await getCollection('ubiquitousLanguages', (ubiquitousLanguage) => {
75
- return ubiquitousLanguage.id.includes(`${collection}/${data.name}`);
75
+ return ubiquitousLanguage.id.toLowerCase().includes(`${collection}/${data.name}`.toLowerCase());
76
76
  });
77
77
 
78
78
  return ubiquitousLanguages;
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.18.0",
9
+ "version": "2.18.2",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -49,6 +49,7 @@
49
49
  "@asyncapi/react-component": "^2.4.3",
50
50
  "@headlessui/react": "^2.0.3",
51
51
  "@heroicons/react": "^2.1.3",
52
+ "@iconify-json/logos": "^1.2.4",
52
53
  "@parcel/watcher": "^2.4.1",
53
54
  "@stoplight/json-schema-viewer": "^4.7.0",
54
55
  "@stoplight/mosaic": "^1.53.2",