@eventcatalog/core 2.42.2 → 2.42.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.
- package/README.md +1 -1
- 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-CJI2BJQN.js → chunk-CD54ILWK.js} +1 -1
- package/dist/{chunk-7UGAOGXQ.js → chunk-QKYZ35CN.js} +1 -1
- package/dist/{chunk-JSNXGDYW.js → chunk-VBWDUTD4.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +1 -0
- package/dist/eventcatalog.config.d.ts +1 -0
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/components/Header.astro +30 -12
- package/eventcatalog/src/components/MDX/SchemaViewer/SchemaViewer.astro +16 -0
- package/eventcatalog/src/content.config.ts +1 -1
- package/eventcatalog/src/layouts/Footer.astro +36 -27
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +4 -0
- package/eventcatalog/src/utils/feature.ts +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-CD54ILWK.js";
|
|
4
|
+
import "../chunk-QKYZ35CN.js";
|
|
5
|
+
import "../chunk-VBWDUTD4.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-DCLTVJDP.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-CD54ILWK.js";
|
|
10
|
+
import "./chunk-QKYZ35CN.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
14
14
|
} from "./chunk-SLEMYHTU.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VBWDUTD4.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled,
|
|
20
20
|
isEventCatalogScaleEnabled,
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
import catalog from '@utils/eventcatalog-config/catalog';
|
|
3
3
|
import Search from '@components/Search.astro';
|
|
4
4
|
import { buildUrl } from '@utils/url-builder';
|
|
5
|
+
import { showEventCatalogBranding, showCustomBranding } from '@utils/feature';
|
|
5
6
|
|
|
6
7
|
const logo = {
|
|
7
8
|
src: ('/' + (catalog?.logo?.src || 'logo.png')).replace(/^\/+/, '/'),
|
|
8
9
|
alt: catalog?.logo?.alt || 'Event Catalog',
|
|
9
10
|
text: catalog?.logo?.text || 'EventCatalog',
|
|
10
11
|
};
|
|
12
|
+
|
|
13
|
+
const repositoryUrl = catalog?.repositoryUrl || 'https://github.com/event-catalog/eventcatalog';
|
|
11
14
|
---
|
|
12
15
|
|
|
13
16
|
<nav
|
|
@@ -28,18 +31,33 @@ const logo = {
|
|
|
28
31
|
</div>
|
|
29
32
|
|
|
30
33
|
<div class="hidden md:block w-3/12">
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
{
|
|
35
|
+
showEventCatalogBranding() && (
|
|
36
|
+
<ul class="flex space-x-8 justify-end pr-2">
|
|
37
|
+
<li>
|
|
38
|
+
<a href="https://discord.com/invite/3rjaZMmrAm">
|
|
39
|
+
<img src={buildUrl('/icons/discord.svg', true)} class="h-7 w-7" />
|
|
40
|
+
</a>
|
|
41
|
+
</li>
|
|
42
|
+
<li>
|
|
43
|
+
<a href="https://github.com/event-catalog/eventcatalog">
|
|
44
|
+
<img src={buildUrl('/icons/github.svg', true)} class="h-7 w-7" />
|
|
45
|
+
</a>
|
|
46
|
+
</li>
|
|
47
|
+
</ul>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
{
|
|
51
|
+
showCustomBranding() && !showEventCatalogBranding() && (
|
|
52
|
+
<ul class="flex space-x-8 justify-end pr-2">
|
|
53
|
+
<li>
|
|
54
|
+
<a href={repositoryUrl} class="text-gray-500 hover:text-gray-600 focus:outline-none focus:text-gray-600">
|
|
55
|
+
<img src={buildUrl('/icons/github.svg', true)} class="h-7 w-7" />
|
|
56
|
+
</a>
|
|
57
|
+
</li>
|
|
58
|
+
</ul>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
43
61
|
</div>
|
|
44
62
|
|
|
45
63
|
<div class="md:hidden">
|
|
@@ -48,6 +48,22 @@ function mergeAllOfSchemas(schema: any) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
function processSchema(schema: any) {
|
|
51
|
+
// Handle $ref
|
|
52
|
+
if (schema.$ref) {
|
|
53
|
+
// Only support local refs like "#/definitions/xyz"
|
|
54
|
+
const refPath = schema.$ref;
|
|
55
|
+
if (refPath.startsWith('#/definitions/')) {
|
|
56
|
+
const defName = refPath.replace('#/definitions/', '');
|
|
57
|
+
const definitions = schema.definitions;
|
|
58
|
+
if (definitions && definitions[defName]) {
|
|
59
|
+
// Recursively process the referenced schema
|
|
60
|
+
return processSchema(definitions[defName]);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// If not found, return as is
|
|
64
|
+
return schema;
|
|
65
|
+
}
|
|
66
|
+
|
|
51
67
|
if (schema.allOf) {
|
|
52
68
|
return mergeAllOfSchemas(schema);
|
|
53
69
|
}
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { buildUrl } from '@utils/url-builder';
|
|
3
|
+
import { showEventCatalogBranding } from '@utils/feature';
|
|
3
4
|
const { className } = Astro.props;
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
<footer class={`relative py-4 space-y-8 border-t border-gray-300 ${className}`}>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
8
|
+
{
|
|
9
|
+
showEventCatalogBranding() && (
|
|
10
|
+
<div class="flex justify-between items-center py-8 text-gray-500 text-sm font-light">
|
|
11
|
+
<div class="flex space-x-5">
|
|
12
|
+
<a href="https://github.com/event-catalog/eventcatalog" target="_blank">
|
|
13
|
+
<svg
|
|
14
|
+
class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
|
|
15
|
+
style={`mask-image: url("${buildUrl('/icons/github.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
|
|
16
|
+
/>
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://x.com/event_catalog" target="_blank">
|
|
19
|
+
<span class="sr-only">x</span>
|
|
20
|
+
<svg
|
|
21
|
+
class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
|
|
22
|
+
style={`mask-image: url("${buildUrl('/icons/x-twitter.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
|
|
23
|
+
/>
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://www.youtube.com/@event-catalog" target="_blank">
|
|
26
|
+
<span class="sr-only">x</span>
|
|
27
|
+
<svg
|
|
28
|
+
class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
|
|
29
|
+
style={`mask-image: url("${buildUrl('/icons/youtube.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
|
|
30
|
+
/>
|
|
31
|
+
</a>
|
|
32
|
+
</div>
|
|
33
|
+
<a
|
|
34
|
+
target="_blank"
|
|
35
|
+
class="hover:text-primary hover:underline text-gray-400 font-light not-prose"
|
|
36
|
+
href="https://eventcatalog.dev"
|
|
37
|
+
>
|
|
38
|
+
Powered by EventCatalog
|
|
39
|
+
</a>
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
34
43
|
</footer>
|
|
@@ -17,6 +17,19 @@ import config from '@config';
|
|
|
17
17
|
export const isEventCatalogStarterEnabled = () => process.env.EVENTCATALOG_STARTER === 'true';
|
|
18
18
|
export const isEventCatalogScaleEnabled = () => process.env.EVENTCATALOG_SCALE === 'true';
|
|
19
19
|
|
|
20
|
+
export const showEventCatalogBranding = () => {
|
|
21
|
+
const override = process.env.EVENTCATALOG_SHOW_BRANDING;
|
|
22
|
+
// if any value we return true
|
|
23
|
+
if (override) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
return !isEventCatalogStarterEnabled() && !isEventCatalogScaleEnabled();
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const showCustomBranding = () => {
|
|
30
|
+
return isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
|
|
31
|
+
};
|
|
32
|
+
|
|
20
33
|
export const isCustomDocsEnabled = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
|
|
21
34
|
export const isEventCatalogChatEnabled = () => {
|
|
22
35
|
const isFeatureEnabledFromPlan = isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
|