@eventcatalog/core 2.11.1 → 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 +6 -0
- package/package.json +1 -1
- 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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -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(),
|