@eventcatalog/core 2.2.6 → 2.3.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.
Files changed (33) hide show
  1. package/.github/workflows/verify-build.yml +2 -0
  2. package/.prettierrc +17 -9
  3. package/CHANGELOG.md +12 -0
  4. package/README.md +11 -7
  5. package/package.json +10 -8
  6. package/scripts/catalog-to-astro-content-directory.js +20 -0
  7. package/scripts/ci/test.js +24 -0
  8. package/scripts/watcher.js +12 -4
  9. package/src/components/DocsNavigation.astro +33 -24
  10. package/src/components/Header.astro +14 -11
  11. package/src/components/Lists/VersionList.astro +29 -17
  12. package/src/components/MDX/Accordion/Accordion.astro +5 -6
  13. package/src/components/MDX/Accordion/AccordionGroup.astro +1 -0
  14. package/src/components/MDX/NodeGraph/NodeGraph.astro +13 -8
  15. package/src/components/MDX/SchemaViewer/SchemaViewer.astro +45 -50
  16. package/src/components/Search.astro +16 -5
  17. package/src/components/Seo.astro +48 -54
  18. package/src/components/SideBars/DomainSideBar.astro +24 -6
  19. package/src/components/SideBars/MessageSideBar.astro +41 -10
  20. package/src/components/SideBars/ServiceSideBar.astro +54 -13
  21. package/src/layouts/CustomDocsPageLayout.astro +70 -23
  22. package/src/layouts/DiscoverLayout.astro +3 -1
  23. package/src/layouts/DocsLayout.astro +4 -4
  24. package/src/layouts/Footer.astro +19 -6
  25. package/src/pages/discover/[type]/index.astro +26 -21
  26. package/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +68 -59
  27. package/src/pages/docs/[type]/[id]/[version]/index.astro +38 -20
  28. package/src/pages/docs/index.astro +13 -16
  29. package/src/pages/docs/teams/[id]/index.astro +24 -7
  30. package/src/pages/docs/users/[id]/index.astro +23 -6
  31. package/src/pages/visualiser/[type]/[id]/[version]/index.astro +12 -1
  32. package/tsconfig.json +3 -1
  33. package/vitest.config.ts +10 -0
@@ -3,19 +3,19 @@ const { catalog, id } = Astro.props;
3
3
  import fs from 'node:fs/promises';
4
4
  import { existsSync } from 'fs';
5
5
  import path from 'path';
6
- import SchemaViewerClient from './SchemaViewer'
6
+ import SchemaViewerClient from './SchemaViewer';
7
7
  import Admonition from '../Admonition';
8
8
  let schemas = [];
9
9
 
10
10
  function findSchemaViewers(document: string) {
11
11
  // Define regex pattern to match <SchemaViewer ... />
12
12
  const pattern = /<SchemaViewer\s+([^>]*)\/>/g;
13
-
13
+
14
14
  // Find all matches of the pattern
15
15
  const matches = [...document.matchAll(pattern)];
16
-
16
+
17
17
  // Extract the properties of each SchemaViewer
18
- const schemaViewers = matches.map(match => {
18
+ const schemaViewers = matches.map((match) => {
19
19
  const propsString = match[1];
20
20
  const props = {};
21
21
 
@@ -36,59 +36,54 @@ function findSchemaViewers(document: string) {
36
36
  }
37
37
 
38
38
  try {
39
- const file = await fs.readFile(catalog.absoluteFilePath, 'utf-8');
40
- const schemaViewers = findSchemaViewers(file);
41
-
42
- // Loop around all the possible SchemaViewers in the file.
43
- const getAllComponents = schemaViewers.map(async (schemaViewerProps: any) => {
39
+ const file = await fs.readFile(catalog.absoluteFilePath, 'utf-8');
40
+ const schemaViewers = findSchemaViewers(file);
44
41
 
45
- const schemaPath = path.join(catalog.filePath, schemaViewerProps.file)
46
- const exists = existsSync(schemaPath);
47
- let schema;
42
+ // Loop around all the possible SchemaViewers in the file.
43
+ const getAllComponents = schemaViewers.map(async (schemaViewerProps: any) => {
44
+ const schemaPath = path.join(catalog.filePath, schemaViewerProps.file);
45
+ const exists = existsSync(schemaPath);
46
+ let schema;
48
47
 
49
- if(exists) {
50
- // Load the schema for the component
51
- schema = await fs.readFile(schemaPath, 'utf-8');
52
- schema = JSON.parse(schema);
53
- }
48
+ if (exists) {
49
+ // Load the schema for the component
50
+ schema = await fs.readFile(schemaPath, 'utf-8');
51
+ schema = JSON.parse(schema);
52
+ }
54
53
 
55
- return {
56
- id: schemaViewerProps.id || id,
57
- exists,
58
- schema,
59
- schemaPath,
60
- ...schemaViewerProps
61
- }
62
- });
63
-
64
- schemas = await Promise.all(getAllComponents);
54
+ return {
55
+ id: schemaViewerProps.id || id,
56
+ exists,
57
+ schema,
58
+ schemaPath,
59
+ ...schemaViewerProps,
60
+ };
61
+ });
65
62
 
63
+ schemas = await Promise.all(getAllComponents);
66
64
  } catch (error) {
67
- console.log('Failed to process schemas')
68
- console.log(error);
65
+ console.log('Failed to process schemas');
66
+ console.log(error);
69
67
  }
70
-
71
68
  ---
72
- <section class="space-y-4">
73
- {schemas.length > 0 &&
74
- schemas.map((schema) => (
75
- <div>
76
-
77
- {schema.exists &&
78
- <SchemaViewerClient {...schema} client:load />
79
- }
80
69
 
81
- {/* User has tried to load the schema, but it was not found on file system */}
82
- {!schema.exists && (
83
- <Admonition type="warning">
84
- <>
85
- <span class="block font-bold">{`<SchemaViewer/>`} failed to load</span>
86
- <span class="block">Tried to load schema from {schema.schemaPath}, but no schema can be found</span>
87
- </>
88
- </Admonition>
89
- )}
70
+ <section class="space-y-4">
71
+ {
72
+ schemas.length > 0 &&
73
+ schemas.map((schema) => (
74
+ <div>
75
+ {schema.exists && <SchemaViewerClient {...schema} client:load />}
90
76
 
91
- </div>
92
- ))
93
- }
77
+ {/* User has tried to load the schema, but it was not found on file system */}
78
+ {!schema.exists && (
79
+ <Admonition type="warning">
80
+ <>
81
+ <span class="block font-bold">{`<SchemaViewer/>`} failed to load</span>
82
+ <span class="block">Tried to load schema from {schema.schemaPath}, but no schema can be found</span>
83
+ </>
84
+ </Admonition>
85
+ )}
86
+ </div>
87
+ ))
88
+ }
94
89
  </section>
@@ -21,10 +21,21 @@ import PageFindSearch from 'astro-pagefind/components/Search';
21
21
  <div id="search-dialog" class="hidden relative z-10" role="dialog" aria-modal="true">
22
22
  <div class="fixed inset-0 bg-gray-500 bg-opacity-25 transition-opacity search-background backdrop-blur-sm bg-black/10"></div>
23
23
  <div id="search-background" class="fixed inset-0 z-10 w-screen overflow-y-auto p-4 sm:p-6 md:p-20">
24
- <div id="command-pal" class="mx-auto max-w-xl divide-y divide-gray-100 overflow-hidden rounded-xl bg-white shadow-2xl ring-1 ring-black ring-opacity-5 transition-all">
24
+ <div
25
+ id="command-pal"
26
+ class="mx-auto max-w-xl divide-y divide-gray-100 overflow-hidden rounded-xl bg-white shadow-2xl ring-1 ring-black ring-opacity-5 transition-all"
27
+ >
25
28
  <div class="relative">
26
- <svg class="pointer-events-none absolute left-4 top-3.5 h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
27
- <path fill-rule="evenodd" d="M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z" clip-rule="evenodd"></path>
29
+ <svg
30
+ class="pointer-events-none absolute left-4 top-3.5 h-5 w-5 text-gray-400"
31
+ viewBox="0 0 20 20"
32
+ fill="currentColor"
33
+ aria-hidden="true"
34
+ >
35
+ <path
36
+ fill-rule="evenodd"
37
+ d="M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z"
38
+ clip-rule="evenodd"></path>
28
39
  </svg>
29
40
  <PageFindSearch id="search" className="pagefind-ui" uiOptions={{ showImages: false }} />
30
41
  </div>
@@ -42,8 +53,8 @@ import PageFindSearch from 'astro-pagefind/components/Search';
42
53
  event.preventDefault();
43
54
  dummyInput?.click();
44
55
  }
45
- if(event.key === 'Escape') {
46
- if(dialog){
56
+ if (event.key === 'Escape') {
57
+ if (dialog) {
47
58
  dialog.style.display = 'none';
48
59
  }
49
60
  }
@@ -4,12 +4,7 @@ import config from '@config';
4
4
  import defaultImageFile from '../../public/opengraph.png';
5
5
  import { buildUrl } from '@utils/url-builder';
6
6
 
7
- const {
8
- title = config.title,
9
- description = config.tagline,
10
- ogTitle = title,
11
- ogType = 'website',
12
- } = Astro.props;
7
+ const { title = config.title, description = config.tagline, ogTitle = title, ogType = 'website' } = Astro.props;
13
8
 
14
9
  const siteBaseURL = new URL(Astro.url);
15
10
  const defaultImage = new URL(defaultImageFile.src, siteBaseURL);
@@ -19,13 +14,12 @@ _image = _image || defaultImage;
19
14
 
20
15
  let image = null;
21
16
  if (typeof _image === 'string') {
22
- image = new URL(_image, siteBaseURL);
17
+ image = new URL(_image, siteBaseURL);
23
18
  } else if (_image && typeof _image['href'] !== 'undefined') {
24
- image = new URL(_image['href'], siteBaseURL);
19
+ image = new URL(_image['href'], siteBaseURL);
25
20
  } else {
26
- image = defaultImage;
21
+ image = defaultImage;
27
22
  }
28
-
29
23
  ---
30
24
 
31
25
  <meta charset="UTF-8" />
@@ -34,47 +28,47 @@ if (typeof _image === 'string') {
34
28
  <link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico', true)} />
35
29
 
36
30
  <SEO
37
- title={title}
38
- description={description}
39
- openGraph={{
40
- basic: {
41
- url: config.homepageLink,
42
- title: ogTitle,
43
- type: ogType,
44
- image: _image?.src ? _image.src : defaultImage.toString(),
45
- },
46
- image: {
47
- url: image.toString(),
48
- secureUrl: image.toString(),
49
- alt: ogTitle,
50
- height: _image?.height,
51
- width: _image?.width,
52
- type: _image?.format && `image/${_image.format}`,
53
- },
54
- }}
55
- twitter={{
56
- creator: '@liran_tal',
57
- image: image ? image.toString() : undefined,
58
- imageAlt: ogTitle,
59
- title: ogTitle,
60
- site: '@liran_tal',
61
- description: description,
62
- card: image ? 'summary_large_image' : 'summary',
63
- }}
64
- extend={{
65
- meta: [
66
- {
67
- name: 'og:locale',
68
- content: 'en_US',
69
- },
70
- {
71
- name: 'og:description',
72
- content: description,
73
- },
74
- {
75
- name: 'og:site_name',
76
- content: config.homepageLink,
77
- }
78
- ]
79
- }}
80
- />
31
+ title={title}
32
+ description={description}
33
+ openGraph={{
34
+ basic: {
35
+ url: config.homepageLink,
36
+ title: ogTitle,
37
+ type: ogType,
38
+ image: _image?.src ? _image.src : defaultImage.toString(),
39
+ },
40
+ image: {
41
+ url: image.toString(),
42
+ secureUrl: image.toString(),
43
+ alt: ogTitle,
44
+ height: _image?.height,
45
+ width: _image?.width,
46
+ type: _image?.format && `image/${_image.format}`,
47
+ },
48
+ }}
49
+ twitter={{
50
+ creator: '@liran_tal',
51
+ image: image ? image.toString() : undefined,
52
+ imageAlt: ogTitle,
53
+ title: ogTitle,
54
+ site: '@liran_tal',
55
+ description: description,
56
+ card: image ? 'summary_large_image' : 'summary',
57
+ }}
58
+ extend={{
59
+ meta: [
60
+ {
61
+ name: 'og:locale',
62
+ content: 'en_US',
63
+ },
64
+ {
65
+ name: 'og:description',
66
+ content: description,
67
+ },
68
+ {
69
+ name: 'og:site_name',
70
+ content: config.homepageLink,
71
+ },
72
+ ],
73
+ }}
74
+ />
@@ -11,7 +11,7 @@ interface Props {
11
11
  const { domain } = Astro.props;
12
12
 
13
13
  // @ts-ignore
14
- const services = domain.data.services as CollectionEntry<'services'>[] || [];
14
+ const services = (domain.data.services as CollectionEntry<'services'>[]) || [];
15
15
 
16
16
  const ownersRaw = domain.data?.owners || [];
17
17
  const owners = await Promise.all(ownersRaw.map((o) => getEntry(o)));
@@ -30,17 +30,35 @@ const ownersList = owners.map((o) => ({
30
30
  avatarUrl: o.collection === 'users' ? o.data.avatarUrl : '',
31
31
  href: buildUrl(`/docs/${o.collection}/${o.data.id}`),
32
32
  }));
33
-
34
33
  ---
35
34
 
36
35
  <aside class="sticky top-28 left-0 space-y-8 h-full overflow-y-auto">
37
36
  <div>
38
- <PillList title={`Services (${services.length})`} pills={serviceList} emptyMessage={`This domain does not contain any services.`} color="pink" client:load />
39
- <OwnersList title={`Service owners (${ownersList.length})`} owners={ownersList} emptyMessage={`This domain does not have any documented owners.`} client:load />
37
+ <PillList
38
+ title={`Services (${services.length})`}
39
+ pills={serviceList}
40
+ emptyMessage={`This domain does not contain any services.`}
41
+ color="pink"
42
+ client:load
43
+ />
44
+ <OwnersList
45
+ title={`Service owners (${ownersList.length})`}
46
+ owners={ownersList}
47
+ emptyMessage={`This domain does not have any documented owners.`}
48
+ client:load
49
+ />
40
50
  {domain.data.versions && <VersionList versions={domain.data.versions} collectionItem={domain} />}
41
51
  <div class="space-y-2">
42
- <a href={buildUrl(`/visualiser/${domain.collection}/${domain.data.id}/${domain.data.version}`)} class="block 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-purple-500">View in Visualiser</a>
43
- <a href={buildUrl(`/docs/${domain.collection}/${domain.data.id}/${domain.data.version}/changelog`)} class="block 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-purple-500">Changelog</a>
52
+ <a
53
+ href={buildUrl(`/visualiser/${domain.collection}/${domain.data.id}/${domain.data.version}`)}
54
+ class="block 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-purple-500"
55
+ >View in Visualiser</a
56
+ >
57
+ <a
58
+ href={buildUrl(`/docs/${domain.collection}/${domain.data.id}/${domain.data.version}/changelog`)}
59
+ class="block 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-purple-500"
60
+ >Changelog</a
61
+ >
44
62
  </div>
45
63
  </div>
46
64
  </aside>
@@ -43,15 +43,31 @@ const type = message.collection.slice(0, -1);
43
43
  // @ts-ignore
44
44
  const publicPath = message?.catalog?.publicPath;
45
45
  const schemaFilePath = message?.data?.schemaPath;
46
- const schemaURL = path.join(publicPath, schemaFilePath || '')
47
-
46
+ const schemaURL = path.join(publicPath, schemaFilePath || '');
48
47
  ---
49
48
 
50
- <aside class="sticky top-28 left-0 space-y-8 h-full overflow-y-auto pb-20 ">
49
+ <aside class="sticky top-28 left-0 space-y-8 h-full overflow-y-auto pb-20">
51
50
  <div class="">
52
- <PillList color="pink" title={`${type} Producers (${producerList.length})`} pills={producerList} emptyMessage={`This ${type} does not get produced by any services.`} client:load />
53
- <PillList color="pink" title={`${type} Consumers (${consumerList.length})`} pills={consumerList} emptyMessage={`This ${type} does not get consumed by any services.`} client:load />
54
- <OwnersList title={`${type} owners (${ownersList.length})`} owners={ownersList} emptyMessage={`This ${type} does not have any documented owners.`} client:load />
51
+ <PillList
52
+ color="pink"
53
+ title={`${type} Producers (${producerList.length})`}
54
+ pills={producerList}
55
+ emptyMessage={`This ${type} does not get produced by any services.`}
56
+ client:load
57
+ />
58
+ <PillList
59
+ color="pink"
60
+ title={`${type} Consumers (${consumerList.length})`}
61
+ pills={consumerList}
62
+ emptyMessage={`This ${type} does not get consumed by any services.`}
63
+ client:load
64
+ />
65
+ <OwnersList
66
+ title={`${type} owners (${ownersList.length})`}
67
+ owners={ownersList}
68
+ emptyMessage={`This ${type} does not have any documented owners.`}
69
+ client:load
70
+ />
55
71
 
56
72
  {message.data.versions && <VersionList versions={message.data.versions} collectionItem={message} />}
57
73
 
@@ -64,8 +80,20 @@ const schemaURL = path.join(publicPath, schemaFilePath || '')
64
80
  class="hidden w-full md:inline-flex h-10 justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-200 bg-gray-800 hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
65
81
  >
66
82
  <>
67
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true" class="-ml-1 mr-2 h-5 w-5 text-gray-200">
68
- <path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
83
+ <svg
84
+ xmlns="http://www.w3.org/2000/svg"
85
+ fill="none"
86
+ viewBox="0 0 24 24"
87
+ stroke-width="2"
88
+ stroke="currentColor"
89
+ aria-hidden="true"
90
+ class="-ml-1 mr-2 h-5 w-5 text-gray-200"
91
+ >
92
+ <path
93
+ stroke-linecap="round"
94
+ stroke-linejoin="round"
95
+ d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
96
+ />
69
97
  </svg>
70
98
  <span>Download Schema</span>
71
99
  </>
@@ -78,8 +106,11 @@ const schemaURL = path.join(publicPath, schemaFilePath || '')
78
106
  >View in Visualiser</a
79
107
  >
80
108
 
81
- <a href={buildUrl(`/docs/${message.collection}/${message.data.id}/${message.data.version}/changelog`)} class="block 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-purple-500">Changelog</a>
82
-
109
+ <a
110
+ href={buildUrl(`/docs/${message.collection}/${message.data.id}/${message.data.version}/changelog`)}
111
+ class="block 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-purple-500"
112
+ >Changelog</a
113
+ >
83
114
  </div>
84
115
  </div>
85
116
  </aside>
@@ -4,7 +4,7 @@ import PillList from '@components/Lists/PillList';
4
4
  import VersionList from '@components/Lists/VersionList.astro';
5
5
  import { buildUrl } from '@utils/url-builder';
6
6
  import { getEntry, type CollectionEntry } from 'astro:content';
7
- import { join } from 'node:path'
7
+ import { join } from 'node:path';
8
8
  interface Props {
9
9
  service: CollectionEntry<'services'>;
10
10
  }
@@ -12,9 +12,9 @@ interface Props {
12
12
  const { service } = Astro.props;
13
13
 
14
14
  // @ts-ignore
15
- const sends = service.data.sends as CollectionEntry<'events'>[] || [];
15
+ const sends = (service.data.sends as CollectionEntry<'events'>[]) || [];
16
16
  // @ts-ignore
17
- const receives = service.data.receives as CollectionEntry<'events'>[] || [];
17
+ const receives = (service.data.receives as CollectionEntry<'events'>[]) || [];
18
18
 
19
19
  const ownersRaw = service.data?.owners || [];
20
20
  const owners = await Promise.all(ownersRaw.map((o) => getEntry(o)));
@@ -45,14 +45,31 @@ const ownersList = owners.map((o) => ({
45
45
  // @ts-ignore
46
46
  const publicPath = service?.catalog?.publicPath;
47
47
  const schemaFilePath = service?.data?.schemaPath;
48
- const schemaURL = join(publicPath, schemaFilePath || '')
48
+ const schemaURL = join(publicPath, schemaFilePath || '');
49
49
  ---
50
50
 
51
51
  <aside class="sticky top-28 left-0 space-y-8 h-full overflow-y-auto">
52
52
  <div id="sidebar-cta-portal">
53
- <PillList title={`Receives Messages (${receivesList.length})`} pills={receivesList} emptyMessage={`This service does not receive any messages.`} color="orange" client:load />
54
- <PillList title={`Sends Messages (${sendsList.length})`} pills={sendsList} emptyMessage={`This service does not send any messages.`} color="orange" client:load />
55
- <OwnersList title={`Service owners (${ownersList.length})`} owners={ownersList} emptyMessage={`This service does not have any documented owners.`} client:load />
53
+ <PillList
54
+ title={`Receives Messages (${receivesList.length})`}
55
+ pills={receivesList}
56
+ emptyMessage={`This service does not receive any messages.`}
57
+ color="orange"
58
+ client:load
59
+ />
60
+ <PillList
61
+ title={`Sends Messages (${sendsList.length})`}
62
+ pills={sendsList}
63
+ emptyMessage={`This service does not send any messages.`}
64
+ color="orange"
65
+ client:load
66
+ />
67
+ <OwnersList
68
+ title={`Service owners (${ownersList.length})`}
69
+ owners={ownersList}
70
+ emptyMessage={`This service does not have any documented owners.`}
71
+ client:load
72
+ />
56
73
 
57
74
  {service.data.versions && <VersionList versions={service.data.versions} collectionItem={service} />}
58
75
 
@@ -65,17 +82,42 @@ const schemaURL = join(publicPath, schemaFilePath || '')
65
82
  class="hidden w-full md:inline-flex h-10 justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-200 bg-gray-800 hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
66
83
  >
67
84
  <>
68
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true" class="-ml-1 mr-2 h-5 w-5 text-gray-200">
69
- <path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
85
+ <svg
86
+ xmlns="http://www.w3.org/2000/svg"
87
+ fill="none"
88
+ viewBox="0 0 24 24"
89
+ stroke-width="2"
90
+ stroke="currentColor"
91
+ aria-hidden="true"
92
+ class="-ml-1 mr-2 h-5 w-5 text-gray-200"
93
+ >
94
+ <path
95
+ stroke-linecap="round"
96
+ stroke-linejoin="round"
97
+ d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
98
+ />
70
99
  </svg>
71
100
  <span>Download Schema</span>
72
101
  </>
73
102
  </a>
74
103
  )
75
104
  }
76
- <a href={buildUrl(`/visualiser/${service.collection}/${service.data.id}/${service.data.version}`)} class="block 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-purple-500">View in Visualiser</a>
77
- <a id="open-api-button" href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}/spec`)} class="hidden 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-purple-500">View API spec</a>
78
- <a href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}/changelog`)} class="block 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-purple-500">Changelog</a>
105
+ <a
106
+ href={buildUrl(`/visualiser/${service.collection}/${service.data.id}/${service.data.version}`)}
107
+ class="block 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-purple-500"
108
+ >View in Visualiser</a
109
+ >
110
+ <a
111
+ id="open-api-button"
112
+ href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}/spec`)}
113
+ class="hidden 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-purple-500"
114
+ >View API spec</a
115
+ >
116
+ <a
117
+ href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}/changelog`)}
118
+ class="block 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-purple-500"
119
+ >Changelog</a
120
+ >
79
121
  </div>
80
122
  </div>
81
123
  </aside>
@@ -89,5 +131,4 @@ const schemaURL = join(publicPath, schemaFilePath || '')
89
131
  openApiButton.style.display = 'block';
90
132
  }
91
133
  });
92
-
93
134
  </script>
@@ -33,44 +33,91 @@ import { buildUrl } from '@utils/url-builder';
33
33
  <div class="pl-0 sm:pl-56 xl:pl-80 w-full pt-8 pb-40">
34
34
  <div class="prose prose-sm">
35
35
  <div class="bg-white">
36
- <div class="mx-auto max-w-7xl ">
36
+ <div class="mx-auto max-w-7xl">
37
37
  <div class="mx-auto max-w-2xl lg:mx-0 lg:max-w-none">
38
38
  <h1 class="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl mb-0">EventCatalog</h1>
39
- <div class=" grid max-w-xl grid-cols-1 md:gap-8 text-base leading-7 text-gray-700 lg:max-w-none lg:grid-cols-1">
39
+ <div class="grid max-w-xl grid-cols-1 md:gap-8 text-base leading-7 text-gray-700 lg:max-w-none lg:grid-cols-1">
40
40
  <div>
41
41
  <p>
42
- Welcome to <a href="https://www.eventcatalog.dev/">EventCatalog</a>.
42
+ Welcome to <a href="https://www.eventcatalog.dev/">EventCatalog</a>.
43
43
  </p>
44
44
  <p>
45
- This open-source project is designed to help you and your teams
46
- bring discoverability and clarity to your event-driven architectures (EDA).
45
+ This open-source project is designed to help you and your teams bring discoverability and clarity to your
46
+ event-driven architectures (EDA).
47
47
  </p>
48
48
  <p>
49
- To get started you can read the following guides:
49
+ To get started you can read the following guides:
50
50
  <ul>
51
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/getting-started/introduction">Getting started with EventCatalog</a></li>
52
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/guides/domains/adding-domains">Creating domains</a></li>
53
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/guides/services/adding-services">Creating services</a></li>
54
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/guides/messages/commands/introduction">Creating commands</a></li>
55
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/guides/messages/events/introduction">Creating events</a></li>
56
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/owners">Assigning owners to resources</a></li>
57
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/components/using-components">Using components in your pages (Schemas, OpenAPI, etc)</a></li>
58
- <li><a class="text-purple-500" href="https://eventcatalog.dev/docs/development/deployment">Deploying and hosting your EventCatalog</a></li>
51
+ <li>
52
+ <a
53
+ class="text-purple-500"
54
+ href="https://eventcatalog.dev/docs/development/getting-started/introduction"
55
+ >Getting started with EventCatalog</a
56
+ >
57
+ </li>
58
+ <li>
59
+ <a
60
+ class="text-purple-500"
61
+ href="https://eventcatalog.dev/docs/development/guides/domains/adding-domains">Creating domains</a
62
+ >
63
+ </li>
64
+ <li>
65
+ <a
66
+ class="text-purple-500"
67
+ href="https://eventcatalog.dev/docs/development/guides/services/adding-services"
68
+ >Creating services</a
69
+ >
70
+ </li>
71
+ <li>
72
+ <a
73
+ class="text-purple-500"
74
+ href="https://eventcatalog.dev/docs/development/guides/messages/commands/introduction"
75
+ >Creating commands</a
76
+ >
77
+ </li>
78
+ <li>
79
+ <a
80
+ class="text-purple-500"
81
+ href="https://eventcatalog.dev/docs/development/guides/messages/events/introduction"
82
+ >Creating events</a
83
+ >
84
+ </li>
85
+ <li>
86
+ <a class="text-purple-500" href="https://eventcatalog.dev/docs/owners"
87
+ >Assigning owners to resources</a
88
+ >
89
+ </li>
90
+ <li>
91
+ <a
92
+ class="text-purple-500"
93
+ href="https://eventcatalog.dev/docs/development/components/using-components"
94
+ >Using components in your pages (Schemas, OpenAPI, etc)</a
95
+ >
96
+ </li>
97
+ <li>
98
+ <a class="text-purple-500" href="https://eventcatalog.dev/docs/development/deployment"
99
+ >Deploying and hosting your EventCatalog</a
100
+ >
101
+ </li>
59
102
  </ul>
60
103
  </p>
61
- <h3>
62
- Join the community
63
- </h3>
64
- <p>Got questions about EventCatalog? Feature requests or need support? <a class="text-purple-500" href="https://discord.gg/3rjaZMmrAm">Join our community on Discord.</a></p>
65
- <h3>
66
- Enterprise support
67
- </h3>
104
+ <h3>Join the community</h3>
68
105
  <p>
69
- Using EventCatalog and needs enterprise support? Work with us, find out what we offer on our <a class="text-purple-500" href="https://eventcatalog.dev/enterprise">enterprise page</a>.
106
+ Got questions about EventCatalog? Feature requests or need support? <a
107
+ class="text-purple-500"
108
+ href="https://discord.gg/3rjaZMmrAm">Join our community on Discord.</a
109
+ >
110
+ </p>
111
+ <h3>Enterprise support</h3>
112
+ <p>
113
+ Using EventCatalog and needs enterprise support? Work with us, find out what we offer on our <a
114
+ class="text-purple-500"
115
+ href="https://eventcatalog.dev/enterprise">enterprise page</a
116
+ >.
70
117
  </p>
71
118
  </div>
72
119
  </div>
73
-
120
+
74
121
  <Footer />
75
122
  </div>
76
123
  </div>
@@ -76,7 +76,9 @@ const tabs = [
76
76
  class={` text-black group inline-flex items-center py-4 px-1 text-sm font-light ${tab.isActive ? `border-${tab.activeColor}-500 border-b-[2px] text-${tab.activeColor}-500` : 'opacity-80'} ${!tab.enabled ? 'disabled' : ''}`}
77
77
  aria-current="page"
78
78
  >
79
- <tab.icon className={`w-6 h-6 -ml-0.5 mr-2 ${tab.isActive ? `text-${tab.activeColor}-500` : 'text-gray-500'}`} />
79
+ <tab.icon
80
+ className={`w-6 h-6 -ml-0.5 mr-2 ${tab.isActive ? `text-${tab.activeColor}-500` : 'text-gray-500'}`}
81
+ />
80
82
  <span>{tab.label}</span>
81
83
  </a>
82
84
  ))