@eventcatalog/core 3.29.2 → 3.31.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.
- 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-36IA4UE4.js → chunk-7IGMIOQF.js} +1 -1
- package/dist/{chunk-EGQGCB2B.js → chunk-HVOLSUC2.js} +1 -1
- package/dist/{chunk-DB4IQ3GB.js → chunk-LWVHWR77.js} +1 -1
- package/dist/{chunk-VEUNSJ6Z.js → chunk-QIJOBQZ7.js} +1 -1
- package/dist/{chunk-MEJOYC5Z.js → chunk-UY5QDWK7.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 +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/astro.config.mjs +11 -7
- package/eventcatalog/public/logo.png +0 -0
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +29 -24
- package/eventcatalog/src/components/EnvironmentDropdown.tsx +33 -21
- package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +3 -53
- package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +144 -91
- package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +112 -109
- package/eventcatalog/src/components/Header.astro +9 -19
- package/eventcatalog/src/components/MDX/Accordion/Accordion.tsx +12 -14
- package/eventcatalog/src/components/MDX/Accordion/AccordionGroup.astro +11 -3
- package/eventcatalog/src/components/MDX/Design/Design.astro +1 -1
- package/eventcatalog/src/components/MDX/ResourceRef/ResourceRef.astro +15 -5
- package/eventcatalog/src/components/MDX/Tiles/Tile.astro +11 -8
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +164 -53
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +1 -1
- package/eventcatalog/src/components/SchemaExplorer/ExamplesViewer.tsx +4 -4
- package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +12 -10
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +48 -77
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +238 -169
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +189 -230
- package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +39 -36
- package/eventcatalog/src/components/Search/Search.astro +1 -1
- package/eventcatalog/src/components/Seo.astro +1 -1
- package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +218 -0
- package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +265 -0
- package/eventcatalog/src/components/Settings/GeneralSettingsForm.tsx +371 -0
- package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +183 -0
- package/eventcatalog/src/components/Settings/LogoUpload.tsx +137 -0
- package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +91 -0
- package/eventcatalog/src/components/Settings/ReadOnlyBanner.tsx +18 -0
- package/eventcatalog/src/components/Settings/Row.tsx +59 -0
- package/eventcatalog/src/components/Settings/SettingsShared.tsx +176 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +3 -3
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +233 -261
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +116 -68
- package/eventcatalog/src/components/Tables/Discover/FilterComponents.tsx +2 -2
- package/eventcatalog/src/components/Tables/Discover/columns.tsx +130 -197
- package/eventcatalog/src/components/Tables/Table.tsx +21 -18
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +79 -131
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +104 -175
- package/eventcatalog/src/content.config.ts +1 -1
- package/eventcatalog/src/enterprise/auth/error.astro +1 -1
- package/eventcatalog/src/enterprise/auth/login.astro +1 -1
- package/eventcatalog/src/enterprise/auth/middleware/middleware-auth.ts +11 -7
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +97 -95
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +232 -181
- package/eventcatalog/src/enterprise/feature.ts +2 -1
- package/eventcatalog/src/enterprise/fields/pages/fields.astro +10 -8
- package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +0 -8
- package/eventcatalog/src/layouts/DirectoryLayout.astro +17 -88
- package/eventcatalog/src/layouts/SettingsLayout.astro +116 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +562 -141
- package/eventcatalog/src/layouts/VisualiserLayout.astro +7 -2
- package/eventcatalog/src/pages/_index.astro +253 -256
- package/eventcatalog/src/pages/api/settings/ai.ts +57 -0
- package/eventcatalog/src/pages/api/settings/general.ts +71 -0
- package/eventcatalog/src/pages/api/settings/logo.ts +113 -0
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +3 -3
- package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +223 -73
- package/eventcatalog/src/pages/discover/[type]/index.astro +22 -141
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +130 -30
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +147 -53
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +6 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/examples/[...filename].astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +22 -19
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +71 -61
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename].astro +5 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +3 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +6 -32
- package/eventcatalog/src/pages/docs/llm/llms.txt.ts +5 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +11 -4
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +12 -5
- package/eventcatalog/src/pages/schemas/explorer/index.astro +10 -8
- package/eventcatalog/src/pages/settings/assistant.astro +37 -0
- package/eventcatalog/src/pages/settings/billing.astro +17 -0
- package/eventcatalog/src/pages/settings/general.astro +32 -0
- package/eventcatalog/src/pages/settings/index.astro +21 -0
- package/eventcatalog/src/pages/settings/llm-access.astro +34 -0
- package/eventcatalog/src/pages/settings/mcp.astro +14 -0
- package/eventcatalog/src/pages/studio.astro +1 -1
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +2 -7
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +2 -7
- package/eventcatalog/src/styles/theme.css +95 -30
- package/eventcatalog/src/styles/themes/forest.css +17 -9
- package/eventcatalog/src/styles/themes/ocean.css +10 -2
- package/eventcatalog/src/styles/themes/sapphire.css +10 -2
- package/eventcatalog/src/styles/themes/sunset.css +25 -17
- package/eventcatalog/src/types/react-syntax-highlighter.d.ts +13 -0
- package/eventcatalog/src/utils/eventcatalog-config/config-schema.ts +49 -0
- package/eventcatalog/src/utils/eventcatalog-config/config-writer.ts +149 -0
- package/eventcatalog/src/utils/url-builder.ts +4 -2
- package/package.json +7 -5
- package/eventcatalog/public/logo.svg +0 -14
- package/eventcatalog/src/enterprise/plans/index.astro +0 -319
- package/eventcatalog/src/pages/docs/llm/llms-services.txt.ts +0 -81
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import * as recast from 'recast';
|
|
4
|
+
import babelParser from 'recast/parsers/babel.js';
|
|
5
|
+
|
|
6
|
+
const b = recast.types.builders;
|
|
7
|
+
type ASTNode = recast.types.ASTNode;
|
|
8
|
+
type ObjectExpression = recast.types.namedTypes.ObjectExpression;
|
|
9
|
+
type Property = recast.types.namedTypes.Property;
|
|
10
|
+
type ObjectProperty = recast.types.namedTypes.ObjectProperty;
|
|
11
|
+
|
|
12
|
+
export type ConfigPrimitive = string | boolean;
|
|
13
|
+
|
|
14
|
+
export type ConfigUpdate = {
|
|
15
|
+
// Primitive value → set; `null` → remove; object → recurse one level.
|
|
16
|
+
[key: string]: ConfigPrimitive | null | NestedConfigUpdate;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type NestedConfigUpdate = {
|
|
20
|
+
[key: string]: ConfigPrimitive | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const projectRoot = () => process.env.PROJECT_DIR ?? process.cwd();
|
|
24
|
+
|
|
25
|
+
export const getConfigPath = () => path.join(projectRoot(), 'eventcatalog.config.js');
|
|
26
|
+
|
|
27
|
+
export const readConfigSource = (): string => fs.readFileSync(getConfigPath(), 'utf8');
|
|
28
|
+
|
|
29
|
+
const parse = (source: string) => recast.parse(source, { parser: babelParser });
|
|
30
|
+
|
|
31
|
+
const isObjectProperty = (n: any): n is Property | ObjectProperty => n && (n.type === 'ObjectProperty' || n.type === 'Property');
|
|
32
|
+
|
|
33
|
+
const propertyKeyName = (prop: Property | ObjectProperty): string | null => {
|
|
34
|
+
const key: any = prop.key;
|
|
35
|
+
if (!key) return null;
|
|
36
|
+
if (key.type === 'Identifier') return key.name;
|
|
37
|
+
if (key.type === 'Literal' || key.type === 'StringLiteral') return String(key.value);
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const findExportedObject = (ast: ASTNode): ObjectExpression => {
|
|
42
|
+
let result: ObjectExpression | null = null;
|
|
43
|
+
recast.visit(ast, {
|
|
44
|
+
visitExportDefaultDeclaration(p) {
|
|
45
|
+
const decl: any = p.node.declaration;
|
|
46
|
+
if (decl?.type === 'ObjectExpression') {
|
|
47
|
+
result = decl as ObjectExpression;
|
|
48
|
+
} else if (decl?.type === 'TSAsExpression' && decl.expression?.type === 'ObjectExpression') {
|
|
49
|
+
result = decl.expression as ObjectExpression;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
if (!result) throw new Error('Could not find `export default { ... }` in eventcatalog.config.js');
|
|
55
|
+
return result;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const findProperty = (obj: ObjectExpression, name: string): (Property | ObjectProperty) | null => {
|
|
59
|
+
for (const prop of obj.properties) {
|
|
60
|
+
if (isObjectProperty(prop) && propertyKeyName(prop) === name) return prop as Property | ObjectProperty;
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const removeProperty = (obj: ObjectExpression, name: string): boolean => {
|
|
66
|
+
const idx = obj.properties.findIndex((p) => isObjectProperty(p) && propertyKeyName(p) === name);
|
|
67
|
+
if (idx === -1) return false;
|
|
68
|
+
obj.properties.splice(idx, 1);
|
|
69
|
+
return true;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const buildLiteral = (value: ConfigPrimitive) => (typeof value === 'boolean' ? b.booleanLiteral(value) : b.stringLiteral(value));
|
|
73
|
+
|
|
74
|
+
const setPrimitiveProperty = (obj: ObjectExpression, name: string, value: ConfigPrimitive) => {
|
|
75
|
+
const existing = findProperty(obj, name);
|
|
76
|
+
const literal = buildLiteral(value);
|
|
77
|
+
if (existing) {
|
|
78
|
+
(existing as any).value = literal;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
obj.properties.push(b.property('init', b.identifier(name), literal) as any);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const ensureNestedObject = (obj: ObjectExpression, name: string): ObjectExpression => {
|
|
85
|
+
const existing = findProperty(obj, name);
|
|
86
|
+
if (existing && (existing as any).value?.type === 'ObjectExpression') {
|
|
87
|
+
return (existing as any).value as ObjectExpression;
|
|
88
|
+
}
|
|
89
|
+
const fresh = b.objectExpression([]);
|
|
90
|
+
if (existing) {
|
|
91
|
+
(existing as any).value = fresh;
|
|
92
|
+
} else {
|
|
93
|
+
obj.properties.push(b.property('init', b.identifier(name), fresh) as any);
|
|
94
|
+
}
|
|
95
|
+
return fresh;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const removeNestedObjectIfEmpty = (obj: ObjectExpression, name: string) => {
|
|
99
|
+
const existing = findProperty(obj, name);
|
|
100
|
+
if (!existing) return;
|
|
101
|
+
const value: any = (existing as any).value;
|
|
102
|
+
if (value?.type === 'ObjectExpression' && value.properties.length === 0) {
|
|
103
|
+
removeProperty(obj, name);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Apply an update to eventcatalog.config.js, preserving formatting/comments via recast.
|
|
109
|
+
*
|
|
110
|
+
* - String value → replace existing or insert new property
|
|
111
|
+
* - `null` value → remove property if present
|
|
112
|
+
* - Nested object value → recurse one level (sufficient for v1 fields like `logo`)
|
|
113
|
+
*
|
|
114
|
+
* Returns the updated source. Caller is responsible for writing it.
|
|
115
|
+
*/
|
|
116
|
+
export const applyConfigUpdate = (source: string, update: ConfigUpdate): string => {
|
|
117
|
+
const ast = parse(source);
|
|
118
|
+
const root = findExportedObject(ast);
|
|
119
|
+
|
|
120
|
+
for (const [key, value] of Object.entries(update)) {
|
|
121
|
+
if (value === null) {
|
|
122
|
+
removeProperty(root, key);
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (typeof value === 'string' || typeof value === 'boolean') {
|
|
126
|
+
setPrimitiveProperty(root, key, value);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
// nested object update
|
|
130
|
+
const nested = ensureNestedObject(root, key);
|
|
131
|
+
for (const [nestedKey, nestedValue] of Object.entries(value)) {
|
|
132
|
+
if (nestedValue === null) {
|
|
133
|
+
removeProperty(nested, nestedKey);
|
|
134
|
+
} else if (typeof nestedValue === 'string' || typeof nestedValue === 'boolean') {
|
|
135
|
+
setPrimitiveProperty(nested, nestedKey, nestedValue);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
removeNestedObjectIfEmpty(root, key);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return recast.print(ast, { quote: 'single' }).code;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const writeConfigUpdate = (update: ConfigUpdate): string => {
|
|
145
|
+
const source = readConfigSource();
|
|
146
|
+
const updated = applyConfigUpdate(source, update);
|
|
147
|
+
fs.writeFileSync(getConfigPath(), updated, 'utf8');
|
|
148
|
+
return updated;
|
|
149
|
+
};
|
|
@@ -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
|
-
|
|
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.
|
|
10
|
+
"version": "3.31.1",
|
|
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.
|
|
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.
|
|
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/
|
|
108
|
-
"@eventcatalog/
|
|
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,14 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200">
|
|
2
|
-
<!-- Background shape -->
|
|
3
|
-
<rect x="50" y="50" width="200" height="100" rx="20" fill="#4a86e8" />
|
|
4
|
-
|
|
5
|
-
<!-- Flow waves -->
|
|
6
|
-
<path d="M80 90 Q100 70, 120 90 Q140 110, 160 90 Q180 70, 200 90 Q220 110, 240 90"
|
|
7
|
-
fill="none" stroke="#ffffff" stroke-width="8" stroke-linecap="round" />
|
|
8
|
-
|
|
9
|
-
<!-- Shopping cart icon -->
|
|
10
|
-
<circle cx="220" cy="110" r="10" fill="#ffffff" />
|
|
11
|
-
<circle cx="180" cy="110" r="10" fill="#ffffff" />
|
|
12
|
-
<path d="M160 80 L170 110 L230 110 L240 80 Z" fill="none" stroke="#ffffff" stroke-width="3" />
|
|
13
|
-
<path d="M170 80 L245 80" fill="none" stroke="#ffffff" stroke-width="3" />
|
|
14
|
-
</svg>
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
|
-
import {
|
|
4
|
-
Rocket,
|
|
5
|
-
Users,
|
|
6
|
-
Bot,
|
|
7
|
-
ScrollText,
|
|
8
|
-
Component,
|
|
9
|
-
Cpu,
|
|
10
|
-
Code,
|
|
11
|
-
LifeBuoy,
|
|
12
|
-
ExternalLink,
|
|
13
|
-
Network,
|
|
14
|
-
Github,
|
|
15
|
-
Flag,
|
|
16
|
-
} from 'lucide-react';
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
<VerticalSideBarLayout title="EventCatalog Pro" showNestedSideBar={false}>
|
|
20
|
-
<div class="min-h-[calc(100vh-60px)] bg-[rgb(var(--ec-page-bg))]">
|
|
21
|
-
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
|
22
|
-
{/* Hero Section */}
|
|
23
|
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center mb-16">
|
|
24
|
-
<div>
|
|
25
|
-
<div
|
|
26
|
-
class="inline-flex items-center px-4 py-2 rounded-full bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300 font-medium text-sm mb-6"
|
|
27
|
-
>
|
|
28
|
-
<Rocket className="w-4 h-4 mr-2" />
|
|
29
|
-
Upgrade your Catalog
|
|
30
|
-
</div>
|
|
31
|
-
<h1 class="text-4xl font-bold text-[rgb(var(--ec-page-text))] tracking-tight mb-4">Supercharge your EventCatalog</h1>
|
|
32
|
-
<p class="text-xl text-[rgb(var(--ec-page-text-muted))] mb-8">
|
|
33
|
-
Unlock advanced features like automated docs (e.g OpenAPI, AsyncAPI), Custom documentation, AI assistant, and catalog
|
|
34
|
-
federation — all designed to help you scale without complexity.
|
|
35
|
-
</p>
|
|
36
|
-
|
|
37
|
-
{/* Integration Sources */}
|
|
38
|
-
<div class="mb-8">
|
|
39
|
-
<p class="text-sm font-medium text-[rgb(var(--ec-page-text-muted))] mb-4">Generate documentation from:</p>
|
|
40
|
-
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
|
|
41
|
-
<a
|
|
42
|
-
href="https://www.eventcatalog.dev/integrations/openapi"
|
|
43
|
-
class="flex items-center space-x-2 bg-[rgb(var(--ec-content-hover))] rounded-lg px-4 py-2 hover:bg-[rgb(var(--ec-content-active))] transition-colors duration-150"
|
|
44
|
-
>
|
|
45
|
-
<img src="/icons/openapi.svg" alt="OpenAPI" class="w-6 h-6" />
|
|
46
|
-
<span class="text-sm font-medium text-[rgb(var(--ec-page-text))]">OpenAPI</span>
|
|
47
|
-
</a>
|
|
48
|
-
<a
|
|
49
|
-
href="https://www.eventcatalog.dev/integrations/asyncapi"
|
|
50
|
-
class="flex items-center space-x-2 bg-[rgb(var(--ec-content-hover))] rounded-lg px-4 py-2 hover:bg-[rgb(var(--ec-content-active))] transition-colors duration-150"
|
|
51
|
-
>
|
|
52
|
-
<img src="/icons/asyncapi.svg" alt="AsyncAPI" class="w-6 h-6" />
|
|
53
|
-
<span class="text-sm font-medium text-[rgb(var(--ec-page-text))]">AsyncAPI</span>
|
|
54
|
-
</a>
|
|
55
|
-
<a
|
|
56
|
-
href="https://www.eventcatalog.dev/integrations"
|
|
57
|
-
class="flex items-center space-x-2 bg-[rgb(var(--ec-content-hover))] rounded-lg px-4 py-2 hover:bg-[rgb(var(--ec-content-active))] transition-colors duration-150"
|
|
58
|
-
>
|
|
59
|
-
<Component className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
60
|
-
<span class="text-sm font-medium text-[rgb(var(--ec-page-text))]">And more...</span>
|
|
61
|
-
</a>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div class="flex flex-col sm:flex-row gap-4 mb-8">
|
|
66
|
-
<a
|
|
67
|
-
href="https://www.eventcatalog.cloud"
|
|
68
|
-
target="_blank"
|
|
69
|
-
class="inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-purple-600 hover:bg-purple-700 transition-colors duration-150"
|
|
70
|
-
>
|
|
71
|
-
Try for free
|
|
72
|
-
<svg class="ml-2 w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
|
|
73
|
-
<path
|
|
74
|
-
fill-rule="evenodd"
|
|
75
|
-
d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
|
|
76
|
-
clip-rule="evenodd"></path>
|
|
77
|
-
</svg>
|
|
78
|
-
</a>
|
|
79
|
-
<a
|
|
80
|
-
href="https://www.eventcatalog.dev"
|
|
81
|
-
target="_blank"
|
|
82
|
-
class="inline-flex items-center justify-center px-6 py-3 border border-[rgb(var(--ec-page-border))] text-base font-medium rounded-lg text-[rgb(var(--ec-page-text))] bg-[rgb(var(--ec-card-bg))] hover:bg-[rgb(var(--ec-content-hover))] transition-colors duration-150"
|
|
83
|
-
>
|
|
84
|
-
View documentation
|
|
85
|
-
</a>
|
|
86
|
-
</div>
|
|
87
|
-
<p class="text-sm text-[rgb(var(--ec-page-text-muted))]">Try free for 14 days, no credit card required</p>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div class="relative">
|
|
91
|
-
<img
|
|
92
|
-
src="/images/eventcatalog-upgrade.png"
|
|
93
|
-
alt="EventCatalog Pro"
|
|
94
|
-
class="w-full rounded-xl shadow-lg border border-[rgb(var(--ec-page-border))]"
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
{/* Why upgrade section */}
|
|
100
|
-
<div class="mb-16">
|
|
101
|
-
<h2 class="text-2xl font-semibold text-[rgb(var(--ec-page-text))] mb-8">Why upgrade EventCatalog?</h2>
|
|
102
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
103
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
104
|
-
<div class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
105
|
-
<ScrollText className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
106
|
-
</div>
|
|
107
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">A living source of truth</h3>
|
|
108
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
109
|
-
Keep docs in sync with your systems, ensuring your team always has accurate information.
|
|
110
|
-
</p>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
114
|
-
<div class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
115
|
-
<Users className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
116
|
-
</div>
|
|
117
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Shared system understanding</h3>
|
|
118
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
119
|
-
Align teams and reduce tribal knowledge with centralized architecture documentation.
|
|
120
|
-
</p>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
124
|
-
<div class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
125
|
-
<Component className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
126
|
-
</div>
|
|
127
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Architecture that scales</h3>
|
|
128
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
129
|
-
Grow without losing context of complexity, making architectural decisions easy to find.
|
|
130
|
-
</p>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
{/* Documentation Journey Section */}
|
|
136
|
-
<div class="mb-16">
|
|
137
|
-
<h2 class="text-2xl font-semibold text-[rgb(var(--ec-page-text))] mb-4">Scales with your team and architecture</h2>
|
|
138
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] mb-8 max-w-3xl">
|
|
139
|
-
From scattered documentation to a well-governed system, EventCatalog helps you control complexity with well governed
|
|
140
|
-
documentation for your teams. Choose the plan that fits your needs.
|
|
141
|
-
</p>
|
|
142
|
-
|
|
143
|
-
<div class="relative py-8">
|
|
144
|
-
{/* Journey Line */}
|
|
145
|
-
<div
|
|
146
|
-
class="absolute top-1/2 left-0 w-full h-1 bg-purple-200 dark:bg-purple-900/50 transform -translate-y-1/2 hidden md:block"
|
|
147
|
-
>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 relative">
|
|
151
|
-
{/* Stage 1 */}
|
|
152
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))] relative">
|
|
153
|
-
<div
|
|
154
|
-
class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center mb-4 mx-auto md:absolute md:-top-6 md:left-1/2 md:transform md:-translate-x-1/2"
|
|
155
|
-
>
|
|
156
|
-
<Github className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
157
|
-
</div>
|
|
158
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2 text-center">Community Edition</h3>
|
|
159
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] text-sm text-center">
|
|
160
|
-
You're just beginning to document services, domains, and events.
|
|
161
|
-
</p>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
{/* Stage 2 */}
|
|
165
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))] relative">
|
|
166
|
-
<div
|
|
167
|
-
class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center mb-4 mx-auto md:absolute md:-top-6 md:left-1/2 md:transform md:-translate-x-1/2"
|
|
168
|
-
>
|
|
169
|
-
<Flag className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
170
|
-
</div>
|
|
171
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2 text-center">Starter Plan</h3>
|
|
172
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] text-sm text-center">
|
|
173
|
-
For teams formalizing their architecture documentation
|
|
174
|
-
</p>
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
{/* Stage 3 */}
|
|
178
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))] relative">
|
|
179
|
-
<div
|
|
180
|
-
class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center mb-4 mx-auto md:absolute md:-top-6 md:left-1/2 md:transform md:-translate-x-1/2"
|
|
181
|
-
>
|
|
182
|
-
<Network className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
183
|
-
</div>
|
|
184
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2 text-center">Scale Plan</h3>
|
|
185
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] text-sm text-center">
|
|
186
|
-
Built for teams scaling across domains and integrating with external systems
|
|
187
|
-
</p>
|
|
188
|
-
</div>
|
|
189
|
-
|
|
190
|
-
{/* Stage 4 */}
|
|
191
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))] relative">
|
|
192
|
-
<div
|
|
193
|
-
class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center mb-4 mx-auto md:absolute md:-top-6 md:left-1/2 md:transform md:-translate-x-1/2"
|
|
194
|
-
>
|
|
195
|
-
<Rocket className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
196
|
-
</div>
|
|
197
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2 text-center">Enterprise Plan</h3>
|
|
198
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] text-sm text-center">
|
|
199
|
-
Designed for organizations building and governing complex event platforms
|
|
200
|
-
</p>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
{/* Mobile Progress Indicators */}
|
|
205
|
-
<div class="flex justify-center items-center space-x-2 mt-4 md:hidden">
|
|
206
|
-
<div class="w-2 h-2 rounded-full bg-purple-600 dark:bg-purple-400"></div>
|
|
207
|
-
<div class="w-2 h-2 rounded-full bg-purple-400 dark:bg-purple-500"></div>
|
|
208
|
-
<div class="w-2 h-2 rounded-full bg-purple-300 dark:bg-purple-600"></div>
|
|
209
|
-
<div class="w-2 h-2 rounded-full bg-purple-200 dark:bg-purple-700"></div>
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
|
|
214
|
-
{/* Features Section */}
|
|
215
|
-
<div class="mb-16">
|
|
216
|
-
<h2 class="text-2xl font-semibold text-[rgb(var(--ec-page-text))] mb-8">Save time with EventCatalog</h2>
|
|
217
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
|
218
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
219
|
-
<div class="w-12 h-12 bg-blue-100 dark:bg-blue-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
220
|
-
<ScrollText className="w-6 h-6 text-blue-600 dark:text-blue-400" />
|
|
221
|
-
</div>
|
|
222
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Custom Documentation</h3>
|
|
223
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
224
|
-
Add ADRs, runbooks, and technical guidelines to create a centralized knowledge hub.
|
|
225
|
-
</p>
|
|
226
|
-
</div>
|
|
227
|
-
|
|
228
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
229
|
-
<div class="w-12 h-12 bg-green-100 dark:bg-green-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
230
|
-
<Bot className="w-6 h-6 text-green-600 dark:text-green-400" />
|
|
231
|
-
</div>
|
|
232
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">AI Assistant</h3>
|
|
233
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
234
|
-
Chat with your catalog to quickly find information about your architecture.
|
|
235
|
-
</p>
|
|
236
|
-
</div>
|
|
237
|
-
|
|
238
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
239
|
-
<div class="w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
240
|
-
<Component className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
241
|
-
</div>
|
|
242
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Federation</h3>
|
|
243
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
244
|
-
Connect multiple catalogs into a unified view for centralized visibility across teams.
|
|
245
|
-
</p>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
249
|
-
<div class="w-12 h-12 bg-indigo-100 dark:bg-indigo-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
250
|
-
<Code className="w-6 h-6 text-indigo-600 dark:text-indigo-400" />
|
|
251
|
-
</div>
|
|
252
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">IDE Integration</h3>
|
|
253
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
254
|
-
Access EventCatalog directly from your IDE for seamless documentation while coding.
|
|
255
|
-
</p>
|
|
256
|
-
</div>
|
|
257
|
-
|
|
258
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
259
|
-
<div class="w-12 h-12 bg-yellow-100 dark:bg-yellow-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
260
|
-
<Cpu className="w-6 h-6 text-yellow-600 dark:text-yellow-400" />
|
|
261
|
-
</div>
|
|
262
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Automated Documentation</h3>
|
|
263
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
264
|
-
Generate and maintain documentation automatically with integrations for AsyncAPI and OpenAPI.
|
|
265
|
-
</p>
|
|
266
|
-
</div>
|
|
267
|
-
|
|
268
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
269
|
-
<div class="w-12 h-12 bg-red-100 dark:bg-red-900/30 rounded-lg flex items-center justify-center mb-4">
|
|
270
|
-
<LifeBuoy className="w-6 h-6 text-red-600 dark:text-red-400" />
|
|
271
|
-
</div>
|
|
272
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Priority Support</h3>
|
|
273
|
-
<p class="text-[rgb(var(--ec-page-text-muted))]">
|
|
274
|
-
Get priority email support and assistance from the EventCatalog team.
|
|
275
|
-
</p>
|
|
276
|
-
</div>
|
|
277
|
-
</div>
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
{/* Questions Section */}
|
|
281
|
-
<div class="mt-16">
|
|
282
|
-
<h2 class="text-2xl font-semibold text-[rgb(var(--ec-page-text))] mb-8">Questions about EventCatalog?</h2>
|
|
283
|
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
|
284
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
285
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Request a Demo</h3>
|
|
286
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] mb-4">
|
|
287
|
-
See EventCatalog in action with a personalized demo from our team.
|
|
288
|
-
</p>
|
|
289
|
-
<a
|
|
290
|
-
href="mailto:hello@eventcatalog.dev"
|
|
291
|
-
class="text-purple-600 dark:text-purple-400 hover:text-purple-700 dark:hover:text-purple-300 font-medium inline-flex items-center"
|
|
292
|
-
>
|
|
293
|
-
Schedule a demo
|
|
294
|
-
<ExternalLink className="w-4 h-4 ml-1.5" />
|
|
295
|
-
</a>
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
<div class="bg-[rgb(var(--ec-card-bg))] rounded-xl p-6 shadow-xs border border-[rgb(var(--ec-page-border))]">
|
|
299
|
-
<h3 class="text-lg font-semibold text-[rgb(var(--ec-page-text))] mb-2">Join the community</h3>
|
|
300
|
-
<p class="text-[rgb(var(--ec-page-text-muted))] mb-4">Join our growing community on Discord. Over 1000+ members.</p>
|
|
301
|
-
<a
|
|
302
|
-
href="https://discord.gg/3rjaZMmrAm"
|
|
303
|
-
class="text-purple-600 dark:text-purple-400 hover:text-purple-700 dark:hover:text-purple-300 font-medium inline-flex items-center"
|
|
304
|
-
>
|
|
305
|
-
Join the community
|
|
306
|
-
<ExternalLink className="w-4 h-4 ml-1.5" />
|
|
307
|
-
</a>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
</div>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</VerticalSideBarLayout>
|
|
314
|
-
|
|
315
|
-
<style>
|
|
316
|
-
.scroll-smooth {
|
|
317
|
-
scroll-behavior: smooth;
|
|
318
|
-
}
|
|
319
|
-
</style>
|
|
@@ -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
|
-
};
|