@eventcatalog/core 0.0.3 → 0.0.7
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/CHANGELOG.md +24 -0
- package/bin/eventcatalog.js +4 -4
- package/components/Footer.tsx +12 -19
- package/components/Mdx/Admonition.tsx +1 -1
- package/components/Sidebars/EventSidebar.tsx +1 -1
- package/components/Sidebars/ServiceSidebar.tsx +1 -1
- package/lib/events.ts +2 -2
- package/package.json +3 -2
- package/pages/_app.tsx +2 -2
- package/pages/events/[name].tsx +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 0.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`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
|
|
8
|
+
|
|
9
|
+
## 0.0.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`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
|
|
14
|
+
|
|
15
|
+
## 0.0.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`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
|
|
20
|
+
|
|
21
|
+
## 0.0.4
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`1eb4572`](https://github.com/boyney123/eventcatalog/commit/1eb4572918ac06afb64554fef2fc1a3877fbf06d) [#44](https://github.com/boyney123/eventcatalog/pull/44) Thanks [@boyney123](https://github.com/boyney123)! - feat: added more customise options and documentation for them
|
|
26
|
+
|
|
3
27
|
## 0.0.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/bin/eventcatalog.js
CHANGED
|
@@ -38,7 +38,7 @@ cli
|
|
|
38
38
|
.command('start [siteDir]')
|
|
39
39
|
.description('Start the development server.')
|
|
40
40
|
.action(() => {
|
|
41
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run start`, {
|
|
41
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run start`, {
|
|
42
42
|
cwd: eventCatalogLibDir,
|
|
43
43
|
stdio: 'inherit',
|
|
44
44
|
});
|
|
@@ -56,7 +56,7 @@ cli
|
|
|
56
56
|
fs.copySync(path.join(projectDIR, 'public'), path.join(eventCatalogLibDir, 'public'));
|
|
57
57
|
|
|
58
58
|
// build using nextjs
|
|
59
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run build`, {
|
|
59
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run build`, {
|
|
60
60
|
cwd: eventCatalogLibDir,
|
|
61
61
|
stdio: 'inherit',
|
|
62
62
|
});
|
|
@@ -82,7 +82,7 @@ cli
|
|
|
82
82
|
path.join(eventCatalogLibDir, 'eventcatalog.config.js')
|
|
83
83
|
);
|
|
84
84
|
|
|
85
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run dev`, {
|
|
85
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run dev`, {
|
|
86
86
|
cwd: eventCatalogLibDir,
|
|
87
87
|
stdio: 'inherit',
|
|
88
88
|
});
|
|
@@ -103,7 +103,7 @@ cli
|
|
|
103
103
|
path.join(eventCatalogLibDir, 'eventcatalog.config.js')
|
|
104
104
|
);
|
|
105
105
|
|
|
106
|
-
execSync(`PROJECT_DIR=${projectDIR} npm run generate`, {
|
|
106
|
+
execSync(`cross-env PROJECT_DIR=${projectDIR} npm run generate`, {
|
|
107
107
|
cwd: eventCatalogLibDir,
|
|
108
108
|
stdio: 'inherit',
|
|
109
109
|
});
|
package/components/Footer.tsx
CHANGED
|
@@ -2,30 +2,23 @@ import React from 'react';
|
|
|
2
2
|
import { useConfig } from '@/hooks/EventCatalog';
|
|
3
3
|
|
|
4
4
|
export default function Footer() {
|
|
5
|
-
const { organizationName,
|
|
5
|
+
const { organizationName, footerLinks: navigation = [] } = useConfig();
|
|
6
6
|
const year = new Date().getFullYear();
|
|
7
7
|
|
|
8
|
-
const navigation = {
|
|
9
|
-
main: [
|
|
10
|
-
{ name: 'Events', href: '/events' },
|
|
11
|
-
{ name: 'Services', href: '/services' },
|
|
12
|
-
{ name: '3D Node Graph', href: '/overview' },
|
|
13
|
-
{ name: 'GitHub', href: editUrl },
|
|
14
|
-
],
|
|
15
|
-
};
|
|
16
|
-
|
|
17
8
|
return (
|
|
18
9
|
<footer className="bg-gray-800">
|
|
19
10
|
<div className="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
{item.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
{navigation && (
|
|
12
|
+
<nav className="-mx-5 -my-2 flex flex-wrap justify-center" aria-label="Footer">
|
|
13
|
+
{navigation.map((item) => (
|
|
14
|
+
<div key={item.label} className="px-5 py-2">
|
|
15
|
+
<a href={item.href} className="text-base text-gray-500 hover:text-gray-900">
|
|
16
|
+
{item.label}
|
|
17
|
+
</a>
|
|
18
|
+
</div>
|
|
19
|
+
))}
|
|
20
|
+
</nav>
|
|
21
|
+
)}
|
|
29
22
|
<p className="mt-8 text-center text-base text-gray-400">
|
|
30
23
|
Copyright © {year} {organizationName}. Built with{' '}
|
|
31
24
|
<a className="underline" href="https://eventcatalog.dev" target="_blank" rel="noreferrer">
|
|
@@ -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 (
|
|
@@ -111,7 +111,7 @@ function EventSideBar({ event, loadedVersion }: EventSideBarProps) {
|
|
|
111
111
|
? 'bg-blue-400 text-white shadow-md font-bold underline'
|
|
112
112
|
: 'bg-blue-100 text-blue-800';
|
|
113
113
|
return (
|
|
114
|
-
<li className="text-sm inline
|
|
114
|
+
<li className="text-sm inline" key={version}>
|
|
115
115
|
<Link href={`/events/${eventName}/v/${version}`}>
|
|
116
116
|
<a>
|
|
117
117
|
<span
|
|
@@ -137,7 +137,7 @@ function ServiceSidebar({ service }: ServiceSideBarProps) {
|
|
|
137
137
|
<div className="space-y-3">
|
|
138
138
|
<h2 className="text-sm font-medium text-gray-500">Language</h2>
|
|
139
139
|
{languages.map((value) => (
|
|
140
|
-
<div className="relative flex items-center mt-2">
|
|
140
|
+
<div className="relative flex items-center mt-2" key={value}>
|
|
141
141
|
<div className="absolute flex-shrink-0 flex items-center justify-center">
|
|
142
142
|
<span
|
|
143
143
|
className="h-2 w-2 rounded-full"
|
package/lib/events.ts
CHANGED
|
@@ -56,7 +56,7 @@ export const getLogsForEvent = (eventName) => {
|
|
|
56
56
|
let changelog = null;
|
|
57
57
|
|
|
58
58
|
try {
|
|
59
|
-
const { content } = readMarkdownFile(path.join(
|
|
59
|
+
const { content } = readMarkdownFile(path.join(previousVersionPathToDir, 'changelog.md'));
|
|
60
60
|
changelog = content;
|
|
61
61
|
} catch (error) {
|
|
62
62
|
// nothing found it's OK.
|
|
@@ -120,7 +120,7 @@ const getEventExamplesFromDir = (pathToExamples) => {
|
|
|
120
120
|
return {
|
|
121
121
|
name: filename,
|
|
122
122
|
snippet: content,
|
|
123
|
-
langugage: extentionToLanguageMap[extension],
|
|
123
|
+
langugage: extentionToLanguageMap[extension] || extension,
|
|
124
124
|
};
|
|
125
125
|
});
|
|
126
126
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventcatalog/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-syntax-highlighter": "^15.4.5"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@eventcatalog/types": "0.0.
|
|
40
|
+
"@eventcatalog/types": "0.0.2",
|
|
41
41
|
"@types/react": "^17.0.36",
|
|
42
42
|
"autoprefixer": "^10.4.0",
|
|
43
43
|
"commander": "^8.3.0",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"postcss": "^8.3.11",
|
|
47
47
|
"tailwindcss": "^2.2.19",
|
|
48
48
|
"trim": "0.0.3",
|
|
49
|
+
"cross-env": "^7.0.3",
|
|
49
50
|
"typescript": "^4.4.4"
|
|
50
51
|
},
|
|
51
52
|
"gitHead": "5f82ce7f267e9b3ec771bbd3cc81359ed0a8fd18"
|
package/pages/_app.tsx
CHANGED
|
@@ -16,7 +16,7 @@ export default ({ Component, pageProps }: AppProps) => (
|
|
|
16
16
|
name="description"
|
|
17
17
|
content="An open source project to Discover, Explore and Document your Event Driven Architectures."
|
|
18
18
|
/>
|
|
19
|
-
<meta property="og:url" content="https://
|
|
19
|
+
<meta property="og:url" content="https://eventcatalog.dev/" />
|
|
20
20
|
<meta property="og:type" content="website" />
|
|
21
21
|
<meta
|
|
22
22
|
property="og:title"
|
|
@@ -26,7 +26,7 @@ export default ({ Component, pageProps }: AppProps) => (
|
|
|
26
26
|
property="og:description"
|
|
27
27
|
content="An open source tool powered by markdown to document your Event Driven Architecture."
|
|
28
28
|
/>
|
|
29
|
-
<meta property="og:image" content="https://
|
|
29
|
+
<meta property="og:image" content="https://eventcatalog.dev/img/opengraph.png" />
|
|
30
30
|
<meta
|
|
31
31
|
property="og:image:alt"
|
|
32
32
|
content="EventCatalog | Discover, Explore and Document your Event Driven Architectures."
|
package/pages/events/[name].tsx
CHANGED
|
@@ -56,7 +56,15 @@ export const getComponents = ({ event, schema, examples }: any) => ({
|
|
|
56
56
|
);
|
|
57
57
|
},
|
|
58
58
|
Admonition,
|
|
59
|
-
EventExamples: (props) =>
|
|
59
|
+
EventExamples: (props) => {
|
|
60
|
+
if (examples.length > 0) {
|
|
61
|
+
return <Examples {...props} examples={examples} showLineNumbers />;
|
|
62
|
+
}
|
|
63
|
+
console.log(
|
|
64
|
+
'You are using the <EventExamples /> component without any examples, please read https://eventcatalog.dev/docs/events/adding-examples for more information'
|
|
65
|
+
);
|
|
66
|
+
return null;
|
|
67
|
+
},
|
|
60
68
|
Mermaid: ({ title }: { title: string }) => (
|
|
61
69
|
<div className="mx-auto w-full py-10">
|
|
62
70
|
{title && <h2 className="text-lg font-medium text-gray-900 underline">{title}</h2>}
|