@eventcatalog/core 2.34.7 → 2.35.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.
Files changed (54) hide show
  1. package/README.md +2 -1
  2. package/dist/analytics/analytics.cjs +1 -1
  3. package/dist/analytics/analytics.js +2 -2
  4. package/dist/analytics/log-build.cjs +1 -1
  5. package/dist/analytics/log-build.js +3 -3
  6. package/dist/{chunk-RHCB6E6X.js → chunk-DGRAYXHN.js} +1 -1
  7. package/dist/{chunk-ZPWE3CVX.js → chunk-HDG7YSFG.js} +9 -0
  8. package/dist/{chunk-F22TOAQN.js → chunk-J4VCEL32.js} +1 -1
  9. package/dist/{chunk-Y6K4D4LS.js → chunk-LP6AXVOF.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/eventcatalog.cjs +21 -2
  13. package/dist/eventcatalog.config.d.cts +1 -0
  14. package/dist/eventcatalog.config.d.ts +1 -0
  15. package/dist/eventcatalog.js +22 -6
  16. package/dist/features.cjs +44 -2
  17. package/dist/features.d.cts +2 -1
  18. package/dist/features.d.ts +2 -1
  19. package/dist/features.js +6 -3
  20. package/eventcatalog/astro.config.mjs +8 -2
  21. package/eventcatalog/src/components/Lists/ProtocolList.tsx +1 -1
  22. package/eventcatalog/src/components/SideBars/ChannelSideBar.astro +3 -3
  23. package/eventcatalog/src/components/SideBars/DomainSideBar.astro +1 -1
  24. package/eventcatalog/src/components/SideBars/FlowSideBar.astro +2 -2
  25. package/eventcatalog/src/components/SideBars/MessageSideBar.astro +5 -5
  26. package/eventcatalog/src/components/SideBars/ServiceSideBar.astro +2 -2
  27. package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +1 -2
  28. package/eventcatalog/src/content.config.ts +13 -2
  29. package/eventcatalog/src/enterprise/collections/chat-prompts.ts +32 -0
  30. package/eventcatalog/src/enterprise/collections/custom-pages.ts +12 -15
  31. package/eventcatalog/src/enterprise/collections/index.ts +2 -0
  32. package/eventcatalog/src/enterprise/custom-documentation/collection.ts +1 -1
  33. package/eventcatalog/src/enterprise/eventcatalog-chat/EventCatalogVectorStore.ts +50 -0
  34. package/eventcatalog/src/enterprise/eventcatalog-chat/components/Chat.tsx +50 -0
  35. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatMessage.tsx +231 -0
  36. package/eventcatalog/src/enterprise/eventcatalog-chat/components/InputModal.tsx +233 -0
  37. package/eventcatalog/src/enterprise/eventcatalog-chat/components/MentionInput.tsx +211 -0
  38. package/eventcatalog/src/enterprise/eventcatalog-chat/components/WelcomePromptArea.tsx +88 -0
  39. package/eventcatalog/src/enterprise/{ai-assistant/components/ChatWindow.tsx → eventcatalog-chat/components/windows/ChatWindow.client.tsx} +3 -5
  40. package/eventcatalog/src/enterprise/eventcatalog-chat/components/windows/ChatWindow.server.tsx +499 -0
  41. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/api/ai/chat.ts +56 -0
  42. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/api/ai/resources.ts +42 -0
  43. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/chat/index.astro +189 -0
  44. package/eventcatalog/src/enterprise/eventcatalog-chat/utils/ai.ts +151 -0
  45. package/eventcatalog/src/enterprise/eventcatalog-chat/utils/chat-prompts.ts +50 -0
  46. package/eventcatalog/src/pages/chat/index.astro +2 -168
  47. package/eventcatalog/src/types/react-syntax-highlighter.d.ts +1 -0
  48. package/package.json +8 -1
  49. package/eventcatalog/src/enterprise/ai-assistant/components/Chat.tsx +0 -16
  50. /package/eventcatalog/src/{shared-collections.ts → content.config-shared-collections.ts} +0 -0
  51. /package/eventcatalog/src/enterprise/{ai-assistant → eventcatalog-chat}/components/ChatSidebar.tsx +0 -0
  52. /package/eventcatalog/src/enterprise/{ai-assistant → eventcatalog-chat}/components/hooks/ChatProvider.tsx +0 -0
  53. /package/eventcatalog/src/enterprise/{ai-assistant → eventcatalog-chat}/components/workers/document-importer.ts +0 -0
  54. /package/eventcatalog/src/enterprise/{ai-assistant → eventcatalog-chat}/components/workers/engine.ts +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
- [![All Contributors](https://img.shields.io/badge/all_contributors-53-orange.svg?style=flat-square)](#contributors-)
37
+ [![All Contributors](https://img.shields.io/badge/all_contributors-54-orange.svg?style=flat-square)](#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)
@@ -264,6 +264,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
264
264
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/vienin"><img src="https://avatars.githubusercontent.com/u/2124283?v=4?s=100" width="100px;" alt="Kevin Pouget"/><br /><sub><b>Kevin Pouget</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=vienin" title="Code">💻</a></td>
265
265
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/VitaliiBalash"><img src="https://avatars.githubusercontent.com/u/4520809?v=4?s=100" width="100px;" alt="Vitalii Balash"/><br /><sub><b>Vitalii Balash</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=VitaliiBalash" title="Code">💻</a></td>
266
266
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/ababilone"><img src="https://avatars.githubusercontent.com/u/925013?v=4?s=100" width="100px;" alt="Arnaud Babilone"/><br /><sub><b>Arnaud Babilone</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=ababilone" title="Code">💻</a></td>
267
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/alexanderhorner"><img src="https://avatars.githubusercontent.com/u/18349361?v=4?s=100" width="100px;" alt="Alexander Horner"/><br /><sub><b>Alexander Horner</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=alexanderhorner" title="Code">💻</a></td>
267
268
  </tr>
268
269
  </tbody>
269
270
  </table>
@@ -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.34.7";
40
+ var version = "2.35.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-RHCB6E6X.js";
4
- import "../chunk-F22TOAQN.js";
3
+ } from "../chunk-DGRAYXHN.js";
4
+ import "../chunk-J4VCEL32.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.34.7";
109
+ var version = "2.35.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-Y6K4D4LS.js";
4
- import "../chunk-RHCB6E6X.js";
5
- import "../chunk-F22TOAQN.js";
3
+ } from "../chunk-LP6AXVOF.js";
4
+ import "../chunk-DGRAYXHN.js";
5
+ import "../chunk-J4VCEL32.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
  VERSION
3
- } from "./chunk-F22TOAQN.js";
3
+ } from "./chunk-J4VCEL32.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,5 +1,13 @@
1
+ import {
2
+ getEventCatalogConfigFile
3
+ } from "./chunk-E7TXTI7G.js";
4
+
1
5
  // src/features.ts
2
6
  import boxen from "boxen";
7
+ var isOutputServer = async () => {
8
+ const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
9
+ return config?.output === "server";
10
+ };
3
11
  var isBackstagePluginEnabled = async (licenseKey) => {
4
12
  const LICENSE_KEY = process.env.EVENTCATALOG_LICENSE_KEY_BACKSTAGE || process.env.EVENTCATALOG_SCALE_LICENSE_KEY || null;
5
13
  const acceptedPlugins = ["@eventcatalog/backstage-plugin-eventcatalog", "@eventcatalog/eventcatalog-scale"];
@@ -129,6 +137,7 @@ var isEventCatalogStarterEnabled = async (licenseKey) => {
129
137
  };
130
138
 
131
139
  export {
140
+ isOutputServer,
132
141
  isBackstagePluginEnabled,
133
142
  isEventCatalogScaleEnabled,
134
143
  isEventCatalogStarterEnabled
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.34.7";
2
+ var version = "2.35.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-RHCB6E6X.js";
3
+ } from "./chunk-DGRAYXHN.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.34.7";
28
+ var version = "2.35.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-F22TOAQN.js";
3
+ } from "./chunk-J4VCEL32.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.34.7";
160
+ var version = "2.35.1";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -473,6 +473,10 @@ var import_boxen2 = __toESM(require("boxen"), 1);
473
473
 
474
474
  // src/features.ts
475
475
  var import_boxen = __toESM(require("boxen"), 1);
476
+ var isOutputServer = async () => {
477
+ const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
478
+ return config?.output === "server";
479
+ };
476
480
  var isBackstagePluginEnabled = async (licenseKey) => {
477
481
  const LICENSE_KEY = process.env.EVENTCATALOG_LICENSE_KEY_BACKSTAGE || process.env.EVENTCATALOG_SCALE_LICENSE_KEY || null;
478
482
  const acceptedPlugins = ["@eventcatalog/backstage-plugin-eventcatalog", "@eventcatalog/eventcatalog-scale"];
@@ -636,6 +640,18 @@ var copyCore = () => {
636
640
  }
637
641
  });
