@eventcatalog/core 2.30.6 → 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.
Files changed (26) hide show
  1. package/README.md +3 -1
  2. package/dist/analytics/analytics.cjs +1 -1
  3. package/dist/analytics/analytics.js +2 -2
  4. package/dist/analytics/log-build.cjs +1 -1
  5. package/dist/analytics/log-build.js +3 -3
  6. package/dist/{chunk-6UFFLZ4K.js → chunk-D4IJRFPJ.js} +1 -1
  7. package/dist/{chunk-LGRE6475.js → chunk-NALVGTIE.js} +1 -1
  8. package/dist/{chunk-2XYH6NJX.js → chunk-XJBJFIN7.js} +1 -1
  9. package/dist/constants.cjs +1 -1
  10. package/dist/constants.js +1 -1
  11. package/dist/eventcatalog.cjs +1 -1
  12. package/dist/eventcatalog.js +3 -3
  13. package/eventcatalog/src/components/SideBars/FlowSideBar.astro +75 -0
  14. package/eventcatalog/src/components/SideNav/TreeView/getTreeView.ts +2 -2
  15. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/index.astro +23 -3
  16. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +13 -3
  17. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +17 -14
  18. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/index.astro +21 -3
  19. package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +1 -1
  20. package/eventcatalog/src/pages/docs/[type]/[id]/language.astro +1 -1
  21. package/eventcatalog/src/pages/docs/teams/[id]/index.astro +5 -3
  22. package/eventcatalog/src/pages/docs/users/[id]/index.astro +9 -4
  23. package/eventcatalog/src/types/index.ts +1 -1
  24. package/eventcatalog/src/utils/collections/changelogs.ts +5 -3
  25. package/eventcatalog/src/utils/page-loaders/page-data-loader.ts +2 -0
  26. 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
- [![All Contributors](https://img.shields.io/badge/all_contributors-50-orange.svg?style=flat-square)](#contributors-)
37
+ [![All Contributors](https://img.shields.io/badge/all_contributors-52-orange.svg?style=flat-square)](#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)
@@ -261,6 +261,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
261
261
  </tr>
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
+ <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>
264
266
  </tr>
265
267
  </tbody>
266
268
  </table>
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.30.6";
40
+ var version = "2.30.8";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-LGRE6475.js";
4
- import "../chunk-2XYH6NJX.js";
3
+ } from "../chunk-NALVGTIE.js";
4
+ import "../chunk-XJBJFIN7.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.30.6";
109
+ var version = "2.30.8";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-6UFFLZ4K.js";
4
- import "../chunk-LGRE6475.js";
5
- import "../chunk-2XYH6NJX.js";
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-LGRE6475.js";
3
+ } from "./chunk-NALVGTIE.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-2XYH6NJX.js";
3
+ } from "./chunk-XJBJFIN7.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.30.6";
2
+ var version = "2.30.8";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.30.6";
28
+ var version = "2.30.8";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-2XYH6NJX.js";
3
+ } from "./chunk-XJBJFIN7.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.30.6";
160
+ var version = "2.30.8";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-UKJ7F5WR.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-6UFFLZ4K.js";
10
- import "./chunk-LGRE6475.js";
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-2XYH6NJX.js";
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 all messages
119
- const AUTO_EXPANDED_TYPES = ['domains', 'services', 'channels'];
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="AsyncApi Spec">
64
- <div id="asyncapi" class="md:pr-14" set:html={renderedComponent} />
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 { RectangleGroupIcon, ServerIcon, BoltIcon, ChatBubbleLeftIcon, MagnifyingGlassIcon } from '@heroicons/react/24/outline';
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 = await logs.map(async (log) => {
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 loaders = {
31
- ...pageDataLoader,
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="OpenAPI Spec">
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={`Team | ${props.data.name}`} description={props.data.summary}>
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={`User | ${props.data.name}`}>
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 class="hidden lg:block sticky top-0 h-[calc(100vh-theme(spacing.16))] w-72 overflow-y-auto py-2">
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';
@@ -10,8 +10,10 @@ export const getChangeLogs = async (item: CollectionEntry<CollectionTypes>): Pro
10
10
  // Get all logs for collection type and filter by given collection
11
11
  const logs = await getCollection('changelogs', (log) => {
12
12
  const collectionDirectory = path.dirname(item?.filePath || '');
13
- const isRootChangeLog = path.join(collectionDirectory, 'changelog.md') === log.filePath;
14
- const isVersionedChangeLog = log.filePath?.includes(path.join(collectionDirectory, 'versioned'));
13
+ const isRootChangeLog = path.join(collectionDirectory, 'changelog.mdx') === log.filePath;
14
+ // Ensure the path follows <collectionDirectory>/versioned/<version>/changelog.mdx
15
+ const versionedPathPattern = new RegExp(`${collectionDirectory}/versioned/[^/]+/changelog\\.mdx$`);
16
+ const isVersionedChangeLog = versionedPathPattern.test(log.filePath!);
15
17
  return log.id.includes(`${collection}/`) && (isRootChangeLog || isVersionedChangeLog);
16
18
  });
17
19
 
@@ -19,7 +21,7 @@ export const getChangeLogs = async (item: CollectionEntry<CollectionTypes>): Pro
19
21
  // Check if there is a version in the url
20
22
  const isVersioned = log.id.includes('versioned');
21
23
 
22
- const parts = log.id.split('/');
24
+ const parts = log.filePath!.split('/');
23
25
  // hack to get the version of the id (url)
24
26
  const version = parts[parts.length - 2];
25
27
  return {
@@ -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
  };
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.30.6",
9
+ "version": "2.30.8",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },