@eventcatalog/core 3.30.0 → 3.31.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.
Files changed (70) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-Z26P4PCB.js → chunk-5VANHNV3.js} +1 -1
  6. package/dist/{chunk-RRBDF4MM.js → chunk-7FECQ5B3.js} +1 -1
  7. package/dist/{chunk-MVZKHUX2.js → chunk-DL3PF5MS.js} +1 -1
  8. package/dist/{chunk-6UG4JMUV.js → chunk-IPGFRHRL.js} +1 -1
  9. package/dist/{chunk-ATRBVTJ6.js → chunk-UOKUSIKW.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/eventcatalog.cjs +1 -1
  13. package/dist/eventcatalog.js +5 -5
  14. package/dist/generate.cjs +1 -1
  15. package/dist/generate.js +3 -3
  16. package/dist/utils/cli-logger.cjs +1 -1
  17. package/dist/utils/cli-logger.js +2 -2
  18. package/eventcatalog/astro.config.mjs +10 -6
  19. package/eventcatalog/public/logo.png +0 -0
  20. package/eventcatalog/src/components/CopyAsMarkdown.tsx +29 -24
  21. package/eventcatalog/src/components/MDX/Design/Design.astro +1 -1
  22. package/eventcatalog/src/components/MDX/Tiles/Tile.astro +11 -8
  23. package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +25 -18
  24. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +218 -0
  25. package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +265 -0
  26. package/eventcatalog/src/components/Settings/GeneralSettingsForm.tsx +371 -0
  27. package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +183 -0
  28. package/eventcatalog/src/components/Settings/LogoUpload.tsx +137 -0
  29. package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +91 -0
  30. package/eventcatalog/src/components/Settings/ReadOnlyBanner.tsx +18 -0
  31. package/eventcatalog/src/components/Settings/Row.tsx +59 -0
  32. package/eventcatalog/src/components/Settings/SettingsShared.tsx +176 -0
  33. package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +17 -18
  34. package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +45 -16
  35. package/eventcatalog/src/components/Tables/Discover/FilterComponents.tsx +2 -2
  36. package/eventcatalog/src/content.config.ts +1 -1
  37. package/eventcatalog/src/enterprise/auth/middleware/middleware-auth.ts +11 -7
  38. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +4 -4
  39. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +70 -57
  40. package/eventcatalog/src/enterprise/feature.ts +2 -1
  41. package/eventcatalog/src/layouts/SettingsLayout.astro +116 -0
  42. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +62 -23
  43. package/eventcatalog/src/pages/_index.astro +250 -255
  44. package/eventcatalog/src/pages/api/settings/ai.ts +57 -0
  45. package/eventcatalog/src/pages/api/settings/general.ts +71 -0
  46. package/eventcatalog/src/pages/api/settings/logo.ts +113 -0
  47. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +1 -1
  48. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +26 -32
  49. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +1 -1
  50. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +40 -31
  51. package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +1 -1
  52. package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +2 -26
  53. package/eventcatalog/src/pages/docs/llm/llms.txt.ts +5 -1
  54. package/eventcatalog/src/pages/docs/users/[id]/index.astro +1 -1
  55. package/eventcatalog/src/pages/settings/assistant.astro +37 -0
  56. package/eventcatalog/src/pages/settings/billing.astro +17 -0
  57. package/eventcatalog/src/pages/settings/general.astro +32 -0
  58. package/eventcatalog/src/pages/settings/index.astro +21 -0
  59. package/eventcatalog/src/pages/settings/llm-access.astro +34 -0
  60. package/eventcatalog/src/pages/settings/mcp.astro +14 -0
  61. package/eventcatalog/src/styles/theme.css +38 -29
  62. package/eventcatalog/src/styles/themes/forest.css +17 -9
  63. package/eventcatalog/src/styles/themes/ocean.css +10 -2
  64. package/eventcatalog/src/styles/themes/sapphire.css +10 -2
  65. package/eventcatalog/src/styles/themes/sunset.css +25 -17
  66. package/eventcatalog/src/utils/eventcatalog-config/config-schema.ts +49 -0
  67. package/eventcatalog/src/utils/eventcatalog-config/config-writer.ts +149 -0
  68. package/eventcatalog/src/utils/url-builder.ts +4 -2
  69. package/package.json +7 -5
  70. package/eventcatalog/src/pages/docs/llm/llms-services.txt.ts +0 -81
@@ -7,7 +7,9 @@ const cleanUrl = (url: string) => {
7
7
  // Custom URL builder as Astro does not support this stuff out the box
8
8
  export const buildUrl = (url: string, ignoreTrailingSlash = false, urlAlreadyIncludesBaseUrl = false) => {
9
9
  // Should a trailingSlash be added to urls?
10
- const trailingSlash = __EC_TRAILING_SLASH__;
10
+ // typeof guard protects against the rare case where Vite's `define` substitution
11
+ // didn't run (stale dev cache, edge SSR paths) — leaking the identifier to runtime would crash callers.
12
+ const trailingSlash = typeof __EC_TRAILING_SLASH__ !== 'undefined' ? __EC_TRAILING_SLASH__ : false;
11
13
 
12
14
  let newUrl = url;
13
15
 
@@ -53,7 +55,7 @@ export const buildEditUrlForResource = (editUrl: string, filePath: string) => {
53
55
 
54
56
  // Takes a given url and returns the .mdx url
55
57
  export const toMarkdownUrl = (url: string) => {
56
- const trailingSlash = __EC_TRAILING_SLASH__;
58
+ const trailingSlash = typeof __EC_TRAILING_SLASH__ !== 'undefined' ? __EC_TRAILING_SLASH__ : false;
57
59
 
58
60
  if (trailingSlash) {
59
61
  const urlWithoutTrailingSlash = url.replace(/\/$/, '');
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "3.30.0",
10
+ "version": "3.31.2",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -24,7 +24,7 @@
24
24
  "@ai-sdk/react": "^3.0.17",
25
25
  "@astrojs/markdown-remark": "^7.0.1",
26
26
  "@astrojs/mdx": "^5.0.2",
27
- "@astrojs/node": "^10.0.3",
27
+ "@astrojs/node": "^10.0.5",
28
28
  "@astrojs/react": "^5.0.1",
29
29
  "@astrojs/rss": "^4.0.18",
30
30
  "@asyncapi/avro-schema-parser": "3.0.24",
@@ -56,7 +56,7 @@
56
56
  "astro-expressive-code": "^0.41.7",
57
57
  "astro-seo": "^0.8.4",
58
58
  "auth-astro": "^4.2.0",
59
- "axios": "^1.13.5",
59
+ "axios": "^1.15.2",
60
60
  "boxen": "^8.0.1",
61
61
  "commander": "^12.1.0",
62
62
  "concurrently": "^8.2.2",
@@ -86,6 +86,7 @@
86
86
  "react-dom": "^18.3.1",
87
87
  "react-markdown": "^10.1.0",
88
88
  "react-syntax-highlighter": "^15.6.6",
89
+ "recast": "^0.23.11",
89
90
  "rehype-autolink-headings": "^7.1.0",
90
91
  "rehype-expressive-code": "^0.41.7",
91
92
  "rehype-slug": "^6.0.0",
@@ -95,6 +96,7 @@
95
96
  "rimraf": "^6.1.3",
96
97
  "semver": "7.6.3",
97
98
  "shelljs": "^0.9.0",
99
+ "sonner": "^2.0.7",
98
100
  "sql.js": "^1.12.0",
99
101
  "svg-pan-zoom": "^3.6.2",
100
102
  "tailwindcss": "^4.1.5",
@@ -104,8 +106,8 @@
104
106
  "uuid": "^10.0.0",
105
107
  "zod": "^4.3.6",
106
108
  "@eventcatalog/linter": "1.0.21",
107
- "@eventcatalog/visualiser": "^3.19.0",
108
- "@eventcatalog/sdk": "2.20.0"
109
+ "@eventcatalog/sdk": "2.20.0",
110
+ "@eventcatalog/visualiser": "^3.19.0"
109
111
  },
110
112
  "devDependencies": {
111
113
  "@astrojs/check": "^0.9.8",
@@ -1,81 +0,0 @@
1
- import { type CollectionEntry } from 'astro:content';
2
- import type { APIRoute } from 'astro';
3
-
4
- import { getServices } from '@utils/collections/services';
5
-
6
- const services = await getServices();
7
-
8
- export const GET: APIRoute = async ({ params, request }) => {
9
- const url = new URL(request.url);
10
- const baseUrl = process.env.LLMS_TXT_BASE_URL || `${url.origin}`;
11
-
12
- const formatServiceWithLinks = (service: CollectionEntry<'services'>) => {
13
- const sends = service.data.sends as unknown as CollectionEntry<'events'>[];
14
- const receives = service.data.receives as unknown as CollectionEntry<'events'>[];
15
- const writesTo = service.data.writesTo as unknown as CollectionEntry<'containers'>[];
16
- const readsFrom = service.data.readsFrom as unknown as CollectionEntry<'containers'>[];
17
-
18
- const sendsList =
19
- sends.length > 0
20
- ? sends
21
- .map(
22
- (send) =>
23
- `- [${send.data.name} - ${send.data.version}](${baseUrl}/docs/events/${send.data.id}/${send.data.version}.mdx) - ${send.data.summary?.trim() || ''}`
24
- )
25
- .join('\n')
26
- : '- Does not send any messages';
27
-
28
- const receivesList =
29
- receives.length > 0
30
- ? receives
31
- .map(
32
- (receive) =>
33
- `- [${receive.data.name} - ${receive.data.version}](${baseUrl}/docs/events/${receive.data.id}/${receive.data.version}.mdx) - ${receive.data.summary?.trim() || ''}`
34
- )
35
- .join('\n')
36
- : '- Does not receive any messages';
37
-
38
- const writesToList =
39
- writesTo.length > 0
40
- ? writesTo
41
- .map(
42
- (write) =>
43
- `- [${write.data.name} - ${write.data.version}](${baseUrl}/docs/containers/${write.data.id}/${write.data.version}.mdx) - ${write.data.summary?.trim() || ''}`
44
- )
45
- .join('\n')
46
- : '- Does not write to any containers';
47
-
48
- const readsFromList =
49
- readsFrom.length > 0
50
- ? readsFrom
51
- .map(
52
- (read) =>
53
- `- [${read.data.name} - ${read.data.version}](${baseUrl}/docs/containers/${read.data.id}/${read.data.version}.mdx) - ${read.data.summary?.trim() || ''}`
54
- )
55
- .join('\n')
56
- : '- Does not read from any containers';
57
-
58
- return `## [${service.data.name} - ${service.data.version}](${baseUrl}/docs/services/${service.data.id}/${service.data.version}.mdx)
59
-
60
- ${service.data.summary?.trim() || ''}
61
-
62
- ### Sends
63
- ${sendsList}
64
-
65
- ### Receives
66
- ${receivesList}
67
-
68
- ### Writes to
69
- ${writesToList}
70
-
71
- ### Reads from
72
- ${readsFromList}
73
- `;
74
- };
75
-
76
- const content = ['# Services\n', services.map((item) => formatServiceWithLinks(item)).join('\n')].join('\n');
77
-
78
- return new Response(content, {
79
- headers: { 'Content-Type': 'text/plain; charset=utf-8' },
80
- });
81
- };