@eventcatalog/core 2.11.0 → 2.11.2
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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/public/icons/discord.svg +1 -1
- package/src/components/Header.astro +14 -31
- package/src/components/Lists/RepositoryList.astro +36 -0
- package/src/components/SideBars/DomainSideBar.astro +6 -0
- package/src/components/SideBars/MessageSideBar.astro +7 -0
- package/src/components/SideBars/ServiceSideBar.astro +8 -1
- package/src/content/config.ts +6 -0
- package/src/layouts/VerticalSideBarLayout.astro +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 2.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 48d61f3: feat(core): added repo support for all resources
|
|
8
|
+
|
|
9
|
+
## 2.11.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 214f164: chore(core): minor changes to ui
|
|
14
|
+
|
|
3
15
|
## 2.11.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
package/public/icons/discord.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg fill="#
|
|
1
|
+
<svg fill="#000" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <title>discord</title> <path d="M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z"></path> </g></svg>
|
|
@@ -3,23 +3,6 @@ import catalog from '@eventcatalog';
|
|
|
3
3
|
import Search from '@components/Search.astro';
|
|
4
4
|
import { buildUrl } from '@utils/url-builder';
|
|
5
5
|
|
|
6
|
-
const currentPath = Astro.url.pathname;
|
|
7
|
-
|
|
8
|
-
const navItems = [
|
|
9
|
-
// {
|
|
10
|
-
// label: 'Docs',
|
|
11
|
-
// href: buildUrl('/docs'),
|
|
12
|
-
// },
|
|
13
|
-
// {
|
|
14
|
-
// label: 'Visualiser',
|
|
15
|
-
// href: buildUrl('/visualiser'),
|
|
16
|
-
// },
|
|
17
|
-
// {
|
|
18
|
-
// label: 'Discover',
|
|
19
|
-
// href: buildUrl('/discover/events'),
|
|
20
|
-
// },
|
|
21
|
-
];
|
|
22
|
-
|
|
23
6
|
const logo = {
|
|
24
7
|
src: ('/' + (catalog?.logo?.src || 'logo.png')).replace(/^\/+/, '/'),
|
|
25
8
|
alt: catalog?.logo?.alt || 'Event Catalog',
|
|
@@ -29,7 +12,7 @@ const logo = {
|
|
|
29
12
|
|
|
30
13
|
<nav
|
|
31
14
|
id="eventcatalog-header"
|
|
32
|
-
class="fixed top-0 left-0 right-0 bg-white border-b border-gray-
|
|
15
|
+
class="fixed top-0 left-0 right-0 bg-white border-b border-gray-100 py-3 font-bold text-xl bg-opacity-20 backdrop-blur-sm"
|
|
33
16
|
>
|
|
34
17
|
<div class="max-w-[120em] mx-auto px-4 sm:px-4 lg:px-4 xxl:max-w-[96em]">
|
|
35
18
|
<div class="flex justify-between items-center">
|
|
@@ -40,23 +23,23 @@ const logo = {
|
|
|
40
23
|
</a>
|
|
41
24
|
</div>
|
|
42
25
|
|
|
43
|
-
<div class="hidden lg:block flex-grow w-1/3">
|
|
26
|
+
<div class="hidden lg:block flex-grow w-1/3 px-10">
|
|
44
27
|
<Search />
|
|
45
28
|
</div>
|
|
46
29
|
|
|
47
30
|
<div class="hidden md:block w-1/3">
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</ul>
|
|
31
|
+
<ul class="flex space-x-8 justify-end pr-2">
|
|
32
|
+
<li>
|
|
33
|
+
<a href="https://discord.com/invite/3rjaZMmrAm">
|
|
34
|
+
<img src={buildUrl('/icons/discord.svg', true)} class="h-7 w-7" />
|
|
35
|
+
</a>
|
|
36
|
+
</li>
|
|
37
|
+
<li>
|
|
38
|
+
<a href="https://github.com/event-catalog/eventcatalog">
|
|
39
|
+
<img src={buildUrl('/icons/github.svg', true)} class="h-7 w-7" />
|
|
40
|
+
</a>
|
|
41
|
+
</li>
|
|
42
|
+
</ul>
|
|
60
43
|
</div>
|
|
61
44
|
|
|
62
45
|
<div class="md:hidden">
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { ScrollText, Workflow, FileDownIcon, Code, Link } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
repository?: string;
|
|
6
|
+
language?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { repository, language } = Astro.props;
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<div class="mx-auto pb-8 w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5">
|
|
13
|
+
<span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">Repository </span>
|
|
14
|
+
<ul role="list" class="space-y-2 mt-2">
|
|
15
|
+
{
|
|
16
|
+
repository && (
|
|
17
|
+
<li class="has-tooltip rounded-md text-gray-600 group px-1 w-full hover:bg-gradient-to-l hover:from-purple-500 hover:to-purple-700 hover:text-white hover:font-normal ">
|
|
18
|
+
<a class={`flex items-center space-x-2`} target="_blank" href={repository}>
|
|
19
|
+
<Link className="h-4 w-4 text-gray-800 group-hover:text-white" strokeWidth={1} />
|
|
20
|
+
<span class="font-light text-sm truncate">{repository}</span>
|
|
21
|
+
</a>
|
|
22
|
+
</li>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
{
|
|
26
|
+
language && (
|
|
27
|
+
<li class=" rounded-md text-gray-600 group px-1 w-full ">
|
|
28
|
+
<div class={`flex items-center space-x-2`}>
|
|
29
|
+
<Code className="h-3 w-3 text-gray-800 " strokeWidth={1} />
|
|
30
|
+
<span class="font-light text-sm truncate">{language}</span>
|
|
31
|
+
</div>
|
|
32
|
+
</li>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
</ul>
|
|
36
|
+
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import OwnersList from '@components/Lists/OwnersList';
|
|
3
3
|
import PillListFlat from '@components/Lists/PillListFlat';
|
|
4
|
+
import RepositoryList from '@components/Lists/RepositoryList.astro';
|
|
4
5
|
import VersionList from '@components/Lists/VersionList.astro';
|
|
5
6
|
import { buildUrl } from '@utils/url-builder';
|
|
6
7
|
import { getEntry, type CollectionEntry } from 'astro:content';
|
|
@@ -45,6 +46,11 @@ const ownersList = owners.map((o) => ({
|
|
|
45
46
|
client:load
|
|
46
47
|
/>
|
|
47
48
|
{domain.data.versions && <VersionList versions={domain.data.versions} collectionItem={domain} />}
|
|
49
|
+
{
|
|
50
|
+
domain.data.repository && (
|
|
51
|
+
<RepositoryList repository={domain.data.repository?.url} language={domain.data.repository?.language} />
|
|
52
|
+
)
|
|
53
|
+
}
|
|
48
54
|
<OwnersList
|
|
49
55
|
title={`Domain owners (${ownersList.length})`}
|
|
50
56
|
owners={ownersList}
|
|
@@ -7,6 +7,7 @@ import * as path from 'path';
|
|
|
7
7
|
import VersionList from '@components/Lists/VersionList.astro';
|
|
8
8
|
import { buildUrl } from '@utils/url-builder';
|
|
9
9
|
import { FileDownIcon, ScrollText, Workflow } from 'lucide-react';
|
|
10
|
+
import RepositoryList from '@components/Lists/RepositoryList.astro';
|
|
10
11
|
interface Props {
|
|
11
12
|
message: CollectionEntry<CollectionMessageTypes>;
|
|
12
13
|
}
|
|
@@ -122,6 +123,12 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
|
|
|
122
123
|
client:load
|
|
123
124
|
/>
|
|
124
125
|
|
|
126
|
+
{
|
|
127
|
+
message.data.repository && (
|
|
128
|
+
<RepositoryList repository={message.data.repository?.url} language={message.data.repository?.language} />
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
125
132
|
<div class="space-y-2">
|
|
126
133
|
{
|
|
127
134
|
message?.data?.schemaPath && (
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import OwnersList from '@components/Lists/OwnersList';
|
|
3
3
|
import PillListFlat from '@components/Lists/PillListFlat';
|
|
4
|
+
import RepositoryList from '@components/Lists/RepositoryList.astro';
|
|
4
5
|
import SpecificationsList from '@components/Lists/SpecificationsList.astro';
|
|
5
6
|
import VersionList from '@components/Lists/VersionList.astro';
|
|
6
7
|
import { buildUrl } from '@utils/url-builder';
|
|
7
8
|
import { getEntry, type CollectionEntry } from 'astro:content';
|
|
8
|
-
import { ScrollText, Workflow, FileDownIcon } from 'lucide-react';
|
|
9
|
+
import { ScrollText, Workflow, FileDownIcon, Code, Link } from 'lucide-react';
|
|
9
10
|
import { join } from 'node:path';
|
|
10
11
|
interface Props {
|
|
11
12
|
service: CollectionEntry<'services'>;
|
|
@@ -79,6 +80,12 @@ const schemaURL = join(publicPath, schemaFilePath || '');
|
|
|
79
80
|
client:load
|
|
80
81
|
/>
|
|
81
82
|
|
|
83
|
+
{
|
|
84
|
+
service.data.repository && (
|
|
85
|
+
<RepositoryList repository={service.data.repository?.url} language={service.data.repository?.language} />
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
82
89
|
<div class="space-y-2">
|
|
83
90
|
{
|
|
84
91
|
service?.data?.schemaPath && (
|
package/src/content/config.ts
CHANGED
|
@@ -51,6 +51,12 @@ const baseSchema = z.object({
|
|
|
51
51
|
badges: z.array(badge).optional(),
|
|
52
52
|
owners: z.array(ownerReference).optional(),
|
|
53
53
|
schemaPath: z.string().optional(),
|
|
54
|
+
repository: z
|
|
55
|
+
.object({
|
|
56
|
+
language: z.string().optional(),
|
|
57
|
+
url: z.string().optional(),
|
|
58
|
+
})
|
|
59
|
+
.optional(),
|
|
54
60
|
specifications: z
|
|
55
61
|
.object({
|
|
56
62
|
openapiPath: z.string().optional(),
|
|
@@ -192,7 +192,7 @@ const showSideBarOnLoad = currentNavigationItem?.sidebar;
|
|
|
192
192
|
})
|
|
193
193
|
}
|
|
194
194
|
</div>
|
|
195
|
-
<div class="flex flex-col items-center mt-4 space-y-4 -mb-10">
|
|
195
|
+
<!-- <div class="flex flex-col items-center mt-4 space-y-4 -mb-10">
|
|
196
196
|
<a href="https://discord.com/invite/3rjaZMmrAm" class="text-gray-500 has-tooltip">
|
|
197
197
|
<span class="tooltip rounded shadow-lg p-1 text-xs bg-black text-white ml-10 w-[162px]"
|
|
198
198
|
>Join EventCatalog Discord</span
|
|
@@ -205,7 +205,7 @@ const showSideBarOnLoad = currentNavigationItem?.sidebar;
|
|
|
205
205
|
>
|
|
206
206
|
<img src="/icons/github-purple.svg" class="w-7 h-7" />
|
|
207
207
|
</a>
|
|
208
|
-
</div>
|
|
208
|
+
</div> -->
|
|
209
209
|
</nav>
|
|
210
210
|
</div>
|
|
211
211
|
|