@eventcatalog/core 2.24.0 → 2.24.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.24.0";
40
+ var version = "2.24.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-RX5LWHVR.js";
4
- import "../chunk-BV5L5YQN.js";
3
+ } from "../chunk-XDRFRTPG.js";
4
+ import "../chunk-XBPWZJUU.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.24.0";
109
+ var version = "2.24.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-O4U4YIV4.js";
4
- import "../chunk-RX5LWHVR.js";
5
- import "../chunk-BV5L5YQN.js";
3
+ } from "../chunk-TGASC7WJ.js";
4
+ import "../chunk-XDRFRTPG.js";
5
+ import "../chunk-XBPWZJUU.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-RX5LWHVR.js";
3
+ } from "./chunk-XDRFRTPG.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.24.0";
2
+ var version = "2.24.1";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-BV5L5YQN.js";
3
+ } from "./chunk-XBPWZJUU.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.24.0";
28
+ var version = "2.24.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-BV5L5YQN.js";
3
+ } from "./chunk-XBPWZJUU.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
161
161
  var import_os = __toESM(require("os"), 1);
162
162
 
163
163
  // package.json
164
- var version = "2.24.0";
164
+ var version = "2.24.1";
165
165
 
166
166
  // src/constants.ts
167
167
  var VERSION = version;
@@ -6,14 +6,14 @@ import {
6
6
  } from "./chunk-OW2FQPYP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-O4U4YIV4.js";
10
- import "./chunk-RX5LWHVR.js";
9
+ } from "./chunk-TGASC7WJ.js";
10
+ import "./chunk-XDRFRTPG.js";
11
11
  import {
12
12
  catalogToAstro
13
13
  } from "./chunk-CXKIF3EI.js";
14
14
  import {
15
15
  VERSION
16
- } from "./chunk-BV5L5YQN.js";
16
+ } from "./chunk-XBPWZJUU.js";
17
17
  import {
18
18
  isBackstagePluginEnabled
19
19
  } from "./chunk-XMDPVKIJ.js";
@@ -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 = ({ catalogPath }: { catalogPath: string }) => {
5
+ const Chat = () => {
6
6
  return (
7
7
  <ChatProvider>
8
8
  <div className="flex overflow-hidden w-full">
9
9
  <Sidebar />
10
- <ChatWindow catalogPath={catalogPath} />
10
+ <ChatWindow />
11
11
  </div>
12
12
  </ChatProvider>
13
13
  );
@@ -5,7 +5,7 @@ import { CreateWebWorkerMLCEngine, type InitProgressReport } from '@mlc-ai/web-l
5
5
  import { useChat } from './hooks/ChatProvider';
6
6
  import config from '@config';
7
7
 
8
- const ChatWindow = ({ catalogPath }: { catalogPath: string }) => {
8
+ const ChatWindow = () => {
9
9
  const [loading, setLoading] = useState(true);
10
10
  const [loadingProgress, setLoadingProgress] = useState(0);
11
11
  const [engine, setEngine] = useState<any>(null);
@@ -236,7 +236,7 @@ const ChatWindow = ({ catalogPath }: { catalogPath: string }) => {
236
236
 
237
237
  const importDocuments = async () => {
238
238
  const worker = new Worker(new URL('./workers/document-importer.ts', import.meta.url), { type: 'module' });
239
- worker.postMessage({ init: true, catalogPath });
239
+ worker.postMessage({ init: true });
240
240
  setVectorWorker(worker);
241
241
  };
242
242
 
@@ -13,15 +13,12 @@ self.onmessage = async (event) => {
13
13
  try {
14
14
  // Initialize the vector store
15
15
  if (event?.data?.init && !documents && !embeddings) {
16
- const documentsImport = await import(/* @vite-ignore */ `${event.data.catalogPath}/generated-ai/documents.json`);
17
- const embeddingsImport = await import(/* @vite-ignore */ `${event.data.catalogPath}/generated-ai/embeddings.json`);
16
+ const documentsImport = await fetch(`/generated/ai/documents.json`);
17
+ const embeddingsImport = await fetch(`/generated/ai/embeddings.json`);
18
18
 
19
- console.log('Loading documents and embeddings');
20
- console.log(documentsImport);
21
- console.log(embeddingsImport);
19
+ documents = await documentsImport.json();
20
+ embeddings = await embeddingsImport.json();
22
21
 
23
- documents = documentsImport.default;
24
- embeddings = embeddingsImport.default;
25
22
  await vectorStore.addVectors(embeddings, documents);
26
23
  }
27
24
 
@@ -33,6 +30,7 @@ self.onmessage = async (event) => {
33
30
  const results = await vectorStore.similaritySearchWithScore(event.data.input, 10);
34
31
  postMessage({ results: results, action: 'search-results' });
35
32
  } catch (error) {
33
+ console.log(error);
36
34
  self.postMessage({ error: (error as Error).message });
37
35
  }
38
36
  };
@@ -10,7 +10,7 @@ import { Code } from 'astro-expressive-code/components';
10
10
  const isEnabled = config.chat?.enabled || false;
11
11
 
12
12
  const PROJECT_DIR = path.resolve(process.env.PROJECT_DIR || process.cwd());
13
- const GENERATED_AI_DIR = path.resolve(PROJECT_DIR, 'generated-ai');
13
+ const GENERATED_AI_DIR = path.resolve(PROJECT_DIR, 'public/ai');
14
14
 
15
15
  const directoryExists = fs.existsSync(GENERATED_AI_DIR);
16
16
 
@@ -31,7 +31,7 @@ const generatorConfig = `
31
31
  {
32
32
  isEnabled ? (
33
33
  directoryExists ? (
34
- <Chat client:only="react" catalogPath={PROJECT_DIR} />
34
+ <Chat client:only="react" />
35
35
  ) : (
36
36
  <div class="flex items-center justify-center w-full p-4 sm:p-8">
37
37
  <div class="max-w-2xl text-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.24.0",
9
+ "version": "2.24.1",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -115,6 +115,7 @@
115
115
  "preview": "astro preview",
116
116
  "astro": "astro",
117
117
  "start:catalog": "node scripts/start-catalog-locally.js",
118
+ "preview:catalog": "node scripts/preview-catalog-locally.js",
118
119
  "generate:catalog": "node scripts/generate-catalog-locally.js",
119
120
  "verify-build:catalog": "rimraf dist && pnpm run build:cd",
120
121
  "changeset": "changeset",