@eventcatalog/core 2.30.7 → 2.30.8
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 +2 -1
- 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-HINNLTBH.js → chunk-D4IJRFPJ.js} +1 -1
- package/dist/{chunk-EFSBN3ZZ.js → chunk-NALVGTIE.js} +1 -1
- package/dist/{chunk-SUJLBNZK.js → chunk-XJBJFIN7.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/components/SideBars/FlowSideBar.astro +75 -0
- package/eventcatalog/src/components/SideNav/TreeView/getTreeView.ts +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/index.astro +23 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +13 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +17 -14
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/index.astro +21 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +5 -3
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +9 -4
- package/eventcatalog/src/types/index.ts +1 -1
- package/eventcatalog/src/utils/page-loaders/page-data-loader.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<h4>Features: Documentation for Event Driven Architectures, Integration with any broker, Generator from your OpenAPI and AsyncAPI documents, Docs and Code, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
|
|
35
35
|
|
|
36
36
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
37
|
-
[](#contributors-)
|
|
38
38
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
39
39
|
|
|
40
40
|
[Read the Docs](https://www.eventcatalog.dev/docs/development/getting-started/introduction) | [View Demo](https://demo.eventcatalog.dev)
|
|
@@ -262,6 +262,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
262
262
|
<tr>
|
|
263
263
|
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/ruudwelling/"><img src="https://avatars.githubusercontent.com/u/4014179?v=4?s=100" width="100px;" alt="Ruud Welling"/><br /><sub><b>Ruud Welling</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=WellingR" title="Code">💻</a></td>
|
|
264
264
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vienin"><img src="https://avatars.githubusercontent.com/u/2124283?v=4?s=100" width="100px;" alt="Kevin Pouget"/><br /><sub><b>Kevin Pouget</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=vienin" title="Code">💻</a></td>
|
|
265
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VitaliiBalash"><img src="https://avatars.githubusercontent.com/u/4520809?v=4?s=100" width="100px;" alt="Vitalii Balash"/><br /><sub><b>Vitalii Balash</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=VitaliiBalash" title="Code">💻</a></td>
|
|
265
266
|
</tr>
|
|
266
267
|
</tbody>
|
|
267
268
|
</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-D4IJRFPJ.js";
|
|
4
|
+
import "../chunk-NALVGTIE.js";
|
|
5
|
+
import "../chunk-XJBJFIN7.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-UKJ7F5WR.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-D4IJRFPJ.js";
|
|
10
|
+
import "./chunk-NALVGTIE.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
14
14
|
} from "./chunk-7SI5EVOX.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XJBJFIN7.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled
|
|
20
20
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
import OwnersList from '@components/Lists/OwnersList';
|
|
3
|
+
import VersionList from '@components/Lists/VersionList.astro';
|
|
4
|
+
import { buildUrl } from '@utils/url-builder';
|
|
5
|
+
import { getOwner } from '@utils/collections/owners';
|
|
6
|
+
import type { CollectionEntry } from 'astro:content';
|
|
7
|
+
import { ScrollText, Workflow, RssIcon } from 'lucide-react';
|
|
8
|
+
import config from '@config';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
flow: CollectionEntry<'flows'>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { flow } = Astro.props;
|
|
15
|
+
|
|
16
|
+
const ownersRaw = flow.data?.owners || [];
|
|
17
|
+
const owners = await Promise.all<ReturnType<typeof getOwner>>(ownersRaw.map(getOwner));
|
|
18
|
+
const filteredOwners = owners.filter((o) => o !== undefined);
|
|
19
|
+
|
|
20
|
+
const ownersList = filteredOwners.map((o) => ({
|
|
21
|
+
label: o.data.name,
|
|
22
|
+
type: o.collection,
|
|
23
|
+
badge: o.collection === 'users' ? o.data.role : 'Team',
|
|
24
|
+
avatarUrl: o.collection === 'users' ? o.data.avatarUrl : '',
|
|
25
|
+
href: buildUrl(`/docs/${o.collection}/${o.data.id}`),
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
const isRSSEnabled = config.rss?.enabled;
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
<aside class="sticky top-28 left-0 h-full overflow-y-auto pr-6 py-4">
|
|
32
|
+
<div id="sidebar-cta-portal" class="">
|
|
33
|
+
{flow.data.versions && <VersionList versions={flow.data.versions} collectionItem={flow} />}
|
|
34
|
+
|
|
35
|
+
<OwnersList
|
|
36
|
+
title={`Flow owners (${ownersList.length})`}
|
|
37
|
+
owners={ownersList}
|
|
38
|
+
emptyMessage={`This flow does not have any documented owners.`}
|
|
39
|
+
client:load
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{
|
|
43
|
+
isRSSEnabled && (
|
|
44
|
+
<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">
|
|
45
|
+
<span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">Flow RSS Feed</span>
|
|
46
|
+
<ul role="list" class="space-y-2 mt-2">
|
|
47
|
+
<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 ">
|
|
48
|
+
<a class={`flex items-center space-x-2`} target="_blank" href={buildUrl(`/rss/flows/rss.xml`)}>
|
|
49
|
+
<RssIcon className="h-4 w-4 text-gray-800 group-hover:text-white" strokeWidth={1} />
|
|
50
|
+
<span class="font-light text-sm truncate">RSS</span>
|
|
51
|
+
</a>
|
|
52
|
+
</li>
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
<div class="space-y-2">
|
|
59
|
+
<a
|
|
60
|
+
href={buildUrl(`/visualiser/${flow.collection}/${flow.data.id}/${flow.data.version}`)}
|
|
61
|
+
class="flex items-center justify-center space-x-2 text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
62
|
+
>
|
|
63
|
+
<Workflow strokeWidth={2} size={16} />
|
|
64
|
+
<span class="block">View in visualiser</span>
|
|
65
|
+
</a>
|
|
66
|
+
<a
|
|
67
|
+
href={buildUrl(`/docs/${flow.collection}/${flow.data.id}/${flow.data.latestVersion}/changelog`)}
|
|
68
|
+
class="flex items-center space-x-2 justify-center text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
69
|
+
>
|
|
70
|
+
<ScrollText strokeWidth={2} size={16} />
|
|
71
|
+
<span class="block">Read changelog</span>
|
|
72
|
+
</a>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</aside>
|
|
@@ -115,8 +115,8 @@ function groupChildrenByType(parentNode: TreeNode) {
|
|
|
115
115
|
acc[n.type].push(n);
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
// Collapse
|
|
119
|
-
const AUTO_EXPANDED_TYPES = ['domains'
|
|
118
|
+
// Collapse everything except domains
|
|
119
|
+
const AUTO_EXPANDED_TYPES = ['domains'];
|
|
120
120
|
|
|
121
121
|
parentNode.children = Object.entries(acc)
|
|
122
122
|
// Order label nodes by RESOURCE_TYPES
|
|
@@ -39,7 +39,7 @@ export async function getStaticPaths() {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// @ts-ignore
|
|
42
|
-
const { catalog, data, filePath } = Astro.props;
|
|
42
|
+
const { collection, catalog, data, filePath } = Astro.props;
|
|
43
43
|
const fileName = data.specifications?.asyncapiPath || 'asyncapi.yaml';
|
|
44
44
|
const directory = path.dirname(filePath || '');
|
|
45
45
|
const pathToSpec = path.join(directory, fileName);
|
|
@@ -58,10 +58,30 @@ const config: ConfigInterface = { show: { sidebar: true, errors: true } };
|
|
|
58
58
|
|
|
59
59
|
const component = createElement(AsyncApiComponentWP, { schema: { stringified }, config });
|
|
60
60
|
const renderedComponent = renderToString(component);
|
|
61
|
+
|
|
62
|
+
// Capitalize the first letter of a string
|
|
63
|
+
const pageTitle = `${collection} | ${data.name} | AsyncApi Spec`.replace(/^\w/, (c) => c.toUpperCase());
|
|
64
|
+
|
|
65
|
+
// Index only the latest version
|
|
66
|
+
const pagefindAttributes =
|
|
67
|
+
data.version === data.latestVersion
|
|
68
|
+
? {
|
|
69
|
+
'data-pagefind-body': '',
|
|
70
|
+
'data-pagefind-meta': `title:${pageTitle}`,
|
|
71
|
+
}
|
|
72
|
+
: {};
|
|
61
73
|
---
|
|
62
74
|
|
|
63
|
-
<VerticalSideBarLayout title=
|
|
64
|
-
<div
|
|
75
|
+
<VerticalSideBarLayout title={pageTitle}>
|
|
76
|
+
<div {...pagefindAttributes}>
|
|
77
|
+
{
|
|
78
|
+
// Currently, Pagefind does not index metadata (such as the title),
|
|
79
|
+
// so we need to ensure it is included as text on the page.
|
|
80
|
+
// https://github.com/CloudCannon/pagefind/issues/437
|
|
81
|
+
}
|
|
82
|
+
<h2 class="hidden">{pageTitle}</h2>
|
|
83
|
+
<div id="asyncapi" class="md:pr-14" set:html={renderedComponent} />
|
|
84
|
+
</div>
|
|
65
85
|
</VerticalSideBarLayout>
|
|
66
86
|
|
|
67
87
|
<script is:inline src={js}></script>
|
|
@@ -3,7 +3,14 @@ import Footer from '@layouts/Footer.astro';
|
|
|
3
3
|
|
|
4
4
|
import type { PageTypes } from '@types';
|
|
5
5
|
import { getChangeLogs } from '@utils/collections/changelogs';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
RectangleGroupIcon,
|
|
8
|
+
ServerIcon,
|
|
9
|
+
BoltIcon,
|
|
10
|
+
ChatBubbleLeftIcon,
|
|
11
|
+
MagnifyingGlassIcon,
|
|
12
|
+
QueueListIcon,
|
|
13
|
+
} from '@heroicons/react/24/outline';
|
|
7
14
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
8
15
|
import { render, getEntry } from 'astro:content';
|
|
9
16
|
import 'diff2html/bundles/css/diff2html.min.css';
|
|
@@ -15,7 +22,7 @@ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
|
15
22
|
import { ClientRouter } from 'astro:transitions';
|
|
16
23
|
|
|
17
24
|
export async function getStaticPaths() {
|
|
18
|
-
const itemTypes: PageTypes[] = ['events', 'commands', 'queries', 'services', 'domains'];
|
|
25
|
+
const itemTypes: PageTypes[] = ['events', 'commands', 'queries', 'services', 'domains', 'flows'];
|
|
19
26
|
const allItems = await Promise.all(itemTypes.map((type) => pageDataLoader[type]()));
|
|
20
27
|
|
|
21
28
|
return allItems.flatMap((items, index) =>
|
|
@@ -44,7 +51,7 @@ const logs = await getChangeLogs(props);
|
|
|
44
51
|
const { data } = props;
|
|
45
52
|
const latestVersion = data.latestVersion;
|
|
46
53
|
|
|
47
|
-
const renderedLogs =
|
|
54
|
+
const renderedLogs = logs.map(async (log) => {
|
|
48
55
|
const logEntry = await getEntry('changelogs', log.id);
|
|
49
56
|
const { Content } = await render(logEntry as any);
|
|
50
57
|
return {
|
|
@@ -104,6 +111,9 @@ const getBadge = () => {
|
|
|
104
111
|
class: 'text-yellow-400',
|
|
105
112
|
};
|
|
106
113
|
}
|
|
114
|
+
if (props.collection === 'flows') {
|
|
115
|
+
return { backgroundColor: 'teal', textColor: 'teal', content: 'Flow', icon: QueueListIcon, class: 'text-teal-400' };
|
|
116
|
+
}
|
|
107
117
|
};
|
|
108
118
|
|
|
109
119
|
const badges = [getBadge()];
|
|
@@ -11,12 +11,12 @@ import ServiceSideBar from '@components/SideBars/ServiceSideBar.astro';
|
|
|
11
11
|
import MessageSideBar from '@components/SideBars/MessageSideBar.astro';
|
|
12
12
|
import DomainSideBar from '@components/SideBars/DomainSideBar.astro';
|
|
13
13
|
import ChannelSideBar from '@components/SideBars/ChannelSideBar.astro';
|
|
14
|
+
import FlowSideBar from '@components/SideBars/FlowSideBar.astro';
|
|
14
15
|
|
|
15
16
|
import { QueueListIcon, RectangleGroupIcon, ServerIcon, BoltIcon, ChatBubbleLeftIcon } from '@heroicons/react/24/outline';
|
|
16
17
|
import type { PageTypes } from '@types';
|
|
17
18
|
|
|
18
19
|
import { buildUrl } from '@utils/url-builder';
|
|
19
|
-
import { getFlows } from '@utils/collections/flows';
|
|
20
20
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
21
21
|
import { ClientRouter } from 'astro:transitions';
|
|
22
22
|
import { render } from 'astro:content';
|
|
@@ -24,16 +24,9 @@ import { ArrowsRightLeftIcon } from '@heroicons/react/20/solid';
|
|
|
24
24
|
|
|
25
25
|
import config from '@config';
|
|
26
26
|
|
|
27
|
-
type PageTypesWithFlows = PageTypes | 'flows';
|
|
28
|
-
|
|
29
27
|
export async function getStaticPaths() {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
flows: getFlows,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const itemTypes: PageTypesWithFlows[] = ['events', 'commands', 'queries', 'services', 'domains', 'flows', 'channels'];
|
|
36
|
-
const allItems = await Promise.all(itemTypes.map((type) => loaders[type]()));
|
|
28
|
+
const itemTypes: PageTypes[] = ['events', 'commands', 'queries', 'services', 'domains', 'flows', 'channels'];
|
|
29
|
+
const allItems = await Promise.all(itemTypes.map((type) => pageDataLoader[type]()));
|
|
37
30
|
|
|
38
31
|
return allItems.flatMap((items, index) =>
|
|
39
32
|
items.map((item) => ({
|
|
@@ -123,10 +116,19 @@ const getSpecificationBadges = () => {
|
|
|
123
116
|
};
|
|
124
117
|
|
|
125
118
|
const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
|
|
119
|
+
|
|
120
|
+
// Index only the latest version
|
|
121
|
+
const pagefindAttributes =
|
|
122
|
+
props.data.version === props.data.latestVersion
|
|
123
|
+
? {
|
|
124
|
+
'data-pagefind-body': '',
|
|
125
|
+
'data-pagefind-meta': `title:${pageTitle}`,
|
|
126
|
+
}
|
|
127
|
+
: {};
|
|
126
128
|
---
|
|
127
129
|
|
|
128
130
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
129
|
-
<main class="flex sm:px-8 docs-layout h-full">
|
|
131
|
+
<main class="flex sm:px-8 docs-layout h-full" {...pagefindAttributes}>
|
|
130
132
|
<div class="flex docs-layout w-full">
|
|
131
133
|
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8">
|
|
132
134
|
<div class="border-b border-gray-200 flex justify-between items-start md:pb-2">
|
|
@@ -159,7 +161,7 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
|
|
|
159
161
|
</div>
|
|
160
162
|
</div>
|
|
161
163
|
|
|
162
|
-
<div>
|
|
164
|
+
<div data-pagefind-ignore>
|
|
163
165
|
{
|
|
164
166
|
props.data.version !== props.data.latestVersion && (
|
|
165
167
|
<div class="rounded-md bg-gradient-to-r from-purple-50 to-purple-100 p-4 not-prose my-4">
|
|
@@ -198,7 +200,7 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
|
|
|
198
200
|
<div class="prose prose-md py-4 w-full">
|
|
199
201
|
<Content components={components(props)} />
|
|
200
202
|
</div>
|
|
201
|
-
<div>
|
|
203
|
+
<div data-pagefind-ignore>
|
|
202
204
|
<!-- @ts-ignore -->
|
|
203
205
|
<SchemaViewer id={props.data.id} catalog={props.catalog} filePath={props.filePath} />
|
|
204
206
|
<NodeGraph
|
|
@@ -215,7 +217,7 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
|
|
|
215
217
|
</div>
|
|
216
218
|
<Footer />
|
|
217
219
|
</div>
|
|
218
|
-
<aside class="hidden lg:block sticky top-0 pb-10 w-96 overflow-y-auto py-2">
|
|
220
|
+
<aside class="hidden lg:block sticky top-0 pb-10 w-96 overflow-y-auto py-2" data-pagefind-ignore>
|
|
219
221
|
<!-- @ts-ignore -->
|
|
220
222
|
{
|
|
221
223
|
(props?.collection === 'events' || props.collection === 'commands' || props.collection === 'queries') && (
|
|
@@ -225,6 +227,7 @@ const badges = [getBadge(), ...contentBadges, ...getSpecificationBadges()];
|
|
|
225
227
|
{props?.collection === 'services' && <ServiceSideBar service={props} />}
|
|
226
228
|
{props?.collection === 'domains' && <DomainSideBar domain={props} />}
|
|
227
229
|
{props?.collection === 'channels' && <ChannelSideBar channel={props} />}
|
|
230
|
+
{props?.collection === 'flows' && <FlowSideBar flow={props} />}
|
|
228
231
|
</aside>
|
|
229
232
|
</div>
|
|
230
233
|
<ClientRouter />
|
|
@@ -35,7 +35,7 @@ export async function getStaticPaths() {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// @ts-ignore
|
|
38
|
-
const { data, catalog, filePath } = Astro.props;
|
|
38
|
+
const { collection, data, catalog, filePath } = Astro.props;
|
|
39
39
|
const fileName = data.specifications?.openapiPath || 'openapi.yml';
|
|
40
40
|
|
|
41
41
|
const directory = path.dirname(filePath || '');
|
|
@@ -44,12 +44,24 @@ const fileExists = fs.existsSync(pathToSpec);
|
|
|
44
44
|
|
|
45
45
|
let content = '';
|
|
46
46
|
|
|
47
|
+
// Capitalize the first letter of a string
|
|
48
|
+
const pageTitle = `${collection} | ${data.name} | OpenAPI Spec`.replace(/^\w/, (c) => c.toUpperCase());
|
|
49
|
+
|
|
50
|
+
// Index only the latest version
|
|
51
|
+
const pagefindAttributes =
|
|
52
|
+
data.version === data.latestVersion
|
|
53
|
+
? {
|
|
54
|
+
'data-pagefind-body': '',
|
|
55
|
+
'data-pagefind-meta': `title:${pageTitle}`,
|
|
56
|
+
}
|
|
57
|
+
: {};
|
|
58
|
+
|
|
47
59
|
if (fileExists) {
|
|
48
60
|
content = fs.readFileSync(pathToSpec, 'utf8');
|
|
49
61
|
}
|
|
50
62
|
---
|
|
51
63
|
|
|
52
|
-
<VerticalSideBarLayout title=
|
|
64
|
+
<VerticalSideBarLayout title={pageTitle}>
|
|
53
65
|
{
|
|
54
66
|
!fileExists ? (
|
|
55
67
|
<div class="text-center h-screen flex flex-col justify-center ">
|
|
@@ -60,7 +72,13 @@ if (fileExists) {
|
|
|
60
72
|
</p>
|
|
61
73
|
</div>
|
|
62
74
|
) : (
|
|
63
|
-
<div>
|
|
75
|
+
<div {...pagefindAttributes}>
|
|
76
|
+
{
|
|
77
|
+
// Currently, Pagefind does not index metadata (such as the title),
|
|
78
|
+
// so we need to ensure it is included as text on the page.
|
|
79
|
+
// https://github.com/CloudCannon/pagefind/issues/437
|
|
80
|
+
}
|
|
81
|
+
<h2 class="hidden">{pageTitle}</h2>
|
|
64
82
|
<OpenAPISpec client:only="react" spec={content} />
|
|
65
83
|
</div>
|
|
66
84
|
)
|
|
@@ -68,7 +68,7 @@ const badges = [
|
|
|
68
68
|
---
|
|
69
69
|
|
|
70
70
|
<VerticalSideBarLayout title={pageTitle} description={ubiquitousLanguage.summary}>
|
|
71
|
-
<main class="flex sm:px-8 docs-layout h-full max-w-7xl">
|
|
71
|
+
<main class="flex sm:px-8 docs-layout h-full max-w-7xl" data-pagefind-body data-pagefind-meta={`title:${pageTitle}`}>
|
|
72
72
|
<div class="flex docs-layout w-full">
|
|
73
73
|
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8 min-h-[50em]">
|
|
74
74
|
<nav class="flex mb-4" aria-label="Breadcrumb">
|
|
@@ -34,7 +34,7 @@ const ubiquitousLanguage = ubiquitousLanguages[0];
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
36
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
37
|
-
<main class="flex sm:px-8 docs-layout h-full">
|
|
37
|
+
<main class="flex sm:px-8 docs-layout h-full" data-pagefind-body data-pagefind-meta={`title:${pageTitle}`}>
|
|
38
38
|
<div class="flex docs-layout w-full">
|
|
39
39
|
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8 min-h-[50em]">
|
|
40
40
|
<nav class="flex mb-4" aria-label="Breadcrumb">
|
|
@@ -69,11 +69,13 @@ const ownedQueriesList = queries.map((p) => ({
|
|
|
69
69
|
collection: p.collection,
|
|
70
70
|
tag: `v${p.data.version}`,
|
|
71
71
|
}));
|
|
72
|
+
|
|
73
|
+
const pageTitle = `Team | ${props.data.name}`;
|
|
72
74
|
---
|
|
73
75
|
|
|
74
|
-
<VerticalSideBarLayout title={
|
|
76
|
+
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
75
77
|
<div class="flex min-h-screen docs-layout sm:px-8">
|
|
76
|
-
<main class="flex-1 w-full pr-10 pt-4">
|
|
78
|
+
<main class="flex-1 w-full pr-10 pt-4" data-pagefind-body data-pagefind-meta={`title:${pageTitle}`}>
|
|
77
79
|
<!-- <span class="text-purple-500 bg-purple-100 px-2 py-1 rounded-md">v{props.data.version}</span> -->
|
|
78
80
|
|
|
79
81
|
<div class="border-b border-gray-200 py-4 pb-2">
|
|
@@ -131,7 +133,7 @@ const ownedQueriesList = queries.map((p) => ({
|
|
|
131
133
|
<NodeGraph id={props.data.id} type={props?.catalog?.type} nodes={props.nodes} masterNode={{ name: props.data.name, id: props.data.id }} client:load />
|
|
132
134
|
</div> -->
|
|
133
135
|
</main>
|
|
134
|
-
<aside class="sticky top-20 h-[calc(100vh-theme(spacing.16))] w-72 overflow-y-auto">
|
|
136
|
+
<aside class="sticky top-20 h-[calc(100vh-theme(spacing.16))] w-72 overflow-y-auto" data-pagefind-ignore>
|
|
135
137
|
<div class="divide-y-2 divide-gray-100">
|
|
136
138
|
<PillListFlat
|
|
137
139
|
color="pink"
|
|
@@ -59,10 +59,12 @@ const associatedTeams = teams.map((o) => ({
|
|
|
59
59
|
badge: 'Team',
|
|
60
60
|
href: buildUrl(`/docs/${o.collection}/${o.data.id}`),
|
|
61
61
|
}));
|
|
62
|
+
|
|
63
|
+
const pageTitle = `User | ${props.data.name}`;
|
|
62
64
|
---
|
|
63
65
|
|
|
64
|
-
<VerticalSideBarLayout title={
|
|
65
|
-
<main class="flex sm:px-8 docs-layout h-full">
|
|
66
|
+
<VerticalSideBarLayout title={pageTitle}>
|
|
67
|
+
<main class="flex sm:px-8 docs-layout h-full" data-pagefind-body data-pagefind-meta={`title:${pageTitle}`}>
|
|
66
68
|
<div class="flex docs-layout w-full">
|
|
67
69
|
<div class="w-full lg:mr-6 pr-8 overflow-y-auto py-4">
|
|
68
70
|
<!-- <span class="text-purple-500 bg-purple-100 px-2 py-1 rounded-md">v{props.data.version}</span> -->
|
|
@@ -105,7 +107,7 @@ const associatedTeams = teams.map((o) => ({
|
|
|
105
107
|
</div>
|
|
106
108
|
</div>
|
|
107
109
|
</div>
|
|
108
|
-
<div class="border-b border-gray-200">
|
|
110
|
+
<div class="border-b border-gray-200" data-pagefind-ignore>
|
|
109
111
|
<div class="mx-auto max-w-7xl px-6 lg:px-8">
|
|
110
112
|
<div class="mx-auto max-w-2xl lg:max-w-none">
|
|
111
113
|
<dl
|
|
@@ -139,7 +141,10 @@ const associatedTeams = teams.map((o) => ({
|
|
|
139
141
|
<Content components={components(props)} />
|
|
140
142
|
</div>
|
|
141
143
|
</div>
|
|
142
|
-
<aside
|
|
144
|
+
<aside
|
|
145
|
+
class="hidden lg:block sticky top-0 h-[calc(100vh-theme(spacing.16))] w-72 overflow-y-auto py-2"
|
|
146
|
+
data-pagefind-ignore
|
|
147
|
+
>
|
|
143
148
|
<div class="divide-y-2 divide-gray-100 pr-6">
|
|
144
149
|
{
|
|
145
150
|
ownedDomainsList.length > 0 && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type CollectionTypes = 'commands' | 'events' | 'queries' | 'domains' | 'services' | 'flows' | 'channels';
|
|
2
2
|
export type CollectionMessageTypes = 'commands' | 'events' | 'queries';
|
|
3
3
|
export type CollectionUserTypes = 'users';
|
|
4
|
-
export type PageTypes = 'events' | 'commands' | 'queries' | 'services' | 'domains' | 'channels';
|
|
4
|
+
export type PageTypes = 'events' | 'commands' | 'queries' | 'services' | 'domains' | 'channels' | 'flows';
|
|
@@ -4,6 +4,7 @@ import { getDomains } from '@utils/collections/domains';
|
|
|
4
4
|
import { getCommands, getEvents } from '@utils/messages';
|
|
5
5
|
import { getQueries } from '@utils/queries';
|
|
6
6
|
import { getServices } from '@utils/collections/services';
|
|
7
|
+
import { getFlows } from '@utils/collections/flows';
|
|
7
8
|
import type { CollectionEntry } from 'astro:content';
|
|
8
9
|
|
|
9
10
|
export const pageDataLoader: Record<PageTypes, () => Promise<CollectionEntry<CollectionTypes>[]>> = {
|
|
@@ -13,4 +14,5 @@ export const pageDataLoader: Record<PageTypes, () => Promise<CollectionEntry<Col
|
|
|
13
14
|
services: getServices,
|
|
14
15
|
domains: getDomains,
|
|
15
16
|
channels: getChannels,
|
|
17
|
+
flows: getFlows,
|
|
16
18
|
};
|