@eventcatalog/core 2.61.0 → 2.61.1

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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.61.0";
40
+ var version = "2.61.1";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-I2B6B3XZ.js";
4
- import "../chunk-3CAAQQUB.js";
3
+ } from "../chunk-RPWUOJ3F.js";
4
+ import "../chunk-CMVDQ42N.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.61.0";
109
+ var version = "2.61.1";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-OEWPHKD6.js";
4
- import "../chunk-I2B6B3XZ.js";
5
- import "../chunk-3CAAQQUB.js";
3
+ } from "../chunk-MDWG55PH.js";
4
+ import "../chunk-RPWUOJ3F.js";
5
+ import "../chunk-CMVDQ42N.js";
6
6
  import "../chunk-UPONRQSN.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.61.0";
2
+ var version = "2.61.1";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-I2B6B3XZ.js";
3
+ } from "./chunk-RPWUOJ3F.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3CAAQQUB.js";
3
+ } from "./chunk-CMVDQ42N.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.61.0";
28
+ var version = "2.61.1";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3CAAQQUB.js";
3
+ } from "./chunk-CMVDQ42N.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.61.0";
160
+ var version = "2.61.1";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -6,8 +6,8 @@ import {
6
6
  } from "./chunk-PLNJC7NZ.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-OEWPHKD6.js";
