@eventcatalog/core 2.28.3 → 2.29.1
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-EMGVI2N7.js → chunk-OXENAILQ.js} +1 -1
- package/dist/{chunk-OLUQUKIU.js → chunk-UMSVZL34.js} +1 -1
- package/dist/{chunk-MLOKQD4T.js → chunk-YKQAIHRX.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 +3 -3
- package/eventcatalog/src/components/SideNav/ListViewSideBar/index.tsx +31 -2
- package/eventcatalog/src/components/SideNav/ListViewSideBar/types.ts +5 -0
- package/eventcatalog/src/components/SideNav/ListViewSideBar/utils.ts +1 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +4 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/OpenAPI.tsx +33 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/_styles.css +6 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/index.astro +4 -80
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +2 -2
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-YKQAIHRX.js";
|
|
4
|
+
import "../chunk-UMSVZL34.js";
|
|
5
|
+
import "../chunk-OXENAILQ.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,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-WUCY3QHK.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-YKQAIHRX.js";
|
|
10
|
+
import "./chunk-UMSVZL34.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro
|
|
13
13
|
} from "./chunk-R2NILSWL.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OXENAILQ.js";
|
|
17
17
|
import {
|
|
18
18
|
isBackstagePluginEnabled
|
|
19
19
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -81,9 +81,38 @@ const ServiceItem = React.memo(
|
|
|
81
81
|
window.location.href.includes(`serviceId=${item.id}`) ? 'bg-purple-100' : 'hover:bg-purple-100'
|
|
82
82
|
}`}
|
|
83
83
|
>
|
|
84
|
-
<span className="truncate">Architecture</span>
|
|
84
|
+
<span className="truncate flex items-center gap-1">Architecture</span>
|
|
85
85
|
</a>
|
|
86
|
-
|
|
86
|
+
{item.specifications && item.specifications.asyncapiPath && (
|
|
87
|
+
<a
|
|
88
|
+
href={buildUrl(`/docs/services/${item.id}/${item.version}/asyncapi`)}
|
|
89
|
+
className={`flex items-center px-2 py-1.5 text-xs text-gray-600 hover:bg-purple-100 rounded-md flex justify-between ${
|
|
90
|
+
window.location.href.includes(`docs/services/${item.id}/${item.version}/asyncapi`)
|
|
91
|
+
? 'bg-purple-100'
|
|
92
|
+
: 'hover:bg-purple-100'
|
|
93
|
+
}`}
|
|
94
|
+
>
|
|
95
|
+
<span className="truncate flex items-center gap-1">AsyncAPI specification</span>
|
|
96
|
+
<span className="text-purple-600 ml-2 text-[10px] uppercase font-medium bg-gray-50 px-4 py-0.5 rounded">
|
|
97
|
+
<img src={buildUrl('/icons/asyncapi.svg', true)} className="w-4 h-4" />
|
|
98
|
+
</span>
|
|
99
|
+
</a>
|
|
100
|
+
)}
|
|
101
|
+
{item.specifications && item.specifications.openapiPath && (
|
|
102
|
+
<a
|
|
103
|
+
href={buildUrl(`/docs/services/${item.id}/${item.version}/spec`)}
|
|
104
|
+
className={`items-center px-2 py-1.5 text-xs text-gray-600 hover:bg-purple-100 rounded-md flex justify-between ${
|
|
105
|
+
window.location.href.includes(`docs/services/${item.id}/${item.version}/spec`)
|
|
106
|
+
? 'bg-purple-100'
|
|
107
|
+
: 'hover:bg-purple-100'
|
|
108
|
+
}`}
|
|
109
|
+
>
|
|
110
|
+
<span className="truncate flex items-center gap-1">OpenAPI specification</span>
|
|
111
|
+
<span className="text-green-600 ml-2 text-[10px] uppercase font-medium bg-gray-50 px-4 py-0.5 rounded">
|
|
112
|
+
<img src={buildUrl('/icons/openapi.svg', true)} className="w-4 h-4" />
|
|
113
|
+
</span>
|
|
114
|
+
</a>
|
|
115
|
+
)}
|
|
87
116
|
<CollapsibleGroup
|
|
88
117
|
isCollapsed={collapsedGroups[`${item.href}-receives`]}
|
|
89
118
|
onToggle={() => toggleGroupCollapse(`${item.href}-receives`)}
|
|
@@ -15,8 +15,13 @@ export interface ServiceItem {
|
|
|
15
15
|
label: string;
|
|
16
16
|
name: string;
|
|
17
17
|
id: string;
|
|
18
|
+
version: string;
|
|
18
19
|
sends: MessageItem[];
|
|
19
20
|
receives: MessageItem[];
|
|
21
|
+
specifications?: {
|
|
22
|
+
asyncapiPath: string;
|
|
23
|
+
openapiPath: string;
|
|
24
|
+
};
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
interface DomainItem {
|
|
@@ -67,6 +67,7 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
|
|
|
67
67
|
services: item.collection === 'domains' ? item.data.services : null,
|
|
68
68
|
sends: sendsWithHref,
|
|
69
69
|
receives: receivesWithHref,
|
|
70
|
+
specifications: item.collection === 'services' ? item.data.specifications : null,
|
|
70
71
|
};
|
|
71
72
|
|
|
72
73
|
group.push(navigationItem);
|
|
@@ -9,7 +9,9 @@ import { BookOpenText, Workflow, TableProperties, House, BookUser, MessageSquare
|
|
|
9
9
|
import Header from '../components/Header.astro';
|
|
10
10
|
import SEO from '../components/Seo.astro';
|
|
11
11
|
import SideNav from '../components/SideNav/SideNav.astro';
|
|
12
|
-
|
|
12
|
+
import '@fontsource/inter';
|
|
13
|
+
import '@fontsource/inter/400.css'; // Specify weight
|
|
14
|
+
import '@fontsource/inter/700.css'; // Specify weight
|
|
13
15
|
|
|
14
16
|
import { getCommands } from '@utils/commands';
|
|
15
17
|
import { getDomains } from '@utils/collections/domains';
|
|
@@ -251,7 +253,7 @@ const canPageBeEmbedded = process.env.ENABLE_EMBED === 'true';
|
|
|
251
253
|
const currentPath = window.location.href;
|
|
252
254
|
|
|
253
255
|
// Hide the sidebar if the current navigation item is not a sidebar item
|
|
254
|
-
if (!currentNavigationItem.sidebar
|
|
256
|
+
if (!currentNavigationItem.sidebar) {
|
|
255
257
|
sidebar.style.display = 'none';
|
|
256
258
|
content.style.width = '100%';
|
|
257
259
|
content.classList.add('ml-16');
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { ApiReferenceReact } from '@scalar/api-reference-react';
|
|
3
|
+
import '@scalar/api-reference-react/style.css';
|
|
4
|
+
import './_styles.css';
|
|
5
|
+
const OpenAPISpec = ({ spec }: { spec: string }) => {
|
|
6
|
+
const [loaded, setLoaded] = useState(false);
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
{!loaded && <div>Loading...</div>}
|
|
10
|
+
<ApiReferenceReact
|
|
11
|
+
configuration={{
|
|
12
|
+
spec: {
|
|
13
|
+
url: spec,
|
|
14
|
+
},
|
|
15
|
+
theme: 'fastify',
|
|
16
|
+
hideClientButton: true,
|
|
17
|
+
onLoaded: () => {
|
|
18
|
+
setLoaded(true);
|
|
19
|
+
},
|
|
20
|
+
forceDarkModeState: 'light',
|
|
21
|
+
darkMode: false,
|
|
22
|
+
defaultOpenAllTags: true,
|
|
23
|
+
hideDarkModeToggle: true,
|
|
24
|
+
searchHotKey: 'p',
|
|
25
|
+
showSidebar: true,
|
|
26
|
+
customCss: 'bg-red-500',
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default OpenAPISpec;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import fs from 'node:fs';
|
|
5
|
+
import OpenAPISpec from './OpenAPI.tsx';
|
|
5
6
|
|
|
6
7
|
import type { CollectionTypes, PageTypes } from '@types';
|
|
7
8
|
import { DocumentMinusIcon } from '@heroicons/react/24/outline';
|
|
@@ -52,86 +53,9 @@ const fileExists = fs.existsSync(pathOnDisk);
|
|
|
52
53
|
</p>
|
|
53
54
|
</div>
|
|
54
55
|
) : (
|
|
55
|
-
<
|
|
56
|
-
spec
|
|
57
|
-
|
|
58
|
-
show-header="false"
|
|
59
|
-
allow-authentication="true"
|
|
60
|
-
allow-try="true"
|
|
61
|
-
default-schema-tab="schema"
|
|
62
|
-
use-path-in-nav-bar="true"
|
|
63
|
-
show-method-in-nav-bar="as-colored-block"
|
|
64
|
-
theme="light"
|
|
65
|
-
schema-style="table"
|
|
66
|
-
class="relative top-0"
|
|
67
|
-
style={{ height: '100%', width: '100%', zIndex: 100 }}
|
|
68
|
-
regular-font="ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
69
|
-
bg-color="#ffffff"
|
|
70
|
-
primary-color="#6b21a8"
|
|
71
|
-
nav-bg-color="#fff"
|
|
72
|
-
nav-text-color=""
|
|
73
|
-
nav-hover-bg-color="#fff"
|
|
74
|
-
nav-hover-text-color="#6b21a8"
|
|
75
|
-
nav-accent-color=""
|
|
76
|
-
/>
|
|
56
|
+
<div>
|
|
57
|
+
<OpenAPISpec client:only="react" spec={buildUrl(pathToSpec, true)} />
|
|
58
|
+
</div>
|
|
77
59
|
)
|
|
78
60
|
}
|
|
79
61
|
</VerticalSideBarLayout>
|
|
80
|
-
|
|
81
|
-
<script>
|
|
82
|
-
// @ts-ignore
|
|
83
|
-
await import('rapidoc');
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<style>
|
|
87
|
-
rapi-doc::part(section-servers) {
|
|
88
|
-
/* <<< targets the server div */
|
|
89
|
-
/* background: #6b5b95; */
|
|
90
|
-
border: 2px solid #f1edff;
|
|
91
|
-
color: black;
|
|
92
|
-
margin: 0 24px 0 24px;
|
|
93
|
-
border-radius: 5px;
|
|
94
|
-
}
|
|
95
|
-
rapi-doc::part(label-selected-server) {
|
|
96
|
-
/* <<< targets selected server label */
|
|
97
|
-
color: black;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
rapi-doc::part(section-navbar-search) {
|
|
101
|
-
margin: 0 10px;
|
|
102
|
-
padding: 0;
|
|
103
|
-
margin-bottom: 1em;
|
|
104
|
-
}
|
|
105
|
-
rapi-doc::part(section-navbar) {
|
|
106
|
-
margin: 0;
|
|
107
|
-
padding: 10px important;
|
|
108
|
-
margin-bottom: 1em;
|
|
109
|
-
background-image: linear-gradient(to bottom, rgb(255, 255, 255), rgb(243, 244, 246));
|
|
110
|
-
border-right-width: 1px;
|
|
111
|
-
border-right-color: rgb(229, 231, 235);
|
|
112
|
-
}
|
|
113
|
-
rapi-doc::part(section-overview) {
|
|
114
|
-
margin: 0 2em 0 2em;
|
|
115
|
-
padding: 1em 0 1em;
|
|
116
|
-
}
|
|
117
|
-
rapi-doc::part(section-auth) {
|
|
118
|
-
margin: 2em 2em;
|
|
119
|
-
padding: 0;
|
|
120
|
-
}
|
|
121
|
-
rapi-doc::part(section-tag) {
|
|
122
|
-
margin: 2em 2em;
|
|
123
|
-
padding: 0;
|
|
124
|
-
}
|
|
125
|
-
rapi-doc::part(section-tag-title) {
|
|
126
|
-
margin: 0.5em 0 0;
|
|
127
|
-
padding: 0;
|
|
128
|
-
}
|
|
129
|
-
rapi-doc::part(section-operations-in-tag) {
|
|
130
|
-
margin: 1em 2em;
|
|
131
|
-
padding: 0;
|
|
132
|
-
}
|
|
133
|
-
rapi-doc::part(section-navbar) {
|
|
134
|
-
border-right: 1px solid #f1edff;
|
|
135
|
-
padding: 1em 1em 0 0;
|
|
136
|
-
}
|
|
137
|
-
</style>
|
|
@@ -95,7 +95,7 @@ const ownedQueriesList = queries.map((p) => ({
|
|
|
95
95
|
{
|
|
96
96
|
props.data.slackDirectMessageUrl && (
|
|
97
97
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
98
|
-
<img src=
|
|
98
|
+
<img src={buildUrl('/slack-icon.svg', true)} class="w-4 h-3" />
|
|
99
99
|
<a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
|
|
100
100
|
</div>
|
|
101
101
|
)
|
|
@@ -103,7 +103,7 @@ const ownedQueriesList = queries.map((p) => ({
|
|
|
103
103
|
{
|
|
104
104
|
props.data.msTeamsDirectMessageUrl && (
|
|
105
105
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
106
|
-
<img src=
|
|
106
|
+
<img src={buildUrl('/icons/ms-teams.svg', true)} class="w-4 h-4" />
|
|
107
107
|
<a href={`${props.data.msTeamsDirectMessageUrl}`} target="_blank" rel="noopener noreferrer">
|
|
108
108
|
Send DM on Teams
|
|
109
109
|
</a>
|
|
@@ -86,7 +86,7 @@ const associatedTeams = teams.map((o) => ({
|
|
|
86
86
|
{
|
|
87
87
|
props.data.slackDirectMessageUrl && (
|
|
88
88
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
89
|
-
<img src=
|
|
89
|
+
<img src={buildUrl('/slack-icon.svg', true)} class="w-4 h-3" />
|
|
90
90
|
<a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
|
|
91
91
|
</div>
|
|
92
92
|
)
|
|
@@ -94,7 +94,7 @@ const associatedTeams = teams.map((o) => ({
|
|
|
94
94
|
{
|
|
95
95
|
props.data.msTeamsDirectMessageUrl && (
|
|
96
96
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
97
|
-
<img src=
|
|
97
|
+
<img src={buildUrl('/icons/ms-teams.svg', true)} class="w-4 h-4" />
|
|
98
98
|
<a href={`${props.data.msTeamsDirectMessageUrl}`} target="_blank" rel="noopener noreferrer">
|
|
99
99
|
Send DM on Teams
|
|
100
100
|
</a>
|
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.
|
|
9
|
+
"version": "2.29.1",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@parcel/watcher": "^2.4.1",
|
|
41
41
|
"@radix-ui/react-context-menu": "^2.2.6",
|
|
42
42
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
43
|
+
"@scalar/api-reference-react": "^0.4.37",
|
|
43
44
|
"@stoplight/json-schema-viewer": "^4.16.4",
|
|
44
45
|
"@tailwindcss/typography": "^0.5.13",
|
|
45
46
|
"@tanstack/react-table": "^8.17.3",
|
|
@@ -68,7 +69,6 @@
|
|
|
68
69
|
"marked": "^15.0.6",
|
|
69
70
|
"mermaid": "^11.4.1",
|
|
70
71
|
"prismjs": "^1.29.0",
|
|
71
|
-
"rapidoc": "^9.3.4",
|
|
72
72
|
"react": "^18.3.1",
|
|
73
73
|
"react-dom": "^18.3.1",
|
|
74
74
|
"rehype-slug": "^6.0.0",
|