@eventcatalog/core 2.29.0 → 2.29.2
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/README.md +4 -1
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-GFX4RRFK.js → chunk-77IO2UDS.js} +1 -1
- package/dist/{chunk-7IL66XAM.js → chunk-7SZ6PH5O.js} +1 -1
- package/dist/{chunk-3PFCKHXB.js → chunk-MHSM6HM5.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/components/SideNav/ListViewSideBar/index.tsx +2 -2
- package/eventcatalog/src/enterprise/ai-assistant/components/Chat.tsx +2 -2
- package/eventcatalog/src/enterprise/ai-assistant/components/ChatWindow.tsx +12 -6
- package/eventcatalog/src/pages/chat/index.astro +2 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/index.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/index.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +2 -2
- package/eventcatalog/src/pages/visualiser/[type]/[id]/index.astro +2 -2
- package/eventcatalog/src/utils/url-builder.ts +2 -2
- package/package.json +1 -1
- /package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/{OpenAPI.tsx → _OpenAPI.tsx} +0 -0
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<h4>Features: Documentation for Event Driven Architectures, Integration with any broker, Generator from your OpenAPI and AsyncAPI documents, Docs and Code, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
|
|
35
35
|
|
|
36
36
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
37
|
-
[](#contributors-)
|
|
38
38
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
39
39
|
|
|
40
40
|
[Read the Docs](https://www.eventcatalog.dev/docs/development/getting-started/introduction) | [View Demo](https://demo.eventcatalog.dev)
|
|
@@ -259,6 +259,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
259
259
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Vertygo"><img src="https://avatars.githubusercontent.com/u/1658326?v=4?s=100" width="100px;" alt="Ivan Milosavljevic"/><br /><sub><b>Ivan Milosavljevic</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Vertygo" title="Documentation">📖</a></td>
|
|
260
260
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mezzle"><img src="https://avatars.githubusercontent.com/u/570639?v=4?s=100" width="100px;" alt="Martin Meredith"/><br /><sub><b>Martin Meredith</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Mezzle" title="Code">💻</a></td>
|
|
261
261
|
</tr>
|
|
262
|
+
<tr>
|
|
263
|
+
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/ruudwelling/"><img src="https://avatars.githubusercontent.com/u/4014179?v=4?s=100" width="100px;" alt="Ruud Welling"/><br /><sub><b>Ruud Welling</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=WellingR" title="Code">💻</a></td>
|
|
264
|
+
</tr>
|
|
262
265
|
</tbody>
|
|
263
266
|
</table>
|
|
264
267
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-MHSM6HM5.js";
|
|
4
|
+
import "../chunk-7SZ6PH5O.js";
|
|
5
|
+
import "../chunk-77IO2UDS.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-WUCY3QHK.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-MHSM6HM5.js";
|
|
10
|
+
import "./chunk-7SZ6PH5O.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro
|
|
13
13
|
} from "./chunk-R2NILSWL.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-77IO2UDS.js";
|
|
17
17
|
import {
|
|
18
18
|
isBackstagePluginEnabled
|
|
19
19
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -94,7 +94,7 @@ const ServiceItem = React.memo(
|
|
|
94
94
|
>
|
|
95
95
|
<span className="truncate flex items-center gap-1">AsyncAPI specification</span>
|
|
96
96
|
<span className="text-purple-600 ml-2 text-[10px] uppercase font-medium bg-gray-50 px-4 py-0.5 rounded">
|
|
97
|
-
<img src=
|
|
97
|
+
<img src={buildUrl('/icons/asyncapi.svg', true)} className="w-4 h-4" />
|
|
98
98
|
</span>
|
|
99
99
|
</a>
|
|
100
100
|
)}
|
|
@@ -109,7 +109,7 @@ const ServiceItem = React.memo(
|
|
|
109
109
|
>
|
|
110
110
|
<span className="truncate flex items-center gap-1">OpenAPI specification</span>
|
|
111
111
|
<span className="text-green-600 ml-2 text-[10px] uppercase font-medium bg-gray-50 px-4 py-0.5 rounded">
|
|
112
|
-
<img src=
|
|
112
|
+
<img src={buildUrl('/icons/openapi.svg', true)} className="w-4 h-4" />
|
|
113
113
|
</span>
|
|
114
114
|
</a>
|
|
115
115
|
)}
|
|
@@ -2,12 +2,12 @@ import Sidebar from './ChatSidebar';
|
|
|
2
2
|
import { ChatProvider } from './hooks/ChatProvider';
|
|
3
3
|
import ChatWindow from './ChatWindow';
|
|
4
4
|
|
|
5
|
-
const Chat = () => {
|
|
5
|
+
const Chat = ({ chatConfig }: { chatConfig: any }) => {
|
|
6
6
|
return (
|
|
7
7
|
<ChatProvider>
|
|
8
8
|
<div className="flex overflow-hidden w-full">
|
|
9
9
|
<Sidebar />
|
|
10
|
-
<ChatWindow />
|
|
10
|
+
<ChatWindow {...chatConfig} />
|
|
11
11
|
</div>
|
|
12
12
|
</ChatProvider>
|
|
13
13
|
);
|
|
@@ -2,7 +2,6 @@ import { useEffect, useState, useRef, useCallback, useMemo } from 'react';
|
|
|
2
2
|
import { BookOpen, Send } from 'lucide-react';
|
|
3
3
|
import { CreateWebWorkerMLCEngine, type InitProgressReport } from '@mlc-ai/web-llm';
|
|
4
4
|
import { useChat, type Message } from './hooks/ChatProvider';
|
|
5
|
-
import config from '@config';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
|
|
8
7
|
// Update Message type to include resources
|
|
@@ -102,7 +101,17 @@ const ChatMessage = React.memo(({ message }: { message: Message }) => (
|
|
|
102
101
|
|
|
103
102
|
ChatMessage.displayName = 'ChatMessage';
|
|
104
103
|
|
|
105
|
-
|
|
104
|
+
interface ChatWindowProps {
|
|
105
|
+
model?: string;
|
|
106
|
+
max_tokens?: number;
|
|
107
|
+
similarityResults?: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const ChatWindow = ({
|
|
111
|
+
model = 'Hermes-3-Llama-3.2-3B-q4f16_1-MLC',
|
|
112
|
+
max_tokens = 4096,
|
|
113
|
+
similarityResults = 50,
|
|
114
|
+
}: ChatWindowProps) => {
|
|
106
115
|
const [loading, setLoading] = useState(true);
|
|
107
116
|
const [loadingProgress, setLoadingProgress] = useState(0);
|
|
108
117
|
const [engine, setEngine] = useState<any>(null);
|
|
@@ -114,10 +123,7 @@ const ChatWindow = () => {
|
|
|
114
123
|
const completionRef = useRef<any>(null);
|
|
115
124
|
const outputRef = useRef<HTMLDivElement>(null);
|
|
116
125
|
|
|
117
|
-
|
|
118
|
-
const model = config.chat?.model || 'Hermes-3-Llama-3.2-3B-q4f16_1-MLC';
|
|
119
|
-
const max_tokens = config.chat?.max_tokens || 4096;
|
|
120
|
-
const similarityResults = config.chat?.similarityResults || 50;
|
|
126
|
+
console.log('model', model);
|
|
121
127
|
|
|
122
128
|
const { currentSession, storeMessagesToSession, updateSession, isStreaming, setIsStreaming } = useChat();
|
|
123
129
|
|
|
@@ -8,6 +8,7 @@ import fs from 'node:fs';
|
|
|
8
8
|
import { Code } from 'astro-expressive-code/components';
|
|
9
9
|
|
|
10
10
|
const isEnabled = config.chat?.enabled || false;
|
|
11
|
+
const chatConfig = config.chat || {};
|
|
11
12
|
|
|
12
13
|
const PROJECT_DIR = path.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
13
14
|
const GENERATED_AI_DIR = path.resolve(PROJECT_DIR, 'public/ai');
|
|
@@ -46,7 +47,7 @@ const generatorConfig = `
|
|
|
46
47
|
</div>
|
|
47
48
|
</div>
|
|
48
49
|
<div id="chatContainer" class="w-full">
|
|
49
|
-
<Chat client:only="react" />
|
|
50
|
+
<Chat client:only="react" chatConfig={chatConfig} />
|
|
50
51
|
</div>
|
|
51
52
|
</>
|
|
52
53
|
) : (
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import fs from 'node:fs';
|
|
5
|
-
import OpenAPISpec from './
|
|
5
|
+
import OpenAPISpec from './_OpenAPI.tsx';
|
|
6
6
|
|
|
7
7
|
import type { CollectionTypes, PageTypes } from '@types';
|
|
8
8
|
import { DocumentMinusIcon } from '@heroicons/react/24/outline';
|
|
@@ -44,7 +44,7 @@ const props = Astro.props;
|
|
|
44
44
|
const pageTitle = `${props.collection} | ${props.data.name}`.replace(/^\w/, (c) => c.toUpperCase());
|
|
45
45
|
|
|
46
46
|
const { pathname } = Astro.url;
|
|
47
|
-
const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion);
|
|
47
|
+
const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion, false, true);
|
|
48
48
|
---
|
|
49
49
|
|
|
50
50
|
<!doctype html>
|
|
@@ -95,7 +95,7 @@ const ownedQueriesList = queries.map((p) => ({
|
|
|
95
95
|
{
|
|
96
96
|
props.data.slackDirectMessageUrl && (
|
|
97
97
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
98
|
-
<img src=
|
|
98
|
+
<img src={buildUrl('/slack-icon.svg', true)} class="w-4 h-3" />
|
|
99
99
|
<a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
|
|
100
100
|
</div>
|
|
101
101
|
)
|
|
@@ -103,7 +103,7 @@ const ownedQueriesList = queries.map((p) => ({
|
|
|
103
103
|
{
|
|
104
104
|
props.data.msTeamsDirectMessageUrl && (
|
|
105
105
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
106
|
-
<img src=
|
|
106
|
+
<img src={buildUrl('/icons/ms-teams.svg', true)} class="w-4 h-4" />
|
|
107
107
|
<a href={`${props.data.msTeamsDirectMessageUrl}`} target="_blank" rel="noopener noreferrer">
|
|
108
108
|
Send DM on Teams
|
|
109
109
|
</a>
|
|
@@ -86,7 +86,7 @@ const associatedTeams = teams.map((o) => ({
|
|
|
86
86
|
{
|
|
87
87
|
props.data.slackDirectMessageUrl && (
|
|
88
88
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
89
|
-
<img src=
|
|
89
|
+
<img src={buildUrl('/slack-icon.svg', true)} class="w-4 h-3" />
|
|
90
90
|
<a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
|
|
91
91
|
</div>
|
|
92
92
|
)
|
|
@@ -94,7 +94,7 @@ const associatedTeams = teams.map((o) => ({
|
|
|
94
94
|
{
|
|
95
95
|
props.data.msTeamsDirectMessageUrl && (
|
|
96
96
|
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
97
|
-
<img src=
|
|
97
|
+
<img src={buildUrl('/icons/ms-teams.svg', true)} class="w-4 h-4" />
|
|
98
98
|
<a href={`${props.data.msTeamsDirectMessageUrl}`} target="_blank" rel="noopener noreferrer">
|
|
99
99
|
Send DM on Teams
|
|
100
100
|
</a>
|
|
@@ -32,8 +32,7 @@ const pageTitle = `${props.collection} | ${props.data.name}`.replace(/^\w/, (c)
|
|
|
32
32
|
|
|
33
33
|
const { pathname } = Astro.url;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion);
|
|
35
|
+
const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion, false, true);
|
|
37
36
|
---
|
|
38
37
|
|
|
39
38
|
<!doctype html>
|
|
@@ -48,6 +47,7 @@ const redirectUrl = buildUrl(pathname + '/' + props.data.latestVersion);
|
|
|
48
47
|
|
|
49
48
|
<script define:vars={{ redirectUrl }}>
|
|
50
49
|
document.addEventListener('DOMContentLoaded', () => {
|
|
50
|
+
// redirect with any search params too
|
|
51
51
|
const searchParams = window.location.search;
|
|
52
52
|
const fullRedirectUrl = redirectUrl + searchParams;
|
|
53
53
|
window.location.href = fullRedirectUrl;
|
|
@@ -3,14 +3,14 @@ const cleanUrl = (url: string) => {
|
|
|
3
3
|
};
|
|
4
4
|
|
|
5
5
|
// Custom URL builder as Astro does not support this stuff out the box
|
|
6
|
-
export const buildUrl = (url: string, ignoreTrailingSlash = false) => {
|
|
6
|
+
export const buildUrl = (url: string, ignoreTrailingSlash = false, urlAlreadyIncludesBaseUrl = false) => {
|
|
7
7
|
// Should a trailingSlash be added to urls?
|
|
8
8
|
const trailingSlash = __EC_TRAILING_SLASH__;
|
|
9
9
|
|
|
10
10
|
let newUrl = url;
|
|
11
11
|
|
|
12
12
|
// If the base URL is not the root, we need to append it
|
|
13
|
-
if (import.meta.env.BASE_URL !== '/') {
|
|
13
|
+
if (import.meta.env.BASE_URL !== '/' && !urlAlreadyIncludesBaseUrl) {
|
|
14
14
|
newUrl = `${import.meta.env.BASE_URL}${url}`;
|
|
15
15
|
}
|
|
16
16
|
|
package/package.json
CHANGED
/package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/{OpenAPI.tsx → _OpenAPI.tsx}
RENAMED
|
File without changes
|