10
- import "./chunk-I2B6B3XZ.js";
9
+ } from "./chunk-MDWG55PH.js";
10
+ import "./chunk-RPWUOJ3F.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
@@ -15,7 +15,7 @@ import {
15
15
  import "./chunk-55D645EH.js";
16
16
  import {
17
17
  VERSION
18
- } from "./chunk-3CAAQQUB.js";
18
+ } from "./chunk-CMVDQ42N.js";
19
19
  import {
20
20
  getProjectOutDir,
21
21
  isAuthEnabled,
@@ -3,32 +3,17 @@ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
3
  import Chat from '@enterprise/eventcatalog-chat/components/Chat';
4
4
  import { getChatPromptsGroupedByCategory } from '@enterprise/eventcatalog-chat/utils/chat-prompts';
5
5
  import config from '@config';
6
- import path from 'node:path';
7
- import fs from 'node:fs';
8
6
  import { Code } from 'astro-expressive-code/components';
9
7
  import { getDomains } from '@utils/collections/domains';
10
8
  import { getEvents } from '@utils/events';
11
9
  import { getCommands } from '@utils/commands';
12
10
  import { getServices } from '@utils/collections/services';
13
11
  import { getQueries } from '@utils/queries';
14
- import { getConfigurationForGivenGenerator } from '@utils/generators';
15
12
 
16
13
  const isEnabled = config.chat?.enabled || false;
17
14
  const chatConfig = config.chat || {};
18
15
  const output = config.output || 'static';
19
16
 
20
- const aiGeneratorConfig = getConfigurationForGivenGenerator('@eventcatalog/generator-ai');
21
- let embeddingModel = aiGeneratorConfig?.embedding?.model || 'all-MiniLM-L6-v2';
22
-
23
- if (aiGeneratorConfig?.embedding?.provider === 'openai') {
24
- embeddingModel = aiGeneratorConfig?.embedding?.model || 'text-embedding-3-large';
25
- }
26
-
27
- const PROJECT_DIR = path.resolve(process.env.PROJECT_DIR || process.cwd());
28
- const GENERATED_AI_DIR = path.resolve(PROJECT_DIR, 'public/ai');
29
-
30
- const directoryExists = fs.existsSync(GENERATED_AI_DIR);
31
-
32
17
  // Get all information for the mention input
33
18
  const [events, commands, queries, services, domains] = await Promise.all([
34
19
  getEvents({ getAllVersions: false }),
@@ -42,73 +27,25 @@ const allItems = [...events, ...commands, ...queries, ...services, ...domains];
42
27
  const chatPrompts = await getChatPromptsGroupedByCategory();
43
28
 
44
29
  const resources = allItems.map((item) => ({ id: item.data.id, type: item.collection, name: item.data.name }));
45
-
46
- const generatorConfig = `
47
- generators: [
48
- [
49
- "@eventcatalog/generator-ai", {
50
- // If you want to chunk files into smaller chunks, set this to true
51
- splitMarkdownFiles: true
52
- }
53
- ],
54
- ],
55
- `;
56
30
  ---
57
31
 
58
32
  <VerticalSideBarLayout title="AI Chat">
59
33
  <div class="flex h-[calc(100vh-60px)] bg-white">
60
34
  {
61
35
  isEnabled ? (
62
- directoryExists ? (
63
- <>
64
- <div id="chatContainer" class="w-full">
65
- <Chat
66
- client:only="react"
67
- chatConfig={{
68
- ...chatConfig,
69
- embeddingModel,
70
- }}
71
- resources={resources}
72
- chatPrompts={chatPrompts}
73
- output={output as 'static' | 'server'}
74
- />
75
- </div>
76
- </>
77
- ) : (
78
- <div class="flex items-center justify-center w-full p-4 sm:p-8">
79
- <div class="max-w-2xl text-center">
80
- <h2 class="text-2xl font-bold text-gray-900 mb-4">EventCatalog AI Assistant Setup Required</h2>
81
- <p class="text-gray-600 mb-6">
82
- To use the AI Assistant, you need to generate the AI data first.
83
- <br />
84
- Please install the plugin and run the generator command to generate the AI data.
85
- </p>
86
-
87
- <div class="text-left space-y-4">
88
- <div class="space-y-2">
89
- <h2 class="text-lg font-semibold text-left">1. Install the generator</h2>
90
- <Code code={`npm i @eventcatalog/generator-ai`} lang="bash" frame="terminal" />
91
- </div>
92
-
93
- <div class="space-y-2">
94
- <h2 class="text-lg font-semibold text-left">2. Configure the generator</h2>
95
- <Code code={generatorConfig} lang="javascript" frame="terminal" title="eventcatalog.config.js" />
96
- </div>
97
-
98
- <div class="space-y-2">
99
- <h2 class="text-lg font-semibold text-left">3. Generate the AI data</h2>
100
- <Code code={`npm run generate`} lang="bash" frame="none" />
101
- </div>
102
- <p class="text-gray-600 text-sm mt-2">
103
- After running the generator, a new folder called <code class="bg-gray-100 p-1 rounded-md">generated-ai</code>{' '}
104
- will be created in your project.
105
- </p>
106
-
107
- <p class="text-gray-600 text-sm mt-2">Once done, refresh this page.</p>
108
- </div>
109
- </div>
36
+ <>
37
+ <div id="chatContainer" class="w-full">
38
+ <Chat
39
+ client:only="react"
40
+ chatConfig={{
41
+ ...chatConfig,
42
+ }}
43
+ resources={resources}
44
+ chatPrompts={chatPrompts}
45
+ output={output as 'static' | 'server'}
46
+ />
110
47
  </div>
111
- )
48
+ </>
112
49
  ) : (
113
50
  <div class="flex items-center justify-center w-full p-4 sm:p-8">
114
51
  <div class="max-w-6xl flex flex-col md:flex-row gap-8 md:gap-12 items-center">
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.61.0",
9
+ "version": "2.61.1",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -26,10 +26,10 @@
26
26
  "@ai-sdk/openai": "^2.0.42",
27
27
  "@ai-sdk/react": "^2.0.60",
28
28
  "@ai-sdk/rsc": "^1.0.60",
29
- "@astrojs/markdown-remark": "^6.3.6",
30
- "@astrojs/mdx": "^4.3.5",
31
- "@astrojs/node": "^9.4.3",
32
- "@astrojs/react": "^4.3.1",
29
+ "@astrojs/markdown-remark": "^6.3.7",
30
+ "@astrojs/mdx": "^4.3.6",
31
+ "@astrojs/node": "^9.4.4",
32
+ "@astrojs/react": "^4.4.0",
33
33
  "@astrojs/rss": "^4.0.12",
34
34
  "@astrojs/tailwind": "^6.0.2",
35
35
  "@asyncapi/avro-schema-parser": "^3.0.24",
@@ -56,7 +56,7 @@
56
56
  "@tanstack/react-table": "^8.17.3",
57
57
  "@xyflow/react": "^12.3.6",
58
58
  "ai": "^5.0.60",
59
- "astro": "^5.13.8",
59
+ "astro": "^5.14.1",
60
60
  "astro-compress": "^2.3.8",
61
61
  "astro-expressive-code": "^0.41.3",
62
62
  "astro-seo": "^0.8.4",