@eventcatalog/core 2.19.7 → 2.19.8

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.19.7";
40
+ var version = "2.19.8";
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-3CL5OM5M.js";
4
- import "../chunk-GHC5YZDP.js";
3
+ } from "../chunk-7ZLQ4G47.js";
4
+ import "../chunk-ODEP5MMW.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.19.7";
109
+ var version = "2.19.8";
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-SBVM6HJV.js";
4
- import "../chunk-3CL5OM5M.js";
5
- import "../chunk-GHC5YZDP.js";
3
+ } from "../chunk-EOMM4FAP.js";
4
+ import "../chunk-7ZLQ4G47.js";
5
+ import "../chunk-ODEP5MMW.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-GHC5YZDP.js";
3
+ } from "./chunk-ODEP5MMW.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-3CL5OM5M.js";
3
+ } from "./chunk-7ZLQ4G47.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.19.7";
2
+ var version = "2.19.8";
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.19.7";
28
+ var version = "2.19.8";
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-GHC5YZDP.js";
3
+ } from "./chunk-ODEP5MMW.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.19.7";
164
+ var version = "2.19.8";
165
165
 
166
166
  // src/constants.ts
167
167
  var VERSION = version;
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-SHCMAL37.js";
4
4
  import {
5
5
  log_build_default
6
- } from "./chunk-SBVM6HJV.js";
7
- import "./chunk-3CL5OM5M.js";
6
+ } from "./chunk-EOMM4FAP.js";
7
+ import "./chunk-7ZLQ4G47.js";
8
8
  import {
9
9
  catalogToAstro
10
10
  } from "./chunk-WF34R5UT.js";
11
11
  import {
12
12
  VERSION
13
- } from "./chunk-GHC5YZDP.js";
13
+ } from "./chunk-ODEP5MMW.js";
14
14
  import {
15
15
  generate
16
16
  } from "./chunk-YEQVKHST.js";
@@ -45,6 +45,7 @@ try {
45
45
  const schemaPath = path.join(catalog.filePath, schemaViewerProps.file);
46
46
  const exists = existsSync(schemaPath);
47
47
  let schema;
48
+ let render = true;
48
49
 
49
50
  if (exists) {
50
51
  // Load the schema for the component
@@ -53,6 +54,10 @@ try {
53
54
  schema = yaml.load(schema);
54
55
  } else {
55
56
  schema = JSON.parse(schema);
57
+ // Lets JSON schema control if the component should be rendered or not
58
+ if (schema['x-eventcatalog-render-schema-viewer']) {
59
+ render = schema['x-eventcatalog-render-schema-viewer'];
60
+ }
56
61
  }
57
62
  }
58
63
 
@@ -62,6 +67,7 @@ try {
62
67
  schema,
63
68
  schemaPath,
64
69
  ...schemaViewerProps,
70
+ render,
65
71
  };
66
72
  });
67
73
 
@@ -75,20 +81,23 @@ try {
75
81
  <section class="space-y-4">
76
82
  {
77
83
  schemas.length > 0 &&
78
- schemas.map((schema) => (
79
- <div>
80
- {schema.exists && <SchemaViewerClient {...schema} client:only="react" />}
84
+ schemas.map((schema) => {
85
+ if (!schema.render) return null;
86
+ return (
87
+ <div>
88
+ {schema.exists && <SchemaViewerClient {...schema} client:only="react" />}
81
89
 
82
- {/* User has tried to load the schema, but it was not found on file system */}
83
- {!schema.exists && (
84
- <Admonition type="warning">
85
- <div>
86
- <span class="block font-bold">{`<SchemaViewer/>`} failed to load</span>
87
- <span class="block">Tried to load schema from {schema.schemaPath}, but no schema can be found</span>
88
- </div>
89
- </Admonition>
90
- )}
91
- </div>
92
- ))
90
+ {/* User has tried to load the schema, but it was not found on file system */}
91
+ {!schema.exists && (
92
+ <Admonition type="warning">
93
+ <div>
94
+ <span class="block font-bold">{`<SchemaViewer/>`} failed to load</span>
95
+ <span class="block">Tried to load schema from {schema.schemaPath}, but no schema can be found</span>
96
+ </div>
97
+ </Admonition>
98
+ )}
99
+ </div>
100
+ );
101
+ })
93
102
  }
94
103
  </section>
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.19.7",
9
+ "version": "2.19.8",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },