@eventcatalog/core 0.0.4 → 0.0.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/.next/BUILD_ID +1 -0
- package/.next/build-manifest.json +110 -0
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/cache/config.json +7 -0
- package/.next/cache/eslint/.cache_1bay4w0 +1 -0
- package/.next/cache/next-server.js.nft.json +1 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/export-marker.json +1 -0
- package/.next/images-manifest.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +1717 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/237.js +116 -0
- package/.next/server/chunks/428.js +84 -0
- package/.next/server/chunks/47.js +51 -0
- package/.next/server/chunks/526.js +131 -0
- package/.next/server/chunks/565.js +121 -0
- package/.next/server/chunks/596.js +98 -0
- package/.next/server/chunks/730.js +324 -0
- package/.next/server/chunks/8.js +122 -0
- package/.next/server/chunks/938.js +109 -0
- package/.next/server/chunks/944.js +649 -0
- package/.next/server/chunks/959.js +286 -0
- package/.next/server/chunks/97.js +1837 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages/_app.js +370 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +1004 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +123 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages/api/event/[name]/download.js +64 -0
- package/.next/server/pages/api/event/[name]/download.js.nft.json +1 -0
- package/.next/server/pages/events/AddedItemToCart.html +73 -0
- package/.next/server/pages/events/AddedItemToCart.json +1 -0
- package/.next/server/pages/events/OrderComplete.html +48 -0
- package/.next/server/pages/events/OrderComplete.json +1 -0
- package/.next/server/pages/events/OrderConfirmed.html +48 -0
- package/.next/server/pages/events/OrderConfirmed.json +1 -0
- package/.next/server/pages/events/OrderRequested.html +48 -0
- package/.next/server/pages/events/OrderRequested.json +1 -0
- package/.next/server/pages/events/PaymentProcessed.html +52 -0
- package/.next/server/pages/events/PaymentProcessed.json +1 -0
- package/.next/server/pages/events/RemovedItemFromCart.html +55 -0
- package/.next/server/pages/events/RemovedItemFromCart.json +1 -0
- package/.next/server/pages/events/ShipmentDelivered.html +53 -0
- package/.next/server/pages/events/ShipmentDelivered.json +1 -0
- package/.next/server/pages/events/ShipmentDispatched.html +52 -0
- package/.next/server/pages/events/ShipmentDispatched.json +1 -0
- package/.next/server/pages/events/ShipmentPrepared.html +52 -0
- package/.next/server/pages/events/ShipmentPrepared.json +1 -0
- package/.next/server/pages/events/[name]/logs.js +416 -0
- package/.next/server/pages/events/[name]/logs.js.nft.json +1 -0
- package/.next/server/pages/events/[name]/v/[version].js +274 -0
- package/.next/server/pages/events/[name]/v/[version].js.nft.json +1 -0
- package/.next/server/pages/events/[name].js +235 -0
- package/.next/server/pages/events/[name].js.nft.json +1 -0
- package/.next/server/pages/events.js +519 -0
- package/.next/server/pages/events.js.nft.json +1 -0
- package/.next/server/pages/index.html +1 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/overview.js +240 -0
- package/.next/server/pages/overview.js.nft.json +1 -0
- package/.next/server/pages/services/Basket Service.html +11 -0
- package/.next/server/pages/services/Basket Service.json +1 -0
- package/.next/server/pages/services/Data Lake.html +12 -0
- package/.next/server/pages/services/Data Lake.json +1 -0
- package/.next/server/pages/services/Payment Service.html +10 -0
- package/.next/server/pages/services/Payment Service.json +1 -0
- package/.next/server/pages/services/Shipping Service.html +14 -0
- package/.next/server/pages/services/Shipping Service.json +1 -0
- package/.next/server/pages/services/[name].js +675 -0
- package/.next/server/pages/services/[name].js.nft.json +1 -0
- package/.next/server/pages/services.js +396 -0
- package/.next/server/pages/services.js.nft.json +1 -0
- package/.next/server/pages/users/[id].js +327 -0
- package/.next/server/pages/users/[id].js.nft.json +1 -0
- package/.next/server/pages-manifest.json +16 -0
- package/.next/server/webpack-api-runtime.js +160 -0
- package/.next/server/webpack-runtime.js +264 -0
- package/.next/static/chunks/020d8314.aea2d24215754e7b.js +1 -0
- package/.next/static/chunks/176cb4e4-8a0f6f010ef8accb.js +1 -0
- package/.next/static/chunks/236-0acd5083c102a9cb.js +1 -0
- package/.next/static/chunks/274-11c4d093341d7201.js +1 -0
- package/.next/static/chunks/336-5d9007a96aa8f2c7.js +1 -0
- package/.next/static/chunks/364-3cb3c8cf1d3c95de.js +1 -0
- package/.next/static/chunks/519-7f22292093abd7c3.js +1 -0
- package/.next/static/chunks/638.d570519ae49c92c8.js +1 -0
- package/.next/static/chunks/873-9d69271e4b2dd496.js +1 -0
- package/.next/static/chunks/962-d5070461f6d4a478.js +1 -0
- package/.next/static/chunks/framework-576ec6a1c1386453.js +1 -0
- package/.next/static/chunks/main-0289ecbd51cd4cb4.js +1 -0
- package/.next/static/chunks/pages/_app-c9d3172cc09cf069.js +1 -0
- package/.next/static/chunks/pages/_error-5a714c45c50a8db4.js +1 -0
- package/.next/static/chunks/pages/events/[name]/logs-f8568627ce642d13.js +1 -0
- package/.next/static/chunks/pages/events/[name]/v/[version]-dc146dc9bfa7362d.js +1 -0
- package/.next/static/chunks/pages/events/[name]-fb77119f66a5793e.js +1 -0
- package/.next/static/chunks/pages/events-bcad8442f21d6b67.js +1 -0
- package/.next/static/chunks/pages/index-3eeab7e4014a02ea.js +1 -0
- package/.next/static/chunks/pages/overview-5ac749891cbe1922.js +1 -0
- package/.next/static/chunks/pages/services/[name]-69692188d11304b7.js +1 -0
- package/.next/static/chunks/pages/services-bcc61898062e1bf4.js +1 -0
- package/.next/static/chunks/pages/users/[id]-2da54ccb6319b207.js +1 -0
- package/.next/static/chunks/polyfills-5cd94c89d3acac5f.js +1 -0
- package/.next/static/chunks/webpack-afe52d4a9fcc5a75.js +1 -0
- package/.next/static/css/5eeed9cb243ce668.css +1 -0
- package/.next/static/css/b44e1178a88a93b4.css +3 -0
- package/.next/static/vhOn9sHATcc4EnbZ7-GDM/_buildManifest.js +1 -0
- package/.next/static/vhOn9sHATcc4EnbZ7-GDM/_middlewareManifest.js +1 -0
- package/.next/static/vhOn9sHATcc4EnbZ7-GDM/_ssgManifest.js +1 -0
- package/.next/trace +37 -0
- package/CHANGELOG.md +30 -0
- package/bin/eventcatalog.js +8 -19
- package/components/ContentView.tsx +22 -29
- package/components/Grids/EventGrid.tsx +3 -13
- package/components/Grids/ServiceGrid.tsx +3 -11
- package/components/Header.tsx +1 -3
- package/components/Mdx/Admonition.tsx +1 -1
- package/components/Mdx/Examples.tsx +2 -9
- package/components/NotFound/index.tsx +2 -6
- package/components/Sidebars/EventSidebar.tsx +20 -15
- package/components/Sidebars/ServiceSidebar.tsx +27 -26
- package/eventcatalog.config.js +40 -0
- package/hooks/EventCatalog.tsx +1 -1
- package/lib/__tests__/assets/services/Basket Service/index.md +19 -0
- package/lib/__tests__/events.spec.ts +16 -27
- package/lib/__tests__/file-reader.spec.ts +3 -9
- package/lib/__tests__/services.spec.ts +27 -6
- package/lib/events.ts +6 -11
- package/lib/file-reader.ts +1 -3
- package/lib/graphs.ts +2 -4
- package/lib/services.ts +5 -11
- package/package.json +3 -2
- package/pages/_app.tsx +5 -14
- package/pages/events/[name]/logs.tsx +4 -13
- package/pages/events/[name].tsx +13 -14
- package/pages/events.tsx +5 -16
- package/pages/index.tsx +2 -9
- package/pages/overview.tsx +1 -4
- package/pages/services/[name].tsx +2 -2
- package/pages/services.tsx +2 -6
- package/pages/users/[id].tsx +4 -13
- package/scripts/__tests__/assets/eventcatalog.config.js +1 -2
- package/scripts/__tests__/generate.spec.ts +1 -4
- package/tailwind.config.js +1 -5
- package/tsconfig.json +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`534bec1`](https://github.com/boyney123/eventcatalog/commit/534bec11f57bcabe7f79f40338ae02bef134efc2) [#78](https://github.com/boyney123/eventcatalog/pull/78) Thanks [@thim81](https://github.com/thim81)! - feat: externalLinks for services
|
|
8
|
+
|
|
9
|
+
* [`b557ff8`](https://github.com/boyney123/eventcatalog/commit/b557ff8f7186b939cbe1e23f2c0e1e9a7254c907) [#79](https://github.com/boyney123/eventcatalog/pull/79) Thanks [@boyney123](https://github.com/boyney123)! - fix: adding keys on maps in react
|
|
10
|
+
|
|
11
|
+
- [`407d9e0`](https://github.com/boyney123/eventcatalog/commit/407d9e0d7f8d5eab4747ce0af6d5079204b53d21) [#75](https://github.com/boyney123/eventcatalog/pull/75) Thanks [@thim81](https://github.com/thim81)! - feat: optional editUrl config
|
|
12
|
+
|
|
13
|
+
* [`9eb7463`](https://github.com/boyney123/eventcatalog/commit/9eb7463b32baa09a6dd693e7f0eede63e33cd39c) [#71](https://github.com/boyney123/eventcatalog/pull/71) Thanks [@thim81](https://github.com/thim81)! - feat: link to external event documentation added
|
|
14
|
+
|
|
15
|
+
## 0.0.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`ee17db8`](https://github.com/boyney123/eventcatalog/commit/ee17db8958ac6368f7d833f0d3ebec2604722e42) [#56](https://github.com/boyney123/eventcatalog/pull/56) Thanks [@boyney123](https://github.com/boyney123)! - feat: changelog.md files now belong inside the versioned folders
|
|
20
|
+
|
|
21
|
+
## 0.0.6
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`ad66a66`](https://github.com/boyney123/eventcatalog/commit/ad66a66b526a167cc8da43dd2371642c9f9029f2) [#49](https://github.com/boyney123/eventcatalog/pull/49) Thanks [@boyney123](https://github.com/boyney123)! - fix: now supports any extension for event examples also added missing docs
|
|
26
|
+
|
|
27
|
+
## 0.0.5
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [`576debd`](https://github.com/boyney123/eventcatalog/commit/576debdfc5dbc2fbbf98e2b3f4d78b84f9a07669) [#46](https://github.com/boyney123/eventcatalog/pull/46) Thanks [@boyney123](https://github.com/boyney123)! - fix: using cross-env to fix issues with windows OS
|
|
32
|
+
|
|
3
33
|
## 0.0.4
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/bin/eventcatalog.js
CHANGED
|
@@ -22,23 +22,18 @@ const copyCoreApplicationCodeIntoUsersProjectDir = () => {
|
|
|
22
22
|
// remove any files we don't care about
|
|
23
23
|
exclusions.map((path) => {
|
|
24
24
|
try {
|
|
25
|
-
fs.lstatSync(path).isDirectory()
|
|
26
|
-
? fs.rmSync(path, { recursive: true, force: true })
|
|
27
|
-
: fs.unlinkSync(path);
|
|
25
|
+
fs.lstatSync(path).isDirectory() ? fs.rmSync(path, { recursive: true, force: true }) : fs.unlinkSync(path);
|
|
28
26
|
} catch (error) {}
|
|
29
27
|
});
|
|
30
28
|
|
|
31
|
-
fs.copyFileSync(
|
|
32
|
-
path.join(projectDIR, 'eventcatalog.config.js'),
|
|
33
|
-
path.join(eventCatalogLibDir, 'eventcatalog.config.js')
|
|
34
|
-
);
|
|
29
|
+
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));
|
|
35
30
|
};
|
|
36
31
|
|
|
37
32
|
cli
|
|
38
33
|
.command('start [siteDir]')
|
|
39
34
|
.description('Start the development server.')
|
|
40
35
|
.action(() => {
|
|
41
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run start`, {
|
|
36
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run start`, {
|
|
42
37
|
cwd: eventCatalogLibDir,
|
|
43
38
|
stdio: 'inherit',
|
|
44
39
|
});
|
|
@@ -56,7 +51,7 @@ cli
|
|
|
56
51
|
fs.copySync(path.join(projectDIR, 'public'), path.join(eventCatalogLibDir, 'public'));
|
|
57
52
|
|
|
58
53
|
// build using nextjs
|
|
59
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run build`, {
|
|
54
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run build`, {
|
|
60
55
|
cwd: eventCatalogLibDir,
|
|
61
56
|
stdio: 'inherit',
|
|
62
57
|
});
|
|
@@ -77,12 +72,9 @@ cli
|
|
|
77
72
|
// copy any public assets over (from users to the lib itself)
|
|
78
73
|
fs.copySync(path.join(projectDIR, 'public'), path.join(eventCatalogLibDir, 'public'));
|
|
79
74
|
|
|
80
|
-
fs.copyFileSync(
|
|
81
|
-
path.join(projectDIR, 'eventcatalog.config.js'),
|
|
82
|
-
path.join(eventCatalogLibDir, 'eventcatalog.config.js')
|
|
83
|
-
);
|
|
75
|
+
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));
|
|
84
76
|
|
|
85
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run dev`, {
|
|
77
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run dev`, {
|
|
86
78
|
cwd: eventCatalogLibDir,
|
|
87
79
|
stdio: 'inherit',
|
|
88
80
|
});
|
|
@@ -98,12 +90,9 @@ cli
|
|
|
98
90
|
copyCoreApplicationCodeIntoUsersProjectDir();
|
|
99
91
|
}
|
|
100
92
|
|
|
101
|
-
fs.copyFileSync(
|
|
102
|
-
path.join(projectDIR, 'eventcatalog.config.js'),
|
|
103
|
-
path.join(eventCatalogLibDir, 'eventcatalog.config.js')
|
|
104
|
-
);
|
|
93
|
+
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));
|
|
105
94
|
|
|
106
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run generate`, {
|
|
95
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run generate`, {
|
|
107
96
|
cwd: eventCatalogLibDir,
|
|
108
97
|
stdio: 'inherit',
|
|
109
98
|
});
|
|
@@ -39,9 +39,7 @@ export default function ContentView({
|
|
|
39
39
|
<div className="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 xl:max-w-7xl xl:grid xl:grid-cols-4">
|
|
40
40
|
<div className="xl:col-span-3 xl:pr-8 xl:border-r xl:border-gray-200 flex-col justify-between flex">
|
|
41
41
|
<div>
|
|
42
|
-
{BreadCrumbs &&
|
|
43
|
-
<div className="mb-5 border-b border-gray-100 pb-4">{BreadCrumbs}</div>
|
|
44
|
-
)}
|
|
42
|
+
{BreadCrumbs && <div className="mb-5 border-b border-gray-100 pb-4">{BreadCrumbs}</div>}
|
|
45
43
|
<div>
|
|
46
44
|
<div>
|
|
47
45
|
<div className="xl:border-b pb-4 flex justify-between ">
|
|
@@ -70,36 +68,32 @@ export default function ContentView({
|
|
|
70
68
|
<>
|
|
71
69
|
You are currently viewing an old version of this event ({version}).
|
|
72
70
|
<Link href={latestVersionUrl}>
|
|
73
|
-
<a className="block text-sm pl-7 mt-2 text-blue-500 underline">
|
|
74
|
-
Read latest version →
|
|
75
|
-
</a>
|
|
71
|
+
<a className="block text-sm pl-7 mt-2 text-blue-500 underline">Read latest version →</a>
|
|
76
72
|
</Link>
|
|
77
73
|
</>
|
|
78
74
|
</Admonition>
|
|
79
75
|
)}
|
|
80
76
|
</div>
|
|
81
77
|
<div className="mt-4 flex space-x-3 md:mt-0">
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
className="-ml-1 mr-2 h-5 w-5 text-gray-400"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</a>
|
|
78
|
+
{editUrl && (
|
|
79
|
+
<a
|
|
80
|
+
href={editUrl}
|
|
81
|
+
target="_blank"
|
|
82
|
+
type="button"
|
|
83
|
+
className="hidden 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-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
|
|
84
|
+
rel="noreferrer"
|
|
85
|
+
>
|
|
86
|
+
<PencilIcon className="-ml-1 mr-2 h-5 w-5 text-gray-400" aria-hidden="true" />
|
|
87
|
+
<span>Edit</span>
|
|
88
|
+
</a>
|
|
89
|
+
)}
|
|
95
90
|
</div>
|
|
96
91
|
</div>
|
|
97
92
|
<div className="py-3 xl:pt-6 xl:pb-0">
|
|
98
93
|
{isDraft && (
|
|
99
94
|
<Admonition className="mt-0 pt-0" type="warning">
|
|
100
95
|
<>
|
|
101
|
-
This event is currently in <span className="underline">draft</span>
|
|
102
|
-
mode.
|
|
96
|
+
This event is currently in <span className="underline">draft</span> mode.
|
|
103
97
|
</>
|
|
104
98
|
</Admonition>
|
|
105
99
|
)}
|
|
@@ -109,14 +103,13 @@ export default function ContentView({
|
|
|
109
103
|
</div>
|
|
110
104
|
</div>
|
|
111
105
|
</div>
|
|
112
|
-
<div className=
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
className="top-1 mr-2 relative h-4 w-4 text-gray-400"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</a>
|
|
106
|
+
<div className={`flex mt-10 ${editUrl ? 'justify-between' : 'justify-end'}`}>
|
|
107
|
+
{editUrl && (
|
|
108
|
+
<a href={editUrl} target="_blank" className="flex text-gray-400" rel="noreferrer">
|
|
109
|
+
<PencilIcon className="top-1 mr-2 relative h-4 w-4 text-gray-400" aria-hidden="true" />
|
|
110
|
+
<span>Edit this page</span>
|
|
111
|
+
</a>
|
|
112
|
+
)}
|
|
120
113
|
<span className="italic text-xs mt-2">Last updated on {lastModifiedDate}</span>
|
|
121
114
|
</div>
|
|
122
115
|
</div>
|
|
@@ -52,26 +52,16 @@ function EventGrid({ events = [], showMermaidDiagrams = false }: EventGridProps)
|
|
|
52
52
|
</div>
|
|
53
53
|
{showMermaidDiagrams && (
|
|
54
54
|
<div className="h-full items-center flex">
|
|
55
|
-
<Mermaid
|
|
56
|
-
source="event"
|
|
57
|
-
data={event}
|
|
58
|
-
rootNodeColor={getBackgroundColor(event.name)}
|
|
59
|
-
/>
|
|
55
|
+
<Mermaid source="event" data={event} rootNodeColor={getBackgroundColor(event.name)} />
|
|
60
56
|
</div>
|
|
61
57
|
)}
|
|
62
58
|
<div className="flex space-x-4 text-xs pt-2 relative bottom-0 left-0">
|
|
63
59
|
<div className=" font-medium text-gray-500">
|
|
64
|
-
<CubeIcon
|
|
65
|
-
className="h-4 w-4 text-green-400 inline-block mr-2"
|
|
66
|
-
aria-hidden="true"
|
|
67
|
-
/>
|
|
60
|
+
<CubeIcon className="h-4 w-4 text-green-400 inline-block mr-2" aria-hidden="true" />
|
|
68
61
|
Producers ({event.producers.length})
|
|
69
62
|
</div>
|
|
70
63
|
<div className=" font-medium text-gray-500">
|
|
71
|
-
<CubeIcon
|
|
72
|
-
className="h-4 w-4 text-indigo-400 inline-block mr-2"
|
|
73
|
-
aria-hidden="true"
|
|
74
|
-
/>
|
|
64
|
+
<CubeIcon className="h-4 w-4 text-indigo-400 inline-block mr-2" aria-hidden="true" />
|
|
75
65
|
Subscribers ({event.consumers.length})
|
|
76
66
|
</div>
|
|
77
67
|
</div>
|
|
@@ -36,23 +36,15 @@ function ServiceGrid({ services = [] }: ServiceGridProps) {
|
|
|
36
36
|
Draft
|
|
37
37
|
</span>
|
|
38
38
|
)}
|
|
39
|
-
<div className="text-gray-500 text-xs font-normal mt-2 line-clamp-3">
|
|
40
|
-
{service.summary}
|
|
41
|
-
</div>
|
|
39
|
+
<div className="text-gray-500 text-xs font-normal mt-2 line-clamp-3">{service.summary}</div>
|
|
42
40
|
</div>
|
|
43
41
|
<div className="flex space-x-4 text-xs pt-2 relative bottom-0 left-0">
|
|
44
42
|
<div className=" font-medium text-gray-500">
|
|
45
|
-
<CubeIcon
|
|
46
|
-
className="h-4 w-4 text-green-400 inline-block mr-2"
|
|
47
|
-
aria-hidden="true"
|
|
48
|
-
/>
|
|
43
|
+
<CubeIcon className="h-4 w-4 text-green-400 inline-block mr-2" aria-hidden="true" />
|
|
49
44
|
Subscribe Events ({service.subscribes.length})
|
|
50
45
|
</div>
|
|
51
46
|
<div className=" font-medium text-gray-500">
|
|
52
|
-
<CubeIcon
|
|
53
|
-
className="h-4 w-4 text-indigo-400 inline-block mr-2"
|
|
54
|
-
aria-hidden="true"
|
|
55
|
-
/>
|
|
47
|
+
<CubeIcon className="h-4 w-4 text-indigo-400 inline-block mr-2" aria-hidden="true" />
|
|
56
48
|
Publish Events ({service.publishes.length})
|
|
57
49
|
</div>
|
|
58
50
|
</div>
|
package/components/Header.tsx
CHANGED
|
@@ -38,9 +38,7 @@ export default function Example() {
|
|
|
38
38
|
<Link key={item.name} href={item.href}>
|
|
39
39
|
<a
|
|
40
40
|
className={classNames(
|
|
41
|
-
current
|
|
42
|
-
? 'bg-gray-900 text-white'
|
|
43
|
-
: 'text-gray-300 hover:bg-gray-700 hover:text-white',
|
|
41
|
+
current ? 'bg-gray-900 text-white' : 'text-gray-300 hover:bg-gray-700 hover:text-white',
|
|
44
42
|
'px-3 py-2 rounded-md text-sm font-medium'
|
|
45
43
|
)}
|
|
46
44
|
aria-current={current ? 'page' : undefined}
|
|
@@ -17,7 +17,7 @@ interface AdmonitionProps {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export default function Admonition({ children, type, className }: AdmonitionProps) {
|
|
20
|
+
export default function Admonition({ children, type, className = '' }: AdmonitionProps) {
|
|
21
21
|
const { color, icon: Icon } = getConfigurationByType(type);
|
|
22
22
|
|
|
23
23
|
return (
|
|
@@ -12,12 +12,7 @@ interface ExampleProps {
|
|
|
12
12
|
showLineNumbers?: boolean;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
function Examples({
|
|
16
|
-
title = 'Examples',
|
|
17
|
-
description,
|
|
18
|
-
examples = [],
|
|
19
|
-
showLineNumbers,
|
|
20
|
-
}: ExampleProps) {
|
|
15
|
+
function Examples({ title = 'Examples', description, examples = [], showLineNumbers }: ExampleProps) {
|
|
21
16
|
const tabs = examples.map((example, index) => ({
|
|
22
17
|
name: example.name || `Example ${index + 1}`,
|
|
23
18
|
content: example.snippet,
|
|
@@ -64,9 +59,7 @@ function Examples({
|
|
|
64
59
|
<SyntaxHighlighter language={selectedTab.langugage} showLineNumbers={showLineNumbers}>
|
|
65
60
|
{selectedTab.content}
|
|
66
61
|
</SyntaxHighlighter>
|
|
67
|
-
{selectedTab.langugage &&
|
|
68
|
-
<span className="-mb-2 block text-xs text-right font-bold">{selectedTab.name}</span>
|
|
69
|
-
)}
|
|
62
|
+
{selectedTab.langugage && <span className="-mb-2 block text-xs text-right font-bold">{selectedTab.name}</span>}
|
|
70
63
|
</div>
|
|
71
64
|
</div>
|
|
72
65
|
</div>
|
|
@@ -18,15 +18,11 @@ export default function Example(props: NotFoundProps) {
|
|
|
18
18
|
<p className="text-sm font-semibold text-gray-700 text-opacity-50 uppercase tracking-wide blur-xl">
|
|
19
19
|
Failed to find {type}
|
|
20
20
|
</p>
|
|
21
|
-
<h1 className="mt-2 text-4xl font-extrabold text-gray-900 tracking-tight sm:text-5xl">
|
|
22
|
-
Missing Documentation
|
|
23
|
-
</h1>
|
|
21
|
+
<h1 className="mt-2 text-4xl font-extrabold text-gray-900 tracking-tight sm:text-5xl">Missing Documentation</h1>
|
|
24
22
|
<p className="mt-2 text-lg font-medium text-gray-700 text-opacity-50">
|
|
25
23
|
Documentation for {type} <span className="underline">{name}</span> is missing!
|
|
26
24
|
</p>
|
|
27
|
-
<p className="mt-4 text-xs text-gray-400">
|
|
28
|
-
Help the eco-system and add the documentation for others ❤️{' '}
|
|
29
|
-
</p>
|
|
25
|
+
<p className="mt-4 text-xs text-gray-400">Help the eco-system and add the documentation for others ❤️ </p>
|
|
30
26
|
<div className="mt-12">
|
|
31
27
|
<a
|
|
32
28
|
href={urlToAddPage}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
import { CubeIcon, DownloadIcon } from '@heroicons/react/outline';
|
|
3
|
+
import { CubeIcon, DownloadIcon, ExternalLinkIcon } from '@heroicons/react/outline';
|
|
4
4
|
import type { Event } from '@eventcatalog/types';
|
|
5
5
|
import fileDownload from 'js-file-download';
|
|
6
6
|
import { useUser } from '@/hooks/EventCatalog';
|
|
@@ -13,7 +13,7 @@ interface EventSideBarProps {
|
|
|
13
13
|
function EventSideBar({ event, loadedVersion }: EventSideBarProps) {
|
|
14
14
|
const { getUserById } = useUser();
|
|
15
15
|
|
|
16
|
-
const { name: eventName, owners, producers, consumers, historicVersions } = event;
|
|
16
|
+
const { name: eventName, owners, producers, consumers, historicVersions, externalLinks } = event;
|
|
17
17
|
|
|
18
18
|
const handleDownload = async () => {
|
|
19
19
|
try {
|
|
@@ -43,10 +43,7 @@ function EventSideBar({ event, loadedVersion }: EventSideBarProps) {
|
|
|
43
43
|
<Link href={`/services/${producer}`}>
|
|
44
44
|
<a className="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-0.5">
|
|
45
45
|
<div className="absolute flex-shrink-0 flex items-center justify-center">
|
|
46
|
-
<span
|
|
47
|
-
className="h-1.5 w-1.5 rounded-full bg-green-500 animate animate-pulse"
|
|
48
|
-
aria-hidden="true"
|
|
49
|
-
/>
|
|
46
|
+
<span className="h-1.5 w-1.5 rounded-full bg-green-500 animate animate-pulse" aria-hidden="true" />
|
|
50
47
|
</div>
|
|
51
48
|
<div className="ml-3.5 text-sm font-medium text-gray-900">{producer}</div>
|
|
52
49
|
</a>
|
|
@@ -66,15 +63,9 @@ function EventSideBar({ event, loadedVersion }: EventSideBarProps) {
|
|
|
66
63
|
{consumers.map((consumer) => (
|
|
67
64
|
<li className="inline" key={consumer}>
|
|
68
65
|
<Link href={`/services/${consumer}`}>
|
|
69
|
-
<a
|
|
70
|
-
href="#"
|
|
71
|
-
className="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-0.5"
|
|
72
|
-
>
|
|
66
|
+
<a href="#" className="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-0.5">
|
|
73
67
|
<div className="absolute flex-shrink-0 flex items-center justify-center">
|
|
74
|
-
<span
|
|
75
|
-
className="h-1.5 w-1.5 rounded-full bg-indigo-500 animate animate-pulse"
|
|
76
|
-
aria-hidden="true"
|
|
77
|
-
/>
|
|
68
|
+
<span className="h-1.5 w-1.5 rounded-full bg-indigo-500 animate animate-pulse" aria-hidden="true" />
|
|
78
69
|
</div>
|
|
79
70
|
<div className="ml-3.5 text-sm font-medium text-gray-900">{consumer}</div>
|
|
80
71
|
</a>
|
|
@@ -111,7 +102,7 @@ function EventSideBar({ event, loadedVersion }: EventSideBarProps) {
|
|
|
111
102
|
? 'bg-blue-400 text-white shadow-md font-bold underline'
|
|
112
103
|
: 'bg-blue-100 text-blue-800';
|
|
113
104
|
return (
|
|
114
|
-
<li className="text-sm inline
|
|
105
|
+
<li className="text-sm inline" key={version}>
|
|
115
106
|
<Link href={`/events/${eventName}/v/${version}`}>
|
|
116
107
|
<a>
|
|
117
108
|
<span
|
|
@@ -194,6 +185,20 @@ function EventSideBar({ event, loadedVersion }: EventSideBarProps) {
|
|
|
194
185
|
</a>
|
|
195
186
|
</Link>
|
|
196
187
|
)}
|
|
188
|
+
{externalLinks.length > 0 &&
|
|
189
|
+
externalLinks.map((tag) => (
|
|
190
|
+
<a
|
|
191
|
+
href={tag.url}
|
|
192
|
+
target="_blank"
|
|
193
|
+
type="button"
|
|
194
|
+
className="hidden w-full md:inline-flex h-10 justify-center px-4 py-2 border border-teal-300 shadow-sm text-sm font-medium rounded-md text-teal-800 hover:bg-teal-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-200"
|
|
195
|
+
rel="noreferrer"
|
|
196
|
+
key={tag.url}
|
|
197
|
+
>
|
|
198
|
+
<ExternalLinkIcon className="-ml-1 mr-2 h-5 w-5 text-teal-200" aria-hidden="true" />
|
|
199
|
+
<span>{`${tag.label}`}</span>
|
|
200
|
+
</a>
|
|
201
|
+
))}
|
|
197
202
|
</div>
|
|
198
203
|
</aside>
|
|
199
204
|
);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Link from 'next/link';
|
|
3
3
|
import type { Service } from '@eventcatalog/types';
|
|
4
4
|
|
|
5
|
-
import { CubeIcon, TagIcon } from '@heroicons/react/outline';
|
|
5
|
+
import { CubeIcon, TagIcon, ExternalLinkIcon } from '@heroicons/react/outline';
|
|
6
6
|
import { useUser } from '@/hooks/EventCatalog';
|
|
7
7
|
import getBackgroundColor from '@/utils/random-bg';
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ interface ServiceSideBarProps {
|
|
|
15
15
|
function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
16
16
|
const { getUserById } = useUser();
|
|
17
17
|
|
|
18
|
-
const { owners, subscribes, publishes, repository, tags = [] } = service;
|
|
18
|
+
const { owners, subscribes, publishes, repository, tags = [], externalLinks } = service;
|
|
19
19
|
const { language, url: repositoryUrl } = repository;
|
|
20
20
|
|
|
21
21
|
let languages = [];
|
|
@@ -44,15 +44,9 @@ function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
|
44
44
|
{publishes.map((event) => (
|
|
45
45
|
<li className="inline" key={event.name}>
|
|
46
46
|
<Link href={`/events/${event.name}`}>
|
|
47
|
-
<a
|
|
48
|
-
href="#"
|
|
49
|
-
className="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-0.5"
|
|
50
|
-
>
|
|
47
|
+
<a href="#" className="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-0.5">
|
|
51
48
|
<div className="absolute flex-shrink-0 flex items-center justify-center">
|
|
52
|
-
<span
|
|
53
|
-
className="h-1.5 w-1.5 rounded-full bg-indigo-500 animate animate-pulse"
|
|
54
|
-
aria-hidden="true"
|
|
55
|
-
/>
|
|
49
|
+
<span className="h-1.5 w-1.5 rounded-full bg-indigo-500 animate animate-pulse" aria-hidden="true" />
|
|
56
50
|
</div>
|
|
57
51
|
<div className="ml-3.5 text-sm font-medium text-gray-900">{event.name}</div>
|
|
58
52
|
</a>
|
|
@@ -74,10 +68,7 @@ function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
|
74
68
|
<Link href={`/events/${event.name}`}>
|
|
75
69
|
<a className="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-0.5">
|
|
76
70
|
<div className="absolute flex-shrink-0 flex items-center justify-center">
|
|
77
|
-
<span
|
|
78
|
-
className="h-1.5 w-1.5 rounded-full bg-green-500 animate animate-pulse"
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
/>
|
|
71
|
+
<span className="h-1.5 w-1.5 rounded-full bg-green-500 animate animate-pulse" aria-hidden="true" />
|
|
81
72
|
</div>
|
|
82
73
|
<div className="ml-3.5 text-sm font-medium text-gray-900">{event.name}</div>
|
|
83
74
|
</a>
|
|
@@ -137,13 +128,9 @@ function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
|
137
128
|
<div className="space-y-3">
|
|
138
129
|
<h2 className="text-sm font-medium text-gray-500">Language</h2>
|
|
139
130
|
{languages.map((value) => (
|
|
140
|
-
<div className="relative flex items-center mt-2">
|
|
131
|
+
<div className="relative flex items-center mt-2" key={value}>
|
|
141
132
|
<div className="absolute flex-shrink-0 flex items-center justify-center">
|
|
142
|
-
<span
|
|
143
|
-
className="h-2 w-2 rounded-full"
|
|
144
|
-
aria-hidden="true"
|
|
145
|
-
style={{ background: getBackgroundColor(value) }}
|
|
146
|
-
/>
|
|
133
|
+
<span className="h-2 w-2 rounded-full" aria-hidden="true" style={{ background: getBackgroundColor(value) }} />
|
|
147
134
|
</div>
|
|
148
135
|
<div className="ml-3.5 text-sm font-medium text-gray-900">{value}</div>
|
|
149
136
|
</div>
|
|
@@ -151,6 +138,25 @@ function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
|
151
138
|
</div>
|
|
152
139
|
</div>
|
|
153
140
|
)}
|
|
141
|
+
{externalLinks.length > 0 && (
|
|
142
|
+
<div className="border-t border-gray-200 py-6 space-y-8">
|
|
143
|
+
<div className="space-y-3">
|
|
144
|
+
{externalLinks.map((tag) => (
|
|
145
|
+
<a
|
|
146
|
+
href={tag.url}
|
|
147
|
+
target="_blank"
|
|
148
|
+
type="button"
|
|
149
|
+
className="hidden w-full md:inline-flex h-10 justify-center px-4 py-2 border border-teal-300 shadow-sm text-sm font-medium rounded-md text-teal-800 hover:bg-teal-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-200"
|
|
150
|
+
rel="noreferrer"
|
|
151
|
+
key={tag.url}
|
|
152
|
+
>
|
|
153
|
+
<ExternalLinkIcon className="-ml-1 mr-2 h-5 w-5 text-teal-200" aria-hidden="true" />
|
|
154
|
+
<span>{`${tag.label}`}</span>
|
|
155
|
+
</a>
|
|
156
|
+
))}
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
)}
|
|
154
160
|
{tags.length > 0 && (
|
|
155
161
|
<div className="border-t border-gray-200 py-6 space-y-8">
|
|
156
162
|
<div>
|
|
@@ -164,12 +170,7 @@ function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
|
164
170
|
|
|
165
171
|
if (url) {
|
|
166
172
|
return (
|
|
167
|
-
<a
|
|
168
|
-
href={url}
|
|
169
|
-
className="inline-block underline"
|
|
170
|
-
target="_blank"
|
|
171
|
-
rel="noreferrer"
|
|
172
|
-
>
|
|
173
|
+
<a href={url} className="inline-block underline" target="_blank" rel="noreferrer">
|
|
173
174
|
<span
|
|
174
175
|
className={`underline inline-block mr-2 items-center px-2.5 py-0.5 rounded-full text-xs font-medium -top-0.5 relative bg-${color}-100 text-${color}-800`}
|
|
175
176
|
>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
title: 'EventCatalog',
|
|
3
|
+
tagline: 'Discover, Explore and Document your Event Driven Architectures',
|
|
4
|
+
organizationName: 'Your Company',
|
|
5
|
+
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
6
|
+
logo: {
|
|
7
|
+
alt: 'EventCatalog Logo',
|
|
8
|
+
src: 'logo.svg',
|
|
9
|
+
},
|
|
10
|
+
footerLinks: [
|
|
11
|
+
{ label: 'Events', href: '/events' },
|
|
12
|
+
{ label: 'Services', href: '/services' },
|
|
13
|
+
{ label: '3D Node Graph', href: '/overview' },
|
|
14
|
+
{ label: 'GitHub', href: 'https://github.com/boyney123/eventcatalog-demo/edit/master' }
|
|
15
|
+
],
|
|
16
|
+
generators: [
|
|
17
|
+
[
|
|
18
|
+
'@eventcatalog/plugin-doc-generator-asyncapi',
|
|
19
|
+
{
|
|
20
|
+
file: './asyncapi.yml',
|
|
21
|
+
},
|
|
22
|
+
]
|
|
23
|
+
],
|
|
24
|
+
users: [
|
|
25
|
+
{
|
|
26
|
+
id: 'dboyne',
|
|
27
|
+
name: 'David Boyne',
|
|
28
|
+
avatarUrl: 'https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png',
|
|
29
|
+
role: 'Developer',
|
|
30
|
+
summary: 'Currently building tools for Event Architectures.'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'mSmith',
|
|
34
|
+
name: 'Matthew Smith',
|
|
35
|
+
avatarUrl: 'https://randomuser.me/api/portraits/lego/3.jpg',
|
|
36
|
+
role: 'Developer',
|
|
37
|
+
summary: 'About Fugiat ipsum ipsum deserunt culpa aute sint do nostrud anim incididunt cillum culpa consequat.'
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
}
|
package/hooks/EventCatalog.tsx
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Basket Service
|
|
3
|
+
summary: |
|
|
4
|
+
CRUD based API to handle Basket interactions for users of the shopping website.
|
|
5
|
+
owners:
|
|
6
|
+
- mSmith
|
|
7
|
+
repository:
|
|
8
|
+
language: JavaScript
|
|
9
|
+
url: https://github.com/boyney123/pretend-basket-service
|
|
10
|
+
externalLinks:
|
|
11
|
+
- label: AsyncAPI Specification
|
|
12
|
+
url: https://studio.asyncapi.com/#schema-lightMeasuredPayload
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Simple API that handles interactions between users and their baskets. Use this service to add, remove and query the status of a users basket.
|
|
16
|
+
|
|
17
|
+
This service will also generate Async events for downstream services.
|
|
18
|
+
|
|
19
|
+
<Mermaid />
|