@eventcatalog/core 0.0.10 → 0.0.11
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 -1
- package/.next/build-manifest.json +13 -13
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1bay4w0 +1 -1
- 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/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/730.js +2 -6
- package/.next/server/chunks/944.js +28 -31
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/events/AddedItemToCart.html +2 -2
- package/.next/server/pages/events/OrderComplete.html +2 -2
- package/.next/server/pages/events/OrderConfirmed.html +2 -2
- package/.next/server/pages/events/OrderRequested.html +2 -2
- package/.next/server/pages/events/PaymentProcessed.html +2 -2
- package/.next/server/pages/events/RemovedItemFromCart.html +2 -2
- package/.next/server/pages/events/ShipmentDelivered.html +2 -2
- package/.next/server/pages/events/ShipmentDispatched.html +2 -2
- package/.next/server/pages/events/ShipmentPrepared.html +2 -2
- package/.next/server/pages/events/[name]/v/[version].js +0 -7
- package/.next/server/pages/events/[name]/v/[version].js.nft.json +1 -1
- package/.next/server/pages/events/[name].js +0 -7
- package/.next/server/pages/events/[name].js.nft.json +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/services/Basket Service.html +2 -2
- package/.next/server/pages/services/Data Lake.html +2 -2
- package/.next/server/pages/services/Payment Service.html +2 -2
- package/.next/server/pages/services/Shipping Service.html +2 -2
- package/.next/server/pages/services/[name].js +22 -32
- package/.next/server/pages/services/[name].js.nft.json +1 -1
- package/.next/server/pages/users/[id].js.nft.json +1 -1
- package/.next/static/{yc3MsaLWgBvovlJpHpfqc → _vd7D7jNxx4JR685n7v1G}/_buildManifest.js +1 -1
- package/.next/static/{yc3MsaLWgBvovlJpHpfqc → _vd7D7jNxx4JR685n7v1G}/_middlewareManifest.js +0 -0
- package/.next/static/{yc3MsaLWgBvovlJpHpfqc → _vd7D7jNxx4JR685n7v1G}/_ssgManifest.js +0 -0
- package/.next/static/chunks/{336-5d9007a96aa8f2c7.js → 336-27e73f1c995ab4e7.js} +1 -1
- package/.next/static/chunks/873-cd4309ed788ee564.js +1 -0
- package/.next/static/chunks/954-4d4a09c3269dda3f.js +1 -0
- package/.next/static/chunks/pages/events/[name]/v/{[version]-dc146dc9bfa7362d.js → [version]-963d3e8377b51e86.js} +1 -1
- package/.next/static/chunks/pages/events/{[name]-fb77119f66a5793e.js → [name]-578828157369b5cd.js} +1 -1
- package/.next/static/chunks/pages/services/[name]-8e53e76ab1c52c30.js +1 -0
- package/.next/trace +37 -37
- package/CHANGELOG.md +6 -0
- package/components/NotFound/index.tsx +14 -15
- package/package.json +1 -1
- package/pages/events/[name].tsx +4 -3
- package/pages/services/[name].tsx +4 -2
- package/.next/static/chunks/236-0acd5083c102a9cb.js +0 -1
- package/.next/static/chunks/873-9d69271e4b2dd496.js +0 -1
- package/.next/static/chunks/pages/services/[name]-69692188d11304b7.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 0.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`97e447a`](https://github.com/boyney123/eventcatalog/commit/97e447aa0ec255b2c879eac7fa83d7b705230790) [#95](https://github.com/boyney123/eventcatalog/pull/95) Thanks [@boyney123](https://github.com/boyney123)! - fix: edit url is now optional in not found pages and no longer fetche…
|
|
8
|
+
|
|
3
9
|
## 0.0.10
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { DocumentAddIcon } from '@heroicons/react/solid';
|
|
2
|
-
import url from 'url';
|
|
3
2
|
|
|
4
3
|
interface NotFoundProps {
|
|
5
4
|
type: 'service' | 'event';
|
|
6
5
|
name: string;
|
|
7
|
-
editUrl
|
|
6
|
+
editUrl?: string;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
export default function Example(props: NotFoundProps) {
|
|
11
10
|
const { type, name, editUrl } = props;
|
|
12
11
|
|
|
13
|
-
const urlToAddPage = url.resolve(editUrl, `${type}/${name}`);
|
|
14
|
-
|
|
15
12
|
return (
|
|
16
13
|
<main className="min-h-full bg-cover bg-top sm:bg-top h-screen">
|
|
17
14
|
<div className="max-w-7xl mx-auto px-4 py-16 text-center sm:px-6 sm:py-24 lg:px-8 lg:py-48">
|
|
@@ -23,17 +20,19 @@ export default function Example(props: NotFoundProps) {
|
|
|
23
20
|
Documentation for {type} <span className="underline">{name}</span> is missing!
|
|
24
21
|
</p>
|
|
25
22
|
<p className="mt-4 text-xs text-gray-400">Help the eco-system and add the documentation for others ❤️ </p>
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
{editUrl && (
|
|
24
|
+
<div className="mt-12">
|
|
25
|
+
<a
|
|
26
|
+
href={editUrl}
|
|
27
|
+
target="_blank"
|
|
28
|
+
className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-black bg-opacity-75 "
|
|
29
|
+
rel="noreferrer"
|
|
30
|
+
>
|
|
31
|
+
<DocumentAddIcon className="-ml-1 mr-2 h-5 w-5" aria-hidden="true" />
|
|
32
|
+
Add <span className="underline px-1">{name}</span> documentation
|
|
33
|
+
</a>
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
37
36
|
</div>
|
|
38
37
|
</main>
|
|
39
38
|
);
|
package/package.json
CHANGED
package/pages/events/[name].tsx
CHANGED
|
@@ -2,7 +2,6 @@ import Head from 'next/head';
|
|
|
2
2
|
import { MDXRemote } from 'next-mdx-remote';
|
|
3
3
|
|
|
4
4
|
import { Event } from '@eventcatalog/types';
|
|
5
|
-
import { editUrl } from '../../eventcatalog.config';
|
|
6
5
|
import Admonition from '@/components/Mdx/Admonition';
|
|
7
6
|
import Examples from '@/components/Mdx/Examples';
|
|
8
7
|
|
|
@@ -69,9 +68,11 @@ export default function Events(props: EventsPageProps) {
|
|
|
69
68
|
const { event, markdown, loadedVersion, notFound } = props;
|
|
70
69
|
const { getEditUrl, hasEditUrl } = useUrl();
|
|
71
70
|
|
|
72
|
-
if (notFound) return <NotFound type="event" name={event.name} editUrl={editUrl} />;
|
|
73
|
-
|
|
74
71
|
const { name, summary, draft, schema, examples, version } = event;
|
|
72
|
+
|
|
73
|
+
if (notFound)
|
|
74
|
+
return <NotFound type="event" name={event.name} editUrl={hasEditUrl ? getEditUrl(`/events/${name}/index.md`) : ''} />;
|
|
75
|
+
|
|
75
76
|
const { lastModifiedDate } = markdown;
|
|
76
77
|
|
|
77
78
|
const pages = [
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Head from 'next/head';
|
|
2
2
|
import { MDXRemote } from 'next-mdx-remote';
|
|
3
3
|
import { Service } from '@eventcatalog/types';
|
|
4
|
-
import { editUrl } from '../../eventcatalog.config.js';
|
|
5
4
|
import ContentView from '@/components/ContentView';
|
|
6
5
|
import { getAllServices, getServiceByName } from '@/lib/services';
|
|
7
6
|
|
|
@@ -39,7 +38,10 @@ export default function Services(props: ServicesPageProps) {
|
|
|
39
38
|
const { service, markdown, notFound } = props;
|
|
40
39
|
const { getEditUrl, hasEditUrl } = useUrl();
|
|
41
40
|
|
|
42
|
-
if (notFound)
|
|
41
|
+
if (notFound)
|
|
42
|
+
return (
|
|
43
|
+
<NotFound type="service" name={service.name} editUrl={hasEditUrl ? getEditUrl(`/services/${service.name}/index.md`) : ''} />
|
|
44
|
+
);
|
|
43
45
|
|
|
44
46
|
const { name, summary, draft } = service;
|
|
45
47
|
const { lastModifiedDate } = markdown;
|