@eventcatalog/core 2.25.1 → 2.26.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/README.md +7 -3
- 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/catalog-to-astro-content-directory.cjs +1 -7
- package/dist/catalog-to-astro-content-directory.js +2 -2
- package/dist/{chunk-7JDTB3U5.js → chunk-FIY5JLSQ.js} +0 -2
- package/dist/{chunk-OZLFIB46.js → chunk-JCGLXXSE.js} +1 -1
- package/dist/{chunk-O33THQNO.js → chunk-M7ERKXSB.js} +1 -1
- package/dist/{chunk-VCR3LHZR.js → chunk-R2NILSWL.js} +2 -6
- package/dist/{chunk-DZIMF2ES.js → chunk-TOTPAQ4C.js} +1 -1
- package/dist/{chunk-OW2FQPYP.js → chunk-WUCY3QHK.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +2 -8
- package/dist/eventcatalog.js +6 -6
- package/dist/map-catalog-to-astro.cjs +0 -2
- package/dist/map-catalog-to-astro.js +1 -1
- package/dist/watcher.cjs +0 -2
- package/dist/watcher.js +2 -2
- package/eventcatalog/src/components/Lists/OwnersList.tsx +3 -2
- package/eventcatalog/src/components/Lists/PillListFlat.tsx +6 -4
- package/eventcatalog/src/components/Lists/RepositoryList.astro +3 -2
- package/eventcatalog/src/components/Lists/VersionList.astro +3 -22
- package/eventcatalog/src/components/MDX/MessageTable/MessageTable.astro +87 -0
- package/eventcatalog/src/components/MDX/MessageTable/MessageTable.client.tsx +430 -0
- package/eventcatalog/src/components/MDX/components.tsx +2 -0
- package/eventcatalog/src/components/SideBars/DomainSideBar.astro +38 -1
- package/eventcatalog/src/components/SideBars/ServiceSideBar.astro +22 -17
- package/eventcatalog/src/{content/config.ts → content.config.ts} +12 -2
- package/eventcatalog/src/enterprise/ai-assistant/components/ChatSidebar.tsx +0 -1
- package/eventcatalog/src/pages/chat/index.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +6 -13
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +7 -13
- package/eventcatalog/src/utils/collections/domains.ts +27 -0
- package/eventcatalog/src/utils/users.ts +2 -2
- package/package.json +1 -1
- package/default-files-for-collections/teams.md +0 -11
- package/default-files-for-collections/users.md +0 -11
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<h4>Features: Documentation generator for Event Driven Architectures, Integration with any broker, Docs and Code, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
|
|
33
33
|
|
|
34
34
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
35
|
-
[](#contributors-)
|
|
36
36
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
37
37
|
|
|
38
38
|
[Read the Docs](https://www.eventcatalog.dev/product/documentation) | [View Demo](https://demo.eventcatalog.dev/docs)
|
|
@@ -128,9 +128,12 @@ Thank you to our project sponsors.
|
|
|
128
128
|
</div> -->
|
|
129
129
|
|
|
130
130
|
<div align="center">
|
|
131
|
-
<
|
|
131
|
+
<picture>
|
|
132
|
+
<source srcset="./images/sponsors/gravitee-logo-white.webp" media="(prefers-color-scheme: dark)" />
|
|
133
|
+
<img alt="hookdeck" src="./images/sponsors/gravitee-logo-black.svg" width="50%" />
|
|
134
|
+
</picture>
|
|
132
135
|
<p style="margin: 0; padding: 0;">Manage, secure, and govern every API in your organization</p>
|
|
133
|
-
<a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank"
|
|
136
|
+
<a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank">Learn more</a>
|
|
134
137
|
</div>
|
|
135
138
|
|
|
136
139
|
<hr />
|
|
@@ -252,6 +255,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
252
255
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SebasRendon12"><img src="https://avatars.githubusercontent.com/u/69688183?v=4?s=100" width="100px;" alt="Sebastian Rendon"/><br /><sub><b>Sebastian Rendon</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=SebasRendon12" title="Code">💻</a></td>
|
|
253
256
|
<td align="center" valign="top" width="14.28%"><a href="http://craig0990.co.uk"><img src="https://avatars.githubusercontent.com/u/461897?v=4?s=100" width="100px;" alt="Craig Roberts"/><br /><sub><b>Craig Roberts</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=craig0990" title="Code">💻</a></td>
|
|
254
257
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Vertygo"><img src="https://avatars.githubusercontent.com/u/1658326?v=4?s=100" width="100px;" alt="Ivan Milosavljevic"/><br /><sub><b>Ivan Milosavljevic</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Vertygo" title="Documentation">📖</a></td>
|
|
258
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mezzle"><img src="https://avatars.githubusercontent.com/u/570639?v=4?s=100" width="100px;" alt="Martin Meredith"/><br /><sub><b>Martin Meredith</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Mezzle" title="Code">💻</a></td>
|
|
255
259
|
</tr>
|
|
256
260
|
</tbody>
|
|
257
261
|
</table>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-JCGLXXSE.js";
|
|
4
|
+
import "../chunk-M7ERKXSB.js";
|
|
5
|
+
import "../chunk-TOTPAQ4C.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
|
@@ -122,8 +122,6 @@ var COLLECTION_KEYS = [
|
|
|
122
122
|
"events",
|
|
123
123
|
"commands",
|
|
124
124
|
"services",
|
|
125
|
-
"users",
|
|
126
|
-
"teams",
|
|
127
125
|
"domains",
|
|
128
126
|
"flows",
|
|
129
127
|
"pages",
|
|
@@ -243,8 +241,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
243
241
|
"events",
|
|
244
242
|
"commands",
|
|
245
243
|
"services",
|
|
246
|
-
"users",
|
|
247
|
-
"teams",
|
|
248
244
|
"domains",
|
|
249
245
|
"flows",
|
|
250
246
|
"changelogs",
|
|
@@ -272,10 +268,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
272
268
|
};
|
|
273
269
|
var catalogToAstro = async (source, astroDir) => {
|
|
274
270
|
const astroContentDir = path3.join(astroDir, "src/content/");
|
|
275
|
-
|
|
276
|
-
import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
271
|
+
if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
277
272
|
import_fs.default.mkdirSync(astroContentDir);
|
|
278
|
-
import_fs.default.writeFileSync(path3.join(astroContentDir, "config.ts"), astroConfigFile);
|
|
279
273
|
await verifyRequiredFieldsAreInCatalogConfigFile(source);
|
|
280
274
|
await copyFiles(source, astroDir);
|
|
281
275
|
await ensureAstroCollectionNotEmpty(astroDir);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-E7TXTI7G.js";
|
|
5
5
|
import {
|
|
6
6
|
mapCatalogToAstro
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FIY5JLSQ.js";
|
|
8
8
|
|
|
9
9
|
// src/catalog-to-astro-content-directory.js
|
|
10
10
|
import { glob } from "glob";
|
|
@@ -43,8 +43,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
43
43
|
"events",
|
|
44
44
|
"commands",
|
|
45
45
|
"services",
|
|
46
|
-
"users",
|
|
47
|
-
"teams",
|
|
48
46
|
"domains",
|
|
49
47
|
"flows",
|
|
50
48
|
"changelogs",
|
|
@@ -72,10 +70,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
72
70
|
};
|
|
73
71
|
var catalogToAstro = async (source, astroDir) => {
|
|
74
72
|
const astroContentDir = path.join(astroDir, "src/content/");
|
|
75
|
-
|
|
76
|
-
fs.rmSync(astroContentDir, { recursive: true });
|
|
73
|
+
if (fs.existsSync(astroContentDir)) fs.rmSync(astroContentDir, { recursive: true });
|
|
77
74
|
fs.mkdirSync(astroContentDir);
|
|
78
|
-
fs.writeFileSync(path.join(astroContentDir, "config.ts"), astroConfigFile);
|
|
79
75
|
await verifyRequiredFieldsAreInCatalogConfigFile(source);
|
|
80
76
|
await copyFiles(source, astroDir);
|
|
81
77
|
await ensureAstroCollectionNotEmpty(astroDir);
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
161
161
|
var import_os = __toESM(require("os"), 1);
|
|
162
162
|
|
|
163
163
|
// package.json
|
|
164
|
-
var version = "2.
|
|
164
|
+
var version = "2.26.1";
|
|
165
165
|
|
|
166
166
|
// src/constants.ts
|
|
167
167
|
var VERSION = version;
|
|
@@ -219,8 +219,6 @@ var COLLECTION_KEYS = [
|
|
|
219
219
|
"events",
|
|
220
220
|
"commands",
|
|
221
221
|
"services",
|
|
222
|
-
"users",
|
|
223
|
-
"teams",
|
|
224
222
|
"domains",
|
|
225
223
|
"flows",
|
|
226
224
|
"pages",
|
|
@@ -431,8 +429,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
431
429
|
"events",
|
|
432
430
|
"commands",
|
|
433
431
|
"services",
|
|
434
|
-
"users",
|
|
435
|
-
"teams",
|
|
436
432
|
"domains",
|
|
437
433
|
"flows",
|
|
438
434
|
"changelogs",
|
|
@@ -460,10 +456,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
460
456
|
};
|
|
461
457
|
var catalogToAstro = async (source, astroDir) => {
|
|
462
458
|
const astroContentDir = path5.join(astroDir, "src/content/");
|
|
463
|
-
|
|
464
|
-
import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
459
|
+
if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
465
460
|
import_fs.default.mkdirSync(astroContentDir);
|
|
466
|
-
import_fs.default.writeFileSync(path5.join(astroContentDir, "config.ts"), astroConfigFile);
|
|
467
461
|
await verifyRequiredFieldsAreInCatalogConfigFile(source);
|
|
468
462
|
await copyFiles(source, astroDir);
|
|
469
463
|
await ensureAstroCollectionNotEmpty(astroDir);
|
package/dist/eventcatalog.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-BLDONK5J.js";
|
|
4
4
|
import {
|
|
5
5
|
watch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WUCY3QHK.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JCGLXXSE.js";
|
|
10
|
+
import "./chunk-M7ERKXSB.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R2NILSWL.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TOTPAQ4C.js";
|
|
17
17
|
import {
|
|
18
18
|
isBackstagePluginEnabled
|
|
19
19
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
generate
|
|
22
22
|
} from "./chunk-YEQVKHST.js";
|
|
23
23
|
import "./chunk-E7TXTI7G.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-FIY5JLSQ.js";
|
|
25
25
|
|
|
26
26
|
// src/eventcatalog.ts
|
|
27
27
|
import { Command } from "commander";
|
package/dist/watcher.cjs
CHANGED
package/dist/watcher.js
CHANGED
|
@@ -18,9 +18,9 @@ const OwnersList = ({ title, owners, emptyMessage }: Props) => {
|
|
|
18
18
|
return (
|
|
19
19
|
<div>
|
|
20
20
|
<div className="mx-auto w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5">
|
|
21
|
-
<Disclosure as="div" className="
|
|
21
|
+
<Disclosure as="div" className="" defaultOpen={owners.length <= 5}>
|
|
22
22
|
<DisclosureButton className="group flex w-full items-center justify-start space-x-4">
|
|
23
|
-
<span className="text-sm text-black group-data-[hover]:text-black/80 capitalize"> {title} </span>
|
|
23
|
+
<span className="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize"> {title} </span>
|
|
24
24
|
<ChevronDownIcon className="size-5 fill-black/60 group-data-[hover]:fill-black/50 group-data-[open]:rotate-180" />
|
|
25
25
|
</DisclosureButton>
|
|
26
26
|
<DisclosurePanel className="mt-2 text-sm/5 text-black/50">
|
|
@@ -57,6 +57,7 @@ const OwnersList = ({ title, owners, emptyMessage }: Props) => {
|
|
|
57
57
|
</DisclosurePanel>
|
|
58
58
|
</Disclosure>
|
|
59
59
|
</div>
|
|
60
|
+
<div className="border-b border-gray-100 my-4"></div>
|
|
60
61
|
</div>
|
|
61
62
|
);
|
|
62
63
|
};
|
|
@@ -9,6 +9,7 @@ interface Props {
|
|
|
9
9
|
title: string;
|
|
10
10
|
color: string;
|
|
11
11
|
icon?: any;
|
|
12
|
+
limit?: number;
|
|
12
13
|
pills: {
|
|
13
14
|
label: string;
|
|
14
15
|
badge?: string;
|
|
@@ -22,14 +23,14 @@ interface Props {
|
|
|
22
23
|
emptyMessage?: string;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
const PillList = ({ title, pills, emptyMessage, color = 'gray', ...props }: Props) => {
|
|
26
|
+
const PillList = ({ title, pills, emptyMessage, color = 'gray', limit = 10, ...props }: Props) => {
|
|
26
27
|
const getIconForCollection = useMemo(() => getIconForCollectionOriginal, []);
|
|
27
28
|
return (
|
|
28
|
-
<div>
|
|
29
|
+
<div className="">
|
|
29
30
|
<div className="mx-auto w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5">
|
|
30
|
-
<Disclosure as="div" className="
|
|
31
|
+
<Disclosure as="div" className="" defaultOpen={pills.length <= limit}>
|
|
31
32
|
<DisclosureButton className="group flex w-full items-center justify-start space-x-4">
|
|
32
|
-
<span className="text-sm text-black group-data-[hover]:text-black/80 capitalize"> {title} </span>
|
|
33
|
+
<span className="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize"> {title} </span>
|
|
33
34
|
<ChevronDownIcon className="size-5 ml-2 fill-black/60 group-data-[hover]:fill-black/50 group-data-[open]:rotate-180" />
|
|
34
35
|
</DisclosureButton>
|
|
35
36
|
<DisclosurePanel className="mt-2 text-sm/5 text-black/50">
|
|
@@ -69,6 +70,7 @@ const PillList = ({ title, pills, emptyMessage, color = 'gray', ...props }: Prop
|
|
|
69
70
|
</DisclosurePanel>
|
|
70
71
|
</Disclosure>
|
|
71
72
|
</div>
|
|
73
|
+
<div className="border-b border-gray-100 my-4"></div>
|
|
72
74
|
</div>
|
|
73
75
|
);
|
|
74
76
|
};
|
|
@@ -9,8 +9,8 @@ interface Props {
|
|
|
9
9
|
const { repository, language } = Astro.props;
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
<div class="mx-auto pb-
|
|
13
|
-
<span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">Repository </span>
|
|
12
|
+
<div class="mx-auto pb-4 w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5 border-b border-gray-100 mb-4">
|
|
13
|
+
<span class="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize">Repository </span>
|
|
14
14
|
<ul role="list" class="space-y-2 mt-2">
|
|
15
15
|
{
|
|
16
16
|
repository && (
|
|
@@ -33,4 +33,5 @@ const { repository, language } = Astro.props;
|
|
|
33
33
|
)
|
|
34
34
|
}
|
|
35
35
|
</ul>
|
|
36
|
+
<!-- <div class='border-b border-gray-100'></div> -->
|
|
36
37
|
</div>
|
|
@@ -14,8 +14,8 @@ const { versions, collectionItem, title } = Astro.props;
|
|
|
14
14
|
const currentPath = Astro.url.pathname;
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
<div class="space-y-2 pb-
|
|
18
|
-
<span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">
|
|
17
|
+
<div class="space-y-2 pb-4">
|
|
18
|
+
<span class="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize">
|
|
19
19
|
{title || `Versions (${collectionItem.data.versions?.length})`}
|
|
20
20
|
</span>
|
|
21
21
|
<ul role="list" class="space-y-2">
|
|
@@ -39,26 +39,7 @@ const currentPath = Astro.url.pathname;
|
|
|
39
39
|
})
|
|
40
40
|
}
|
|
41
41
|
</ul>
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
versions.map((version) => {
|
|
45
|
-
const isCurrent = currentPath.includes(version);
|
|
46
|
-
return (
|
|
47
|
-
<option
|
|
48
|
-
selected={isCurrent}
|
|
49
|
-
value={buildUrl(`/docs/${collectionItem.collection}/${collectionItem.data.id}/${version}`)}
|
|
50
|
-
class={`inline-flex items-center rounded-md px-2 py-1 text-xs text-indigo-700 ring-1 ring-inset ring-indigo-700/10 hover:bg-purple-100 hover:underline ${isCurrent ? 'bg-purple-100 text-primary underline ' : 'bg-white'}`}
|
|
51
|
-
>
|
|
52
|
-
{version === collectionItem.data.latestVersion ? `v${version} (latest)` : `v${version}`}
|
|
53
|
-
</option>
|
|
54
|
-
);
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
</select> -->
|
|
58
|
-
<!-- <a
|
|
59
|
-
href={buildUrl(`/docs/${collectionItem.collection}/${collectionItem.data.id}/${collectionItem.data.latestVersion}/changelog`)}
|
|
60
|
-
class="text-[10px] text-gray-500">View changelogs</a
|
|
61
|
-
> -->
|
|
42
|
+
<div class="border-b border-gray-100 pt-2"></div>
|
|
62
43
|
</div>
|
|
63
44
|
|
|
64
45
|
<script>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { CollectionEntry } from 'astro:content';
|
|
3
|
+
import MessageTableClient from './MessageTable.client';
|
|
4
|
+
import Admonition from '../Admonition';
|
|
5
|
+
import { getMessagesForDomain } from '@utils/collections/domains';
|
|
6
|
+
import type { Domain } from '@utils/collections/domains';
|
|
7
|
+
import type { CollectionMessageTypes } from '@types';
|
|
8
|
+
export interface Props extends CollectionEntry<'services'> {
|
|
9
|
+
format: 'receives' | 'sends' | 'all';
|
|
10
|
+
limit?: number;
|
|
11
|
+
showChannels?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { format, limit, showChannels } = Astro.props;
|
|
15
|
+
|
|
16
|
+
const collection = Astro.props.collection as 'services' | 'domains';
|
|
17
|
+
|
|
18
|
+
// UI does not need everything, just return what is needed for the table
|
|
19
|
+
const getEssentialPropsForMessage = (message: CollectionEntry<CollectionMessageTypes>) => {
|
|
20
|
+
return {
|
|
21
|
+
id: message.data.id,
|
|
22
|
+
name: message.data.name,
|
|
23
|
+
version: message.data.version,
|
|
24
|
+
collection: message.collection,
|
|
25
|
+
type: message.collection === 'events' ? 'event' : message.collection === 'commands' ? 'command' : 'query',
|
|
26
|
+
summary: message.data.summary,
|
|
27
|
+
channels: message.data.channels,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// only enable for services and domains
|
|
32
|
+
const isComponentEnabled = collection === 'services' || collection === 'domains';
|
|
33
|
+
|
|
34
|
+
let data = {
|
|
35
|
+
sends: [],
|
|
36
|
+
receives: [],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (collection === 'domains') {
|
|
40
|
+
const { sends, receives } = await getMessagesForDomain(Astro.props as unknown as Domain);
|
|
41
|
+
data = {
|
|
42
|
+
sends: sends.map(getEssentialPropsForMessage) as typeof data.sends,
|
|
43
|
+
receives: receives.map(getEssentialPropsForMessage) as typeof data.receives,
|
|
44
|
+
};
|
|
45
|
+
} else {
|
|
46
|
+
// Try and set the sends and receives from the services collection
|
|
47
|
+
data = {
|
|
48
|
+
sends: Astro.props.data.sends
|
|
49
|
+
? (Astro.props.data.sends.map((message) =>
|
|
50
|
+
getEssentialPropsForMessage(message as unknown as CollectionEntry<CollectionMessageTypes>)
|
|
51
|
+
) as typeof data.sends)
|
|
52
|
+
: [],
|
|
53
|
+
receives: Astro.props.data.receives
|
|
54
|
+
? (Astro.props.data.receives.map((message) =>
|
|
55
|
+
getEssentialPropsForMessage(message as unknown as CollectionEntry<CollectionMessageTypes>)
|
|
56
|
+
) as typeof data.receives)
|
|
57
|
+
: [],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
{
|
|
63
|
+
isComponentEnabled && (
|
|
64
|
+
<MessageTableClient
|
|
65
|
+
client:load
|
|
66
|
+
sends={data.sends}
|
|
67
|
+
receives={data.receives}
|
|
68
|
+
collection={collection}
|
|
69
|
+
limit={limit}
|
|
70
|
+
showChannels={showChannels}
|
|
71
|
+
format={format}
|
|
72
|
+
/>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
{
|
|
77
|
+
!isComponentEnabled && (
|
|
78
|
+
<Admonition type="warning">
|
|
79
|
+
<div>
|
|
80
|
+
<span class="font-bold">
|
|
81
|
+
{`<MessageTable/>`} component is not supported for resources of type {collection}.
|
|
82
|
+
</span>
|
|
83
|
+
<span class="block">This component is only supported for services and domains.</span>
|
|
84
|
+
</div>
|
|
85
|
+
</Admonition>
|
|
86
|
+
)
|
|
87
|
+
}
|