@eventcatalog/core 3.26.14 → 3.26.15
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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-O4MO7NDQ.js → chunk-3E57V3U3.js} +1 -1
- package/dist/{chunk-AUSHGY4E.js → chunk-76RGT53V.js} +1 -1
- package/dist/{chunk-7DFRN6DM.js → chunk-BBW2CP5O.js} +1 -1
- package/dist/{chunk-SAH3W5ID.js → chunk-GWXHXBAD.js} +1 -1
- package/dist/{chunk-55E4BFOL.js → chunk-JIVNOOE7.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +41 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BBW2CP5O.js";
|
|
4
|
+
import "../chunk-3E57V3U3.js";
|
|
5
5
|
import "../chunk-4UVFXLPI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-76RGT53V.js";
|
|
7
7
|
import "../chunk-5T63CXKU.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
114
114
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
|
-
var version = "3.26.
|
|
117
|
+
var version = "3.26.15";
|
|
118
118
|
|
|
119
119
|
// src/constants.ts
|
|
120
120
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-BBW2CP5O.js";
|
|
10
|
+
import "./chunk-3E57V3U3.js";
|
|
11
11
|
import "./chunk-4UVFXLPI.js";
|
|
12
12
|
import {
|
|
13
13
|
runMigrations
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
} from "./chunk-3KXCGYET.js";
|
|
23
23
|
import {
|
|
24
24
|
generate
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GWXHXBAD.js";
|
|
26
26
|
import {
|
|
27
27
|
logger
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JIVNOOE7.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-76RGT53V.js";
|
|
32
32
|
import {
|
|
33
33
|
getEventCatalogConfigFile,
|
|
34
34
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-GWXHXBAD.js";
|
|
4
|
+
import "./chunk-JIVNOOE7.js";
|
|
5
|
+
import "./chunk-76RGT53V.js";
|
|
6
6
|
import "./chunk-5T63CXKU.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -85,7 +85,47 @@ if (isRemote && Object.keys(resolvedHeaders).length > 0) {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
const parsed = await new Parser({ schemaParsers: [AvroSchemaParser()] }).parse(content, parserOptions);
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The AsyncAPI parser resolves all $ref pointers, which can create circular
|
|
91
|
+
* object references (e.g. oneOf/allOf discriminator patterns where child schemas
|
|
92
|
+
* reference the parent). We need to break true cycles before Astro's
|
|
93
|
+
* `define:vars` calls JSON.stringify internally.
|
|
94
|
+
*
|
|
95
|
+
* We track ancestors (not all-ever-seen objects) so that shared but
|
|
96
|
+
* non-circular references are preserved intact.
|
|
97
|
+
* See: https://github.com/event-catalog/generators/issues/364
|
|
98
|
+
*/
|
|
99
|
+
const deepCopyBreakingCycles = (value: unknown, ancestors = new WeakSet()): unknown => {
|
|
100
|
+
if (typeof value !== 'object' || value === null) return value;
|
|
101
|
+
|
|
102
|
+
if (ancestors.has(value)) {
|
|
103
|
+
const schemaId = (value as Record<string, unknown>)['x-parser-schema-id'];
|
|
104
|
+
if (schemaId && typeof schemaId === 'string') {
|
|
105
|
+
return { $ref: `#/components/schemas/${schemaId}` };
|
|
106
|
+
}
|
|
107
|
+
return { $ref: '#' };
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
ancestors.add(value);
|
|
111
|
+
|
|
112
|
+
let result: unknown;
|
|
113
|
+
if (Array.isArray(value)) {
|
|
114
|
+
result = value.map((item) => deepCopyBreakingCycles(item, ancestors));
|
|
115
|
+
} else {
|
|
116
|
+
const obj: Record<string, unknown> = {};
|
|
117
|
+
for (const [k, v] of Object.entries(value as Record<string, unknown>)) {
|
|
118
|
+
obj[k] = deepCopyBreakingCycles(v, ancestors);
|
|
119
|
+
}
|
|
120
|
+
result = obj;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
ancestors.delete(value);
|
|
124
|
+
return result;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const rawJson = parsed.document?.json();
|
|
128
|
+
const stringified = rawJson ? deepCopyBreakingCycles(rawJson) : undefined;
|
|
89
129
|
const config: ConfigInterface = { show: { sidebar: true, errors: true } };
|
|
90
130
|
|
|
91
131
|
const component = createElement(AsyncApiComponentWP, { schema: { stringified }, config });
|