638
642
  };
643
+ var copyServerFiles = async () => {
644
+ const isServerOutput = await isOutputServer();
645
+ if (import_fs2.default.existsSync((0, import_node_path6.join)(core, "src/pages/api/server"))) {
646
+ import_fs2.default.rmSync((0, import_node_path6.join)(core, "src/pages/api/server"), { recursive: true });
647
+ }
648
+ if (!isServerOutput) {
649
+ return;
650
+ }
651
+ import_fs2.default.cpSync((0, import_node_path6.join)(eventCatalogDir, "src/enterprise/eventcatalog-chat/pages/api"), (0, import_node_path6.join)(core, "src/pages/api/server"), {
652
+ recursive: true
653
+ });
654
+ };
639
655
  var clearCore = () => {
640
656
  if (import_fs2.default.existsSync(core)) import_fs2.default.rmSync(core, { recursive: true });
641
657
  };
@@ -679,6 +695,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
679
695
  await resolve_catalog_dependencies_default(dir, core);
680
696
  await checkAndConvertMdToMdx(dir, core);
681
697
  await catalogToAstro(dir, core);
698
+ await copyServerFiles();
682
699
  const canEmbedPages = await isBackstagePluginEnabled();
683
700
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
684
701
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
@@ -725,6 +742,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
725
742
  program.command("build").description("Run build of EventCatalog").action(async (options, command) => {
726
743
  console.log("Building EventCatalog...");
727
744
  copyCore();
745
+ await copyServerFiles();
728
746
  const canEmbedPages = await isBackstagePluginEnabled();
729
747
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
730
748
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
@@ -738,7 +756,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
738
756
  await catalogToAstro(dir, core);
739
757
  checkForUpdate();
740
758
  const windowsCommand = `npx astro build ${command.args.join(" ").trim()} | findstr /V "The collection"`;
741
- const unixCommand = `npx astro build ${command.args.join(" ").trim()} 2>&1 | grep -v "The collection.*does not exist"`;
759
+ const unixCommand = `bash -c "set -o pipefail; npx astro build ${command.args.join(" ").trim()} 2>&1 | grep -v \\"The collection.*does not exist\\""`;
742
760
  const buildCommand = process.platform === "win32" ? windowsCommand : unixCommand;
743
761
  (0, import_node_child_process.execSync)(
744
762
  `cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} ${buildCommand}`,
@@ -767,6 +785,7 @@ program.command("preview").description("Serves the contents of your eventcatalog
767
785
  const canEmbedPages = await isBackstagePluginEnabled();
768
786
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
769
787
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
788
+ await copyServerFiles();
770
789
  previewCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
771
790
  });
772
791
  program.command("start").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
@@ -41,6 +41,7 @@ interface Config {
41
41
  base?: string;
42
42
  port?: string;
43
43
  trailingSlash?: boolean;
44
+ output?: 'server' | 'static';
44
45
  rss?: {
45
46
  enabled: boolean;
46
47
  limit: number;
@@ -41,6 +41,7 @@ interface Config {
41
41
  base?: string;
42
42
  port?: string;
43
43
  trailingSlash?: boolean;
44
+ output?: 'server' | 'static';
44
45
  rss?: {
45
46
  enabled: boolean;
46
47
  limit: number;
@@ -6,20 +6,21 @@ import {
6
6
  } from "./chunk-UKJ7F5WR.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-Y6K4D4LS.js";
10
- import "./chunk-RHCB6E6X.js";
9
+ } from "./chunk-LP6AXVOF.js";
10
+ import "./chunk-DGRAYXHN.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
14
14
  } from "./chunk-7SI5EVOX.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-F22TOAQN.js";
17
+ } from "./chunk-J4VCEL32.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
21
- isEventCatalogStarterEnabled
22
- } from "./chunk-ZPWE3CVX.js";
21
+ isEventCatalogStarterEnabled,
22
+ isOutputServer
23
+ } from "./chunk-HDG7YSFG.js";
23
24
  import {
24
25
  generate
25
26
  } from "./chunk-YEQVKHST.js";
@@ -69,6 +70,18 @@ var copyCore = () => {
69
70
  }
70
71
  });
