@eventcatalog/core 2.65.0 → 3.0.0-beta.0
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 +1 -26
- 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-NK6OYMRD.js → chunk-JB4YT5JY.js} +1 -1
- package/dist/{chunk-BMDTX5IN.js → chunk-TQ4HZREX.js} +1 -1
- package/dist/{chunk-IJRFYF4B.js → chunk-X4W4YC3U.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -21
- package/dist/eventcatalog.config.d.cts +10 -0
- package/dist/eventcatalog.config.d.ts +10 -0
- package/dist/eventcatalog.js +3 -20
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +19 -1
- package/eventcatalog/src/components/FavoriteButton.tsx +54 -0
- package/eventcatalog/src/components/Grids/DomainGrid.tsx +386 -362
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +166 -518
- package/eventcatalog/src/components/Header.astro +48 -23
- package/eventcatalog/src/components/Lists/VersionList.astro +2 -2
- package/eventcatalog/src/components/MDX/Design/Design.astro +4 -1
- package/eventcatalog/src/components/MDX/Flow/Flow.astro +2 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +3 -3
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +8 -2
- package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +37 -0
- package/eventcatalog/src/components/Search/Search.astro +48 -28
- package/eventcatalog/src/components/Search/SearchModal.tsx +393 -702
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +298 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/builders/container.ts +66 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/builders/domain.ts +101 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/builders/flow.ts +29 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/builders/message.ts +84 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/builders/service.ts +147 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/builders/shared.ts +146 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +1073 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/sidebar-builder.ts +365 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/storage.ts +90 -0
- package/eventcatalog/src/components/SideNav/SideNav.astro +18 -28
- package/eventcatalog/src/content.config.ts +2 -0
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +10 -4
- package/eventcatalog/src/enterprise/eventcatalog-chat/pages/chat/index.astro +3 -3
- package/eventcatalog/src/layouts/DirectoryLayout.astro +2 -2
- package/eventcatalog/src/layouts/DiscoverLayout.astro +3 -3
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +85 -63
- package/eventcatalog/src/layouts/VisualiserLayout.astro +3 -3
- package/eventcatalog/src/pages/_index.astro +530 -110
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/_index.data.ts +64 -0
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +29 -0
- package/eventcatalog/src/pages/directory/[type]/_index.data.ts +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/_index.data.ts +1 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/_index.data.ts +3 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +1 -5
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +362 -190
- package/eventcatalog/src/pages/docs/[type]/[id]/[version].md.ts +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/index.astro +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/language/_index.data.ts +1 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +3 -27
- package/eventcatalog/src/pages/docs/teams/[id]/_index.data.ts +2 -2
- package/eventcatalog/src/pages/docs/users/[id]/_index.data.ts +2 -2
- package/eventcatalog/src/pages/index.astro +14 -5
- package/eventcatalog/src/pages/nav-index.json.ts +30 -0
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/_index.data.ts +77 -0
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +90 -0
- package/eventcatalog/src/pages/schemas/{index.astro → explorer/index.astro} +3 -3
- package/eventcatalog/src/pages/studio.astro +3 -3
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +4 -3
- package/eventcatalog/src/pages/visualiser/[type]/[id]/index.astro +2 -2
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/_index.data.ts +4 -3
- package/eventcatalog/src/stores/favorites-store.ts +83 -0
- package/eventcatalog/src/stores/sidebar-store.ts +8 -0
- package/eventcatalog/src/utils/collections/changelogs.ts +7 -4
- package/eventcatalog/src/utils/{channels.ts → collections/channels.ts} +81 -31
- package/eventcatalog/src/utils/collections/commands.ts +134 -0
- package/eventcatalog/src/utils/collections/containers.ts +44 -33
- package/eventcatalog/src/utils/collections/domains.ts +204 -62
- package/eventcatalog/src/utils/{entities.ts → collections/entities.ts} +44 -24
- package/eventcatalog/src/utils/collections/events.ts +136 -0
- package/eventcatalog/src/utils/collections/flows.ts +59 -25
- package/eventcatalog/src/utils/{messages.ts → collections/messages.ts} +13 -4
- package/eventcatalog/src/utils/{queries.ts → collections/queries.ts} +49 -28
- package/eventcatalog/src/utils/collections/services.ts +100 -68
- package/eventcatalog/src/utils/collections/teams.ts +94 -0
- package/eventcatalog/src/utils/collections/users.ts +122 -0
- package/eventcatalog/src/utils/collections/util.ts +57 -1
- package/eventcatalog/src/utils/feature.ts +3 -1
- package/eventcatalog/src/utils/{collections/file-diffs.ts → file-diffs.ts} +1 -1
- package/eventcatalog/src/utils/node-graphs/container-node-graph.ts +2 -0
- package/eventcatalog/src/utils/node-graphs/domain-entity-map.ts +16 -6
- package/eventcatalog/src/utils/node-graphs/domains-canvas.ts +14 -10
- package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +36 -64
- package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +23 -19
- package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +36 -49
- package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +22 -18
- package/eventcatalog/src/utils/page-loaders/page-data-loader.ts +4 -4
- package/eventcatalog/tailwind.config.mjs +14 -0
- package/eventcatalog/tsconfig.json +2 -1
- package/package.json +7 -4
- package/eventcatalog/public/logo_old.png +0 -0
- package/eventcatalog/src/components/DiscoverInsight.astro +0 -61
- package/eventcatalog/src/components/Grids/ServiceGrid.tsx +0 -534
- package/eventcatalog/src/components/Lists/CustomSideBarSectionList.astro +0 -55
- package/eventcatalog/src/components/Lists/ProtocolList.tsx +0 -74
- package/eventcatalog/src/components/Lists/RepositoryList.astro +0 -37
- package/eventcatalog/src/components/Lists/SpecificationsList.astro +0 -67
- package/eventcatalog/src/components/SideBars/ChannelSideBar.astro +0 -204
- package/eventcatalog/src/components/SideBars/ContainerSideBar.astro +0 -180
- package/eventcatalog/src/components/SideBars/DomainSideBar.astro +0 -273
- package/eventcatalog/src/components/SideBars/EntitySideBar.astro +0 -139
- package/eventcatalog/src/components/SideBars/FlowSideBar.astro +0 -128
- package/eventcatalog/src/components/SideBars/MessageSideBar.astro +0 -248
- package/eventcatalog/src/components/SideBars/ServiceSideBar.astro +0 -294
- package/eventcatalog/src/components/SideNav/ListViewSideBar/components/CollapsibleGroup.tsx +0 -46
- package/eventcatalog/src/components/SideNav/ListViewSideBar/components/MessageList.tsx +0 -78
- package/eventcatalog/src/components/SideNav/ListViewSideBar/components/SpecificationList.tsx +0 -83
- package/eventcatalog/src/components/SideNav/ListViewSideBar/index.tsx +0 -1250
- package/eventcatalog/src/components/SideNav/ListViewSideBar/types.ts +0 -91
- package/eventcatalog/src/components/SideNav/ListViewSideBar/utils.ts +0 -201
- package/eventcatalog/src/components/SideNav/TreeView/getTreeView.ts +0 -190
- package/eventcatalog/src/components/SideNav/TreeView/index.tsx +0 -94
- package/eventcatalog/src/components/TreeView/index.tsx +0 -328
- package/eventcatalog/src/components/TreeView/styles.module.css +0 -264
- package/eventcatalog/src/components/TreeView/useSlots.ts +0 -95
- package/eventcatalog/src/pages/architecture/[type]/index.astro +0 -14
- package/eventcatalog/src/pages/architecture/architecture.astro +0 -101
- package/eventcatalog/src/pages/architecture/docs/[type]/index.astro +0 -14
- package/eventcatalog/src/utils/commands.ts +0 -112
- package/eventcatalog/src/utils/events.ts +0 -108
- package/eventcatalog/src/utils/generators/index.ts +0 -10
- package/eventcatalog/src/utils/teams.ts +0 -72
- package/eventcatalog/src/utils/users.ts +0 -72
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { isSSR } from '@utils/feature';
|
|
2
|
+
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
3
|
+
import type { PageTypes } from '@types';
|
|
4
|
+
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Documentation page class for all collection types with versioning
|
|
8
|
+
*/
|
|
9
|
+
export class Page extends HybridPage {
|
|
10
|
+
static async getStaticPaths() {
|
|
11
|
+
if (isSSR()) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const itemTypes: PageTypes[] = ['services', 'domains'];
|
|
16
|
+
const allItems = await Promise.all(itemTypes.map((type) => pageDataLoader[type]()));
|
|
17
|
+
|
|
18
|
+
return allItems.flatMap((items, index) =>
|
|
19
|
+
items.map((item) => ({
|
|
20
|
+
params: {
|
|
21
|
+
type: itemTypes[index],
|
|
22
|
+
id: item.data.id,
|
|
23
|
+
version: item.data.version,
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
type: itemTypes[index],
|
|
27
|
+
...item,
|
|
28
|
+
// Not everything needs the body of the page itself.
|
|
29
|
+
body: undefined,
|
|
30
|
+
},
|
|
31
|
+
}))
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
protected static async fetchData(params: any) {
|
|
36
|
+
const { type, id, version } = params;
|
|
37
|
+
|
|
38
|
+
if (!type || !id || !version) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Get all items of the specified type
|
|
43
|
+
const items = await pageDataLoader[type as PageTypes]();
|
|
44
|
+
|
|
45
|
+
// Find the specific item by id and version
|
|
46
|
+
const item = items.find((i) => i.data.id === id && i.data.version === version);
|
|
47
|
+
|
|
48
|
+
if (!item) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
type,
|
|
54
|
+
...item,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
protected static createNotFoundResponse(): Response {
|
|
59
|
+
return new Response(null, {
|
|
60
|
+
status: 404,
|
|
61
|
+
statusText: 'Documentation not found',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DomainGrid from '@components/Grids/DomainGrid';
|
|
3
|
+
import MessageGrid from '@components/Grids/MessageGrid';
|
|
4
|
+
|
|
5
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
6
|
+
import { Page } from './_index.data';
|
|
7
|
+
|
|
8
|
+
export const prerender = Page.prerender;
|
|
9
|
+
export const getStaticPaths = Page.getStaticPaths;
|
|
10
|
+
|
|
11
|
+
// Get data
|
|
12
|
+
const props = await Page.getData(Astro);
|
|
13
|
+
let domain = props;
|
|
14
|
+
|
|
15
|
+
const pageTitle = `${props.type} | ${props.data.name}`.replace(/^\w/, (c) => c.toUpperCase());
|
|
16
|
+
|
|
17
|
+
const type = props.type;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<VerticalSideBarLayout title={pageTitle}>
|
|
21
|
+
<div class="bg-white min-h-screen">
|
|
22
|
+
<div class="mx-auto h-full">
|
|
23
|
+
<div class="px-6 py-6 h-full">
|
|
24
|
+
{type === 'domains' && <DomainGrid domain={domain} client:load />}
|
|
25
|
+
{type === 'services' && <MessageGrid service={props} client:load />}
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</VerticalSideBarLayout>
|
|
@@ -8,8 +8,8 @@ export class Page extends HybridPage {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
static async getStaticPaths(): Promise<Array<{ params: any; props: any }>> {
|
|
11
|
-
const { getUsers } = await import('@utils/users');
|
|
12
|
-
const { getTeams } = await import('@utils/teams');
|
|
11
|
+
const { getUsers } = await import('@utils/collections/users');
|
|
12
|
+
const { getTeams } = await import('@utils/collections/teams');
|
|
13
13
|
|
|
14
14
|
const loaders = {
|
|
15
15
|
users: getUsers,
|
|
@@ -37,8 +37,8 @@ export class Page extends HybridPage {
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const { getUsers } = await import('@utils/users');
|
|
41
|
-
const { getTeams } = await import('@utils/teams');
|
|
40
|
+
const { getUsers } = await import('@utils/collections/users');
|
|
41
|
+
const { getTeams } = await import('@utils/collections/teams');
|
|
42
42
|
|
|
43
43
|
const loaders = {
|
|
44
44
|
users: getUsers,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isSSR } from '@utils/feature';
|
|
1
|
+
import { isSSR, isChangelogEnabled } from '@utils/feature';
|
|
2
2
|
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
3
3
|
import type { PageTypes } from '@types';
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ export class Page extends HybridPage {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
static async getStaticPaths(): Promise<Array<{ params: any; props: any }>> {
|
|
11
|
-
if (isSSR()) {
|
|
11
|
+
if (isSSR() || !isChangelogEnabled()) {
|
|
12
12
|
return [];
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -36,7 +36,7 @@ export class Page extends HybridPage {
|
|
|
36
36
|
protected static async fetchData(params: any) {
|
|
37
37
|
const { type, id, version } = params;
|
|
38
38
|
|
|
39
|
-
if (!type || !id || !version) {
|
|
39
|
+
if (!type || !id || !version || !isChangelogEnabled()) {
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -16,7 +16,7 @@ import 'diff2html/bundles/css/diff2html.min.css';
|
|
|
16
16
|
|
|
17
17
|
import { buildUrl } from '@utils/url-builder';
|
|
18
18
|
import { getPreviousVersion } from '@utils/collections/util';
|
|
19
|
-
import { getDiffsForCurrentAndPreviousVersion } from '@utils/
|
|
19
|
+
import { getDiffsForCurrentAndPreviousVersion } from '@utils/file-diffs';
|
|
20
20
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
21
21
|
import { ClientRouter } from 'astro:transitions';
|
|
22
22
|
import { isChangelogEnabled } from '@utils/feature';
|
|
@@ -29,10 +29,6 @@ export const getStaticPaths = Page.getStaticPaths;
|
|
|
29
29
|
// Get data
|
|
30
30
|
const props = await Page.getData(Astro);
|
|
31
31
|
|
|
32
|
-
if (!isChangelogEnabled()) {
|
|
33
|
-
return Astro.redirect('/docs');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
32
|
let collectionItem = props;
|
|
37
33
|
const logs = await getChangeLogs(props);
|
|
38
34
|
|