@eventcatalog/core 2.29.2 → 2.29.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/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-MHSM6HM5.js → chunk-6DVICCCE.js} +1 -1
- package/dist/{chunk-77IO2UDS.js → chunk-7PSA2C5C.js} +1 -1
- package/dist/{chunk-7SZ6PH5O.js → chunk-DH6NCUJX.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/components/MessageList.tsx +23 -3
- package/eventcatalog/src/components/SideNav/ListViewSideBar/utils.ts +1 -0
- package/eventcatalog/src/content.config.ts +6 -0
- package/eventcatalog/src/pages/rss/[resource]/rss.xml.js +2 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-6DVICCCE.js";
|
|
4
|
+
import "../chunk-DH6NCUJX.js";
|
|
5
|
+
import "../chunk-7PSA2C5C.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-6DVICCCE.js";
|
|
10
|
+
import "./chunk-DH6NCUJX.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-7PSA2C5C.js";
|
|
17
17
|
import {
|
|
18
18
|
isBackstagePluginEnabled
|
|
19
19
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -5,6 +5,26 @@ interface MessageListProps {
|
|
|
5
5
|
decodedCurrentPath: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
const getMessageColorByLabelOrCollection = (collection: string, badge?: string) => {
|
|
9
|
+
if (!badge) {
|
|
10
|
+
return getMessageColorByCollection(collection);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Will try and match the label against HTTP verbs
|
|
14
|
+
const httpVerbs = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT'];
|
|
15
|
+
if (badge && httpVerbs.includes(badge.toUpperCase())) {
|
|
16
|
+
if (badge.toUpperCase() === 'GET') return 'bg-blue-50 text-blue-600';
|
|
17
|
+
if (badge.toUpperCase() === 'POST') return 'bg-green-50 text-green-600';
|
|
18
|
+
if (badge.toUpperCase() === 'PUT') return 'bg-yellow-50 text-yellow-600';
|
|
19
|
+
if (badge.toUpperCase() === 'DELETE') return 'bg-red-50 text-red-600';
|
|
20
|
+
if (badge.toUpperCase() === 'PATCH') return 'bg-purple-50 text-purple-600';
|
|
21
|
+
if (badge.toUpperCase() === 'HEAD') return 'bg-gray-50 text-gray-600';
|
|
22
|
+
if (badge.toUpperCase() === 'OPTIONS') return 'bg-orange-50 text-orange-600';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return getMessageColorByCollection(collection);
|
|
26
|
+
};
|
|
27
|
+
|
|
8
28
|
const MessageList: React.FC<MessageListProps> = ({ messages, decodedCurrentPath }) => (
|
|
9
29
|
<ul className="space-y-0.5 border-l border-gray-200/80 ml-[9px] pl-4">
|
|
10
30
|
{messages.map((message: any) => (
|
|
@@ -15,11 +35,11 @@ const MessageList: React.FC<MessageListProps> = ({ messages, decodedCurrentPath
|
|
|
15
35
|
decodedCurrentPath.includes(message.href) ? 'bg-purple-100 ' : 'hover:bg-purple-100'
|
|
16
36
|
}`}
|
|
17
37
|
>
|
|
18
|
-
<span className="truncate">{message.data.name}</span>
|
|
38
|
+
<span className="truncate">{message.data?.sidebar?.label || message.data.name}</span>
|
|
19
39
|
<span
|
|
20
|
-
className={`ml-2 text-[10px]
|
|
40
|
+
className={`ml-2 text-[10px] flex items-center gap-1 font-medium px-2 uppercase py-0.5 rounded ${getMessageColorByLabelOrCollection(message.collection, message.data?.sidebar?.badge)}`}
|
|
21
41
|
>
|
|
22
|
-
{getMessageCollectionName(message.collection)}
|
|
42
|
+
{message.data?.sidebar?.badge || getMessageCollectionName(message.collection)}
|
|
23
43
|
</span>
|
|
24
44
|
</a>
|
|
25
45
|
</li>
|
|
@@ -68,6 +68,7 @@ export async function getResourcesForNavigation({ currentPath }: { currentPath:
|
|
|
68
68
|
sends: sendsWithHref,
|
|
69
69
|
receives: receivesWithHref,
|
|
70
70
|
specifications: item.collection === 'services' ? item.data.specifications : null,
|
|
71
|
+
sidebar: item.data?.sidebar,
|
|
71
72
|
};
|
|
72
73
|
|
|
73
74
|
group.push(navigationItem);
|
|
@@ -73,6 +73,12 @@ const baseSchema = z.object({
|
|
|
73
73
|
badges: z.array(badge).optional(),
|
|
74
74
|
owners: z.array(ownerReference).optional(),
|
|
75
75
|
schemaPath: z.string().optional(),
|
|
76
|
+
sidebar: z
|
|
77
|
+
.object({
|
|
78
|
+
label: z.string().optional(),
|
|
79
|
+
badge: z.string().optional(),
|
|
80
|
+
})
|
|
81
|
+
.optional(),
|
|
76
82
|
repository: z
|
|
77
83
|
.object({
|
|
78
84
|
language: z.string().optional(),
|