71
72
  };
73
+ var copyServerFiles = async () => {
74
+ const isServerOutput = await isOutputServer();
75
+ if (fs.existsSync(join(core, "src/pages/api/server"))) {
76
+ fs.rmSync(join(core, "src/pages/api/server"), { recursive: true });
77
+ }
78
+ if (!isServerOutput) {
79
+ return;
80
+ }
81
+ fs.cpSync(join(eventCatalogDir, "src/enterprise/eventcatalog-chat/pages/api"), join(core, "src/pages/api/server"), {
82
+ recursive: true
83
+ });
84
+ };
72
85
  var clearCore = () => {
73
86
  if (fs.existsSync(core)) fs.rmSync(core, { recursive: true });
74
87
  };
@@ -112,6 +125,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
112
125
  await resolve_catalog_dependencies_default(dir, core);
113
126
  await checkAndConvertMdToMdx(dir, core);
114
127
  await catalogToAstro(dir, core);
128
+ await copyServerFiles();
115
129
  const canEmbedPages = await isBackstagePluginEnabled();
116
130
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
117
131
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
@@ -158,6 +172,7 @@ program.command("dev").description("Run development server of EventCatalog").opt
158
172
  program.command("build").description("Run build of EventCatalog").action(async (options, command) => {
159
173
  console.log("Building EventCatalog...");
160
174
  copyCore();
175
+ await copyServerFiles();
161
176
  const canEmbedPages = await isBackstagePluginEnabled();
162
177
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
163
178
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
@@ -171,7 +186,7 @@ program.command("build").description("Run build of EventCatalog").action(async (
171
186
  await catalogToAstro(dir, core);
172
187
  checkForUpdate();
173
188
  const windowsCommand = `npx astro build ${command.args.join(" ").trim()} | findstr /V "The collection"`;
174
- const unixCommand = `npx astro build ${command.args.join(" ").trim()} 2>&1 | grep -v "The collection.*does not exist"`;
189
+ const unixCommand = `bash -c "set -o pipefail; npx astro build ${command.args.join(" ").trim()} 2>&1 | grep -v \\"The collection.*does not exist\\""`;
175
190
  const buildCommand = process.platform === "win32" ? windowsCommand : unixCommand;
176
191
  execSync(
177
192
  `cross-env PROJECT_DIR='${dir}' CATALOG_DIR='${core}' ENABLE_EMBED=${canEmbedPages} EVENTCATALOG_STARTER=${isEventCatalogStarter} EVENTCATALOG_SCALE=${isEventCatalogScale} ${buildCommand}`,
@@ -200,6 +215,7 @@ program.command("preview").description("Serves the contents of your eventcatalog
200
215
  const canEmbedPages = await isBackstagePluginEnabled();
201
216
  const isEventCatalogStarter = await isEventCatalogStarterEnabled();
202
217
  const isEventCatalogScale = await isEventCatalogScaleEnabled();
218
+ await copyServerFiles();
203
219
  previewCatalog({ command, canEmbedPages, isEventCatalogStarter, isEventCatalogScale });
204
220
  });
205
221
  program.command("start").description("Serves the contents of your eventcatalog build directory").action(async (options, command) => {
package/dist/features.cjs CHANGED
@@ -32,10 +32,51 @@ var features_exports = {};
32
32
  __export(features_exports, {
33
33
  isBackstagePluginEnabled: () => isBackstagePluginEnabled,
34
34
  isEventCatalogScaleEnabled: () => isEventCatalogScaleEnabled,
35
- isEventCatalogStarterEnabled: () => isEventCatalogStarterEnabled
35
+ isEventCatalogStarterEnabled: () => isEventCatalogStarterEnabled,
36
+ isOutputServer: () => isOutputServer
36
37
  });
37
38
  module.exports = __toCommonJS(features_exports);
38
39
  var import_boxen = __toESM(require("boxen"), 1);
40
+
41
+ // src/eventcatalog-config-file-utils.js
42
+ var import_promises = require("fs/promises");
43
+ var import_node_fs = require("fs");
44
+ var import_promises2 = require("fs/promises");
45
+ var import_node_path = __toESM(require("path"), 1);
46
+ var import_uuid = require("uuid");
47
+ var import_url = require("url");
48
+ var import_gray_matter = __toESM(require("gray-matter"), 1);
49
+ async function cleanup(projectDirectory) {
50
+ const filePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
51
+ if ((0, import_node_fs.existsSync)(filePath)) {
52
+ await (0, import_promises.rm)(filePath);
53
+ }
54
+ }
55
+ var getEventCatalogConfigFile = async (projectDirectory) => {
56
+ try {
57
+ let configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.js");
58
+ const filePath = import_node_path.default.join(projectDirectory, "package.json");
59
+ const packageJson = JSON.parse(await (0, import_promises.readFile)(filePath, "utf-8"));
60
+ if (packageJson?.type !== "module") {
61
+ await (0, import_promises2.copyFile)(configFilePath, import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs"));
62
+ configFilePath = import_node_path.default.join(projectDirectory, "eventcatalog.config.mjs");
63
+ }
64
+ const configFileURL = (0, import_url.pathToFileURL)(configFilePath).href;
65
+ const config = await import(
66
+ /* @vite-ignore */
67
+ configFileURL
68
+ );
69
+ return config.default;
70
+ } finally {
71
+ await cleanup(projectDirectory);
72
+ }
73
+ };
74
+
75
+ // src/features.ts
76
+ var isOutputServer = async () => {
77
+ const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
78
+ return config?.output === "server";
79
+ };
39
80
  var isBackstagePluginEnabled = async (licenseKey) => {
40
81
  const LICENSE_KEY = process.env.EVENTCATALOG_LICENSE_KEY_BACKSTAGE || process.env.EVENTCATALOG_SCALE_LICENSE_KEY || null;
41
82
  const acceptedPlugins = ["@eventcatalog/backstage-plugin-eventcatalog", "@eventcatalog/eventcatalog-scale"];
@@ -167,5 +208,6 @@ var isEventCatalogStarterEnabled = async (licenseKey) => {
167
208
  0 && (module.exports = {
168
209
  isBackstagePluginEnabled,
169
210
  isEventCatalogScaleEnabled,
170
- isEventCatalogStarterEnabled
211
+ isEventCatalogStarterEnabled,
212
+ isOutputServer
171
213
  });
@@ -1,5 +1,6 @@
1
+ declare const isOutputServer: () => Promise<boolean>;
1
2
  declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
2
3
  declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
3
4
  declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
4
5
 
5
- export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled };
6
+ export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled, isOutputServer };
@@ -1,5 +1,6 @@
1
+ declare const isOutputServer: () => Promise<boolean>;
1
2
  declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
2
3
  declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
3
4
  declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
4
5
 
5
- export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled };
6
+ export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled, isOutputServer };
package/dist/features.js CHANGED
@@ -1,10 +1,13 @@
1
1
  import {
2
2
  isBackstagePluginEnabled,
3
3
  isEventCatalogScaleEnabled,
4
- isEventCatalogStarterEnabled
5
- } from "./chunk-ZPWE3CVX.js";
4
+ isEventCatalogStarterEnabled,
5
+ isOutputServer
6
+ } from "./chunk-HDG7YSFG.js";
7
+ import "./chunk-E7TXTI7G.js";
6
8
  export {
7
9
  isBackstagePluginEnabled,
8
10
  isEventCatalogScaleEnabled,
9
- isEventCatalogStarterEnabled
11
+ isEventCatalogStarterEnabled,
12
+ isOutputServer
10
13
  };
@@ -7,7 +7,7 @@ import { mermaid } from "./src/remark-plugins/mermaid"
7
7
  import { join } from 'node:path';
8
8
  import remarkDirective from 'remark-directive';
9
9
  import { remarkDirectives } from "./src/remark-plugins/directives"
10
-
10
+ import node from '@astrojs/node';
11
11
  import remarkComment from 'remark-comment'
12
12
 
13
13
  /** @type {import('bin/eventcatalog.config').Config} */
@@ -22,6 +22,12 @@ export default defineConfig({
22
22
  base,
23
23
  server: { port: config.port || 3000 },
24
24
 
25
+ // output: config.output || 'static',
26
+
27
+ adapter: config.output === 'server' ? node({
28
+ mode: 'standalone'
29
+ }) : undefined,
30
+
25
31
  outDir: config.outDir ? join(projectDirectory, config.outDir) : join(projectDirectory, 'dist'),
26
32
 
27
33
  // https://docs.astro.build/en/reference/configuration-reference/#site
@@ -47,7 +53,7 @@ export default defineConfig({
47
53
  wrap: true,
48
54
  },
49
55
  }),
50
-
56
+
51
57
  mdx({
52
58
  // https://docs.astro.build/en/guides/integrations-guide/mdx/#optimize
53
59
  optimize: config.mdxOptimize || false,
@@ -41,7 +41,7 @@ const ProtocolList = ({ title, pills, emptyMessage, color = 'gray', ...props }:
41
41
  <div className="mx-auto w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5">
42
42
  <Disclosure as="div" className="pb-8" defaultOpen={pills.length <= 10}>
43
43
  <DisclosureButton className="group flex w-full items-center justify-start space-x-4">
44
- <span className="text-sm text-black group-data-[hover]:text-black/80 capitalize"> {title} </span>
44
+ <span className="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize"> {title} </span>
45
45
  <ChevronDownIcon className="size-5 ml-2 fill-black/60 group-data-[hover]:fill-black/50 group-data-[open]:rotate-180" />
46
46
  </DisclosureButton>
47
47
  <DisclosurePanel className="mt-2 text-sm/5 text-black/50">
@@ -80,7 +80,7 @@ const messageList = (channel.data.messages ?? []).map((p) => ({
80
80
  {
81
81
  channel.data.versions && (
82
82
  <VersionList
83
- title={`Channel versions (${channel.data.versions?.length})`}
83
+ title={`Versions (${channel.data.versions?.length})`}
84
84
  versions={channel.data.versions}
85
85
  collectionItem={channel}
86
86
  />
@@ -88,7 +88,7 @@ const messageList = (channel.data.messages ?? []).map((p) => ({
88
88
  }
89
89
 
90
90
  <OwnersList
91
- title={`Channel owners (${filteredOwners.length})`}
91
+ title={`Owners (${filteredOwners.length})`}
92
92
  owners={ownersList}
93
93
  emptyMessage={`This channel does not have any documented owners.`}
94
94
  client:load
@@ -102,7 +102,7 @@ const messageList = (channel.data.messages ?? []).map((p) => ({
102
102
 
103
103
  {
104
104
  paramsList.length > 0 && (
105
- <PillListFlat color="pink" title={`Channel parameters (${paramsList.length})`} pills={paramsList} client:load />
105
+ <PillListFlat color="pink" title={`Parameters (${paramsList.length})`} pills={paramsList} client:load />
106
106
  )
107
107
  }
108
108
 
@@ -167,7 +167,7 @@ const ownersList = filteredOwners.map((o) => ({
167
167
  )
168
168
  }
169
169
  <OwnersList
170
- title={`Domain owners (${ownersList.length})`}
170
+ title={`Owners (${ownersList.length})`}
171
171
  owners={ownersList}
172
172
  emptyMessage={`This domain does not have any documented owners.`}
173
173
  client:load
@@ -40,7 +40,7 @@ const isRSSEnabled = config.rss?.enabled;
40
40
  {flow.data.versions && <VersionList versions={flow.data.versions} collectionItem={flow} />}
41
41
 
42
42
  <OwnersList
43
- title={`Flow owners (${ownersList.length})`}
43
+ title={`Owners (${ownersList.length})`}
44
44
  owners={ownersList}
45
45
  emptyMessage={`This flow does not have any documented owners.`}
46
46
  client:load
@@ -49,7 +49,7 @@ const isRSSEnabled = config.rss?.enabled;
49
49
  {
50
50
  isRSSEnabled && (
51
51
  <div class="mx-auto pb-4 w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5 border-b border-gray-100 mb-4">
52
- <span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">Flow RSS Feed</span>
52
+ <span class="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize">Flow RSS Feed</span>
53
53
  <ul role="list" class="space-y-2 mt-2">
54
54
  <li class="has-tooltip rounded-md text-gray-600 group px-1 w-full hover:bg-gradient-to-l hover:from-purple-500 hover:to-purple-700 hover:text-white hover:font-normal ">
55
55
  <a class={`flex items-center space-x-2`} target="_blank" href={buildUrl(`/rss/flows/rss.xml`)}>
@@ -110,7 +110,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
110
110
  producerList.length > 0 && (
111
111
  <PillListFlat
112
112
  color="pink"
113
- title={`${type} Producers (${producerList.length})`}
113
+ title={`Producers (${producerList.length})`}
114
114
  pills={producerList}
115
115
  emptyMessage={getProducerEmptyMessage(type)}
116
116
  client:load
@@ -121,7 +121,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
121
121
  consumerList.length > 0 && (
122
122
  <PillListFlat
123
123
  color="pink"
124
- title={`${type} Consumers (${consumerList.length})`}
124
+ title={`Consumers (${consumerList.length})`}
125
125
  pills={consumerList}
126
126
  emptyMessage={getConsumerEmptyMessage(type)}
127
127
  client:load
@@ -137,7 +137,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
137
137
  {
138
138
  message.data.versions && (
139
139
  <VersionList
140
- title={`${type} versions (${message.data.versions?.length})`}
140
+ title={`Versions (${message.data.versions?.length})`}
141
141
  versions={message.data.versions}
142
142
  collectionItem={message}
143
143
  />
@@ -145,7 +145,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
145
145
  }
146
146
 
147
147
  <OwnersList
148
- title={`${type} owners (${ownersList.length})`}
148
+ title={`Owners (${ownersList.length})`}
149
149
  owners={ownersList}
150
150
  emptyMessage={`This ${type} does not have any documented owners.`}
151
151
  client:load
@@ -160,7 +160,7 @@ const schemaURL = path.join(publicPath, schemaFilePath || '');
160
160
  {
161
161
  isRSSEnabled && (
162
162
  <div class="mx-auto pb-8 w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5">
163
- <span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">{type} RSS Feed</span>
163
+ <span class="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize">{type} RSS Feed</span>
164
164
  <ul role="list" class="space-y-2 mt-2">
165
165
  <li class="has-tooltip rounded-md text-gray-600 group px-1 w-full hover:bg-gradient-to-l hover:from-purple-500 hover:to-purple-700 hover:text-white hover:font-normal ">
166
166
  <a class={`flex items-center space-x-2`} target="_blank" href={buildUrl(`/rss/${message.collection}/rss.xml`)}>
@@ -114,7 +114,7 @@ const schemaURL = join(publicPath, schemaFilePath || '');
114
114
  {service.data.specifications && <SpecificationsList collectionItem={service} />}
115
115
 
116
116
  <OwnersList
117
- title={`Service owners (${ownersList.length})`}
117
+ title={`Owners (${ownersList.length})`}
118
118
  owners={ownersList}
119
119
  emptyMessage={`This service does not have any documented owners.`}
120
120
  client:load
@@ -129,7 +129,7 @@ const schemaURL = join(publicPath, schemaFilePath || '');
129
129
  {
130
130
  isRSSEnabled && (
131
131
  <div class="mx-auto pb-4 w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5 border-b border-gray-100 mb-4">
132
- <span class="text-sm text-black group-data-[hover]:text-black/80 capitalize">Services RSS Feed</span>
132
+ <span class="text-sm text-black font-semibold group-data-[hover]:text-black/80 capitalize">Services RSS Feed</span>
133
133
  <ul role="list" class="space-y-2 mt-2">
134
134
  <li class="has-tooltip rounded-md text-gray-600 group px-1 w-full hover:bg-gradient-to-l hover:from-purple-500 hover:to-purple-700 hover:text-white hover:font-normal ">
135
135
  <a class={`flex items-center space-x-2`} target="_blank" href={buildUrl(`/rss/services/rss.xml`)}>
@@ -1,5 +1,4 @@
1
- import { ServerIcon } from '@heroicons/react/20/solid';
2
- import { RectangleGroupIcon } from '@heroicons/react/20/solid';
1
+ import { ServerIcon, RectangleGroupIcon } from '@heroicons/react/20/solid';
3
2
  import { createColumnHelper } from '@tanstack/react-table';
4
3
  import { filterByName, filterCollectionByName } from '../filters/custom-filters';
5
4
  import { buildUrl } from '@utils/url-builder';
@@ -1,8 +1,10 @@
1
1
  import { z, defineCollection, reference } from 'astro:content';
2
2
  import { glob } from 'astro/loaders';
3
3
  import { v4 as uuidv4 } from 'uuid';
4
- import { badge, ownerReference } from './shared-collections';
5
- import { customPagesSchema } from './enterprise/custom-documentation/collection';
4
+ import { badge, ownerReference } from './content.config-shared-collections';
5
+
6
+ // Enterprise Collections
7
+ import { chatPromptsSchema, customPagesSchema } from './enterprise/collections';
6
8
 
7
9
  export const projectDirBase = (() => {
8
10
  if (process.platform === 'win32') {
@@ -306,6 +308,14 @@ const customPages = defineCollection({
306
308
  schema: customPagesSchema,
307
309
  });
308
310
 
311
+ const chatPrompts = defineCollection({
312
+ loader: glob({
313
+ pattern: ['chat-prompts/*.(md|mdx)', 'chat-prompts/**/*.@(md|mdx)'],
314
+ base: projectDirBase,
315
+ }),
316
+ schema: chatPromptsSchema,
317
+ });
318
+
309
319
  const domains = defineCollection({
310
320
  loader: glob({
311
321
  pattern: [
@@ -432,4 +442,5 @@ export const collections = {
432
442
 
433
443
  // EventCatalog Pro Collections
434
444
  customPages,
445
+ chatPrompts,
435
446
  };
@@ -0,0 +1,32 @@
1
+ import { z } from 'astro:content';
2
+
3
+ export const chatPromptsSchema = z.object({
4
+ title: z.string(),
5
+ type: z.enum(['text', 'code']).default('text'),
6
+ inputs: z
7
+ .array(
8
+ z.object({
9
+ id: z.string(),
10
+ label: z.string(),
11
+ type: z
12
+ .enum([
13
+ 'text',
14
+ 'resource-list-events',
15
+ 'resource-list-services',
16
+ 'resource-list-commands',
17
+ 'resource-list-queries',
18
+ 'code',
19
+ 'text-area',
20
+ 'select',
21
+ ])
22
+ .default('text'),
23
+ options: z.array(z.string()).optional(),
24
+ })
25
+ )
26
+ .optional(),
27
+ category: z.object({
28
+ id: z.string(),
29
+ label: z.string(),
30
+ icon: z.string().optional(),
31
+ }),
32
+ });