@eventcatalog/core 2.2.4 → 2.2.5
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 +7 -0
- package/package.json +1 -1
- package/src/components/Header.astro +1 -1
- package/src/components/Seo.astro +1 -1
- package/src/components/SideBars/MessageSideBar.astro +1 -1
- package/src/components/SideBars/ServiceSideBar.astro +1 -1
- package/src/layouts/CustomDocsPageLayout.astro +1 -1
- package/src/layouts/Footer.astro +4 -2
- package/src/pages/docs/[type]/[id]/[version]/spec/index.astro +8 -11
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ const navItems = [
|
|
|
21
21
|
];
|
|
22
22
|
|
|
23
23
|
const logo = {
|
|
24
|
-
src: catalog?.logo?.src || '
|
|
24
|
+
src: ('/' + (catalog?.logo?.src || 'logo.png')).replace(/^\/+/, '/'), // replace the leading slashes with a single one
|
|
25
25
|
alt: catalog?.logo?.alt || 'Event Catalog',
|
|
26
26
|
text: catalog?.logo?.text || "EventCatalog"
|
|
27
27
|
}
|
package/src/components/Seo.astro
CHANGED
|
@@ -31,7 +31,7 @@ if (typeof _image === 'string') {
|
|
|
31
31
|
<meta charset="UTF-8" />
|
|
32
32
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
33
33
|
<meta name="viewport" content="width=device-width" />
|
|
34
|
-
<link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico')} />
|
|
34
|
+
<link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico', true)} />
|
|
35
35
|
|
|
36
36
|
<SEO
|
|
37
37
|
title={title}
|
|
@@ -59,7 +59,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '')
|
|
|
59
59
|
{
|
|
60
60
|
message?.data?.schemaPath && (
|
|
61
61
|
<a
|
|
62
|
-
href={schemaURL}
|
|
62
|
+
href={buildUrl(schemaURL, true)}
|
|
63
63
|
download={`${message.data.name}(${message.data.version})-${schemaFilePath}`}
|
|
64
64
|
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
65
|
>
|
|
@@ -60,7 +60,7 @@ const schemaURL = join(publicPath, schemaFilePath || '')
|
|
|
60
60
|
{
|
|
61
61
|
service?.data?.schemaPath && (
|
|
62
62
|
<a
|
|
63
|
-
href={schemaURL}
|
|
63
|
+
href={buildUrl(schemaURL, true)}
|
|
64
64
|
download={`${service.data.name}(${service.data.version})-${schemaFilePath}`}
|
|
65
65
|
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
66
|
>
|
|
@@ -15,7 +15,7 @@ import { buildUrl } from '@utils/url-builder';
|
|
|
15
15
|
<meta charset="UTF-8" />
|
|
16
16
|
<meta name="description" content="Astro description" />
|
|
17
17
|
<meta name="viewport" content="width=device-width" />
|
|
18
|
-
<link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico')} />
|
|
18
|
+
<link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico', true)} />
|
|
19
19
|
<meta name="generator" content={Astro.generator} />
|
|
20
20
|
<title>EventCatalog</title>
|
|
21
21
|
</head>
|
package/src/layouts/Footer.astro
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { buildUrl } from "@utils/url-builder"
|
|
3
|
+
|
|
2
4
|
---
|
|
3
5
|
|
|
4
6
|
<footer class="py-4 space-y-8 border-t border-gray-300">
|
|
5
7
|
<div class="flex justify-between items-center py-8 text-gray-500 text-sm font-light">
|
|
6
8
|
<div class="flex space-x-5">
|
|
7
|
-
<a href="https://github.com/event-catalog/eventcatalog" target="_blank"><svg class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400" style=
|
|
8
|
-
<a href="https://x.com/event_catalog" target="_blank"><span class="sr-only">x</span><svg class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400" style=
|
|
9
|
+
<a href="https://github.com/event-catalog/eventcatalog" target="_blank"><svg class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400" style={`mask-image: url("${buildUrl('/icons/github.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}></svg></a>
|
|
10
|
+
<a href="https://x.com/event_catalog" target="_blank"><span class="sr-only">x</span><svg class="w-5 h-5 bg-gray-400 hover:bg-purple-500 dark:hover:bg-gray-400" style={`mask-image: url("${buildUrl('/icons/x-twitter.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}></svg></a>
|
|
9
11
|
</div>
|
|
10
12
|
<a target="_blank" class="hover:text-purple-500 hover:underline text-gray-400 font-light not-prose" href="https://eventcatalog.dev">Powered by EventCatalog</a>
|
|
11
13
|
</div>
|
|
@@ -10,6 +10,7 @@ import { getDomains } from '@utils/domains/domains';
|
|
|
10
10
|
import type { CollectionTypes } from '@types';
|
|
11
11
|
import PlainPage from '@layouts/PlainPage.astro';
|
|
12
12
|
import { DocumentMinusIcon } from '@heroicons/react/24/outline';
|
|
13
|
+
import { buildUrl } from '@utils/url-builder';
|
|
13
14
|
|
|
14
15
|
export async function getStaticPaths() {
|
|
15
16
|
const events = await getEvents();
|
|
@@ -42,22 +43,18 @@ const fileExists = fs.existsSync(pathOnDisk);
|
|
|
42
43
|
---
|
|
43
44
|
|
|
44
45
|
<PlainPage title="OpenAPI Spec">
|
|
45
|
-
<!-- {fileExists && <div>Here</div>} -->
|
|
46
46
|
{
|
|
47
|
-
!fileExists
|
|
47
|
+
!fileExists ? (
|
|
48
48
|
<div class="text-center h-screen flex flex-col justify-center ">
|
|
49
|
-
|
|
49
|
+
<DocumentMinusIcon className="mx-auto h-12 w-12 text-gray-400" />
|
|
50
50
|
<h3 class="mt-2 text-sm font-semibold text-gray-900">No OpenAPI spec file found</h3>
|
|
51
|
-
<p class="mt-1 text-xs text-gray-400">
|
|
52
|
-
|
|
51
|
+
<p class="mt-1 text-xs text-gray-400">
|
|
52
|
+
Could not find OpenAPI file for {data.name} in {`/${catalog.path}`}
|
|
53
|
+
</p>
|
|
53
54
|
</div>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
fileExists && (
|
|
55
|
+
) : (
|
|
59
56
|
<rapi-doc
|
|
60
|
-
spec-url={pathToSpec}
|
|
57
|
+
spec-url={buildUrl(pathToSpec, true)}
|
|
61
58
|
render-style="table"
|
|
62
59
|
show-header="false"
|
|
63
60
|
allow-authentication="false"
|