@eventcatalog/core 4.7.0 → 4.7.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.
@@ -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.7.0";
39
+ var version = "4.7.2";
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-ZU5WMIH4.js";
4
- import "../chunk-3HMY77MN.js";
3
+ } from "../chunk-CWVGSEON.js";
4
+ import "../chunk-YTT25224.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.7.0";
143
+ var version = "4.7.2";
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-WJVRBHVC.js";
3
+ } from "../chunk-5QOWJT54.js";
4
4
  import "../chunk-K2XIENVT.js";
5
- import "../chunk-ZU5WMIH4.js";
6
- import "../chunk-3HMY77MN.js";
5
+ import "../chunk-CWVGSEON.js";
6
+ import "../chunk-YTT25224.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
  VERSION
3
- } from "./chunk-3HMY77MN.js";
3
+ } from "./chunk-YTT25224.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-K2XIENVT.js";
5
5
  import {
6
6
  raiseEvent
7
- } from "./chunk-ZU5WMIH4.js";
7
+ } from "./chunk-CWVGSEON.js";
8
8
  import {
9
9
  getEventCatalogConfigFile,
10
10
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3HMY77MN.js";
3
+ } from "./chunk-YTT25224.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-HRSTURLY.js";
3
+ } from "./chunk-2ERJ2Z5B.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.7.0";
2
+ var version = "4.7.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 = "4.7.0";
28
+ var version = "4.7.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-3HMY77MN.js";
3
+ } from "./chunk-YTT25224.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.7.0";
147
+ var version = "4.7.2";
148
148
 
149
149
  // src/constants.ts
150
150
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log_build_default
3
- } from "./chunk-WJVRBHVC.js";
3
+ } from "./chunk-5QOWJT54.js";
4
4
  import "./chunk-K2XIENVT.js";
5
5
  import {
6
6
  FederationConflictError,
@@ -21,10 +21,10 @@ import {
21
21
  } from "./chunk-B7HCX5HM.js";
22
22
  import {
23
23
  generate
24
- } from "./chunk-CZ6C3FBV.js";
24
+ } from "./chunk-FTNXTYFU.js";
25
25
  import {
26
26
  logger
27
- } from "./chunk-HRSTURLY.js";
27
+ } from "./chunk-2ERJ2Z5B.js";
28
28
  import {
29
29
  resolve_catalog_dependencies_default
30
30
  } from "./chunk-LHR4G2UO.js";
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  watch
36
36
  } from "./chunk-CAJUIMDJ.js";
37
- import "./chunk-ZU5WMIH4.js";
37
+ import "./chunk-CWVGSEON.js";
38
38
  import {
39
39
  createAstroDevLineFilter,
40
40
  createAstroLineFilter
@@ -45,7 +45,7 @@ import {
45
45
  import "./chunk-W5JQON7Z.js";
46
46
  import {
47
47
  VERSION
48
- } from "./chunk-3HMY77MN.js";
48
+ } from "./chunk-YTT25224.js";
49
49
  import {
50
50
  linkCoreNodeModules,
51
51
  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.7.0";
111
+ var version = "4.7.2";
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-CZ6C3FBV.js";
4
- import "./chunk-HRSTURLY.js";
5
- import "./chunk-3HMY77MN.js";
3
+ } from "./chunk-FTNXTYFU.js";
4
+ import "./chunk-2ERJ2Z5B.js";
5
+ import "./chunk-YTT25224.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.7.0";
39
+ var version = "4.7.2";
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-HRSTURLY.js";
4
- import "../chunk-3HMY77MN.js";
3
+ } from "../chunk-2ERJ2Z5B.js";
4
+ import "../chunk-YTT25224.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -128,6 +128,19 @@ const rawJson = parsed.document?.json();
128
128
  const stringified = rawJson ? deepCopyBreakingCycles(rawJson) : undefined;
129
129
  const config: ConfigInterface = { show: { sidebar: true, errors: true } };
130
130
 
131
+ // When the document fails to parse there is nothing to render. Surface the parser
132
+ // diagnostics instead of leaving the page blank.
133
+ const parseErrors = parsed.document
134
+ ? []
135
+ : parsed.diagnostics
136
+ .filter((diagnostic) => diagnostic.severity === 0)
137
+ .map((diagnostic) => ({
138
+ code: String(diagnostic.code),
139
+ message: diagnostic.message,
140
+ path: diagnostic.path?.join('.') ?? '',
141
+ }));
142
+ const failedToParse = !parsed.document;
143
+
131
144
  const component = createElement(AsyncApiComponentWP, { schema: { stringified }, config });
132
145
  const renderedComponent = renderToString(component);
133
146
 
@@ -177,7 +190,28 @@ const pagefindAttributes =
177
190
  </div>
178
191
  )
179
192
  }
180
- <div id="asyncapi" class="not-prose" set:html={renderedComponent} />
193
+ {
194
+ failedToParse ? (
195
+ <div class="not-prose mx-auto my-12 max-w-3xl rounded-lg border border-red-300 bg-[rgb(var(--ec-card-bg))] p-6">
196
+ <h3 class="text-lg font-semibold text-red-600">Unable to render this AsyncAPI specification</h3>
197
+ <p class="mt-2 text-sm text-[rgb(var(--ec-page-text))]">
198
+ The specification file <code class="font-mono">{fileName}</code> is not a valid AsyncAPI document. Fix the errors
199
+ below and rebuild your catalog.
200
+ </p>
201
+ <ul class="mt-4 space-y-3">
202
+ {parseErrors.map((error) => (
203
+ <li class="rounded-md border border-[rgb(var(--ec-page-border))] p-3 text-sm">
204
+ <span class="font-mono font-semibold text-red-600">{error.code}</span>
205
+ <p class="mt-1 text-[rgb(var(--ec-page-text))]">{error.message}</p>
206
+ {error.path && <p class="mt-1 font-mono text-xs text-[rgb(var(--ec-page-text-muted))]">at {error.path}</p>}
207
+ </li>
208
+ ))}
209
+ </ul>
210
+ </div>
211
+ ) : (
212
+ <div id="asyncapi" class="not-prose" set:html={renderedComponent} />
213
+ )
214
+ }
181
215
  </div>
182
216
  </VerticalSideBarLayout>
183
217
 
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "4.7.0",
10
+ "version": "4.7.2",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -119,8 +119,8 @@
119
119
  "update-notifier": "^7.3.1",
120
120
  "uuid": "^11.1.1",
121
121
  "zod": "^4.3.6",
122
- "@eventcatalog/linter": "1.1.11",
123
122
  "@eventcatalog/sdk": "2.27.2",
123
+ "@eventcatalog/linter": "1.1.12",
124
124
  "@eventcatalog/visualiser": "^4.1.3"
125
125
  },
126
126
  "devDependencies": {