@eventcatalog/core 2.56.3 → 2.56.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.
@@ -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.56.3";
40
+ var version = "2.56.4";
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-RB5C7AID.js";
4
- import "../chunk-OHDQ4LG4.js";
3
+ } from "../chunk-KASHKMSG.js";
4
+ import "../chunk-HHPUSHCO.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.56.3";
109
+ var version = "2.56.4";
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-TBYGYYON.js";
4
- import "../chunk-RB5C7AID.js";
5
- import "../chunk-OHDQ4LG4.js";
3
+ } from "../chunk-QS3LKU6Y.js";
4
+ import "../chunk-KASHKMSG.js";
5
+ import "../chunk-HHPUSHCO.js";
6
6
  import "../chunk-UPONRQSN.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.56.3";
2
+ var version = "2.56.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-OHDQ4LG4.js";
3
+ } from "./chunk-HHPUSHCO.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-RB5C7AID.js";
3
+ } from "./chunk-KASHKMSG.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.56.3";
28
+ var version = "2.56.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-OHDQ4LG4.js";
3
+ } from "./chunk-HHPUSHCO.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.56.3";
160
+ var version = "2.56.4";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -6,8 +6,8 @@ import {
6
6
  } from "./chunk-PLNJC7NZ.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-TBYGYYON.js";
10
- import "./chunk-RB5C7AID.js";
9
+ } from "./chunk-QS3LKU6Y.js";
10
+ import "./chunk-KASHKMSG.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
@@ -15,7 +15,7 @@ import {
15
15
  import "./chunk-55D645EH.js";
16
16
  import {
17
17
  VERSION
18
- } from "./chunk-OHDQ4LG4.js";
18
+ } from "./chunk-HHPUSHCO.js";
19
19
  import {
20
20
  getProjectOutDir,
21
21
  isAuthEnabled,
@@ -0,0 +1,56 @@
1
+ ---
2
+ import fs from 'fs';
3
+ import { getAbsoluteFilePathForAstroFile } from '@utils/files';
4
+ import Admonition from '@components/MDX/Admonition';
5
+
6
+ const { file: mermaidFile, filePath } = Astro.props;
7
+
8
+ // const escapeHtml = (str: string) => str.replace(/[&<>"']/g, (c) => escapeMap[c]);
9
+ let isValidMermaidFile = mermaidFile.endsWith('.mmd') || mermaidFile.endsWith('.mermaid');
10
+ let mermaidFileContent = '';
11
+
12
+ if (isValidMermaidFile) {
13
+ try {
14
+ const pathToSpec = getAbsoluteFilePathForAstroFile(filePath, mermaidFile);
15
+ mermaidFileContent = fs.readFileSync(pathToSpec, 'utf8');
16
+ } catch (error) {
17
+ console.error(`Error reading design file: ${error}`);
18
+ }
19
+ }
20
+ ---
21
+
22
+ {
23
+ !mermaidFileContent && (
24
+ <Admonition type="warning">
25
+ <div>
26
+ <span class="block font-bold">{`<MermaidFileLoader/>`} failed to load</span>
27
+ <span class="block">
28
+ Tried to load mermaid file: {mermaidFile}. Make sure you have this mermaid file defined in your project.
29
+ </span>
30
+ </div>
31
+ </Admonition>
32
+ )
33
+ }
34
+
35
+ {
36
+ !isValidMermaidFile && (
37
+ <Admonition type="warning">
38
+ <div>
39
+ <span class="block font-bold">{`<MermaidFileLoader/>`} failed to load</span>
40
+ <span class="block">
41
+ Tried to load mermaid file: {mermaidFile}. Make sure the file extension is either .mmd or .mermaid.
42
+ </span>
43
+ </div>
44
+ </Admonition>
45
+ )
46
+ }
47
+
48
+ {
49
+ mermaidFileContent && isValidMermaidFile && (
50
+ <div class="mermaid-block pb-4">
51
+ <div class="mermaid border border-gray-200 rounded-lg p-1" data-content={mermaidFileContent}>
52
+ <p>Loading graph...</p>
53
+ </div>
54
+ </div>
55
+ )
56
+ }
@@ -25,6 +25,7 @@ import Lucid from '@components/MDX/Lucid/Lucid.astro';
25
25
  import DrawIO from '@components/MDX/DrawIO/DrawIO.astro';
26
26
  import FigJam from '@components/MDX/FigJam/FigJam.astro';
27
27
  import Design from '@components/MDX/Design/Design.astro';
28
+ import MermaidFileLoader from '@components/MDX/MermaidFileLoader/MermaidFileLoader.astro';
28
29
  // Portals: required for server/client components
29
30
  import NodeGraphPortal from '@components/MDX/NodeGraph/NodeGraphPortal';
30
31
  import SchemaViewerPortal from '@components/MDX/SchemaViewer/SchemaViewerPortal';
@@ -62,6 +63,7 @@ const components = (props: any) => {
62
63
  Lucid: (mdxProp: any) => jsx(Lucid, { ...props, ...mdxProp }),
63
64
  DrawIO: (mdxProp: any) => jsx(DrawIO, { ...props, ...mdxProp }),
64
65
  FigJam: (mdxProp: any) => jsx(FigJam, { ...props, ...mdxProp }),
66
+ MermaidFileLoader: (mdxProp: any) => jsx(MermaidFileLoader, { ...props, ...mdxProp }),
65
67
  };
66
68
  };
67
69
 
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.56.3",
9
+ "version": "2.56.4",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },