@eventcatalog/core 2.0.18 → 2.0.20
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/.all-contributorsrc +9 -0
- package/CHANGELOG.md +12 -0
- package/README.md +2 -1
- package/astro.config.mjs +1 -1
- package/bin/dist/eventcatalog.config.d.cts +1 -0
- package/bin/dist/eventcatalog.config.d.ts +1 -0
- package/bin/eventcatalog.config.ts +1 -0
- package/package.json +1 -1
- package/src/components/DocsNavigation.astro +30 -29
- package/src/layouts/VisualiserLayout.astro +18 -7
package/.all-contributorsrc
CHANGED
|
@@ -365,6 +365,15 @@
|
|
|
365
365
|
"contributions": [
|
|
366
366
|
"code"
|
|
367
367
|
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"login": "nathanbirrell",
|
|
371
|
+
"name": "Nathan Birrell",
|
|
372
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/4300215?v=4",
|
|
373
|
+
"profile": "https://natee.biz",
|
|
374
|
+
"contributions": [
|
|
375
|
+
"code"
|
|
376
|
+
]
|
|
368
377
|
}
|
|
369
378
|
],
|
|
370
379
|
"contributorsPerLine": 7,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 2.0.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5de772b: fix(core): fixed typescript errors
|
|
8
|
+
|
|
9
|
+
## 2.0.19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4be2512: feat(core): added ability to configure port on EventCatlog
|
|
14
|
+
|
|
3
15
|
## 2.0.18
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<!-- [![MIT License][license-badge]][license] -->
|
|
12
12
|
<!-- [![PRs Welcome][prs-badge]][prs] -->
|
|
13
13
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
14
|
-
[](#contributors-)
|
|
15
15
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
16
16
|
|
|
17
17
|
<!-- [![Watch on GitHub][github-watch-badge]][github-watch] -->
|
|
@@ -192,6 +192,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
192
192
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/danielcastill0"><img src="https://avatars.githubusercontent.com/u/40574235?v=4?s=100" width="100px;" alt="Daniel Andres Castillo Ardila"/><br /><sub><b>Daniel Andres Castillo Ardila</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=danielcastill0" title="Code">💻</a></td>
|
|
193
193
|
<td align="center" valign="top" width="14.28%"><a href="http://www.ennovative-solutions.be"><img src="https://avatars.githubusercontent.com/u/2007116?v=4?s=100" width="100px;" alt="Baerten Dennis"/><br /><sub><b>Baerten Dennis</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=debae" title="Code">💻</a></td>
|
|
194
194
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ryancormack"><img src="https://avatars.githubusercontent.com/u/1962883?v=4?s=100" width="100px;" alt="Ryan Cormack"/><br /><sub><b>Ryan Cormack</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=ryancormack" title="Code">💻</a></td>
|
|
195
|
+
<td align="center" valign="top" width="14.28%"><a href="https://natee.biz"><img src="https://avatars.githubusercontent.com/u/4300215?v=4?s=100" width="100px;" alt="Nathan Birrell"/><br /><sub><b>Nathan Birrell</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=nathanbirrell" title="Code">💻</a></td>
|
|
195
196
|
</tr>
|
|
196
197
|
</tbody>
|
|
197
198
|
</table>
|
package/astro.config.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import config from './eventcatalog.config';
|
|
|
16
16
|
// https://astro.build/config
|
|
17
17
|
export default defineConfig({
|
|
18
18
|
base: config.base || '/',
|
|
19
|
-
server: { port: 3000 },
|
|
19
|
+
server: { port: config.port || 3000 },
|
|
20
20
|
|
|
21
21
|
// https://docs.astro.build/en/reference/configuration-reference/#site
|
|
22
22
|
site: config.homepageLink || 'https://eventcatalog.dev/',
|
package/package.json
CHANGED
|
@@ -17,7 +17,8 @@ const users = await getUsers();
|
|
|
17
17
|
|
|
18
18
|
const messages = [...events, ...commands];
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// @ts-ignore for large catalogs https://github.com/event-catalog/eventcatalog/issues/552
|
|
21
|
+
const allData = [...domains, ...services, ...messages, ...teams, ...users];
|
|
21
22
|
|
|
22
23
|
const eventCatalogConfig = config as CatalogConfig;
|
|
23
24
|
const { services: servicesConfig, domains: domainsConfig, messages: messagesConfig, teams: teamsConfig, users: usersConfig, showPageHeadings = true } = eventCatalogConfig?.docs?.sidebar || {};
|
|
@@ -26,7 +27,7 @@ const getConfigValue = (obj: any, key:string, defaultValue: any) => {
|
|
|
26
27
|
return obj?.[key] ?? defaultValue;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
const visibleCollections = {
|
|
30
|
+
const visibleCollections: {[key:string]: boolean} = {
|
|
30
31
|
events: getConfigValue(messagesConfig, 'visible', true),
|
|
31
32
|
commands: getConfigValue(messagesConfig, 'visible', true),
|
|
32
33
|
domains: getConfigValue(domainsConfig, 'visible', true),
|
|
@@ -76,36 +77,36 @@ const currentPath = Astro.url.pathname;
|
|
|
76
77
|
---
|
|
77
78
|
|
|
78
79
|
<div class="font-light w-full xl:pr-10 pb-20 ">
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
{
|
|
81
|
+
Object.keys(sideNav).map((key) => {
|
|
82
|
+
const collection = sideNav[key];
|
|
83
|
+
if(collection[0] && collection[0].visible === false) return null;
|
|
84
|
+
return (
|
|
85
|
+
<ul class=" w-full space-y-2 pb-8">
|
|
86
|
+
<li class="font-semibold capitalize ">{key}</li>
|
|
87
|
+
{collection.map((item: any) => {
|
|
88
|
+
return (
|
|
88
89
|
<li class="px-2 w-full text-md xl:text-lg border-l border-gray-200 space-y-2 scroll-m-20" id={item.href} >
|
|
89
90
|
<a class={`flex justify-between items-center w-full px-2 rounded-md font-normal ${currentPath.includes(item.href) ? 'bg-purple-200 text-purple-800 ' : 'font-thin'}`} href={`${item.href}`}>
|
|
90
|
-
|
|
91
|
+
<span class="block">{item.label}</span>
|
|
91
92
|
{item.version && <span class="block text-sm bg-purple-100 p-0.5 px-1 text-gray-600 rounded-md font-light">v{item.version}</span>}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
</a>
|
|
94
|
+
<ul class="hidden xl:block px-4 text-gray-500 text-md space-y-2 ">
|
|
95
|
+
{item.items.map((heading: any) => {
|
|
96
|
+
return (
|
|
97
|
+
<li class="text-xs">
|
|
98
|
+
<a href={`${item.href}/#${heading.slug}`}>{heading.text}</a>
|
|
99
|
+
</li>
|
|
100
|
+
);
|
|
101
|
+
})}
|
|
102
|
+
</ul>
|
|
103
|
+
</li>
|
|
104
|
+
);
|
|
105
|
+
})}
|
|
106
|
+
</ul>
|
|
107
|
+
);
|
|
108
|
+
})
|
|
109
|
+
}
|
|
109
110
|
</div>
|
|
110
111
|
|
|
111
112
|
<script>
|
|
@@ -11,8 +11,9 @@ import type { CollectionEntry } from 'astro:content';
|
|
|
11
11
|
import { ViewTransitions } from 'astro:transitions';
|
|
12
12
|
|
|
13
13
|
const [services, events, commands, domains] = await Promise.all([getServices(), getEvents(), getCommands(), getDomains()]);
|
|
14
|
-
const navItems = [...domains, ...services, ...events, ...commands];
|
|
15
14
|
|
|
15
|
+
// @ts-ignore for large catalogs https://github.com/event-catalog/eventcatalog/issues/552
|
|
16
|
+
const navItems = [...domains, ...services, ...events, ...commands];
|
|
16
17
|
|
|
17
18
|
const navigation = navItems.reduce((acc, item) => {
|
|
18
19
|
// @ts-ignore
|
|
@@ -41,13 +42,15 @@ const getColor = (collection: string) => {
|
|
|
41
42
|
return 'gray';
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
|
-
|
|
45
45
|
---
|
|
46
46
|
|
|
47
47
|
<PlainPage title={title} description={description}>
|
|
48
48
|
<div class="flex min-h-full flex-row md:flex-col">
|
|
49
49
|
<div class="mx-auto flex flex-col-reverse md:flex-row w-full items-start">
|
|
50
|
-
<aside
|
|
50
|
+
<aside
|
|
51
|
+
class="md:sticky mt-14 md:mt-0 top-0 w-full md:w-60 xl:w-[19em] shrink-0 lg:block font-light pr-10"
|
|
52
|
+
id="visualiser-navigation"
|
|
53
|
+
>
|
|
51
54
|
{
|
|
52
55
|
Object.keys(navigation).map((key: any) => {
|
|
53
56
|
const items = navigation[key].map((item: any) => {
|
|
@@ -57,15 +60,23 @@ const getColor = (collection: string) => {
|
|
|
57
60
|
version: item.data.version,
|
|
58
61
|
color: getColor(item.collection),
|
|
59
62
|
href: buildUrl(`/visualiser/${item.collection}/${item.data.id}/${item.data.version}`),
|
|
60
|
-
active: isCurrent
|
|
61
|
-
}
|
|
63
|
+
active: isCurrent,
|
|
64
|
+
};
|
|
62
65
|
});
|
|
63
|
-
return
|
|
66
|
+
return (
|
|
67
|
+
<BasicList
|
|
68
|
+
title={`${key} (${navigation[key].length})`}
|
|
69
|
+
items={items}
|
|
70
|
+
emptyMessage="Nothing to show"
|
|
71
|
+
color="gray"
|
|
72
|
+
client:load
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
64
75
|
})
|
|
65
76
|
}
|
|
66
77
|
</aside>
|
|
67
78
|
|
|
68
|
-
<main class="flex-1 h-full w-full
|
|
79
|
+
<main class="flex-1 h-full w-full">
|
|
69
80
|
<slot />
|
|
70
81
|
</main>
|
|
71
82
|
</div>
|