@eventcatalog/core 0.0.5 → 0.0.6

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`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
8
+
3
9
  ## 0.0.5
4
10
 
5
11
  ### Patch Changes
@@ -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
@@ -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.5",
3
+ "version": "0.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
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://demo.eventcatalog.dev/" />
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://demo.eventcatalog.dev/opengraph.png" />
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."
@@ -56,7 +56,15 @@ export const getComponents = ({ event, schema, examples }: any) => ({
56
56
  );
57
57
  },
58
58
  Admonition,
59
- EventExamples: (props) => <Examples {...props} examples={examples} showLineNumbers />,
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>}